Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
sklogic
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
20 ms
·
151.
▲
by
sklogic
10y ago
What? Of course reference counting is slower. Especially if you take loop handling into account. Imagine a degenerate scenario: using up all of your memory to allocate a single linked list, and then dropping it all at once. Another, much mo
152.
▲
by
sklogic
10y ago
If you defer the actual execution of the code to something else - another VM, a CPU directly, whatever, it is not an interpreter, it is just a compiler. Definitely not the kind of interpreters being discussed in this thread. If you have to
153.
▲
by
sklogic
10y ago
> I could have an interpreter for a non-Turing-complete language Of course, but even this is pretty hard, much harder than compilation of an equivalent language. > the difference between a total language and a Turing-complete languag
154.
▲
by
sklogic
10y ago
> Mind proving? Which part? That interpreter must be implemented in a Turing-complete language? Well, it is pretty much a definition of a Turing completeness, it is provable by implementing an interpreter for a Turing machine, lambda c
155.
▲
by
sklogic
10y ago
This one is nice and clean: https://github.com/soegaard/minipascal
156.
▲
by
sklogic
10y ago
> something that actually outputs optimized code Optimisations might be difficult (some of them, not all). Yet, a straightforward compilation is trivial, far simpler than the simplest of possible interpreters. And an unoptimised compiler
157.
▲
by
sklogic
10y ago
> Sorry, but no. Mind proving? > Writing an interpreter is strictly a subset of writing a compiler. What?!? You can write a compiler in a non-Turing-complete language. This is impossible for an interpreter. So, how is it a "stric
158.
▲
by
sklogic
10y ago
If you want this kind of composability, use PEG-based tools. Same for the error messages and error recovery.
159.
▲
by
sklogic
10y ago
Correct. I am tirelessly ranting that the major culprit here is the infamous "Dragon Book". It somehow managed to turn an easy and fun subject into something intimidating and thoroughly boring.
160.
▲
by
sklogic
10y ago
Start by building simple DSLs that can make your work easier, ideally on top of Racket or any other similarly powerful framework. Learn by following the simple examples.
161.
▲
by
sklogic
10y ago
Interpreters are inherently very complex, far more complicated than compilers. It is a bit harsh to start learning this subject with an interpreter.
162.
▲
by
sklogic
10y ago
Compilers matter because of DSLs. The rest is of a marginal importance.
163.
▲
by
sklogic
10y ago
Very few events really deserve to grab users attention in such a brutal way. In fact, I cannot name a single one. Open/save file dialogue? Emacs minibuffers are light years ahead of the current Windows crap. Asking for credentials? Sam
164.
▲
by
sklogic
10y ago
It is a replacement for an older C++ interpreter, Cint. Which, in turn, is a replacement for an even older Fortran interpreter (see CERNLIB).
165.
▲
by
sklogic
10y ago
See how it is used in ROOT.
166.
▲
by
sklogic
10y ago
Why only web? Modal dialogs should be forbidden everywhere.
167.
▲
by
sklogic
10y ago
I was under impression that most of the OSS contributors are full time paid employees. Projects like gcc, llvm, linux kernel, etc. are all corporate work.
168.
▲
by
sklogic
10y ago
I always thought that flails were designed for disarming.
169.
▲
by
sklogic
10y ago
Is it a problem? Is it even relevant at all?
170.
▲
by
sklogic
10y ago
They cannot do it. Prior art exists, see "Naked gun 33 1/3".
171.
▲
by
sklogic
10y ago
Getting an information ahead of the rest of the crowd sort of fits under this specific meaning.
172.
▲
by
sklogic
10y ago
A definitive introduction to the field: https://www.cs.auckland.ac.nz/~chaitin/cup.pdf
173.
▲
by
sklogic
10y ago
No, it is a cups bug indeed. File was never guaranteed to be precise in the first place, it is not a good idea to rely on it.
174.
▲
by
sklogic
10y ago
> How is a macro different than passing a quoted list to a function? Macro is a function that is executed in compile time. Think of it as a way of extending your compiler with new functionality. For example, your language does not have
175.
▲
by
sklogic
10y ago
A use case for eval inside a macro is, for example, when you want to evaluate into a constant some part of a code constructed by this macro, but you do not want to do macro staging for whatever reason. I only did it a couple of times.
176.
▲
by
sklogic
10y ago
It puzzles me too, that people are not using the most powerful development technique. I cannot imagine not using macros for pretty much everything I do.
177.
▲
by
sklogic
10y ago
Sort of like that hilarious systemd bug with parsing the 'debug' kernel argument.
178.
▲
by
sklogic
10y ago
Macros do not need to be implemented with eval, unless they're lexically scoped macros. They're just normal function, normally complied just like anything else. What is important is an incremental compilation, one top level stat
179.
▲
by
sklogic
10y ago
sbcl has `eval`, but it does not have a JIT compiler or an interpreter.
180.
▲
by
sklogic
10y ago
Remember, we're not talking about high performance C compilers and all that here. We're talking about the programming paradigm where everything is a compiler . Network protocol parsing is a form of compilation, all file formats p
More ›