Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
lieks
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
31.
▲
by
lieks
2y ago
I'm currently working on a programming language that will probably be very boring in practice (Algol/Pascal structure, C-ish syntax, traits/typeclasses but only modules can be generic, not sure if GC or borrow checking but pr
32.
▲
by
lieks
2y ago
In Brazil, which has never used imperial, the Quarter Pounder is called "Quarteirão", a literal translation would be "big quarter". Most people probably parse it as a "city block", though. Also, a regular burge
33.
▲
by
lieks
2y ago
It's not modern. Jesus recommends it in one of his sermons. It's just unfortunately rare, like most good things about christianity tend to be.
34.
▲
by
lieks
2y ago
I used to work at a company where running the full test suite took about 10min on my local machine. I would often run ./test.py; beep where beep is a script I made that plays the Macintosh boot beep[1]. It was pretty useful. I
35.
▲
by
lieks
2y ago
You... don't. You have to rely on compiler optimizations to get good performance. Monads are more-or-less syntax sugar. They give you a structure that allows these optimizations more easily, and also make the code more readable sometim
36.
▲
by
lieks
2y ago
For context: the author (see his other posts) is exploring the possibilities of writing C with no C runtime to avoid having to deal with it on Windows. He began to kind of treat it as a new language, with the string type, arenas and such, w
37.
▲
by
lieks
2y ago
I remember reading, a long, long time ago, a paper where the authors suggested if the universe was slightly hyperbolic, it would also cause a redshift effect. I can't seem to find it (and as far as I remember it was purely theoretical)
38.
▲
by
lieks
2y ago
Also applies to: Lisp, Haskell, Smalltalk, APL, Forth, even C. Maybe you can write Kotlin like C#, or Lua like JS, but style is not portable in general.
39.
▲
by
lieks
2y ago
It just occurred to me that a crab would be much easier to keep upright (due to six legs, no need for fancy leg AI) and also much more on theme. They had the dog already working, though.
40.
▲
by
lieks
2y ago
...huh. As a non-native speaker, that was... easy to read? Where did I learn this vocabulary again? I haven't read Shakespeare's works yet (though they are on my reading list). What makes it hard to read for some people and not o
41.
▲
by
lieks
2y ago
As an introvert, it's really annoying when I'm talking to someone else and tell them something, only to be told I'm wrong, with no arguments or data whatsoever. If I wasn't certain, I wouldn't be talking about it in
42.
▲
by
lieks
2y ago
Yes! That's the one.
43.
▲
by
lieks
2y ago
The Rust/memory safety crowd does exaggerate its importance somewhat. Arrays aren't actually that common in some types of applications, especially kernels, which is what C was designed to implement. Null-terminated strings are bad
44.
▲
by
lieks
2y ago
TCC doesn't do any optimization at all, so it shouldn't be that perplexing. But any compiler that does constant propagation, inlining and (ideally) integer range analysis can optimize away most run-time bounds-checks already. If G
45.
▲
by
lieks
2y ago
C99 did that. void f(int len, char s[len]); void g(float m[static 16]); The first one is for variable-length arrays, the second one for fixed-length. TCC even implements array bounds-checking. But because a lot of people were s
46.
▲
by
lieks
2y ago
Hmm... Let's see... Oh, functions can't return arrays in C. That would be a pointer. Well, that makes it easier. double **(**(*)(char *))(int) It did take a couple minutes, but I just woke up. Also, idiomatically there wo
47.
▲
by
lieks
3y ago
I'm guessing, but it should be possible to pass anything remotely as a proxy with an ID: calls to a closure or the resolution of a promise cause further RPC, and sending it back recovers the original value.
48.
▲
by
lieks
3y ago
> I suspect this pizza topping "fact" may have been inserted as a joke or to test if I was paying attention, since it does not fit with the other topics at all. It's cool that it could notice that, but the phrasing is like
49.
▲
by
lieks
3y ago
I can attest to this. Once, a college teacher gave us a programming exercise, and then went on to suggest how we might go about solving it. While he was talking, I started outlining a solution on a piece of paper. At school, I couldn't
50.
▲
by
lieks
3y ago
Note that Multics had a particularly good work environment: https://multicians.org/devproc.html In particular, management was tech-savvy and everyone liked and respected each other. Most were also talented.
51.
▲
by
lieks
3y ago
It starts by teaching the basics of programming logic, and by the end you know how to build and test a larger system. It starts by explaining what is a stack, and by the end you could implement your own Forth. And it shows how those two tas
52.
▲
by
lieks
3y ago
I started with the osdev wiki's Barebones Tutorial: https://wiki.osdev.org/Bare_Bones It teaches how to do a hello world, with proper setup. It's a bit more than a single C file, with some assembly/linker scr
53.
▲
by
lieks
3y ago
1024 instructions? At that point I'd probably just use assembly. At that size, it would still be manageable. Hmm, maybe that's the fundamental difference in thinking; the people I'm thinking of would reach for the simplest to
54.
▲
by
lieks
3y ago
Yes, we do, in some contexts. Because despite its complexity, slow compile times, lack of a specification or more than one viable implementation and bloated binary size, people still tout it as a C replacement. For application programming,