Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
OskarS
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
33 ms
·
361.
▲
by
OskarS
4y ago
I don't mean to minimize anybody's work, I'm genuinely curious about why it can't be done. Like, what's stopping me from making a compiler that optimizes tail calls? For instance: the C and C++ standards have very s
362.
▲
by
OskarS
4y ago
I don't quite get your point here. Suppose I write a compiler to compile Scheme to WASM. I would have write it so that it does proper tail calls, otherwise it wouldn't be Scheme. What's stopping me? Would the browsers not r
363.
▲
by
OskarS
4y ago
I think having some diversity in the Rust compiler space is an excellent idea. The rustc monoculture is really bad in the long-term, having multiple compilers allows for creating a much more robust standard (so that implementation bugs does
364.
▲
by
OskarS
4y ago
Ever heard of fucking Spotify?
365.
▲
by
OskarS
4y ago
They've actually radically redesigned the aerodynamics of the cars this year to address this exact problem (using ground effect instead of relying so much on wings for downforce). It's had it's own issues (there have been rea
366.
▲
by
OskarS
4y ago
> You're only wasting virtual address space, not actual RAM. Fair enough, that's true. > And of course the WASM runtime already needs to trap for invalid addresses (eg, -1 right out the gate). How would trapping the first fe
367.
▲
by
OskarS
4y ago
My guess is probably that it's performance issue. You would have to do a `if (addr == 0) trap()` branch on EVERY memory access in the WASM runtime, which is not free. I guess it would still has to do some kind of bounds check to see th
368.
▲
by
OskarS
4y ago
> Just use your allocators with malloc/free, that is what i do (you do the same in zig, allocators) If you do that, is it RAII like C++/Rust? Objects get destructed at end of scope, and members get destructed recursively? Or do
369.
▲
by
OskarS
4y ago
C doesn't have "private" functions in that way, what it has is "static" functions, and this is indeed the biggest limitation of doing this kind of amalgamated build. If you mark a function as static, it means that h
370.
▲
by
OskarS
4y ago
It's absurd to claim they're doing this for any other reason beyond deceptive marketing. It's like an advertising version of a dark pattern: a decision which has a sheen of reasonableness, but is clearly designed to deceive a
371.
▲
by
OskarS
4y ago
I can totally see the line of reasoning that ended up with this decision. It was the wrong decision, but I absolutely can see how smart and competent people could've arrived there, or missed the reasons why (for instance) promising poi
372.
▲
by
OskarS
4y ago
The fact that the STL api leaks these kind of implementation details is such a shame. Multiplied globally over all users of unordered_map, the amount of CPU time that has been wasted because of that decision boggles the mind. Has to be one
373.
▲
by
OskarS
4y ago
Yeah, I hadn’t heard about this ”daylight” thing either. I’ve been nearsighted since I was a kid, and back then people said I got it because I read to much, focusing on things too close to my face. I thought that was a pretty fair trade-off
374.
▲
by
OskarS
4y ago
I’m guessing a linker like this is also a VERY extreme case when it comes to mmap’ing a huge number of files. For most software, it’s just not that big of an issue.
375.
▲
by
OskarS
4y ago
I’ve had similar issues with HomePod when it comes to other apps (e.g. playing podcasts from Overcast using AirPlay), but the Apple Music integration has never been a problem, that has always just worked. Siri sometimes gets confused about
376.
▲
by
OskarS
4y ago
The integration with HomePod is very nice, I can just go ”Hey Siri, play Tom Waits” or whatever. Maybe that works with Spotify, I dunno, but the integration with Apple Music is obviously seamless, it just works.
377.
▲
by
OskarS
4y ago
mold seems very cool! The design notes [1] are fabulous, exactly the kind of documentation I look for for stuff like this. This part, in particular, is genius: > As we aim to the 1-second goal for Chromium, every millisecond counts. We c
378.
▲
by
OskarS
4y ago
Because it’s a cool piece of technology, and this is a place for computer professionals? if you can’t appreciate GNU MPFR, you might be hanging out at the wrong place
379.
▲
by
OskarS
4y ago
Washing machines wash clothes, they provide value to the world. And they are subject to plenty of government regulation.
380.
▲
by
OskarS
4y ago
Excellent news! The energy consumption required by proof-of-work blockchains is simply unacceptible, and it’s perfectly appropriate to adress it using new laws. Hopefully other states and countries will follow suit.
381.
▲
by
OskarS
4y ago
Yeah, I agree, it's a shame that there isn't a better mechanism to pay for CLI software. I think a lot of developers would just refuse non-open source CLI software, but that really shuts down what could be a healthy market. Don&#x
382.
▲
by
OskarS
4y ago
Terminal workflows are very much not for everyone. Many people are happy to pay a few bucks for a nice and friendly GUI application. It's not such a bad thing that people are willing to pay for software, as it is, in fact, the way many
383.
▲
by
OskarS
4y ago
> What costs more, generating a random number and maybe a second or a random number and a sin/cos You’re adding a very unpredictable loop branch and a bunch of data dependencies doing that. For GPUs (and maybe even CPUs), the sqrt w
384.
▲
by
OskarS
4y ago
> The patterns I knew and saw with std::optional usually returned "new something", but yeah, you can return a copy too if the class fits in the stack. Oh, fer crying out loud... It DOES NOT return a copy, it constructs it direc
385.
▲
by
OskarS
4y ago
It's that amount of lines UNCOMPILED. Of course uncompiled code wouldn't fit in 64kb of flash (the compiler wouldn't fit either, you know). Compiled, std::optional takes up essentially no overhead, basically the same as if yo
386.
▲
by
OskarS
4y ago
Yeah, checking return codes is a thing you NEVER have to do in C... The "exceptions are evil, but without exceptions you can't fail a constructor!" is a really irritating canard when it comes to C++. First off all, the terrib
387.
▲
by
OskarS
4y ago
I just use recentf for that. My buffer list contains everything in the recentf (this works with buffer list replacements from both Helm and Ivy). Makes it trivial to open up any file I've had open before. Opening all buffers you'v
388.
▲
by
OskarS
4y ago
One of SQLite's most appealing aspects to me is using it as an application file format, as described in this article: https://www.sqlite.org/appfileformat.html How does DuckDB compare in that aspect? Does it have the s
389.
▲
by
OskarS
4y ago
It's not a million miles of what Knuth was talking about, I think he'd be pretty happy to call those kinds of notebooks literate programming.
390.
▲
by
OskarS
4y ago
> All the CPU has to do is update that mmap'ed buffer with new position information Doesn’t even have to do that, this is child’s play for a compute shader. The CPU can go take a 16 millisecond nap and let the GPU do all the work.
More ›