« first day (1070 days earlier)      last day (3892 days later) » 

@Xeo I'm 45minutes in, and about the first 20 minutes was about a couple pitfalls, and all the rest is embellishment and details, rather than pitfalls
 
@Xeo Sort of like lies-to-children done wrong. The kind where, instead of making a simple explanation that avoids certain details not suitable for the target audience/context, you make a simple explanation that includes those details but wrong.
 
Xeo
I was actually curious about the context.
I knew what you meant.
 
That does not make it any more correct. (And no, none of those things needs explaination here; all you have to do is not mislead by superfluously mentioning "16-bit") — R. Martinho Fernandes 9 mins ago
 
Xeo
ah
meh, 4 1/2h still
 
user1804599
11:04 AM
@DeadMG MY PRECIOUS
 
11:18 AM
Is int literal a temporary or rvalue?
 
Xeo
hmm... for C++ distributions, specifically uniform_int_distribution, is there any difference between a()/b() and min()/max()?
@StackedCrooked prvalue, even.
And a temporary is of prvalue category.
 
@StackedCrooked Essentially the same thing.
 
I would expect a compiler error.
 
Most Vexing Parse
function declarations do not run :-)
 
Dammit.
 
Xeo
11:25 AM
You'd think -Wall and -Wextra would catch that
 
clang does
 
Xeo
as expected
 
warning: parentheses were disambiguated as a function declaration [-Wvexing-parse]
lol
 
but what is the signature of this function? Wrap<int>(std::string())
 
@StackedCrooked I do get a compile error
 
Xeo
11:26 AM
@StackedCrooked ya
 
What does std::string() mean here?
 
Compiling with C++11 on GCC 4.7.2
 
@StackedCrooked actually, sorry, that was my mistake, no compile errors
 
it is a function returning WRap<int> taking a function pointer to function taking void returning string
 
11:28 AM
I see.
 
it is in one of those Effective C++ books, don't recall which
 
Damn, that's subtle.
 
vexing, not subtle ;-)
 
Xeo
C++ is vexing.
2
 
and yet we use it
I get the $ operator in Haskell now! :P
yay
 
Xeo
11:33 AM
$ == ` ` :P
(well, not really)
 
@Xeo $ == () to the right
well, thats what I understand atleast
 
@DeadMG error_code thread?
 
Hi guys, noob question
Is it safe to return a local value from a function, where the local value is a class?
Example code:
ImageHeader ImageHeader::Read(std::ifstream* file)
{
ImageHeader header;
file->read((char*)&header, sizeof(ImageHeader));
return header;
}
Or will header cease to exist when the function exits?
 
Returning by value is safe.
 
heh GL 4.5
 
11:38 AM
So it's "return &header" I should avoid?
 
I'm getting too old for this shit.
@Rotem what the fuck
why are you taking a pointer to ifstream? o.O
 
@BartekBanachewicz oh you're still doing gl stuff?
 
