« first day (1540 days earlier)      last day (3286 days later) » 
00:00 - 04:0004:00 - 00:00

4:00 AM
No sorting required.
 
@BrainSteel cross product, I think.
@BrainSteel and yeah, you don't need to sort, but it's O(N^3)
 
Dot product > 0 will give you every vector that's within 180 degrees of your original vector, because x dot y = |x||y|cos theta
I really wish I had thought of this one an hour ago...
 
@BrainSteel Oh, but that's not what I meant.
the first vector shouldn't be centre of the 180 degrees, but the boundary
 
Ah, okay.
That'll probably work too.
 
@orlp are you sure you want hardware division for GOLF?
 
4:10 AM
I think I figured out what I was missing for C small: forgot an "if (sign != s)", and also, "s /= s" does not give the sign of a number...
 
@MartinBüttner Just for fun I unearthed a couple of "gems" (read: turds). On the guitar, me at 18 and me at 16. The latter was recorded to cassette using a karaoke machine in my parents' garage. Maybe don't add those to your list. :P
 
@aditsu lol, that second one
 
>_^
 
@Maltysen yes, why not?
@Maltysen it's supposed to be easy to target - not hard
 
@AlexA. I'll start going through all that "tomorrow"... it's 5.12, I should really get some sleep
 
4:13 AM
I just thought it should imitate real cpus, but I guess not.
 
2am next week it is then :)
 
@MartinBüttner: Hey, it's 5:12, you should get some sleep!
 
@Maltysen it does
@Maltysen real CPUs have hardware division, I'm not sure what you're getting at
 
@MartinBüttner: Nice chatting with you as always. Have a good "night."
 
6:19 here
thought I had fixed my sleep schedule earlier tonight
 
4:14 AM
9:14pm here.
 
then suddenly I'm awake for 16 hours
 
Haha
 
@Maltysen could you clarify?
 
What countries other than the US use a 12-hour clock in favor of a 24-hour clock?
 
@AlexA. It's always nice to find people who share your taste in music. ;)
 
4:15 AM
@AlexA. am/pm is a global thing AFAIK
both 24h/12h are in use around the globe
 
@orlp: Good to know!
 
here in the netherlands we generally use am/pm in speech and 24h in formal written text
 
@MartinBüttner Indeed! Among other interests, of course, seeing as how we're both in the PPCG chat room.
@orlp: In the US no one has any idea what you're talking about if you use 24h.
Well they do, but it takes them a minute to get it.
It's primarily used by the military and nobody else here.
 
@AlexA. well, same here, if you're talking about 1900
but written != speech
in written it's used a lot
we don't say AM/PM though, we use 'in the morning' or 'in the evening'
 
Right. It's not used in speech or in writing in the US. Is am/pm a thing at all there? Does any significant subset of the Netherlands know/use it?
 
4:19 AM
@Everone Sorry for being gone so long.
 
the thing I hate the most is when people say "12 am" or "12 pm"
both are absolutely meaningless
 
@aditsu '12 in the morning' and '12 in the evening' is perfectly clear :)
 
@aditsu: Where in the world are you?
 
dutch does that better IMO
 
In the US 12am and 12pm are very commonplace.
 
4:20 AM
@AlexA. if you write/say am/pm we know what it means, but we don't use those abbreviations ourselves
 
@orlp not really.. midnight is between evening and morning
 
Though typically they're just midnight and noon, respectively.
 
@aditsu not true
 
@AlexA. I'm in HK, but that's not really relevant
 
People often prefer their regional dialects, at least in my experience.
 
4:21 AM
@aditsu midnight is a lot closer to the morning than to the evening
 
That's why I ask.
 
@AlexA. yes, midnight and noon, or 12 midnight and 12 noon are perfectly clear
 
morning starts at 04:00, evening starts at 18:00
 
@orlp: By whose standards?
 
12 should be replaced with 0 for clocks.
 
4:22 AM
@AlexA. the dictionary
 
I say morning starts at 6
 
@TheNumberOne: It is in 24-hour clocks; 0 is midnight and 12 is noon.
@orlp: Oh no shit? I had no idea.
I have to go look now.
 
The ambiguity with days for midnight's probably a bigger problem. It's why our assignments are due 11:59
 
