« first day (1210 days earlier)      last day (3741 days later) » 

9:00 AM
Morning
 
so @Loïc did you enjoy yesterday's competition? :)
 
well for me it's still the same day
 
oh
well technically it ended today for me too
but I was kinda drunk when writing/organizing so :D
 
I ended up not sleeping :(
 
oh.
sorry.
 
9:02 AM
but i am really curious... are there runtimes that have a different heap for new and malloc?
 
nah, I didn't check correctly my schedule
 
@BoniTea you are encouraged to participate in social events nevertheless.
 
@starmole more likely that they have different algorithms, depending on implementations
 
@starmole This is not Lounge<Curious>. Get out! :)
 
really? how would they be different? it's just malloc + run constructor
 
9:05 AM
well yeah and I'm pretty sure free doesn't call the destructor
 
@R.MartinhoFernandes There was a bit more on my PC but, haha haskell, I couldn't get the last feats to compile. The general idea was some sort of a puzzle, where you have to use cat and piping in a funny way to solve it. I had something that resembled a working filesystem (well, Map String String), but I had a bit of problems with mapM_ when using Data.Map so in general I got stuck in things I couldn't easily google. I kinda expected it when choosing Haskell though.
 
yes, of course. still the same heap. so for a primitive type it does not matter.
 
@Xeo I am all for making the next one in groups or pairs.
 
i think haskell's syntax is ugly most of the time
 
@LoïcFaure-Lacroix really?
 
9:08 AM
@Xeo For some definition of something, but yes I did upload my thing.
 
but it's probably just because I don't know it well
 
@AndyProwl woo
 
oh i hate haskell
 
Wait why doesn't that message get resolved
 
9:09 AM
did for me
 
ah, yes, it took a while
@starmole You don't have a heart!
 
We need a place to discuss the next jam
 
i did icfp in it way back. a raytracer.
 
I'd say that Haskell is nice because it make use of monads in a clean way
 
I'll make a poll with open votes.
 
9:10 AM
and i know how to write a fast raytracer
 
@LoïcFaure-Lacroix It's nice because of a lot of other things
 
I'm looking forward to deliver something even worse
 
I personally like scheme a lot :)
 
but in haskell it breaks down badly
 
ah, it seems I forgot to push my last commit
which introduces a very fundamental 1-character fix
 
9:12 AM
what's funny about my code is that it's mostly done, All I really had to do is add a more complete story
 
i had the most embarrassing 1 character fix today: Lerp (a[i], a[i*1], f)
 
if it was JS you should keep it there
 
0
A: why does freeing memory allocated with new fail?

FredOverflowHere is what you actually want to write in C++ code: #include <vector> std::vector<int> m(5);

 
You guys should use openkeyval for your games to enable storage and/or multiplayer.
 
moin o/
 
JBL
9:15 AM
Hi @Arne
 
@starmole i*1 looks suspicious.
 
Yeah you can't deref 1 :)
 
i*1 can be used to create casting in JS
 
JBL
@FredOverflow That's not an answer ! "Why does this deallocation technique fails ?" "Use a vector".
 
yes. it's +1
 
9:16 AM
@LoïcFaure-Lacroix inb4 expression templates :)
 
there is also no point to lerp between a value and itself
 
JBL
@starmole Derp lerp.
 
@JBL Unfortunately, most code in questions isn't C++. Don't you think it's okay to point out "modern" (we're talking 1998 here!) alternatives?
 
@FredOverflow what really always confused me about C++ is that you should do std::vector<int> a; but if you want to send it to a function... you wouldn't want to copy a 100000000 vector right?
so you use a reference
 
right
nothing wrong with references
 
JBL
9:21 AM
@FredOverflow Oh, completely okay. I just thought a good answer would say why it's bad, and then point out the correct way :)
 
would be like this right: int fun(std::vector<int> &ref); ?
 
JBL
(But I'm just nitpicking, don't mind me)
 
lerp, linear interpolation, sorry for the graphics derp :)
 
@LoïcFaure-Lacroix Yes. Unless you only wanted to read from the vector, in which case it would be const std::vector<int>& ref);
 
JBL
I love graphics abbrev.
 
