« first day (329 days earlier)      last day (4619 days later) » 

Als
3:00 PM
@Nils: A thing could be ofcourse done in n number of ways but you would want to do it in best possible way, and knowing what can be done and cant be done with templates, gives that confidence to arrive at the best possible way.
 
Templates are awesome.
And hi.
 
Als
@RMartinhoFernandes: Hello
 
cpx
Hi
 
well templates maybe more than operator overloading
all I really found operator overloading useful so far is vector math
using it as they did in open foam is just insane
 
Really? I find myself overloading operators regularly.
 
3:01 PM
hi Martinho...@NIls samei
 
Als
Well for some peeps templates are easy, because they started reading a templates book while we were busy with ABCD....so it helps to start early.
 
cpx
Isn't that look like a lion or is it a tiger @TonyTheTiger. :)
 
it's a lion
 
hi* Martinho
dunno why I wrote that
 
operator() is a very common target.
 
cpx
3:01 PM
Ah yes.
 
Als
functors eh
 
What are functors
 
Als
@TonyTheTiger: What are you up to this saturday?
 
functors are useful, I like using them
me. just chillin
 
@RMartinhoFernandes For what use cases?
 
Als
3:02 PM
beer and stuff? :P
 
havin' a cuppa tea, since I'm now in the land of the tea drinkers :)
 
@Nils To make functors.
 
I'm in @Puppies country, lol
 
If you are new here, please read the newbie hints. Thank you.
10
 
Als
@Nils: Most<actually All> of the STl algorithms operate on Functors.
 
3:03 PM
ah yes..
 
Though lambdas now require less manual overloading of that.
 
Als
@TonyTheTiger: I see, see any fancy looking gals around?
 
no not yet
 
anyways my point was more that openfoam comes with a system which lets you write formulas almost like in math using operator overloading
 
@RMartinhoFernandes Haskell as a type class Functor which has absolutely nothing to do with functors in C++. Very confusing... I wish books would point that distinction out immediately.
 
3:05 PM
Haskell = confusing
 
@FredOverflow I hate haskell...hardest language ever
 
figuring out which function exactly gets called when looking at such a formula is difficult and time consuming
They would better develop a domain specific language or something
 
@FredOverflow Yeah. Haskell functors are category theory functors, IIRC.
 
Who the hell uses haskell anyways?
 
I really like Haskell.
 
3:06 PM
@LewsTherin I use Haskell to broaden my horizon.
 
I had to use haskell in first year...but I couldn't understand it..no one could
but C/C++ very reasonable to grasp
 
@RMartinhoFernandes Yes. As I understand it, functors are type constructors whose types' values can be mapped over.
 
Yeah, that's it.
 
@LewsTherin You had one course on both C and C++?
 
@RMartinhoFernandes can we talk again? If you are free...I managed to solve the code...but don't understand the how
@FredOverflow I had one year of C and one more of C++( but I had to learn it on my own)
I'm trying to learn games to build my logic skills, very hard though
 
3:08 PM
Well, what games have you built yet?
@LewsTherin Interesting, universities really do teach Haskell to freshmen? Where did/do you study?
 
I thought my university was the only one doing that.
 
@RMartinhoFernandes I closed it by mistake! please try again?
 
I thought most universities had switched to Java, so that more students could graduate :)
 
:)
 
I built an XNA frogger game and a spaceshooter which doesnt work well lol
Yeah my college does anyways..I study at DIT
 
3:10 PM
folks
 
user142019
hi
 
cpx
hi
 
user142019
How's it going?
 
3:11 PM
Combo breaker!
 
hello, @RMartinhoFernandes im in the room can't see ya
 
So, who uses haskell? It is a weird language..but I heard it is similar to erlang
 
I use it. Not real world use, though. Mostly for fun.
Darcs, the VCS is written in Haskell.
 
user142019
@LewsTherin Haskell is nice. I have used it.
 
3:13 PM
@LewsTherin xmonad is written in Haskell
 
user142019
It's indeed weird, especially when coming from something like C++.
 
Some dude made Mario with Haskell, very smart...I guess if I get better one day I might go over it again..but I don't know
The concept doesn't make sense to me lol
 
I just learned that you can write the subsets function in a single line:
Prelude Control.Monad> let subsets = filterM (const [True, False])
Prelude Control.Monad> subsets [1,2,3]
[[1,2,3],[1,2],[1,3],[1],[2,3],[2],[3],[]]
How awesome is that?
 
3:14 PM
Jesus, that syntax brings bad memories
 
am I doing something wrong?
(gdb) p ((float*)(&(screen->pixels[0])))
$24 = (float *) 0x100458000
(gdb) p ((float*)(&(screen->pixels[0])))@10
Only values in memory can be extended with '@'.
I signed up for the stand ford AI class, this will extend my horizon in the next few months.
 
if screen->pixels[0] is not of type float, then you are invoking Undefined Behaviour
 
