last day (1265 days later) » 

12:36 AM
Hello!
 
Hi there!
 
o> quack
 
Must be Jelly. Jam don't shake like that.
room topic changed to Jelly: Discussion of the Jelly programming language. (no tags)
Let's try that again.
room topic changed to Jelly: Discussion of the Jelly programming language. (github.com/DennisMitchell/jelly) (no tags)
 
"Nutella on toast" would be a more popular name
 
12:46 AM
@Calvin'sHobbies CJam would be an even more popular name
 
@Calvin'sHobbies It's Jelly because the language is quite similar to J. Jello was my first choice, but that seems to be a trademark.
 
@Dennis Why not call it "I"? It isn't taken.
 
I also considered M, a killer golfing language.
I'll think about it. I just published Jelly yesterday. Nothing is set in stone yet.
 
How do I define a dyadic function?
Also, what does ; do?
 
@Dennis I see. Though I really do think more people would click on the name in answer links and stuff if it had a longer, more intriguing name, like "Jelly From The Moon" or "Jelly Jumps and Jacks for Joy". (Yes, it's all silly marketing, but still :P)
 
1:05 AM
@ThomasKwa ; concatenates. jelly.tryitonline.net/#code=Ow&input=&args=Mg+Mw All user-defined links have no arity. If you call the program with one or two arguments, it uses that version of the link. References to links on the link stack can be monadic (Ȧ) or dyadic (ȧ).
 
Ah, I didn't see the 'add another argument' button.
 
I'll be afk for a while. I'll show you some examples when I get back.
 
1:52 AM
@ThomasKwa Here are three examples of how to calculate the standard deviation of a list of lintegers: jelly.tryitonline.net/… jelly.tryitonline.net/… jelly.tryitonline.net/…
All define a link on the first line, which can be referenced as Ȧ (monadic) or ȧ (dyadic). The second line is the "main" link, which is executed with the input supplied via CLAs.
Line 1 is a fork, dividing the sum (S) by the length (L) of the list.
 
The last line is always the main link?
 
Yes.
 
And Ȧȧ always refer to the previous line?
Are there ways to refer to lines prior to the previous?
 
ȦĊĖĠİȮṠŻ refer to the first 8 links, from top to bottom.
References to more links are planned, but currently not implemented.
The lowercase versions make them dyadic.
 
Hm, okay
 
1:56 AM
All lines are parsed as chains/trains, evaluated from left to right.
 
How do I make an array or string literal?
@Dennis /me rewires his brain to stop thinking right to left
Are there parentheses or other grouping?
Is there any way to make a function with more than two arguments?
 
String literals aren't properly implemented yet; they work only from input. 1-dimensonal arrays work as 1,2,3. You need brackets for higher dimensions.
@ThomasKwa Currently, only niladic (unimplemented except for literals), monadic and dyadic links are planned.
@ThomasKwa # and $ are joints that bind to links together, to be evaluated like a monadic/dyadic chain. Parens are not planned; using the link stack is the same byte count anyway. I'm thinking about introducing separators like µ and ð though, that would allow to evaluate a single line as a chain of chains.
 
Are you inventing all this vocabulary (chains, links, joints)?
 
2:12 AM
Ah, I should have told you about that. I didn't want to copy J's grammar names.
 
Okay.
 
Links are functions. Chains are trains. Joints combine two links. Hypers modify the arguments of a link. Overs a special syntax like reduce/cumulative reduce and other stuff (maps, etc.) that aren't implemented yet.
And atoms are built-in links.
 
What would examples of other hypers look like?
 
x dyad<hyper> -> x dyad x, for example.
The distinction between hypers and overs might go away in the future. I'm not sure why I thought I'd need it.
The parser is a big mess anyway.
 
3:15 AM
#jellybestlanguage
 
 
14 hours later…
5:26 PM
L should give 1 on scalars.
 
5:45 PM
Yes, all links of positive depth should not distinguish between scalars and singleton lists. I'll rewrite monadic_link and dyadic_link for this purpose, rather than modifying the atoms themselves.
 
 
1 hour later…
6:46 PM
I can see how the left-to-right parsing is useful; it makes f G h do (x f Gx) h x, which seems more useful than x f G(x h x).
 
Well, for right-to-left, I'd certainly have to modify how trains are parsed.
I mainly went for ltr because that's usually more useful for / and \, and you almost always have to swap the argument order of operators like ÷.
 
 
1 hour later…
7:55 PM
Are you making any distinction between multidimensional and nested arrays?
 
Not right now, but that's one of the things I'm sure sure how to handle yet.
 
 
2 hours later…
9:36 PM
I'm currently uncertain whether I should implement additional functions as two-byte tokens (as CJam does) or function families (like APL's ).
Both seem to have advantages and disadvantages.
 
@Dennis By function families do you mean like how a dyadic operator in APL corresponds to different functions based on the left input?
 
Yes, those. It would mean that I can get only 10 extra functions in two bytes, but it also means I can choose dynamically which of the functions I want.
In contrast, a two-byte identifier would be static, but add around 200 new functions.
 
What do you mean by static versus dynamic in this case?
 
With , I can use the return value of another function to decide whether I want to take the sine or cosine of another argument, e.g.
With ms and mc, I need a conditional.
 
Mmm yeah, good point. And then the disadvantage is that you get fewer possible functions?
 
9:46 PM
No, I get infinite possible functions, but only 10 of them in two bytes.
 
Oh right
 
p8675307 is always a possibility, but not very golfy.
 
Haha yeah. You could also have multiple function families using different characters, e.g. t for trig functions and p for probability functions.
 
And one for number theory, I guess.
(The one I'm currently working on.)
@AlexA. I think I'll stick with two-character tokens. I won't be able to use function families with the dyadic joint.
 
Oh yeah, good point.
 

  last day (1265 days later) »