> allende duisternis; deel van de dag tussen ca. 18.00 en ca. 0.00 uur: 's avonds in de avonduren
generally we have a couple of ways to say stuff
 
Morning should start 1/2 hour before sunrise and evening should start 1/2 hour after sunset.
 
4:24 AM
@orlp ...I don't speak that language.
 
@AlexA. you can read 1800 and 0000 though :)
 
that's not the disputed part
 
@orlp: Nope, they're in another language. XD
 
allende darkness ; part of the day from about 18:00 to about 0:00 pm in the evening in the evenings
google translator
 
@TheNumberOne: Best Google product ever.
 
4:25 AM
00:00-04:00 is 'at night', 04:00-12:00 is 'in the morning', 12:00-18:00 is 'in the midday' and 18:00-00:00 is 'in the evening'
literally translated from dutch
so we say '3 at night', or '4 in the midday' or '8 in the morning'
 
Heh. I thought it was German.
 
it's always perfectly unambiguous
 
It sounds so weird to my American ears
"4 in the midday"
 
4 uur 's-middags
in literal dutch
 
Oh!
That's not weird at all then.
 
4:28 AM
 
Okay, that one is weird to me.
 
Afternoon's probably more common in English
 
^ Yes
 
Adverb: 's nachts
  1. during the night, in the night, at night
 
@Sp3000 I use them interchangeably.
 
4:29 AM
@TheNumberOne: You would say "2 at night" for 2:00pm?
 
Personally I almost never use midday. Guess it varies
 
Evening and afternoon, not "at night"
 
Oh gotcha
Language is really interesting to me.
 
94? Too long :P
 
4:33 AM
@aditsu: Congrats, that's awesome!
 
@Sp3000 yeah.. but I didn't want to spend too much time, and I had already used CJam
thanks :)
 
anyone have any comments on the GOLF instruction set?
anything missing/superfluous?
unwise cycle counts?
 
I think it's cool, but that's my only input. Just the fact that you know enough to implement something like that yourself is super impressive.
 
it's really not complicated
 
Any ways of getting a random number?
 
4:39 AM
well, you can implement your own RNG in GOLF, but perhaps it'd be useful
I guess I could make a rand instruction that gives back an uniform 64 bit random int
 
@orlp Do you have a CS background? I don't, so to me it's complicated. :)
 
@AlexA. I'm a 2nd year CS undergraduate
 
Oh cool!
 
but I'd consider the fact that I'm a passionate programmer a more important contributor to my skillset
@Sp3000 how expensive should this rand instruction be?
 
Not sure - what are the cycles for anyway?
 
4:44 AM
@Sp3000 the cycles are the entire point
to get an accurate model of execution time of entries, for performance challenges
 
@orlp sounds like Knuth's MMIX
 
@aditsu similar
 
Is this for a specific challenge you're writing, or...?
 
@Sp3000 yes, but I'd like to make it re-usable for other challenges
For example 'write the fastest 64-bit factorization routine in GOLF'
your score would be sum of cycles it takes to factor a static set of numbers, lowest score wins
 
Best to test with some programs, but probably really expensive, eg 100?
 
4:50 AM
@aditsu MMIX is too big for PPCG challenges IMO, you'd have to learn MMIX to be able to compete in such a challenge - anyone should be able to instantly get to work in GOLF
@Sp3000 why make it expensive?
 
Is GOLF an acronym?
 
nope
might become a backronym at some point :P
 
Go Out & Live Free
Golf Olf Lf F
 
Well I don't know how much it takes to write your own PRNG, but I was thinking less than that, but not too cheap so people can abuse it
I mean, if division's already 10...
 
@Sp3000 you think that's low or high?
 
4:54 AM
 
I don't think I can comment without trying
 
@Sp3000 the reason I ask is because integer division in modern intel chips isn't even this cheap :)
 
I don't assembly :P
 
I'm worried I made memory a bit too cheap
I have to make a balance, because cycle counts must be static to not complicate the model too much
 
As I say, you'd need to pick a few problems and compare approaches
 
4:56 AM
G.O.L.F. : Gauge Of Language Fastness
 
in real hardware a load can be 3 cycles if you hit superhot cache, but can also take hundres
@Sp3000 the real challenge here is to write a LLVM backend so people can compile their favourite language to GOLF :P
 
Does mov copy the number to a new register or what happens to the original register?
 
