« first day (817 days earlier)      last day (4356 days later) » 

user142019
00:00
I implemented that 5 digit product problem in Haskell in two/three lines.
@Zoidberg You don't have to. You just compile -O3 -ftree-vectorizer-verbose=2 to verify that GCC did the autovectorizations
Last time I used C++ was like... high school
user142019
@sehe oh nice. TIL.
I still use it for PE and know how to code with it, but I'd still like to learn it again (and learn it properly)
s/again/anew/ (c++11)
aha, edited :)
00:01
lol
s/c++11/c++0x ('cause, cooler)
You can use my BigInteger class or anyone elses.
@ThePhD wut
Well I just installed that new distro actually
00:01
Anything that is better than a char array..
@sehe 0x sounds cooler than 11.
that... I think Jerry(?) posted
@MarcusStuhr On windows? That'd be rubenvb
user142019
I'm going to learn Fortran.
@sehe he's talking about the nuwen distro
user142019
00:02
What languages is it similar to? C?
@Rapptz aha
Yeah, nuwen distro
@Zoidberg you'l find out. I'm not a polyglot like you. I can do 10 languages, 3 of them very well. Fortran doesn't interest me
Maybe I should just do all the solutions in assembly XD
00:04
@MarcusStuhr no need to decide who does memory management. Big benefit :)
You mean like that bitrake guy?
I wonder whatever happened to bitrake
I only saw him in the first like ~45 problems
and then sporadically afterwards
Anyways, I think the C++ ports have been a good idea so far -- learned a lot from my ventures over the past 2 days alone (from you guys, that is)
did you learn template metawankery
00:06
In high school, but I've never used them since TBH
<psa> OUR RAYTRAACER IS WORKING </psa>
@sehe I do C/C++ really well, lua passable, Java, C#, PHP, SQL, very poorly, and can read Python. :( I need to learn more languages better.
Actually wondered if I would need to make my prime sieve templated but I figured that I'd never need to generate primes larger than what regular ints can hold
@MarcusStuhr I always wanted to solve a problem with 100% compile time but I can't think of a problem where I can do that.
try Haskell, F#, Lisp, OCaml, they are talking differntly
00:07
Maybe the first few possibly
There are a few in the beginning that are 100% compile time (as I found out the hard way)
I just tasted them a bit, but it's really really different
user142019
Try Erlang. It's a great lnaguage.
@MarcusStuhr I meant with templates!
I might try #1
oh, probably #1
user142019
00:08
Y u no constexpr.
because I don't like constexpr
@Rapptz try doing fizzbuzz with 1 call to cout/printf/etc
user142019
ok.
@Zoidberg sleep! (and spillchuck)
@user1233963 Already did it.
00:09
they are full of const expr, it'es their way of doing things
user142019
@sehe hmm.
if it's pure it's const expr
more or less ;-)
user142019
No.
@Rapptz would love to see the code if you mind sharing
user142019
00:10
int foo;
std::cin >> foo;
int bar = my_pure_function(foo);
@MarcusStuhr three problems left on the first page, gf has been yelling for an hour. What is my play?
user142019
@sehe I'm not going to waste my time this early.
@JohanLarsson depends on what she's been yelling :)
@Zoidberg but if your function is pure, it as no side effets, it just returns something related to your input, so what's the problem ?
user142019
00:12
@sehe "C++ SUCKS! USE ERLANG!"
What is she yelling exactly? :P
Also, is it me or are C# chatters slowly moving into the Lounge during off-peak hours?
@Rapptz doesn't that call cout 100+ times? my suggestion was to build the string using templates and then call cout only once
that seems rather pointless
@sehe She wants to 'talk' I think, dunno what that means really :)
user142019
00:14
It means you're spending too much time with us. :P
Smalltalk is an object-oriented, dynamically typed, reflective programming language. Smalltalk was created as the language to underpin the "new world" of computing exemplified by "human–computer symbiosis." It was designed and created in part for educational use, more so for constructionist learning, at the Learning Research Group (LRG) of Xerox PARC by Alan Kay, Dan Ingalls, Adele Goldberg, Ted Kaehler, Scott Wallace, and others during the 1970s. The language was first generally released as Smalltalk-80. Smalltalk-like languages are in continuing active development, and have gathere...
@sehe pun but still ok! I think I will suggest that actually!
@Rapptz perhaps, but it would be interesting to see
spending too much time == to waste ?
@JohanLarsson Think that's something? Well, here goes:
There's also a UNIX utility do do what she asks, but instead I find that this utility does what she wants
00:16
@sehe one problem with the C# room is that the majority is <18 years old, sure that are nice but they don't flame the same way you do
@JohanLarsson Well, I think the average here would be 24-26. At least, of the talkatives
user142019
I lower the average. :D
@sehe ew, i'm to old for the second one, to old for math also
@Zoidberg But you flame like the stalmeesters
@JohanLarsson Just how old are you. Checking profile... Nah. Not too old.
user142019
I flame in bed only.
00:18
@sehe 34 & bald
I win. Your argument is invalid.
Syntax Error Ok ?
user142019
How old are you on a scale from 1 to 30?
sbi
When it comes to programming i'm young though, started after .net 3.5
user142019
@JohanLarsson looks great on the starboard without context.
00:19
@JohanLarsson Wow.
I started at Logo but I was real attarted
@StephaneRolland 'attarted'?
user142019
I don't know what the first language I used was.
user142019
I think VB.NET or C++ C With Classes.
@Zoidberg yep
00:20
@sehe being really late in mind thinking
My first language was GWBASIC
user142019
My first language was Dutch.
> Error 1 error C1014: too many include files : depth = 1024
@MooingDuck Wow. Include cycle or symlink mishap?
@sehe afeter logo i learnt basic but microsoft basic without real knowledge of the hardware
@sehe only goto lines math operations and goto lines
user142019
00:22
The languages that helped me the most in the beginning were Objective-C and Ruby.
@sehe was trying to fizzbuzz with preprocessor
@sehe on a pc with with 256K memory
The language that helped me the most was Turbo Pascal. And assembly
user142019
@MooingDuck cool.
@Zoidberg I think it's possible but It'll be hard
00:23
the language that helped me the most was C++ at least some order in the chaos
user142019
Preprocessor isn't Turing complete. :P
@Zoidberg don't need that for Fizzbuzz
user142019
Later Haskell and C++ helped me much.
@StephaneRolland Ow. I think I've always had 640k (minus ROM, OS, and video of course). Well, that is, when I actually had a PC. Which wasn't true the first years
late comment but 26 here
curious what the age distribution is though
user142019
00:25
Stalin (STAtic Language ImplementatioN) is an aggressive optimizing batch whole-program Scheme compiler written by Jeffrey Mark Siskind. It uses advanced flow analysis and type inference and a variety of other optimization techniques to produce code (using C as an intermediate language) that is very fast, particularly for numerical code. In a number of tests it has outperformed hand-written C, sometimes by a considerable margin. Stalin is intended for production use in generating an optimized executable. The compiler itself runs slowly, and there is little or no support for debugging...
user142019
I should call my Zoidlang implementation "Hitler".
@MarcusStuhr There has been some analysis on that by "a guy" using data.stackechange.com (or a data dump). However, I don't think it mentioned chat usage
ok here is the play, opened a beer and went to bed
@JohanLarsson Is she there too? And why are you still typing?
experimenting with threads
00:27
hmmm. What's the ideal datatype for holding a list of triplets? I presume a vector of tuples but I think that's boost-only?
at my job one of my colleague called me the Führer... I was just asking him to name his Interface class more accordingly to what it was doing...
also MSVC's intellisense doesn't like it when main.cpp includes itself, fyi.
MSVC is an infiltred spy
I'm installing a printer driver, wish me luck
user142019
@CatPlusPlus Bad luck.
00:32
Be carefull it might escape on the intranet with viking names
user142019
@MarcusStuhr std::vector<std::tuple<T, U, V>> doesn't look very Boost-only to me.
Yeah I just googled it -- just saw std::tuple
tuples it is!
user142019
If you don't want tuple you can do, you know...
user142019
template<class T, class U, class V>
struct triplet {
    T first;
    U second;
    V third;
};
user142019
And add the appropriate non-data members.
00:33
Yea
Tuples remind me of Hollandse tulpen.
user142019
The Netherlands is one of the few countries where flowers in flower shops don't look sad and terrible.
don't worry your country export flowers in less of one day, they are still beautifull here
user142019
lol
@Zoidberg I like that better than tuples but don't know any c++
user142019
00:37
I have a good idea for a software product. I'll become rich.
user142019
@JohanLarsson templates are glorified generics, and Turing complete.
I am having a surprising hard time doing #1 with template metaprogramming :(
c++ template are the gods of generics
user142019
I have blood on my arm.
C++ templates makes other generics look pretty bad imo
00:38
Night
user142019
Morning
maybe in haskell they say they have more, but i cannot understand Monads
@StephaneRolland the interesting thing is they often get grown in Africa, flown to Holland for auction, then exported again
user142019
Afrikaantjes.
@Zoidberg This seems to happen a lot to you lately. What's the cause?
00:39
they grow in africa ?
rose markets seems so astonishing in holland
@StephaneRolland Some do. Yes. They basically migrated the 'factory' :) I know there are in Kenya
user142019
@sehe bloody nose once, and I have a bump on my chin that I keep scratching open. xd
user142019
I have a lot of blood on my arm, but don't worry; it's not mine!
they must export by plane ?!
@Zoidberg lol
00:41
rose would droop by boat
@StephaneRolland and by cooled trucks of course
no ? what ?
seriously ?
user142019
Hoe heet je?
- Roos.
Oh, net als die bloem toch?
- Ja!
Weet je hoe mijn moeder heet? KNOLSELDERIE!
user142019
00:42
Hans Teeuwen FTW xd
is there a way to "clone" a macro?
I really thought the fields were in holland
copy paste!
:D
user142019
#define a foo
#define b a
#define A foo()
#define B IDENTITY(A)
#undef A
int main() {B;}
00:44
i won't bother you less... I'm good to sleep...
have fun
user142019
Good bye.
so far I got B to be IDENTITY(foo()) which is something
@Zoidberg that's bad. I'd probably lol when Teeuwen "said" it
user142019
@StephaneRolland that (at least, the pronunciation) means "dammit" in Turkish.
user142019
00:45
@sehe lol
çok güzel!
oh hey, #pragma push_macro
I love language, and if I knew I wouldn't say a word innapropriate
not my kind
goodbye so
is there a way to un-stringify in preprocessor?
user142019
No.
00:51
is it possible to do compile time string concatenation?
user142019
Yes.
user142019
#define CONCAT(a, b) a ## b
not that kind
constexpr char* a = "hello";
conexpr char* b = "world";
somehow concatenate those
user142019
CONCAT("Hell", "o!!!") becomes "Hell""o!!!" which is the same as "Hello!!!".
Also "hello" "world"
@user1233963 no
user142019
00:52
@user1233963 oh. no.
damn, i'm sad now
user142019
Owned.
@user1233963 tip: constexpr char* is not a string, it's a pointer
yeah there doesn't appear to be a way to define a macro as the unpacked version of another macro
01:08
@Zoidberg I don't think it's correct to do that. It should be CONCAT(a, b) a b
0
A: Opengl 3.3 c++ runtime error 'vector subscript out of range'