JBL
@Rotem Yep because you'd return a reference to something that doesn't exist anymore once the function returns (well it may still exists in the memory, but you have no guarantee about when it'll change).
 
@Bartek Well I did say 'noob'... can you elaborate on the WTFness of it?
@JBL thanks
 
@한국매미 my work at Intel is GL-centered
 
11:40 AM
@BartekBanachewicz right, I remember. you benchmark GL implementations amirit?
 
@Rotem you shouldn't use pointers if you don't have to, in general
@한국매미 benchmark, test and validate.
 
Whee!! \o/
 
@BartekBanachewicz Good point. To add to that, there are some goodies in the std library like unique_ptr, shared_ptr and weak_ptr, which can replace a lot of naked pointers in code
 
@BartekBanachewicz can you not entirely automate that?
 
I have finished analyzing our NTLM auth issue with chunked transfer encoding. It turns out our libcurl is just too old and buggy.
 
11:41 AM
@GamesBrainiac Ugh. References.
 
JBL
@GamesBrainiac Before using smart pointers, references...
 
@한국매미 oh but we do, and we do a lot. But as GL is growing, the tests have to grow with it.
 
@R.MartinhoFernandes eh? what did i say wrong?
 
What do you guys think of "accept the least powerful options but provide the most powerful"?
 
@BartekBanachewicz talking about that, how's minifat and faildi going?
 
11:42 AM
@GamesBrainiac You forgot references.
 
@GamesBrainiac smart pointers are still pointers
 
Xeo
@R.MartinhoFernandes Isn't that just a twist on "be lenient in what you accept, be strict in what you provide"?
 
@한국매미 wha?
 
Oh yes, references. My bad
 
@BartekBanachewicz minicraft & lundi
 
Xeo
11:42 AM
(i.e., wrt web APIs)
 
ImageHeader ImageHeader::Read(std::ifstream &file) <-- better?
 
@R.MartinhoFernandes please rephrase?
 
@Xeo Yeah, but different contexts, I think. That one is about input data; I'm thinking of types in function signatures, not the data.
 
@한국매미 lol. Minecraft is on hold, Lundi is... ah well you missed my recent Mumble rant on how I'd like to work on Lundi but it's hard and I have to keep its tests running.
 
@R.MartinhoFernandes Context?
 
11:43 AM
@Xeo And now that I look at it, it seems quite the opposite. But isn't. Ooops, mindknot.
 
@한국매미 I've made a few smaller projects though, just for fun.
 
Xeo
@R.MartinhoFernandes Should still apply, I think. Accept the least specific types you can work with, provide the most specific types you can give.
 
JBL
@Rotem Yep.
 
Thanks. I missed the no-questions tag btw, sorry.
 
@Xeo Nah, doesn't have to be like that.
Both int& and int* have the same level of "specificity", no?
You can't be more specific than either of them.
Yet, int* is more powerful than int&.
 
Xeo
11:45 AM
hm
 
@Rotem it's to scare off help vampires. That being said, if you can formulate your question in a nice way, it might still be worth to put it on SO.
 
I hate asking noob q's on SO, it bruises my already tender ego.
 
@BartekBanachewicz Would most likely be dupe.
 
JBL
@Rotem Most of the time there's good chance that the noob question has already been answered anyway.
 
@JBL in my defense I tried like 5 google searches before coming on here, but I do agree with you.
 
11:47 AM
@R.MartinhoFernandes yep.
 
@Bartek oh, I see... but wasn't @kbok helping you on lundi?
 
@DeadMG Did you finally get that overwhelming feeling of hopelessness appropriately described as "oh no, the inmates are running the asylum"?
 
@R.MartinhoFernandes Yep.
here's me, like, "Dudes, don't do hideously dangerous bad shit", and everyone else, "No matter, let's just keep going and not even respond".
 
Xeo
Hey, atleast somebody mentioned expected<T> now
 
eh
I wasn't too impressed with Expected<T>
it's a shitty boost::variant<T, std::exception_ptr>.
 
Xeo
11:51 AM
I don't see the problem with that, tbh
 
@한국매미 he was focusing on his new job lately, I guess; that being said, he forked Lundi to his profile yesterday. All in all, I'd still like to move the project forward, but it will take some time.
 
@Xeo Aside from the part where a) it's a shitty version of it, and b), something like boost::variant<T, strong_exception_type>? and c) something about how C++ can't correctly support error monad?
 
Xeo
FWIW, I meant the idea behind expected<T>, not that particular implementation.
also, boost::expected seems to allow other error types
 
I've never seen anything about boost::expected
 
@DeadMG Well, at least it's just a shitty version of The Right Thing™, no?
 
Unlike all the other... things... there
 
