« first day (3687 days earlier)      last day (1139 days later) » 

12:07 AM
0
Q: Is this Game of Go configuration fully alive?

BubblerBackground This challenge is about the Game of Go. Here are some rules and terminology relevant to this challenge: Game of Go is a two-player game, played over a square board of size 19x19. One of the players plays Black, and the other plays White. The game is turn-based, and each player makes ...

 
 
1 hour later…
1:14 AM
Quick question: is it acceptable to output a sequence in reverse in infinite sequence challenges?
 
How do you output something infinite...in reverse?
 
@RedwolfPrograms Sorry, I meant all elements up to n
I'm still working on reversing infinite sequences
@RedwolfPrograms This looks promising!
 
 
1 hour later…
2:20 AM
0
A: Sandbox for Proposed Challenges

hakr14Lists of power code-golf kolmogorov-complexity Generate the following list of lists. [[0], [1], [2, 4, 8, 6], [3, 9, 7, 1], [4, 6], [5], [6], [7, 9, 3, 1], [8, 4, 2, 6], [9, 1]] This is code-golf, so shortest answer (as measured in bytes) wins.

 
3:03 AM
Ah frick. The apl comment character () now looks sus to me
fricking amogus
 
you're not alone
 
when the code golf is sus: 😳
3
 
yep
also hey i've got a question
so
i know this one lenguage derivative
where the program is actually just the length of the corresponding lenguage program
so like a googol-byte long lenguage program would become a googol as the code in that language
now i know the name starts with a G
at least i think
but i dont remember the name
have you got any idea?
 
ah right! thx :)
 
3:13 AM
It's apparently a unary derivative instead of lenguage
 
oh
hm
ok then
that is the one i was looking for though thanks
 
i'll take a look
 
 
5 hours later…
7:54 AM
For the lack of LotM activity... I guess it's partly due to everyone being busier in March?
 
8:08 AM
0
Q: Why is my Oracle Linux Server release 7.8 VM Throwing "eth0: bad gso: type: 1" Messages

Daniel LeeI have an Oracle 7.8 Linux server with terrible network performance. When I run dmesg, I see it is spamming several "eth0: bad gso: type: 1" messages per second. I tried disabling gso/tso on the interface, but it doesn't help.

 
8:45 AM
0
A: Sandbox for Proposed Challenges

BubblerLargest single-turn score in Match Land code-golf array-manipulation grid Background Match Land is a mobile game that falls into the Match-3 genre (think Bejeweled or Candy Crush Saga series): swap two orthogonally adjacent pieces to make a 3-in-a-row or longer. However, Match Land has an additio...

 
 
1 hour later…
10:05 AM
so confusing that Language of the Month is 2020 edition
 
We could change it to "2020s edition"
 
hmm when shall I submit a factor answer
 
@cairdcoinheringaahing Or just "season 2"
@Razetime Anytime :)
 
10:42 AM
> How it works
It's a built-in.
Best explanation I've seen on the site :P
 
Which answer?
 
21
A: Fluctuating ranges

Dennis05AB1E, 1 byte Ÿ Try it online! How it works It's a built-in.

 
 
3 hours later…
1:33 PM
@Bubbler I can't get the 50 rep bounty now because I already answered in Factor last month :(
 
 
2 hours later…
3:59 PM
CMQ: Which do you think is better, zero-indexing or one-indexing? (and not just because "that's how __ language has always been doing it")
 
Zero, because 99% of the time mathematical calculations on the indices themselves work better
For example, indexing into something and wrapping around, with zero indexing it's simply modulo the length, but with 1 indexing it's a pain
 
I feel like there should be a variant of modulo with a lower bound built into all languages
 
that doesn't make much mathematical sense
 
@rak1507 Doesn't have to make mathematical sense, as long as it's useful to programmers :P
 
disagree
 
4:05 PM
@rak1507 Why does making mathematical sense matter?
 
It just should
 
But if it's not going to be called modulo and wouldn't really be related to any actual mathematical operation, it won't really be confusing
 
eh maybe
 
Mathematica actually have something like that I think?
 
This is what I meant (not sure if it works for negative numbers)
@user202729 Do you know how it works?
 
4:14 PM
Read its reference Mod.
 
Thanks
 
@user 1 indexing, cause that's how Jelly's always been doing it :P
 
5:02 PM
I just hacked together my own compression algorithm with absolutely no experience in the field. It compresses a file of lowercase words separated by newlines by about 57%, is that good?
 
@cairdcoinheringaahing Humor me. What if you were designing Jelly? What would you choose?
 
@RedwolfPrograms how does that compare to other compression algs?
 
I'm trying gzip right now
 
