« first day (3188 days earlier)      last day (164 days later) » 

12:14 AM
What format should I use for a simple config file for a Python program?
I'd use JSON, but it's too annoying that there are no comments.
I need to find a good way to phrase how moves are selected in Totally Blind Chess.
Basically, the player generates an infinite stream of moves (most of which will be illegal).
On the player's turn, the first legal move (that hasn't been processed already) from the output is chosen.
Any ideas, rubber ducky?
TL;DR: a superset of JSON that supports //, /* */, and # comments
12:31 AM
I don't want to make users install a dependency, but it looks like I could just drop in commentjson.py into my source tree.
That is, if I use a version before the commit on July 7 which inexplicably introduces an external dependency.
1:24 AM
@WheatWizard Before you go, here's an ungolfed Klein quine I'm working on
1:43 AM
which works in all topologies
2 hours later…
3:16 AM
CMC: Given a list of numbers n :: [Int] and function f :: Int -> Int -> Int, for each value i in n, for each value j other than i in n, get the result f i j. You should end up with a result that's a list of lists of ints, Example: for n = [1, 2, 3, 4] and f = (*), the result would be [[2, 3, 4], [2, 6, 8], [3, 6, 12], [4, 8, 12]]
3:28 AM
@Pavel Are the list values distinct?
@feersum Not necessarily
So are equal values at different indices considered to be "different"?
I think the spec has further ambiguity but I'm bored of nitpicking it now :)
@JoKing Cool! Feel free to keep me updated.
3:37 AM
:O Wheat Wizard is Wheat Wizard
Oh. I just read about WW leaving. :(
But I don't know a whole lot about JS golfing :P
Bonus points for actually supporting 0s
50 bytes by accepting curried function as argument
3:53 AM
Oh yeah filtering first would help
And I forgot about 0s :P
6:39 AM
@H.PWiz indeed. users leon-w, TFeld00, and new user ntsd all knew about it previously
@Sherlock9 21 bytes
@Bubbler Ooh well done
2 hours later…
8:26 AM
A: Sandbox for Proposed Challenges

Galen IvanovIs it a Hamiltonian cycle on a grid? A Hamiltonian path in a graph is a path that visits each vertex exactly once; a Hamiltonian cycle is a Hamiltonian path that is a cycle – the path forms a simple closed loop. In this challenge the graph will be a n x n grid, where n is an even number greater ...

8:49 AM
@feersum how about JSON5?
CMc: GIVEN A STRing OF PrINtaBLe AsCiI, alTERnAteLY UpPEr- aND loWeR-cASE eaCH LETter cOnsidEReD INdivIDuAlLy.
so for example "uncopyrightables" would become all uppercase, while "referee" would become "REFerEe".
9:04 AM
@Neil I really don't understand this scheme
What does 'considered individually' mean?
You say the input string is printable ascii, did you mean lowercase letters?
I think it means "for each letter, alternate its case for every time it appears"
Jelly, 11 bytes, assuming there aren't any guarantees about the case of the input
9:28 AM
@UnrelatedString last one should be "MIXED CASe is PERmISsiBLe, Or NoT?", no?
...it should be, yeah
I knew there was something wrong with the ċṪ
it really bugs me sometimes that Jelly's first and last element builtins modify the argument
wait not it's not
okay I just don't know what I've done wrong then
9:45 AM
@Neil perl -p, 29 bytes: s/./++$f{lc$&}%2?uc$&:lc$&/ge
Everything about golfing in Perl hurts my soul, I so hate ++$f{...} for initializing %f and incrementing values in it that might not yet exist.
wait what
do you think a numerical integration task would be acceptable ?
10:05 AM
@Neil [2 byte keg program that would work given the interpreter was working] (tio.run/##y05N////4YKGR/O3//9fmpecX1BZlJmeUZKYlJNa/F83ORcA "Keg – Try It Online")
if I'm reading the docs right, that wouldn't care about which letter is which
2 hours later…
12:11 PM
I love that my work laptop has a buggy audio driver bloatware enhancement program (Maxx audio) that idles at like ~15% CPU usage
2 hours later…
2:08 PM
Q: Print your char count in words, in many languages

AndrewThis challenge is inspired by my earlier challenge "Create a program that prints the amount of characters it has, in words". This challenge's rules are simple: make a program that prints its character count, in words, which works in as many languages as possible. Each programming language the p...

3:01 PM
> # has to be enabled, otherwise it will be disabled
Anyone familiar with PingFederate
Q: Busy beaver of sorts

AndrewI'm surprised this hasn't been done yet, but here we go. Create a program which prints some number of 1s (ideally as large as possible) before halting. The rules are simple: Your program is bounded to 50 bytes in size. Your output must only be a row of 1s (plus trailing newline if it has to b...

Q: Calculate the internal angles of a polygon with N sides

JachdichThis is a simple challenge: given n in any way practical (Function arg, stdin, file, constant in code) output the internal angles of a polygon with n sides. Standard loopholes are allowed but only if they are creative/funny. Please don't do things that have been done to death. As usual, smalles...

3:21 PM
m=lcm(a0, a1, ..., an), calculate a0 and an for given m
what would be the doable way of solving this?
or at least telling is it even possible
Two hints:
1) the answer isn't unique
2) you can get an answer in one byte if you pick the right language
3:36 PM
there's a builtin for this? cmon xD
I know a lot about this by now, and I'm thinking about prime factos
kind guys at freenode have already explained me the hard math
There's a builtin for this in plenty of languages, you just need to know what to look for
you've intrigued me
I'll give you one last hint. Think about the words "idempotent" and "associative"
btw, the form has changed:
<kspalaiologos> m=lcm(n,n+1,n+2,...,n+o), and find both n and o
<kspalaiologos> (Given M)
Now that's a different one
3:39 PM
yeah, this changes stuff a little bit
I've overlooked a crucial part
But there's still a trivial solution with a built-in in a couple of languages :)
last hint :p?
Think about the space of trivial solutions to problems with so few constraints ;)
well, that presumes I'm too stupid now to attempt this
I'll be a little more specific: It has a one-byte solution in a few languages.
One more hint: that byte is a digit.
3:44 PM
Fiiine, another hint: that same solution works for a whole lot of related problems, namely those that can be defined using the map-reduce operator.
what the heck is map-reduce
I'm a simple low level guy
What is the definition of LCM?
Are you just trying to say that m = lcm(m)?
ie. n=m, o=0
least common multiple
@H.PWiz it might be rule bending
i don't really want to go this direction
I mean, I've already got a brute force solution for small numbers
but in the edge case, there will be around one and 324 zeros iterations
3:49 PM
@H.PWiz shh, that's a spoiler
well, if so, it's possibly rule bending
and I'd like to stay away from that
OK, what's the new objective?
let's just assume that there's at least two of these numbers in lcm
it would be safer
and thats what i've done with my brute force
Fine. Let's talk about prime decomposition then.
There's only one pair of numbers to check if you know that it's a pair.
If you know there are three numbers, you have two options. If you know there are four, you still only have two.
given m=38, it's prime factors are 19 and 2
they are not consecutive though
3:58 PM
indeed, they aren't. And that tells us something about the space of solutions.
If each factor comes from a different number, what options are there? If they come from the same number, what options are there now?
now, writing code that does that kind of deductions isn't as easy as doing them oneself, but it does help prune quite a few numbers. I'd start by iterating over the multiples of the largest factor.
I've got an algorithm idea
wait a second, let me implement it
Step 2: check in each direction how far from that multiple you can go
Step 3: determine how far you need to go
OK, I like that challenge.
I've looked at list of divisors of 504
and I've been enlightened XD
I can't believe how stupid I am
4:24 PM
Happens to the best of us
4:48 PM
I've nearly nailed it
5:07 PM
Q: Reverse code golf "Hello World"

