« first day (319 days earlier)      last day (4630 days later) » 

10:00 PM
Oh, I can.
I'm a Haskell God. Ok, maybe not.
 
another thing I'd be wary of is listing the various versions of .NET
I remember being quite surprised at some of the things that weren't in the previous versions
 
class @RMartinhoFernandes { operator == (HaskellGod) { delete this; throw new BlasphemyException("I Smite You!"); } } ;
 
you might end up at a shop running 2.0 and find in the interview that you use a 3.0 or 4.0 only feature
 
I know what was and wasn't there.
 
ok
 
10:01 PM
I've been on it since v1.
So that's not really a problem.
 
would "bool starts_with = *myvector.begin() == 'L';" be a good way of determining if the first element of a container is, in this example, 'L'?
 
Of course, being LINQless would make me sad :(
 
besides that, there's really not much there to comment on- it's pretty basic name: value stuff
 
We talked about that some days ago, I believe
 
We did. I can confirm.
 
10:02 PM
@Ricky65 I'd usually use myvector.front() or myvector[0] instead
no need to go to an iterator to retrieve such a reference
 
Hmm, for some reason the damn Driving License field is there.
Gotta kill it.
 
I assumed it just meant you didn't have one
 
I agree but it would work fine, wouldn't it?
 
@DeadMG Yeah, but why would I publicise that?
 
true
maybe it was required?
 
10:03 PM
@Ricky65 As long as it's not empty.
 
Actually, I have one. But I'd rather act as if I didn't.
 
@Ricky65 yeah, it would be perfectly functional
 
I don't want a job where a driving license is required.
I hate driving.
 
Then begin() would return end() and you can't deref that.
 
Worse, I can't drive shit.
 
10:04 PM
It's like &*myvector.begin() is not safe when it's empty
.data() for that now :)
 
lol
 
Do you think I should mention being at the IOI?
 
yes
 
Or would that be pointless bragging?
 
your CV has plenty of space to add stuff in
 
10:08 PM
@RMartinhoFernandes If you were a coach or judge, definitely. If you were a participant, probably only if you did particularly well. Just having been on a team may not mean much.
 
@JerryCoffin I was on the national team, but didn't get to medal positions.
 
thanks, bye
 
Got somewhere around 150th or something.
During the interview for my current job, that came up in conversation and the interviewer was like "And why the hell didn't you mention that in your CV?"
 
lol
 
@RMartinhoFernandes Looking at that list of winners make me feel really humble..
 
10:20 PM
@RMartinhoFernandes I guess it depends on the level of competition you had to do well at to get onto the national team. I'd place the emphasis primarily on the problems you solved (or helped solved), how quickly you had to do so, etc., over just "I was there".
 
@JerryCoffin That would take up too much space on my CV.
It's really small as it is, and I don't want a quarter of it dedicated to that.
 
@RMartinhoFernandes Sorry -- I wasn't thinking so much of the CV. For that, I'd just emphasize having made the national team -- "was one of six chosen from a field of 1800 to be on national team..."
 
Ah, ok. That's much more sensible. :)
Though I think the number of contestants on the national competition was a lot smaller than that. Small country.
Yep, a lot smaller. I was one of four, out of about 100.
 
There's a national programming contest here in Flanders as well. The puzzles are quite hard to solve, esp given the time limit.
 
@StackedCrooked Is it just for Flanders, or for Belgium as a whole? Given the level of problems in the IOI, most national contests are pretty hard as well...
 
10:32 PM
I could probably solve them all given enough time, but I may spent several days on some of the harder ones. The time limit is 4-6 hours.
 
It really sucked being a high-schooler, and having to solve problems that require data structures I didn't knew existed. At the national final, I ended up "inventing" hash tables.
Crappy hash tables.
 
@JerryCoffin I think it was just Flanders..
@JerryCoffin Ok, national wasn't the right word perhaps..
 
Then it was a summer spent learning about graphs.
 
@StackedCrooked Maybe -- though given Belgium's political structure, it's not all that far off either (especially given the difficulty you've had at even forming a government sometimes recently).
 
@JerryCoffin very true!
Flanders and Wallony really feel like two different countries.
Btw, today is day 444 without a Belgium government.
 
10:36 PM
lol Belgium gov't is a joke these days
 
@StackedCrooked feel...and speak! :-) But as I recall, Brussels is officially sort of separate from either one.
 
No, it's 445 already.
@JerryCoffin Indeed.
 
yo momma's 445 already
 
@StackedCrooked Once a day is down to <1/4% of the total, it doesn't really make all the much difference any more does it?
 
10:37 PM
The sense of urgency has been long gone!
 
@JerryCoffin That line of thinking only leads to more procrastination!
 
a quarter of a percent of the total?
 
@StackedCrooked OTOH, at least your King hasn't abdicated recently (at least that I noticed).
 
In July new negotiations were finally going to start. But then the King announced that the parties should take a month holiday first.
 
Does the King hold power, or is he just a "special" dude?
 
10:40 PM
@StackedCrooked Hmm...but they've already (sort of) taken a year+ holiday...
 
@JerryCoffin the King won't renounce his throne, that would cause even more chaos
@JerryCoffin Yeah, it's silly.
 
I quit trying to understand what these Belgian politicians do all day...
 
nothing, obviously
 
@StackedCrooked Yes, I know -- but as I recall, he did abdicate for a week (or something like that) several years ago. Parliament passed a law allowing abortion, which he didn't feel he could sign, so he renounced. Shortly afterwards (after the law was in effect, so he didn't have to sign it) he was asked to take the throne again, and accepted...
 
they sit around, they order prostitutes and food, and they have a great time
 
10:42 PM
@TonyTheTiger You're in Belgium aren't you?
 
and I quit asking myself why THE FUCK I have to pay so much fucking taxes for politicians that do jack shit all day
 
Shouldn't that interest you?
 
@JerryCoffin That was the previous king Boudewijn.
 
@RMartinhoFernandes yes and I can't understand it
@JerryCoffin he died in 1994, that king did
 
"abdicate for a week" This sounds really silly.
 
10:43 PM
@StackedCrooked Sorry, yes -- I didn't mean to say it was the same guy, just the same country.
 
@RMartinhoFernandes it did, but it's getting too rediculous to hold my interest
 
@JerryCoffin That was a while ago, back in 1990.
@RMartinhoFernandes Welcome to Belgium!
 
Belgium - Where silly and stupid is a way of life!
 
Oh come on. Politics seem silly and stupid everywhere I look.
Stop trying to take all the silliness for yourselves.
 
@RMartinhoFernandes The difference is that Belgian politicians are more honest than most. Everywhere else, they work much harder at maintaining the illusion that they're vital to the country.
 
10:49 PM
Laws are very complicated here. Instead of reform we usually start adding special cases and exceptions. This has been piling up for decades.
It's similar to a bad codebase.
 
There was a message here.
 
@RMartinhoFernandes lol
 
@RMartinhoFernandes Thanks, fixed :)
 
@RMartinhoFernandes Maybe he meant it's like trying to understand the output from a compiler. That sounds like laws in general though...
 
it's not as bad as the UK, where 23% of the national vote gives 8% of the power
 
10:51 PM
I knew it! I knew this would devolve into a pissing contest about who has the silliest politicians/political system!
 
@DeadMG The US can hardly claim to be much better either, given the number of presidents we've had recently who clearly lost the popular vote...
 
What's really shocking to me is the how bad the tabloid culture is in UK. Belgium is really tame in comparison.
 
@JerryCoffin honest? WTF! They've been telling us for over a year they're "solving" the problem (BHV and others) and what have they accomplished?? Absolutely nothing! These people have a wage of 8K a month and each and every penny comes from us, the tax payer, for what, for sitting around a table and arguing with one another like little children and then coming in front of a camera saying that things are "moving". Months later, we're not one step further, we've probably gone backwards. </rant>
 
Not penny, eurocent :p
 
lulz, I lived in the UK remember
 
10:53 PM
@TonyTheTiger That was his point, I guess. They don't even try to maintain the illusion they're vital.
So, they're honest.
 
They aren't even saying things are "moving". They are saying that they are optimistic about the prospect of preparing for moving.
 
@RMartinhoFernandes yes they are, cause when you see them on TV it's all this BS of "oh and we need to fix this and we need a gov't for the people and blah bla"
@StackedCrooked yea, that too, it's outragous
 
@TonyTheTiger I didn't give an unqualified "honest", only "more honest". Maybe "less dishonest" would be more accurate. Besides, doing nothing at all is really well above average for politicians -- most are actively harmful to the people they're supposed to help.
 
@JerryCoffin you have a point.
Ugh, politics, will it ever change?
I guess the day it stops being money and greed motivated, then perhaps we stand a chance, otherwise, no
 
Privatise the government I say! :D
 
10:57 PM
@TonyTheTiger Constantly. I'm not sure it'll get a lot better in any hurry, but looking over history, it's definitely changed a lot over time, and on average has slowly improved.
 
So there are competing goverments and people can choose which one they subscribe to.
 
@JerryCoffin well perhaps, but then at a snail pace...
 
@TonyTheTiger Yes -- you have to look at things over a period of centuries (at a minimum) to see much real improvement. OTOH, I'm certainly glad I wasn't born in, say, the 1600's.
 
true that
 
Rule of thumb is to not let your own well-being depend on your goverment. Take life into your own hands.
 
10:58 PM
but in Belgium, politics has become too complicated, I mean how many political parties do we have?
 
If you do that you start caring less about the rumbling "up there".
 
like 8+, in a small country as this one?
 
How many of those really have a voice?
 
they need 7 to form a govt
so at least 7
 
10:59 PM
and then you the opposing parties
 
They all have a voice alright, and they're using it loudly :)
 
We only need one.
And we have 20+ parties.
 
so go figure, how the hell do you get any agreement with 7 parties that each have their own thing and don't seem to ever want to compromise, I mean that's just bound to fail if you ask me
 
@RMartinhoFernandes One of the problems is that Belgium's system is a loose enough confederation that the answer is essentially "all of them."
Almost any significant number of people who disagree about anything can bring nearly the entire system to a halt (which is pretty much what's happened).
 
yep
actually, for a long time, Bart De Wever was the one that kinda held up things, cause he refused to give in to the Wallonian's requests
and as he had a fair share of the votes, he had enough power to hold everything up
 
11:03 PM
Last time we had such a disagreement here (this year), the government of the time resigned, and we had elections one month later.
 
now they kicked him out
we had elections, and the party that won the elections in Flanders (N-VA) is no longer part of the the forming gov't
they are now in the opposition
 
That's lead to a lot of the stranger parts of things -- for example, Belgium has not just two, but three official languages. Flemish and French are understandable -- but German is also an official language, for the sake of something like 60 or 70 thousand people who happen to speak German.
 
@JerryCoffin yea
you seem to know a lot about Belgium, been here?
 
@JerryCoffin Shirley German being an official language is not a part of this problem, is it?
 
ok
I just did the mathematics
 
11:04 PM
@RMartinhoFernandes that's where it all starts, isn't it
 
Because of the German?
 
in the UK 2010 General Election, a Liberal Democrat vote is worth 29.2% of a Conservative vote, and 27.8% of a Labour vote
 
the languages spoken in some small towns around Bxls are French and Flemish, and when there's elections, what election letter do they send out, and in what language. I think now it's French, but the Flemish people living there want it in Flemish and now they want to split this region up in to Flemish and French or something and they can't ever come to an agreement
 
@TonyTheTiger Yes -- often enough that I can find my way to the nearest Pierre Marcolini store from any part of Brussels, blindfolded (well, maybe not blindfolded...)
 
and they've been discussing this for over 40 year now, the problem towns are acronymed to BHV
@JerryCoffin oh wow, cool :)
 
11:08 PM
@TonyTheTiger (off-topic: it's an initialism. An acronym reads as a word, like SOAP.)
 
@TonyTheTiger Of course, there's always a good story. The first time I came to Brussels, I figured out the shortest route from the train station (Brussels Nord) to my hotel. For some reason, the map didn't point out that leaving back door of Brussels Nord lands you directly in the middle of the red-light district...
 
@RMartinhoFernandes oh thx, TIL initialism
@JerryCoffin oh lol :P well you got to see it then :P
 
I'm skeptical of the whole German language community problem. Switzerland has four (not three) official languages where the fourth is a small community too. That's hardly a problem there.
 
@JerryCoffin If I'm lucky, I might be getting a nice dev job near Brussels :)
 
FWIW it's also a federation.
 
11:10 PM
Confederacy.
Not that I would know the difference.
 
@LucDanton it's a language issue where there's politics involved, it's more complicated
 
@TonyTheTiger That's the point: language is not the issue. It's more complicated.
 
Brussels-Halle-Vilvoorde (often abbreviated as BHV) is a Belgian electoral and judicial arrondissement (the judicial arrondissement being unambiguously better known as the Brussels judicial Arrondissement, after the location of its main courts) in the center of the country, encompassing: * the officially bilingual (French and Dutch) Brussels-Capital Region, which coincides with the administrative arrondissement of Brussels-Capital * the officially monolingual Dutch-speaking area around it, Halle-Vilvoorde, which in turn coincides with the administrative Halle-Vilvoorde administrative A...
this is the problem
 
@LucDanton Yes, but Switzerland is a lot different in general.
 
and the primary reason we don't have a gov't at this point, cause politicians from Flemish and Wallonian side can never reach a decent agreement on this to solve it for once and for all
 
11:11 PM
I.e. you should have as many official languages as you want without it being a problem.
And conversely, changing the number of official languages is hardly going to change anything...
 
@LucDanton well yes, but it seems impossible in this small country called Belgium :P
 
Solve it the Hollywood way: nuke the thing.
 
lulz
didn't know I could rant that much about politics, sometimes I surprise myself
:P
 
Ranting comes easy.
 
yea, sure
 
11:15 PM
So atm the interface I have is that there is a push member for in_channel and T pop(); member for out_channel.
 
it's making sense while doing it, that is hard
 
@LucDanton Just like I'd expect.
 
Any opinion on how to report a 'channel closed' situation?
 
That question was here.
 
Previous interface used boost::optional<T> actually as the return for pop and was blocking.
 
11:16 PM
That would let you use something like if(auto x = ch.pop()).
 
Indeed.
 
Another option would be an iostream-like interface.
 
I dislike the idea of out parameters.
 
Me too, just tossing it out there.
 
the PPL uses a bool try_pop(T&) interface
 
11:17 PM
Oh okay.
Listing our options.
@DeadMG That's non blocking though.
 
oh yeah
 
Lemme see how Go does it.
 
So using boost::optional<T> for a blocking interface that will return false just once in a typical use seems overkill.
As much as 'end of channel' isn't exceptional, it should still only happen once.
 
Dammit. Go takes advantage of multiple return values.
x, ok = <-ch, but x = <-ch is valid too.
 
11:20 PM
that's not really fundamentally different to try_pop or boost::optional
 
More like optional, yeah.
 
Lua has a ok, msg return from their pcall construct
local ok, msg = pcall(func, stuff)
if (!ok) then
    print(msg)
end
 
Now that I think about it
for(auto&& element: channel) would be the nicest thing, wouldn't it?
 
if and only if you expect to receive messages in chunks
if that were the case, why not just dump the message buffer on to the user when using pop()?
 
11:23 PM
Why chunks?
 
the problem with that approach is that you'd have to maintain validity whilst iterating
well, you can't receive one message at a time by using that interface- you can only retrieve them all as a whole
 
No, blocking interface.
There's no channel.size()
Think output iterator, not iterator range!
 
I bet the most common use of this will be "loop until closed, retrieve values". A begin()/end() interface allows that cleanly.
 
sure, but you can still receive messages asynchronously whilst in the iteration loop
 
std::copy(std::istream_iterator<T>(std::cin), std::istream_iterator<T>(), ...) is the closest match I think.
 
11:25 PM
Though I'd keep push and pop.
 
@RMartinhoFernandes I definitely would.
 
@LucDanton Is push blocking?
 
No.
i.e. not a rendez-vous
and no support yet for std::make_channel<T>(25) and so on.
 
^ LOL at the guy in the background.
 
@LucDanton That would be buffer size?
 
11:27 PM
@RMartinhoFernandes I think that's a common thing in CSP implementations.
 
And until you have that how are you making push non-blocking? Unbounded buffer?
 
Yes.
 
@LucDanton I wouldn't know if it's common. My sole contact with CSP was through Go.
 
(The implementation is a naive std::deque with condition variable and mutex, I'm really interested in the interface.)
 
Well, the iterator pair thing seems to me like the way to go.
 
11:31 PM
my intestines hurt
 
4
Q: Difference between array[n] and array[]?

SrleIs there any difference between, for example int array[]={1, 2, 3, 4, 5}; and, int array[5]={1, 2, 3, 4, 5}; Compiler needs to calculate number of elements by self for the first case, and that can take a some time ({...} of 1234332534 elements), so second case is efficient than the first?

lol
I wonder who typed all the 1234332534 elements by hand.
 
besides, the compiler still has to check the number of elements
 
Also, I'm willing to bet GCC would choke on such an array.
 
nah, 1,234,332,534 is well within the range of int on x86
 
@DeadMG I said GCC, not x86.
:)
 
11:40 PM
true
 
i only hit my keyboard so i get something like 1234332534 :P
 
oh noes, it's @RMartinhoFernandes! run away!
 
What?
I'm not scary.
 
o rly
that's what you think
 
11:48 PM
Usually I'm the one avoiding people, not the other way around.
 
well I like to Break The Mould™
 

« first day (319 days earlier)      last day (4630 days later) »