« first day (315 days earlier)      last day (949 days later) » 

12:40 AM
def nfind(links, args):
    larg, rarg = args
    larg_iterable = type(larg) in (list, str)
    i = 0 if larg_iterable else larg
    matches = variadic_link(links[1], args) if len(links) == 2 else last_input()
    found = []
    while len(found) < matches:
        try:
            cur_larg = larg[i] if larg_iterable else i
        except IndexError:
            break
        if variadic_link(links[0], (cur_larg, rarg)):
            found.append(cur_larg)
        i += 1
    return found
 
1 message moved from The Nineteenth Byte
 
^ quick example:
C:\Jelly\jelly-master>python jelly -eu ØWOÆP$500#
CGIOSYaegkmq5
C:\Jelly\jelly-master>python jelly -eu ØWOÆP$5#
CGIOS
 
 
4 hours later…
4:58 AM
Update:
def nfind(links, args):
	larg, rarg = args
	larg_iterable = type(larg) == list
	i = 0 if larg_iterable else larg
	matches = variadic_link(links[1], args) if len(links) == 2 else last_input()
	found = []
	while len(found) < matches:
		try:
			cur_larg = larg[i] if larg_iterable else i
		except IndexError:
			break
		if variadic_link(links[0], (cur_larg, rarg)):
			found.append(cur_larg)
		i += 1
	return found
 
Nevermind.
 
5:33 AM
def add(x, y):
    if isinstance(x, str) and isinstance(y, int):
        return chr(ord(x) + y)
    elif isinstance(x, int) and isinstance(y, str):
        return chr(x + ord(y))
    elif isinstance(x, str) and isinstance(y, str):
        return ord(x) + ord(y)
    else:
        return x + y


def sub(x, y):
    if isinstance(x, str) and isinstance(y, int):
        return chr(ord(x) - y)
    elif isinstance(x, int) and isinstance(y, str):
        return chr(x - ord(y))
    elif isinstance(x, str) and isinstance(y, str):
This should work but you'd need to manually change all functions and patch(lambda) for every arithmetic lambda that treats chars as ints
 
5:49 AM
Yeah... There's probably a better way.
Gnumber would solve all these problems.
 
6:11 AM
Maybe have two keyword args, call and nopatch_call, and automaticallly patch call?
 
 
8 hours later…
2:07 PM
Sooo, I’ve been thinking about the code page
Last I heard the idea was to make bytes correspond to multiple glyphs — the way 0x7F is already both a newline and .
I guess thinking of more aliases like that would be nifty. There are lots of glyphs I’d like to see get more (symbolically) descriptive synonyms
The neat thing is this keeps backwards compatibility, and we can fiddle with the remaining (unassigned) glyphs — we probably don’t need that many nilads. (Some of the Ø_ nilads could have been 1-byte, I think, but it’s too late to reassign them, and synonyms would be silly, maybe?)
 
2:37 PM
@Lynn I'm fine with overloading bytes that currently do not correspond to an atom or quick (mainly that whole bunch of unassigned nilads), but doing so for others will just make the language unreadable.
I've actually considered synonyms. There are a few atoms and quicks (e.g., ÆP and Ðf) that should probably be one-byters.
 
 
1 hour later…
3:44 PM
С seems common too
 
4:15 PM
Yeah.
At least one of ÐL, ÐĿ and DḶ should probably be one bytes as well. Not sure which though.
 

« first day (315 days earlier)      last day (949 days later) »