floodfWe have tons of hello world challenges here. Here's a simple one with a twist: print hello world with the longest code possible. Rules All code must be executed. The code cannot have any comments. It must print hello world in all lowercase with one space and no punctuation. It cannot print any...

2 hours later…
7:13 PM
External third-party user receives an external third-party email from someone@notremotelylikeourname.com with spelling mistakes and order numbers that don't match our system. User clicks link in the email and enters credentials, then (several days later) complains to us because she got phished. Her excuse? The email "had our logo in it" so it looked legit.
@AdmBorkBork Then you should probably change your logo in at most -1 weeks.
And definitely don't make the logo publicly accessible on our website.
@AdmBorkBork Why would anyone even think about publishing a logo.
anyone could steal it
brb, stealing your avatar
7:30 PM
"How could I possibly have known?"
and that is why i don't talk to clients :]
i would get fired so fast
2 hours later…
10:07 PM
Any mods on that could unfreeze a chatroom for me?
@Mego @DJMcMayhem
Thanks, @DJMcMayhem It's the Japt one at chat.stackexchange.com/rooms/34018/japt
Is it possible (or even allowed) to make me a "co-owner" of that room?
Normally, I'd say ask the current owner, but they haven't been on in a while, so I guess I could just add you
Unfortunately, that won't let you unfreeze
10:16 PM
Only if it's absolutely OK. We usually survive well enough without ETH when he's not around for a while. Although this has been a longer "while" than usual.
10:54 PM
Q: Shorthand Combined Functions

Jono 2906I was doing some investigation into trig functions using compound angles recently, and noticed that the results are really long and tedious to write: $$ cos(A+B) = cosAcosB - sinAsinB\\ cos(A-B) = cosAcosB + sinAsinB\\ sin(A+B) = sinAcosB + sinBcosA\\ sin(A-B) = sinAcosB - sinBcosA\\ $$ $$ tan(A+...

11:19 PM
Q: Zsh: Functions and Math functions

GammaFunctionI have been using functions for Zsh submissions for some time. I typically submit the body alone, as the body can be run as a full program with no modification: afunction arg1 arg2 vs ./aprogram arg1 arg2. If recursion is needed, $0 can be used. I saw this recent challenge, which is a purely mat...


« first day (3188 days earlier)      last day (164 days later) »