Xeo
(it's linked in the latest post there)
 
only one exception type? fail.
 
Hmmm, melange.
 
Xeo
...
expected<T, variant<Wheee...>> >_>
 
11:56 AM
Do you guys think of melange every time you taste cinnamon?
 
> It used to mean "day of the moon";

It *means* day of the moon
 
@R.MartinhoFernandes wtf is melange
 
@한국매미 hm.
 
Xeo
Some coffee thing IIRC
 
Xeo
11:56 AM
not?
 
It's the spice.
 
> The second makes no check and calling *expected on an uninitialized value results in undefined behavior.
fail.
 
@BartekBanachewicz mardi day of mars; mercredi day mercure; jeudi day of jupiter; vendredi day of venus; samedi day of shabbat; dimanche day to pay the dime (church tax during the middle age)
 
The spice.
 
@R.MartinhoFernandes Dune
 
11:57 AM
Melange ( or ) – also called the "spice" – is the name of the fictional drug central to the Dune series of science fiction novels by Frank Herbert, and derivative works. In the series, the most essential and valuable commodity in the universe is melange, a geriatric drug that gives the user a longer life span, greater vitality, and heightened awareness; it can also unlock prescience in some humans, depending upon the dosage and the consumer's physiology. This prescience-enhancing property makes safe and accurate interstellar travel possible. Carol Hart analyzes the concept in the essay "...
 
Cue "Robot knows all the nerdy shit I know"
 
Xeo
@R.MartinhoFernandes Oh
 
I sometimes feel like he was in my head once and copied what's inside.
 
There's a mention about it tasting somewhat like cinnamon, and it stuck in my head and I could never taste cinnamon again without thinking I'm eating spice.
 
@한국매미 I see a lot of funky library names there :)
@R.MartinhoFernandes are your eyes purple already?
 
Xeo
11:58 AM
@한국매미 Nice to know the etymology!
 
@Xeo not particularly difficult! although i'm not 100% sure of the last one
 
@BartekBanachewicz Wasn't it blue?
 
@R.MartinhoFernandes IIRC purple-ish
 
Nope, I'm pretty sure the eyes get blue.
The sands get violet after a spice blow. Maybe that's what you are confusing?
 
@R.MartinhoFernandes wikipedia seems to agree
@R.MartinhoFernandes possibly. It was a long time since I've been in that universe.
 
12:03 PM
so... humble bundle... what happens if you already have one of the games? do you get a key that you can give away to someone?
 
Xeo
 expected<int> e = 5;// e contains 5.
 expected<int> e2 = move(e); // e2 contains 5. e contains an empty int.
Wait, what
 
actually i don't remember
 
Xeo
Do they want to explicitly null out the int?
 
"an empty int" could mean "an int after moving" or "no int". Not sure.
I'd expect the former.
 
12:05 PM
@한국매미 lame
 
@thecoshman Maybe.
The extra games come as separate Steam keys, so you can just give out those keys.
I gifted about three copies of Bastion like that.
 
@R.MartinhoFernandes individual keys for each extra game? sweet
 
Xeo
int_expected.visit([](int i){ ... }, [](error e){ ... }); might be nice to have
 
@thecoshman Sometimes it happens. Sometimes not.
Depends on how they add the games, I guess.
 
user1804599
I know exactly what hardware I want. :)
 
12:09 PM
The extras are always separate, but sometimes they are as a single key for all extras.
 
@R.MartinhoFernandes I see
 
Xeo
Oh, boost::expected proposal has a .then. Heh.
 
Montag: der Tag ohne Hoffnung. Dienstag: der Tag ohne Freude. Mittwoch: der Tag ohne Tag.
 
Xeo
lol
enum MyErrors
{
   PrinterOnFire, DeveloperGoneInsane, ....
};
 
hey... what gives! where lion boy?
 
12:12 PM
@thecoshman yes
 
nobody said "boobs", so he's not here yet
 
we have a habit of sharing spare keys on our "Clan's" Fb page
@R.MartinhoFernandes moar Bastion. And of course, I didn't like it. I'm sucked into Limbo though.
 
Algebraic Data types are weird.
 
Oh gosh, Bastion is in this one too.
 
@GamesBrainiac like, int?
@R.MartinhoFernandes :D
 
Xeo
12:15 PM
@GamesBrainiac They're cool.
@BartekBanachewicz like variant or tuple.
 
@Xeo they're cool.
 
@Xeo And you can create your own custom types
 
Xeo
variant and tuple are the C++ (library) form of ADTs
Are there actually other ADTs besides sum and product types?
 
But still, it feels as though it tries to emulate function-less classes
 
rolls eyes
 
12:17 PM
Maybe I'm just too used to classes
 
Non-virtual member functions don't differ from free functions except in syntactic matters.
 
Xeo
I did mention before that the idea of dropping (non-virtual) members in favor of inline friend functions is still swirling in the back of my head, right?
 
