« first day (1487 days earlier)      last day (3361 days later) » 
00:00 - 16:0016:00 - 00:00

12:11 AM
Ha! I just found out how to see both upvotes and downvotes of a question.
 
@Sp3000 I've been trying to save a char on forward differences
f=lambda l,n:l*(1-n)or f([b-a for a,b in zip(l,l[1:])],n-1)
f=lambda l,n:l*0**n or f([b-a for a,b in zip(l,l[1:])],n-1)
f=lambda l,n:l*-~-n or f([b-a for a,b in zip(l,l[1:])],n-1)
but all of them are the same count
 
Interesting methods you have there :P
 
it's so tempting to try to combine and/or's
clever idea with the map, by the way
the multiple argument thing is useful to remember
 
Too bad __sub__ is far too long
 
too bad it doesn't cut off like zip
 
12:32 AM
@xnor Guess what? Here's another round of Python 3 torture:
>>> map(int.__sub__,[1,2],[3])
<map object at 0x03696B10>
>>> list(map(int.__sub__,[1,2],[3]))
[-2]
 
haha
why?
i guess iterators don't allow a length check at the start
 
Python 3 cuts off, but we need to return a list :/
 
why can't you retern a map?
 
Output: "The forward differences for the specified depth as a list of integers"
I assumed that didn't mean map, I dunno
Also, map's not subscriptable anyway
 
I guess that's not very listy
 
12:37 AM
I wonder if Python has dev builds for 3.5 somewhere, I hope they're implementing this...
(that would save two bytes, in theory)
 
that looks amazing
it lets you sum lists inside comprehensions, among other things
 
I'm particularly looking forward to set() -> {*} :P
 
I was wondering if anyone has an ancient Python implementation where this works?
 
1:06 AM
@feersum Have you tried here or here?
 
I haven't downloaded any of them; just wondering if someone had one convenient
 
1:22 AM
Damn I don't have enough disk space to get Visual Studio and Cygwin doesn't like building Python so I can't test 3.5's alpha...
 
How much disk do you need?
 
9 GB apparently
 
I have 375/443 free. Maybe I can email you some?
/s
 
That would help, I have 800MB free :P Stupid SSDs
 
Once upon a time, 9 GB was an unimaginably large amount of storage.
 
1:29 AM
Until software bloat kicked in
 
Seriously though, what happened?
 
In my case, HD videos happened.
 
In my case, mainly the Adobe Creative Suite
 
I had a program once that allowed me to visualize the size of different folders on my drive.
 
I guess using RAW mode on my camera eats up another bit.
@PhiNotPi I think Ubuntu's default disk utility does that... let me look.
 
1:34 AM
I think it was "WinDirStat"
(for Windows, obviously)
 
I think there's a blanket ban on any linux utilities starting with "win" :D
 
Ah, mine looks more like this (tree structure not shown):
 
Apparently I have thousands of audio files.
Probably due to Finale, my music composition software.
 
I have 400 GB free :)
 
1:50 AM
About 2600 GB free here ;)
 
I also have a 1 TB external drive lying around somewhere...
 
I'm not sure how much I have if I add in externals/flashes. Those things seem to breed.
 
Oh, and a 1 GB flash drive. :)
 
2 - 8 GB flash drives.
 
I was digging around and found a 32 MB SD card recently :)
I think it was from my old Zire 71.
 
1:54 AM
There's one of those massive 1-foot storage disks in my house somewhere.
 
Aww, I want one of those. I'll trade you a pack of 50 or so punch cards for it :P
 
There's nothing currently stored on it.
I know because I took a rare-earth magnet to it once.
 
That's okay, the cards aren't punched either :D
I found a box of thousands.
 
There's also some good ole' vacuum tubes.
 
Hmm. The only tubes I have are in an old cabinet radio. None from computers or similar.
 
2:03 AM
(I don't know the origin of the tubes, actually)
Here's an idea for a code challenge/golf. Does anyone know if they've released the complete Apollo source code?
The answer is apparently yes, but it's not very useful since it's in assembly.
 
 
1 hour later…
3:41 AM
0
A: Sandbox for Proposed Challenges

XiKuuKyCode Golf - ASCII Art maker: A text to ASCII art generator maker, the program must input a string and return ASCII art from it. Something like patorjk.com/software/taag/

 
 
2 hours later…
6:00 AM
@isaacg On the initial printing, only Black has a capital B
Also thanks for the count tip
 
6:51 AM
@xnor Do you think I should have waited for then to golf it down more first (eg whitespace at least)? I wasn't sure whether to do that or not
*them
 
7:20 AM
@randomra I think such a verb doesn't exist. Use :: to mask the error or dyadic ".
 
 
2 hours later…
9:21 AM
forward differences in Prelude :)
0
A: Different Way Forward

Martin BüttnerPrelude, 95 bytes ?v(1-)#(1-vv(1-)#(1-)#)v ^ ! ? 1- vv- # ^(1-)#(1-) ? # # ^ # Input format is N M n_1 n_2 ... n_M where N is the depth of the differences and M is the number of integers in the input. Adding M was necessary, because there's no way for Prel...

and I've beaten Powershell and Java
@Sp3000 why did you CW your tips answer?
 
10:09 AM
hi all
 
10:41 AM
Hehe.
@randomra The forwards difference task can almost be answered with the very simple J script +/\inv since the forwards difference is the inverse of the sum scan.
 
10:55 AM
@MartinBüttner In case anybody else wanted to golf it? There's probably a lot of minor tweaks possible, but I've gotten my point across so I won't be doing much more
 
11:05 AM
@Sp3000 hi!
how about this for a challenge? Given two long strings, find the longest substring of string A that occurs in string B with at most one error
that is at most one place is allowed to mismatfch
 
nice!
"mismatfch"
 
:)
although I only meant substitution.. so it should have been mifmatch
 
misfatch
 
exactly
 
masdftch
 
11:08 AM
it might be suitable for code-golf although I don't want really slow solutions as they are boring so maybe I could give a large input and give a time limit?
or is there a better way?
in any case.. what do you think and what would make it most likely you would try it out :)
 
I do like the 1 mismatch question, because it allows for a recursive approach
Let's see...
What type of "faster solution" are you looking for?
 
@Sp3000 do you mean what sort of time complexity?
something linearish :)
 
Rather than a time limit, you could just give a theoretical complexity, in that case
 
@Sp3000 true but I worry that will put some people off
I suppose fastest code is an option
it's what I always end up with :)
I really want some balance between fastest code and code golf
maybe time + code length?
 
You could, if you can balance that somehow :P
 
11:22 AM
I need some working code first to do the balancing!
how fast do you think the problem can be solved?
 
Well since you mention linear and substrings, the first idea in my head is Knuth-Morris-Pratt
 
maybe I was being optimistic :)
 
I'm not sure how easy it would be to adapt, but it does make me think linear is possible
 
cool
 
And surely you can't get anything lower :P
 
11:24 AM
hmm.. actually I don't see that
there isn't a pattern!
 
?
 
KMP normally has a pattern you are searching for in a text
but in this case we are looking for substrings of two strings A and B
I can't see what plays the role of a pattern in KMP
 
Oh longest substring that matches, right sorry
 
no problem!
 
Hm. Back to the recursive idea, I guess. Lemme get some paper...
 
11:32 AM
cool! :)
 
back to the back to the back to the .. stack overflow
 
oh is there a relevant question there?
or will there soon be one? :)
 
@Sp3000 hm fair enough... and regarding your comment, it's definitely on topic, but I think (as feersum did) we should apply SO-like quality criteria and ask people to show their own effort
 
hi @MartinBüttner
 
11:38 AM
Yeah... I was a little confused as to do since the code was golfed in one way (algorithm-wise) but not another (whitespace and easy golfs left)
Also I didn't feel like I deserved rep for jumping the gun :/
 
the nice thing with golfing a multiline Prelude program is that each saving is usually several bytes at once :D
 
:D
Hmm longest substring makes it a bit hard to use what I want to use :/
 
@Lembik one more letter and it sounds like a dodgy dating platform ;)
hmmm, I've got a new idea for loops in Prelude... let's see...
 
@Lembik I can do better than the naive approach :D Worst case not any better though, I don't think
But yeah I wanted to make use of the first that one mismatch = mismatch in first half or mismatch in second half
But I don't think that helps...
 
12:00 PM
heh, first I doubled David Carraher's score on Forward Differences by telling him he can't use Difference, and then I brought it back down to the exact same size by golfing his modified answer :D
 
Ahaha I saw, nice :P
 
I thought that's a particularly neat use of ## though... I might add that to my mathematica tip about pure function arguments
 
@FUZxxl Thanks, ". :: v it is. That's why I couldn't found the single verb.
 
neat the new looping technique for Prelude works and actually saved 13 bytes
I love it when Prelude programs get shorter by adding more voices :D
 
That makes sense, right? Less whitespace
 
12:06 PM
not just that
I've cut down the non-whitespace characters from 48 to 38
basically, I used to loop N times with (1-). but a) that's 4 columns, and b) it's really annoying if you need to remember N for future loops. now I'm instead converting N to unary on another stack. then I can simply loop with (#) (only 3 columns), but more importantly, if I've got a spare voice, I can remember N for free by building a unary representation on that other stack, while this one is being emptied.
furthermore, in principle, for (#) I can put the ) on the same column as #, which reduces the minimum loop to two columns. this is not possible with the (1-) loop. (in this particular case, I don't have any spare voices to move the ) to though.)
 
12:21 PM
Comments on sandbox post?
 
0
A: Sandbox for Proposed Challenges

Calvin's HobbiesI'm only posting this in the sandbox because it may be too broad, even for a pop-con. If it gets some support I'll post it very soon. Generating Postmodernist Writing and Other Logorrhea Writings about postmodernism are known for dealing with highly abstract ideas, potentially in a verbose mann...

 
@Calvin'sHobbies is it "writings about postmodernism" or actually "postmodernist writings"? ;)
 
"None of the 2^32 outputs should be identical." So... we have to check all possible outputs for any collisions?
 
@MartinBüttner Postmodernist writings ;)
 
but yeah, I do think it's a bit too broad
since any submission which strings together random words (and respects the punctuation rules) is valid.
 
12:26 PM
@Sp3000 Not if you just ensure that two outputs can't be the same.
 
Well that's my point - if I can't ensure it then I can't submit it?
 
that really depends on the cycle length of the underlying PRNG though... and even if it's long enough, there might be some weird relationship between consecutive random numbers which happens to produce a collision at some point
 
@Sp3000 It could be reworded. It's just to ensure someone doesn't post a few hardcoded convincing examples that are are really repeated over and over in their 2^32 outputs.
 
@Sp3000 :( just found a 4-byte saving but it breaks the N=0 case
 
D:
 
12:31 PM
it's really nice and dense and obscure now though :D
?1   (-vv- # 1vv  !
  ?    #  #^ )##
?(1-)  1  (#) 11)(#)
  1  #(# ) 1 #(#
 
It was pretty obscure in the first place :P
 
all those offset parenthesis pairs and commands in parallel with parentheses are starting to do my head in :D
 
@MartinBüttner I know that writing a submission would be easy, but writing a submission worth upvoting would not be. Much like Tweetable Mathematical Art.
 
@Sp3000 actually, the version now is a bit tidier than it used to be: the bottom two voices are merely passing stacks of 1 back and forth, while the top two voices to the differencing.
@Calvin'sHobbies even so I think the scope of Tweetable Mathematical Art was a lot more limited. the question had a really tight framework and size restriction.
 
@Calvin'sHobbies How random are you thinking for submissions? Are we allowed templates like "We believe that this <A/B/C/D> <E/F/G/H> will be the technology of the future."?
(with more options to meet the 2^32 restriction, of course)
 
12:37 PM
@Sp3000 That would be allowed, though I wouldn't expect something like that to be very popular. The hope is that some people would see it as an opportunity to really stretch their NLP muscles and create cool things.
 
On the contrary, if you had some funny options I get the feeling that might actually end up quite popular... but who knows
 
I do think the voters could zero in on the best submissions, so it isn't too broad in that sense.
@MartinBüttner I could limit the programs to 1000 bytes or something...hmm
 
Do you want people to store a word list?
 
I guess they'd have to if it was limited. Then 1000 bytes looks pretty small. With no limit they could have external word list files and other stuff if desired.
I'll check on it tomorrow.
 
do you have another source layout challenge coming in the meantime? ;)
 
12:57 PM
0
Q: Answering a not-quite-duplicate

berdarioI haven't created a duplicate question... and I don't even want it to be necessarily reopened. I'd just like to be able to post an answer (either to it, or to the supposed "original" question) Obviously, as it almost always happens... duplicates aren't perfect duplicates, and in this case there'...

 
1:35 PM
@Sp3000 finally finished the explanation for the Prelude submission
@Zgarb I was just about to open Retina :(
 
@MartinBüttner The bonus scared you out of it?
 
nah, I was joking... I'm not even sure a pure Retina submission can win this, especially since it doesn't support multiple replacements yet
 
I'm guessing that a regex solution will win anyway.
 
hm in that case Retina might have won if I hadn't played Risk of Rain last night :P
also those are surprisingly few cases... I thought Finnish had more than that
 
Those are the "official" ones. You can decline nouns much more, but they are not strictly counted as cases.
 
1:46 PM
I see
 
Like "jalassanikinkohan"
"I wonder if also in my foot"
You just tack some suffixes onto it.
 
right
no I was still thinking of a fixed number, but more on the order of 20
but I might have mixed that up with something
 
I think Hungarian has more.
 
I like prepositions :P
 
Apparently there are 18 cases in Hungarian.
 
1:52 PM
@Sp3000 I wonder what the best complexity is
@MartinBüttner I really really like your random challenges
I hope they get more and more difficult :)
 
@Lembik thanks. you should participate :P
 
@MartinBüttner you could ask for a random triangulation of a polygon :)
 
@Lembik there will be a few more difficult ones but probably also a few simpler ones... I don't want to end up with only one or two people being able to solve one of them.
 
my challenge is to find a challenge I can ask that you like first :)
 
oh I do like your challenges... I just don't usually have the knowledge of combinatorics required to provide an interesting answer
 
2:03 PM
thanks. I am hoping one day to set a good one with the score of code length + time
it's just hard to know how to balance them before you see the answers
 
that's really tricky to balance
yeah
 
I suppose I could make it self balancing but some people don't like scores that change when other answers come in
which is a funny because no one minds the fact that your rank changes
and score means nothing without rank :)
 
@Lembik I don't mind that
in fact, I've done that in the past
 
aha! :)
 
(although it was probably my hardest challenge and hence got only one submission)
 
2:06 PM
However, if people are optimizing for one scoring method/formula, it would be nice to not screw them after posting by making it different enough that they have to change their code.
 
true, if the balance between two components of the score changes, that is more problematic
 
ah
@Geobits yes well I think any self balancing scheme I can think of would probably have that fault
suggestions are most welcome :)
 
No real suggestions to fix that. Doing it yourself first so you have some idea of the balance is encouraged, but many times answers will do something tricksy that you didn't think of.
Sandboxing for a few days can sometimes help, also. Sandboxing for an hour or two, not so much ;)
 
in the snake KOTH I can see some strategy like where you hide if enemy is closer to food and deciding if he is closer or not
 
how would you know if they are closer or not?
 
2:10 PM
@Zgarb Have you tested the new submissions yet?
 
I know when the last food disappers where his head is
 
@Geobits ok thanks
 
@randomra Yea, the only thing I could come up with was "go to center if enemy is closer", just to be closer to the next one (on average).
I don't see much variety forthcoming.
 
but you also dont want to hit him while doing so
so he might stall a bit so you hit him
 
@TheBestOne I tested Explorer and Annoyance, but I'll have to update my Java for Watermelon. I may not have time for it today, but we'll see.
 
2:12 PM
@randomra It's funny that forward-difference is almost just +\inv in J.
 
@FUZxxl if you get it down to 1 char its hard to explain its not bulit-in :D
 
I don't know. I don't see "go away from center (hide)" as a good long-term strategy, even if the possibility of stall exists. You're just setting yourself up as more likely be further from the next one as well.
 
@MartinBüttner Also, if a piece of food spawns close to you and you manage to eat it, and the next one spawns far across the field, it is likely that your enemy is closer to it than you.
 
@Geobits colliding is insta lose
 
Running away from likely food spots isn't exactly insta-win :P
 
2:15 PM
@randomra Actually, this would be longer than my current submission because +\inv has an unwanted leading item. I would need something like 1}.+\inv.
 
so if Im closer to center and go to center and go around you almost always lose against me
@FUZxxl Yeah, I checked that
 
