Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
mras0
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
31.
▲
by
mras0
4y ago
Sounds like a "Dutch auction" (or variant) https://en.wikipedia.org/wiki/Dutch_auction
32.
▲
by
mras0
4y ago
"Roll you own" seems to be interpreted differently in the comments. Absolutely implement existing ciphers/algorithms like AES/RSA/ECC (and various modes of operation/padding) etc. to get a feeling of how they w
33.
▲
by
mras0
5y ago
Honored to see that it made the cut in your updated list, but it seems like there's a stray ']' at the end of the link :)
34.
▲
by
mras0
5y ago
I made a toy ECMAScript interpreter a couple of years ago: https://github.com/mras0/mjs Not really notable, expect perhaps being the only one on the list with an ES1 mode? :) (Can't promise it's accurate thou
35.
▲
by
mras0
6y ago
Depends on the target, but sometimes you can use your regular debugger. Otherwise good old printf debugging/blinking with LEDs/toggling output pins/staring at the code while crying depending on the circumstances.
36.
▲
by
mras0
6y ago
Thanks. Ideally I'd have liked if bootstrapping only required an assembler (and then successively more advanced versions could compiler the next in line), but this was enough of a challenge for a side project. Maybe later :)
37.
▲
by
mras0
6y ago
Author here. Sorry for the confusing naming, the "S"-prefix came before I'd figured out a good name (to match my assembler/DOS project https://github.com/mras0/sasm ). Tiny CC would have been a bette
38.
▲
by
mras0
7y ago
This is a good idea, but I'd be selective about it. There's a lot of tedious and uninteresting (IMO) stuff in there, like https://tc39.es/ecma262/#sec-array.prototype.splice or how unicode is handled in the s
39.
▲
by
mras0
7y ago
Hadn't seen Mini-C before, that's quite the feat. Apart from the awesome C4, I also like 8cc ( https://github.com/rui314/8cc ) in this category. Recently did this myself ( https://github.com/mras
40.
▲
by
mras0
7y ago
I don't think it matters what bash actually does, the issue (as I see it) is that when a program calls write(N, ...) it sometimes wants to refer to the "stale" file descriptor N. Consider this contrived example: write
41.
▲
by
mras0
7y ago
Didn't see your reply before commenting, but it gave me a thought: We really only need a "local" solution. If there were a way of requesting fd's that weren't required to be the lowest available ones (perhaps even 6
42.
▲
by
mras0
7y ago
I think quite a bit of software actually relies on closing and re-opening file descriptors, especially stdin/stdout/stderr just before/after forking. This was the first example I found via a quick web search: https:/&#x
43.
▲
by
mras0
7y ago
I don't have a good resource, but having just finished a small C-compiler myself[0] after previously getting stuck on the codegen part, I have a few suggestions: Keep it simple and focus on making it composable. By that I mean if you&#
44.
▲
by
mras0
7y ago
I'm curious about what kind of situations you're using this pattern in C++. Not objecting to the practice in any way, it's just that I haven't encountered many situations where I wouldn't just have created another f
45.
▲
by
mras0
7y ago
Ideally memory handling and I/O should be overridable (and often is by creating some kind of "context"), but when it isn't then, yeah it should be obvious from the naming. If it isn't - and especially if you're
46.
▲
by
mras0
7y ago
When you start Vim (without arguments) it says "VIM - Vi IMproved" .... "Help poor children in Uganda! type :help iccf<Enter> for information". I just noticed that it actually cycles a few through messages now (ver
47.
▲
by
mras0
7y ago
Because it's a standard pitfall: https://gcc.gnu.org/onlinedocs/cpp/Duplication-of-Side-Effec...
48.
▲
by
mras0
8y ago
For the record I'm pretty sure my implementation uses a very large amount of memory in both cases as I'm not doing anything to avoid it (like escape analysis).
49.
▲
by
mras0
8y ago
Good luck with your project, for now you should trust the other implementations more :) But I've tried to keep the code reasonably small and (hopefully) readable - which is why it's currently targeting ES1997 - rather than having
50.
▲
by
mras0
8y ago
Sorry for the confusion. I just chose something short when starting the project and since it's just a hobby project I didn't bother checking for name clashes.
51.
▲
by
mras0
8y ago
Yeah, I've had my share of interesting bugs (see the article I linked in another post). All pointers are tracked automatically (except for specially optimized classes), so that part isn't so bad, but it's still (too) easy to
52.
▲
by
mras0
8y ago
Actually that part wasn't too bad once the GC was working as I handle activation records more or less like normal ECMAScript objects. Yesterday I finished an article ( https://mras0.github.io/mjs/doc/gc/in