Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
cies
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
24 ms
·
361.
▲
by
cies
2y ago
I think the ORM (with Entities) is an anti-pattern. It makes simple queries slightly simpler, and hard queries impossible to express: hence you will need a way to express hard queries. Also Entities are usually mutable. What clean architect
362.
▲
by
cies
2y ago
In our model we have "repositories" (they dont talk outside the application, they basically contain queries related to a specific db table), and "services" (they call models, do queries that we not related to a specific
363.
▲
by
cies
2y ago
Exactly how we do services. We have one model file per db table (a "repository") in which we define all queries that "logically belong to that table" (sure they do joins and/or sub-queries that involve other tables,
364.
▲
by
cies
2y ago
I so much agree with this, I want to hug you. All this encapsulation for sake of encapsulation, and interfaces everywhere even for implementations that the application is married to. I once heard a wise man say: most of these design pattern
365.
▲
by
cies
2y ago
I also though rewrites of JS projects were only in part motivated by perf gain. Sure they were the most advertised benefits of the rewritten tools, as that communicates a benefit for the users of those tools. > I find Rust allows me to f
366.
▲
by
cies
2y ago
Instead of asking "what other languages and project (open/closed, big/small, web/mobile/desktop, game/consumerapp/bizapp) have you experience with as to come to this conclusion?" people down vote you.
367.
▲
by
cies
2y ago
You can write OOP-style in C, FP-style in C/C++/Java or even PHP. Sure. Writing pure FP code (pushing all the side effects to the "edges of the program" in C is possible! But it's going to take a lot of discipline f
368.
▲
by
cies
2y ago
"7/67" this is why general public likes percentages. Or "one in X" type of ratios. Next up: (e^-1)/3*3 children who got the COVID shot... There's this saying in UX: don't make me think.
369.
▲
by
cies
2y ago
Having written some Rust and a lot of Ruby, I find Kotlin to be a really nice "typed Ruby". Just like Ruby, Kotlin is an OO language in the core that is really friendly to FP. It's terse (not as terse as Ruby, as there are ty
370.
▲
by
cies
2y ago
> But it's their product they can do what they want. It's just because of IP-law that they get to do this. If there were no IP-laws, it would be: "I bought their product, now it's mine, and I get tot do what I want.&q
371.
▲
by
cies
2y ago
we need a reference... and PHP is the biggest language that has clearly better options available in it's space. JS is not too pretty either, but I understand many believe it's the only lang the browser understands.
372.
▲
by
cies
2y ago
Looks difficult. I have no clue what I'm reading there tbh.
373.
▲
by
cies
2y ago
You're a wizzard! JS keeps amazing me. It reminds me of Perl somehow. If Perl and Lua had a child, with some browsers APIs sprinkled on top.
374.
▲
by
cies
2y ago
Nah, i rather skip brittle :) But what's not brittle in JS? Elm? (TS to some extend)
375.
▲
by
cies
2y ago
I asked ChatGPT -- Please estimate the popularity of these languages, relative to the most popular one (that gets 100%). Base your answer on community activity on different platforms (stackoverflow, reddit, hacker news, dev.to, github) and
376.
▲
by
cies
2y ago
Java is much bigger though in that space. Java's relative market share in the finance industry %LOC is waaaay bigger than COBOL's.
377.
▲
by
cies
2y ago
I find this a much better example than the example shown in the article. I even find it quite useful when explained like this. Thanks!
378.
▲
by
cies
2y ago
I still think the difference to me as a programmer is largely semantic (except when the performance has to be considered): "rebinding" or "in-place mutation", in both cases it is a mutable variable to me.
379.
▲
by
cies
2y ago
I find FP and shadowing have nothing to do with eachother (maybe except though Haskell's do-notation)
380.
▲
by
cies
2y ago
I'd say that rebinding a value to a variable is similar to shadowing IN THE SAME SCOPE. Pretty much what Haskell does with the do-notation.
381.
▲
by
cies
2y ago
IIRC the zig compiler compiles C. There is some work being done on making zig compile the Linux kernel (I think someone already succeeded). zig currently uses LLVM but it wants to move away from that: https://www.reddit.com/
382.
▲
by
cies
2y ago
I'm much stricter when it comes to what means immutable. counter = counter + 1 vs counter += 1 Are exactly the same to me. In both cases you bind a new value to counter: I don't care much if the value gets update
383.
▲
by
cies
2y ago
> YC criticized for backing AI startup that simply cloned another AI startup Free market! Competition spurs innovation and drives down cost. "If YC does not back them, someone else will" -- drug dealer logic applied to VC biz
384.
▲
by
cies
2y ago
> But next time I think I’ll just buy the 16GB variant upfront. Get the 32GB variant: RAM is often the limiting factor for being able to still use an old machine. Now that these get soldered on, better dial it up a notch.
385.
▲
by
cies
2y ago
Sure. But not every parent is that responsible. The SM companies are very big and rely on ads to fill their pockets. I really believe we need govt to step in to protect children. For example: make it forbidden to show ads to youngsters. Tha
386.
▲
by
cies
2y ago
C-level execs of SM companies heavily limit access to these services for their own children. They know much better than the general public knows by publicly available research. To them it's a cash cow, and who has the minds of the kids
387.
▲
by
cies
2y ago
That happens everywhere. https://cdn-images-1.medium.com/v2/resize:fit:800/1*OVEEYB4H...
388.
▲
by
cies
2y ago
I dont know why you are down voted. I feel exactly the same about it.
389.
▲
by
cies
2y ago
the code is GPL. services (like the plugin registry, but there are many more) cannot be GPL. they are served by someone and that someone pays for hosting/bandwidth/etc and that someone is free to stop providing that service (to on
390.
▲
by
cies
2y ago
Sorry? Their service is... their service! They can extend of refuse service to whom they want. Automattic is releasing source code, which, in my book, is being super friendly to competitors. It seems to me you are holding the good guys (tha
More ›