« first day (1717 days earlier)      last day (3128 days later) » 

2:02 AM
@Geobits You have seen my Java masterpiece, right? That's my proudest piece of code on the entire site.
I've honestly never been prouder of any other piece of code than that one.
 
Am I allowed to show off my Perl masterpiece? codegolf.stackexchange.com/questions/16226/…
 
That's code-trolling :P
 
Ah, back in the code-trolling days :P
 
If you like code trolling codegolf.stackexchange.com/a/26104/9498
And Herjan's reply
"I trolled myself" I think you trolled your girlfriend as well, lol — Herjan Apr 23 '14 at 19:01
 
haha, I remember that one
 
2:05 AM
@Herjan girlfriend? What girlfriend? — Justin Apr 23 '14 at 19:05
 
All of these code-trolling questions probably need a trigger warning.
 
Only after that comment received upvotes did I realize why it's funny...
 
Those code trolling answers should be made more efficient.
 
@Geobits Ahh, but my answer works in better than O(1) time.
> finds the sqrt by integer ADDITION from the number until we reach the correct number. This takes a long time since we wait for integer wrap-around. Because of this, it actually takes less time for larger numbers. For the sample output, it took 20 seconds.
 
Mine is better than O(1) also, if you define better as "takes longer than".
 
2:10 AM
If you restrict the n to int values, at least, it works faster than O(1)
I never bothered to compute the actual time complexity of the algorithm....
 
I definitely didn't for mine.
I'm sure I've seen worse, but it is pretty bad. I half-heartedly tried to determine complexity, but gave up and called it O(big). — Geobits Feb 28 '14 at 13:55
 
My sorting program has like n^3 space complexity and n^4 time complexity, or something like that.
 
Let's see. We iterate from n to 2^31 - 1, then iterate over 2^31 negative integers, then finally sqrt(n) integers. So that should make it take 2^32-1-n+sqrt(n). So apparently my time complexity is sqrt(n) - n plus some constant... not a sustainable complexity. Hmm.
 
On second thought, I should have wrote my reference implementation before writing my entire spec through copy-paste.
 
In truth, I was rather surprised that the computation finished in 20 seconds. That's the fastest I've gotten to integer wraparound via incrementation.
 
2:15 AM
Mine can verify a sorted array of ten elements in about that time.
 
Hmm. If we assume a bounded n, I think we can make it take a constant number of operations to do any computation.
 
@quartata What is it supposed to do? If you execute it on an empty stack, the first \ will already cause an error.
 
If we assume n is bounded, it's easy to trade time for space and just use a lookup table :D
That's what the physicists mean by spacetime, right?
Well, bounded and discrete I guess.
 
Fine, bounded n, very limited memory.
Such that you can't cheat by lookup tables
 
Well that takes all the fun out of it :(
 
2:22 AM
Let's say I have an O(n!) algorithm and I want to make it O(1). I first take b as my bound, then compute b! and n!, busy-loop for b!-n!, then do the actual algorithm and return.
Naturally you have to account for time complexity in computing n!.
 
And you call a lookup table cheating? ;)
 
Lookup tables are too easy ;)
 
long factorial(int n, long factorialOfN){return factorialOfN;}
^ O(1)
 
ಠ_ಠ
 
That method works for every input I've tried so far. It's very quick, too.
It'd be better to use BigInteger though.
 
2:27 AM
Your method has a bug. factorial(5, 100) returns 100. :P
 
Reminds me of applying map to a very long sequence in Python. Very fast...until you actually evaluate it.
 
@Doorknob Garbage in, garbage out. Give it the right arguments.
 
long factorial(int n){return factorial_(n, 1);} long factorial_(int n, long acc){return factorial_(n - 1, acc * n);} Assuming tail-recursion of course. O(n). But let's make it O(1). long factorial(int n){long upperBound = factorial_(20, 1); /* 21! overflows long */ long result = factorial_(n, 1); long waitAmount = upperBound - result; for (long _ = 0; _ < waitAmount; _++); }
 
4
Q: Sᴍᴀʟʟ Cᴀᴘꜱ Cᴏɴᴠᴇʀᴛᴇʀ