@R.MartinhoFernandes Agreed. But none the less, it feels less convenient.
 
heh
github for window's "click to update" button is broken
so you can't update it and get the fix
 
@R.MartinhoFernandes Also unpleasant ADL side-effects.
 
Xeo
12:30 PM
I blame ADL for that :P
 
holy shit, i never knew sqlite had so many tests done on it
 
@한국매미 ouch
We just had an amazing meeting
> ~Random question about boost in code~
> Yeah well who really uses boost every day
> *Bartek raises hand and looks around*
:F
 
@BartekBanachewicz Hey, atleast you had the balls to raise your hand up
 
@GamesBrainiac Why shouldn't I? Everyone knows that I am pushing for proper C++ coding here.
But templates are bad because hard.
Boost is bad because templates, obviously.
 
Xeo
templates are hard because bad (people)
 
12:35 PM
Thing is I can't just say "Go and learn them instead you lazy fuck"
 
third party libraries are hard because adding them to the build system is always a pain (thanks C++!)
 
Especially because I'm in minority.
 
@BartekBanachewicz C++ is hard to teach and push, because most of the people who use it, in universities and offices don't know what the fuck they're doing. Take my uni for example, my C++ teacher actively discourages the use of C++11. Why, cuz he dsnt get it? Fuck him.
 
@GamesBrainiac why would you even mention universities ugh.
@willj header only now, modules (hopefully) tomorrow.
 
@BartekBanachewicz cuz they're institutions ?
why u hate unis?
anyone here a klee user?
 
12:39 PM
@GamesBrainiac because they are fucking terrible
2
at least mine is.
 
Mine too. I hate it. I learn nothing, nothing at all
 
the whole idea behind them is flawed.
yeah then why do you even ask, and, again, even mention them...
 
As an example of an institution. Nothing more.
 
user1804599
Intel Core i7 4770 Boxed
Asus H87M-E
Corsair Vengeance CML32GX3M4A1600C10
Corsair CX600M
Samsung 840 EVO 250GB
 
well the example is particularly bad.
 
user1804599
12:41 PM
I want these.
 
@not-rightfold don't you want IVB-E 6-core CPU? It was out recently
 
@not-rightfold Holy shit
 
@not-rightfold Also you can go far beyond 1600Mhz on RAM with such a CPU
@GamesBrainiac meh, nothing special.
 
user1804599
@BartekBanachewicz What's the name?
 
@BartekBanachewicz I can't afford something like that :(
 
12:43 PM
@not-rightfold 4960X IIRC
 
Xeo
@not-rightfold Hey, I just got the 120gig version of that SSD :D
 
user1804599
@BartekBanachewicz Way too expensive.
 
@not-rightfold Do you want this for gaming?
 
user1804599
@BartekBanachewicz Are you sure?
 
12:44 PM
@not-rightfold I am just pointing out that going with a Haswell for a desktop might not be a most cost-effective choice.
 
user1804599
@GamesBrainiac I think you can guess from the lack of video card. :P
 
@not-rightfold Pretty much. 1600 is a maximum written by Intel on a box. However, they also write 3.5Ghz, which is a fucking joke, considering 3770k/3770k can go up to 4.7Ghz on stock cooling
 
user1804599
I'm only going to play Minecraft on it.
 
@not-rightfold hey! It's not lacking a video card!!
:F
 
user1804599
@BartekBanachewicz Where's the video card. :V
 
12:45 PM
@not-rightfold in the CPU, silly.
 
user1804599
That's not a “card”.
 
lol
 
@not-rightfold Well, you do only play minecraft :P
 
user1804599
It's a chip. :v
 
I found a zip on my hard drive called "my life's work"
6kb
 
12:45 PM
@not-rightfold eh...
 
Xeo
@DeadMG how old?
 
user1804599
Also
 
@Xeo from yesterday
 
user1804599
Maybe an nvidia if I really need it.
 
@not-rightfold also you want the "K" CPU
 
12:46 PM
@Xeo 1st July this year.
 
user1804599
But I'll try with integrated GPU first.
 
user1804599
@BartekBanachewicz I don't.
 
Xeo
@DeadMG lol
 
@not-rightfold you do.
 
user1804599
I'm not overclocking anything.
 
