Thread 105828552 - /g/ [Archived: 422 hours ago]

Anonymous
7/7/2025, 6:56:31 PM No.105828552
O6AczwfV_400x400
O6AczwfV_400x400
md5: bd050a890f2d9f5e9819d6253be0797c🔍
Based or cringe? I tried it after Java&Spring saar, and it's quite nice with compiling it and deploying in docker butt there's no pleasaarnt ORM with working on crud as same as saarping data JPA or hibersaarnate.

Need ur opinion about this subject. Will it die like ruby? Will it be php/nodejs 2.0?
Replies: >>105828816 >>105829425 >>105829429 >>105829722 >>105832131 >>105832161 >>105832289 >>105832746 >>105832882 >>105833864 >>105833870 >>105834024 >>105835796 >>105837424
Anonymous
7/7/2025, 7:11:47 PM No.105828720
Gorm if fine, maybe even better than ActiveRecord because it can do automatic migrations which is nice in the simplest cases when you're just adding/removing columns at the start of application development cycle. But it says you can add manual migrations with some lib. Go is okay, I suppose. I like D a lot more, but D can't beat Go's number of nice third party libs. I would probably choose Go over Rails for crud these days, because I've had it with Rails and it's just Ruby fatigue. But also because Go is obviously faster.
Anonymous
7/7/2025, 7:20:36 PM No.105828816
>>105828552 (OP)
I had to pick up ‘go’ and c# again for a project.
Go runs circles around C# in nearly every way, I had forgotten how bad C# was…
Part of it was the C# frameworks. Ugh.
ORMs are dead. Or should be.
However go’s runtime type system is pretty good, so I think it will eventually get something like that.
Replies: >>105828918 >>105832273
Anonymous
7/7/2025, 7:25:26 PM No.105828877
I have a suspicion that ORMs are somewhat overrated. Forcing SQL-based dbs to correspond to OOP has some dire consequences on the backend. I love C# but I'm not a big fan of EF, I use Dapper for that reason.

There was a time when people thought we would be switching around whatever we used for our database side so they tried to write db agnostic code with ORMs. That hasn't proven to be real at all. SQL is eternal and curbstomped the NoSQL fad into oblivion. So what you're left with is this clumsy translation that forces SQL to be gimped and handicapped to match OOP rather than just... running the SQL in a SQL-optimal way and then grabbing the values yourself, doing what you need with the code.

It actually seems like at this stage of software maturity, that it's the backend languages themselves that are more transient than your database. You could have a single SQL db, schema, data, that you use for 50 years of business while going through like 3 different backend server side languages actually retrieving it. We should be making SQL a first class citizen.

tl;dr I find ORMs to be deceptively "convenient" at first but not really worth the forced rigidity as you scale up.
Replies: >>105828963 >>105829632
Anonymous
7/7/2025, 7:29:27 PM No.105828918
>>105828816

I find C#/.NET's framework and dependencies environment to be streamlined and unparalleled. The most "pick up and work" environment out there, internally complete. I dread going over to the node world and dealing with the package spaghetti, or Java and Maven/gradle.
Replies: >>105829446 >>105832864
Anonymous
7/7/2025, 7:33:18 PM No.105828963
>>105828877
ORM's main purpose is not writing SQL for me (although it's nice), but actually automatically extracting field values and putting them in an object of some sorts. Because I mean you'd have to do it anyway and then you end up reinventing an ORM, so why not just use something that's already there? Yes, you may have some special queries but all of the ORMs I know of allow you to write raw SQL, so it's not an argument against them.
Replies: >>105829355
Anonymous
7/7/2025, 7:56:11 PM No.105829145
1750854065192
1750854065192
md5: 55d6b4f4ba69edcb19d20fc49a34aeb3🔍
Just added encryption to my personal notetaking app, it was just like 40 lines of code using golangs cryptio/scrypt library... kinda based
Replies: >>105829329
Anonymous
7/7/2025, 8:16:17 PM No.105829329
>>105829145
And you vibecoded it, haven't you?
Replies: >>105829927
Anonymous
7/7/2025, 8:20:29 PM No.105829355
>>105828963