@RedwolfPrograms That doesn't seem bad at all if you have no experience - it'll just get better. This Wikipedia article mentions 80% and 91%, though, so there may be better algorithms (although perhaps not for the format you're using)
 
I get 70% with gzip
 
5:06 PM
consider a number in base b. Every "digit" is a number from 0 to b-1. Let's say we have the list of "digits" and we want to convert it into a number in base 10. What is a nice compact way of doing that?
 
I'll try doubling the rounds. That should compress it more, but it's really slow.
 
@Anush In Scala? (0/:digits)(_*b+_)
 
0
A: Sandbox for Proposed Challenges

EtheryteSequential Multiplication Magic Squares code-golf (Inspired by this question for a 5x5 and this question for a 4x4 magic square on the Puzzling SE sites.) For this challenge, a sequential multiplication magic square is an NxN square filled with numbers 1..N² where the product of any M-th row equa...

 
@Anush Set your accumulator to 0, then for every digit, multiply the accumulator by b and add that digit to it.
Converting from base 10 to another base is (imo) harder
 
@Anush depending on the language there might be some clever way to do it too
 
5:09 PM
@rak1507 that was what I was hoping
 
well what language
 
@user I guess going backwards?
 
@Anush What challenge are you working on?
 
how about python?
@user just for fun
 
@Anush Right, but you don't know the length of the list at first (unless you use a logarithm, which is annoying)
 
5:11 PM
let's say we know the length of the string. It is always of length 8
 
@Anush The resulting base b number always has 8 digits? Then it would be pretty easy, I guess
 
the input base b number always has 8 digits
the resulting base 10 number can have more or less
 
@Anush Oh sorry, I thought you were talking about decimal -> base b, not the other way around
 
sorry.. base b to decimal
 
If you're converting to decimal, you don't really need to know how many digits there are
 
5:14 PM
ok
 
@user Probably 1 indexing, I actually find it really useful in golfing
 
@user cool!
 
Although I'd add a single byte builtin for J’ cause too many challenges on the site demand 0 indexing
 
what about sum(d*b**i for i, d in enumerate(digits[::-1])) ?
did I win the golfing ??
 
5:17 PM
Hmm, doubling the rounds didn't compress it much further at all
 
@Anush That works too!
 
@user woohoo! I never win golfing
 
Jan 22 at 15:26, by user
They fear you for the expert golfer you will be some day.
You may not beat Jelly answers, but I'm sure you can beat other Python answers
 
:)
 
Just finished decimal to base b. It's a lot more complicated, but I only know basic Python, so it can probably be made simpler
 
5:22 PM
@user cool!
does it give the same answer as mine?
 
@Anush Can I see yours?
 
sum(d*b**i for i, d in enumerate(digits[::-1]))
@user ^^
 
@Anush That one's for base b to decimal, right? The one I just linked was for doing it the other way around (which is why it's so much longer)
 
oh I see
sorry yes
 
 
1 hour later…
6:43 PM
@user Using digits.append and return digits[::-1] is more Pythonic than digits.insert; Also, divmod is better than using % and // :) Try it online!
Because non-golf Python coders get irrationally angry if Python code isn't as "Pythonic" as possible :/
 
@cairdcoinheringaahing Oh cool, I didn't know Python had a divmod function. Is reversing the list later more efficient?
@cairdcoinheringaahing That's true for any language, I guess.
 
@user No idea about efficiency, but pretty much every question on Code Review that uses .insert is told in no uncertain terms that it is bad
No idea why it's bad tho
 
Huh
I specifically looked up "python prepend" and got that :\
614
Q: What's the idiomatic syntax for prepending to a short python list?

hurrymapleladlist.append() is the obvious choice for adding to the end of a list. Here's a reasonable explanation for the missing list.prepend(). Assuming my list is short and performance concerns are negligible, is list.insert(0, x) or list[0:0] = [x] idiomatic?

 
@MattM. If you insert at the front of a list, python has to move all the other items one space forwards, lists can't "make space at the front". collections.deque (double ended queue) has support for "making space at the front" and is much faster in this case. — fejfo Mar 18 '20 at 14:49
 
@cairdcoinheringaahing Ah, that makes sense.
 
6:47 PM
Clearly the Pythonic thing is to use a module to supercede a builtin functionality :P
2
 
import base_conversion
 
Honestly, I'm not sure why all Python code golf answers aren't just import codegolf :P
> You don't usually want to repetitively prepend to a list in Python.

If it's short, and you're not doing it a lot... then ok.
From the third answer to ^ SO question
 
@cairdcoinheringaahing Perhaps "Python import" should be considered a different language :P
@cairdcoinheringaahing I'm the kind of person who clicks only on the first Google result and then ignores everything else :\
CMC: Write code that would be idiomatic for language X in language Y (e.g. Pythonic code in Java, C-like code in Haskell) (like a question, although obviously I'm going to post this as an actual question on Main)
 
