« first day (3868 days earlier)      last day (1023 days later) » 

12:00 AM
@user Dew it
 
@user "Hell world!" lol
 
Quipu time!
 
Sweet ^_^
 
Welcome to the first Learn You A Lang For Great Good event! This time, the language is Quipu, a language inspired by Inca knotted strings! During the next 24 hours or so, feel free to suggest Quipu-inspired CMCs, ask questions about the language, or otherwise discuss it! You can find an interpreter for it here
9
@emanresuA Nope, still times out for n = 5 for me :P
And with that, I should head to bed o/
 
To distinguish Quipu challenges from regular CMCs, I say let's call them QMCs
3
 
12:04 AM
Nice
 
QMC: Incrememnt a number
 
Oh man writing Quipu programs is going to be so trippy with the different knots
 
so it looks to me that operations are basically postfix, and other threads are needed for loops and functions?
 
0
Q: Draw constraint system #18762389

BubblerBackground Page 219 of A New Kind of Science (a book by Stephen Wolfram, the creator of Mathematica) shows an interesting 2D pattern generated by constraints. The relevant section in the book starts at page 210; you can browse other pages for more context. In short, the large binary image is the...

 
\/
1&
++
/\
can't exactly post TIO links
 
12:07 AM
@JoKing Yeah. Each thread is kind of a cross between a variable and a goto label. It has a value, and also it's a series of statements that you can jump to. Other than jumps, execution goes top to bottom, left to right.
QMC: Output the numbers 1 through 10.
(Maybe we should post the reply comment separate from the actual answer--that way the answer can use fixed font.)
 
When the documentation says knot n - 1, does that mean the previous knot, or the n-1th knot (using the value of the previous evaluation?)
 
No clue
 
wait so do knots have a separate stack or do they only have a single current value
 
QMC: Throw an error./
 
@emanresuA NO
 
12:13 AM
@JoKing n-1 means the previous knot; (n-1) means the value of the previous knot.
 
(preferably not a synaz eror)
 
@emanresuA //
 
ooh, i keep mixing up knot n-1 and thread n-1
 
@exedraj ^^^
 
So for instance "jump to thread (n-1)" means "get the value K of the previous knot, then jump to the Kth thread"
 
12:15 AM
@DLosc what does it mean by This knot merges with n - 2 and n - 1.?
 
@exedraj That's the most confusing wording choice IMO
 
well what does it mean?
 
patience, I'm typing :)
I would explain it as "This knot forms a compound knot with the previous two knots." Sort of like how Jelly has some quicks that combine the previous two links.
 
that still doesn't make much sense. like how does it combine the previous two knots
 
So if you have something like this:
\/
1&
==
2&
**
Consider the ==, which means "jump to thread (n-1) if (n-2) equals zero."
In this program, n-2 is the input, and n-1 is a constant 1
So the == tests if the input equals zero. If it is equal to zero, execution jumps to thread 1
 
12:22 AM
does it set the value of the current thread to the input if it jumps?
 
Wait so is \/ / == / whatever a knot or a thread?
 
@JoKing It sets the value of the current thread to the value of the last knot evaluated if it jumps, IIRC
 
Is Quipu TC?
 
the last knot is the jump right?
 
@exedraj \/ is a knot. A column of knots is a thread.
 
12:23 AM
It has finite memory, right?
 
@JoKing Yes, which is one reason why it's important to know what the == evaluates to.
@emanresuA It uses unbounded integers, so theoretically it has infinite memory.
 
Oh I see, cool.
So is TC?
 
Yes, I think so. But programming something that requires an arbitrarily sized list of integers would be quite a pain.
 
you could probably simulate a stack by jumping to the same thread over and over again?
 
Mayb
 
12:25 AM
@JoKing Only if you store the stack encoded as a single integer
 
does a jump return to the original thread after the thread has been completed? does the the original thread retain the value it had or the new value? one of these assumptions is probably wrong
@DLosc incoming, 35 bytes
1&
++
/\
\n
/\
^^
1&
++
1@
%%
0#
>>
 
Ooh, interesting! I wasn't expecting a single-thread answer
 
without the newline it would be a about five lines shorter
 
@JoKing No, a jump is just a goto, it doesn't return. Each thread retains its value whenever it's not executing. Does that answer your question?
 
i think so. i was thinking of it as recursion i.e. insert a copy of the other thread into this thread
no stack simulation then
i really wish there was a evaluate to (n - (n - 1)) knot
 
