Old thread: Lisp is the most powerful programming language.
What are you working on, Jow Forums?
/dpt/ - Daily Programming Thread
Stop shitposting in the OP, you fucking cunt.
Upgrading scripts in our codebase from Lisp to Python.
Anone, what cool things are we going to learn about JavaScript today?
Imagine being this angry about having the inability to see the usefulness of homoiconic languages.
Fucking autism.
Rust is a fine language.
Imagine caring about dead meme languages. At least shitpost with clojure lol.
why does babel do this?
const toCapitalized = ((re,fn) => str => str.replace(re,fn))(/^ ./u, x => x.toUpperCase(),)
to
"use strict";
var toCapitalized = function (re, fn) {
return function (str) {
return str.replace(re, fn);
};
}(/^(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/, function (x) {
return x.toUpperCase();
});
Imagine caring about posting about dead meme languages. You'll find out that none of this matters.
It's so useful that it's basically no one is using it.
I'm writing a REPL that uses fork and execvp. It's working okay except the prompt shows up before the output of the exec process even though I'm waiting.
So kind of like
void call(char **cmd)
{
if (cmd && !fork())
execvp(cmd);
}
int main()
{
while (1)
{
printf("> ");
call(get_cmd()); // get_cmd reads user input somehow
while(waitpid(-1, NULL, WNOHANG) > 0);
}
}
(not exactly, but just to get the message across)
So if I enter something like "ls" I get
> ls
> *ls output here*
and have to hit enter again to clean the prompt. Any ideas as to why?
Clojure is a lisp, my statement still applies. Imagine judging the merits of a language by how much it's used. Imagine never learning why the clos is one of the most versatile system of object semantics available in any lanauge. Imagine never learning how to use dynamic dispatch. Imagine never using derived types. Imagine judging something as useless because you can't comprehend why it could be useful given your current skillset.
imagine seething this much
dilate faggot
t. lispfag
devdocs.io
If you look at the compatibility table you can take a guess.
You should set a modern browserslist query up.
Prove me right brainlet
lol okay
i doubt you even use lisp faggot
waitpid only returns >0 if the childs status changed afaik, maybe you need to write == 0 in the while
Fork splits into 2 different processes. "fork() returns a zero to the newly created child process." so you are calling execvp in the original process and the forked process is continuing the while loop. "The wait() system call suspends execution of the calling process until one of its children terminates." but you are calling wait in the child.
Check the return value of fork (also for errors) and wait on that pid. Here is a link to an example of doing this properly support.sas.com
classes are objects
objects are instances of classes
Wanking to language features is for code monkeys. What’s important is the problems you solve with a program, not how it’s written.
>"fork() returns a zero to the newly created child process." so you are calling execvp in the original process
The if-statement is checking !fork() though.
Lol enjoy deluding youself into mediocrity
These all exist in different languages. Julia also supports multiple-dynamic dispatch, derived types, and is homo-iconic without being a lisp meme.
enjoy staying mad
((((((((((((love it))))))))))))
>multiple-dynamic dispatch
what a stupid gimmick
can I fuck your doll
Tools are part of the solution. Wanking it to antiquated patterns an error-prone features is brainlet. I'm not saying you shouldn't learn c++ better than your peers to make yourself marketable to employers that have mountains of legacy code. But what I am saying is that you're retarded and should leave software engineering if you're not learning new ideas in cs just because you think what you have is "good enough". Enjoy getting fired in favor of cheaper, more knowledgeable fresh grads in 15 years.
Why doesn't this work?
in c++
array arrayOfChars = {{'a','b','c','d','e','f'}, {'a','b','c','d','e','f'}};
im trying to make a multidimensional array using std::array
>i don't understand this, so it's a gimmick: the post
I understand it perfectly, it's a stupid gimmick
>what a stupid gimmick
Justify this statement
cope
Lisp isn’t getting you hired anywhere in the last 40 years. Cope.
give me a good use case
oh look, it's another wagecuck
because you have to enclose every array initializer in another pair of brackets.
don't ask me why, I've no idea
array arrayOfChars =
{{{{'a','b','c','d','e','f'}},
{{'a','b','c','d','e','f'}}}};
Oh look a larping neet.
>new ideas in cs
There havent been any new ideas in CS for half a century
glassdoor.com
Imagine being this unwilling to learn anything new. Stay poor, stay pleb
How JS is not homoiconic, everything is a object
Lisp is an engineering nightmare and should be kept far away from serious projects.
go back to shoveling shitware for pajeets
oh wait, i doubt you can even land a job
>Imagine never learning why the clos is one of the most versatile system of object semantics available in any lanauge
Because what OOP needs is even more ways to make your program needlessly complex.
>Imagine never learning how to use dynamic dispatch
??? Dynamic dispatch is supported by most languages. Multiple dispatch is supported in a bunch of languages (e.g. C++) and can be relatively easily implemented in others.
>Derived types
Name a single thing you can do with this that isn't covered by other languages.
Learn Lisp.
Clojure, not Lisp. By your definition C would be equivalent to Java and Python.
#include
#include
int main()
{
const std::array arrayOfChars = {
{ {{'a', 'b', 'c', 'd', 'e', 'f'}},
{{'a', 'b', 'c', 'd', 'e', 'f'}}
}
};
return 0;
}
holy shit that's retarded
>what are dinosaurs
i hate that "puzzle"
constexpr array a = {{'a','b','c','d','e','f','g'}};
static_assert (a[1][0] == 'g');
nice
>multiple dispatch
>C++
retard
wow
Don’t bother, lisp tards have been brainwashed by sicp to believe that language development stopped after the 1960s.
Neat. What program?
You don't need that many braces, retards
std::array arrayOfChars{ // constructor call
{ // argument
{'0','1','2','3','4','5'},
{'a','b','c','d','e','f'}
}
};
Where did the lispshitters come from in the past few days
Imagine making inane statements that are completely unjustifiable in an attempt to double down
all your favourite language features were in algol 68
JS with all python libraries would be literally perfection and every other language would die inmediatly
What language should I use instead?
use const
Its summer
this would not be an issue if sepples were not rife with spasticated semantics
>Dynamic dispatch is multiple dispatch
>C++ has multiple dispatch
>You can still do it with other languages, just harder!
>Companies should only use OOP
Why do people like this go into swe
Whatever solves your problem best or has the libraries to do it for you.
also im wondering why this isn't working
for(int i = 0;i < arrayOfChars.size();i++){
cout
Okay, so Lisp then.
try this
#include
#include
int main()
{
const std::array arrayOfChars = {
{ {{'a', 'b', 'c', 'd', 'e', 'f'}},
{{'a', 'b', 'c', 'd', 'e', 'f'}}
}
};
for (int i = 0; i < arrayOfChars.size(); ++i) {
for (int j = 0; j < arrayOfChars[i].size(); ++j) {
std::cout
stop arguing about nothing
operator
What’s unjustifiable? Their syntaxes and conventions are very similar. If you can read C you can easily read the other two. They are still different languages, like Lisp and Clojure are. Lumping all languages with (((parens))) and sexpressions together is silly.
if this is a joke i'm not finding it funny
Why is everyone in this thread fawning all over a shitpost of a language nobody outside Jow Forums has ever even heard of?
thats just the type of retards this thread attracts
In lisp, this is just
#2A((#\a #\b #\c #\d #\e #\f)
(#\a #\b #\c #\d #\e #\f))
>Dynamic dispatch is multiple dispatch
never said that retard
>C++ has multiple dispatch
Is this "overloading is statically determined" autism? Because if so, you just have to cast it at runtime. Can be trivially done using templates.
>You can still do it with other languages, just harder!
Aren't lisp fags all about "muh language extensibility"? You do it once (which again, is pretty damn easy) and then it's done.
>Companies should only use OOP
Absolutely based retard. That's literally what the opposite of what I said. Use OOP selectively and only using basic features.
Why do lisp fags strawman so hard? Is it the only way they can defend their language?
>reading some Vault 7
>find some comment sections and wiki user discussions frozen in time
>LOL NARWHAL BACON comments from literal glow-in-the-darks
Uncanny.
and then you attacked lisp even though he didn't mention lisp at all. good job retard
follow the reply chain next time, retard
imagine coping this hard
Oh yeah, I'm sure that guy completely misrepresenting my arguments has absolutely nothing to do with the context of the conversation, faggot
JavaScript > Lisp
You literally cannot prove me wrong
JavaScript is just a Lisp in disguise.
zig seems like cyclone but with an actual living implementation
it also seems like rust but with a gigantic tumor excised
another meaningless post
Is that why js is so shit? and callback hell
cope
Lisp and Javascript runtime environments embed the compiler.
Lisp can invoke the compiler.
Javascript can't invoke the compiler.
There you go, you've been just proven wrong.
to be fair, all languages are just variants of lisp in one way or another
>implying clojure isn't a lisp
t. autismo
dilate
How would you write this in lisp
(async function () {
console.log("start");
await { then(_) { setTimeout(_, 1000); } };
console.log("end");
})().then(null, console.error);
>callback hell
ah, nice to meet you again, last decade
I didn't miss you
It's not like Rust at all my dude.
It's only a minor step above C in terms of safety.
It's literally just C with a few more features, namely better error handling.
JS has eval
you mean it's c with more stringent safety checks, i.e. basically cyclone, i.e. the sane part of rust
(async ((f
p "start";
hold_on { then_what _ Timeout 1000;
p "end";
})))
then_what nul, p err;
Which should never be used, and proper CSP rules will abort your code if you try to anyway.