Hacker Newsnew | past | comments | ask | show | jobs | submit | vgel's commentslogin

It's less calibrated but still useful, yea


Reading the transcript of Stalin, Molotov, etc's conversation with Eisenstein was really interesting. Even if you disagree with their analysis and what they're doing, it's clear they know the period very well--it's hard to imagine modern politicians speaking on history like that.


It's hard to imagine a modern head of state incapable of delivering that level of basic national mythology/history. There's probably the occasional counterexample but this is common enough to regularly pop up in available transcripts of national leaders meeting to this day.


You don't follow the news much, do you? Good for you :)


I think there’s quite a few politicians and commentators who could give even handed overviews.

Gotcha interviews and soundbites garner more clicks. Anyone with a solid mind would avoid speaking near any source that would ‘leak’ their opinions.


The thing I found most interesting were the side-topic comments about former rulers and their politics. Some of it comes off very nationalistic.


Thank you for making it free! I've used it on my blog (https://vgel.me) forever, since back before I ever would've paid for analytics, and it's been rock-solid the whole time. Some of the most "set it and forget it" software I use. I definitely owe you a donation so I'm glad I saw this!


Oh, we already sequenced it awhile back. As for physical media, that's not exactly what happened... https://www.ncbi.nlm.nih.gov/nuccore/NC_001611.1?report=fast...


I kinda doubt there's not some critical "mutation" in there that'll prevent it from replicating.


Oh, interesting--I remember messing around with flags on the stack but was having issues with the WASM analyzer (it doesn't like possible inconsistencies with the number of parameters left on the stack between blocks). I think your solution might get around that, though!


Looks like Schism (https://github.com/schism-lang/schism) got part of the way there, but it unfortunately seems to be dead.


I think because it's ambiguous with unary plus (a = +b), since C isn't supposed to have significant whitespace in most circumstances.


You also run into problems with a=*p and a=-b, which are perhaps more likely.


But they could've fixed that by going a=(*p) and a=(-b);

Kind of how we use (*p)->next instead of *p->next where p is node_t**


That seems a little backwards and barbaric, though right?

Imagine if we had to watch out for this as a common pitfall:

    // BUG! Actually subtracts x from current val of neg_x.
    neg_x = -x;
Even moreso, how would these two lines behave? Would they differ in semantics?

    n = -5
    n =- 5
Overall, -= is just so much less ambiguous.

EDIT: To your point about ->, I personally think C would be better if:

    *p->next
parsed as:

    (*p)->next
instead of:

    *(p->next)
but maybe now I'm not thinking through all the parsing impliciations :)


I've found struct fields that are pointers far more common than pointers to pointers to structs, so if nothing else it feels like *(p->target) is a more widely useful interpretation of *p->target than (*p)->target would be.

Regarding "n = -5", it would presumably be interpreted as "n=(-5)", same as today. Operators don't have spaces in them. So "n- -5" is "n-(-5)", rather than "n--5" (not valid).


As you note in your edit; we already have to watch for that pitfall :)

so really the best way out is to be as verbose as possible imo; a = a + c or auto nodep = *nodepp; nodep->next;

Compilers and compute performance have grown to make the difference negligible for code output and compilation times but they definitely take a lot of mental complexity out of such scenarios (anything helps when grokking 10k+ lines of code).


But originally there wasn't a += or =+ lexical token! Those things were scanned as separate tokens, and could be written = +.

So that is problematic; If {a}{=}{-}{b} means a = a - b, then you have no way to write a = -b without parentheses like a = (-b).


Oh, that's neat (funny that they skipped out on similar things to me, like GOTO and structs :-)

I didn't see a link to the source in the article, but this seems to be it: https://sourceforge.net/p/tiny-pascal/code/HEAD/tree/NorthSt...


Maybe not the language choice, but the codegen of this compiler is terrible because of the single-pass shortcuts (for example, it unconditionally loads the result of all assignment operations back to the stack just in case you want to write `a = b = 1`, even though 99% of the time that load is immediately thrown away.)


Well, I set the 500 line budget up front, and that was really as much as I could fit with reasonable formatting. I'll be excited to see your 500 line C compiler supporting all those features once it's done ;-)


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: