« first day (33 days earlier)      last day (4905 days later) » 

11:00 PM
damnit, I don't have ghc on my machine. Must provide a Haskell solution for the @xyz problem :)
 
night all, it's beer-o-clock
 
I was thinking something like ['a'..'z'] >> ['a'..'z'] Haskell can't enum strings :(
 
'night John.
 
sbi
            foreach (var name in from i1 in Enumerable.Range((int)'a', (int)('z') - (int)'a')
                                 from i2 in Enumerable.Range((int)'a', (int)('z') - (int)'a')
                                 from i3 in Enumerable.Range((int)'a', (int)('z') - (int)'a')
                                 select new char[] { (char)i1, (char)i2, (char)i3 })
                Console.WriteLine(name);
 
11:04 PM
@CiscoIPPhone let alpha = ['a'..'z'] in [[x, y, z] | x <- alpha­, y <- alpha­, z <- alpha]
 
sbi
Jon would probably kill me for that, but it works.
 
Ewwww.
for (int i=0; i<17576; ++i) printf("@%c%c%c ", 'a'+i/676%26, 'a'+i/26%26, 'a'+i%26);
 
sbi
@StephenCanon <cough>
 
@StephenCanon bravo, base-26 numbering :)
 
(depends on contiguous letters, obviously)
 
sbi
11:07 PM
@StephenCanon Oh well, almost everything depends on contiguous letters. Kids wouldn't know how to enumerate the alphabet in school if letters weren't contiguous...
 
@sbi: just don't use EBCDIC, I guess.
Anyone got a system/360 sitting around?
 
sbi
@StephenCanon I'm using one to heat my apartment.
 
sbi
@StephenCanon Nope, kids learn the Latin alphabet around here.
(With the addition of a few umlauts, of course.)
 
@sbi: I have an old sparc station that I used the heat my office as a grad student.
great white-noise generator, too.
 
sbi
11:12 PM
@StephenCanon I wouldn't dream of it. When one company I worked for bought a Sun blade server to port their stuff to Solaris, they needed to pay for noise-insulating their server room.
 
Yeah, you want a workstation, not a server for that task.
 
sbi
Standing in there, you could tell by the noise when someone waggled the mouse on a terminal three rooms away. Sounded like a jet fighter firing its boosters? Mouse. Sounded like the Enterprise nose diving into Jupiter's atmosphere? Compiler.
Those fans were wickedly vicious. Like one inch in diameters, had to make up for it in rpm's. And there were half a dozen of them.
 
let az = ['a'..'z'] in liftM3 (\x y z -> x:y:[z]) az az az
 
sbi
Really, when that thing arrived, they thought they could start porting, but nobody could stand it. Then they put it into its own room, but it was too loud in the neighboring rooms even. So they put it into the server room. Got the admin really hasty in ordering some company to noise-insulate the server room. :)
@FreadO Everyone has moved on already. You're pathetic.
 
@sbi: awwh, be nice.
 
sbi
11:18 PM
@Stephen I am nice. You should hear me when I'm nasty!
Besides @FredO will pay me back in pointing out stupid errors I have in seemingly simple code snippets I post on SO. :)
 
fair enough.
 
@FredOverflow that's cool. how to generalize it for any amount of letters?
 
@sbi I won't be too mean though, still waiting for that pending upvote in 40 minutes... ;)
@CiscoIPPhone I have no idea, haven't done Haskell in half a year or somethign
 
sbi
@FreadO Oh, I will have to go to bed!
 
Who is FreadO?
@Johannes: How many chat windows do you have open? I'm already überfordert with two :)
 
sbi
11:22 PM
@FredO The one that's notified every time I put a @FredO into my messages.
 
@sbi FreadO != FredO
 
sbi
@FredOverflow Ah, that's why it got so quite in here. For a moment I thought I talked too much and scared everyone away!
@FredOverflow Yeah, I know. Answer still stands.
 
You scared Johannes into the Haskell IRC channel, apparently :)
 
sbi
@FredOverflow You mean you lured him! You brought up Haskell, IIRC.
 
He's talking about (:) applied to one argument, right now :)
Oh no, you're right, it's my fault :(
 
sbi
11:24 PM
Anyway, I need to go to bed now. My alarm will be ringing in 6:30hrs. :(
 
@FredOverflow i'm in ##c++ and #haskell and #geordi
 
Another C++ hero lost in the ivory tower of pure functional programming...
 
Regarding this generator programs, an old C snippet:
 
user400055
@sbi lol same
 
int f[9814],b,c=9814,g,i;long a=1e4,d,e,h;
main(){for(;b=c,c-=14;i=printf("%04d",e+d/a),e=d%a)
while(g=--b*2)d=h*b+a*(i?f[b]:a/5),h=d/--g,f[b]=d%g;}
 
11:24 PM
C++ and Haskell... that's extreme :)
 
Enjoy...
 
What is geordi? Geordi LaForge from Star Trek? :)
 
sbi
@FredOverflow That's why you have such glacial response times...
 
40
A: Which programming language requires the most different mindset from C++?

Johannes Schaub - litbI strongly recommend haskell. No side effects when calling functions, purely functional programming experience and a helpful community (irc channel #haskell on irc.freenode.org). You will need to rethink a lot of things you learned in C++.

:)
 
Closing the haskell channel. I only wanted to talk to the @pl bot, anyway
 
11:25 PM
@Fred: an irc bot that compiles, sandboxes, and executes code
 
@FredNurk What language(s)?
 
sbi
@AlfPSteinbach Ugh. Have you been working on uglifying an innocent piece of code for the last 30mins?
 
only c++, afaik
 
:)
Note the implicit int.
 
Good evening gentlemen.
 
11:26 PM
@JohannesSchaublitb ah, nice answer for one of my last upvotes today!
 
Actually I got that from a Franz Bachler, in Austria, I believe
 
sbi
@FredOverflow That's the programmers in chat for you. Only want to talk to the bots for compiling their code.
 
@AlfPSteinbach "Anyway, don't spoil a good answer by insisting there has to be a question." (: LOL :)
2
A: What is the status of ranges in C++?

Alf P. Steinbach#include <iostream> #include <vector> #include <algorithm> #include <iterator> template< class Container > void sort( Container& c ) { sort( c.begin(), c.end() ); } int main() { using namespace std; int const data[] = {3, 1, 4, 1, 5, 9, 2, 6...

 
@FredOverflow thanks =)
 
11:28 PM
@JohannesSchaublitb I did some Haskell last year. Vier Gewinnt mit Bot, aber das wars dann auch :)
 
nice :)
geordi is programmed with haskell by eelis
 
Can we have a geordi in this C++ SO chatroom?
 
would be great ^^
 
@JohannesSchaublitb By the way I love the Channel9 stuff on Haskell
 
sbi
@JohannesSchaublitb Oh now, now you took me somewhere where they triggered one of my pet peeves reactions... See my comment at stackoverflow.com/questions/329672/…. Warning. Contains uncensored obscenity.
 
lol nice. bookmarked
 
sbi
@wilhelmtell No gents here, just programmers. :)
 
@JohannesSchaublitb I watch "Don't fear the monad" at least once a month
 
sbi
@FredOverflow "Don't fear the monad"? Is that a horror movie?
 
I'm starting to get a vague understanding of what they might be :)
@sbi If you're not a pf guy, then maybe.
(Maybe is also a monad, btw)
 
sbi
11:34 PM
@FredO "pure functional"?
 
@sbi yes, although i think it's "purely functional"
 
@sbi Fair warning, while the code is indeed innocent, it's pretty advanced.
 
@AlfPSteinbach What code?
 
@FredOverflow See upthread
 
sbi
@FredO I did some LISP when I studied CS. It wasn't bad, but I don't feel a longing to go back either.
 
11:36 PM
@AlfPSteinbach Does this work as ref?
 
sbi
@FredOverflow Click on the little arrow left of messages that are direct replies. It will take you to what they reply to.
 
@Alf: looks like it expands the initial part of an infinite series (that implicit int code above)
 
sbi
@AlfPSteinbach Frankly, I didn't have a second look. I had my share of badly formatted C code.
Anyway, I'm off to bed now. High time. Have fun and see you tomorrow!
 
Okay, what do I do with my last vote. Any recommendations, guys? :)
 
sbi
@FredOverflow Put it off for another 21mins.
 
11:39 PM
@FredNurk yes :) it computed a few thousands digits of pi, but not in ordinary way
 
@AlfPSteinbach Computing individual digits of PI (or any other number) has always been a mystery to me.
 
@FredOverflow you got it exactly (what it does). and yes, it's a bit mysterious
 
@AlfPSteinbach What? I only said PI because you said PI :) I would never have been able to figure this out from code, even non-obfuscated :)
 
works: 3141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117067982148086513282306647093844609550582231725359408128481117450...
very cute.
 
@AlfPSteinbach warning: format '%04d' expects type 'int', but argument 2 has type 'long int' [-Wformat]
that's what my compiler says to your code
 
11:46 PM
yeah, you have to fix the format specifier =/
 
@FredOverflow just don't use 64-bit *nix compiler
 
I use 32 bit windows compiler
 
or, better, use the right format string.
 
@FredOverflow that's ok then
 
so... how does the freaking thing work??
i = printf just means "how many digits does this number have", right? cool trick!
My eyes are getting sleepy. Night y'all!
 
11:54 PM
Goodnight @FredOverflow
 

« first day (33 days earlier)      last day (4905 days later) »