« first day (4092 days earlier)      last day (596 days later) » 
00:00 - 09:0009:00 - 00:00

12:00 AM
i can try and teach flobnar or bitcycle
ROs should really be able to edit messages (or at least their own) without a timeout
Yep, like 30s too late :/
Not what I meant, SE
SE chat is being weird
huh, it might be a glitch on my end but i see that bitcycle has the same amount of upvotes as tinylisp and flobnar?
12:01 AM
@RadvylfPrograms Honestly, even the ability to edit pinned messages would be great
@AidenChow Nope, they're now equal
Yeah. I wonder if there's a proposal on MM for just pinned messages, that's something they might be more willing to change and I can't imagine it'd take more than changing two lines of code
The vote counts were accurate at time of my posting of the pinned message, no guarantees for the future :P
But, it looks like we should choose from Flobnar, Tinylisp or Bitcycle
Idk why, but The University of Law seems like such a basic name for a university that is has to be a scam :P
I have an obscene amount of rep from that thing a while back where we proposed changes or whatever
I got like 2k from it IIRC
Honestly, I stand by this:
Q: Appoint chat moderators exclusively responsible for moderating chat

MithicalCurrently, the way that chat moderation is set up, it relies heavily on site moderators moderating chat in addition to their main Q&A site. Moderators have some pretty powerful tools (freezing rooms, suspensions), and rooms also have a first line of defense in the form of room owners, who have sm...

Mainly because of how easy it is to create rooms and become an RO, it seems like there should be some level between "general RO" and "mod" - be that either a "chat mod" or something like a "main room RO"
12:09 AM
yesterday, by allxy
frick differential equations
differential equations are good, right up until they get stupid complicated
@cairdcoinheringaahing i agree. especially since all of the conditions we have for being elected are based on our ability to moderate content on the sites and manage the community
and none of them have to do with moderating a chat lmao
And I've forgotten how to get d^2 y/dx^2 again...
  const startEl = $('#debug-start');
  const stepEl = $('#debug-step');
  const resetEl = $('#debug-reset');
  const inputEl = $('#debug-input');
  const outputEl = $('#debug-output');
  const stackEl = $('#debug-stack');
  const statusEl = $('#debug-status');
  const dpEl = $('#debug-dp');
  const ccEl = $('#debug-cc');
  const cmdEl = $('#debug-cmd');
Is this for piet
12:16 AM
a typical webapp with lots of controlled parts :/
A: Derivative of a differential equation

Robert LewisI believe $y$ is to be understood as a function of $x$; thus by the chain rule $(y^2)' = \dfrac{d(y^2)}{dy} \dfrac{dy}{dx} = 2y \dfrac{dy}{dx} = 2yy'; \tag 1$ therefore, $y'' = 2x - (y^2)' = 2x - 2yy. \tag 2$

@allxy Get dy/dx, then square it
wait am i being dumb or are you just joking
I am caird, not joking
But I am making a joke
you're not making a joke, you're caird
12:19 AM
oh shit, I got played
so has there been no decision on the LYAL front yet? I believe the event officially started 20 minutes ago
No, you got cairded
@des54321 Nope
Oh wait yes
oh which one?
Dammit daylight savings, I'm so used to being in UTC+13
@des54321 Nope, but we're pretty flexible about it. We generally let it run for 24 hours after decided, so there's no rush
if people have a preference, lemme know, and I'll pin a message for it
12:22 AM
i am personally leaning towards tinylisp cuz it looks simple to learn =P
+0.1 to tinylisp
@DLosc Are you around to help wit tinylisp?
Sounds good then
yeah, ill put my 2 cents in for tinylisp, ive always wanted to figure out wtf lisp has going on and it seems a good place to start
12:23 AM
@Steffan RGS is still active in the apl chat

 The APL Orchard

apl.chat ― Learn, teach, ask, code, golf, & discuss usage. See ...
All right, let me get some resource links together
Welcome to the seventeenth Learn You A Lang for Great Good! Today, we'll be learning tinylisp, a minimal Lisp dialect. Feel free to ask @DLosc if you have any questions. During the event, feel free to post CMCs to practice tinylisp (TMCs), ask questions about the language, and so on.
@DLosc When you do, ping me and I'll pin them :)
Also, as an aside, I'm really happy that this has reached it's 17th LYAL :P I was expecting like 10 or so max languages for this event, and I'm really happy that we managed to establish this for so long :D Same applies for BMG as well, even if we had a bit of a hiccupt in the middle
i think cause it's much more casual than say lotm
Resources for tinylisp: TIO | GitHub | Tips | LotM post | Ungolfer | Syntax highlighter
I've made a quick read-through of the tinylisp github so far, and it definitely seems an interesting lang
12:28 AM
@cairdcoinheringaahing BMGn't afaict
Do y'all want me to give a language rundown here, or just answer questions as they come up?
@JoKing Yeah, I can see why its popular, but we've had a lot of difficulty in keeping chat events going throughout the site, and this appears to be the most successful of all that I'm aware of
@DLosc basic rundown of the lang plz, i suck at reading docs lol
@allxy Yeah, BMG has kinda died, but it reached 20 officially scheduled events, and at this point, I'm happy to let it be "if people are around for some CMC solving, BMG is an excuse to do so" :P
I guess ¯\_(ツ)_/¯
12:31 AM
Okay, so the first thing to know about tinylisp is that every expression (apart from the most basic things like integer literals) is a function call. Function call syntax is a bit different from C-like languages: instead of fn(arg1, arg2), it's (fn arg1 arg2).
TinyMC: Given two inputs, output their sum
are functions the "default" way to take input in tinylisp
In fact, there is no way to take input from stdin or command-line arguments, so any solution that takes input has to be a function.
@allxy To be completely honest, I always expected any chat events to die out eventually (cause everything does eventually), and the length of BMG before it died was more than I expected :P
I guess, yeah
12:33 AM
Most tinylisp builtins are single letters. For instance, s is the subtraction builtin. (s 10 4) takes 10 minus 4: Try it online!
I think the longest running repeated event that we've ever done is Best Of, and that's once a year, which is much easier than once a fortnight, or once a month
I'ma half pay attention to this while trying to get scrolling/zooming working for canvas
LOTM is the longest running by "number of times it's run", and even that had an 18 month break in the middle
@cairdcoinheringaahing (d add(q((x y)(a x y))))
how do i actually define a function
like my own function
12:35 AM
this seems to be the shortest I can get it, I dont think I quite wrap my head around why q is necessary to define a function
@AidenChow the d command takes two arguments, a name and an anonymous function, and defines that name to evaluate to that function
Besides integers, tinylisp has lists. To create a list literal, you surround the elements of the list in parentheses and then quote it with q. For example, a list containing 1, 2, and 3 is (q (1 2 3)). Try it online!
@des54321 If you don't, then tinylisp will attempt to evaluate the function body before defining it to the function (I believe)
for example (d foo 42) defines foo as a very simplistic function that always evaluates to 42
You have to quote the list because otherwise, tinylisp thinks it's a function call. (1 2 3) tries to call the function 1 with the arguments 2 and 3, which doesn't work b/c 1 is not a function. Try it online!
actual functions are a list with two elements, the args and the actual body
12:37 AM
Tho I think (d p a) should work for an addition function?
@cairdcoinheringaahing 17 bytes? i assume anonymous functions are fine
TinyMC: given a number n, output 1...n
Like @des54321 said, user-defined functions in tinylisp are just lists that match a certain pattern. As we saw before, they have to be quoted when you enter them. (q ((x) (s x 2))) is a function that takes one argument x and returns x minus 2. Try it online!
@DLosc This may be because I'm used to golfing languages, but I'd expect (1 2 3) to just always return 1 :P
@cairdcoinheringaahing There'd be a good argument for that if 1 were defined as a constant function, but integers aren't functions in tinylisp
12:41 AM
is recursion supported in tinylisp
@DLosc Booo, everything should be a function ;)
@AidenChow Yes, and it's the only way to loop. If you give the function a name with d, you can call it from within itself recursively.
oh dear matching parentheses in this is already impossible
church encoding where
@des54321 I suggest pasting your code into the syntax highlighter--it's very helpful.
@UnrelatedString this ain't unlambda ;)
12:44 AM
Am I misremembering, or does tinylisp have a "super" closing bracket?
okay why does this (d F(n) (i n(disp(h n (F(s n 1)))))) not work for allxy's TinyMC
@cairdcoinheringaahing Sort of. If you write all your functions as one-liners, you can leave all the closing parens off at the end of each line.
@des54321 That's not how you define functions afaik
wait i think i know what im doing wrong
isn't there a ] you can do to close all currently open brackets
12:45 AM
oh im doing several things wrong
@hyper-neutrino That's picolisp
ah right
@des54321 You don't use F(n)
i remember there was a challenge on this at some point lol
@hyper-neutrino Same :P
12:45 AM
yeah im missing all kinds of parentheses everywhere
also i did copypaste the wrong thing im sure i had (d F((n) (i n(disp(h n (F(s n 1))))))
@des54321 That's closer, but now you need to quote the function: (d F (q ((n) (i n...
yeah i have the quote, im almost there
As fun as this is, I have a train to catch in 8 hours, so o/
TinyMC: Given n, return 1...n as a list
12:48 AM
@allxy that should be easier, i feel like half my problems are irritatingness caused by extra parens from disp
Lists in tinylisp consist of a head (first element) and a tail (list of remaining elements). The empty list is also called nil; it can be written as (), and you don't need to quote it.
To get the head of a list, use the h builtin; to get the tail of a list, use the t builtin; to put an element on the front of a list, use the c (cons) builtin. Try it online!
The way I'd write recursive range in JS is r = v => v?[...r(v - 1), v]:[]
But because of the way c works that's infeasible
TinyMC: Deep flatten
The i builtin is a short-circuiting conditional. It takes a conditional expression, an expression to evaluate if truthy, and an expression to evaluate if falsey. Falsey is 0 and (); everything else is truthy. Try it online!
TinyMC: Tail
@allxy For flatten, you'll want either the type builtin or one of the ideas from this tip
12:57 AM
okay i legitimately dont understand why this (d F(q( (n)( (i n (c n (F (s n 1))) 1) )))) doesnt work for producing a range (It should produce a range backwards, [n....1] instead of [1...n], but it doesnt)
@allxy 39 bytes. Writing in this feels very pure and very cursed
@des54321 You've got an extra layer of parentheses. Delete the paren before i and one from the end.
@allxy tail as in last element ?
@DLosc there we go, ty
12:59 AM
@allxy (Which is different from tail in tinylisp terminology)
oh ok, cuz the builtin tail does smth different
@DLosc Oh yeah, true
Sandbox posts last active a week ago: Draw my shower curtain, Wordle but Harder
@allxy Very nice. (And yes, that's a pretty good description. I'd say 80% pure, 20% cursed, but that's just my opinion.)
TinyMC: Remove the last item
1:03 AM
@allxy technically not right but 31 bytes outputs a backwards range
@des54321 tf does (i n ...) do, i thought it was supposed to be a condition there????
@des54321 Delete the 1 from the end and it'll be technically right and save a byte ;)
@allxy 34 bytes
@AidenChow (i x foo bar) evaluates and returns foo if x is truthy, otherwise evals and returns bar
@des54321 Also you can just write (F 3) in the footer: top-level expressions are automatically disp'ed
1:06 AM
@DLosc okay why the hell does that still work output correctly i thought i tried it and it missed the last 1
shouldnt that output (n...2,())?
Okay, I've figured out how to join lists
@des54321 Ah. No, because if you cons a value to the empty list, you get a list containing the value, not a list containing the value and the empty list.
@DLosc ooooH, of course
So you want the base case of the recursion to return empty list, and then each recursive case conses another number to the result of the recursive call.
A very common pattern in tinylisp.
im currently trying to figure out a proper range, and i thought I had an idea, but its 9 pm in my time zone and the idea has left my brain
1:11 AM
This is the golfiest approach, and it's what I would write in a code-golf solution. However, note that it doesn't use tail recursion, so if you pass it too large of a list, it will hit the recursion limit.
Try it online: https://tio.run/##HdVLjmRFEETRrdgwe/bczN5vB70PGNASQiAYwOqb6zUqleT1yXsiPP758cd/v//4@8@fPz@/6vvnr8/n32@fH59/xJdfPr/tl@9f33379vn5@S4mRlZUnbp069GrOTSjsSaaak7Npbk1j@aVD5mfsRy58ilf8i0/8qscyij8yihVTuVSbuVRXvVQR7XKX6x6qpd6q4/66jx0jk7rjE7@oVPnpfPW@eh8dR26Rpd1RVd18f9eum5dj65X96F7dFt3dFf3qZuPc@t@dL96Dj2jx3qip3pOPZcePu2j59V76B291hu91XvqvfTeeomxNchx0OMgyEGRgyQHTQ6iHFQ5yHIw95WNuQ235Tbdtt
How does tail call?
oh i love the Error: recursion depth exceeded. How could you forget to use tail calls?! error
(Also, can't you just go sys.set_recursion_limit or whatever?)
Bonus challenge: Write a properly tail-recursive function that removes the last item of a list.
very few programming languages throw errors that judgemental
1:13 AM
@allxy I mean yes, but you're still setting it to a finite value. With tail recursion, you can handle arbitrarily large lists because it basically treats the recursion as a loop behind the scenes.
I don't really understand tail calls :P
Tail recursion is when you return the result of the recursive call directly, without doing anything to the value first. So in your function, since you're passing the result of the recursive call to c before returning it, it's not tail recursion.
Converting to a tail-recursive function usually requires you to pass another parameter, an accumulator that stores intermediate values. Then, as the base case, you return the accumulator.
so i guess the shortest way to get, say, the second item in a list is just (h(t foo)) if your list is foo?
@DLosc Can I have an example? How would I rewrite this to be tail recursive?
Oh wait never mind that already is right?
How would I rewrite this to be tail recursive?
1:19 AM
@allxy Yeah, that one is. I'm working on an example...
how to print without a newline ?
Not possible, sorry :/
oh rip
There are some complicated ways to work around that using string conversion builtins, depending on what you're trying to do
Here's a non-tail-recursive function that gets the length of a list: Try it online!
1:21 AM
And here's a tail-recursive version that uses an extra argument as an accumulator: Try it online!
The bad news is that you have to pass 0 as an extra argument. The good news is that you can define a second function that does that for you: Try it online!
@AidenChow Yeah, that one's not possible in tinylisp unless you accept newlines between the letters.
@allxy Does ^^^ help?
Yep, thanks
this concatenation fuunction would be tail-recursive if the implementation of H was, right?
man im so bad at recursion lol, ive always used loops instead, ig this lang will help me become better at using recursion hopefully :P
how would i take the sum of a list of nums, im so confused trying to figure that out
why does this (not very golfed) attempt at a proper range say wrong number of args for d: (d R(q ((high low) (i(l high low)()(c low (R(a low 1))))))
Ooh, if I did it right, the integral of ln(n)/n is really fun
I got to be a wizard
@allxy I think so, yeah
@AidenChow You can start with a non-tail-recursion version--it's easier to think about. If you're just processing the first number in the list, what do you need to do with it? And how can you combine it with the sum of the rest of the list to get a final answer?
@des54321 The only thing wrong with that code is that there's one parenthesis missing from the end. So that error message comes from combining the definition with whatever you've written after it in TIO.
1:36 AM
@AidenChow I was the same way, but once I started to force myself to use recursion it just...clicked. Same thing'll probably happen for you
I figured out there was a missing parenthesis by using the highlighter, which adds missing parentheses in gray.
@DLosc oh good, im not totally crazy, just bad at parentheses
i couldve sworn i threw it in the highlighter already but maybe not
I guess I shouldn't say "the only thing wrong"--I haven't actually verified that it works. :P But the reason for the "wrong number of arguments" error is what I mentioned.
proper range function, 55 bytes
1:38 AM
i was also missing an argument on the recursive call
wait actually 38 bytes, i forgot to shorten my variable names back down
@AidenChow Here you go (tail recursive)
@allxy whats with the 0 after the list
I am rather irritated that several of the names I would commonly use for variables are already used (a,c,i)
@des54321 I usually use uppercase letters
^ or x, y
1:40 AM
yeah thats what I did, seemed less annoying than picking arbitrary letters
@AidenChow Required for tail recursion, you can write a wrapper
It makes it easier to distinguish what's a builtin and what's a variable
was gonna use h and l for high and low, but those are both already taken
Fun fact: in tinylisp, anything that's not parentheses, whitespace, or an integer is fair game as a variable name. So you could use [ and ] if you wanted.
i assume there's no tokenization advantage to be gained?
1:43 AM
@DLosc oh god does it parse unicode?
@UnrelatedString No, sadly
I'm having a lot of trouble trying to do tail-recursive remove tail
@des54321 Probably--try it and find out
@allxy Hint: first try writing a function that reverses the list.
Was doing that already lol
im trying to do codegolf.stackexchange.com/questions/245992/… in tinylisp cuz it is a very simple problem, then realized that idek the first step to solving this lol (like how to do vectorized subtraction, or im i just dumb -_-)
1:46 AM
okay shouldnt (d X 42) define X to be 42? the github page says it should
does that somehow need a q or something?
@DLosc Waiit... the only way I can find to tail-recursively reverse involves removing tail.
@AidenChow Nothing vectorizes by default in tinylisp, so you'll have to think lower-level than that. TBH, I wonder if the shortest approach is just to write a function that takes five arguments and don't use lists at all.
@allxy just use an accumulator
@des54321 Yes--what problem are you running into?
1:47 AM
oh yeah maybe i should actually try this lmao
@des54321 (X) tries to call X as a function with no arguments. If you want the value of X, just use X: Try it online!
oh it seems that it was just the (X) that I thought would output X
yep it parses unicode, you can make all your variables emojis
@des54321 Or, you could define X as a function that always returns 42: Try it online! ;)
Alright, managed to write tail-recursive remove tail: Try it online!
Gosh that took a while...
how do i add more than one number together, do i seriously have to do (a A (a B (a C ...)))
1:51 AM
I was having trouble because the approach I was using reversed the list
@AidenChow Yep
Oof lol, that's clever
@allxy You can save a few bytes by replacing _H with a straight-up reverse-list function: Try it online!
think of fp linked lists like stacks ;)
1:55 AM
Oh I'm stupid
@UnrelatedString That's clever :P
Oh god... I can use a ZWJ as a variable name
TinyMC: Given two lists that are the same length, interleave their elements. (F (q (1 2 3)) (q (4 5 6))) should output (1 4 2 5 3 6).
Answers in two categories: non-tail-recursive and tail-recursive
@DLosc so zip(), but flattened
@DLosc 46 (non-tail-recursive)
tmc: convert binary to decimal. take input as list of bits
2:05 AM
@allxy Very good (and you don't need the trailing parens in the footer as long as all your top-level expressions are single-line expressions). A little out-of-the-box thinking can lead to a 35-byte solution, tho. ;)
Yep, that's what I had
@DLosc 51 bytes is my solution
actually 46, and i think the same as allxy's, trimming trailing parens
See if you can find the 35-byter
2:12 AM
@allxy OH i just looked at that one, very clever solution
now to do tail-recursive :)
@UnrelatedString :| 99
try putting A first
2:25 AM
@UnrelatedString Oh, very nice. Mine was 97, essentially the same thing but without the 1-byte savings from rearranging the order of arguments.
yeah it felt wrong to arrange them that way but i realized there was whitespace to remove :P
And it's not even tail recursive
TinyMC: factorial
@allxy I'm 99% sure that can be a lot shorter... hmm
2:33 AM
Yeah, definitely. I've really wrote it Lisp-style - everything builds on everything else
I kinda want to make a tinylisp golfing library
The guilty secret of tinylisp golf is that there is a library, which (though it's not optimized for golf) can often be golfier than implementing everything yourself from scratch.
TIL try pressing escape on TIO
TinyMC: nth hyperoperation
@allxy 62
@AidenChow tail-recursive 57 (not entirely sure non-tail-recursive would be shorter)
@allxy I've got 101 bytes
2:48 AM
what does R do?
For mine, T gets the last, H gets all but the last, J concatenates two lists
or specifically reverse-onto since it takes an accumulator
Part of what motivated me to write the library was just how often you need a reverse function when doing almost anything with lists.
Also yeah that ^^
My approach to deep flatten was "until all ints, shallow flatten"
2:53 AM
Mine was "flatten head, flatten tail, and concatenate the two results" (where flattening an int means wrapping it in a list)
TinyMC: Given a list and a function, left-fold the list on the function. Assume the function can take two arguments and the list will never be empty.
Unless my understand of TinyLisp so far is inaccurate, it seems to me that a proper Hello World program (which outputs "Hello World!" exactly) is actually impossible
not counting anything in the library that might do it, that is
@des54321 Based on everything mentioned here so far, you're right. But that's because we haven't talked about string builtins yet.
chars converts a name/string to a list of codepoints, and string converts a list of codepoints to a string. Try it online!
So Hello, World! is possible, as long as you allow a trailing newline: Try it online!
I wanted to try something like this but of course that doesnt work, because string wont flatten the list
oh imagine if this had the python unpacking operator with *
3:11 AM
tmc: check whether a certain value is contained in a list
why do I always forget you need to put parens inside of q as well
@AidenChow 44 bytes
alright i think i have officially gotten hooked on lisp
in tinylisp and Appleseed, Feb 5 at 2:26, by Razetime
lisp is a helluva drug
i am not quite to the xkcd 224 level of lisp epiphany yet, but i think i can feel it coming
@des54321 Here's 40 bytes by rearranging the order of the conditionals
3:27 AM
@des54321 wow nice, this was basically what i wrote but i took 30 minutes to write it out (cuz im bad at recursion -_-) but i think u can take out the space after the first i?
ain't it suspicious how my Vyxal answers always get upvoted
@DLosc oh good one! I'm still definitely getting the hang of that part of golfing this lang
is there any randomization in tinylisp
scrolling quickly through some of the library files on github it seems no
@AidenChow No. It is (nearly) a pure functional language, and I don't know whatever wizardry Haskell uses to be pure functional and also do stuff like randomness.
Nov 30, 2021 at 10:57, by emanresu A
@lyxal Kinda sus
3:41 AM
@DLosc I suppose its based on the fact that its only pseudorandom, so given a set seed it is just mathematical functions applied to that seed
Randomness in Haskell is available as a monad, as it carries a random state that changes on each random number generation
But then you have to seed it before using it?
You create a randomstate object first, and then query random numbers on that
so basically yes
and usually you seed it from io
^^ according to the doc i just googled up, you create an object with the seed, and getting each next value from that seed also returns an updated version of that object
typical haskell nonsense
3:44 AM
A simpler alternative is to have a global infinite stream of random numbers at runtime
@des54321 Well, it makes a ton of sense to me, so...
it might make sense, that doesnt mean its not nonsense
That's basically a more transparent version of what you get from e.g. srand() and rand() in C
The "return an updated version" part makes sense to me, I'm just still trying to wrap my head around how a program in a pure functional language can take no arguments/input and yet output different things each time it's run.
@DLosc well it doesnt, because if it doesnt take any inputs for seeding it differently, it will always get seeded to the same value
therefore always producing the same output
you basically have a pure function of its inputs plus an rng state
3:54 AM
Any last tinylisp questions before I leave for the night?
Since there's no sleep function in tinylisp, you can't sleep, right?
I have to exit tinylisp in order to sleep ;)
(d L(q((x)(L 1))))(L 1)
thats more of a coma than a sleep
(d L(q(_(L
4:03 AM
interestingly the same length as your (slightly different) tinylisp solution to the shortest infinite loop producing no output challenge
I was just looking that up X^D
tmc: implement mod (e.g. (f 14 5) -> 4)
inputs both guaranteed positive
Good night, happy lisping! o/
4:09 AM
i have 32 bytes for mod could probably be shorter tho
im certainly not much more of an expert than you, but that does look like a pretty golfed solution
4:32 AM
tmc: fizzbuzz from 1 to 100
i think in this current LYAL we are decidedly proving xkcd 297 to be accurate, the knowledge of lisp shall never truly die
ooh tinylisp
man I do wish the tinylisp TIO actually told you WHERE errors were occurring
TIL top in JS
how do i print stuff in tl?
4:43 AM
(disp foo) will print foo
although the result of all top level statements is also printed
e.g. (a 2 3) implicitly prints 5 if its a toplevel statement
^ first tl program :)
heres my attempt at a tinylisp solution to this challenge, any golfing tips, given that its embarrassingly longer than common lisp?
@UnrelatedString i think that technically, d might specifically evaluate to nothing, so that nothing is printed?
as in actually nothing, not evaling to nil ()
it returns the name that was defined
i thought it might too but then i checked the docs
well (disp(d A 42)) outputs nothing
so why does using an if make it output A
4:52 AM
...wait yeah what
Q: Exploit attack affect on CIA triad

Ali SafiOn what basis does the exploit attack affect the security triangle? Confidentiality, Integrity, or Availability ? Thanks.

oh dear its too late at night in my time zone for me to try to dig through interpreter source code to figure out how it works
i retire now to bed, and possibly to dreams of nested parentheses
5:01 AM
i'll just leave a ping for when @DLosc gets back
5:13 AM
@allxy the cherry on top is the certificates tag
1 hour later…
im still confused as to what tail calls even are :P
98/100 on fanatic :D
7:04 AM
@AidenChow when the return value is the return value of a recursive call with nothing else "on top"
i.e. there's no information that needs to be kept from the calling stack frame except what was passed in
to the next call
one way of looking at optimized tail call recursion is it's basically an imperative while loop where you're setting new values for the arguments in place then going through the same code again
actually the optimization applies to non-recursive tail calls as well but it's not as important to actually think about
since you're not going to reach arbitrary stack depth without recursion lmao
@UnrelatedString is this one? dzaima.github.io/…
@UnrelatedString and this is the optimized version? dzaima.github.io/paste#0S0lNU0jTqNC04lJQKM/…
the optimization happens under the hood but i guess that's one way to approximate it
7:23 AM
@UnrelatedString but what if i have more than a thousand functions calling each other
hypothetically, asking for a friend
7:41 AM
@JoKing Assuming a remotely reasonable scenario, most functions would be calling only one other function and be called in only one other function, in which case inlining such functions would work pretty well
8:15 AM
in the k tree, 35 secs ago, by PyGamer0
and made a python version:
^ python boolean matrix to Braille
00:00 - 09:0009:00 - 00:00

« first day (4092 days earlier)      last day (596 days later) »