They like to call that "micro ORM" something that barebones simply maps an object to a SQL result. It's really not hard to implement yourself or a major point of friction. ORM as it's now used in the industry describes a larger abstraction that basically makes it as if the SQL doesn't exist at all, you're just coding to the database. But that's a fantasy so you end up fighting both the ORM and SQL, instead of just SQL.
Replies: >>105829396
Anonymous
7/7/2025, 8:25:12 PM No.105829396
>>105829355
Maybe it's me, but not once since I started woth Rails (and that was in 2000s) have I thought to myself that a DB doesn't exist, I was always very concious of it. But I'm also fairly autistic.
Replies: >>105829468
Anonymous
7/7/2025, 8:27:55 PM No.105829425
>>105828552 (OP)
Either use bob or sqlc
Anonymous
7/7/2025, 8:28:12 PM No.105829429
>>105828552 (OP)
Go is fine
ORMs however are extremely cringe
Anonymous
7/7/2025, 8:29:38 PM No.105829446
>>105828918
Not as good as go but certainly both are better than nearly everything else. A lot better.
Anonymous
7/7/2025, 8:31:44 PM No.105829468
>>105829396

Not like literally, but abstractly. They try to create a deliberate barrier so you can basically swap it out for a new db if you have to, while maintaining the same code. If you had a stack like this:

BookHandler
Book
Database

BookHandler would only know about Book and have no idea how the underlying db works, and an ORM is supposed to handle all of the magic of interacting with the db itself while you focus on using the Books. But the truth as revealed over time is: no one ever moves on from their original db. It's actually the most foundational part of any app or organization. So trying to abstract it away with ORMs is not only useless, it's counterproductive, you should be maximizing the power of the one thing you know you will never rewrite or swap out.
Anonymous
7/7/2025, 8:33:02 PM No.105829481
it actually does fill a niche
Anonymous
7/7/2025, 8:49:15 PM No.105829632
>>105828877
There is a term for what is happening, "Object–relational impedance mismatch".
I happen to be lucky having been working on business software that never started to use an ORM. All the ORM proof of concepts were done in their own bullshit microservices.
Having these side by side you really start to appreciate the simplicity of "programming in the relational model".
I am pretty much done with object oriented programming. It is just a waste of energy to try and do conversions back and forth.
Plus it is not really even that hard to build a data accessor directly for the relational model, meaning CRUD functions. With some reflection magic you can even get a very performant version out of it in a week or something. The hard part are bulk operations and how to combine them with basic crud operations. But I might have a hunch that that is really just caused by the poor interface to the db, that is SQL itself, and what bulk operations the different vendors have implemented.
Anonymous
7/7/2025, 9:00:28 PM No.105829722
>>105828552 (OP)
I've used it for a big project recently. What I can say about it is that it really is simple, I knew everything I needed to know about the language in an afternoon of study. It compiles extremely fast and it's tooling is great + well documented. What I missed in go was the existence of a sum type (a simple enum with exhaustive switch would have sufficed); in go the T vs *T methods is always a mystery and the language really isn't expressive, python/scala/haskell code will baie a 10th the lines of code of a go project. A good use case for it would be a project with many idiots in the team, they'll be able to contribute just as much as good programmers. A bad use case is the inverse, a project with very few but very good programmers. I would give them something more powerful like Ocaml.
Anonymous
7/7/2025, 9:20:19 PM No.105829927
>>105829329
no, i read the docs
Anonymous
7/8/2025, 1:21:30 AM No.105832131
>>105828552 (OP)
>Based or cringe?
cringe since they added generics.
Anonymous
7/8/2025, 1:25:34 AM No.105832161
>>105828552 (OP)
it's the better C#. The best part is you cant share modules in binary form, it always has to be source code, which makes debugging so much easier. Corposhits cant deliver an SDK in binary form that stops working after a year, they MUST publish the source code on github.
Anonymous
7/8/2025, 1:41:55 AM No.105832273
>>105828816
This but the exact opposite
Anonymous
7/8/2025, 1:43:38 AM No.105832289
>>105828552 (OP)
>no pleasaarnt ORM
Not an ORM but try SQLC. It's great.
Anonymous
7/8/2025, 2:44:30 AM No.105832746
>>105828552 (OP)
If you absolutely need an ORM, use gorm. Its rough, but it gets the job done. If nothing else, its nice for auto-creating tables from struct types.
Anonymous
7/8/2025, 3:01:53 AM No.105832864
>>105828918
Perhaps my problem was that I had only been doing low-level C-like stuff with C# before that. Then, like a decade later, I picked C# from the choices MS gave me for a web app as the hardest-core option in Azure.
Right off the bat, I picked .Net 9, but their framework stuff only supported .Net 8.
There’s been so many versions of this stuff you need to use, (the web request entry points) I tried lots of examples and many of them used the wrong version, or did things that were deprecated, etc. I found it very frustrating. Two days, and i needed to switch to VS code with the Azure extensions I finally got it to work, but I don’t know why or how.

