Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
p4bl0
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
61 ms
·
871.
▲
A complete compiler for a simple language (in less than 150 LoC)
(gist.github.com)
2 points
by
p4bl0
5y ago
|
0 comments
872.
▲
by
p4bl0
5y ago
Here you go: https://code.up8.edu/-/snippets/3
873.
▲
by
p4bl0
5y ago
Sigh. My point was that it _feels_ like this because the tutorial does not actually do an actual compiler's work. It is a quite simple rewrite to a very similar language with the same level of abstraction. No language constructs have
874.
▲
by
p4bl0
5y ago
Sorry I was on my smartphone and mistyped the url (it's kryo not kyro): https://code.kryo.se/iodine/ Thanks for pointing it out. EDIT: As an aside, I still hate how mobile browsers have the bad habits of reloading
875.
▲
by
p4bl0
5y ago
I know that. But admit that it is nitpicking and completely besides the point.
876.
▲
by
p4bl0
5y ago
That's why I said "if feels like ". But nonetheless even if regexps would not be able to validate syntax, it does not mean that the source-to-source transformation could not be (mostly) achieved using them, because the sourc
877.
▲
by
p4bl0
5y ago
This series of blogposts is amusing but it is kind of frustrating too: the end result is merely a compiler. It is a source to source translator from a source language which is very very similar to a subset of the target language. Well I gue
878.
▲
by
p4bl0
5y ago
If you're obsessed with base64 here is a fun thing for you: A few years ago I randomly remarked that repeated base64 prefix converge to a fixed point. I tweeted [1] the first characters of that string out of amusement, without any addi
879.
▲
by
p4bl0
5y ago
Well the content is stored in a DNS Zone file but it is requested using JavaScript to an external HTTP API. I wouldn't really call that HTML over DNS but rather "DNS Zone as blog database". Anyway, this made me think of iod
880.
▲
by
p4bl0
5y ago
I really wonder how Bluesky [1] (Twitter's project of project to build a decentralized social media protocol) will take ActivityPub and especially Mastodon into account… Both the W3C and RetroShare have reacted to the news on Twitter [
881.
▲
by
p4bl0
5y ago
For context, there was some discussion here on HN about parts 1 and 3 of this series: https://news.ycombinator.com/item?id=28183062 https://news.ycombinator.com/item?id=28197876
882.
▲
by
p4bl0
5y ago
> [building an AST is] a declared non-goal. Then what will be going on after parsing? What will be compiled?
883.
▲
by
p4bl0
5y ago
I understand that, but I still find it easier to write/maintain/extend a grammar than a parser for that grammar.
884.
▲
by
p4bl0
5y ago
Why would you say that? Yacc and other parser generators exist for a good reason: hand written parsers can be quite hairy to debug and extend, while parser generators offer a domain specific language to specify your grammar and can generate
885.
▲
by
p4bl0
5y ago
I second all this. Reading the blogpost I was wondering how the author will do with this parser to actually build an AST rather than just validating syntax. The thing is that building an AST is typically the kind of thing where " do it
886.
▲
by
p4bl0
5y ago
Thanks for the explanation.
887.
▲
by
p4bl0
5y ago
I know this is off-topic but wow, following your links I just read this on the Puri.sm site: > Introducing Librem AweSIM: > Unlimited talk, text, and data for just $99/mo "just"? Really? Isn't that awefully expen
888.
▲
by
p4bl0
5y ago
Cool :). The thing is to have an always start-to-end working compiler for an increasingly (even if the steps are very small) complex language. Another point would be to use simple tools at least to begin with. Racket [1] provides good lexer
889.
▲
by
p4bl0
5y ago
I've been teaching a compiler class for 5 years. My experience has been that writing and teaching to write compiler is more efficient using horizontal step rather than vertical steps. What I call vertical steps are lexing, parsing, typ
890.
▲
by
p4bl0
5y ago
Feature phones with a classic keypad and bad T9 implementation are not addictive at all, trust me. And they cost a twentieth (~$15) of what the Light Phone costs. If you need the hotspot feature then just buy an additional 4G hotspot for $5
891.
▲
by
p4bl0
5y ago
Then just buy a $15 feature phone which do not have social media apps either, + a $50 4G hotspot if you need one. Same features and same non-feature, still a quarter of the price.
892.
▲
by
p4bl0
5y ago
If you absolutely don't want these features there are $15 feature phones which do not have them either… My point is that the price tag on this is way, way too high.
893.
▲
by
p4bl0
5y ago
There are feature phones cheaper than this one that can do 4G hotspot, like the 8110 4G or the 6300 4G from Nokia.
894.
▲
by
p4bl0
5y ago
You are not forced to use these other features when feature phones have them. And they have all the advantages of this one. Some even have bigger batteries and cost less than a third of this one.
895.
▲
by
p4bl0
5y ago
I really don't see the point of this device. There are a lot of feature phones with just the same capabilities, and even a little more (like basic web browsing support). Some of them can even have WhatsApp in case you need it (e.g., in
896.
▲
by
p4bl0
5y ago
For a project in an undergrad (3rd year) computer architecture course we had to invent a netlist language, implement a netlist interpreter, and then write a processor in our own netlist language and write an assembly program for that proces
897.
▲
by
p4bl0
5y ago
Ah, I see, right. One specificity of Lisp however is that the textual representation already looks like the abstract syntax tree that the Lisp variable which is passed to the Lisp function in the text file contains. But I can easily admit t
898.
▲
by
p4bl0
5y ago
While this point of view can be seen as technically valid, I don't see it as relevant because it negates all the specificity of the different paradigms and levels of interpretation. Of course all those runs on the same computer in fin
899.
▲
by
p4bl0
5y ago
`eval $1` uses the millions of line you were referring to in the first case. The few primitives necessary for a metacircular interpreter can be easily implemented from scratch (hence the name "primitives", which clearly does not a
900.
▲
by
p4bl0
5y ago
1- No everybody is in a position to do that and many companies are rather shitty on this kind of things. You can't just dismiss those facts by thinking wishfully. 2- Scheduling meetings online can work for people who are already engage
More ›