12:34 AM
@JoKing Yeah, I get why they're called threads for thematic reasons, but it does seem easy to confuse them with threads. Quipu threads are basically just blocks of code, but vertical (and with associated values).
QMC: Given a number N, count up from 1 to N. Or, if you prefer, you can start at 0, or stop at N-1.
 
oh god, you're bringing input into this
 
You gotta start using multiple threads sometime! ;)
 
1&
++
/\
\n
/\
^^
1&
++
\/
%%
0#
>>
I thnink
stolen from joking annd ssligthy modified
 
umm, i don't think the input knot will keep returning the same thing?
 
^
 
12:41 AM
Oh
Dammit
(Requires n copies of n to be inputted)
 
You'll have to take input once and store it.
 
what does \/ evaluate to at EOF?
 
Not sure, but emanresu A's code results in a type mismatch error, so... not a number.
 
so does 'merge' mean that (n-2) will skip over the clump of knots? and (n-1) refers to that clump? that seems to make sense
 
Does Quipu have any string handling?
Aside from ' and stuff
Like int-to-char, concatenate, etc?
 
12:46 AM
apart from pushing and printing, i don't think so :(
 
z;9
That pan
Is someone going to create the LOTM post?
I can if no one's started yet
 
Go ahead
 
Ooh, I must document "QMC" in the wiki
 
@JoKing It's null in the Scala interpreter
 
12:48 AM
oof. is there even a way to check for that
@DLosc 64 bytes, but should be golfable
\/1&
  ++
  /\
  \n
  /\
  ^^
  1&
  ++
  0&
  []
  %%
  1&
  >>
 
@JoKing I believe that's right, but I haven't tested it
 
this program confirms it with []
 
Aha
 
now i really wish there was a copy of (n-2) so i could save a couple of lines with the newline printing
 
Yeah. I tried a version using an extra thread, but it cost more bytes that way because of the indentation. Although, I didn't know the spaces between threads were optional...
 
Aha! It is a bit shorter!
62 bytes:
\/1&\n
  ++/\
  /\1&
    []
    0&
    []
    --
    1&
    <<
 
0
Q: Tips for golfing in jq

emanresu ASince jq is the Language Of The Month for September 2021, what general tips do you have for golfing in jq? I'm looking for ideas which can be applied to code-golf problems and which are also at least somewhat specific to jq (e.g. "remove comments" is not an answer). Please post one tip per answer.

0
Q: Language of the Month for September 2021: jq

emanresu AIn accordance with our meta agreement, since one candidate received more votes than the others, we have a new featured language! Throughout August 2021, our Language of the Month will be: jq What's a Language of the Month? See the meta post for nominations. In short, during August, those who wi...

 
@DLosc interesting, i wonder if there's a way to reuse the value of thread 2 rather than shell out to the other two each time
 
Go, uh, do stuff in jq!
@JoKing Also please delete this
 
done
 
1:05 AM
Thanks
 
@JoKing Maaaaybe... that would be more feasible if we were counting down, though. The value of thread 2 is going to have to hit zero (plus or minus 1) to trigger a different behavior from the conditional.
 
right. currently i'm trying to figure out if there's a way to jump to the input thread only on the first iteration
 
@NewPosts I almost forgot to replace Bubbler with my username
That would've been interesting
 
Welp:
QMC: Given a number N, count down from N to 0.
I've got a solution in 32 bytes that uses three threads.
 
@emanresuA And it's September now :P
 
1:14 AM
@DLosc i'm still stuck on count up to input with the main logic on the first thread
i keep getting a scala error nd i don't know what causes it
^^\/
**
1&
--
1&
<<
00
^^
--
1&
++
/\
\n
/\
^^
1&
--
1&
[]
%%
0&
>>
oh wow, that's getting long
 
Well first of all, I don't see how you're getting back to thread 0 after you jump to thread 1 to take input
 
oh right, i had that, but i deleted it to try and debug the error
 
Second, do you mean 0& instead of 00 on the 7th line?
 
ahhh
i keep doing that a lot
 
Yeah, with all the doubled operators it's natural to want to double everything
 
1:18 AM
hmm, match error null now
it prints 1 at least now
 
Challenge idea: Fill in (by guessing) the second column of Quipu code
 
nvm, got it, but only prints up to input-1, nooo
 
0
Q: Remove oddly nested substrings

