Conversation started Dec 5, 2021 at 5:42.
Dec 5, 2021 05:42
^ @RedwolfPrograms is the atom / modifier list good enough?
cause now i will make the codepage (but first i will select glyphs for commands)
I think you need waaay more of both
This seems like a very bland GCD of a bunch of other languages
If you have so much focus on arrays of numbers, I really think you should specialize a bit more
I'd add a whole bunch of modifiers
@RedwolfPrograms like?
Count (where true), find, find index, find indices, zip, reduce variants (one with a starting value, one without), any, all
And that's just the bare minimum
Although I do love modifier-type commands, so you might not want as many as I'd add (which is like 40 or 60 :p)
@RedwolfPrograms wht is count where true?
[1, 2, 3, 4, 5, 6].count(x -> x % 2 == 1) would be 3, for example
Basically, filter then length
Actually, if 0 is falsy in your language, it doubles as any
So you can cheat and remove that one
Dec 5, 2021 05:51
@RedwolfPrograms no i am inspired by JS and 0 is truthy :P
jk
But...0 is falsy in JS
@RedwolfPrograms but [] isnt
but [] isn't 0
except it also is
where's that trinity diagram when you need it
Dec 5, 2021 05:56
@RedwolfPrograms so any is modifier (quick) or atom?
Those I listed were all modifiers
how is zip a modifier
what does zip do>
Take two arrays and a dyadic function
and?
map?
E.g., [1, 2, 3] zipped with [2, 4, 7] with the function + would be [3, 6, 10]
Dec 5, 2021 05:58
thats just vectorising
So's map by that logic
you can make it explicit for various purposes
What I'm mostly saying is that you should think about what you want your language to be good at, and come up with some less common atoms/modifiers that would be useful for your language. Right now your atoms and modifiers look like a pretty typical but short list, without anything that'll give it an advantage or any "personality" if that makes sense
depends on how your vectorization works by default ig but " is not as rare in jelly as you'd think
that's ''s job
The best way to find what atoms and modifiers your language needs is to use it
Try solving a few dozen problems
Dec 5, 2021 06:01
^
See what you find yourself repeating
Or what takes too many bytes, but feels somewhat common
and/or wishing you had, not using at all, etc.
pick a few challenges and write work in progress answers for them that you don't actually submit but just keep an eye on as you improve things
"Not using at all" is a good one, sacrificing less common operators is hard to do because of the "but what if I need it for this one scenario" feeling, but it's a risk vs. reward thing
Jelly's ° comes to mind
you can always just shove it on a digraph and then the one time it does come up it'll be like "holy shit i can't believe that's a builtin at all"
everyone wins
and yeah holy shit it's easy to forget jelly even has °
My starboard has no yellow for the first time in like a year lol
2
Dec 5, 2021 06:04
@lyxal Emailed yoou + pxeger the vyxaldev passwoord
honorable mention to having a shit ton of prime builtins but the only one that isn't a digraph is just the primality test
well actually it also is a digraph because backwards compatible aliasing
I like what Husk does to save on operator counts, combining boolean-returning functiond with non-boolean-returning ones (e.g., "is prime" with "where is this in the prime numbers sequence")
If it's Husk that does that
I might be thinking of a different one lol
yeah husk does that
tries to make everything return a meaningful integer instead of just a plain boolean
That's clever
(Time to add that to Vyxal)
in jelly's case it's often nice to have plain 0/1 for stuff like x and ¡ but it's still sort of an opportunity cost
Dec 5, 2021 06:09
@UnrelatedString I did that in Ash without even realizing
includes and some actually returned the count
ofc due to its syntax you also even get e not being usually redundant with i just because the arguments are in the opposite order
nice
 
Conversation ended Dec 5, 2021 at 6:10.