MaltysenPortable Spec. Iɴꜱᴘɪʀᴇᴅ ʙʏ @ConorO'Brien's ᴜꜱᴇʀɴᴀᴍᴇ. Aʟꜱᴏ ᴛʜᴀɴᴋꜱ ᴛᴏ @Dᴏᴏʀᴋɴᴏʙ ꜰᴏʀ ꜱʜᴏᴡɪɴɢ ᴍᴇ ᴛʜᴇ ᴇxɪꜱᴛᴇɴᴄᴇ ᴏꜰ ǫ ᴀɴᴅ x. Sᴍᴀʟʟ Cᴀᴘꜱ ᴀʀᴇ ᴘʀᴇᴛᴛʏ ᴄᴏᴏʟ. Tʜᴇʏ ᴀʀᴇ ᴜɴɪᴄᴏᴅᴇ ᴄʜᴀʀᴀᴄᴛᴇʀꜱ ᴛʜᴀᴛ ʀᴇᴘʟᴀᴄᴇ ꜱᴍᴀʟʟ ʟᴇᴛᴛᴇʀꜱ. Tʜᴇʏ ʟᴏᴏᴋ ᴊᴜꜱᴛ ʟɪᴋᴇ ᴛʜᴇ ᴄᴀᴘɪᴛᴀʟ ᴏɴᴇꜱ, ʙᴜᴛ ꜱᴍᴀʟʟᴇʀ, ᴀɴᴅ ʟᴏᴏᴋ ʀᴇᴀʟʟʏ ᴏꜰꜰɪᴄɪᴀʟ. Yᴏᴜʀ ᴛᴀꜱᴋ ɪꜱ ᴛ...

 
Hmm, doesn't CSS3 have a way to do smallcaps automagically?
 
2:31 AM
@Justin Whoops that's not O(1) (for a tight big-Oh). It takes longer for smaller values...
long factorial(int n){final long upperBound = 20; /* 21! overflows long */ long result = factorial_(n, 1); long waitAmount = upperBound - n; for (long _ = 0; _ < waitAmount; _++); }
That should work. I hope.
 
Should waitAmount be factorial(upperBound-n)?
Hmm, no...
An empty loop doesn't seem like it would wait as much as another function call.
 
@Geobits But according to big-oh complexity, it doesn't matter. That, or my teachers taught us all wrong.
 
@Geobits that's only formatting, the actual chars remain the same
 
If one route takes roughly O(2^32 n) to compute, whereas the the other route takes roughly O(2^-32 n) to compute, the time complexity is O(n).
Of course, I have to assume the jvm doesn't optimize.
 
Assuming the compiler doesn't edit them away, yea :)
...
 
2:39 AM
@Justin Forgot to return: long factorial(int n){final long upperBound = 20; /* 21! overflows long */ long result = factorial_(n, 1); long waitAmount = upperBound - n; for (long _ = 0; _ < waitAmount; _++); return result; }
 
@Geobits "and 14 is at 20 hours and counting.". Wow, over 1 and half years? That's one slow algorithm!
 
I guess I don't need the tail-recursion either. You will get incorrect values before the stack-overflow anyway.
 
@Sp3000 Damn, I lost track. Time to start counting again...
 
I think if I'll ever be in a startup, I'll push for a functional programming language. Perhaps Clojure, as it can access Java. But I foresee the future as extreme parallelism. Clojure is supposed to be good at that. Functional programming languages are supposed to be good at that. The programmer doesn't even have to think about the parallelism; it's taken care of for her.
Why do I keep learning different languages instead of C#! I've wanted to learn C# for quite a while now, but I never do...
Why do articles have to make no sense...
 
2:58 AM
@Doorknob Are you there?
 
no
 
Ok
Never mind then
 
hahaha
... so, yeah, I'm here @AlexA. Why? :P
 
Haha
Is it possible to run a terminal command from within Vim? So if I'm working on a Julia script, do something like julia thisfile.jl from within Vim and see the STDOUT output?
 
:!julia %
(or press ^Z to suspend vim and get an actual, full terminal)
 
3:02 AM
If I ^Z, how do I get back to Vim?
 
