« first day (2438 days earlier)      last day (2398 days later) » 
00:00 - 16:0016:00 - 00:00

4:00 PM
Which function gives the solution?
 
a!b
 
Ok
rem is faster than mod, /=0 is faster than >0. Not that either will make a massive difference though.
I think you really want a better prime test.
And maybe something for b^i mod p
 
p a=[2,3]++[x|x<-[5,7..a],and[mod x y>0|y<-[3,5..x-1]]] should be a little better
 
Yes, a little
 
4:39 PM
CMC: Given two integers that can both be represented as x^y, determine if the two 'y's are the same. If a number can be represented multiple different ways (e.g. 8^1 or 2^3) then always choose the representation with the larger y.
 
@DJMcMayhem testcase?
 
Truthy: (4, 9), (8, 27), (7, 6)
Falsy: (4, 5), (100, 18)
It seems like most inputs would be falsy actually
 
@DJMcMayhem Jelly, 6 bytes: ÆEg/€E
 
Anonymous
@DJMcMayhem Actually, 7 bytes: ⌠wiN⌡M═ (0 is truthy, 1 is falsey)
 
Anonymous
for each input: prime factorization, take exponent of smallest prime factor. Are all elements of the result unique?
 
4:47 PM
@DJMcMayhem Ugh, with [math]::pow I think PowerShell may sit this one out.
I'm guessing well over 100, probably close to 200.
 
@Mego Bug
 
@Mego smallest?
ninja'd
 
0
A: Sandbox for Proposed Challenges

LaikoniASCII Stock Exchange answer-chaining At the ASCII Stock Exchange, each character has a price. If a character is used more often, its price rises, otherwise the price decreases over time. Initially, each character has cost 10. [Meta: Is this to low/high?] After each answer, the character costs c...

 
Anonymous
@Sherlock9 12 and 20 can't be represented as x**y. They're not perfect powers.
 
@Mego 12**1
 
Anonymous
4:54 PM
Bah
 
Anonymous
For some reason, I was thinking y >= 2
 
@Mego (e.g. 8^1)
 
Maybe it would be better if y>=2
idrk
 
Anonymous
Then "Given two integers that can both be represented as x^y" is superfluous, because every integer can be represented as x^1
 
I know
 
4:57 PM
@Mego still your thing wouldn't work for any input containing 2^4 x 3^6 = 11664
 
How come?
 
"take exponent of smallest prime factor"
 
Anonymous
@LeakyNun That's not a perfect power, so for y >= 2, it wouldn't be a valid input.
 
@Mego it is
 
Anonymous
Oh wait
 
Anonymous
4:58 PM
Gah why aren't primes the solution to every problem
 
@Mego if you ask a number theorist, they'll probably say they are
 
Anonymous
I give up on fixing my flawed solution. keyboardflip
 
I've flipped many a keyboard when trying to fix flawed code
 
@Mego just port my solution
 
@Mego I'm trying to port Leaky's solution, but did you ever implement reduce in Actually?
 
5:08 PM
@J.Salle if anything primes are the problem, not the solution
 
Anonymous
@Sherlock9 Not directly
 
Anonymous
Y (the Y-combinator) with R works pretty well for reduce, given how Actually ignores erroring commands
 
@orlp HERESY
 
@Mego I see. Let me muck around with that for a bit and see what I come up with
 
I just found out that (on Windows 10, at least) the default screen buffer height of cmd is... OVER 9000!
 
5:12 PM
@mbomb007 please don't tell me you use that awful terminal
 
Anonymous
⌠⌠<your code here>⌡Y⌡R is a hacky reduce
 
@orlp I'm using it to run Python
 
@Mego Is there any particular reason why this isn't transposing?
Never mind, I'm being dumb
Actually, 11 bytes: ⌠w┬N⌠g⌡Y⌡M═
 
Anonymous
⌠g⌡Y should definitely be able to be written shorter
 
Anonymous
Especially because g vectorizes
 
5:26 PM
Actually, 8 bytes: ⌠w┬Ng⌡M═
 
