DennisMitchell / jellylanguage

Jelly is a recreational programming language inspired by J.
MIT License
863 stars 45 forks source link

257->256?! #57

Open PallHaraldsson opened 7 years ago

PallHaraldsson commented 7 years ago

https://github.com/DennisMitchell/jelly/wiki/Code-page

page contradicts the tutorial, and seems obviously only having 256. Not sure, see now and maybe "The character ¶ and the linefeed character can be used interchangeably" explains 257, then tutorial "wrong"?

Interesting language.. never seen Ð (and æ), and Þ (while not in code below) from my native Icelandic used, it seems it has a specific meaning and even €..

[I kind of want to know, what these Icelandic only letters do.. Seems we Icelanders have an adcantage typing in some programs.. :) but not all as e.g. Ç not on my keyboard. ]

https://codegolf.stackexchange.com/questions/79459/matrix-trigonometry

Julia, 19 bytes

A->reim(expm(A*im))

Jelly, 22 bytes [I actually thought I had the code page in browser set wrong.. :) ]

³æ*÷! ®Ḥ‘©r0Ç€s2_@/µÐL

really from:

https://github.com/JuliaLang/julia/pull/23679 "This PR would reduce Alex' answer to 6 bytes."

DennisMitchell commented 7 years ago

In Unicode mode, programs can use up to 257 different characters that aren't blatantly ignored by the interpreter. and a linefeed do the same, so only one of them is present in the code page. I chose because its easier to display.

In normal mode (using the code page), there are obviously only 256 different bytes. 0x7F is to be used wherever a or linefeed is needed.

I kind of want to know, what these Icelandic only letters do..

vendethiel commented 7 years ago

That last one probably wants to be 3+þ5

DennisMitchell commented 7 years ago

@vendethiel Yes, indeed.