How do you plan to go around me without hitting me? You're max length 6, and don't know where I am (now).
 
@Geobits but you will go to the center and I will be there
 
Ok, so if I go away from center, I lose out on food at least 3/4 of the time when the next food spawns closer to you. Either way it mostly comes down to luck, IMO.
I like the new avatar, btw.
 
@Geobits Worked a lot on that :D
I hate choosing avatars
3
still no profile image on facebook either :)
And thanks!
 
2:20 PM
If I wasn't too lazy I'd change mine. It's about time for it.
 
I'm currently making an entry to the J golfing tips. @randomra, maybe you have some suggestions, too?
 
No avatar change here.
 
@FUZxxl #\ for >:@i.@#
 
hehe
 
2:27 PM
@FUZxxl and of course the x(u&n)y power trick
 
indeed.
 
@TheBestOne but that's PiNotPhi
3
 
@FUZxxl and idk how well known is u&v
 
You need an anthropomorphic phi stomping a pi into the dirt :D
 
maybe thats trivial
 
2:29 PM
@Geobits I'd prefer a π, written with the digits of φ
(not that that would be visible)
maybe in the large version though
 
How about this?
 
Wow, the chatroom font (or is it my browser?) has a terrible π.
 
@Geobits it's definitely the chatroom font
 
I like the hover text on that one: "... set down the marker and back away ..."
 
lol yeah
there was a what-if about that as well
well not about that, but one where he brought it up
but I don't remember which one off the top of my head
 
2:36 PM
Number of seconds in a years is approximately pi*10^7
 
I like 60*60*24*365 better. Easier to remember ;)
 
Lethal Neutrinos, paragraph after the detector image
 
2:48 PM
@MartinBüttner I love the hydrogen-bomb example and image there :D
 
lol yeah
heh, I'm currently feeling this happening to me
this band released a new album, streaming it on youtube with a visualisation on youtube. the visualisations are all in the exact same style, but I'm already picking out clear favourites where I think "this is so much better" :D
this record, if anyone's interested, and the vis for As You Are is by far the best ^^
 
For the record, I was never a fan of the mayo frames.
 
0
A: Tips for golfing in J

FUZxxlThe most important thing when golfing in J is to not only understand the problem, but to reduce the problem to a series of array transformations. You need to understand this way of thinking to have any success with J code. For example, a recent challenge asked to solve the largest subarray probl...

@randomra What do you think?
0
A: Shortest program that throws StackOverflow Error

FUZxxlJ (3 characters) $:0 The builtin verb $: (recurse) evaluates to the longest verb that contains it. In the phrase above, the longest verb that contains $: is $: itself so we get infinite recursion. A 0 is needed to invoke this verb as a phrase of type verb doesn't do anything if it stands on it...

I think @feersum doesn't have a point with his critique.
 
3:05 PM
I like how my post got 10 upvotes before anyone realised I actually had things the wrong way around so it was incorrect on odd cases whistles
Fixing doesn't cost any bytes though, thankfully
Also, yeah damn at the regex penalty in the Finnish question :(
 
LOL @JS and ><> being smaller than Python
 
@Optimizer Isn't that usually the case?
 
not really
 
><> is particularly good at anything that involves 1) operating on single chars and 2) number sequences, but sucks at everything else
 
yes, and this was a forward difference in an array question
 
3:12 PM
@FUZxxl Great! I would add two titles like general strategy and golfing tricks
 
@randomra Thank you. Any idea for improvements apart from that?
 
@Optimizer and Prelude beats the longer Python submission ;)
 
maybe emphasize the use of the vocabulary (with link)
for me that is the most important thing, I still use it constantly
 
@MartinBüttner double standards :P
 
I know its in the question too, but its the most important imo
 
3:16 PM
@Optimizer it also beats three other languages ;)
this one was fun though
 
enough with your Prelude obsession :P
 
learned several new tricks for golfing Prelude
if I wasn't the only person using it, I would probably add a tips question for it :D
 
Next month: Martin earns Tumbleweed from posting a "Tips for golfing in Prelude" page
 
I think even that wouldn't work to get Tumbleweed
 
A few of the Tumbleweed badges did actually go to tips question though :P
 
3:18 PM
I don't know if self-answers count for tumbleweed or not
 