Normally I write code compatible with the built-in CSC compilier (like .Net 2.0) so I can get things done when I find myself needing to write a network tunnel to make something work in an emergency and I don’t or can’t set up a whole dev env…
… that’s what MS is locking you into… a whole VS Code or VStudio env just to write a hello world program, but I don’t want that every time.
Replies: >>105832904 >>105836984
Anonymous
7/8/2025, 3:05:29 AM No.105832882
1735274577434226
1735274577434226
md5: f66dfdac460b9e2c7db2fdc3699a1492🔍
>>105828552 (OP)
go away
Anonymous
7/8/2025, 3:09:49 AM No.105832904
>>105832864
… cont
I was doing something very similar with ‘go’ and despite never having used go before, it came right up.
Go has many faults (and I’m keeping a list) but everthing worked as advertised first try.
Maybe it was just azure, but the changing frameworks over the years made it very difficult to get straight answers from anywhere.

If you ask me “did you write a Blazor app?” My answer is “I don’t know”
Replies: >>105836984
Anonymous
7/8/2025, 5:27:14 AM No.105833864
>>105828552 (OP)
sqlc to generate your typesafe code
no need for ORM
it might sounds a good idea at the beginning but you will quickly regret it
Anonymous
7/8/2025, 5:28:34 AM No.105833870
>>105828552 (OP)
>docker
>orm
cringe
Anonymous
7/8/2025, 5:49:56 AM No.105834024
>>105828552 (OP)
>single self-contained binary
>docker
mental retardation
Anonymous
7/8/2025, 9:19:51 AM No.105835348
>GO
nah thanks, I already programmed in Java 6 and it was cancer
Replies: >>105836761
Anonymous
7/8/2025, 10:31:23 AM No.105835796
>>105828552 (OP)
not needed
Anonymous
7/8/2025, 1:29:54 PM No.105836761
>>105835348
> Go == Java
-/g/, 2025.
Replies: >>105836969
Anonymous
7/8/2025, 2:02:45 PM No.105836969
>>105836761
nah it's much worse than modern Java
both are imperative ALGOL shit
Replies: >>105837402
Anonymous
7/8/2025, 2:07:12 PM No.105836984
>>105832864
>>105832904

That's the flip side of a "complete" dev environment like .NET. You can't really patch it together from scratch like a simple scripting language or C there is too much overhead. I basically always use some starter template from VS and just go from there it's pretty hard to create a build yourself from scratch.
Anonymous
7/8/2025, 3:20:38 PM No.105837402
>>105836969
The fuck are you smoking? The only real difference between the 2 styles both languages push is that java forces you to wrap everything in a class and java has inheritance. Both are imperative and quite oop styled. Go has method receivers on structs, interfaces and generics, java is pretty much the same but wraps it all in a class. The big difference between the 2 is that java uses a memory hog of a runtime and cmake teir build systems to ship your product where as Go does not. Also there isn't a single language that has more than 1% market share which is functional, every functional language is a meme, and no adts does not make your language functional, so well done on admitting you're a neet.
Replies: >>105837483
Anonymous
7/8/2025, 3:22:59 PM No.105837424
>>105828552 (OP)
More pajeet than Java and this is no exaggeration
Replies: >>105837442
Anonymous
7/8/2025, 3:25:23 PM No.105837442
>>105837424
True. The fact that go literally refuses to compile code with unused variables no matter what sounds insane to any normal programmer, but it begins making sense when you realize that the language was designed around the goal of tard wrangling pajeets.
Replies: >>105837514
Anonymous
7/8/2025, 3:32:07 PM No.105837483
>>105837402
Functional paradigm is mainstream now, even Java uses streams, ADTs and pattern matching. Go is like an old-ass version of Java without any of the new toys, it was designed so that midwits can write dumb procedural scripts like it's still the 70s.
Even Pajeets caught up to the fact that it's beneficial to write in a modern declarative language, but if you like to write C-nile shit that's OK too.
Anonymous
7/8/2025, 3:36:48 PM No.105837514
>>105837442
I always hear midwits seethe about muh durgasoft and muh jeets writing poor quality Java, but Java was always designed by and for white men, and when in the hands of a competent developer is a fantastic language to work with and can be just as elegant as any other.
Go on the other hand, is quite literally a shitjeet language created by pencil-pushing morons who think they know better than you, specifically to teach low-IQ Indians how to program in a week.
>muh cnile language, muh ken thompson
Even C++ is an objectively better Cnile language and that is a very low bar.
Go is just an awful language designed by and for pajeets. And not to mention it has the most ugly syntax ever conceived and the most stupid looking mascot too.
Replies: >>105838059 >>105838220
Anonymous
7/8/2025, 4:46:06 PM No.105838059
>>105837514
fact
go shills should go back to india
Anonymous
7/8/2025, 5:02:19 PM No.105838220
>>105837514
Last time I checked, Go with appropriate libraries had a very low response latency when serving a simple http rest service compared to other popular languages.