« first day (3198 days earlier)      last day (1632 days later) » 

12:01 AM
@Bubbler That's awesome! May I use that?
 
Sure, no problem
 
12:20 AM
@Adám If our language doesn't support matrices/nested lists, may we output a flat array containing those elements?
 
@DJMcMayhem Sure, or print the digits on 5 lines, etc. Anything goes.
 
@flawr I prefer base 10 personally :P
 
12:37 AM
0
Q: Is this a valid input for this hardware?

BubblerThe (slightly harder, but still easy) sequel of Generate input for this hardware. Background I have a hardware that has a 32-bit input register. The register has the following characteristics: The 32-bit register consists of eight 4-bit fields. Each 4-bit field holds a value in signed-magnitu...

 
 
2 hours later…
2:41 AM
0
Q: Translate a simple sentence from Toki Pona

caird coinheringaahingToki Pona is a linguist's code golf: A minimalist language with a vocabulary of around 120 words. Because of this, it has very few grammatical irregularities found in other languages, making it ideal for a code golf challenge. Your task is to take the most simple form of a Toki Pona sentence and...

 
 
2 hours later…
4:26 AM
-3
Q: Partial Differential Equations

Bilal a and b are straightforward. not sure how to approach c) and d)

 
 
3 hours later…
7:34 AM
@cairdcoinheringaahing who doesn't =P
 
8:25 AM
@Adám are you working on the logo or on the website? :)
 
 
1 hour later…
9:27 AM
@flawr I guess the logo is finished, so just the website now :-)
@flawr Actually, I'd love to make it an SVG, at some point…
 
9:51 AM
@Adám You could also just make a challenge out of that :)
 
@flawr Good idea.
 
 
3 hours later…
12:46 PM
Dang. Dupe'd.
 
[Sad trombone]
 
A _
1:28 PM
The best situation that I can think of is when a challenge becomes a dupe.
You know, if you have written your answer and posted it, those late-comers can not beat/outgolf your answer, and evidently it feels great to win.
It is especially fun when you close-voted the challenge after you have posted your answer.
[Happy trombone]
@Adám I thought the logo for the wiki is like this:
 
@A_ Well, that's the logo for the old wiki. I'm working on a modern replacement: content, technology, and styling. I think turning it 45° looks better.
 
A _
Does this logo symbolize anything?
 
@A_ Not as far as I know, but I didn't create the original, nor do I know who did. I guess I can ask the maintainer of the old wiki. Bubbler's expression is super-cool though.
 
2:04 PM
3
Q: Interpret numbers very literally

someoneTo interpret a positive integer very literally, write it in English words (without "and"), replace hyphens with spaces, replace each resulting word with its number value, and concatenate the results into a single number. To write a positive integer more than 99 but less than 1000 in English word...

 
 
1 hour later…
3:06 PM
0
Q: reach the number in minimum steps

veer singhIn this challenge, you are given an number x. you have to find the number of steps required to reach x from 1. At a particular point, you have two choices 1) increment the number by 1 2) reverse the integer ( remove leading digits after reversing) eg: n=42 sol: 1>2>3>4>5>6>7>8>9>10>11>12>13>14>...

 
3:17 PM
in pyth, how can i assign to local variables (more specifically, function arguments) while in functions? without this it seems that recursion is quite difficult
every single form of variable assignment seems to use the assign function internally, so i can't figure out how to modify actual locals instead of the environment dictionary
 
3:54 PM
hi.. does this code compute the maximum subarray sum? imgur.com/a/qFNYsIb
the notes claim it doesn't but I can't see what is wrong with it
 
thank you mr javascript, very cool
 
ngn
that's consistent with typeof NaN being "number" :)
 
I am a little confused. It just looks correct to me.
 
4:27 PM
@Anush It doesn't
For example [2,-3,1] results in 1 instead of 2.
Also there is no reason to use dynamic programming here, the values are being discarded so you can just use a accumulator.
 
@WheatWizard thanks.. I think we just need to take the max of L
 
Yeah that would work.
 
@WheatWizard that's not right. Consider -2, 1, -3, 4, -1, 2, 1, -5, 4
we do need dynamic programming
 
but taking the max traverses the structure again. Since you already did it once you can calculate the max during that traversal.
 
@Anush As in the contiguous elements (of any length) that sum to the highest value?
 
4:32 PM
oh yes that is true
@DJMcMayhem yep
Kadane's algorithm
 
@Anush That's a tricky example
 
@DJMcMayhem :)
 
thanks! What language is that?
 
It is haskell.
 
4:40 PM
aha
 
It should be reasonably readable even for non-haskell programmers.
 
a beautiful and mysterious language :)
 
Does it need to return the sum or the subarray?
 
@WheatWizard :) do you really expect non-Haskell people to understand foldl' ?
@DJMcMayhem returning the subarray is cooler
 
Actually that is a fair point
 
4:41 PM
I have noticed that to Haskell experts, the language is like English
and they can't understand why anyone else finds it hard :)
 
Haskell is simple, its just not easy.
4
 
:)
 
Anonymous
@Anush foldl' is basically just reduce in every other language with FP :P
 
:)
 
Anonymous
user image
6
 
4:46 PM
nice!
 
If I had to implement my own algorithm, I'd probably do this: Try it online!
Which is admittedly O(n^2)
 
@WheatWizard how about a version that outputs the subarray?
 
Whoops, just found a bug. This version: Try it online!
Stupid off-by-two errors
 
That's a simple modification. It'll only take a sec
 
4:57 PM
@WheatWizard you are making me want to pose a code-golf question now :)
 
The code golf would be more fun if you limit it to O(n) imo
 
@DJMcMayhem Funny looking fencepost you got there...
 
@WheatWizard I agree!
 
@cairdcoinheringaahing Yay!
 
 
2 hours later…
7:45 PM
21
Q: Maximum sub-array

iBugDefine the "maximum sub-array" of a given array as "a (consecutive) sub-array that has the biggest sum". Note there's no "non-zero" requirement. Output that sum. Give a description of your code if possible. Sample input 1: 1 2 3 -4 -5 6 7 -8 9 10 -11 -12 -13 14 Sample output 1: 24 Descripti...

 
0
Q: Roman Numeral Counting

tuskiomiRoman numerals can be (mostly) written in a one column format, because each letter intersects the top and the bottom of the line. For example: I, or 1 intersects both the top and bottom of the line, and V or 5 intersects the bottom and top lines, the top twice and the bottom at one place. The va...

 
 
3 hours later…
10:42 PM
0
A: Sandbox for Proposed Challenges

ihavenoideaImplement the Max-Pooling operation from Convolutional Neural Networks In convolutional neural networks, one of the main layers usually implemented is called the Pooling Layer. Sometimes, the input image is big (and therefore time consuming especially if you have a big input set) or there are sp...

 

« first day (3198 days earlier)      last day (1632 days later) »