user1804599
9:21 AM
So I was wondering why JIRA didn’t work.
 
JBL
SLERP NURBS LERP
 
user1804599
Appears I started the wrong virtual machine.
 
user1804599
Today is not my lucky day.
 
@starmole lerp isn't limited to graphics
 
sure yes nothing wrong with references then, it just always confused me that we could pass the reference to a function and receive a pointer
 
9:22 AM
@rightfold Are you kidding? Today is 2/7, both of which are prime numbers. It's gonna be an awesome day!
 
@rightfold lol
 
@LoïcFaure-Lacroix You are confusing type& variable (reference type) with &expression (pointer value).
It's unfortunate they both use the same symbol.
C# and D use ref instead of & for reference parameters.
 
I never really saw good C++ codebase to be honest and just brutally massacred C
 
That's because there are practically no good C++ code bases.
 
o_0 Gmail does some special headers for my email from ryanair reminding me about my flight...
 
9:24 AM
nothing fucking works again. It's no fucking surprise in this industry
 
JBL
@TonyTheLion Make it work !
 
JBL
Hehe.
 
@TonyTheLion you're shit, he's shit, she's shit, they're shit, I'm shit, we're all shit.
 
@thecoshman Shitty business
 
9:25 AM
@StackedCrooked hm?
 
beautiful shit! learn to love it :)
 
@FredOverflow it remind me how I saw some codebase having support for mysql/postgresl using ifdef instead of writing plugins for example.
 
Quick estimate: How many students (percentage) can compute the expression 30 + x * 9 / 8 % 2 for four different values of x (with 0 < x < 10) correctly after one semester of C++? The type of x is int.
Anybody wanna guess? :-)
 
50%... also what kind of students?
 
JBL
9:28 AM
n*2 % 2.
 
user1804599
@FredOverflow JavaScript or languages with a sane modulo operator?
 
am I right?
 
Is there a way to reverse \n ?
 
@rightfold Why would I ask JavaScript questions to C++ students?
 
user1804599
@Andy Yes.
 
9:29 AM
8 % 2 = 0 so you can't divide by 0 right?
 
user1804599
reverse('\n') == '\n'
 
i'd be confused about the order of the modulo
 
user1804599
Reversing a singleton list is the identity operation.
 
JBL
Parenthesis are good.
 
user1804599
@LoïcFaure-Lacroix you can never divide by zero.
 
9:29 AM
@LoïcFaure-Lacroix No, but you are closer than @starmole
 
JBL
15% ?
 
then it has to do with x * 9 / 8 which might give a pair number
 
JBL
Considering a sane C++ course.
 
