Name: Anonymous 2016-01-08 14:23
https://matt.sh/howto-c
Very good read for anyone that wants to write this outdated language in 2016.
Very good read for anyone that wants to write this outdated language in 2016.
I do have to agree with him on size_t (although I try to avoid it) and -Wall -Wextra, though.
#define NUMBER '0'
void push(double);
double pop(void);
int getop(char []);
int getch(void);
void ungetch(int);
The sizeof operator yields the number of bytes required to store an object of the type of its operand. The operand is either an expression, which is not evaluated, or a parenthesized type name.
int getline(char line[], int max);
int strlen(char *s);
Stop waving your shit around people who know how to drive a computer.World doesn't run on elegant abstractions. Its runs in C/C++ and this wouldn't change for awhile(and C/C++ standards guarantee it would be backward compatible).
Tokenizer cons cells are literally a toy. How are you going to networking/graphics/sound/input/etc in the preprocessor?Tokenizer-eval isn't used alone:
Do you seriously believe that's in the future for the preprocessor of a portable assembly code?Yes, tokenizer-eval makes C preprocessor more powerful than Lisp(though a bit more verbose, will require a macro library like void.h to fully utilize). You underestimate what could be done with it, since you're used to "elegant and terse" abstractions that come with Lisp.
The ENTERPRISE world loves it some Cobol, Java, and whatnot. Devops is python, perl, ruby, shell scripts. Supercomputing is Fortran.Written in C/C++ or uses C infrastructure.
You underestimate what could be done with it, since you're used to "elegant and terse" abstractions that come with Lisp.You don't even know what "elegant and terse" means, and I have no idea what you think "more powerful than Lisp" means, because you clearly know nothing of the language at all. It won't be faster, it won't be safer, it won't be more expressive. Maybe it could have a smaller footprint? That's about it.
Written in C/C++ or uses C infrastructure.Your attempt at a meme is the whining of a child and needs to die. Because it's an artifact that has disappeared behind the scenes, it can be replaced with anything. It is a commodity of zero value in that position. Your insistence on bringing it up reinforces its lack of value.
"more powerful than Lisp" means, because you clearly know nothing of the language at all.C macros are lexer-level: they allow literally everything.
Maybe it could have a smaller footprint? That's about it.Zero-overhead principle: if something is unused it costs nothing. _TokenOf() is like having a extremely compact eval() which feeds back into C preprocessor. The key reason C won its doesn't impose costs before use.
Your insistence on bringing it up reinforces its lack of value.Its brought up because delusional users of toy language often proudly claim independence from C while using software which depends on it. When Lisp OSes/Games make a comeback you could claim lisp is actually powerful/useful and not a shitty script.
shows that it is a dying language existing only on its own momentum, not any sort of benefit.Well, github shows its one of most popular languages. Millions of lines in it are written daily. Pretty strong "momentum" for a dead language.
Besides, popularity is politics, money and inertia.Are you backpedaling on Lisp popularity?
And it's not about "abstract bullshit" (another clue that you're fucking clueless about Lisp), it's about productivity, flexibility, and directness of expression.Abstract bullshit violates Zero-Overhead principles by costing performance/memory without explicit benefit to programmer:its already understood by JavaScript community and been key to improving performance while preserving productivity, unlike Lisp where performance is seen as secondary and productivity is hampered by crippled syntax(ironically slower and less expressive than JavaScript).
Lisp has macro hygiene and syntax rules.No it doesn't, you fuck.
typeof() and __auto_type (provided by GCC)HAHAHAHAHAHAH, eat a didk, and learn what the fuck a compiler does, you little baby. Why the fuck are you even here if you don't even know the basic shit that's even inside your beloved C compiler?
FreePascal only(its a quite different from enterprisey pascals of the past and cross-platform).I'm talking about the goddamn language, you fuck. You have no fucking clue about anything.
If the reverse was true you would be posting on LISP/Forth/Oberon machine.The common platforms have been commodotized. I do use virtualizations of those machines which give me a full capable environment which can ignore the rest. You fuck.
Pretty strong "momentum" for a dead language.I didn't say "dead" you fuck, I said it's dying. Now you're just waffling trying to defend yourself.
Lisp-like?Clojure is the biggest "core" Lisp rising in the actual job market. Ever wonder about those languages, including C++, that are constantly playing catch-up on ancient Lisp features? Do you think that means anything you piece of shit?
Are you backpedaling on Lisp popularity?I never said it is popular, you fuck. Stop twatwaffling. However, it was king of the hill back in the Lisp machine days, and leading up to it (which is why there was a commercial market for Lisp machines in the first place).
Abstract bullshit violates Zero-Overhead principles by costing performance/memory without explicit benefit to programmer:its already understood by JavaScript community and been key to improving performance while preserving productivity, unlike Lisp where performance is seen as secondary and productivity is hampered by crippled syntax(ironically slower and less expressive than JavaScript).This is a quote for the ages. Never has somebody tried to talk so authoritatively about language technology, while being so demonstrably ignorant about everything within it.
unlike Lisp where performance is seen as secondary and productivity is hampered by crippled syntax(ironically slower and less expressive than JavaScriptIt's clearly established that you know absolutely zero about the language and are still spewing falsehoods like you think you have any clue to do so.
Make compile-time roman numeral literals in C.There is no need to use _TokenOf()
mangled C macroTotally doable in Lisp, and I explained the process to getting there. Desire for behavior → C fucks it up with weak-ass preprocessor shit → Unfuck it back to behavior → Nice Lisp macro that isn't a shit hack but does the same thing better. If I took the time to unmangle it, I would likely follow the same idioms in Lisp.
No other Pascal dialect is C/C++ independent.Pascal is a language that is not dependent on C, which is a completely different language, as you don't seem to know the distinction. Which part of the Pascal language depends on the C langauge? Be clear and specific, you laughably stupid piece of shit, or shut the fuck up and kill yourself.
Only in a contrived, virtual environment written in C/C++/asm.Lisp takes my Lisp and converts it to machine code. You're contriving C into the picture because you're a desparate loser who can't admit that the old shit you've never learned past is being laughed at.
it patently obvious C and C++ have no signs of dying or being replaced.Who even teaches C anymore in universities? Not that Java doesn't suck, but it's at the very least left common CS curriculum. Such is the way to becoming the next Cobol.
[popularity]I know you can't read, but "is popular" ≠ "growing in popularity" anyway.
The era is goneAgain, because top popularity is driven by money, politics, and momentum. Which speaks nothing about the power, flexibility, ease of use, and speed of a language.
I don't need to be a chef to comment on taste of food.You've never even tasted Lisp enough to make a determination. Reading between the lines, it's like you think it's still interpreted or something.
It's not fastWhat the fuck are you smoking? Even just looking at the very first benchmark:
secs N KB gz cpu cpu load
binary-trees 0.09 12 ? 706 0.07 0% 30% 80% 0%
binary-trees 1.61 16 9,492 706 1.60 100% 1% 2% 1%
binary-trees 37.71 20 132,384 706 37.68
secs N KB gz cpu cpu load
binary-trees 0.07 12 ? 612 0.06 100% 0% 0% 0%
binary-trees 1.36 16 77,168 612 1.35 1% 1% 1% 100%
binary-trees 32.77 20 325,092 612 32.71
single token representing a numberIt works anyway. Welcome to C.
introduce actual new syntaxThere is no need since the C syntax isn't crippled enough.
Pascal is a language that is not dependent on C, which is a completely different language, as you don't seem to know the distinction.Pascal as in abstractly delusional design document does not actually depend on C.
who can't admit that the old shit you've never learned past is being laughed at.In reality you're the one being laughed at, since you deny reality of using C/C++ software in your toy language by pretending it doesn't exist.