Browncat ProgramsTask: Input will consist of some text, with nested [] separating some of it into nested groups: abc[d[fgijk]nopq]rst[u[v[[w]]]xy[[[z]]]] Your task is to remove all brackets, and everything wrapped in an odd number of brackets. For example, a[b]c would remove the [], and the b inside of it. a[[b]...

 
ugh, 69 bytes
^^\/
**1&
1&++
--0&
1&??
<<
0&
^^
--
/\
\n
/\
^^
1&
--
1&
[]
%%
0&
??
 
@JoKing nice.
 
1:24 AM
@Bubbler Thanks :p
 
@JoKing So you're counting down from -1 to -n and negating the value to output it? Am I reading that right?
 
yup
 
Eeeenteresting.
 
This probably wasn't the best time to post a new challenge lol
 
Oh well
I have a tiny regex answer
 
1:32 AM
huh, i'm realising you can split up threads in order to preserve values at specific knots
 
Yep... and I'm realizing you can split up threads to save bytes if a thread on the right side of the program is getting super long.
 
is there an esolang that involves twitch chat?
I don't use twitch, I am just amazed by how chaotic twitch chat is
 
It's only chaotic when there's lots of people
It's much better with smaller streamers
 
Twitch Plays Code Golf?
 
holy moly
twitch play code golf.
 
1:45 AM
@BrowncatPrograms Cheap regex answer
 
@DLosc could be a good idea
 
Probably not tho
 
chaos and many spam answers
or you just let ppl choose letters to write on program
 
@DLosc But I meant twitch streaming code golf
 
Ah, okay. Marginally better idea :P
 
1:48 AM
@exedraj i've done that a couple of times
@DLosc 55 bytes, phew
2&\n\/
[]/\0&
2&^^??
==1&
0&++
^^2&
1&[]
++%%
/\0&
  >>
 
I believe you meant:
Twitch Plays Code Golf Kappa LUL LUL LUL
 
imagine ppl voting for which char should be used
while the language is jelly
 
Use a dyadic chain!
No, use a monadic link chained to three nilads!
 
all praise helyxal
 
No, do both, but combine them into a triad
 
1:49 AM
100% sure there will be people trying to exit the program
why don't we just exit it?
 
“import sys; sys.exit()“œV
 
i am sure it's impossible to even do import sys
 
Commands: move the cursor, insert a char, backspace (optional: clear the entire code)
 
@JoKing wait...you don't need spaces between threads?
 
œV executes as Python
 
1:52 AM
the vote won't let you
 
@exedraj apparently knot, you just need them at the same indentation
 
ppl will just import something else
 
haha
@JoKing good pun
well played
 
knot really.
 
i really wish there were more instructions here
or rather, more combinations. something like 1+ would be a real help
 
1:55 AM
Yeah, it's pretty minimalist. After the LYAL event, I'd be up for brainstorming a derived language with more functionality if anyone's interested.
Especially lists and strings need more love.
QMC: Given a number N, output even if N is even or odd if N is odd.
 
@DLosc 37 bytes... maybe see if anyone else has shorter before i post
 
@JoKing I've got 34
 
Something like:
'e\/'o
'v2#'d
'e%%'d
'n<<
/\>>
Untested and theoretical
 
it executes the first thread first
 
Oh
Can I wrap it?
Like does << execute the last thread on #1?
 
2:03 AM
<< and >> have to jump to specific threads, not just the adjacent ones
 
@emanresuA You know you can test these on TIO using the link in @user's Gist, right?
 
Oh
Ok
 
@DLosc i got the 34, neat
 
Isn't it? I didn't plan the CMC that way, but it's quite convenient how the numbers worked out.
 
actually, i got two 34s, hmm
 
2:06 AM
I’ve got the 37 bytes, I’ll try and find the 34
Oh, and I’m here, btw. Hello
 
heyo!
one has no spaces, the other has quite a bit (6)
 
The six-space one was what I had, but I've just gotten to what I suspect is your 37 and I think I see my way to the other 34...
 
Nice, I got the 34 with the spaces
I didn’t actually realize what the (6) meant until I got it, so I missed that hint completely :P
 
i felt "quite a bit" was overstating it a little and overcorrected
 
Yep, got the no-space 34. That's actually really neat--multiple approaches with the same bytecount, each elegant in its own way.
 
2:11 AM
Ooh, I found a 33 byte
 
:o
 
odd number??
 
3 newlines
 
aha! wow that's cool
 
Ooh, hmm... I tried going the opposite direction, I think, and ended up with 40 bytes
 
2:18 AM
@NewPosts Haha, got to use the weird Jelly dyadic-nilad chaining trick with an empty input :D
Unfortunately, it's the same length as not using it, but still :P
 
@Dudecoinheringaahing Haha Jelly bad
1 byte but whatever
 
Imagine relying on "non-bracket characters will be letters" instead of your answer working with any characters :P
Also, why does Vyxal have a single byte constant for an asterisk character???
 
Because it does
I could use 0< instead
 
Probably to cheat on the 10 by 10 grid of asterisks challenge
 
True, we have three bytes on that
(With flags but w/e)
 
2:21 AM
Wait, does Vyxal not have an "is alpha" operator?
 
@BrowncatPrograms Vyxal? Having weird builtins to cheat on commonly answered CGCC challenges? No!!!
 
@BrowncatPrograms Thanks
 
@AaronMiller That's really clever! Took me a while of fiddling with the extra thread to figure out how to get 33.
 
It has a remove_non_alpha builtin
Which is effectively the same
 
@Dudecoinheringaahing because I added it for ascii art challenges
 
2:22 AM
^^ ninja'd
 
because one thing I've noticed is that having a non-whitespace character constant is actually helpful sometimes
@BrowncatPrograms so no, it's not for cheating
 
Can confirm, I've used the asterisk builtin on several occasions
 
@BrowncatPrograms for once, your default assumption is wrong
 
I'm disappointed that porting Jonah's J answer is shorter than my original answer :(
 
@AaronMiller Ye, same
 
2:24 AM
@exedraj Yeah, but why was it added? That's the main argument is that you add features to Vyxal to "cheat" at challenges, even if those builtins later turn out to be helpful
 
@Dudecoinheringaahing because I was doing JHT exercises and realised a non-whitespace character would be useful
 
Not that I care tbh, I only really care (when it comes to golf) about my own answers :P
 
How long is porting jonah?
 
like most ascii art challenges will let you choose your own characters, and asterisks are the most commonly used character
 
@exedraj That is true, Jelly definitely needs a single byte char constant
@emanresuA 12 bytes
My original one was 13 bytes
 
2:26 AM
@Dudecoinheringaahing that's exactly what I mean
 
Oh
What's the other one then?
 
I mean... I don't see an asterisk builtin as cheating, even if it was added specifically for the grid of asterisks challenge. It's nowhere near as egregious as a one-byte builtin for Fizz/Buzz. And even that isn't cheating, just overspecializing. A codepage byte dedicated to one specific string is a byte that can't be used for something else.
Now, flags, on the other hand...
 
@DLosc it wasn't specifically for the grid challenge though
 
Vyxal 098y9Ô˜‚„ªµwujnf9mˆ∑ƒw, 0 bytes
 
> even if
 
2:27 AM
@DLosc Yeah, "cheating" is probably too strong of a word for what I was talking about
 
@emanresuA A more accurate port of Jonah's answer
 
@BrowncatPrograms I do have a mild case of "vyxal bad" syndrome :p
 
The ø and the blank second argument are the same as J's (...)
 
@BrowncatPrograms clearly
 
2:28 AM
@BrowncatPrograms Understandable, after all, Vyxal bad :P
 
Advertising a single language doesn't really seem like a good idea to me. Vyxal's the only one with an advertisement, so it might give some people the impression that it's "the official CGCC language" or something. — Browncat Programs Jul 27 at 14:08
despite the fact there were two other language specific ads
 
There weren't, were there?
I looked around quite a lot
 
Jelly and APL
 
Those were ads related to a language, but not for the language, right?
 
APL Orchard and JHT, specifically
 
2:29 AM
Not ads for the languages per se, but for stuff connected to them
 
They're ads for rooms for learning the lang,s, not the langs themselves
They're close, but not the same as an ad for the lang itself
 
> improve your jelly skills
 
Yeah, that's an ad for JHT, not Jelly
 
9 secs ago, by exedraj
> improve your jelly skills
 
@Dudecoinheringaahing ... Which is kind of like saying "That's not an ad for hamburgers, it's an ad for a restaurant that sells hamburgers"
 
2:30 AM
^
 
@Dudecoinheringaahing ^
 
There's a big difference between "use my language" and "go to this place for resources and discussion about a language"
 
Mainly because JHT is a room for people who see Jelly answers, have no idea how they work and want to learn (and I imagine the Orchard is the same). The Vyxal ad is an ad promoting the usage of the language
@DLosc I think it's more like "This isn't an ad for a course where you learn to cook hamburgers, it's an ad for McDonald's"
 
@Dudecoinheringaahing You can also find out what this chunk of random Vyxal characters is doing :p
 
@BrowncatPrograms The vyxal repo is a place for resources and discussion about the language
 
2:31 AM
Either way, it's too late to change it anyway, right?
 
Personally, I sort of think things like LotM and using the language a lot should be the primary ways of advertising your language (and actually advertising it feels a bit corporate), but I could see that being an opinion people disagree with
 
@BrowncatPrograms Done both.
 
I'm aware :p
 
That said, I dont object to having a Vyxal ad because it "feels like saying Vyxal is the official CGCC lang", I object to it because we don't advertise languages that way
 
2:32 AM
^
 
770 answers, not counting questions and tips
 
My wording was pretty poor in that comment
 
@BrowncatPrograms I've definitely never done the second one. /s
 
@Dudecoinheringaahing Why not?
 
I think it's kind of unfair
 
2:33 AM
Fine, we'll tag it with - happy now?
 
@BrowncatPrograms I think it's kind of
FTFY
dangit emanresu!
 
Ninja attack
 
@emanresuA Hm, not bad (though I'm sure there are a few false positives in there)
 
Also I object to Vyxal being called 'elegant" or "readable" but that's not really a reason to dislike the ad necessarily :p
 
@BrowncatPrograms what you don't know is that I asked people if we should have an ad in the vyxal chatroom
the consensus was yes
 
2:35 AM
Oh good, so glad you asked people...in a room where everyone there uses and likes Vyxal :p
Your response probably would've been much more mixed if you'd asked here
As evidenced by this conversation
 
Hyper probably still would have said yes
 
@exedraj And?
 
Did I get anyone?
 
@emanresuA Uh-huh, sure
 
2:36 AM
so a moderator's opinion was good enough for me
 
@emanresuA Thanks to my anti-rickroll script, no :p
 
@emanresuA unfortuantely yes
 
@emanresuA Get anyone? I thought you were just trying to lighten the mood with a fantastic song :P
 
@emanresuA Thanks to my seeing the substring youtube.com in the link instead of xkcd.com, no :p
 
I have so many pings right now
 
2:37 AM
You've pingrolled yourself
 
i hover over xkcd links to see if i can figure out which one it is by the number
5
 
@emanresuA Why? :p
 
@JoKing I'm sure there's a relevant XKCD for that...
"My Hobby: ..."
 
@exedraj Did we ever get a pic of the pink plate?
 
@JoKing What's this one then?
 
2:41 AM
@exedraj All respect to hyper (and the other mods), but, unless the topic is specifically relevant to a mod-only thing, a mod's opinion is, to me, the same as any other user's opinion
 
@AaronMiller not yet
 
@emanresuA i'm guessing a redirect to a rick roll? sus link
 
@JoKing :(
Did you see the .surge.sh then?
 
@emanresuA For me it just says "page not found"
 
Oops
I did /505 instead of /?505
 
2:44 AM
me: opens quaver
quaver: loads the custom map i'm working on that accidentally makes the menu lag in the background
me: ._.
 
(Low-hanging fruit, but it was the first potentially relevant one I thought of)
 
Lol
 
dang it why is my link preview hover not working today?
 
CMC: Rickroll as many users as you can. 1 point for ordinary user, 2 points for mod / RO, five for staff.
 
QMC: Hello, World!
 
2:46 AM
Isn't it just
 
the trivial one isn't the shortest
 
Hm
Multiple threads
One moment
 
@emanresuA Beating Jelly are you? :D
 
Beaten Jelly I have, by 2 bytes
BTW, how's the cake in TNBakery going?
 
@JoKing Ahhh
 
2:50 AM
@emanresuA Not anymore :P
@emanresuA I've got the flour, eggs, milk, butter and sugar all incorporated in the mixing bowl, now I just need to bake it
 
@Dudecoinheringaahing Ugh, time to golf some more
 
i've got a couple of 37s (and a funny 38), but i don't think it can go shorter
 
@JoKing Yeah, I got two 37s as well.
 
@emanresuA If I get hired at SE, then rickroll myself, would that count as 5 points?
 
@JoKing What's your 38?
 
2:54 AM
@Dudecoinheringaahing Good luck with #1!
 
'o'H'o[]
'r'e',/\
'l'l'
'd'l'W
'!/\/\
 
@emanresuA Should be easy, I've been bribing Slate with suet and seeds to advocate for me :P
 
@DLosc two column version looks better
' 'H[]
'W'e/\
'o'l
'r'l
'l'o
'd',
'!/\
 
Ah, nice. Got to keep that "free reference to thread 0" trick in my back pocket. :D
 

« first day (3868 days earlier)      last day (1023 days later) »