« first day (1775 days earlier)   

02:10
question: how do you refer to the top of the stack in an if conditional?
say I wanted to check if the top of the stack is equal to 1?
you'd need to duplicate it using :
because the if condition will pop the top of the stack
ohhh
wait so would a code like 4+:100%0=[|,} add four, then check if not divisible by 100, then print if not
yes
this is really cool
however, you'd more likely print if divisible
+ you'd use the built-in does this number divide the other element too
02:13
how would you do two statements at the same time
100%0=400%0!=
or something?
depends on what you prefer
there's a few ways
but my choice would be:
(give me a tick to write it)
∥100≛⑵400≛¬∧
um
:100≛$400≛¬∧
uhh
how does that work
the second one is simpler
literally dup, check for divisibility by 100, swap, check for non-divisibility by 400, logical and
02:16
wait so what is ≛
the weird equal thingy
x divides y?
oh
4 mins ago, by lyxal
+ you'd use the built-in does this number divide the other element too
and ¬ is logical not
correct
∥100≛⑵400≛¬∧ is more fun though
it uses modifiers
02:17
so duplicate, check if divisible by 100, check if not divisible by 400, and both conditions
what does the $ do?
swaps the top two values
1 2 $ reorders the stack to have 1 on top
why is that needed? is it because the first comparison adds to the stack?
correct
after :100≛, the result of the check is on the top
if you 400≛¬ without swapping, you're operating on the result of the check
woah
not the number you want to check
02:19
makes sense
so 400 weird equal sign automatically operates on the top
wait no everything just automatically operates on the top
correct
that's how the stack works
things are always popped from the top
@Redz 400 divides? if you prefer literate mode
code.golf aint literate mode :P
but that makes sense
you can convert literate to sbcs on the online interpreter :p
yeah but that's the easy way
ignore the fact school blocks the online interpreter
oh dang
school never blocked code golf stuff for me :p
02:23
this is. the coolest language I have ever seen
no school blocks github pages in general weirdly
@Redz array languages are like that :p
can probably get around it with enough time though
@Redz I don't think it ever blocked it for me
must be different blocks
thankfully it doesn't block github in general
 
7 hours later…
09:33
hey uh, how do i get the first n of an infinite list?
like i can use i to get one of the items but i don't really see how to get many
 
1 hour later…
10:42
@Themoonisacheese would it not just be take?
yeah
i guess adding "first n" or something like that to the list of aliases wouldn't hurt
11:20
well thanks it enabled me to make this codegolf.stackexchange.com/a/278381/88192
 
2 hours later…
13:18
what's the recursion limit?
because Vyxal 3, 30 bytes: #[4#]λ1|:e#⍰2∻⑵3×›¥›£1≠#⍰x¥}M Vyxal It Online!fails with n>3 and that's quite low imo
(it's also like, wrong, so maybe it's recursing much more than i think)
@Themoonisacheese 100
i mean that's low but i shouldn't be hitting it
also the error isn't the standard "too much recursion" error, it's actually the scala too much recursion error
wish it'd say what was recursing too much :p
13:35
!!/status
@Ginger I am doing online dating. Man, there are a lot of weirdos out there. I'm proud to be one of them.
based
@lyxal [RubenVerg] hey they invented debuggers for a reason
Doesn't mean the error has to not specify which scala thing is being called too many times
:p
guess I don't have to do unified versions anymore since there aren't going to be any more versions :3c
but I feel like theseus still has potential... alternative RTO frontend, maybe? :p
13:48
@Ginger yeah i thought about that yesterday
guess you're now compatible with all future versions
14:16
i give up on implementing collatz stopping time
i understand why i hit the recursion limit (next 2 as lambda is a bad idea if one of the 2 is recurse) but even a thing that should be strightforwards fights me
my minimal example is Vyxal 3, 17 bytes: :1#{≠|:e#⍰½⑵3×›x} Vyxal It Online!
and i cannot for the life of me understand why it's stopping at 31 of all places
shouldn't all results be 1?
 
1 hour later…
15:48
The best solution I'm able to find currently is 21: 0${:1>|$›$:e#⍰½⑵3×›}$ Vyxal It Online!
@Themoonisacheese I will try to see if your code can be fixed
@WeirdGlyphs fyi $[element]$ is always equivalent to ⎇[element]
i guess that works but i was trying to avoid putting something else on the stack and use registers
@Themoonisacheese Nice then :) Still discovering how all of this works, so it's possible for me to miss obvious solutions
no worries that's how you learn
good news the languages spec is now stable :D
I can at least replace 1> with decrementing the value
16:05
tbh you're better at this than i am
@lyxal worst part is that i had used it literally yesterday on code.golf
16:18
The only problem with your previous code seems to be the #⍰ condition. If you use an elif statement, it works, but it doesn't otherwise, idk why
 
1 hour later…
17:40
[Themoonisacheese] that's so weird though, you use the same thing

« first day (1775 days earlier)