AMD published their NVMe RAID driver. Which means up to 27GB/s read speeds on local disk (using 8 drives in RAID0).
 
5:43 PM
@mbomb007 I set that manually - it must have accidentally been sent to everyone else's machine.
 
6:01 PM
0
A: Sandbox for Proposed Challenges

GiuseppeSmallest integer as a product of given factors code-golf number-theory math Given a positive integer n and a list of integers f, find the smallest integer i such that i >= n and i is a product of nonnegative, integer powers of elements in f. You may assume that all elements of f will be at lea...

 
@orlp Yeah. With PowerShell, who still uses CMD?
 
@AdmBorkBork People whose computers run Windows 10 and so lag lots.
Any decent computer should be able to execute as many simultaneous processes as it has PIDs.
 
Pretty sure you'll run into context-switching limitations before you'll exhaust PIDs, though.
 
6:17 PM
@AdmBorkBork Bah. Who needs context-switching? Computers used to work fine when every program had the same memory mapped! Programs were nice to each other back then - not like today when they have to be pulled away from the CPU to let other programs have a turn. *mumble mumble*
 
And processes executed their instructions uphill, both ways, through six hundred forty KB of RAM. And they were happy!
 
@AdmBorkBork Real programmers used flowcharts.
 
real programmers use HTML highlighted code
 
Flowcharts were actually a valid way of representing algorithms on some machines.
In fact, some machines included the address of the next instruction after every instruction!
 
I've become convinced Clang was made as a sick practical joke
 
6:24 PM
That way, you could hand-optimise your loops.
Programming was a skill. Now, any 8 year old can compile executables.
Who needs compiling anyway? Hand-optimised bytecode FTW!
 
...people still write things in assembly
5
 
@quartata Good for them! They're promoting and continuing True Programming&trade;!
On a more serious note, real programmers always seem to be like the person talking about them.
 
Sep 6 at 1:44, by quartata
Do you know how to disable the "ordered comparison between pointer and zero" error?
1 month later I still haven't figured it out, thanks Clang you're not awful at all
why existence
 
@quartata Ask a Doctor of Psychology.
 
@wizzwizz4 ... or philosophy
 
6:36 PM
@flawr I typed phs then corrected it to ps instead of ph... then extrapolated. :-(
 
@Sherlock9 In this case you can try to call div as infix, or use a $ instead of the last set of parenthesis.
 
7:10 PM
@quartata Send a -Wno- patch, but prepare for the fury of clang maintainers ;)
What is the code that throws that error either way?
 
7:27 PM
0
A: Sandbox for Proposed Challenges

Daniel ScheplerThe hunt for broken September Where I work, we had a bug which caused our software to break when the licensing code indicated a license expiration date in September, inspiring this challenge. The challenge Write a function or program which takes in a three-character string. It should return a...

 
Anonymous
Is it too soon for me to post an answer to my frequency distribution challenge?
 
Nope
 
@Mr.Xcoder I just got a 7-byte solution in pyth for the "puzzle" so I updated the leaderboard...the thing is, how are we going to "status" 4th place and under?
also what does "wait for me to merge it." mean in the readme? as collaborators we would insert the files directly, or is something unclear?
 
7:44 PM
On the topic of C++, does anyone here have experience with C++ futures with Seastar?
 
News today sucks :(
 
Yeah...
 
heya. is unary I/O okay for brainfuck answers to math-y problems?
 
@EriktheOutgolfer Nice solution! I still keep (joint) gold though :P
 
like, for “square a number” can I turn 111 into 111111111
 
Anonymous
7:58 PM
@Lynn So long as that isn't trivializing the challenge (which, considering brainfuck's lack of features, I'm inclined to say that it doesn't), there shouldn't be a problem.
 
