Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
klibertp
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
23 ms
·
271.
▲
by
klibertp
2y ago
> But it is suboptimal in the sense that it uses for loops Looking at https://news.ycombinator.com/item?id=41897526 caused me to try asking for a solution in a language that doesn't have `for` loops. Since SQL was t
272.
▲
by
klibertp
2y ago
After 34 seconds: import itertools def factors(n): result = set() for i in range(1, int(n**0.5) + 1): if n % i == 0: result.add(i) result.add(n // i) r
273.
▲
by
klibertp
2y ago
Thanks for bringing it up. I had a good read. I agree entirely with Steele! It's ironic, however, that it's written in the context of Java - he mentions just three features that would make Java growable: generics, operator overloa
274.
▲
by
klibertp
2y ago
If you place `# coding: utf-8` on the first line of a Python script, it'll try to interpret the raw bytes contained later in the file by passing them through a relevant codec[1]. Since the codec receives the raw source and transforms i
275.
▲
by
klibertp
2y ago
You're Lisp-baiting, aren't you? ;) I'd add Elixir next to Nim (already mentioned); also Rust. Recently, also Scala. The reason we don't have such metaprogramming available everywhere is mostly because you have to subscr
276.
▲
by
klibertp
2y ago
What effort? I just wrote two short comments. I also have no idea where to even begin getting the info from the horse's mouth in this case. Just getting ahold of a proper communication channel would be 1-2 orders of magnitude more effo
277.
▲
by
klibertp
2y ago
I'm not that interested - I'm not from Hungary, if for no other reason. However, the guy who started this thread did. While I don't think the authors of this particular study are on HN, I'd bet we have some scientists he
278.
▲
by
klibertp
2y ago
> no, it might lead to better surgery robots, search and rescue robots, No, that's extremely optimistic, at best. We've learned that cats seem to use their knowledge of their height but not width when choosing to go (or not)
279.
▲
by
klibertp
2y ago
90% of single-implementation interfaces (in Kotlin on Android projects I've seen) are internal (package/module private, more or less.) So no, they are not meant to be extended or substituted, and tests are their only raison d'
280.
▲
by
klibertp
2y ago
Go with Smalltalk instead. Not only do you get REPL-level interactivity[1], user actions are also automatically persisted, and it works with a GUI by default! With Glamorous Toolkit (a Pharo Smalltalk-based IDE) you even get good interop wi
281.
▲
by
klibertp
2y ago
> I only remember a handful of HN usernames That's a feature. HN is expressly built to encourage high-quality content in the comments - by removing or discouraging things that tend to bring poor content with them. Not showing up
282.
▲
by
klibertp
2y ago
Cancer isn't something that humans develop and control. It's also very unlikely to kill 20-year-olds. On the other hand, it's almost guaranteed if you happen to live long enough. Finally, getting cancer doesn't mean that
283.
▲
by
klibertp
2y ago
Why would you try to do this in C of all languages? It's one of the worst choices, especially for a self-learner and a beginner like you. Consider: choosing another language could, on its own, 100% eliminate any possibility of getting
284.
▲
by
klibertp
2y ago
This is interesting! I learned quite a bit, thank you :) One comment, though: it's not an apples-to-apples comparison! (I'm talking about your gist.) Specifically, in Elixir, you should create the state machine yourself (very ea
285.
▲
by
klibertp
2y ago
> I'm not sure how XHR alone would let you automatically get backend state changes reflected to the frontend. Long polling. Check out (history of) "Comet": https://en.wikipedia.org/wiki/Comet_(programm
286.
▲
by
klibertp
2y ago
EDIT: quick note, this is a tangent; Gleam does support partial application with `_` and it works with pipelines as well. > This is not how it works in curried languages, however. In curried languages with a |> operator, the first exp
287.
▲
by
klibertp
2y ago
That was way more than a solution for callback hell. With some plumbing, you could get Continuation monad working! With no further support from the language, too. I really miss LiveScript, it's a shame its development stopped. If only
288.
▲
by
klibertp
2y ago
> significantly cheaper per-process/task cost Can you elaborate? BEAM processes are very lightweight - what does CLR/.NET do to make them even cheaper?
289.
▲
by
klibertp
2y ago
In Smalltalk, `;` does two things: terminates the current message (EDIT: while ignoring its return value) and propagates the target object of the current message as a target for the following message. So this: scene add: sprite;
290.
▲
by
klibertp
2y ago
I'm not sure if this can be described as "warfare"- hybrid or not. You'd need to call the migrants boats that "harass" Italian ports a tool of war, too. Maybe that's warranted, but to me, it sounds like an
291.
▲
by
klibertp
2y ago
The reason you have Java glue instead of C glue in most cases is that Java's is easier to write. Whatever you do, you need a Activity instance to run, and while you can create one from C, it requires a lot of boilerplate that is most
292.
▲
by
klibertp
2y ago
> singer-songwriters doesn’t make him the most talented. He's a poet. And a writer. He never claimed to be a singer, and songwriting always was a side job that earned money. If you want to know how talented Cohen was, read instead o
293.
▲
by
klibertp
2y ago
Apple Vision Pro can display legible text, and the pass-through camera's resolution is also enough to read printed text. At least, that's what I read about it. At this point, the only dimensions to improve would be weight and pric
294.
▲
by
klibertp
2y ago
> When the sperm and egg fused, thus you began, I'm sorry, I don't talk to people who think a single cell is a person. I'm too old now to waste time pointing out fanaticism and trying to correct it in random Internet encou
295.
▲
by
klibertp
2y ago
What's not to agree with "I didn't choose to be born"? Is there a child who asked to be born? Is there a child who consciously decided to be, or not to be, born? There's no "believing" here; it's just
296.
▲
by
klibertp
2y ago
Erlang and Elixir have a pretty good interop with Python through Erlport. It's not a deep language-level integration (as in, inheriting modules from Python classes or something like that), but it implements a binary message format Erla
297.
▲
by
klibertp
2y ago
> but it seems that most of the changes were behind the scenes, and 1.17 largely didn't expose user-facing type errors or warnings. That's how it normally goes with gradual type systems for existing languages, I think. The firs
298.
▲
by
klibertp
2y ago
No, it just needs some time and effort, and you need a good lawyer (I remember lcamtuf writing about it on his blog). You just need a residence (even if it's a coach (or basement) at your friend's) in a country for a few years; yo
299.
▲
by
klibertp
2y ago
> Plus, give it six months more [...] mostly winning the war I'd agree even two weeks ago, but then Kursk happened. So far, Russia's response to that has been weak. While it will be hard for Ukraine to use that as a foothold to
300.
▲
by
klibertp
2y ago
Don't compare Crimea and Donbas. There's literally nothing in common there, save for Putin being the one to decide.
More ›