it copies
 
GOLF: Guardian Of Little Forests
 
it's a pseudo-instruction for add r, a, 0
copy would be a better name probably, but the instruction is traditionally named mov
 
5:01 AM
So I can mov add instead of mul 2?
 
b = 2*a
add b, a, a
@Sp3000 no need to mov
you can use the same source twice
 
Oh, right
 
if you wanted to do *3 you can do
add b, a, a
add b, b, a
*9
sal b, a, 3
add b, b, a
 
5:22 AM
Bed time for me. Have a good night, to those in places where it is night.
 
@MartinBüttner the -1 is the same as 0. No move is ever made. Who is EmoWolf?
 
5:55 AM
Hmm it's the 18th already. I wondered what happened to the red team's counterplan.
 
 
3 hours later…
8:32 AM
specs reasonably close to done
 
8:54 AM
Page not found.
 
Heh, seems interesting.
@orlp One question:Why don't you encode the registers as 5-bit sequences?
 
@Sieg I do?
"Each quintet of bits..."
 
"The remaining 25 bits each tell you whether or not that register should be restored, with the least significant bit being a, and the most significant bit y."
 
read past that
that's about ret
ret is a bit of an oddball
 
9:04 AM
I see.
 
it can 'return' up to 25 registers :)
my call/ret scheme is quite different from other architectures
 
That's pythonish.
 
but I thought this would be simpler from a beginners perspective
and easier to code
no push'ing/pop'ing arguments on the stack
 
And more powerful.
 
basically 'call' just goes to a different function, backing up your old stuff
'ret' goes back to the caller, and 'leaks' some of its variables into the old state of the caller
@Sieg if you have any comments/suggestions for the architecture, do let me know :)
 
9:08 AM
I'm not familiar with CPU architectures.
This is the lowest level program I've written :P pastebin.com/VT4cENDT
Well, I guess this is quite low levell too pastebin.com/SSqNPQdS
It's quite wonderful how GET TO THE CHOPPER i\nHERE IS MY INVITATION i\nGET UP 1\nENOUGH TALK is the shortest equivalent to i = i + 1
@MartinBüttner Why not create it?
 
 
2 hours later…
10:59 AM
Hoo. These all parse to the same thing now i.imgur.com/nyMUsOn.png
 
11:24 AM
I was wondering, does anybody else actually like the bracket retention style of my "Explanation Formatter" challenge?
 
@Sieg Mainly because I didn't want to bother anyone with it. The popular demand is rising though...
"maybe after exams"
24
A: Loopholes that are forbidden by default

QuincunxSuicidal entries to King-of-the-Hill challenges. EmoWolf was funny the first time, but it's getting out of hand. While some not-too-serious answers are often necessary to kickstart a king-of-the-hill challenge, purely suicidal answers put in little effort and tend to get more upvotes than serio...

 
11:43 AM
@MartinBüttner Why would anyone want a bot which rolls dice in the PPCG chatroom? We don't do anything here which would benefit.
 
Maybe we can flip a coin to decide?
 
one occasion I can think of, is choosing who would post the (not quite) Bi-Weekly challenges when there is no agreement - then no one can be accused to choosing the result of a private dice role to suit themselves
 
I think executive decision would work fine there, but otherwise something like toothycat.net/wiki/wiki.pl?ToothyWikiInternals/DiceRollServer
 
12:02 PM
@VisualMelon I think that was actually how I first thought of it.
 
I thought it might have been on your mind ;)
we can't have you making an executive dice role, and omitting yourself from the runnings ;)
 
@PeterTaylor Thanks, that actually works. :)
 
(2+sqrt((((((0)!/sqrt(.1~)))!)!*5))) | 62
lol
 
12:22 PM
Are there any features I should add to the sandboxed formatting challenge to make it more "useful"?
 
any of you guys working on this one?
10
Q: Two-zero-one-five puzzle

Uri ZarfatyBackground This puzzle is a variation on the four fours puzzle (itself the topic of a past question). Like that puzzle, the aim is to find mathematical expressions for different whole numbers, using only four digits and certain mathematical operators. In this case, however, the permitted digits ...

I'm at 92/101 right now
 