fg
Or you can do a fancy thing if you use zsh and make ^Z also be the key to return to vim:
fancy-ctrl-z () {
  if [[ $#BUFFER -eq 0 ]]; then
    BUFFER="fg"
    zle accept-line
  else
    zle push-input
    zle clear-screen
  fi
}
zle -N fancy-ctrl-z
bindkey '^Z' fancy-ctrl-z
 
> /bin/bash: julia: command not found
 
... well do you have Julia?
(In your $PATH?)
 
I have it aliased
Not in my path
alias julia=/path/to/julia
 
Okay, it needs to be in your $PATH then
symlink it in /usr/local/bin or something
 
3:05 AM
Come to think of it, I had original done the aliases so that I could use 0.3 and 0.4 simultaneously. But now 0.4 is released, so I'll just put that in my path and forget about 0.3.
Hm, I added it to my path but it doesn't seem to want to find it.
 
@Dennis It was supposed to take a number n and output that face Alex always uses but with n underscores in between
Also what have I missed?
 
I'm an idiot
2
 
@AlexA. You might have to restart vim?
haha, what?
 
No, I just need to learn how to brain
 
So do you think that the cnr open submissions should be sorted by time remaining or by program length?
 
3:09 AM
I put the full path to the executable in my path rather than its containing folder.
 
@AlexA. Well, it's official.
 
@DanielM. I would be able to answer that if it ended with a question mark. :P
@PhiNotPi :/
 
Hooray. The CS department at my school has Java 8 installed. Last I checked it was Java 6.... But this means that when I take the class which involves coding in Java, it will be easy, instead of a huge pain.
 
@quartata If the number is already on the stack, it works. If it isn't, prepend ri to read an integer from input.
 
I've tentatively added a CS minor to my schedule.
 
3:10 AM
@AlexA. Done :b
 
@Dennis Ah OK. So the integer wasn't parsed.
Works! Danke
 
Without q, l or r, it isn't even read.
 
@DanielM. Time remaining IMO
 
@quartata Gern geschehen. 'ಠri'_*1$ is golfier though.
 
translate: Gern geschehen
(from German) My pleasure
Dennis' pleasure
 
3:12 AM
Dennis's*
(unless Dennis is plural)
 
I've read that both are correct so long as you consistently use one or the other.
 
pretty sure that's wrong
 
So it could be "Dennis'" or "Dennis's"
 
​translate: 'ಠ42'_*1$
(from CJam) ಠ__________________________________________ಠ
 
translate: lolocaust
(from Dennis) roflcopter
 
3:14 AM
@Doorknob
72
A: What is the correct possessive for nouns ending in "‑s"?

JSBձոգչYour example sentences confuse two different problems. For nouns that are plural (such as "boys"), the possessive formed in writing by adding an apostrophe after the plural -s. This is pronounced the same as the plural and the singular possesive: The boys' books [boys' sounds like boys] Fo...

 
Hm, but
30
A: Which singular names ending in “s” form possessives with only a bare apostrophe?

tchristThe most useful rule — and the most general and the easiest to remember — is simply that you add ’s whenever you actually say an extra /əz/ at the end when forming the possessive, compared with how you say the non-possessive version. Let your own ear be your guide. That’s all there is to it. No ...

They have contradictory answers
 
@Dennis :O Unheard of!
 
It's more of a style issue. Different style guides give different answers.
 
The plot thickens.
 
3:17 AM
I added corn starch, that's why.
 
Not on PPCG. We blame Martin.
 
@Doorknob +1 and accepted
@Dennis I agree with this. How we do it confuses me so much.
 
@haneefmubarak This interpretation of cops and robbers is sort of my fault (because I wrote the first challenge assigning the roles this way round). I've first come across the phrase in internet-security capture-the-flag games, where the cops secure a machine (and the flag in the form of some secret) and the robbers break in to steal it. The metaphor I had in mind was along those lines. — Martin Büttner ♦ Jun 1 at 10:07
 
@AlexA. So I decided to check in on my Nethack savefile that I currently have. Turns out I somehow have a BoH... O_o Anyway, I will attempt to continue now if you want to watch
 
3:22 AM
I've heard about CnR for the first time on PPCG, so it makes sense for me. It also seems logical that the "good guys" are the contestants of the main challenge.
 
@Doorknob I will in just a moment; I'm working on a Julia solution for small caps.
@Dennis No
 
@MartinBüttner Yeah, and you'd have to guess the language at that point anyway :P
 
Hi
6
 
I don't understand those stars
12
 
just worked 26 hours in 3 days (:
how are you all?
 
26 / 3 = 8 + 2/3 Hopefully you got paid overtime for the 40 minutes a day.
 
3:35 AM
minus unpaid lunches /:
 
Ahh....
So that's really 23 / 3 = 7 + 2/3 paid hours a day.
 
$.50 extra on Sundays, though
 
Minimum wage in Utah is something like $8. So $8 * 2 * (7 + 2/3) + $8.5 (7 + 2/3) = 187.83. Hopefully you earned more than that (sorry for doing the math...)
 
minimum here is 7.25
i make 7.30
 
Minimum wages are kind of sad...
 
3:38 AM
yes
 
It's $15 in the city of Seattle
 
Hey Utah minimum wage is also $7.25. Didn't know that
 
i made $162.775 for 21.75 hours of paid work
but i was there for 26 hours /:
 
:/
You said 26 hours, but I thought it was only 1 hour lunch break a day, plus paid breaks. So where'd the extra 1.25 hours go?
 
@AlexA. and NYC (I think)
@Justin Into "learning the ropes"
 
3:39 AM
Umm... that's supposed to be paid, I believe.
 
^
 
^
 
i wasn't enrolled in the clocking system until the end
/:
 
But they are supposed to provide a method for you to input those hours for the "learning the ropes"
 
yeah i know
 
3:41 AM
That sucks...
 
i don't really want to argue with them on my first week, though
 
It's illegal for them not to pay you for that time.
 
You could casually mention it and just let it go if they don't do anything about it
(If you don't want an argument)
 
it's <$12
lol CashPHP
 
Something like, "Hey, I didn't manage to clock in my hours from the <name of learning the ropes>. Is there a way we could fix that?"
 
3:43 AM
@DanielM. What's being achieved by requiring robbers to crack in the same language?
 
i will when i go in
 
Good idea. No harm in trying.
$12 is enough for some ice cream. Ice cream is always good.
 
Thanks for helping me out guys :P
@Justin true
 
Good luck!
 
@Clearquestionwithexamples I think the general consensus was that it made the challenge way too easy.
 
3:44 AM
workplace.SE, maybe?
 
flowers were on sale for $.50 a bouquet today. i bought a ton lol
 
@Clearquestionwithexamples That way, a well-golfed submission in a wordier language isn't beaten by a golfing language
 
@Maltysen That's where I learned the stuff I told Zach.
Now the scary thing is the Burger King my sister went to work at. The manager thought it was really funny to startle the workers who worked the fryers.
She quit after the first day.
 
oh wow
speaking of workplace conditions... I have a friend who works in my neighborhoods McDonald's. she was telling me that sometimes the cockroaches (she referred to cockroaches as "the cockroaches" like it was normal) find their way into the lemonade machine
 
Jesus Christ
 
3:50 AM
@MartinBüttner I spruced up Alex. 10 coming shortly
 
You did what to me?
4
 
He spruced you up.
 
I didn't realize you felt that way about me, Calvin.
 
3:51 AM
Spruced is better than firred.
4
 
> You just got spruced! You have to spruce somebody else in the next 5 seconds or you'll be spruced for life!
 
@PhiNotPi Spooky
 
@Geobits Well they're both hardwoods, right?
 
@AlexA. I suppose technically I made you expand linearly, not exponentially
 
Well, if you remember "sharp square spruce" and "flat friendly fir", it becomes much easier to recognize the different trees by the needles. I'd rather be flat and friendly than sharp and square. I think...
 
3:52 AM
They're softwood like most evergreens I think.
 
Most evergreens are softwood? Is redwood hardwood?
 
@Calvin'sHobbies
 
@Justin According to a random link, at least, it's also softwood: diffen.com/difference/Hardwood_vs_Softwood
 
Okay
4
@ZachGates Wait... are you a skeleton?!
 
I was that night
 
3:55 AM
Alex R "softwood" A.
 
Geez. Who starred my "okay" message? I was acknowledging @Geobits and realizing that I learned something new.
 
You've been very knotty
 
PhiKnotPi
2
 
Oakay
 
Firget it. I'm leafing.
 
This is all I have to say to the current conversation: ಠ_ಠ
 
Wood you guys stop it?
 
3:58 AM
@AlexA. I think its time fಠr the bಠಠkmarklet.
 
@Justin leafing*
 
This conversation has really branched out
 
I'm bamboozled.
2
 
Chat logs last forever.
 

« first day (1717 days earlier)      last day (3128 days later) »