CMC: given a string, square it (multiply it by it's own length). For example, "abc" --> "aaabbbccc"
I know how to spell length, I promise
 
@DJMcMayhem Jelly, 2 bytes: xL
 
Anonymous
@DJMcMayhem ;l@♀*Σ
 
@DJMcMayhem Given the revision history of that message I'm not sure I'm inclined to believe you :P
 
@DJMcMayhem MATL, 4 bytes, tnY"
 
8:06 PM
ýÄ$òûälhòjdG works, but it could probably be a lot shorter
 
@DJMcMayhem V?
 
Of course :P
 
Well, it looks like utter gibberish, so Jelly was a serious contender :P
9
Although, too many different accents to be Jelly
 
Jelly has dots, V has accents. That's how you can tell
8
 
@DJMcMayhem Haskell, 8 bytes: f x=x<*x
 
8:08 PM
Dang, trying to golf it down just made it longer:
Äø.
"aDJ$òÀälh
 
CMC: Fizz Buzz with the highest finite computational complexity (no busy loops).
 
I love the fact that posting any criticism of Jelly almost guarantees a couple of stars :P
 
@DJMcMayhem APL, 7 bytes: {⍵/⍨≢⍵}
 
It's not really criticism
Just commenting on the sheer and utter ridiculousness of it compared to non-golfing languages
 
8:10 PM
@dzaima Ooh, are you learning APL? I'm not sure if it's more or less unreadable than SOGL :P
 
@DJMcMayhem It is, however, critique.
 
I guess
 
@cairdcoinheringaahing So that you are sure: yes.
 
@cairdcoinheringaahing Have been for a while
 
@wizzwizz4 ಠ_ಠ
 
8:11 PM
@cairdcoinheringaahing It's more or less readable than SOGL.
 
@DJMcMayhem SOGL, 4 bytes: Il*∑
Personally I think SOGL is easier to understand because it's stack-based but then again I might be biased :p
 
0
A: Sandbox for Proposed Challenges

ETHproductionsSigned exponentiation code-golf math Let us define signed exponentiation of a base x to a power n as this procedure: Take the absolute value of x. Raise to the power of n. Re-apply the original sign of x. Or, for a more mathematical (albeit slightly flawed) definition: For this challen...

 
Anonymous
@H.PWiz Pointfree for 11: (>>=id)(<*)
 
@Mego, nice.
 
@Mego the function monad is really nice:)
 
Anonymous
8:19 PM
And only two letters, so it's ~73% symbols :) It looks more like J that way
 
I'm gonna have to remember this, I could have used (>>=id) so many times!
 
Anonymous
Yep (>>=id) is join but without having to do import Control.Monad
 
join would have tied the pointful definition
 
Anonymous
But import Control.Monad would be required, adding too many bytes
 
8:21 PM
(=<<)=<<flip(<$) also looks kind of neat, though longer.
 
@EriktheOutgolfer Mark them as "Competitor"s
 
@cairdcoinheringaahing sandbox: What needs to be corrected in the sentence you quoted?
 
@Laikoni With "enter your code into the input field to calculate its score. Then add your code as a command-line argument,"? Shouldn't you enter your code in the input field and the other programs as the CLAs?
 
@Mego Hu, I have to write that down.
@Mego gosh haskell is so damn elegant
 
Anonymous
It's a programming language so beautiful that us mortals can't hope to ever fully comprehend it
3
 
8:33 PM
the journey is the destination
 
@cairdcoinheringaahing The idea is that each answer updates the calculator, so you don't need to input all the previous programs if you use the calculator of the previous answer. In order to provide the same service to the following answers, one should add ones own code to the calculator, generate a new link and put it into the submission.
 
@DJMcMayhem Dyalog APL, 5 bytes: /⍨∘≢⍨
@dzaima ^
 
Seeing the (perceived) recent spike in Haskell activity, I was wondering whether a dedicated chat room might be a good idea.
 
@Adám yeah I still don't really understand how tacit works :/
 
@dzaima Want a lesson?
 
8:36 PM
@Adám eh why not.
 
@Laikoni why not, I'd join!
 

 Of Monads and Men

For discussion about, learning of and golfing in Haskell codeg...
 