@PhiNotPi you could make the order case-insensitive and have upper case letters indicate that the character should be kept, and lower case that it shouldn't (then ignoring whether the group is split or not)
so:
xxxxxxx
aAbBcBa
-->
xx    x
 xxx x
 x xx
this would let you choose which brackets to retain and which not
or people who like building up the entire code line by line, could just use upper-case for everything
 
12:44 PM
Rewrote quilt and saved 1 byte. fistpump
 
< can't read
 
12:57 PM
TIL about vim's :sort u
only keeps unique lines
 
1:34 PM
0
A: Two-zero-one-five puzzle

orlp92, ~2300 bytes I'm a bit sad this is a code golf challenge, as I feel that all my previous efforts have been rather useless now that I'll post this: 0 = ((2*0)^15) 1 = ((2^0)^15) 2 = (2-(0^15)) 3 = (20*.15) 4 = (20*(1/5)) 5 = (20-15) 6 = ((.20+1)*5) 7 = ((20*.1)+5) 8 = (2*((0...

 
2:06 PM
0
Q: Way of salvaging "Two-zero-one-five puzzle" challenge?

Uri ZarfatyThe Two-zero-one-five puzzle was intended as a Kolmogorov-complexity code-golf challenge: the task is to generate and print arithmetic expressions for as many numbers between 0 and 100. Unfortunately, I'd overestimated the size of the output (and underestimated the size of a winning program), mea...

 
2:20 PM
I'm attending an event today, and Randall Munroe is a guest speaker.
XKCD creator
 
2:31 PM
@PhiNotPi nice :)
what's the occasion?
 
2:55 PM
@Sp3000 sick, I beat APL by the APL submission getting longer :D
thanks for the help with the quilting again :)
 
I was actually wondering if recursive would be shorter in CJam, but somehow I doubt it
 
oh, and now I found another two bytes, so I'm actually beating the previous APL score
 
You two stop using the same quilt at the same time ;)
 
3:25 PM
@PeterTaylor So, just to come back to those partitions. Would you say that ordered and unordered partitions should be collected under the same tag? I think that's probably fine, because I'm sure there are a probably a few more fine-grained alternative definitions of set partitions anyway.
 
the latest XKCD is pretty great
 
yep :)
 
@MartinBüttner I like the two bytes saved but you might want to some proof-reading :)
 
F is becoming more and more impressive though. Remember when it was just _W%? :P
 
3:28 PM
cjam links are not working anymore
 
@Optimizer works for me but it might be cached
 
Tried in incognito and got an error, but it worked after editing in then removing a char
 
@Sp3000 Looks like you came up with the same algorithm for Haircut that I got.
 
:+ -> s
 
did any of you guys qualify?
 
3:31 PM
I did
 
I didn't have time last night to participate
 
@Sp3000 Did I miss anything?
 
@TheNumberOne I tried B large, but messed up terribly after getting somewhat close :/
 
@Optimizer every single time.
 
Ominous Omino and Logging are quite easy if you find the right algorithm. The time was up for both rounds before I could submit my program.
 
3:33 PM
@MartinBüttner you mean "every :+ingle time", right ? ;)
 
@Sp3000 I timed out for 1A-B-large
 
@MartinBüttner Comma after F, It's purpose -> Its purpose
 
ugh, later... :D
thanks
 
:P
(sorry)
btw the 3% idea was excellent, since I don't think I've mentioned that yet
@TheNumberOne I think quite a lot of people did - I held off submitting until I had a good algorithm (which never happened). aditsu got it with binary search though.
 
@MartinBüttner I found out that, very disappointingly, it's just a video presentation by him. I am attending a TEDx event.
 
3:45 PM
awww
@Sp3000 thanks, most of the things I shortened wouldn't have been possible without your restructuring ;)
 
I'm actually pretty impressed at the number of different approaches this question has allowed
For some of them I'm having trouble recognising how they encoded the rows :P
 
I haven't looked much at the others, tbh
 
I have, in an effort to beat JS, but I don't think that's possible any more :P
 
4:29 PM
Uhhuh... Getting the idea to screencast a project probably should come before starting the project.
 
5:05 PM
0
A: Sandbox for Proposed Challenges

Uri ZarfatyRoguelike to Text Adventure Converter code-golf ascii-art string game Warning: this code-golf challenge may be on the big side for many. Still, the steps are all modular and individually golfable, and the end result is (I think) worth it. Meta-comment: any suggestions for a different scoring m...

 
5:45 PM
Congratulations on posting the 1000th answer to the sandbox! :) — Martin Büttner ♦ 17 secs ago
 