12:47 PM
eh
it's clearly not mine.
 
@not-rightfold setting them up to 4.2-4.5Ghz is not even overclocking. Setting them to 7Ghz is.
I am not joking at all.
 
some crapp which is an incredibly poorly coded game using SDL
and by "game" I mean the code looks like the person who coded it wanted it to be a game.
 
user1804599
@BartekBanachewicz Maybe if you’re in Poland, where it’s always -20℃. :3
 
Xeo
Why fuck is that minmax/tie answer getting so many upvotes...
 
@not-rightfold it has HD4600, that's a decent chip.
 
12:48 PM
Is setting them to 4.2GHz even doing anything?
 
Xeo
@DeadMG Whereever you caught that.
 
@not-rightfold the weather in Poland isn't really different from where you are. And I especially said stock cooling
 
user1804599
Also, seriously.
 
@CatPlusPlus yeah, a few % speedup at least.
 
I thought at 3.6 or whatever the limiting factor is speed of light.
 
12:49 PM
@Xeo Dunno.
 
user1804599
I'm going to use it for Minecraft, Vim, Z shell, i3, Python and Perl.
 
@CatPlusPlus Nah. I've heard of chips clocked up to 8-9GHz under the most extreme cooling.
 
@CatPlusPlus hm, no, not really.
 
but when you're at the GHz speeds, it's starting to get close.
 
user1804599
I don't need 42 PHz.
 
12:49 PM
@not-rightfold you still want your compilations and unzips to run fast
 
light is 300mil m/s, electrons are about 2/3rds of that I think?
 
and the CPU is small.
@DeadMG depends on conductor
 
CPU-grade silicon
 
user1804599
You work at Intel.
 
@DeadMG then maybe even more.
 
user1804599
12:51 PM
:v
 
@not-rightfold what about it?
 
well, the CPU chip is only a few cm across
 
user1804599
No wonder you're trying to sell me those expensive chips. :P
 
> Propagation speed is affected by insulation, so that in an unshielded copper conductor ranges 95 to 97% that of the speed of light, while in a typical coaxial cable it is about 66% of the speed of light.
 
so it really depends on how many times they have to get across the chip for one cycle
 
12:52 PM
@not-rightfold I am not selling you anything :v
 
user1804599
5 mins ago, by Bartek Banachewicz
@not-rightfold also you want the "K" CPU
 
@BartekBanachewicz Superconductor would be 100%, I'm guessing
 
You wouldn't be hired by your marketing dept anyway, because you're supposed to offer Xeon for the highest-end market. :v
 
@not-rightfold that's because the K variants are really much better if you are already going for an i7
@CatPlusPlus Xeon is a server chip. Eh "BUY XEON BECAUSE FAST" really.
 
It is enterprise-grade, yes.
 
12:53 PM
oh shit, I just used expression templates. I'm sinking into the dark side =(
 
user1804599
How would I benefit from 4770K? What's the difference in clock speed?
 
@DeadMG you know, "100%" is in a vacuum :) Speed of light in, say, air is lower than that.
@not-rightfold Considering it has an unclocked multiplier, it's as much as a 1Ghz on stock cooling
 
user1804599
I have a pimple in my neck.
 
@CatPlusPlus which doesn't necessarily mean it's "faster" than i7s.
 
user1804599
@BartekBanachewicz Meh.
 
12:57 PM
@not-rightfold why don't you buy an i5 then?
if you're going for high end, you should know why are you doing it :v
 
@BartekBanachewicz It is.
 
user1804599
I don't like overclocking.
 
@not-rightfold IRTA "I have no idea what overclocking is about"
 
Oh, apparently i7-4930K is fastestest now.
 
user1804599
I'm not changing this list anymore.
 
12:59 PM
NEVERMIND THEN
 
there's a difference between pushing a chip to its physical limits and simply upping the FSB to completely reasonable speeds.
 
It still costs a fortune, though.
Fuck overclocking.
 
@not-rightfold meh, I can throw around random lists of hw all day, doesn't mean any of those will be particularly good.
@CatPlusPlus just like Xeons
 
Yes.
Hence "still".
 

« first day (1070 days earlier)      last day (3892 days later) »