@DJMcMayhem PowerShell, 35 bytes -- param($a)-join($a|%{"$_"*$a.count}) -- takes input as a char-array
Wait, 34 bytes. The "$_" can be replaced with ,$_ for the same effect in this instance.
 
8:52 PM
@mınxomaτ Source SDK 2013:
#elif defined (POSIX)
	iconv_t conv_t = iconv_open( "UCS-2LE", "UTF-32LE" );
	size_t cchResult = -1;
	size_t nLenUnicde = cubSrcInBytes;
	size_t nMaxUCS2 = cubDestSizeInBytes;
	char *pIn = (char*)pUnicode;
	char *pOut = pUCS2;
	if ( conv_t > 0 )
	{
		cchResult = iconv( conv_t, &pIn, &nLenUnicde, &pOut, &nMaxUCS2 );
		iconv_close( conv_t );
		if ( (int)cchResult < 0 )
			cchResult = 0;
		else
			cchResult = cubSrcInBytes / sizeof( wchar_t );
	}
I have no idea what it does but it's from something about strings
the conv_t > 0 is the problem
I'm guessing it returns -1 on error
 
@quartata So, is it really that big a deal to insert a single cast?
 
@mınxomaτ I would prefer not to touch this code
But no, it's not
It occurs in 4 places as far as I can tell
 
But, it's a bug. It should be fixed anyway, because IMO that'll not compile on macOS
 
@mınxomaτ It worked before Clang 4, Valve compiles on El Capitan
 
If you don't want to touch it at all, use clang 3 (.8 I think)
 
8:57 PM
I'm on Sierra
 
@quartata Not familiar with Source, but can't you create a ticket upstream?
 
@mınxomaτ valve time
 
What?
 
You know, how Half-Life 3 has taken 12+ years to come out?
 
I don't play games. Or follow media around them.
 
9:01 PM
Oh, well suffice to say they are slow as molasses
 
That conversation wasn't off-topic, it's just confusing to have 2 different conversations at the same time
 
Ah. Creating a PR about this clang error seems to have two reactions: a) You are on macOS, they fix it, b) you are on FreeBSD, they laugh at you
Judging from a GitHub issue search
 
9:14 PM
 
@DJMcMayhem Charcoal, 5 bytes: FθFθι
@quartata why is it being compared > 0? docs Google found for me say it's an opaque handle or (iconv_t)-1
 
@Neil > 0 is faster than != -1
 
but incorrect
 
I didn't write it though
@Neil for this they care much more about speed than standard compliance
 
9:33 PM
@Neil That's why it is no longer a warning, but an error in sane compilers.
 
@DJMcMayhem Python, 36 bytes: lambda s:"".join(x*len(s)for x in s)
 
@quartata Well, except that would hardly be the case with an optimizing compiler. At least in LLVM IR, this will likely be reduced to the fastest comparison.
 
At any rate I think a reinterpret_cast will fix it
 
@DJMcMayhem Japt, 4 bytes: mpUl
 
@mınxomaτ It won't know that the value can only be positive or -1
 
9:38 PM
Scratch that. Japt, 3 bytes: £çX
 
@ETHproductions is "Scratch that" a new language?
3
 
ಠ_ಠ
2
 
CMC: given a 32-bit unsigned integer, return its middle 16 bits squared
 
I just realised something about group theory lol
 
@HyperNeutrino what about it
 
9:39 PM
huh?
 
@LeakyNun Squared bits?
 
@Adám 0000000_11111111_00000000_11111111 -> 111111110000000**2 -> you know
 
@LeakyNun No, I don't know.
 
@LeakyNun ES7, 18 bytes: n=>(n>>8&65535)**2
 
@LeakyNun If you have a group G with elements set S and an operator $, then for all groups, that group is isomorphic with a new group where the operator is function composition and for each element e in S, the corresponding element is ($) & e (function binding)
 
9:41 PM
@HyperNeutrino Cayley's theorem
 
so essentially turn each element into a bound dyad (monad) where the identity is idempotent, and the operator is composition
@LeakyNun ooh cool
 
