« first day (2014 days earlier)      last day (2829 days later) » 

6:19 AM
0
Q: A Sequence of Collatz Paths

Sherlock9The Collatz conjecture is a very well-known conjecture. Take a positive integer; if it's even, divide by 2, else, multiply by 3 and add 1. Repeat until you reach 1 or something else happens. The conjecture is that this process always reaches 1. You can also reverse the process. Start at 1, multi...

 
That's two challenges posted. Anything else, @LeakyNun?
 
Hey there
 
@DestructibleWatermelon Hello
 
any feedback for this challenge?
1
A: Sandbox for Proposed Challenges

Destructible WatermelonGolf an InterpretMe interpreter (in any language other than InterpretMe) This is a very simple challenge. An InterpretMe interpreter takes input, and runs an InterpretMe interpreter (which takes new input) as many times as "*" occurs in input. Note that the program does not necessarily have to ...

 
6:27 AM
What do the multiple * mean? Your specification isn't very specific
 
@Sherlock9 Well, it means that each * tells the interpreter to take input and interpret it as interpretme code
Is that clearer and should I put that in?
 
I think that, and putting comments on the examples.
 
Ok, thanks Sherlock9!
 
Well, there might be other ways to help your spec. Let me think on it a bit
Or let you finish editing in comments, at any rate
@DestructibleWatermelon Each * on a new line, or just every *. Because in your first example you have ** and I'm not sure if that's different
 
input is on a single line
(in the official spec it doesn't say anything about comments, but I'm assuming everything other than * is comment)
so, when you type hey* for input, it skips the comment hey, and takes new input to be interpreted
** means that after it finishes interpreting the first inputted program, it will interpret another inputted program
please note that the program state after
**
*
is the same as after
*
**
as well as after
**
 
6:39 AM
@Sherlock9 nothing else
 
If you know of a place where I can get pictures of Apollonian gaskets for one of those challenges, I'd be much obliged.
@DestructibleWatermelon I think all this would be good in the post
 
Haha. Thanks
@NathanMerrill This KotH I put in the Sandbox might be a decent try-out of your KotH code: meta.codegolf.stackexchange.com/questions/2140/…
 
well, I won't program it for you, as I already have too many KoTHs in the works
 
The controller I wrote for it is in Python, though. I'm not sure how to translate into Java, and that may not be the best idea as I never tested it properly
 
6:46 AM
but I'll certainly help you (and I would love feedback on what is confusing)
 
Ah alright. That's fair
Well, first off, I need to learn Java
So let me go do that and get back to you
 
I've tried to make it as modular as possible
so, I have a "Map" portion, which helps you generate maps
and a "Tournament" portion, which is in charge of how games run
and a communication portion, which helps you talk to other languages
 
WTF is dermagen iq?
 
@NathanMerrill What do you have for card games?
 
@Sherlock9 nothing specifically. If I were to make a card module, I'm not really sure how it'd work
I can't really make assumptions about the types of cards, though, I could make some sort of deal function
 
6:51 AM
What I always do for a standard 52-card deck in Python is deck=list(range(52)) and import random;random.shuffle(deck) or something like that, with the rest of the code dividing it up later into aces and spades and so on.
What does Java have for randomizing?
 
Collections.shuffle()
you can pass in a List<> of anything
as far as range(), Java doesn't have anything, but my controller has a Tools class with a range function in it
 
Wooo i got 600 rep (bonus of 100 reputation because we trust you on other sites in the network thingies)
 
although, I'd recommend not just making cards numbers. I'd personally make a Card class, where you pass in a Suit enum and a int value
are you familiar with enum?
(from any language)
 
I vaguely remember from learning C or C++. One of those
 
1
A: Sandbox for Proposed Challenges

Destructible WatermelonGolf an InterpretMe interpreter (in any language other than InterpretMe) This is a very simple challenge. InterpretMe consists of one command *, which causes the program to take input of an InterpretMe program and execute it. An InterpretMe program will interpret as many InterpretMe programs a...

 
6:56 AM
And SQL, though I'm not sure that helps
 
