- Joined
- Apr 11, 2023
People react to it like this and then wonder why I like Javascript.nobody had to make this horror it was simply discovered within the treacherous insanity of javascript
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
People react to it like this and then wonder why I like Javascript.nobody had to make this horror it was simply discovered within the treacherous insanity of javascript
it's cool in a sick perverted way but the ideal language should only have smaller languages in it after you tell the smaller languages to be therePeople react to it like this and then wonder why I like Javascript.
holyc is already jit compiled so all you need to do is rename itHow can we make a holy-C like interpreted language called javaScripture?
the web was already turning into a weird application platform so they added a weird version of the jvmI really wish that instead of coming out with WASM, W3 came up with a sensible alternative to Javascript.
![]()
What's interesting is that it works more as a transpiled language, since it abuses a bunch of type interoperability and truthiness "features" of JS to execute JS code underneath. Ones such as:people chastise c++ for having extensive, complicated, and weird turing complete macros bolted on over c's barely-enough-to-work text substitution macros, but javascript wins the fucked language competition yet again by accidentally having a turing-complete esoteric language erupting out of its heavily retarded type system
nobody had to make this horror it was simply discovered within the treacherous insanity of javascript
true+[] === "true"
. You could then index these strings with square brackets to pick out individual letters.false
. So ![] === false
and, by extension, !![] === true
. You can do !+[] === true
too.+true === 1
, so +!![] === 1
. Conversely, +false === 0
, but this isn't nearly as useful.[1, 2, 3]["concat"]([2, 1]) === [1, 2, 3, 2, 1]
. Consequently, you can repurpose the existing function constructors to execute your own code from a string.[1] + [2] + [3] === "123"
-> [+!![]] + [!+[]+!![]] + [!+[]+!![]+!![]] === "123"
+("123") === 123
-> +([+!![]] + [!+[]+!![]] + [!+[]+!![]+!![]]) === 123
. This also works if you use square brackets to encapsulate the value instead.And I thought algebraic structures were as bad as can be.The last one is most interesting because if you can create any string using this type system trickery, you can painstakingly build a string of JS code out of these symbols and have that code executed.
Neat!What's interesting is that it works more as a transpiled language, since it abuses a bunch of type interoperability and truthiness "features" of JS to execute JS code underneath. Ones such as:
The last one is most interesting because if you can create any string using this type system trickery, you can painstakingly build a string of JS code out of these symbols and have that code executed.
- You can turn primitives like booleans and ints into strings by adding an empty array to them. For example:
true+[] === "true"
. You could then index these strings with square brackets to pick out individual letters.- Negating an empty array evaluates as
false
. So![] === false
and, by extension,!![] === true
.+true === 1
, so+!![] === 1
. Conversely,+false === 0
, but this isn't nearly as useful.- You can access array functions by indexing them with square brackets and a string key like any other object. For example:
[1, 2, 3]["length"] === 3
. Consequently, you can repurpose the existing function constructors to execute your own code from a string.
+!![]+[]+(+![])+(+![])
. positive false being 0 can be useful in this demented world, at least for golfing. i don't know which integrated type names like "Infinity" i can grab random letters from to make it a real number (i'm a lazy nigger)An important thing to note is the leading + is an implicit add to 0. So you can combine ways of evaluating true to save a few characters. For example:Neat!
and with the power of randomly converting numbers to strings by adding [], i can make "100" with+!![]+[]+(+![])+(+![])
. positive false being 0 can be useful in this demented world, at least for golfing. i don't know which integrated type names like "Infinity" i can grab random letters from to make it a real number (i'm a lazy nigger)
+!![]+!![] === 2
!+[]+!![] === 2
+(1e1000) === Infinity -> +([1]+(true+[])[3]+[1000]) === Infinity -> +(+!+[]+(!+[]+[])[!+[]+!+[]+!+[]]+[+!+[]]+[+[]]+[+[]]+[+[]]) === Infinity
+[false] === NaN -> +[![]] === NaN // this works with +[true] too.
[][[]] === undefined, [][+[]] === undefined // there are a lot of ways to do this one.
my head is starting to hurt real bad for some reasonAn important thing to note is the leading + is an implicit add to 0. So you can combine ways of evaluating true to save a few characters. For example:
Code:+!![]+!![] === 2 !+[]+!![] === 2
Scheme is nice. There are all sorts of variants, but the one that Racket is derived from is solid.I am slowly growing to love Lisp in my head, but I haven't taken the plunge and programmed in it yet, just reading a lot of samples.
What's the best way to dive in?
congratulations on wanting to learn the only programming language which has fanboys more obnoxious than rust niggers. these spergs have been extremely elitist since before most rust fans were born, and will continue to be obnoxious for long after the rustlets 41%. welcome to (((the eternal (((lisp))))))I am slowly growing to love Lisp in my head, but I haven't taken the plunge and programmed in it yet, just reading a lot of samples.
step 1 is to set up emacs because i've never seen a lisp faggot who doesn't love emacsWhat's the best way to dive in?
scheme is a very simple lisp that leaves out things like the controversial loop macro and retarded separate namespaces for functions and variables. it also helpfully leaves out most of the libraries too because it's hard to fit random shit like xml into a <100 page report. fortunately it's just a myth that you can't do real work in scheme, you just end up locking yourself into one of the half-dozen different implementations with different libraries included. there are also srfis which are very niceScheme is nice. There are all sorts of variants, but the one that Racket is derived from is solid.
How to Design Programs, Second Edition
namedcontroversial loop macro
let
in Scheme and Racket works close enough imoAn important thing to note is the leading + is an implicit add to 0. So you can combine ways of evaluating true to save a few characters. For example:
Code:+!![]+!![] === 2 !+[]+!![] === 2
Edit:
Code:+(1e1000) === Infinity -> +([1]+(true+[])[3]+[1000]) === Infinity -> +(+!+[]+(!+[]+[])[!+[]+!+[]+!+[]]+[+!+[]]+[+[]]+[+[]]+[+[]]) === Infinity +[false] === NaN -> +[![]] === NaN // this works with +[true] too. [][[]] === undefined, [][+[]] === undefined // there are a lot of ways to do this one.
This is the most succinct reason of why even after three tries with JS for Frontend and Backend lectures, I fucking dropped my CompSci Technical degree.Neat!
and with the power of randomly converting numbers to strings by adding [], i can make "100" with+!![]+[]+(+![])+(+![])
. positive false being 0 can be useful in this demented world, at least for golfing. i don't know which integrated type names like "Infinity" i can grab random letters from to make it a real number (i'm a lazy nigger)
they are not the same though becausenamedlet
in Scheme and Racket works close enough imo
loop
is a massive insane gigamacro that does 73 different things and named let
is a small syntax sugar macro that helps you make recursive functions and not much elsejs is like if somebody took scheme and did srs (syntax reassignment surgery) to troon it out to look like java and then added some shit from random other languages to try and patch up the holes made by the butcheryThis is the most succinct reason of why even after three tries with JS for Frontend and Backend lectures, I fucking dropped my CompSci Technical degree.
JavaScript is the unholy child of Brainfuck and Java, dear Turing.
Yeah, to rephrase: namedthey are not the same though becauseloop
is a massive insane gigamacro that does 73 different things and namedlet
is a small syntax sugar macro that helps you make recursive functions and not much else
let
works close enough practically for anything you should be doing with it. My biggest problem with the CL loop
is its syntax is gross and unwieldy, and I feel there are much more LISPy ways of achieving its goals. Like sure, you can still insist on having a big disgusting macro that'll also change the oil in your car and make you a cheese sandwich, but make it less butt ugly.the worst thing aboutYeah, to rephrase: namedlet
works close enough practically for anything you should be doing with it. My biggest problem with the CLloop
is its syntax is gross and unwieldy, and I feel there are much more LISPy ways of achieving its goals. Like sure, you can still insist on having a big disgusting macro that'll also change the oil in your car and make you a cheese sandwich, but make it less butt ugly.
loop
is that it does half a dozen things that HOFs can do and another half a dozen things that other functions could do and also provides iteration facilities as what feels like an afterthought to all thatI use emacs, but pretty much solely as a text editor with syntax highlighting.step 1 is to set up emacs because i've never seen a lisp faggot who doesn't love emacs
There is this fennel language which is basically lua lisp. It compiles to lua and has full interop with it.If there was an emacs-like editor with a good lisp, like a scheme or something, that'd be baller as fuck.