MicYou simply cannot use vector<char> as a array of char-a-la-C. Standard does not even guarantee that objects are contiguous, so &myVector[0] is definitely not the way to go to pass to a C-style function. You should instead create a char* buffer that you dynamically allocate with new wit...

Not sure if confusing vector with deque, or just stupid :S
I was more thinking of trolling vs stupid, but heh ;D
@Griwes standard didn't explicitly guarantee that vector was contiguous in C++03, it was merely implied. Fixed in C++11.
@MooingDuck That is not the only, hmm, weird sentence there.
01:18
I believe a standard conforming implementation could have had them not-in-order/contiguous
Also, as we are in 2013, and there is no explicit C++03 or 98 tag there, we can safely assume it's C++11.
@Griwes The rest seems fine
@Griwes Oh, I merely meant his knowledge might have been out-of-date
> You should instead create a char* buffer that you dynamically allocate with new with the right size
God forbid.
cough
@Griwes assuming vector and string weren't contiguous, he's right. And string was definitely not safe (in that way) in C++03.
01:19
nvm
@MooingDuck string was just bugged :P
Well, it still is.
@Griwes now it's guaranteed to be contiguous and not copy-on-write.
so, in C++03, he would have been right.
I mean the design antipatter of the class is still a bug.
I'm late going home now
@MarcusStuhr you win this time marcus :(
01:21
You know, those numerous member functions that should be in algorithm instead.
@Rapptz ?
I can't do PE #1
well I mean I can do it the ol' boring way
Are you using the arithmetic sequence approach?
There really is no fancy way to do PE#1.
and the maybe interesting way of while(i--) sum += i * !((i%3)&&(i%5)); but other than that..
not much
01:22
They are all boring.
I blame std::integral_constant :(
Problem 1 is interesting for newcomers at least
is it?
yes
absolutely
01:23
It's interesting for 1st semester CS students.
That have no clue about programming at all.
If you visit the old problems you see new programmers really proud of themselves
Hm..
I don't like any of the first 100 though, personally
54 (and whichever the monopoly one is) being the least favorite
you used python..
it comes with a built in big integer library
01:25
yes
:(
I had to make my own.
very few of the first 100 require a big integer class
off the top of my head
2^1000 and 1000 digit fibonacci number
you don't need bigints for those
yeah I didn't use it either
but I used them to test how fast my bigint library is :(
01:27
388 might be a close exception case
but that's if one doesn't bother with the zeta function frenzy
I haven't solved 388..
hm
oh wait I did
it says the answer right there in my face
I don't even remember doing this one
lololol
but I didn't do 387 and 389
is that Harshad Numbers + Platonic Dice?
if so, both of those are very very straightforward compared to most
yes
I don't think this problem is hard
sure is worded kind of weirdly though
01:32
which, 387?
389
by weirdly I mean the big CODI stands out to me more than the actual problem
haha
statistics is one of those super funky area of mathematics where problems are either really easy if you're familiar with the concepts
or ridiculously hard otherwise
it's not exactly an intuitive thing, i.e. trying to logic/reason your way through can be really tough
I mentioned it before but I really do not like PE's game theory and geometry problems
the former are really annoying
by game theory do you mean the combinatorial game theory questions?
yes
I can't think of a single one of those problems that I liked doing
01:35
yeah those are hard
i recall 177
being an especially nefarious geometry problem
took longer to type the code for 389 than thinking/running it
now.. to see..
wait what?!
how long was that 4 minutes or so?
if you did that one legitimately, that was faster than the guy who got first for that problem
well my answer was wrong
but with a bit of tweaking it'll be right
!!
you'll see.
01:39
it shows that you've solved 389 though
it does?
oh wow I thought it was wrong
cool.
@Pubby lol
@MarcusStuhr oh we're friends!
@Pubby Why am I so vulgar in there :(
Rapptz Ain't Nuthing Ta F' Wit
I don't know how to do 387
01:44
work backwards
someone else finally got 409, lol
I don't know what that means in this context :|
84, up from 83 yesterday
no I mean working backwards
I mean this problem seems simple but
Right truncatable Harshad numbers can be generated recursively
first nine natural numbers are all Harshads
does that count?
01:47
? yeah they're Harshads
hmm..k
you can also check OEIS for stuff like this to verify etc
lol OEIS
I might be overthinking this one
my captcha for this is 12345
@MarcusStuhr by the way did you see the tr1/cmath header's mathematical functions? en.wikipedia.org/wiki/…
Yikes
lol
I thought it was cool :(

« first day (817 days earlier)      last day (4356 days later) »