« first day (3938 days earlier)      last day (949 days later) » 
00:00 - 17:0017:00 - 00:00

12:00 AM
@RedwolfPrograms Understandable. I tolerate ==, but with my math + QBasic background, I don't think I'm ever going to prefer it if = is a decent option.
In fact, I just realized, not one of the languages I've ever created uses ==. (Although, only one of them was designed with any sort of practicality in mind, so take that with a grain of salt.)
@Mayube since it has no data, source-reading or eval primitives, all its quines are true by default
TFW you accidentally use a 0% infill instead of a 100% infill because you forgot how numbers work
TFW when you forget how input works in your language so you try and bugfix an issue that doesn't actually exist
is thing happening here?
Yep, I was just waiting for someone else to agree that we're learning /// this week
12:09 AM
That's the random-find-and-replace one, right?
Not random, but yeah
Oh, not random? Not sure which one I'm thinking of that does it randomly then
Maybe Thue
@RedwolfPrograms Not really, they can lead to bugs if not used right (although this isn't the strongest case for them), they're not super useful since you can do i += 1 in the majority of cases, and they make parsing very slightly harder (again, not the strongest case against them)
Welcome to the sixth Learn You A Lang For Great Good! Today, we'll be learning /// (pronounced "slashes"), a surprisingly Turing-complete esolang based on string replacement. You can check out the linked esolangs.org page for some examples, or mess around with it on Try it online!. Feel free to ask questions, post ///-themed CMCs and more for the next 24 hours or so.
@RedwolfPrograms Yeah, looks like it
@DLosc I hate languages with unsearchable names even more (looking at you, C)
12:16 AM
26 messages moved to Sandbox
@user To be fair, C was named before the invention of search engines =P
Hey just let me hate C in peace okay? :P
///MC: Add two unary numbers. First number is written in a, second number is written in b, the output should be written in c. aabbb -> ccccc
///MC: Multiply two unary numbers. aaabbbb -> cccccccccccc
@Bubbler I have 10 bytes, which I think is optimal
12:21 AM
Yeah, I agree that 10 is optimal
Just throwing out simple ideas because I guess we have to learn on our own today
/// is one of those languages where I know how it works, I just don't know how to program with it.
idk if this (10 bytes) is right... it has an extra trailing newline, and I'm not sure if I'm even giving input correctly ¯\_(ツ)_/¯
Just append the input in the code section
Having a footer adds a newline, which isn't good for our purposes
oh okay
(although in this case, I think ignoring the newline in the output is a reasonable thing to do)
12:25 AM
oh right /// doesn't do regex right?
I suppose it might not work if the program gets more complex
Yeah, no regex
just plain string substitution
@Bubbler Does it need to be able to handle either of the numbers being zero?
Let's say both inputs are strictly positive, if it makes things simpler
Simpler, but definitely not simple...
Is this actually going to require making a loop using self-modifying code already??
Idk lol
12:39 AM
Ooh, wait, I have an idea
Aha! 12 bytes
And note that putting this in the header gets rid of all newlines from the rest of the program:
So that allows for putting the input in the footer, as long as the input can go after the entire program.
Nice find
And 17 to output in c
@DLosc Nice, how does that work?
@Bubbler Oh, right
@user Consider this version that replaces some of the slashes with underscores.
The last substitution /b/... is incomplete, which is dynamically created by inserting a slash after a's
So it becomes /b/aaa/bbbb after first sub
We turn the three as into a command that says "replace every occurrence of b with three as". Then we run that command on the remainder of the program (i.e. the bs).
12:46 AM
which is classic multiplication by sub
Ah, clever
///MC: Given a unary number, multiply the number by 3 and add 1 if the number is odd, or divide the number by 2 if it is even.
hm, I managed to get mortarboard on math se meta? interesting
@DLosc 34, takes a and outputs b
1:03 AM
49 bytes, inputs a and outputs d
I've got 36 without looking at either of yours yet
Meanwhile, 17 for multiply that supports zeros
1:18 AM
@DLosc 31, takes a and outputs c
Oh, obviously I didn't need to dynamically add code for multiply
@Bubbler The previous approach also supports zeros
Oh... by forming an incomplete sub I guess
///MC: Given two numbers a and b, compute a^b (exponentiation).
^ I have 27
@DLosc Hey
1:29 AM
Q: Can we change the Late Answers prompts regarding duplicates?

DingusUnlike other (Q&A) sites in the Stack Exchange network, CGCC has a consensus that duplicate answers are acceptable. For some code golf challenges there is one obvious shortest solution in a particular language, so it's unsurprising that different users might independently arrive at the same answe...

@DLosc wow! out of the box
@Bubbler Oh, duh, the underscore shenanigans I was using aren't necessary at all. In that case, 26 bytes
Nice lol
@Bubbler Can we take them in reverse order?
Yes, that's fine
1:37 AM
@Bubbler 27
and since we both have 27 i'll just conclude that it's optimal XD
Why do I get the feeling that I'm overengineering this... :P
My 27 handles 0^x and x^0 too
What does it give for 0^0?
Q: pattern matching coding challenge

teja sriIs there any possible better solution for the below pattern-matching coding challenge without using if-else statements? one of the most important aspects of accurately matching records to candidates is ensuring that the name in the record matches the name or a known alias of the candidate. In thi...

1:45 AM
@DLosc im new at " Learn You A Lang For Great Good!"
It's just a cool name for an "event" where you try to learn a specific language and solve language-specific CMCs
what is CMC?
CMC: explain CMCs
@Wezlprogramsredwolf CMC = Chat Mini Challenge
Chat Mini Challenge: a small task posted in the form of a message
59 mins ago, by DLosc
///MC: Given a unary number, multiply the number by 3 and add 1 if the number is odd, or divide the number by 2 if it is even.
for example ^
I understand
1:48 AM
and we answer by replying to the comment
How to make text bold in chat stack exchange
@Bubbler Argh
Can i make mini-challenges
sure, anyone can
1:55 AM
///MC: Given two numbers a and b, compute a + b in Roman numeral
@Fmbalbuena Meaning, a and b are given in Roman numerals and the output should also be Roman numerals?
the input must be unary and output must be roman
///MC: Given a number, "square" it but literally, i.e. aaa should produce:
2:10 AM
@Fmbalbuena 106 bytes
@DLosc i think is optimal
///MC: Given two numbers "a", "b", convert unary to base n (Min 2, Max 16)
n is also in the input?
2:34 AM
This may be helpful to others besides just me: a /// interpreter in Pip with toggleable debug output.
2:54 AM
@LeakyNun Does the output have to use the same character as the input?
@DLosc no
@LeakyNun 26 bytes, output has leading newline
3:08 AM
@LeakyNun 26 with trailing newline
///MC: Given a number n, output nth triangular number.
^ 28
///MC: Given n, output n! (n factorial)
0 bytes, but I'm not sure why you're so excited about this particular challenge (/s)
Factorial actually sounds hard btw
///MC: Given n, output ~n, ie bitwise NOT of n
@Mayube In what representation of n?
@Bubbler unary
3:22 AM
Unary doesn't have negative numbers
input in unary, output in binary
And negative binary (as in 2's complement) is infinite to the left
Probably we can do it in signed unary though (so 3 = aaa, -2 = -aa)
In that case 13
you only need to NOT the bits needed to represent n. So for n = 6 output would be 001, for n = 21 output would be 01010
Q: Verb arities in J trains

BubblerBackground J has trains similar to APL's. Given a sequence of verbs (functions), three rightmost verbs are grouped to form a derived verb (a fork) recursively, until one or two verbs remain. If the sequence has odd length, the entire train is a chain of forks. Otherwise, two verbs remain at the e...

@Mayube Then it's just unary-to-binary conversion using 1 and 0 instead of 0 and 1 in the output
3:30 AM
good point
4:06 AM
Meanwhile the tag renaming purged all the history of tag badges :P
CMQ Which tags (where you have ≥5 answers) have the highest / lowest average score?
average score of answers?
Yes, tag score / answer score
@emanresuA avg score: 9
For me it's pop-con & error-message (16/5) and self-referential (8/9)
@Mayube Ok that's impressive
I also have (8, but one answer)
4:17 AM
@emanresuA 45 / 8
did anyone else just get an [array] tag badge?
My lowest is 9 / 14 = 0.643
@Mayube Isn't it 5/9 = .555?
yeah just saw
Oh lol I have 99 bronze badges and 99/100 score on
4:19 AM
is there an easier way to see this than to just go through all of them and calculate it
¯\_(ツ)_/¯ I just look for ones with low answer count/high score & vice versa
My is 66/9 = 7.33
followed by at 72/10
and at 56/8
I should go work on Vyxal
you can use this to get them all; just copy-paste your profile's source HTML into the input
you might have to copy-paste a couple of pages but you can just append them all together in the input
my lowest is graph theory at 7/5=1.4 and highest is polyglot at 59/7=8.[428571]
I have a few <1 because answers to old questions
4:29 AM
My lowest is alphabet at 8/7
and next lowest is balanced-string at 15/7
So I have only one tag with average <= 2
Almost all my tags are average ≤ 2
@hyper-neutrino Fun fact: Your username still disappears when I have split screen on to do Vyxal stuff
quite a few tags at plain 0 for me
Without answer count cutoff, my highest is code-bowling at 35/1
then cellular-automata 66/3
With cutoff?
4:33 AM
no idea
whatever hyper's tio link calculates
Cutoff = answer count >= 5
@UnrelatedString ?
oh good idea
with the cutoff yeah is my highest at 6.83 and is my lowest at 1.375
oof, really kills the enthusiasm when you've spent half an hour slowly golfing a python3 answer and somebody posts a python2 answer that's half the size
4:39 AM
since all of my answers are mildly shit my second highest is at 6.1 (61/10)
@Mayube Learn Vyxal
@Mayube they're different languages according to rules, so focus on your solution, don't let go of it
@Mayube I can golf off 4 more bytes from the python 2 answer :P
And we folks in the TTNB can help you golf it
4:41 AM
@Razetime yeah but the p2 solution ports to p3 for only 1 extra byte, and is basically the same approach as me
Post the port, and put your original answer in as well
CMC: Find 28-byte Python 2 answer to the latest challenge
4:53 AM
@emanresuA the Twenty-Third Nineteenth Byte?
@DLosc The The Nineteenth Byte
@emanresuA meh, that seems kinda pointless. "Here's somebody else's answer, also here's my less-golfed version of that same answer"
@lyxal But there's already a "the" before TTNB. So it would be "the The The Nineteenth Byte"
5:03 AM
@emanresuA Highest: 83/6 = 13.83 and 178/18 = 9.88 (here's why). Lowest: 4/9 = 0.44.
@Bubbler does this involve using string output
actually i suppose i shouldn't ask
No but actually string output gives 27
Because Python 2
5:21 AM
Is minecraft TC?
i think redstone is TC
and command blocks even more so
@hyper-neutrino so technically someone can make a bf interpreter
in theory i think so
ok are yall bots? :p
in theory i think so
5:26 AM
@UnrelatedString nice to see fellow bots here :P
redstone is likely to be TC but imagine golfing it
@PyGamer0 ?
@hyper-neutrino are you a bot?
@Bubbler done but can't decide if it's worth posting separately or just as a golf suggestion
@PyGamer0 yes
5:27 AM
you can save two byte(block) by replacing that block with piston
in Minecraft?!
also really curious how string output brings it down to 27
my machine is 2 ingame tick faster then yours
@UnrelatedString maybe [1,2]"12" ?
although that isn't a python 2 thing
my current thought process is to make a large array and then slice-index it based on arity
yeah what i have uses the exact same l%a+1 from the existing answer so no
5:31 AM
@Niko i use a PDP20
@UnrelatedString You can post it separately if you think it is different enough
it probably will be when/if i figure the string thing out
currently it's just this lmao
That's exactly my 28
I guess Python 2 is a big enough hint for string-based 27 and anything further will totally spoil it
@Niko Honestly there can't be more objective fastest-code than this lol
5:36 AM
@PyGamer0 actually sounds quite cool, worth a shot
what happen if i use cheat engine speed hack on compiler?
it sounds funni
oh the string thing is a python 2 thing
i still think i have some other lead lmao
(it got edited into the original answer)
yep and porting that string thing is 27
5:53 AM
Seems dingledooper found all these independently
6:18 AM
Nice :D
Meanwhile I decided on the name of my hypothetical golflang: Wintertree, a Winning language based on ternary trees.
Its verbose mode will be named Losetertree :P
6:35 AM
@Bubbler Quite apart from the acronym meaning (is that an acronym?), Wintertree is a really nice name.
2 hours later…
8:43 AM
Can someone who understands Jelly explain the chaining here to me?
the top level chain is a dyadic 2 2
Yeah, but I don't understand why it appears to mold then prepend 2
so 9 %‘ṭ2ɓṁ 1 = 9 %‘ṭ2 (1 ṁ 9)
How would I get m to run with the output of the previous & 9?
top level chains obey the same chaining rules as atoms and all that
i think %‘ṭ2ṁḷ ought to do it
8:50 AM
Thanks :)
So... is left argument, so is called with the left argument (previous) and 9?
Or is referencing the 9 and just taking the previous by default?
Please tell me so I can write my explanation properly
¯\_(ツ)_/¯ I'll guess the latter
So this is a 2-1 chain followed by a dyad-nilad pair and... what?
All I need to know is, what's the referencing?
9:06 AM
there is no dyadic 2,1
it's just a dyad followed by a monad and then a 2,0 and finally a 2,2-chain
Oh that makes more sense.
here's how I would represent it
of course it doesn't fully explain the 2,2 mechanism but idc
i should really make that jelly tutorial video series some time
Does JHT host its own Jelly server or use TIO's?
uses TIO API
9:46 AM
A: Sandbox for Proposed Challenges

emanresu AChristmas Eve Eve Inspired by this xkcd Your challenge is to write a program/function that takes no input and outputs Christmas if the date is December 25, else outputs Christmas + one eve for every day until then. Capitalisation can be anything, but must be consistent - ChRIStmAs eVe eVe is acce...

o/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ (I found out how Lyxal extends his arms, turns out you stick a bunch of them together)
10:00 AM
10:45 AM
when you compress them: lol
2 hours later…
12:30 PM
Copilot may be good for writing code, but it really sucks at math
okay so here's what I gave it
- element: "∆s"
  name: Sine
  description: Get the sine of an angle in radians
    num: math.sin(a)
  vectorise: true
and here's what it gave me:
- '[3.141519265] : 0'
- '[0] : 0'
- '[6.283185307] : 0'
because sine of everything is apparently 0
sine(10)? 0
sine(69420)? 0
sine(arcsin(Joe Mama))? You guessed it - 0
at least that's the logic implied by copilot ;p
nvm I'm just being a dumb frickass and forgetting how trig works
gosh dang it
but it still sucks at math tho
because it still gave 0 for other values
so I wasn't completely wrong
12:52 PM
As I head off to sleep, I strongly suggest you do indeed consider the file
doing so is good for you
1:37 PM
@MannyQueen lol
@lyxal lol
(my hands are straight)
1:50 PM
And of course as lyxal departs, I arrive
mornin' all
I see every answer on the J arities challenge is now a port of dingledooper's python2 answer
Except for maybe Retina
2:27 PM
I currently have a 75% in a class as my final 6-week grading period grade
And my teacher still hasn't fixed it >:|
What are our default rules for upper limits on integer inputs? IIRC we have a standard loophole against saying "my language only supports 1-bit integers", but what's the default ruling if a challenge doesn't specify a maximum value?
I think incorrect answers due to integer overflow are fine
I think the standard loophole is only for unreasonably low numbers
so within reason the upper limit of integers in your language of choice?
I think so. I'll see if there's a meta consensus, but that's what I'd imagine is reasonable.
codegolf.meta.stackexchange.com/questions/2280/… seems to be the relevant question
The two top answers, which aren't mutually incompatible, would indicate that your code should work for all test cases, but is fine to assume the integer size, recursion limit, etc. are arbitrarily high assuming it's not already being abused for some other behavior (e.g., using an int's overflow in one calculation, while pretending another int can never overflow)
Gotcha, that makes sense. Thanks for digging that post up!
3:01 PM
A: Sandbox for Proposed Challenges

MayubeDesigning Solar Panels This challenge is adapted from Google's FooBar platform, but has been changed slightly to make it more interesting. I'm designing a new space station for generic super-villain purposes (something something megalaser), but I'm having trouble designing the solar panels. My ge...

@SandboxPosts I think the flavortext is a little too long
I find this line from the linked article on Google FooBar quite comical
> Google Foobar is Google’s secret hiring challenge. Google uses this to hire some of the best developers around the globe which they think can be a good match for their organization.
I was invited to Foobar after googling "Python try catch", because I didn't know enough about python to know that it's actually try except
I also left the platform after solving only a couple of challenges, because it got boring and I have no interest in working for google.
1 hour later…
4:31 PM
@user today we learn ///
16 hours ago, by DLosc
Welcome to the sixth Learn You A Lang For Great Good! Today, we'll be learning /// (pronounced "slashes"), a surprisingly Turing-complete esolang based on string replacement. You can check out the linked esolangs.org page for some examples, or mess around with it on Try it online!. Feel free to ask questions, post ///-themed CMCs and more for the next 24 hours or so.
Okay but why ping me specifically lol
Q: Swap every two elements in a list

matusfChallenge Let's have a list L of n elements. The task is to swap every two elements in this list. Constrains the list L has at least two elements size of the list L is a multiple of two (i.e. number of elements is even) Example input: [1,2,3,4,5,6] output: [2,1,4,3,5,6] input: [0,1,0,1] out...

can't find a dupe, but I feel like there's gotta be one
4:40 PM
@hyper-neutrino i found one but i forgot
we have a lot of element swapping challenges, but I don't think we have one that's exactly this
well, I looked up the obvious jelly answer, and couldn't find it
This challenge for swapping items and 2 given indices links to several other similar challenges
damn someone doesn't like jelly
or just me i guess
seems like somebody's mass downvoting maybe?
The Vyxal answer got a downvote too
4:50 PM
looks like it, they only did my two at first which is pretty arbitrary but yeah it's just typical mass downvoting
oh nope it's back to just being mine
I +1'd your python answer at least
ok someone's just fucking with the vote buttons
Damn, braingolf loops are broken in TIO, and LMBM can't distinguish between 0 and EOL
00:00 - 17:0017:00 - 00:00

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