Wait, this CMC is a part of an RNG function isn't it
 
@ETHproductions it is an algorithm to generate random numbers but i ain't using it for anything
 
anyway gtg now o/
 
@LeakyNun Dyalog APL, 17 bytes: 2*⍨2⊥16↑8↓⎕⊤⍨32/2
 
9:46 PM
@LeakyNun SOGL, 10 bytes
 
cookies for the first jelly answer
 
9:58 PM
(request for comments)
As in, may I get some eyes on my sandbox post?
 
request for closure :P
 
You can't close a sandbox post
though feel free to comment why it shouldn't be posted
 
@JohnDvorak just making fun of the acronym
 
I know :-)
 
10:02 PM
@ATaco <<8>>16
[does it work?]
 
Nope.
> 1.1939240138249e+14
 
nvm
 
Lua's ints are 64bit, remember?
(And they cast to double outside of that range)
 
@JohnDvorak I read it twice and I still don't get what exactly we output
I know what you mean by the free group of countably infinitely many generators
 
10:06 PM
@LeakyNun Saves a byte in ES7: n=>(n<<8>>>16)**2
 
@LeakyNun will it suffice to change the last paragraph to "possible start of an output, corresponding to the sufficient example given"?
 
@JohnDvorak maybe can you explain to me what I'm supposed to output?
 
Just the list of edges
 
0 => 0 1
0 => 0 2
0 1 => 0 1 1
0 => 0 3
0 1 => 0 1 2
0 2 => 0 2 1
0 1 1 => 0 1 1 1
...
which one is an edge?
 
each line represents one edge
 
10:11 PM
so what are the nodes?
 
0, 0 1, 0 2...
 
all nodes start with 0?
 
That's how I decided to label them, for I have to label the root somehow.
 
0 0 is not a node?
there are only countably many nodes, can I just use the natural numbers to label them?
 
You can use natural numbers as labels, yes.
 
10:14 PM
cool
 
I thought of a method to make TacO Turing complete without horribly breaking the concepts behind it, but I need to do some testing.
 
@JohnDvorak alright I've an algorithm in mind lol
but you might want to clarify
that 0 1 1 is a node
and 0 1 1 => 0 1 1 1 is an edge
"Your goal is to output this graph." -> "Your goal is to output every edge of this graph."
 
"output this graph, one edge per line"?
 
right
 