Strict aliasing rules.
 
strict aliasing would be my guess (damn, too late!)
 
3:16 PM
oh yea, of course
damn, how could I forget
 
also, I'm not that familiar with GDB
except that it's rumoured to suck tremendously
 
I haven't used non-IDE debuggers since forever.
 
Nils: me too! :)
 
well it is a vector<float>
 
3:17 PM
then why the cast?
 
gdb can pprint vectors
 
how?
 
with python
 
nah I hate that
once installed that on Linux, stuff shall work fine out of the box
 
3:19 PM
Ssh, @Cat might hear you!
 
@Nils are you using a Linux distrib?
 
@Nils Why, have you been bitten by Python in the past? ;)
 
Wait, where's the @Cat?
 
no a mac
yeah I like python, but well I don't want to install a script for everything
 
user142019
a mac also has python out of the box, not?
 
3:19 PM
@Cat is not online it seems. but he'll get notified soon enough, lol
 
guess so
but still
it does not make sense that @10 does not work in this case, right?
 
@TonyTheTiger I hope "not online" is not an euphemism for "death".
:)
 
lol, he's prob somewhere on the internet derpin'
lol
 
Good evening to all)
 
parse error: closing paren has no matching opening paren
 
3:24 PM
hm
 
@FredOverflow And no smiley token could be parsed!
 
indeed, i didn't figure!
 
How do you solve this problem: "blah blah blah (something inside parentheses that ends with a happy smile :)"?
"... happy smile :))" or "... happy smile :)"?
 
cpx
I found it in the faq haha
77
Q: What is the strict aliasing rule?

BenoitWhen asking about common undefined behavior in C, souls more enlightened than I referred to the strict aliasing rule. What are they talking about?

 
3:28 PM
@AlfPSteinbach That doesn't make you look very happy.
 
I don't like that the FAQ here presents strict aliasing as if it was not GCC-specific, and I don't like the references to 3.10, which is incomplete even in C++11
 
strict aliasing isn't GCC-specific
it's Standard
 
no, and no
some people think so. they're wrong.
 
Als
3:34 PM
ahh back again
 
Well, fix it!
 
@Als where did you disappear to? Rep whoring?
 
Als
@TonyTheTiger: Yup, i think i wrote a good one here
2
A: Which is correct when allocating memory for a struct in C

AlsThis is the correct way: Type *t = malloc(sizeof *t); Why this is correct? Because you correctly allocate a size big enough to hold a structure. *t points to a type Type. This is incorrect way: Type *t = malloc(sizeof(t)); Why this is Incorrect? sizeof(t) returns size of point...

@TonyTheTiger: And yes I post the link so you upvote it :P
 
@Als: I'd say that another solid advantage of the first way is that when you change Type, the malloc automatically changes size to be the correct value
 
Als
@DeadMG: Yup I am going to steal and add that . hope you dont mind :)
 
3:39 PM
no, no, I really mind
how dare you use information that I gave out freely
 
Als
@DeadMG: :P
@DeadMG: Would it be too much rep whoring now that i used it to ask you to upvote it? :D haha
 
rofl
I wouldn't mind at all, except that I generally don't give a flying monkey about rep
 
i wonder, what's it called in English when e.g. steak is wrapped like
?
 
never seen a steak like that
 
Als
@DeadMG: You have gone over the whole rep concept
 
3:43 PM
In Design Patterns, it's called an "Adapter".
 
Als
lol @FredOverflow
 
@FredOverflow lol
 
:)
And the tomatoes are known as "Decorators".
 
The steak is a singleton!
 
Als
And now you four are GOF
 
3:47 PM
uh, four?
 
is glut preinstalled under windows?
 
Als
uhm @DeadMG: I counted you, You could be the silent member :P
 
@Als GOF = Gay, Overrated, Filler?
 
I most assuredly am not part of any GOF-style group
@FredO: Gang of Four
 
Als
3:48 PM
@FredOverflow: Has @TonyTheTiger, had an effect on you lately?
 
ah glut not, but opengl
 
> "I don't think I'm one of them, either," said Brutha. "I'm one of mine."
 
@Als What do you mean?
 
GOFFEE -- gang of four freakishly eloquent engineers. GOTW -- gang of three wizards. GOO -- gang of one
 
@AlfPSteinbach 3.10/15 forbids to read an object of an incompatible typed expression
what you understand by the buzz word "strict aliasing" and what I understand and what someone else understands isn't necessarily the same.
but fact is what 3.10/15 says, which amounts to a "strict", i.e much-forbidding, aliasing rule
 
3:55 PM
@Als How could I have an effect on people? I only talk about sex.
 
Sex has an effect on people.
2
 
oh does it now. lulz
has the bonobo been online yet?
 
Dunno, I haven't yet scoured today's transcript for any messages I can use against someone later.
 
hey
 
3:59 PM
Hi.
 

« first day (329 days earlier)      last day (4619 days later) »