Live data from Hacker News

Based C++

github.com

11–20 of 40 posts

Re: Based C++

#11
post #10

Earlier quoted context omitted.

As far as I can tell, it looks like a wrapper for cc1plus (internal GCC tool) and ld that do a custom #define of some input data, compile, extract some data from the binary, and do... something with it. Makes it look like C++ is an interpreted language.

Implementations are orthogonal to languages, there have been C and C++ interpreters since the languages exist, as you can see by looking at BYTE and Dr Dobbs archives looking for compiler developer tools ads.

But some are more suited then others. For example, I believe the C standard to not describe what is supposed to happen when the definition of a function changes.

Re: Based C++

#13
post #10

Earlier quoted context omitted.

Implementations are orthogonal to languages, there have been C and C++ interpreters since the languages exist, as you can see by looking at BYTE and Dr Dobbs archives looking for compiler developer tools ads.

But some are more suited then others. For example, I believe the C standard to not describe what is supposed to happen when the definition of a function changes.

It doesn't have to, that is an implementation detail or OS specific feature.

Two scenarios where the definition of a function in C changes, are dynamic libraries on OSes that allow reloading the same library multiple times, or self-rewriting code.

Here you stay within the realms of a compiled language implementation, where what happens, is only expecified by compiler specific features, or OS capabilities handling executables and dynamic libraries.

Re: Based C++

#14
Man, that went way over my head.

But if you just want to run C++ in a REPL, you can use Clang-Repl https://clang.llvm.org/docs/ClangRepl.html> which uses the LLVM JIT to "interpret" C++.

Re: Based C++

#17
Got roped into watching the whole video. He obviously loves C++. And since I actually enjoyed it, I suppose that also tells something about me.

Also read up on sheafification really quick. Neither Firefox nor Chrome seem aware of it (red underline), so there.

Edit: If anyone is actually interested in interpreted C++, I think AngelScript is the most practical way for this.

Re: Based C++

#18
post #12

So confused what this is...

You'll need this https://www.youtube.com/watch?v=cFtymODJEjs

This video doesn't explain what the project does and how it does it. Also it's deliberately misleading the viewer, for example it purposefully incorrectly states that C++ is an interpreted language.

Also the music is way is too loud and sudden.

Re: Based C++

#19

Based? Based on what?

Usually means "based on facts".[1] Here, probably used ironically. [1] https://www.urbandictionary.com/define.php?term=based

I don't think I've ever seen it used outside of a heavily irony-poisoned context.

Re: Based C++

#20
Would anyone like to explain in text form how this works? I've got as far as the use of <{ meaning to run at compile time, so the whole thing is going to be one of those template metaprogramming stunts.
Post reply on HN