Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
fasquoika
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
17 ms
·
31.
▲
by
fasquoika
8y ago
You could do it with JIT compilation or self-modifying code. I'm not sure if there's a simpler way in C
32.
▲
by
fasquoika
8y ago
It's worth noting that you can, and in general do , create your own stack in the wasm memory space. WebAssembly's native stack can only handle 32 and 64 bit integers and floats, so local variables are more like registers
33.
▲
by
fasquoika
8y ago
>I would want a convenient way to deliver a self-contained executable. It's a bit rough around the edges, but it does exist: https://github.com/JuliaLang/PackageCompiler.jl
34.
▲
by
fasquoika
8y ago
>Iirc Oleg Kiselyov implemented proper delimited continuations in ocaml as a library, without touching the runtime or compiler. To clarify this, the library you're talking about implements most of the functionality in C, reusing the
35.
▲
by
fasquoika
8y ago
Not to mention that depression often makes people feel physically tired all the time. I don't think someone with normal neurochemistry even could sleep 16 hours a day if they wanted to.
36.
▲
by
fasquoika
8y ago
That's precisely what I meant in my edit
37.
▲
by
fasquoika
8y ago
>Those who slept less than six hours were more than three times as likely to consider or attempt suicide, and four times as likely to attempt suicide, resulting in treatment. Considering that insomnia is a common symptom of depression, t
38.
▲
by
fasquoika
8y ago
I don't really understand your example. Julia has both macros and builtin parametric polymorphism. Unless you expect user code to implement its own type system (technically possible, e.g. Racket does it), then macros aren't a so
39.
▲
by
fasquoika
8y ago
It's a way of cold welding wires to the pins of electronics[1]. It's pretty much fallen out of usage as computers have gotten too small for the technique, but it's nice for prototyping because it's easier to undo than so
40.
▲
by
fasquoika
8y ago
That still isn't censorship, or even anything approaching censorship, because the author has no power to actually do those things. It's still just a suggestion, albeit a pretty strongly worded one
41.
▲
by
fasquoika
8y ago
IIRC LLVM relatively recently did a major overhaul of the JIT API, including better support for lazy compilation. That might improve compilation speed drastically
42.
▲
by
fasquoika
8y ago
The Guile VM was deliberately designed to support multiple languages. Guile Emacs was an attempt to run Elisp on Guile's VM, not rewrite Emacs in Scheme. Guile's VM is also written in C FWIW
43.
▲
by
fasquoika
8y ago
> it is not at cutting edge of research to qualify as a research language. [citation needed]
44.
▲
by
fasquoika
8y ago
The real issue is that Pony doesn't have the concept of an unrecoverable error. All exceptions in Pony are checked, but sometimes if an error happens there's nothing your program can do and it should just crash. Edit: Although P
45.
▲
by
fasquoika
8y ago
> Let you write Java-style code in Rust? Yep > Why would I use this? You wouldn't. It's a toy
46.
▲
by
fasquoika
8y ago
> Would it be possible to write a compiler from Java to Rust? C# to rust? It's possible to write a compiler from any Turing-complete language to any other Turing-complete language > The goal then would be to get fast(er) executio
47.
▲
by
fasquoika
8y ago
> But it all seems to be about "raw pointers", which are mostly for talking to non-Rust code and probably ought to be on the way out as more low-level libraries are implemented in Rust. Plenty of pure Rust code uses pointers. T
48.
▲
by
fasquoika
8y ago
> It was a real trial-by-fire thanks to how tree structures have to be handled with the borrow checker. Eh, without parent-pointers you can just use a Box<T> in the obvious way. For more elaborate graphs you'd use arena alloca
49.
▲
by
fasquoika
8y ago
A lot of people don't realize this, but macroassemblers are generally quite good at generating arbitrary binary data. Case in point: https://github.com/corkami/pocs/tree/master/mini
50.
▲
by
fasquoika
8y ago
The original code didn't have a call to .keys(), and that's the case where this should be optimized. If you do the unordered optimization, then encounter an operation that needs an ordered iteration, you'd have to fall back t
51.
▲
by
fasquoika
8y ago
> you'd need to show that the object is never passed to for..in or Object.keys or similar, and unless you solve the halting problem, you can't do that. This is pretty blatantly incorrect. Just because a problem is undecidable
52.
▲
by
fasquoika
8y ago
> Is this (actually, getting 0 from 1/3) really more surprising than doing 2+2 and getting 3.9999999999999? No, so it's a good thing doubles never do anything remotely like that
53.
▲
by
fasquoika
9y ago
No
54.
▲
by
fasquoika
9y ago
> If you know Scheme and imagine a curly C-style alternative syntax for it, you basically end up with early Javascript. Except without guaranteed TCO, macros, homoiconicity, continuations...you know, the things that make Scheme unique
55.
▲
by
fasquoika
9y ago
> like the noisy (Perl-like) syntax I agree that Rust can be pretty noisy in some cases, but I've never really thought of it as Perl-like. Perl's syntax has so much noise so that the language can be enormous whereas Rust is at
56.
▲
by
fasquoika
9y ago
The original bytecode OS is AFAIK the UCSD p-System (from 1978) https://en.wikipedia.org/wiki/UCSD_Pascal
57.
▲
by
fasquoika
9y ago
The government has literally regulated cryptography before https://en.wikipedia.org/wiki/Crypto_Wars
58.
▲
by
fasquoika
9y ago
> No other language family has true macros Forth?
59.
▲
by
fasquoika
9y ago
I think so. See `call_indirect` here: https://github.com/WebAssembly/design/blob/master/Semantics....
60.
▲
by
fasquoika
9y ago
If you do an example less trivial than "Hello world", it also lets people see a concrete example of the semantics, rather than just getting a high-level description of it
More ›