I mean reverse of a new line. Since `\n' gives new line, is there something similar that goes back a line?
 
@LoïcFaure-Lacroix 30 * x does not appear anywhere in the question.
 
JBL
9:30 AM
It's 30 + x.
 
sorry didn't sleep yet
 
@JBL Sorry, but everybody only gets one guess ;)
 
JBL
@FredOverflow Haha ! Fine.
 
Oh wait, you didn't guess yet, did you? Your guess is worse than @LoïcFaure-Lacroix
 
@FredOverflow why would you ask such a question :/
 
user1804599
9:32 AM
@FredOverflow 30, 31, 30, 31, 30, 31, 30, 31, 31, 30
 
@BartekBanachewicz To see if they get basic arithmetic and expression evaluation right.
 
but it's unreadable
 
No hidden quirks like automatic type conversion, just straight math.
 
the question had very little to do with c... or ++
 
JBL
@starmole It completely has.
 
9:33 AM
give me a sec I'll find out
 
JBL
Hint: it's not really about math, more about which sub-expressions are evaluated first.
 
@FredOverflow eh, I never liked "can you read that terrible code tests"
TBF I never liked any tests because tests are dumb
 
JBL
4 mins ago, by starmole
i'd be confused about the order of the modulo
 
then i don't get it. is it a trick? then it's bad. just put parenthesis.
 
I don't see how it's terrible. Also, the test stated that all three operators * and / and % have the same precedence and associativity.
 
9:34 AM
uh of course it's bad
if you have to wonder what the code is doing then it's bad
 
This was not a software engineering test.
 
1 min ago, by Bartek Banachewicz
@FredOverflow eh, I never liked "can you read that terrible code tests"
 
Fine, but by that logic, the question "What does 1 + 2 * 3 evaluate to?" is also terrible, because 1, 2, and 3 are magic numbers, and there are no comments in the code.
 
1 + 2 * 3 uses simple operator precedence
your example is way more convoluted
 
@FredOverflow all students?
 
JBL
9:36 AM
@BartekBanachewicz You don't have to know C++ evaluation order to get this one right, though.
 
It is? Even if I tell the students that * / and % have the same precedence and associativity?
 
user1804599
@FredOverflow teach them Clojure.
 
Right, evaluation order is only important if there are side effects.
 
user1804599
No need for weird mathematical notations.
 
JBL
9:36 AM
It's basic maths :/
 
1, 2 and 3 could be evaluated in any order.
 
@JBL there is no basic maths in C++ because C++ is an impure language with weird numbers
 
wait it's either all or 0 to be honest
 
@LoïcFaure-Lacroix How can it be all students if your guess of 0% was closer than JBL's guess of 15%?
 
JBL
Quantic students.
 
9:38 AM
i still don't know what it would do. i'd assume the mod happens last because it makes no sense otherwise
 
well depending on the order, if you have / * % on the same level C++ will go from left to right
 
Okay, let me simplify the question, because the outcome was more or less the same: How many students can compute 30 + 8 * 9 / 8 % 2?
@starmole Again, * / and % have the same precedence and associativity.
 
then anyone can compute it
 
You would think so, but no.
 
thing is they apparently can't
 
9:39 AM
It turned out to be the hardest question of the exam.
 
user1804599
@FredOverflow 30 students.
 
user1804599
Or maybe 31.
 
5 rightfolds
 
user1804599
Depends on the mood.
 
@rightfold You should not have edited your answer, because five was correct :)
 
JBL
9:40 AM
@FredOverflow Out of ?
 
user1804599
I think more students can do it.
 
JBL
Oh.
 
user1804599
5% is not 5 students unless there are 100 students.
 
@rightfold Apparently they can't, at least not under pressure.
 
user1804599
9:41 AM
There are way more than 100 students.
 
user1804599
I think there are billions of students.
 
I was talking about one conrete exam that actually happened in the real world.
 
it's not useful knowledge. but good to know
 
user1804599
I guess it would be about 0.001%.
 
user1804599
@FredOverflow OIC.
 
9:42 AM
I should have known you are only able to think in abstractions and generalizations ;)
 
JBL
@FredOverflow Do you teach C++ ?
 
@JBL I used to.
 
user1804599
@FredOverflow I prefer marble exams over concrete exams.
 
user1804599
Concrete is ugly.
 
Concrete Mathematics: A Foundation for Computer Science, by Ronald Graham, Donald Knuth, and Oren Patashnik, is a textbook that is widely used in computer-science departments. Contents and history The book provides mathematical knowledge and skills for computer science, especially for the analysis of algorithms. According to the preface, the topics in Concrete Mathematics are "a blend of CONtinuous and disCRETE mathematics." Calculus is frequently used in the explanations and exercises. The term "concrete mathematics" also denotes a complement to "abstract mathematics". The book is b...
 
user1804599
9:44 AM
Dat visual pun.
 
5% is pretty low
 
@starmole It seems to be a common phenomenon that students forget all the basics during exams. I remember a Prolog exam where almost nobody was able to compute 1 + 2 * 3.
 
user1804599
5% of students.
 
user1804599
That’s 0.05 student.
 
you know math has none of those "trick" questions
 
9:45 AM
@rightfold ... if a pun is a play on words... wouldn't a play on pictures be a wun?
 
@starmole my math class don't need tricks
 
How is 1 + 2 * 3 a trick question? It tests whether you understand the concept of operator precedence.
 
JBL
@FredOverflow I myself performed quite poorly during exams (of any kind, not necessarily school).
 
@FredOverflow I have this book
Don't ask why
 
@rightfold no... 5% of students is 0.05 * the number of students students.
 
9:46 AM
1 + 2 * 3 is not
the % vs / is
 
i++ + ++i is a trick question
 
user1804599
@TonyTheLion Why?
 
user1804599
@LoïcFaure-Lacroix In Styx that is illegal.
 
user1804599
+ works only on expressions and ++i is a statement.
 
user1804599
i++ is a syntax error.
 
9:47 AM
@LoïcFaure-Lacroix I don't teach i++ in my C++ courses, because the ratio of usefulness vs confusion potential is extremely low.
 
user1804599
It is useful with output iterators.
 
in coding the right answer is often "don't do this" ... can't see that in math
 
@rightfold Styx?
 
user1804599
@starmole Math has no side-effects and UB so it doesn’t matter if you do things wrong.
 
@starmole Programming languages didn't have as much time to mature as mathematics had.
 
9:49 AM
@FredOverflow make kind of sense, but still a good thing to know
 
user1804599
@TonyTheLion I programming language.
 
user1804599
With a very simple type system.
 
math also doesn't try to "get things done"
 
I wonder if there was a time when there were as many "math languages" as we have programming languages today.
 
different goals
 
user1804599
9:49 AM
There are only hash tables and multimethods with arbitrary guards.
 
heh
there's a guy sitting next to me playing baldur's gate
at work
and is getting paid for it
 
tosser
 
@TonyTheLion Don't ask rightfold about Styx, his answers about the language will change every week or two.
 
user1804599
No. I know exactly how I want it now.
 
9:51 AM
That's what you said last time. And the time before that.
3
 
user1804599
Hash tables, userdata and multimethods.
 
JBL
@FredOverflow s/Styx/anything/ s/the language/it/
 
@rightfold But almost nobody is asking for multi-methods! Why would you design a language around them?
Wait, I know: generalization and abstraction.
 
user1804599
Why would I specialise for monomethods?
 
user1804599
When I can generalise for multimethods.
 
JBL
9:52 AM
Multi-methods, what's that ? Let's find out.
 
user1804599
Actually, I don’t know if this is really multimethods.
 
user1804599
You can just implement a function multiple times with different guards.
 
user1804599
E.g. meth drive(c, p) when p.age >= 18 { c.speed += 1; } meth drive(c, p) when p.age < 18 { throw …; }.
 
That's not multi-methods, that's pattern matching.
or guards
 
user1804599
Yeah guards.
 
9:54 AM
Multi-methods is virtual dispatch on more than one (implicit this) argument.
 
user1804599
This is a generalisation of multimethods!
 
I knew it :-)
 
user1804599
It is evil since you can overload existing methods from other libraries.
 
user1804599
I think I should allow the programmer to restrict it to a single module if he wants to.
 
Multiple dispatch or multimethods is the feature of some object-oriented programming languages in which a function or method can be dynamically dispatched based on the run time (dynamic) type of more than one of its arguments. This is an extension of single dispatch polymorphism where a method call is dynamically dispatched based on the actual derived type of the object on which the method has been called. Multiple dispatch generalizes the dynamic dispatching to work with a combination of two or more objects. Understanding dispatch Developers of computer software typically organize sourc...
 
9:55 AM
nah... the future is true mashups. you guys think too much like engineers.
 
Hi. Is there a good place to talk about (Thawte) code signing certificates?
 
@starmole I read mashups as hashmaps first :-)
@ThomasW. Parse error: unexpected token (Thawte)
 
JBL
@FredOverflow Hashmups ?
 
And what on earth are code signing certificates?
 
user1804599
 
user1804599
9:57 AM
>
 
user1804599
@FredOverflow Probably some scary enterprise thing.
 
right now we do big things on random webservices. with clunky apis. at some point you'll just call some crazy server with "give me the squareroot of 23" instead of making a function
 
The square root of 23 is between 4 and 5, leaning towards 5. That's good enough for me.
 
@starmole: Yeah, that's cool. Maybe the wrong chatroom for me then
 
damn.. i am bored.. and no good open questions anymore.
 
9:59 AM
@starmole You can ask your own questions and hope for insightful answers
 

« first day (1210 days earlier)      last day (3741 days later) »