basically, its a type with a fixed set of values
 
did that make it better?
 
so, Suit can only be "Heart", "Diamond", "Spade", "Club"
 
@DestructibleWatermelon I did some minor editing for clarity
 
@DestructibleWatermelon its clear, IMO, but pretty trivial. Its basically keeping a running total of *, subtracting one each time
 
6:59 AM
@NathanMerrill Alright, that would work
 
Yeah, it is easy, but that's part of the point..?
 
just making sure you knew. I'm not wanting another "Count the rectangles" on my hands :)
 
Ah, in my actual controller, I did the following
suits = ["S", "H", "C", "D"]
ranks = ["2", "A", "K", "Q", "J", "T", "9", "8", "7", "6", "5", "4", "3"]
deck = []
card_values = [''.join(i) for i in itertools.product(ranks, suits)]
 
I also have a Product class (because there's no itertools in Java)
though, I think it'd just be easier to do 2 for loops
 
True. Man, this is pretty old code. 7 months, at this point
 
7:03 AM
I love looking at old code and thinking how terrible I was
well, I'm going to bed. If you run into any problems (with Java or my controller), I'll be happy to help
 
Thanks. I'll let you know how it goes
 
@betseg You have got the association bonus! Congratulations!
 
7:22 AM
@Dennis oh yes, they're equivalent but I was just mentioning that what he wrote was different from what the code was doing
 
7:34 AM
@Mego I outgolfed Python using C!
i,j;f(n){char _[3*n];memset(_,95,3*n);for(i=n;i--;printf("%*.*s\n%*s/,%.*s,\\%s\n",j+n+1,j+j,_,i,"o"+1-i%2,j+j-2,_,"o"+i%2))j=n-i;}
 
7:49 AM
@orlp what does %*s and %.s mean?
 
@betseg the star is a placeholder
printf("%*s", 10, "test"); is the same as printf("%10s", "test");
 
I think that in a language where function declarations are shorter, the recursive method would be better than the iterative method for InterpretMe
 
@orlp oh ok
 
0
A: Sandbox for Proposed Challenges

AbbathConvince your PC that it is actually in fact, a Mech Mechwarrior was a popular game in the BattleTech franchise where you pilot giant mechs against other giant mechs. One of the notable things about the game is the time when you turn on your mech, where you are greeted by a synthetic voice which...

 
@NewSandboxedPosts wat
 
7:58 AM
I have this golf as well, which is barely not shorter:
c,i;f(n){for(i=n;i--;){
    char*p=" _\n o/,_,\\o\n";
    int C[]={i+1,c=n+n-i-i,1,i&~1,i%2,1,1,c-2,1,1,1-i%2,1};
    for(c=0;p[c];)C[c]--?putchar(p[c]):++c;
}}
 
only 3 stars to go to have Conor O'Brien
 
@TùxCräftîñg 2
 
Wat stars u talkin bout
 
15 hours ago, by Cᴏɴᴏʀ O'Bʀɪᴇɴ
Iff this message reaches thirty stars, I will make my name ASCII-only.
it's on the starboard
 
I can't see dem on mobile
 
8:11 AM
Hi
 
@TùxCräftîñg how are you
 
@Sherlock9 I don't understand your last question
 
That's fair
 
8:17 AM
isn't p(1, q) unknown?
we don't even know if there is a path at all, for general q
that's the collatz conjecture
 
only 1 star to go
 
Well, for integers < 2^31 (which I should add that), it is known that they reach 1
 
that doesn't matter
also you quickly mention diagonalization but do not further explain
finally I'm not convinced at all that your algorithm will always result in the shortest path
 
@NathanMerrill Yeah, pretty sure I did
@NathanMerrill It's the bit that replaces icons (at least in chat) IIRC, works fine for me
 
@Sherlock9 you didn't address my other concerns
 
8:23 AM
@orlp The idea is for you to find the shortest path with those four instructions
@orlp I'm working on it
Let me type
 
@Sherlock9 then do not use the word 'shortest'
 
Why not?
 
im looking at emojicode docs, this is interesting: booleans: 🍦 astatictrue 👍 and 🍦 astaticfalse 👎.🍦 means static (frozen)
 
your algorithm may or may not result in the shortest path
until proven you shouldn't say it does
 
I don't. I'm saying that of several possible paths, there should be a shortest
 
8:25 AM
@Sherlock9 unless I misread your algorithm there is only one possible path
at no point is there a 'choice'
 
You have. a(7, 3) could run 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1, 2, 4, 8, 16, 5, 10, 3
 
@NathanMerrill Oh nvm, never noticed my userscript updated so quickly
 
0
Q: Updating answers a lot

TheLethalCoderWhen writing answers I usually post the first slightly golfed version when it is working. I then proceed to golf it down further making various edits as I go. I know it is good to update as you get a better answer, but is it dis/en-couraged to make a lot of edits in a shortish time?

 
15 hours ago, by Cᴏɴᴏʀ O'Bʀɪᴇɴ
Iff this message reaches thirty stars, I will make my name ASCII-only.
only one star to go ;_;
 
@TùxCräftîñg Don't worry, that shouldn't take too long
 
8:31 AM
@Sherlock9 now I'm super confused
the first step is 7 -> 22
that's x3 + 1
but I thought we were studying the reverse?
 
Nope
 
which means only x2 and -1 / 3
 
Forward and reverse
 
that... has nothing to do with collatz
 
The steps are related to Collatz
 
8:33 AM
the whole point of collatz is precisely an iterated process leading to a cycle
this... is something entirely different
so
if I understand you correctly
you have four possible operations
ops = [lambda n: n*2, lambda n*3 + 1, lambda n//2, lambda n: (n-1)//3]
the first two are always usable, the latter two only if n%2 == 0 and n%3 == 1 respectively
 
Yep
 
using applications of those four operations, go from integer a to integer b in the shortest path
@Sherlock9 I suggest getting rid of the entire 'chain' and 'diagonalization' part of your challenge
just reduce your challenge to a(p, q)
 
@CᴏɴᴏʀO'Bʀɪᴇɴ or i should say @ConorO'Brien?
 
@orlp Done. Apologies for getting a bit snippy
 
@Sherlock9 I refreshed
but it still mentions the chain and n
 
8:45 AM
How's that?
Oh
 
You want me to get rid of the sequence bit
 
yes
it doesn't add anything to the challenge
 
Well, for goodness' sake, I had that Sandboxed for two months and you're mentioning this now?
 
I never look at the sandbox
unless specifically linked to me
 
8:47 AM
Sure, it adds stuff to the challenge. It adds for loops
 
@Sherlock9 also your examples are incorrect
11, 22, 44, 88, 29, 58, 19, 6
not
11, 34, 17, 52, 26, 13, 40, 20, 10, 3, 6
 
@orlp You can only go 3*n+1 when it's odd and going towards 1
 
@Sherlock9 that was not what you agreed to earlier
 
Sorry I misread your lambdas
 
22 mins ago, by orlp
ops = [lambda n: n*2, lambda n*3 + 1, lambda n//2, lambda n: (n-1)//3]
22 mins ago, by orlp
the first two are always usable, the latter two only if n%2 == 0 and n%3 == 1 respectively
 
8:58 AM
I know, I know, I misread
 
@Sherlock9 also, what does it mean to 'go towards 1'
 
You know how you can visualize the Collatz conjecture like a tree?
Think of going from one branch to the other
 
@Sherlock9 that doesn't work for you
since you have both forwards and backwards
 
Down a branch towards the root, and back up again to move away from the root
Edited again. Removed any mention of going towards or away from 1. Let me know if anything else is messed up
 
@Sherlock9 maybe put it like this
available operations:
n * 2       always
n // 2      if n % 2 == 0
n * 3 + 1   if n % 2 == 1
(n-1) // 3  if n % 6 == 4
 
9:11 AM
That works. Thank you
 
0
A: Construct the Jacobian matrix

Leaky NunCheddar, 79 49 bytes m->n->(|>m).map(i->(|>n).map(j->"df%d/du%d"%i%j)) Apparently a fork of this answer. For 3,2 returns: [["df0/du0", "df0/du1", "df0/du2"], ["df1/du0", "df1/du1", "df1/du2"]]

\o/

 Cheddar

For discussion of the design and development of the Cheddar pr...
advertisement
 
@LeakyNun Alrerady on it
 
Today would have been the day I had logged in on 100 consecutive days. Hadn't I forgotten to log in this sunday... Feel free to weep with me
 
@MᴀʀsUʟᴛᴏʀ alright
@BassdropCumberwubwubwub Do my challenge xd
 
@LeakyNun Sadly I haven't had much time lately to do challenges. Work & life are basically consuming all my free hours
 
9:26 AM
in Tavern on the Meta on Meta Stack Exchange Chat, 1 min ago, by SmokeDetector
[ SmokeDetector ] Link at end of answer: Turtles All the Way Down by nhabep on codegolf.stackexchange.com
 
-3
A: Turtles All the Way Down

nhabepou can use literal newline to save bytes tổ yến sào

wat
 
Get down and flagging people
It's spam.
 
@Sherlock9 what is your shortest golf?
 
Another constant output challenge:
@Zgarb You may be interested to use J to do it
0
Q: Print a 10 by 10 grid of asterisks

Leaky NunTask You are to print this exact text: ********** ********** ********** ********** ********** ********** ********** ********** ********** ********** Specs You may have extra trailing newlines. You may have extra trailing spaces (U+0020) at the end of each line, including the extra trailing ...

 
@LeakyNun I'm on mobile now, let's see if I have time later.
 
9:30 AM
halp i need help golfing i=>/^((-?[1-9]\d*)|defined|found|on|success|t(rue)?|y(es)?)$/.test(i)
 
Ah, the memories.
@MᴀʀsUʟᴛᴏʀ I thought [0-9] is \d
 
@LeakyNun whoops, fixed
@LeakyNun wait is console/REPL's implicit printing allowed?
 
1
Q: Print a 10 by 10 grid of asterisks

Leaky NunBackground This is a standard textbook example to demonstrate for loops. This is one of the first programs I learnt when I started learning programming ~10 years ago. Task You are to print this exact text: ********** ********** ********** ********** ********** ********** ********** *********...

 
@LeakyNun also does alert count as printing
 
@MᴀʀsUʟᴛᴏʀ ask the consensus
@MᴀʀsUʟᴛᴏʀ ask the consensus
 
9:40 AM
halp idk where the consensus is
 
It's in the cloud.
Wow, four python answers in ten minutes.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ u haz 30 ⭐
8
 
@MartinEnder $ is probably shorter than #.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ haha! Time to pay up!
 
@Zgarb nice, I thought it would reshape to match the dimensions of its left argument.
 
9:52 AM
@orlp Out of any of my golfs?
I don't really remember
 
@Sherlock9 I mean for the collatz
 
I actually haven't come up with my own answer yet
I finished editing and went to finally finish Undertale. I've been putting it off for ages now
 
have you guys ever peeked into heaven through a small window?
I have
 
10:07 AM
@flawr to be pedantic, isn't any mapping of the integers to the integers a graph?
 
user214599
Is there literally a O(n^n) algorithm?
 
for i in range(n):
    for i in range(n):
        pass
 
@MatthewRoh do my challenge xd
 
Is sorted(base64_input) the same as sorted(input)?
 
@ArtOfCode this is O(n^2)
 
10:15 AM
@MatthewRoh look like a enormous memory eater
even bubble sort is more efficient
 
lol, my challenge gets +2/-2
too controversial for u
 
If i had a pc i would've done it using Emojicode
 
i am trying to do it in golisp
 
I know what programming in BF is like now
 
@betseg Emojicode? o_O
 
10:22 AM
clicking the execute button and praying
 
@zyabin101 emojicode.org
wat
 
@betseg You forgot the http:// :P
 
@zyabin101 Use your language to do my challenge xd
 
@zyabin101 lel
 
@LeakyNun Which challenge? :3
 
10:24 AM
0
Q: Print a 10 by 10 grid of asterisks

Leaky NunBackground This is a standard textbook example to demonstrate for loops. This is one of the first programs I learnt when I started learning programming ~10 years ago. Task You are to print this exact text: ********** ********** ********** ********** ********** ********** ********** *********...

 
eleven'd
 
user214599
@Leak ;_; My code is worse than java
 
because MOD ABUSE!!!1!!11!!!!111!!!eleven!!
 
@ArtOfCode mod abuse !11!!!!!!!
 
for[range@10{(_)writeln@*["**"5]}]
 
10:26 AM
ninja'd
 
what a mess
 
@TùxCräftîñg quel langage est-ce? / what language is this
 
CMC: do my challenge in Cheddar
@MatthewRoh just post it
 
@orlp It does describe a relation on the graph. Generallly if you have a set of vertices V and a function f: V->V then you can interpret (V,{(v,f(v))|v in V}) as a directed graph
 
user214599
10:27 AM
@Lea I did.
 
In this case my first reaction was just that the edges again just depended on similar properties of each node.
 
@MatthewRoh nice
 
1
A: Print a 10 by 10 grid of asterisks

TùxCräftîñgGolisp, 34 bytes for[range@10{(_)writeln@*["**"5]}] Due to a "bug", I can't concatenate strings...

 
@orlp I posted an answer. It's not a great answer, but it works
 
@TùxCräftîñg How do you pronounce "je fus"?
In particular, do you pronounce the last "s"? If no, do you do liaisons on it?
 
10:31 AM
why is my bf code not working ;_;
 
@DestructibleWatermelon what code
 
it's pronounced like je fu, the s is muet (idk how to translate this)
 
@TùxCräftîñg muet is silent
 
@ArtOfCode MOD ABUSE!!!11!!!!!11!!!!
 
10:32 AM
there was an extra >!
 
@TùxCräftîñg then do you do liaison with it?
@DestructibleWatermelon where is your code
 
I'm still making it
 
@LeakyNun no, the s is silent
 
@TùxCräftîñg so "je fus un étudiant" is pronounced like "je fu un étudiant"?
 
nvm there is a liaison
 
10:36 AM
@TùxCräftîñg is the liaison pronounced as /z/?
 
kthx
 
@LeakyNun ;_; installing dependencies is taking so long
 
@MᴀʀsUʟᴛᴏʀ lol
 
why is my program printing spaces instead of newlines :(
 
10:48 AM
@CᴏɴᴏʀO'Bʀɪᴇɴ Shows on mobile chat for me (iPad)
0
A: Print a 10 by 10 grid of asterisks

Mars UltorCheddar, 21 bytes print('*'*10+'\n')*10 Yet another straightforward answer.

 
@MᴀʀsUʟᴛᴏʀ nice!
 
@LeakyNun It's exactly the same as the Python2 answer
 
@MᴀʀsUʟᴛᴏʀ it won't be
 
@LeakyNun ?
 
@MᴀʀsUʟᴛᴏʀ after you do as i say to save a byte
 
10:52 AM
@LeakyNun idk how do use that in repl so can't test
 
@MᴀʀsUʟᴛᴏʀ your repl borked?
 
@LeakyNun no, it's just that there's no multiline support yet
 
@MᴀʀsUʟᴛᴏʀ but you can run from file?
 
@MᴀʀsUʟᴛᴏʀ outgolfed you haha
@MᴀʀsUʟᴛᴏʀ there is partial multiline support
try typing (1+\n2)
where \n is the newline
 
0/10 you didn't print
 
10:57 AM
hooray i did a bf answer
or I'm about to post one
nobody ninja's me or the die
 
@MᴀʀsUʟᴛᴏʀ alright
that's a hint for you to golf out some bytes
 
> Print a 10 by 10 grid of asterisks
 
@MᴀʀsUʟᴛᴏʀ ... of course you can use a function
 
@MᴀʀsUʟᴛᴏʀ come on
this isn't your first day on code-golf
 
10:59 AM
Not really fair, everyone else is printing
Plus, you explicitly state the word 'print'
 
@MᴀʀsUʟᴛᴏʀ alright
 
Only the golflangs with implicit I/O aren't printing
 
@MᴀʀsUʟᴛᴏʀ alright
0
A: Print a 10 by 10 grid of asterisks

Leaky NunCheddar, 24 bytes print(['*'*10]*10).vfuse '*'*10 builds the string **********. Then, ['**********']*10 creates 10 copies of that string. Then, vfuse joins by newline.

satisfied?
 
@LeakyNun 0/10 longer
vfuse is too long
 
@MᴀʀsUʟᴛᴏʀ ಠ_ಠ
 
11:02 AM
@LeakyNun :P
btw, verified that literal newline works
:D Cheddar is outgolfing Python
 
@MᴀʀsUʟᴛᴏʀ \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/
 
I don't know what Jquery is but it just made me forcequit firefox :(
I couldn't even click stop script darnit
 
@DestructibleWatermelon It's good and does all things
 
@DestructibleWatermelon That may not be jQuery's problem.
 
btw, that's almost certainly not a jQuery problem, it's a problem with whoever used it
 
11:08 AM
@DestructibleWatermelon jQuery is a very popular JavaScript library.
 
help, what's the convention for C#, are functions allowed?
 
What the frig was google doing on by browser pages <_<
Oh google probably manages a site or something
 
@DestructibleWatermelon Google Analytics maybe?
 
yeah, if you use that Google basically provides info on your site (e.g. visitors, origin etc)
 
$ vim -s "qqi*\x1b9.o\x1bq9@q"
Cannot open for reading: "qqi*\x1b9.o\x1bq9@q"
ಠ_ಠ
 
+4/-3 for my challenge
 
@LeakyNun did we just simultaneously ninja each other?
 
@DestructibleWatermelon yes lol
 
@LeakyNun your answer is distinct enough that you should probably post it yourself
 
11:16 AM
@DestructibleWatermelon nope.
 
0
A: Print a 10 by 10 grid of asterisks

TùxCräftîñgVim, 13 bytes qqi*♥9.o♥q9@q Replace ♥ by <ESC>

 
I didn't come to this site to just post other people's answers anyway
 
0
A: Sandbox for Proposed Challenges

AdvancidRules Your program must take no input and print this text. You can have trailing newlines, and spaces after lines. You must not use a builtin or load the text for an external resource. Score This is code-golf, shortest answer in bytes wins. Did you guess what was the text?

 
brb in a long time :/
 
@LeakyNun you did a good golf now post it darnit
 
11:18 AM
@DestructibleWatermelon nope
 
@LeakyNun well I can tell you right now, I'm not posting your answer
 
@DestructibleWatermelon lmao
 
I like how it only took you a minute to point out my post was badly golfed but not to updoot for trying ;_;
</subtle>
 
0
A: Print a 10 by 10 grid of asterisks

Leaky NunBrainfuck, 47 bytes ++++++++++[->++++>+>+<<<]>++>[-<..........>>.<] Try it online! ++++++++++[->++++>+>+<<<] set the tape to 40 10 10 >++> set the tape to 42 10 10 [-<..........>>.<] come on

satisfied?
 
11:20 AM
@DestructibleWatermelon good
<peace out />
 
Does anyone know if I have to put spaces between emojis in Emojicode? I can't test it since I don't have a compiler on my phone.
 
11:38 AM
back
 
11:48 AM
995 rep
 
@TùxCräftîñg Congratulations!
 
Only 29 away from a round number milestone!
 

« first day (2014 days earlier)      last day (2829 days later) »