Hmmm maybe not actually
 
"only self answers"
 
Think anyone would mind if we had a "Tips for golfing in ><>"? :P
 
in what ?
 
3:20 PM
do we have befunge?
we do
go ahead
 
Yeah, we have Befunge
 
only 98 though
 
I think 98 is a superset anyway
 
Just make up a fake language with an almost-convincing home page. Ask a tips question about it, and wait for the tumbleweed to roll in.
 
sure, but that means a lot of these won't be applicable
@Geobits like... Retina?
actually, I've noticed recently (I think) that we don't have regex golfing tips
 
3:21 PM
Hmm. Needs no comments, too. This might be harder than I thought.
 
"Tips for golfing in _________|\____"
 
I can easily see a "where's the interpreter" comment for a fakish language.
 
@Geobits pre-empt that by linking to it
 
It's hard to link to something non-existent, though :P
Let me stress that it's a fake language I'm talking about.
 
oh right, "almost-convincing homepage"
yeah
 
3:23 PM
1
Q: Is editor golf on-topic?

DoorknobWe've recently received a Vim golf question that's sparked a bit of controversy as to whether Vim golf, or "editor golf" in general, is on-topic here. Should Vim, Emacs, or editor golf in general be allowed?

 
I was thinking it should be actually eligible, but just a really stupid useless language
 
how about a slight variant of javascript
 
Ooh, let's call it jolfscript.
 
"Tips for golfing in Vim Keystrokes"
I am doing it
 
"Tips for regex golfing"
:D
 
3:26 PM
that would be nice actually
 
@Sp3000 I swear I just said that :P
 
Ah. Was too busy posting the ><> one and missed it
Would you like to post it then?
 
tips waterfall
 
@Sp3000 sure. but what Optimizer said... I don't wanna flood the frontpage with tips questions... there's no rush, so I might post it tomorrow
 
"tips about golfing tips"
 
3:32 PM
Where's Rainbolt when you need him?
2
 
Always watching
4
 
y ?
 
what about a TeX-golf
 
That was satisfactorily creepy. Thank you.
 
@feersum we've had answers in TeX before
and there's postscript already
 
3:33 PM
sorry for ruining it
ohhh anti tips
 
"Tips for writing questions which will not be answered in specialized golfing languages"
 
@Sp3000 please include the "one tip per answer" guideline. makes tips lists much more useful (and then follow that advice :P)
 
I'm not setting a great example, am I
 
ohhh anti tips
 
Optimizer is stuck in a loop again
 
3:35 PM
Is grouping similar tips okay?
 
did it appear twice ?
 
@Sp3000 depends on how similar they are. I think I'd group them by what they are used for, not whether they related to the same operator.
let me read your answer
 
I think I'll split them up, they're kind of for different purposes
 
yeah, I think that's better
 
why do we do 1 tip / answer? It takes like 4 times the space
 
3:40 PM
it lets voting indicate which tips are most useful
 
@MartinBüttner 1 tip per answer is hard if you have a couple dozen of tips.
 
Well I've got more tips, but I think I'll let others post some first while I sleep :P
 
I trust in the knowledge of people who write tips more than the ones who read (e.g. me)
 
@randomra then you haven't seen the tips threads to the more popular languages ;)
 
@MartinBüttner that's true :)
 
3:46 PM
so I've been playing Risk of Rain for the last few days... yesterday I managed to survive long enough to see all the difficulty levels for the first time (the difficulty increases every 5 minutes). I had managed "Insane" before, so I was really curious what the rest would be. the full list is: "Very Easy", "Easy", "Medium", "Hard", "Very Hard", "Insane", "Impossible", "I SEE YOU", "I'M COMING FOR YOU", "HAHAHAHA". :D
@Sp3000 for the EOF, couldn't you also do :1+?
 
Yeah I just realised, and I'm thinking (hence the temp delete right now)
:1+? and :0(? are negations, so which one's more useful depends on the situation
Eh, I just put them both up :P
 
yeah sure :D
 
(Typically I use :0(? because i:0(?v is how I read all input :P )
Although, now that I know about the -v flag I feel like going back to my old submissions and fixing them all up
... some other day
 
00:00 - 16:0016:00 - 00:00

« first day (1487 days earlier)      last day (3361 days later) »