« first day (4413 days earlier)      last day (642 days later) » 
00:00 - 18:0019:00 - 00:00

12:26 AM
yeah i dug around there (admittedly not carefully)
12:46 AM
guys how do u detect if the stack is empty in piet
i want to print all the contents in the stack but im not sure how to stop it
or is it allowed for answers to not halt as long as they print out the right answer
19
Q: Do programs have to terminate?

Martin EnderThis is related to Sp3000's question earlier, but probably a separate issue: Are programs required to terminate, provided they print the desired output before entering an endless loop and can be proven to never print anything else in the future? As a fake example, consider the following "Hello,...

@AidenChow Apparently not
crap ok that makes things a bit more complicated
i was thinking to just have a forever loop that just prints
now i gotta think about how to stop once the stack is empty
Does Piet have negative numbers?
@RydwolfPrograms yes
If not, just putting zero on the bottom of the stack and incrementing things on the stack might work, depending on whether you have the opportunity to preprocess things on the stack
oh nvm then
12:55 AM
u can only modify the top element of the stack as well
well another issue with trying to increment everything is that u have to push 1 onto the stack so that u can add, but when using add with only one element on the stack it will just skip the add instruction and the 1 will be left on the stack
do you ppl have an opinion on this codegolf.meta.stackexchange.com/a/25520/108687
would that not be covered by existing program output standards
function submissions can't do global variable i/o, but program submissions don't even have a concept of global variable i/o
though the scratch example is interesting
similar idea with desmos tbh, right now the answers i have that use actions set some variable to the output, but even though the output is set to a variable, the output is actually displayed and u can see it without anything extra
1:10 AM
oh hey neat exactly 27000 rep
@lyxal nice!
@cairdcoinheringaahing where is old sandbox posts?
You'd have to ask @RydwolfPrograms, he keeps it running
There might not be any old sandbox posts today
1:13 AM
@UnrelatedString here's what i've been thinking: since scratch has procedures that can be called but can't return without modifying global variables, can that be considered the same
@RydwolfPrograms there hasn't been for weeks
iirc function standards make exceptions like that but good question
Though, I do think lyxal has a point: OSP was last seen 26 days ago
Oh nope it got borked by the same thing that killed VyxalBot
1:14 AM
Feb 2 at 1:00, by OldSandboxPosts
Sandbox posts last active a week ago: Optimize your score on a biased multiple choice test
@cairdcoinheringaahing that's precisely what I mean
SE made a minor format change to the fkey hidden field or something
i think we have to wait 48 days before reporting it missing
It killed the regex-based libraries but left NPSP 2.0's proper HTML parsing system working
1:15 AM
Oh wait no
This was a different change
The one where they just removed openid entirely
@JoKing It's not missing, it's right here :P
Lemme check how I fixed that for NPSP
I think I was able to just change the URL
Okay, I'll try and get on fixing it soon. No guarantees on speed if it's anything complicated tho, uni is kicking my ass with work atm
Sandbox posts last active a week ago: Ternary 2-input logic gate
1:18 AM
@OldSandboxPosts welcome back beep boop
If you want to update the repo just change openid.stackexchange.com/account/login to codegolf.stackexchange.com/users/login
It doesn't fix some of the methods OSP doesn't use, like the logout one, but chatbot.py's probably not a sustainable future solution anyway for other bots
y'all should switch to the sechat library
@RydwolfPrograms you dont parse html with regex???!!?!?!??!?!
@lyxal ... which is written in python
who likes python
I do
besides, OSP is already in python
it'd just be a library switch
ah i thought it was rust too
1:33 AM
12 mins ago, by Rydwolf Programs
It doesn't fix some of the methods OSP doesn't use, like the logout one, but chatbot.py's probably not a sustainable future solution anyway for other bots
who runs OSP?
caird wrote it, rydwolf hosts it
@UnrelatedString sadly, i simplified my code a bit too much. the actual test1 is x.y.z=<<c :(
1:42 AM
@lyxal #notsponsored :p
definitely no bias there :p
not like we're affiliated with the makers of sechat or anything
nup
no affiliation or other reason to promote a library that totally isn't core to operations of a certain chat room
14
Q: Salacious Bacon Tripod

lyxalIn a certain chatroom, we like making acronym jokes about the build tool we use called sbt. While it usually stands for "Scala Build Tool", we aim to come up with all sorts of meanings, such as: Stupid Brick Teeth Sussy Baka Training Shady Blue Tourists Seriously Big Toes Silly Bear Topics Salac...

1:50 AM
@lyxal please add the piet as a test case
piet doesn't start with a t now does it.
wait
I may be stupid
Slightly Better Tiet
I can't believe I did that
Somewhat Broken Trains
@lyxal o yeah
@Ginger I've added this one however
1:55 AM
> Keyboard entertains ginger
hmmmmm
@Ginger Me and the bois drinking from an improved udder
man the interpreter on the piet.bubbler.space is a bit glitchy, sometimes it run correctly and sometime it dont run correctly, idek whats happening lol, like piet is completely deterministic, how is my program returning to different thing on same input :((
@RydwolfPrograms ಠ _ ಠ
Yesss I got a wide gingerface
should i post my answer even tho the interpreter is being glitchy
1:57 AM
If you're sure the answer actually does work on a non-glitchy interpreter then sure
the interpreter does sometime give the intended output so idk
@AidenChow Can you try your program on a different interpreter?
@DLosc im not aware of another interpreter with permalink...
TIO has Piet, but you have to put in the program as a hexdump IIRC
i want to do ascii piet tho, not hexdump
1:59 AM
Just link to both
and also idek how to get hexdump :(((
One that has the right code and sometimes works and one that has the equivalent and always works
@AidenChow Store it as whatever format and xxd < piet-code.whatever
@AidenChow If you run ASCII-Piet, it has a hexdump output option
@DLosc wheres the link to ascii piet again?
2:02 AM
ok so how do i format my answer, do i have a tio link with hexdump and then another with bubbler piet?
TBH, the main thing is to make sure your code works. I'd say you don't necessarily have to include the TIO link in your answer.
Unless Bubbler's interpreter continues to have issues and you want to make sure other people can also easily see that your code works correctly
dude idk if my answer works, piet is weird af. all ik is that for every test case i test, it return the right answer sometimes on the bubbler interpreter
and many times it return the wrong answer
here just take a look at this : piet.bubbler.space/…
run the test cases multiple times and see what happen
@AidenChow I'm getting the same results each time
@DLosc wtf that means a bug on my end???
same
2:08 AM
are the results right??
@AidenChow What browser are you using, in case that makes a difference?
theres supposed to be a preceding zero btw
@DLosc chrome
@AidenChow Looks like they are
@AidenChow Hm, same
ok well ill just post it in that case...
thats so weird though
^ like just look at this, this is what i get half the time
@AidenChow works fine for me too
2:11 AM
ok welp my browser is just busted ig
do yall see this as the output, this is what i intended:
0100
---
01010
---
010011010010
yep
ayyyyyy nice that mean my answer is working
bruh how tf is my desmos answer and piet answer have the same byte count for number to binary
like whaaat
mind blown
@ParclyTaxel codegolf.stackexchange.com/questions/258397/number-to-binary/… this is my attempt at a piet answer to number to binary, definitely improvable tho (watch as bubbler destroys us with a 30 byte answer lmfao)
 
1 hour later…
3:42 AM
0
Q: Shortest Valid Parentheses

Aira ThunbergGiven a string of parentheses ( and ), find the length of the longest substring that forms a valid pair of parentheses. Valid pairs of parentheses are defined as the following: An empty string is a valid pair of parentheses. If s is a valid pair of parentheses, then (s) is also a valid pair of pa...

 
3 hours later…
6:35 AM
i think i just find a way to detect if a stack is empty in piet, and its surprisingly simple
dup, dup, minus, not, DP+
if the stack even has one item, then with these instructions the stack will be preserved with a 1 on the top of the stack, which the DP+, for example, can use to branch the code
but if the stack is empty all these instructions will fall through and nothing will happen
only one dup is needed if the top item in the stack is expendable
Imagine not having a stack length built-in
Isn't missing basic builtins the entire point of esolangs?
Maybe, but other stack langs have stack length
i wouldn't be surprised if a lot don't actually
7:10 AM
stack length would be so useful in piet lol
7:35 AM
Vyxal has stack length because it's a descendent of Keg, which itself takes that feature from ><>. The first example of a "stack length" command I can find is OGEL, made in 2006.
7:49 AM
@emanresuA da hell is ogel lol
See link I guess
8:04 AM
@emanresuA how you even find this, u use this lang before???
8:28 AM
@emanresuA I appreciate a esolang that has a convenient way to do syscalls
@AidenChow Searching "stack length" and similar on esolangs
forth seems to have had DEPTH since at least 1983
Stack length is kind of useless in a practlang unless you have a way to isolate separate stacks. Since it can't be used in functions. It's only useful for very short bits of code but can greatly simplify those
9:08 AM
@emanresuA that meme is very funny
9:28 AM
nice
CMM: Will ldq questions be off topic here once the other site becomes a thing?
3
No, we also get a lot of math questions despite math.se being a thing
i think it still stay on topic, its closely related to code golf after all
also guys i thought in haskell $ mean u can remove parentheses... so why this isnt working??? tio.run/##y0gszk7Nyfn/P03BwNaAK00hzzYvITc/…
That being said it would be advantageous for the new site to discuss there as much as possible
9:33 AM
but then i replace the $ with parentheses it works????
One does not simply understand Haskell
i must be misunderstanding smth wrong about haskell lol
like literally in the test suite in the footer the $ is working fine
but in the actual code i have to do f(n`div`2) not f$n`div`2
so confuse lol
like print $ f 4 works fine.... i dont have to do print (f 4)
im just gonna post this answer for now.... hopefully someone can explain this to me lol
(div probably has lower precedence than $)
shoot so the parentheses is required then?
thats kinda weird tho, i thought $ was supposed to modify the precedence of the thing after it
maybe i misunderstand it, haskell is weird af
Isn't $ just a function call op?
9:40 AM
idek anymore
Why does YouTube not allow <> (not even as &lt;&gt;!) in titles and descriptions‽ Surely, Google knows how to escape/sanitise/use entities! (People resort to using <> which is just going to give confusing results when viewers try to copy and paste code…)
ok well i post my answer... i hope someone with haskell experience can help golf the code
also i post an apl answer there too cuz why not, im watching patiently to see when adam or whoever gonna golf it down to smth absurd like 3 bytes lmfao
oh wait adam just post a msg above me... i dont even realize that lmfao
yo what if someone do bitcycle to convert number to binary... that would be cool
would be a pain tho cuz how u gonna divide in bitcycle...
@AidenChow Golf what?
@Adám theres a recent challenge call number to binary... im interested to see how golfy u can make it lol
in apl of course
i have a super naive solution {(⍵⍴2)⊤⍵} but u can 100% beat that
In vanilla Dyalog APL, you can do ⍴∘2⊤⊢
9:53 AM
wat da hell is that
theres an upside down t and a sideways t lmao
In my Extended Dyalog APL, it is indeed 3 bytes: -↑⊤ Try it online!
bruh what its actually 3 bytes... didnt expect that
maybe i should delete by 9 bytes answer after seeing this lol
i have no idea how either of these work anyways
I can explain.
im mainly confused on what the hell that sideways t is
and idek whats going on in the extended one
@Adám what's the shape needed for?
9:56 AM
@lyxal its needed for the encode i think
defines how long it is i think?
@AidenChow sideways T just returns the right argument
⍴∘2⊤⊢ is a fork; three functions f g h on an argument x is (f x)g(h x) exactly like in TMN where (f+g)(x) is f(x)+g(x). ⍴∘2 is 2 bound as fixed right argument to reshape. is an identity function. So my function is equivalent to {((⍴∘2)⍵)⊤(⊢⍵)} i.e. {(⍵⍴2)⊤⍵}
And yes, the left argument of needs a 2 for each little-endian bit.
dude i should delete my answer after seeing this... i knew my answer could be converted to a train but damn this is cool
The Extended function -↑⊤ relies on an extension of to be monadic and default to as many left-argument 2s as necessary to fully represent the (right) argument. However, we want specifically n trailing bits, so we negate the argument and take (from the rear) to pad on the left with 0s.
@AidenChow Nah, you can just edit with 9 and the new solution.
alrighty if u say so
10:01 AM
@Adám dang it just one byte shorter than the inverse decode solution
Inverse decode looks much nicer than having to reshape :p
Wait, I didn't actually look at the challenge. I just worked off Aiden's code as spec.
If all we have to do is convert to binary, then indeed it is ⊥⍣¯1 in vanilla Dyalog, or in Extended Dyalog or dzaima/APL.
well its just converting number to binary, i just had a bunch of leading zeros cuz like thats allowed
@Adám what the
O_O
Inverse decode ftw
whats that star
Power operator, like f²(x) in TMN.
10:03 AM
Repeat
Or what Adam said
In this case, we're doing f⁻¹(x) i.e. applying the inverse of f.
oh dang
why we have to do that instead of just doing encode?? whats the difference with doing this?
It's shorter :p
0
A: Sandbox for Proposed Challenges

Parcly TaxelDraw Parcly Taxel's cutie mark code-golfgraphical-output I've been a fan of My Little Pony: Friendship Is Magic for a long time, and very early on I created a pony version of myself also called Parcly Taxel. She's the blue winged unicorn in the picture below: Note the galaxy-like symbol on Parcl...

@AidenChow requires you to specify which types and how many digits you want.
But since 2⊥ is enough to evaluate from binary, then its inverse must be enough to represent in binary.
10:06 AM
Man where has inverse decode been when I've needed it
this is making my brain hurt
I only found it from searching up how the hell encode works just now. Would have been nice to have known about for some things lol
@AidenChow you get used to it
new sandbox post from me above
ok soooo... can i just like use this 4 byte answer in my answer
or maybe u want to post it urself adam?
10:07 AM
@Adám well you see, I didn't think to look for m in base n in the cart at the time
@AidenChow No, go ahead.
errr ok then
@lyxal Did you search for something else that I can add as search terms?
I don't think I even used apl cart back when I was doing base conversion stuff
da hell does domain error mean
10:09 AM
like if you do log(-1)
(with a real-only-valued log)
oh i mean domain error in the context of apl
some wonky stuff is happening here lol
can someone try this... razetime.github.io/APLgolf/…
does it need to be string input or what
@AidenChow It is saying it cannot find an argument to such that the result is 4.
ok.... so im calling the function wrong i suppose?
That's because never gives any result at all; is strictly dyadic in vanilla APL.
You can write 2∘⊥⍣¯1 though.
But then ⍴∘2⊤⊢ is shorter.
what the... so many different versions of apl
10:14 AM
Yeah :-( this works
@AidenChow You only ever need Unicode, extended and dzamia :p
DAMN 1 byte
thats actually insane
ok time to steal borrow that for my answer :P
@ParclyTaxel theres log for non-real numbers??
In APL, yes.
why, complex logarithm
@Adám btw thank you so much for aplcart. It really is a major time saver
10:17 AM
You're most welcome.
@lyxal yea bro its useful af
some good stuff there
@ParclyTaxel huh interesting
In mathematics, a complex logarithm is a generalization of the natural logarithm to nonzero complex numbers. The term refers to one of the following, which are strongly related: A complex logarithm of a nonzero complex number z {\displaystyle z} , defined to be any complex number w {\displaystyle w} for which e w = z {\displaystyle e^{w}=z} . Such a number w...
@ParclyTaxel cool!
learning new things today lol
about both coding and math XD
from the complex exponential and logarithm the complex versions of trig and hyperbolic functions are defined
(and their inverses)
is that like the tanh and cosh and sinh thingy
ive seen them before but never really know what they are
also did u see the 50 byte piet answer i put out and the comments i put on ur piet answer parcly taxel...
10:22 AM
yeah...
...the only problem is the leading zero in your answer
@AidenChow sin and cos but defined for a hyperbola (i am not sure if thats the actual definition)
@ParclyTaxel yea but thats allowed from the rules
i could fix it but im not sure how my byte count will do after that...
@PyGamer0 hyperbola?? how is that defined in that way?
like triangles and hyperbolas are two totally separate things
im not sure how trigonometry can be applied to hyperbolas
it just is ok dont question it :P
@AidenChow $ is just an ordinary operator, with very loose precedence, so n`mod`2+10*f$n`div`2 gets parsed as (n`mod`2+10*f) (n`div`2)
if you want to view it as "inserting parentheses", then it inserts them on the left as well as the right
10:38 AM
0
A: Sandbox for Proposed Challenges

badatgolfFind the sum of the sub-list with the largest sum Challenge Given a list that contains an integer, a sub-list is a contiguous non-empty sequence of elements within that list. For example, the list \$[1, 3, -2, 5, -6]\$, has some sub-lists \$[1]\$, \$[3, -2]\$, \$[3, -2, 5, -6]\$, etc. Your job t...

12:05 PM
@cairdcoinheringaahing I see your username and raise you "6helalmountingsQ%"
you say your username is from a functioning jelly sss implementation? Well 6helalmountingsQ% comes straight off the press from a non-functioning vyxal sss implementation
which is arguably better
it's almost as good as 🅱️avid LLL
almost
12:26 PM
0
A: Sandbox for Proposed Challenges

mousetailLargest Binary Area Take the sequence of all natural numbers in binary: # # # # # # # # # ## ## ## ## #### #### ######## ## Notice there are areas of connected 1s in the binary representation of the number. Your task is, for a given n, calculate the biggest contin...

12:50 PM
@Ginger I'm afraid they might be plotting against us
Weeks have gone by and not a single post from our 🅱️avid
codegolf.meta.stackexchange.com/questions/2140/… ehh, I honestly think this will be interesting, why the downvote?
1:17 PM
@lyxal alright then, do it
The hell am I gonna do 6 helal mountings Q%?
why do that when you can do kyangarborannunciative?
Change your username if you claim it's better :P
or nWASTS_ablative?
well it's too late now
the sss implementation is 85% working :p
it's no longer funny because it's no longer broken :p
I just have the space flag and swapcase flag functioning the wrong way around
apparently
flag_space ^= flag != 0
Dennis, why couldn't you have used normal boolean logic
instead of bitwise bs
1:21 PM
@lyxal kinda neat lol
I do that sometimes too
not when you're porting it to a language which doesn't let booleans and ints play nice
scala go fix yourself
if (flagSpace.toInt ^ (flag != 0).toInt) == 1 then true else false
not so neat is it
Isn't 0 false in scala?
0 is an integer
integers can't be used where booleans are needed
this is a jvm language, we don't do numbers as bools here
1:25 PM
oof
so what does flag_space ^= flag != 0 do?
I have no idea, I was talking about using ^= to toggle ones and zeros.
ig that's what dennis is doing here too
So flag_space gets toggled if flag is truthy.
my goodness
I've done it
I've done what no man should ever do
port both sss and a sss compressor to a statically typed language
good lord
ah yes, super silly strings
1:36 PM
my goodness it works with different word lists too
@PyGamer0 I suggest asking this on meta once LDQ launches its public beta
@mathcat exactly how I feel
2:32 PM
0
Q: Decoding a non injective bit matrix encoding

Energize1828The problem Someone has created an encoding format for square bit matrices, however they have found it isn't perfect! One encoding may not decode to exactly one matrix, or it may not even be possible to decode. Knowing this, you're tasked to write a program to decode a set of encodings and since ...

2:43 PM
@PyGamer0 No, I think the occasional questions about golflang design will be fine on-site, and LDQs here in chat will of course be okay too
We'd kind of be duplicating information if we had questions about golflang design both on here and PL((I)D(I)), but that's not a huge issue
LIQ: Parser library/generator or roll-my-own?
library, PLEASE
trust me you won't regret it
I've heard you get less control over error messages and stuff
I think ANTLR has Rust bindings
@RydwolfPrograms not if you use a good library
I love ANTLR: I write some BNF and boom I get ready-made code out the other end
@RydwolfPrograms roll your own
you'll learn more
and it is much more flexible
don't reinvent the wheel!
2:57 PM
@Ginger It kind of isn't tho
Using a parser generator is just reinventing a wheel, automatically
And I can probably reinvent it better than the automated tool
well, how's this factorial program? Is it optimised enough for you?
*don't reinvent the wheel, use automation to generate thousands more d:
2:58 PM
@pxeger Well, this is less about learning, and more I actually want to make a good praclang
3:16 PM
0
Q: Sum of strings (UTF-16 codepoints)

EzioMercerYour function must accept two strings and return new string where are UTF-16 code of all symbols is the sum of UTF-16 codes of inputs symbols If the resulting sum is greater than 65535 (maximum UTF-16 codepoint), take the sum modulo 65536 If there are more symbols in one string then sum with ze...

I'm considering transpiling Cuprous to Rust
Sort of like a reverse-TypeScript situation
The alternative would be LLVM but being compatible with an existing (and similar) language would probably be good for availability-of-libraries purposes
> Source : 1542265
oh no
Yeah if Rust is 1.5m sloc maybe I should not try to beat it in quality :p
so what're you going to do now? d:
Transpile to Rust
Given that Cuprous basically aims to be "Rust but with nicer syntax and some compiler inference" that's probably a better way to do it anyway
3:42 PM
@cairdcoinheringaahing once language development questions reaches public beta? :P
@Seggan I don't know anything about the new site, including it's name, beyond "it's about lang dev"
I think most of the active users originate from here :-)
4:08 PM
@PyGamer0 huh interesting
@pxeger oh, so I can’t use $ somehow in my code?
what do you mean "somehow"?
4:27 PM
like is there a golfier way to write what i wrote
0
Q: The number of distinct words in a sentence

Aira ThunbergChallenge: Find the number of distinct words in a sentence (code golf) Your task is to write a program that takes a sentence as input and returns the number of distinct words in it. For this challenge, words are defined as consecutive sequences of letters, digits, and underscores ('_'). Input: A...

@AidenChow not obviously
@pxeger so... theres still a way?
there might be, but if there is, I can't spot it
4:53 PM
@cairdcoinheringaahing Every time I see a post of yours now, I XKCD 1015 :/
You're welcom e
@ParclyTaxel nice! just saying i golf mine number to binary down to 44 bytes and remove the leading zero problem at the same time :D codegolf.stackexchange.com/a/258507/96039
maybe it can be golfed even further lol
hmmm i had a cursed idea to golf it down further but it might work... what if i put the first loop i have as an outer loop, then afterwards it will exit into a loop inside what the outer loop encircles
kinda like concentric circles
it might work cuz the first loop has more instructions than the second loop
5:09 PM
Now you're thinking with portals codels
A indicates the outer loop, B indicates the inner loop
W means white codel and X means black codel
the DP+ indicates the direction change instruction, it acts to branch the code basically
what yall think about this
@DLosc lmfaoooo
oh wait this wont work
im being dumb
the inner loop will have to have a border of black codels or smth cuz otherwise the IP will just travel back into the outer loop
rip
maybe i can somehow fit DP+ instructions inside the inner loop to manually turn the IP
oooh yea thats an idea
im not entirely sure if theres enough space to fit all of that inside the outer loop though
probably bubbler has some insane strategy to make all of this work lmfao
or like completely outgolf me with a 30 byte answer lol
5:31 PM
0
A: Sandbox for Proposed Challenges

Parcly TaxelCanonical form of a cubic Bézier curve code-golfmathdecision-problemgeometry On Pomax's Primer on Bézier Curves this "fairly funky image" appears: Every cubic Bézier curve can be put in a "canonical form" by an affine transformation that maps its first three control points to (0,0), (0,1) and (1...

@AidenChow your smaller Piet program still returns leading zero for 0 and 1, but ehh
5:50 PM
@AidenChow Y'all's Piet golf war has inspired me to try number-to-binary in Quipu. I'm now regretting my life choices a bit. :P
00:00 - 18:0019:00 - 00:00

« first day (4413 days earlier)      last day (642 days later) »