I wanted to allow blank lines, though, such as a leading line with just a [
 
10:19 PM
@JohnDvorak I don't get you
 
I wanted (infinite) JSON to count as valid output.
 
Haha, a challenge writer thought APL had a builtin explicitely designed for their challenge, and as a result, wanted to ban esoteric languages, little did they know APL is very much so a production language. Source
13
 
Most JSON formatters would would dump [ on a line by itself given a 2D array
 
@JohnDvorak Can confirm, even Firefox's implementation of JSON.stringify does this.
 
Unfortunately, JSON.stringify would output each edge on four lines. I don't like that.
 
10:36 PM
Huh
Tried interpreting my /home partition as u8 audio
After some weird buzzing, I've just been hearing this interminable clicking
 
RIP HDD
 
~2 Hz
@JohnDvorak Nah, it's an SSD, the interpreted audio is just this clicking
 
you seem to be bored
 
It would be impressive to get an SSD to start clicking... but once you do, RIP SSD I guess :P
Are you sure it's not an SSHD?
 
No, the drive itself is silent
 
10:39 PM
is it the drive itself clicking or just the interpreted audio
 
Challenge edited. Thanks for feedback.
 
@HyperNeutrino @JohnDvorak Here's the first 256 KiB
 
it's oddly repetitive
maybe I'm being very dumb :P but maybe the clicking suggests that that part of the drive is unused idk xD
 
Yeah, as I said, nearly exactly 2 Hz
Maybe a marker every 4 KiB or something
(It's sampled at 8 kHz)
 
could be
 
10:46 PM
4KiB per inode?
 
11:17 PM
I do believe that this is not a valid quine
Even if it were tagged "REPL", it's just a literal
 
Not valid, it's literal only.
 
So what should we do?
Flag it? Or downvote it until it's deletable? Or leave a comment?
 
Downvote, leave a comment.
My 3 byte quine still has 0 upgoats and 0 comments :(
 
Our current definition of a quine states that "It must be possible to identify a section of the program which encodes a different part of the program. ("Different" meaning that the two parts appear in different positions.)" Simply put, answers that consist of a single literal are not allowed as quines. As such, this answer is not valid. — ETHproductions 21 secs ago
Sounds maybe a bit too harsh
 
You could keep it simple and say "This is no-longer valid by our definition of a quine, as it contains literals only."
 
11:25 PM
I flagged that forever ago
 
NMP on the way.
This challenge might be a little... interesting
 
Reply was that it was posted before the rule was made @ETHproductions
 
This is no longer valid by our current definition of a quine; nor is any program made of a single literal. (If you really wanted to go for shortness with this technique you could do 1, but this is also invalid) — ETHproductions 3 mins ago
Better?
 
@DJMcMayhem would using tag better fit your challenge?
 
No.
> Challenges which relate to compressing a single specific input should instead be tagged [kolmogorov-complexity]
It's kolmo for the same reasons that this is
 
11:29 PM
Ok, thanks for clarifying.
 
I believe we need a specific tag for this type of challenge but no-one knows what this tag should be
 
KC is fine (IMO)
 
@DJMcMayhem That new question may work over on Code Review (I don't know for sure tho)
 
Ooh, good point
Hello, welcome to the site! We host programming competitions and contests on this site, but we don't answer questions about improving working code. You may be able to get help on Code Review instead, but they are pretty strict about which questions they accept, so make sure to read through their help center first to make sure your question will be well received. Thanks! — DJMcMayhem 2 mins ago
 
@DJMcMayhem Hmm, I was thinking back to the discussion I started in June about this but apparently Peter Taylor fixed the tag wiki to include challenges like yours
 
11:36 PM
@HyperNeutrino Darnit! You answered too quickly! :P
 
3
Q: How many chapters do I have?

DJMcMayhemThe Bible is one of the most influential books ever written, and commonly cited as the best selling book of all time. It was written by approximately 40 different authors over hundreds of years before being compiled into it's current form. But what's interesting about The Bible is the way it's di...

-2
Q: 3X3 Arithmetic Puzzle

Justin CornwellNOTE Basic python knowledge only; silly project to improve skills Looking to solve 3x3 grid math problem as a means to learn python Directions: Mensa Puzzle: Criss-Cross Math [4 Aug 2017] Place the digits 1 to 9 into the empty cells so that the three rows and three columns down form correct a...

 
@NewMainPosts Thankyou! :)
 
The bible is the most stolen book of all time :P
> using any builtins that give information about The Bible are not permitted
I was going to make a snarky comment about how unlikely this would be, but mathematica exists.
7
 
That's exactly what I had in mind :P
I'm actually really excited to see the answers people come up with. Simply directly storing the names and numbers is 732 bytes, but since you don't need to store the entire book name, it could be way shorter
Kind of like regex golf
 
To make it even worse, there are duplicates in the sums of the character codes.
 
11:46 PM
Oh, good check.
I didn't know that. How many (and which ones?)
 
I know that there are 6 duplicates, I Don't know which.
 
@ATaco xD sorry :P
I saw your ninja'd Threead answer :P
 
If you reduce the charcodes by a*b%731 it stays unique, but that's probably useless
 
any unique injection to a shorter data representation is useful :P
 
Maps the chapter names to the interval [1,711]
 
11:54 PM
hosea, jonah, james = 528
mark, acts = 427
micah, 3 john = 514
1 kings, daniel = 621
psalms, romans = 656
Just for reference.
 
Largest gap in the interval is 36
 
00:00 - 16:0016:00 - 00:00

« first day (2438 days earlier)      last day (2398 days later) »