@user vtc as unclear.
 
I wonder what "idiomatic" Jelly would look like? Presumably it's the shortest possible version of the code?
 
6:57 PM
@Adám I'd make a sockpuppet and vote to reopen, then :P
@cairdcoinheringaahing And full of unintelligible characters :P
 
Javascript in idiomatic english: that = window; (this || that).open();
Wait are there any languages with that as a keyword?
 
If so, the correct syntax should be that -> with the argument to the keyword after the ->
E.g. while (that -> integer != 5) { (that -> integer)++ }
 
@RedwolfPrograms What's that?
@cairdcoinheringaahing That's valid JS?!
 
No, it's not
 
Are you sure?
JS is weird
 
7:02 PM
Uncaught SyntaxError: Unexpected token '>' :p
 
> VM70:1 Uncaught SyntaxError: Unexpected token '>'
 
Maybe that --> integer might be
 
I know that-->integer is valid
But that --> integer isn't, I think
 
@user TBH that might be, and I don't really want to brick my browser by testing a while loop :P
 
7:03 PM
No wait, it works
 
Yay!
 
Interpreted as that-- > integer, of course, and those have to be variables
 
@user That's the "goes to" operator :P
 
Can't put a ++ after it, unfortunately
 
I need to add this to my fake Javascript tutorial
 
7:04 PM
Slides to:
3355
A: What is the "-->" operator in C/C++?

unsynchronizedOr for something completely different... x slides to 0. while (x --\ \ \ \ > 0) printf("%d ", x); Not so mathematical, but... every picture paints a thousand words...

 
@RedwolfPrograms I quite like the fake explanations for answers
Aim is to make it as wrong but as believable as possible :P
 
2063
Q: What does the ??!??! operator do in C?

Peter OlsonI saw a line of C that looked like this: !ErrorHasOccured() ??!??! HandleError(); It compiled correctly and seems to run ok. It seems like it's checking if an error has occurred, and if it has, it handles it. But I'm not really sure what it's actually doing or how it's doing it. It does look l...

Gotta love weird trigraphs
 
@cairdcoinheringaahing I could believe that
 
CMC: Find an answer of yours and "explain" it. The explanation should be believable, but the task its doing vs the explained task should be totally different, and the entire explanation should be completely false
 
7:13 PM
I wish there was a subdomain for these subjective kind of questions
 
@cairdcoinheringaahing Haha
 
@cairdcoinheringaahing so pick a random jelly answer and say it's doing something nonsensical? :)
 
@rak1507 That'd apply to most golfing languages :P
 
yep
 
7:17 PM
@rak1507 Nah, pick a Python answer and say it's JS :P
 
lol
 
I'll award a bounty to anyone who can convince me that a program in one mainstream language (Python/JS/Java/C/C++/C#/PHP/etc.) is actually in another language
 
@cairdcoinheringaahing Pick a Scala 3 answer and say it's Python
 
I kind of broke the rules but it's funny
 
7:19 PM
@user Pick Scala and say is the beta release of the new Java version :P
 
@cairdcoinheringaahing do polyglots count
 
@rak1507 No, it has to be a full on "lie" of an explanation
 
:(
 
> Creates a string, for the cat to play with
What cat?
 
@cairdcoinheringaahing I've actually mistaken Scala code for Java because it was written so poorly :\
 
7:21 PM
@cairdcoinheringaahing The cat plays with objects, which can be used to modify them. It's used to join the first and last name here, by turning the winking owl into a string for the cat to play with.
 
This answer looks like Python at first, but is actually in Dotty
 
Didn't know JS was so animal centric
Related main challenge - Locked and loaded closed
 
'avoid intrinsic obfuscated language like APL' lol
2
 
Before 2014 this site was wild :P
 
@cairdcoinheringaahing My best attempt (and the original)
 
7:48 PM
@user Yeah, I 100% believe that :P
 
@cairdcoinheringaahing It could probably be obfuscated more, but I based it on another answer that I wrote recently, just because they look quite similar.
 
 
2 hours later…
9:43 PM
0
Q: What assumptions can be made about the environment in Scratch?

qarzIt seems to be undisputed precedent for Scratch answers that only the code is counted when determining the bytes used for an answer (although, how to come up with the amount of bytes that the code takes up is disputed, but I'm not getting into that here). However, a Scratch program is more than c...

 
10:24 PM
@Bubbler Thanks to you (and the other generous donors) for putting up your hard-earned rep to reward the Best of 2020 winners. And thanks @cairdcoinheringaahing for the nomination!
 
10:43 PM
@Dingus No worries :) I had that answer saved for the Best Of since you first posted it :P
 
11:14 PM
@cairdcoinheringaahing I did that once with one of Neil's charcoal answers
 

« first day (3687 days earlier)      last day (1139 days later) »