Live data from Hacker News

Uniform Structured Syntax, Metaprogramming and Run-Time Compilation

m00natic.github.io

1–10 of 45 posts

Re: Uniform Structured Syntax, Metaprogramming and Run-Time Compilation

#2
This looks super interesting, but very difficult to read on mobile with Chrome (Android, Samsung S10e):

https://i.imgur.com/bJw95FB.jpg

Rotating sideways helped to a degree, but in hopes the author sees this thread..

Update:

Sadly, Firefox isn't any better:

https://i.imgur.com/ONswSNb.jpg

I guess this means this instance can't chalked up to "Chrome is becoming the new IE6".

grin

Re: Uniform Structured Syntax, Metaprogramming and Run-Time Compilation

#3

This looks super interesting, but very difficult to read on mobile with Chrome (Android, Samsung S10e): https://i.imgur.com/bJw95FB.jpg Rotating sideways helped to a degree, but in hopes the author sees this thread.. Update: Sadly, Firefox isn't any better: https://i.imgur.com/ONswSNb.jpg I guess this means this instance can't chalked up to "Chrome is becoming the new IE6". grin

True.

Fortunately, there's a workaround - "request desktop site" in Firefox (and Chrome) menu.

Re: Uniform Structured Syntax, Metaprogramming and Run-Time Compilation

#4

This looks super interesting, but very difficult to read on mobile with Chrome (Android, Samsung S10e): https://i.imgur.com/bJw95FB.jpg Rotating sideways helped to a degree, but in hopes the author sees this thread.. Update: Sadly, Firefox isn't any better: https://i.imgur.com/ONswSNb.jpg I guess this means this instance can't chalked up to "Chrome is becoming the new IE6". grin

I agree that it's hard to read on mobile. I disagree that the problem is with the author. Some content is just not well suited for reading on a mobile device. I have a tendency to open links on my phone, then let them stay there for a week until I have a chance to open them on my laptop, where 95% of the things I want to do on a computer are easier and faster.

Here, my main issue is the code sections overflowing, the table of contents doesn't bother me. What would you suggest the author do about that?

Re: Uniform Structured Syntax, Metaprogramming and Run-Time Compilation

#5
I'm not sure if I'm missing something, or if this is meant to be allegorical for some other, more difficult problem, but the argument here seems very strange. For sure, C++'s string handling is an awful sight, but the jump to DSLs seems unmotivated. This issue can be handled with simple, traditional helper functions.

    select(recordS5, [](cxr, subcode, commercial_name, date_disc) {
        return cxr.like("YY|XX") &&
               ...etc;
    });

Re: Uniform Structured Syntax, Metaprogramming and Run-Time Compilation

#6
post #3

This looks super interesting, but very difficult to read on mobile with Chrome (Android, Samsung S10e): https://i.imgur.com/bJw95FB.jpg Rotating sideways helped to a degree, but in hopes the author sees this thread.. Update: Sadly, Firefox isn't any better: https://i.imgur.com/ONswSNb.jpg I guess this means this instance can't chalked up to "Chrome is becoming the new IE6". grin

True. Fortunately, there's a workaround - "request desktop site" in Firefox (and Chrome) menu.

Oh, wow, this is excellent, and fixes it!

I never knew about this option. Thank you, sincerely, TeMPOral!

Re: Uniform Structured Syntax, Metaprogramming and Run-Time Compilation

#7
post #3

Earlier quoted context omitted.

True. Fortunately, there's a workaround - "request desktop site" in Firefox (and Chrome) menu.

Oh, wow, this is excellent, and fixes it! I never knew about this option. Thank you, sincerely, TeMPOral!

You're welcome. It's a life-saver, in cases like this, or when a mobile site disables the ability to pinch-zoom.

Re: Uniform Structured Syntax, Metaprogramming and Run-Time Compilation

#8
This is very impressive in only the way that lisp can be. But part of why it works is because SQL is a well defined interface. There was a comment on ltu a good while back:

------------

"I would say that a system that allowed other metathings to be done in the ordinary course of programming (like changing what inheritance means, or what is an instance) is a bad design. (I believe that systems should allow these things, but the design should be such that there are clear fences that have to be crossed when serious extensions are made.)"

The fact Kay realized this fine point of design in the late '60s (according to him) is why he is a Turing Award Winner.

I know Lisp programmers who even today don't understand this point - their code is succinct but the API has a massively unnecessary learning curve due to unclear boundaries.

Sometimes my coworkers object to me paying extraordinary attention to detail about what the boundaries are. However, if we don't pay attention to boundaries, we may as well all be Netron Fusion COBOL programmers munging VSAM records and EDI data formats. By Z-Bo at Wed, 2009-04-15

http://lambda-the-ultimate.org/node/3265#comment-48165

Re: Uniform Structured Syntax, Metaprogramming and Run-Time Compilation

#9
This is talking about evaluating dynamic expressions over (semi-?)-structured row-oriented data, for the purpose of filtering.

It contrasts a tree interpreter in C++ with a JITted dynamically generated Lisp expression, with some hand-waving away of what the equivalent JIT in C++ would be, seemingly dismissing it as taking too long (is that what "unpause cosmic time" alludes to? I'm not sure).

The tree interpreter is a little unorthodox - it isn't how I'd write an AST-walking interpreter - and other interpreter techniques like generating linear programs for a simple virtual machine aren't considered. These can be pretty fast, especially with some use of implementation-specific computed goto, available in gcc and clang. It would get rid of the author's worries about recursion and lack of TCO, increase locality and decrease cache usage.

But of course there's not much need to write such an interpreter. Why not use a JIT framework for C++? Depending on the library, it wouldn't be a whole lot more complex than a traversal of the AST.

And the next question is, if the problem is querying plain-text databases, why not use Apache Impala? It's written in C++, and uses LLVM to compile SQL expressions into native code, and can evaluate filters (but not just filters, the full power of SQL) over CSV text.

Maybe Impala and its dependencies is too big, but if that's the case then your data is small and a simple interpreter would be plenty fast enough.

Re: Uniform Structured Syntax, Metaprogramming and Run-Time Compilation

#10

This looks super interesting, but very difficult to read on mobile with Chrome (Android, Samsung S10e): https://i.imgur.com/bJw95FB.jpg Rotating sideways helped to a degree, but in hopes the author sees this thread.. Update: Sadly, Firefox isn't any better: https://i.imgur.com/ONswSNb.jpg I guess this means this instance can't chalked up to "Chrome is becoming the new IE6". grin

I agree that it's hard to read on mobile. I disagree that the problem is with the author. Some content is just not well suited for reading on a mobile device. I have a tendency to open links on my phone, then let them stay there for a week until I have a chance to open them on my laptop, where 95% of the things I want to do on a computer are easier and faster. Here, my main issue is the code sections overflowing, the…

I disagree that it’s the content and not the website styling that makes this unreadable on mobile. A couple of small changes, namely reducing the margins and not having the code run off the side, would make this a lot nicer.
Post reply on HN