Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

257->256?! #57

Open
PallHaraldsson opened this issue Oct 17, 2017 · 3 comments
Open

257->256?! #57

PallHaraldsson opened this issue Oct 17, 2017 · 3 comments

Comments

@PallHaraldsson
Copy link

PallHaraldsson commented Oct 17, 2017

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:

JuliaLang/julia#23679
"This PR would reduce Alex' answer to 6 bytes."

@DennisMitchell
Copy link
Owner

DennisMitchell commented Oct 19, 2017

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..

  • Ð, Æ, and æ are part of two-character tokens and do nothing on their own. Æ and æ are used for arithmetic extensions.

  • ð begins a new, dyadic chain.

  • Þ is sort-by. For example, sorts a list of lists by length.

  • þ is table. For example, 3+þ5 computes all sums x+y with x = 1,2,3 and y = 1,2,3,4,5.

@vendethiel
Copy link
Contributor

That last one probably wants to be 3+þ5

@DennisMitchell
Copy link
Owner

@vendethiel Yes, indeed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants