« first day (1302 days earlier)      last day (3639 days later) » 

3:05 PM
@MartinJames Multiline messages aren't restricted (because that makes sense, see)
Also if you share that much stuff between threads your design sucks anyway :v
 
@CatPlusPlus Yeah - should'a done that.
 
@CatPlusPlus We were all waiting for that.
Thanks :P
 
@CatPlusPlus Indeed it does. Immutable messages are normally fine for me, but, if there is unavoidable multiple sharing, polling for locks is not fine.
 
Dispatch queues is where it's at.
If the problem lends itself to that solution of course.
 
@StackedCrooked I've been doing that for decades.
 
3:10 PM
There's some interesting techniques you can use.
TBB has good stuff for this as well.
 
@StackedCrooked Always willing to learn more. Unlike many developers, I've always found multithreading fun and, if I don't do stupid things, fairly easy.
 
TCC has some task objects with the ability to schedule future task unto themselves. This eliminates the synchronization cost of pushing and popping on the central queue. It also is more cache friendly because it's the same thread.
I haven't tried it out yet though.
 
Multithreading is as fun as stabbing yourself in the eye with a spoon
 
hello again, so I found an exact similar question at http://stackoverflow.com/questions/16951015/getcontext-und-setcontext-wont-work-in-functions
is there a way out to prevent context going invalid?
 
@CatPlusPlus Now now.
 
3:15 PM
@CatPlusPlus Never found it to be much of a problem. No spoons required here;)
 
want some help regarding ucontext_t thanks.
 
It's like dealing with the fact that hardware actually exists
It needs to be wrapped up in tons of cosy abstractions
 
Multithreading is horrible if you are working in a legacy code base and you are assigned to fixing the bugs.
 
Tony stop lurking
 
Tony the Lurker
 
3:18 PM
@StackedCrooked Oh yes:((
 
Everything is horrible if you are working in a legacy code base and are assigned to fixing the bugs
 
mwuahahahahahaha
 
But if you have the freedom to design a new system from scratch then you can show them how it's done.
 
The thing is, in my work, I rarely use multithreading to speed up any CPU-intensive work. I use it to develop autonomous subsystems. I can add such a system to my current project by just including the modules. It will work straightaway, I don't have to call or check or poll or maintain anything any different. It just works, on it's own.
 
If the foundations are good.
 
3:24 PM
@CatPlusPlus I am nearly always working in a legacy code base and are assigned to fixing the bugs. Worse, some of it is in C.
 
The the rest can still fail :P
 
Every codebase is legacy codebase
 
Legocity codebases.
 
le yuppers
 
@CatPlusPlus Well, I look at legacies as being inherited from someone else. My own shit is not legacy to me. Some other poor bastard is gonna get it later.
 
3:27 PM
I look at it the same way
 
Seems strange to be in the Lounge at this time on a Saturday. It's end-of-season and all the football is tomorrow.
 
the "code becomes legacy the moment you write it" bit in the pragmatic programmer is one of the few bits that I did not necessarily agree with
 
time to go ... DOG CUDDLING
 
can someone help me fix a problem? :(
 
@Asymptote Why do you keep popping up? Do you work for Adobe?
..or Oracle?
 
3:29 PM
:P no, can't figure out setcontest/getcontest
 
I like contests
I never win though
 
@Asymptote its losecontest
 
sorry contexts
so no?
 
no.
 
@Asymptote I don't get them either. Thats stuff is why I bought an OS.
 
3:31 PM
:)
 
@MartinJames It's my irresistible sexual attractiveness.
 
I'm seriously thinking about setting my own context to the Vernon Arms. Unfortunately, whenever I do that my stack gets trashed.
 
try drinking less :P
 
@DeadMG I am able to resist Bailey ATM. He's been drinking out of the pond and his beard is dripping.
 
rofl
 
3:36 PM
you look like a dog. eww, that's not sexually attractive
 
my parents went on holiday and Daisy's sleeping on the sofa waiting for them to come back
 
@DeadMG Yeah, and you're waiting to see just how batshit-crazy she goes when they return.
 
heh
 
@FlorisVelleman You changed your avatar :O
 
yeah but she's got ten days of waiting to go
 
3:37 PM
@Borgleader Ye, this one seemed slightly better :)
 
@DeadMG OK, she's gonna explode:)
 
omg how am i still alive
 
alcohol doesn't kill you overnight!
 
@LightnessRacesinOrbit what happened
 
3:40 PM
@LightnessRacesinOrbit ..because it can take a couple of weeks for liver failure to kill you.
 
i'll make myself another coffee now
or do you think it's too late at 17:40 ?
 
You're alive because universe is cruel and wants you to have hangover
 
@MartinJames i'll wait patiently, then
 
@JohannesSchaub-litb A bar happened.
 
the road to death caused by alcohol is paved with fun and pleasant experiences
 
3:41 PM
@MartinJames that's going to take some more time I think
for the failure to establish, that is.
failing is analog here
 
that was an.... impressive drinking t
stint*
 
@LightnessRacesinOrbit oh was it a wasp
lol
i thought you said sting
 
@LightnessRacesinOrbit I have no doubt. Thanks fuck it wasn't with me in some seedy Nottingham pub. I have some work to do.
Anyway, I gotta go get food. I have no pizza so I'll root through freezer for something else.
 
@JohannesSchaub-litb typo ;p
 
user3010322
3:58 PM
._.
 
user3010322
@R.MartinhoFernandes I really need that dimensional analysis library.
 
user3010322
I was just fucking bit because I received a number in bits instead of bytes.
 
user3010322
Hilarity ensued.
 
<chrono> can handle that fine.
 
3:59 PM
@ThePhD dimensional analysis?
 
user3010322
@Borgleader Tracking Meters / Seconds of Bits / Second or Bytes/Megabytes/Kilobytes-Hours and such.
 
@Borgleader The thing that says that giants ants can't be.
 
user3010322
That is, when you multiply meters and seconds you get a value that is compile-time tagged with meters-seconds
 
@ThePhD o.o you mean a type system?
 
I don't know of any physical meaning to meter-seconds.
meters per second, perhaps.
 
user3010322
4:03 PM
Either way, things display now properly in the raytracer
 
user3010322
so now I cana ctually give it to borgleader
 
user3010322
But before I do that, I need to implement @melak47's idea of texturing / coloring based on hit parameters
 
user3010322
so I need to change all of my material properties into functions that take a Hit structure.
 
user3010322
... That also means
 
user3010322
4:04 PM
I need to make them unique objects
 
user3010322
And new them
 
user3010322
So that I can override the base class with new functionality.
 
user3010322
Or, I could use a std::function...
 
user3010322
The second allows the std::vector<Material> bit, but there's still type erasure and dynamic what not for the std::function
 
user3010322
The first allows me to override functionality directly without writing a bunch of free functions (and depend on member variables), but I have to std::vector<std::unique_ptr<Material>>
 
4:05 PM
Whatever.
 
Xeo
@ThePhD External virtual interface, make it so Material has the unique_ptr and the current Material + related classes are simply passed in (and don't use inheritance themselves)
Which is basically what std::function does
and boost::any
 
user3010322
You've lost meh a bit.
 
I, on the other hand, still have much "meh" about the whole thing.
 
Still on vacation?
 
user3010322
struct Material {
    std::unique_ptr<MaterialProperties> properties;
};
 
user3010322
4:09 PM
?
 
user3010322
I mean, there'd be other stuff on material
 
@R.Martinho til tomorrow
don't think I'll be drinking tonight mind you
 
user3010322
But is that the jist of it?
 
bye bye wifi zone bye lounge
 
@LightnessRacesinOrbit drinking is fun
 
Xeo
4:13 PM
See also Sean Parent's talk.
 
user3010322
Ah.
 
user3010322
That's the kind of stuff I do for my Encoding interface.
 
user3010322
Looks like a good idea for this too.
 
@Xeo tl;dr; type erasure thingy?
 
Xeo
yes
But instead of N-times std::function for the N interface functions, just one
 
user1804599
4:21 PM
Let’s try asyncio.
 
user3010322
Ah, damn.
 
user3010322
I can't use member variables from the Material if the implementation is in some T :c
 
user3010322
Also I have to change everything I have to function calls now, which I guess isn't that bad really...
 
Xeo
put every interface functionality you need into Material
 
user3010322
I was trying to cheat to get some kind of default returns for some of the functions.
 
user3010322
4:33 PM
But if they're so separated, I can't really do that.
 
Watching Coplien talk.
He really doesn't hold back shitting in OO.
He's destroying it.
 
user3010322
Linky link?
 
Meh paradigm bashing =/
 
Many things about OO are plain overrated
 
4:39 PM
TDD is shredded along.
 
user3010322
Master Shredder
 
> You can't change the curtains without tearing down the walls.
^ on class oriented programming
He's an object guy.
A real one.
 
user1804599
% lsof -i | grep 40000
% ./exceptionald
tcp-listen: listen failed
  port number: 40000
 
user1804599
4:44 PM
WTF.
 
@StackedCrooked That sounds silly
@rightfold Run lsof as root
 
user1804599
Same output. :v
 
Maybe port 40000 is mapped to something
I never remember which switch turns mapping off
 
user1804599
Hmm. Werid.
 
@rightfold TCP connection must remain 2 minutes (or so) in the CLOSE_WAIT state, before the socket may be reused.
 
4:47 PM
Not really
Restarting servers would be unbearable if sockets persisted for 2m after the process is dead
 
Usually the server initiates the close.
It's the other party that gets the CLOSE-WAIT state.
For clients it's not really a problem because they can pick a random port.
 
You can have a listening socket, tear down the process, and immediately restart it and it will bind
It's not the problem here
 
Oh, damn it's the TIME-WAIT state.
 
@StackedCrooked Meh - we knew what you meant.
 
It's pretty crazy that the web still runs on TCP which is a protocol that was designed in 1981 with the requirements from back then.
 
4:59 PM
You CAN get all the available sockets stuck In TIME_WAIT, if you open and close TCP connections quick enough for long enough.
 
When sending at 10G the 32-bit sequence number rolls over every few seconds
 
When testing an IOCP server, I had to reduce the TIME_WAIT interval to 6 seconds to load-test.
 
synthetic stress tests can easily eat up all ports (and leave them all in TIME_WAIT)
 
@doug65536 Yeah - found that out. I had to tweak some registry settings to get my tests to work for an extended period.
 
Test on VM, restart VM
:v
Well you'd probably reduce the timeout anyway
But still, should be on VM
 
5:04 PM
I didn't have a VM setup 16 years ago.
 
Excuses
 
I can run about 48 (tiny) VMs on my 990x before the guests start getting weird kernel messages
 
@CatPlusPlus I had a Pentium III with 512MB of RAM and a 40G disk. My current VM's are 33 GB each.
 
@MartinJames Hey my first PC was a P3 with 128 MB.
 
@StackedCrooked You need to know the exact count of classes and objects to understand code durr
 
5:14 PM
@StackedCrooked my first PC was 1MHz VIC 20 with 5 KB of RAM - actually I had the (huge) 16KB expansion cartridge though
 
Everyone, how low can you go? :)
 
@StackedCrooked s/low/old/
 
I think a 386 or 486 was our first.
 
I can't remember the specs of my first PC
but the 2nd had 128 megs of ram and a pentium 3 at 500 mhz
and one of the old ati 3d rage pro cards w/ 4 mb of vram
 
my vic 20 storage device: NOTHING. when I got tired of the program I was working on ijust shut it off and lost it
not all that different from today. difference today is i abandon projects but they keep taking up disk space :D
 
5:19 PM
Mount a RAM drive to your project directory
 
I'd kill myself if I wrote so much code that made me care about the disk space it takes.
 
@R.MartinhoFernandes true... builds with ridiculous amounts of duplicated debug info (looking at you gcc) can add up though
 
@R.MartinhoFernandes That would effectively halt the increase of disk usage.
 
Jul 26 '12 at 21:30, by R. Martinho Fernandes
@Insilico There are few problems that can't be solved by finding the right people and shooting them.
 
Shoot everyone, solve every problem
 
5:29 PM
@R.MartinhoFernandes I watched Schindler's List yesterday
 
Rappers solve many problems.
 
Burgers solve many problems, too
 
user3010322
Speaking of burders, I will go get some
 
user3010322
@StackedCrooked I totally loved that talk. It validated my feelings of anger towards people who want me to write unit tests to throw an exception class I made,
 
user3010322
catch that exception, and then test that the message is empty.
 
user3010322
5:39 PM
<___>
 
I still like the idea of having small testable components.
 
@ThePhD the more sure you are that it works right, the more it needs tests
 
But tests should test something meaningfully.
 
to keep it that way
 
If you implement a crc checksum algorithm then unit tests are great.
But not when implementing high-level controllers.
Because that would be moronic.
 
5:44 PM
@ThePhD tests aren't for now anyway. tests are for when some future dumbass (often yourself) touches the code and breaks it
 
user3010322
Mmm.
 
Reminder for all Loungers: Eurovision Song Contest on at 20:00 UK time \o/.
Everyone should be in the pub by 19:55, just to be sure of missing it.
 
well Eurovision is even more pathetically worthless than most such events
so you can be assured that I'll be totally ignoring it
 
Well that's awkward. Here's Vlad posting an ingenious solution to a question about algorithm composition:
1
A: Why is there no transform_if in STL?

Vlad from MoscowThe reason that the C++ Standard has no many useful algorithms is single: the C++ Standard Commitee simply usually ignores proposals that were submitted by non-members of the Committee. For example I made a proposal about algorithm std::iota You can read the description of the proposal here Thou...

 
5:56 PM
@DeadMG Yeah - I'm gonna start getting ready to go out now.
 
I almost have to upvote for the sheer merit, of not for EPIC RANT against standardization commitee.... WTF ?!
 
> Though it is written in Russian you can use for example google translate that to read it.
Ahahahahaha
ahahahahaha oh god he's dead serious about this holy shit
 
user1804599
> If delimiter is an empty string (""), explode() will return FALSE.
 
user1804599
FUCK YOU PHP.
 
Because returning the string as an array of characters is too mainstream.
 
user1804599
6:05 PM
@Jefffrey substr('foo', 3) also errors (returns FALSE I guess) instead of returning the empty string. :P
 
Yeah, PHP is beautiful like that.
 
@R.MartinhoFernandes Kinda.
It might also return an empty string. Or false on "failure".
 
The docs seem to indicate it returns an empty string.
 
-1 for abusing accumulate. We use algorithms instead of raw loops because they have meaningful names. Using accumulate to emulate transform_if defeats that purpose. — Abyx 19 secs ago
@CatPlusPlus did you see that forum?
 
user1804599
6:11 PM
% php
<?php var_dump(substr('foo', 3));
^Dbool(false)
 
user1804599
> Returns the extracted part of string; or FALSE on failure, or an empty string.
 
user1804599
The most cryptic documentation of the year award.
 
@Abyx Ahahahahahahahhaha oh god
It's literally all his posts
 
yep.
 
6:13 PM
I bet he was banned on all other Russian forums, like sources.ru and rsdn.ru
 
@rightfold .. or a JSON hash object {"value":false}, if there's a lunar eclipse and the line number in which it's executing is even.
 
user3010322
Material only seems to have just... regular functions I guess.
 
C++ has changed a lot since last week.
 
Thats C++-CLI or C++/Cx
I never cared to learn which was which
 
Seems the former.
Wait.
Now it seems the latter.
 
hey hey hey have you noticed our gimmick hey hey hey hey gimmick hey hey
 
user1804599
@StackedCrooked What are you going to do with Smalltalk?
 
Nothing. I swear.
 
user1804599
Then why are you installing it?
 
@rightfold Get a girlfriend
 
user1804599
6:33 PM
Also, no swearing please.
 
@Borgleader Nice.
 
thank fuck - they dont hate me here
i mean the pub not the lounge
obvs
 
6:49 PM
@StackedCrooked How does it do the beer keg icon on the terminal?
 
I suppose it uses the facilities that terminals have.
 
Wow, the Terminal "say" command pronounces it as "beer mugi mugi".
 
@R.MartinhoFernandes wtf
Do they really have nothing better to do than add beer mugs?
 
6:52 PM
Blame the Japanese.
 
user1804599
@StackedCrooked lol
 
@R.MartinhoFernandes aha
 
Hmm. I'm probably missing something.
 
user1804599
@StackedCrooked It has nothing to do with Terminal. :v
 
user1804599
Also, PHP’s pack is horribly underfeatured.
 
6:54 PM
@Jefffrey your penis?
 
user1804599
@StackedCrooked I’m missing his penis too. :(
 
@Jefffrey an identifier? :D
 
@melak47 :/
What's not constant in {1}?
 
The allocator call.
 
6:57 PM
But outside is perfectly fine.
 
> Die Sendung wurde zurückgestellt. Die Zustellung erfolgt voraussichtlich am nächsten Werktag.
@Xeo guess you were right.
This is dumb.
 
Xeo
hahaha
 
@Jefffrey that's what it told you though, right? has be initialized out of class
 
They could have like, you know, not have told me otherwise previously.
 
@melak47 That's exactly what you have told me.
 
6:59 PM
what? I never told you that :v
g++ did
 

« first day (1302 days earlier)      last day (3639 days later) »