Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
OskarS
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
24 ms
·
211.
▲
by
OskarS
2y ago
> 1 billion frames in memory... With such dataset, you have seen practically all realistic possibilities in the short-term. I mean... no? Not even close? Multiply the number of game states with the number of inputs at any given frame giv
212.
▲
by
OskarS
2y ago
I agree, this would be useful. Another one I would like is auto-vectorization, a way to mark a loop with an attribute and if it fails to auto-vectorize, the compiler should print out the auto-vectorization report for that loop, explaining w
213.
▲
by
OskarS
2y ago
Yeah, that's the way virtual machines have been written forever, some version of for instruction in instructions { switch (instruction) { case OPCODE_X: //.... case OPCODE_Y: //
214.
▲
by
OskarS
2y ago
Yes, that is correct. You cannot do this trick in standard C, C++ or Rust, it requires some version of [[musttail]]. Strong argument for adding it to the C standard, IMHO.
215.
▲
by
OskarS
2y ago
Obviously compilers have been doing tail call elimination for ever, but for this trick "generates [tail calls] quite reliably" is not enough: you have to GUARANTEE it (or fail compilation), otherwise this structure does not work (
216.
▲
by
OskarS
2y ago
It will be MUCH less, and much less complex than this.
217.
▲
by
OskarS
2y ago
I so much more appreciate this style of version numbering compared to being eternally 0.something.
218.
▲
by
OskarS
2y ago
Isn't the fundamental issue here not so much anything to do with `<svg>`, but with the fact that you can't easily include HTML snippets from other files in HTML? Like, the only reason not use the <svg> tag seems to be
219.
▲
by
OskarS
2y ago
If that SELECT query is too much for you, I agree, SQLite is maybe not meant for you. Not a very solid argument against SQLite, though.
220.
▲
by
OskarS
2y ago
> As my app matured, I found that I often wanted hierarchical folder-like functionality. Rather than recreating this mess in db relationships, it was easier to store the path and other folder-level metadata in sqlite so that I could work
221.
▲
by
OskarS
2y ago
Exactly. The difference here is that std::variant doesn’t “name” the options, you just get the type (and an index, so variant can contain duplicate types). So you have to have some marker type that’s like “this contains nothing”. Fundamenta
222.
▲
by
OskarS
2y ago
You're not wrong, if you just want "a T or nothing", optional is the way to go. But what if you want "a T, a U, a V, or nothing"? Then you do std::variant<std::monostate, T, U, V> Or std::option
223.
▲
by
OskarS
2y ago
A huge bummer about Guile (and that is frankly shocking for a language designed to be embeddable) is that it relies on a bunch of global state, which means that you can't embed multiple interpreters a single process. This totally kills
224.
▲
by
OskarS
2y ago
For sure, no question! There's a reason people choose Microsoft. My question was narrower, just the question on reliability (hence "all else being equal"). I don't think you can say that, leaving aside issues like this,
225.
▲
by
OskarS
2y ago
Please tell me you've ended the contract with CrowdStrike after this?
226.
▲
by
OskarS
2y ago
Can you say with a straight face that if you were designing a system that had extremely high requirements of reliability that you would choose Windows over Linux? Like, all other things being equal? I'm sorry, but that would be an insa
227.
▲
by
OskarS
2y ago
It's not just that. If ALL that was in the header was the function prototype, that adds basically nothing to the compile time. The problem is when you have significant codegen and parsing in headers, like you do with templates and clas
228.
▲
by
OskarS
2y ago
Good tip! Yeah, the `sort -rh` is what makes it sing, it's such a cool feature of coreutils that `sort` knows how to sort human-readable output from `du` or `df`
229.
▲
by
OskarS
2y ago
I've used graphical tools very similar to this, and I always come back to this: du -h | sort -rh | less (might have to sudo that du depending on current folder. on macos, use gsort) You just immediately see exactly what you nee
230.
▲
by
OskarS
2y ago
There is another scenario where this is an issue: if this code ends up in a header which is included in a lot of places. You might say "that's dumb, don't do that", but there is a real tendency in C++ for things to migra
231.
▲
by
OskarS
2y ago
This is a very weird thread: half the people are arguing that having these timestamps is not a realistic security problem at all, and the other half is arguing that any fix to it has to have Fort Knox level security policies. It seems to me
232.
▲
by
OskarS
2y ago
You store the key in the database, right? Like, if the database leaks, it doesn’t matter if your ids are sequeneced or unsequenced, because all data has leaked anyway. The key leaking doesn’t seem like a realistic security issue.
233.
▲
by
OskarS
2y ago
Can I ask (as a humble application developer, not a backend/database person), if the two requirements are: 1. The UUIDs should be ordered internally, for B-tree performance 2. The UUIDs should not be ordered externally, for security re
234.
▲
by
OskarS
2y ago
Ah, fair enough. I've only tested the Rust version. Yeah, important to note, in practice it is always finite, since if you try to do anything "real" using this trick, you blow the stack immediately. This was mostly just a fun
235.
▲
by
OskarS
2y ago
It actually is, because it allows functions as first class objects. That means you can use the fixed-point combinators from lambda calculus (which doesn't have direct recursion either). For instance, the Omega combinator (sort-of):
236.
▲
by
OskarS
2y ago
I will admit that I really miss the "value semantics" thing that RAII gives you when working in Zig. A good example is collections, like hash tables or whatever: ownership is super clear in C++/Rust. When the hash tables goes
237.
▲
by
OskarS
2y ago
It's very true. When watching programming talks on YouTube, I often hover the mouse over the time bar to find the first preview which looks like the slide has syntax highlighted code on it. I'm here for the cool coding stuff, not
238.
▲
by
OskarS
2y ago
Personally, I think this is a great policy! Local news is incredibly important to the health of a democracy (somebody needs to show up at those city council meetings and report on them, and national media wont do it), but it's doing qu
239.
▲
by
OskarS
2y ago
Totally! People in these kinds of environments have no leg to stand on criticizing a free and open source project. If you don't like it, don't use it, but CERTAINLY do not demand of the developers that they honor your requests whe
240.
▲
by
OskarS
2y ago
It's very easy to design a schema that breaks up blobs into chunks. SQLite is excellent for memory constrained environments, with even mathematical proofs of maximum memory usage: https://www.sqlite.org/malloc.html
More ›