« first day (915 days earlier)      last day (349 days later) » 

3:38 AM
@Dennis Why does dyadic_chain have a call to create_chain while monadic_chain does chain = chain[0].chain? It seems like in the end they accomplish similar things but I might be lost here. Let me know if this question is not clear enough.
 
4:30 AM
@dylnan create_chain is only called in parse_code and some quicks, so I don't think I understand the entire question. chain = chain[0].chain is tail call optimization and only happens if not chain[1:].
 
Haha sorry, I'm realizing how unclear that question was now. Let me be more specific
Say we have the program + with args 1 and 2
In the first iteration of the while loop of dyadic_chain, chain[0] is a dict for a chain. i.e. hasattr(chain[0], 'chain') is true
So when we get brought to dyadic_link from this line, return link.call(larg, rarg) is evaluated, but link.call is create_chain
And this call to create_chain seems to be where the chain of the while loop in dyadic_chain changes from a chain dictionary to a list of dicts of links.
 
4:46 AM
I don't follow, but the only dicts in Jelly are attrdicts (links).
 
If I put print(chain) before the line I linked to above the following gets printed for me
[{'arity': 2, 'chain': [{'arity': 2, 'ldepth': 0, 'rdepth': 0, 'call': <built-in function add>}], 'call': <function create_chain.<locals>.<lambda> at 0x10ebf2268>}]
[{'arity': 2, 'ldepth': 0, 'rdepth': 0, 'call': <built-in function add>}]
Isn't the first line a singleton list with an attrdict?
 
The second one is the + atom. The first is the singleton chain consisting of +.
 
5:04 AM
Why doesn't dyadic_chain initially get passed with a list of attrdicts? The first time it is called its argument is [<attdict-for-chain>]
...instead of [<atom-1><atom-2>...]
I mean [<atom-1>,<atom-2>,...], sorry
 
 
8 hours later…
1:21 PM
@dylnan Because that's the way the chain separators are implemented. Each line is a chain of chains.
 
 
1 hour later…
2:47 PM
Ah, that makes sense. Just tried +µ+. Thanks for your help
 

« first day (915 days earlier)      last day (349 days later) »