@Optimizer huh?
@TheNumberOne you advanced from round 1A?
 
6:03 PM
@aditsu when I click on links from the quilt question, martin or mine, they are not working in firefox..
@MartinBüttner java tag suggests that teh answers should be in java, no ?
 
@Optimizer As far as I can tell, language tags can be about a specific language as well, as opposed to requiring answers in the language
e.g. metagolf
 
metagolf is not an example. its not a language..
 
I just got a reason to name a variable transformers.
 
Well. I don't think chat's liking the [e]
 
6:13 PM
@Sp3000 my point was that meta-golf is not a language, so what I am saying cannot be countered by giving that example
 
And my point is that there's a number of metagolf questions which involve a language, not requiring answers to be in said language
 
but this particular question has almost nothing to do with java
 
6:33 PM
@Optimizer oh, firefox has known problems with fragment encoding, I haven't added a workaround for that yet
 
@aditsu but they were working yesterday before the release ...
 
huh? I didn't change anything related to that
 
hmm, weird.
 
works in chromium
@Optimizer maybe it's because the answers were modified in the meantime?
 
@Optimizer no
 
6:42 PM
@MartinBüttner I don't think it's going to be such a heavily used tag that it needs subdivision between order and unordered. Or that anyone is going to want to follow questions in only one half of that subdivision.
 
yeah, good point
 
@aditsu not mine ..
 
@PeterTaylor does [set-partition] or [list-partition] sound more general to you?
 
[set-partition]
 
6:46 PM
anyway, I'll add a fix for firefox when I find some time.. or if anybody would like to contribute it, that would be nice
I also need to encode ( ) *
 
@aditsu What about using Base64 in the permalink? I don't think there will be any problems there; you'll only have to URL-Encode +, = and /
hmm... it would break old links though :|
 
that would be a lot more complicated to work with
 
@aditsu Not really, JavaScript has btoa and atob to do the decoding and encoding work for you.
 
hmm
that could work
but it might have problems with unicode
 
good point, MDN says indeed that it's not suitable for raw Unicode strings: developer.mozilla.org/en-US/docs/Web/API/WindowBase64/btoa
it also mentions a workaround
 
7:03 PM
The biggest surprise in this project to me: the translator from AST to JS is the easiest part.
 
 
1 hour later…
8:28 PM
hi all... i've been lurking on PPCG for a little while
i've written a controller for a king-of-the-hill... i'd love some feedback on it, but i don't have the rep to post to the sandbox
 
github or pastebin link?
 
Do you have a written spec?
 
not yet
i have the standard format FAQ question open, though! haha
basically, write a bot which accepts a string of a view of the board, then outputs a string with a move
goal is to survive as long as possible. possible actions: move left, right, up, or down (if there's nothing supporting you, you fall, possibly to your death); drop a rock (which might fall on and kill a bot, including you if you drop up); throw a rock (to destroy a bot and/or rock in the throw path); or rest
also you want to dodge the falling meteors
i have an animated gif replay of a default bot game, though for some reason it's not working correctly...
brb
 
8:53 PM
That sounds quite fun. :) But what's stopping you from answering a code golf or two to get the 5 rep you need for the sandbox? (Or suggest two helpful edits)
 
Martin: haha i can try... i'm not really that good at actually answering stuff, but i can give it a go.
does anyone know matplotlib well enough to know why this is happening for my replay? i.imgur.com/HC6wHoa.gifv
 
9:08 PM
@sirpercival I don't see why you wouldn't. Sandbox doesn’t say it's protected, and you have enough rep to post on meta.
 
@ASCIIThenANSI you need 5 rep to answer a question in meta, and i only have 1. but i'll try and collect 5 mre
 
9:52 PM
it's possible the problem with the gif is actually an imagemagick problem
 
10:22 PM
@PhiNotPi I'm very jealous!!
@PhiNotPi Just saw this one. I'm not quite as jealous anymore.
 
 
1 hour later…
11:25 PM
Some other interesting people did show up, however.
 
00:00 - 04:0004:00 - 00:00

« first day (1540 days earlier)      last day (3286 days later) »