« first day (638 days earlier)      last day (4309 days later) » 

sbi
10:00 PM
Translucent ants eating colored liquid sugar.
 
Coooooooool.
 
I thought it might have been since you posted this and this and this. Mostly, I take the amount of confusion coming out as an indicator of the amount of confusion suspected inside :) My bad. Glad you got it
@sbi Ah man, you're late:
7 hours ago, by sehe
I think I can safely predict the ape has more animals in store for the lounge in 3... 2... 1...
 
@sehe Nope
 
sbi
@sehe I tweeted that today, and someone Jeff follows retweeted it. Then Jeff retweeted it, too. Since then my interaction tab exploded. I have now >160 RTs and counting.
 
@SethCarnegie What? I'm not glad you got it? Lol
 
10:03 PM
@sehe It wasn't confusion coming out of me, what I said was correct
 
Dammit, my mouse's left button died.
 
I wouldn't purport to tell you whether you are glad or not
 
sbi
@sehe Ah, now I gotcha! You were referring to that tweet and expected me to bring this up here?
 
Mmm. So that explains your 3000+ tabs then :) I don't mind my retweets.
(disclaimer: I tweeted 2 whole tweets in my life)
 
sbi
@RMartinhoFernandes Damn Diablo, right?
 
10:03 PM
What's with all these exclamation points today!
 
@sbi Well, yeah. And you did. So...
 
@sbi No, I don't play Diablo.
It died of old age.
 
@SethCarnegie In all the ways that confusing the crap out of everyone is correct. You know, you have to consider that there is always a difference between what you think you say, and what others are hearing.
 
Not my problem :)
Thanks for the help though
 
sbi
@sehe No, I usually have 100+ tabs open only. Also, with "the tab exploded" I was referring to the fact that retweet notifications are coming in almost faster than I can read them — on that one tab.
 
10:05 PM
@SethCarnegie K cheers
 
sbi
@RMartinhoFernandes So was it Quake?
 
@sbi Oh good. I thought that would be insane :)
Obviously, it was vim.
Or a second hand, whitelabel mouse
 
I taught my youngest how to double-click on the (old) laptop's touchpad today. I'm pretty sure it will break down soon
 
10:07 PM
I'm going to set it for left handers and see if I can roll with the right button until I go buy a new one.
 
@RMartinhoFernandes If it is windows, double check if a reboot fixes it :)
 
@sehe Soon he'll be quadruple-clicking and beyond!
 
@RMartinhoFernandes Those finger skills the dexterity will come in handy one day
I'm a pianist so I make it a point to show him how to do it with a bit of proper technique...
 
Oh wait, it's back. Maybe it just need cleaning.
 
Well, check the page faults. I wouldn't be surprised if it was some uncertified driver thing. Or check your other peripherals. And the PSU. Whatever.
 
10:10 PM
lol
 
TBH I have my DELL mouse give up sometimes, I need to lift it and use a whole other surface texture to get it back to tracking movements again. Must be some kind of auto-recalibration thing that gets worst case behaviour on my desk top
55 mins ago, by sehe
Ok, I'll stop procrastinating, more preparing to be done.
 
I'm not surprised.
 
sbi
You know, you'd think this room is awesome, because we have all those C++ programmers here. And then he comes along and says "I am pianist."
A pianist? Really? Man, what are you doing here? (Extra credit for getting the reference.)
 
@sehe The first time I read castrating and now I read masturbating. :/
 
@sbi Billy Joel. Now, who gets me my beer for free?
@RadekSlupik You're a sick bastard, "and probably will be for life"
 
sbi
10:13 PM
@sehe Me, the day you come to Berlin. Also, you are awesome for recognizing a random line from Piano man.
 
@sehe no, your font is too small. :P
 
Xeo
I feel like we need a new topic.
 
@sbi Well, not professionally. Semi.
@RadekSlupik LOL
 
I play the piano too... but I probably can't compare to @sehe with real formal training. :P
 
It's a deal.
(* I don't like beer)
 
10:14 PM
@Xeo room topic changed to Lounge<C++>: We don't need to stinkin' topic. [brainfuck] [c++] [c++11] [c++-faq] [teen-drama]
 
@Xeo 95% of the time, C++ is the root of all evil.
 
@RMartinhoFernandes To? Did you just verb 'topic'?
 
@RMartinhoFernandes Much better. I guess
 
sbi
@Xeo, that is lame. Incredibly lame.
 
10:15 PM
room topic changed to Lounge<C++>: We don't need no stinkin' topic. [c++] [c++11] [c++-faq]
 
We don't need no stinkin'
 
Xeo
@sbi Sorry, but the old one we had for days already!
 
sbi
@RMartinhoFernandes That a little bit of improvement, yeah.
 
That tag should actually exist.
 
sbi
@Xeo Well, it was good. But when you need to replace it, at least replace it with something good.
@RadekSlupik I think there's a parenting site on SE.
 
Xeo
10:16 PM
I didn't replace it, I just voiced my concern regarding this rooms integrity. Wasn't it a custom to have the topic change atleast every other day? :P
 
Time for some music.
 
sbi
@Xeo Well, there was one topic. You removed it, and installed a different one. That is usually referred to as "replacing". Which is all well, except this new tagline sucks.
 
@RadekSlupik Not that again.
 
Xeo
@sbi Wat? I didn't change the topic.
That was the robot both times.
 
pwned
 
sbi
10:20 PM
@Xeo Oh damn. I just looked again and saw it was the robot. I apologize.
 
You should.
 
The std:: topic was rehashed and not funny.
 
A user with 197k rep, 19 gold badges, 315 silver and a shitload of bronze.. but to the below question he doesn't mention that the standard doesn't guarantee a certain character to be represented by a certain value?
-3
Q: How to convert from ASCII to string or symbol

Anthony GainorI want to output this ^ to the console, but I want to do it using ASCII code and not the value itself. Does anyone have an idea of how to do this?

 
sbi
Now the Scotsman comes again. We won't understand him.
@RMartinhoFernandes Ok, I will.
room topic changed to Lounge<C++>: No smoking in the lounge! [c++] [c++11] [c++-faq]
 
sbi
10:22 PM
I did.
 
Xeo
@sbi I pondered on whether to change the topic to a similar one like
7 hours ago, by Tony The Lion
user image
 
sbi
@Xeo I saw that. I was not amused.
 
@RadekSlupik I like how it accurately portrays the programmers as drones
 
Xeo
room topic changed to Lounge<C++>: No smoking, food, drink or Gorillas (Bonobos OK) [c++] [c++11] [c++-faq]
 
though I did, now I just gotta copy the relevant section of the standard.. blargh, hate doing that (the formatting fucks up every time..
0
A: How to convert from ASCII to string or symbol

refpThe hexadecimal value for the caret character (^) is most often 0x5e (94 in decimal). std::cout << static_cast<char> (0x5e) << " " << (char)94 << " " << (char)0x52; output on my playform: "^ ^ ^" I write "most often" because the standard doesn't guarantee...

 
10:23 PM
@sbi I was saying you should apologize.
Because you said my tagline sucked.
 
Xeo
@RMartinhoFernandes No, you clearly meant for him to change the topic. That was more than obvious.
 
sbi
@RMartinhoFernandes When I say your tagline sucks, then it's you who has to apologize, not me.
 
@refp No need to link twice. There are no goldfish in the lounge. Yet.
 
@sehe link twice? it's not the same link..
 
Only the fragment changes.
Fuck this. I can't seem to open the damn mouse without destroying it.
 
10:27 PM
@refp So. You linked twice. Look for yourself. I get how it happened, just pointing out you can change the first link next time, or make it not onebox :)
 
@sehe it's not the same link, one is to the question the other one is to an answer
 
Damn you, now I can't make the joke that just came to mind.
 
@refp Hint: I'm not dumb. I might actually mean something sensible.
 
@sehe Hint: I'm a troll, I never mean anything sensible
"How do I fix my problem?" "By not rolling your own list and string classes like a moron." — DeadMG 2 mins ago
DeadMG, always bringing joy into the world
 
Ell
who needs joy when you can have sleep instead
 
10:30 PM
@DeadMg Hey, I'm rolling my own string class.
 
but not like a moron
 
Btw, I finally shoved the UCD into a C++ TU.
Well, except the Unihan.
 
@refp I actually downvoted you.
then I realized that the guy was an
so I un-downvoted you
 
@DeadMG I bet you did.. the question now is; why did you do it?
 
people who make mistakes with their manual memory management, solving one specific instance of it will not solve their actual problem, being that they are manually managing memory.
 
10:33 PM
5
A: What is the difference between an "on line" and "off line" algorithm?

David TitarencoWikipedia What, exactly, do you not understand when looking at the Wikipedia page? In computer science, an online algorithm is one that can process its input piece-by-piece in a serial fashion, i.e., in the order that the input is fed to the algorithm, without having the entire input a...

 
the only sensible answer to such a question is "Use a Standard container like a sane person."
 
^^ oh nice...
 
unless his idiot professor says he can't
 
@DeadMG ... as always I find your arguments beyond stupid
 
Ell
wel we know how stubborn people can be so let's bit argue and just get along
 
10:34 PM
Let's what?
 
@refp You're right. We should let them cause 999999 difficult to find bugs, solve one of them, and pretend we did a good job when we could assist them in eliminating all of them.
 
Ell
*not argue
 
@DeadMG Apprentice: I'm trying to learn how to cook, but I always burn the rice when I try to make it.. how am I suppose to do it? DeadMG: You stupid cunt, don't boil your own rice - go and buy it from the shop down the road.. fucking moron.
 
sbi
@Ell Who needs sleep when you can have Joy instead?
 
@Ell Oh,
Autocorrect?
 
10:36 PM
@refp Not really. I'm fairly certain that pre-boiled rice possesses different nutritional properties and taste to rice you just boiled yourself. Unlike memory management, where every sane person just uses the Standard containers (or at max, rolls their own when they have very customized behaviour).
 
@DeadMG it's a matter of learning
 
more equivalent would be "Apprentice: I'm trying to learn how to cook, but I always burn the rice because I smelted my own goddamn pot and it has holes in. Also I built my own cooker from scratch and it's unreliable and the heat sometimes goes way above instead of staying steady. How am I supposed to do it?"
@refp Learning what- the way that nobody does it and for good reason?
 
@DeadMG you never manage your own memory? good for you.
 
nothing to do with me, it's a simple question of "Use the Standard-provided components in the correct fashion and the problem is solved automatically."
 
Ehm, does this room also sometimes get stuff like this: chat.stackoverflow.com/transcript/message/4535170#4535170 ?
 
10:38 PM
@NikiC Oh yeah, we do.
 
... "but you will never learn anything about memory management"
 
Just flag for mod.
 
sbi
@refp In a decade of writing C++ code, I have written maybe half a dozen delete statements. Also, I have not checked in a single crashing bug between Dec 2001 and summer 2008.
 
@NikiC Oh wait, that's not what I thought at first.
 
@refp Who cares? Nobody manages their own memory.
 
10:38 PM
WTF.
 
end result; the STL stops evolving since no one ever learn how to manage memory, the current STL writers drop dead and the STL dies with 'em
 
no, people study it when they need it.
like what sane people do: you find out what you need, and then you do it.
 
I should have ignored DeadMG before he got into my brain, I'm so feed up with this bullshit
 
sbi
@NikiC Why are you asking us? If you think it's inappropriate, just flag it. If you think it's outrageously offending, flag for a mod.
 
10:40 PM
@DeadMG Except me. :)
 
@Mysticial From my recollection, you basically didn't have any memory to manage :P
 
I'm more of a "yeah, I sure need that.. but I'm interested in how it's done, so I'm going to learn how to do it myself first/figure out how it is doing it, then use it"
 
@refp The problem with that is that the scope is far beyond what any normal human could possibly learn in a lifetime.
 
Exactly. That's why you're a master mechanic.
 
thus prioritization is necessary
 
sbi
10:41 PM
@refp That is all nice and well, and you should continue doing that. Newbies, however, should not attempt to manage their own memory.
 
well, who's normal? I sure ain't.
 
sbi
Anybody who comes and asks where the leaks or crashes come from in their code, is too much of a newbie to manage their own memory.
 
Ell
@refp there is no point in argueing, all it will do is get you angry
 
@sbi we have all been newbies
 
@refp Neither is anyone here. But it's still much too large.
 
sbi
10:42 PM
@refp Yeah. And this world would be a better place if we could all have avoided to fiddle with memory manually back then.
 
Point is, manual memory management is an advanced topic.
You know, "advanced" as in "the opposite of newbie".
3
 
first, you would have to become a Nobel Prize winning physicist by creating a Theory of Everything (that actually works).
 
@DeadMG learning how the STL does certain things before you use 'em doesn't take a life time, far from it..
 
then you would have to design and build your own CPU from scratch, using all your own materials and production processes, with ore you mined yourself.
@refp But it will take a life time to fix the bugs you wrote before you finished.
 
Ell
do you think programmers have a stereo type of being "weird" - as in less socially capable or fit in less - and to what extent do you tink this is true?
 
10:44 PM
@DeadMG I don't write bugs, I'm not human.
 
people still find buffer overflow attacks in Linux and Windows and those kernels have been around for a long time.
 
@Ell well, isn't the answer obvious.. just take @DeadMG as an example
 
one example does not a trend set
 
@Ell seriously though; when comparing my lines of work there are odd balls everywhere, but developers are usually weird in a kinda similar way
 
@Ell It is true that we have such a stereotype, and it is probably (as a generalization) true.
 
sbi
10:45 PM
@refp I have written my own STL containers. The first one I did was a vector replacement that did not dynamically allocate its own memory. (It used an automatic array.) It worked like a charm, until I discovered months later that, when used for UDTs, it failed to call their dtors. By that time I had already left the company I had this written for, and had to mail them and send them a patch. That was quite humiliating.
 
although it becomes less true with time
 
UDT = Underwater Demolition Team!
 
sbi
User-Defined Types. Isn't that in the acronym list?
 
@sbi .. it's a reference from ##c++ @ freenode a few years back
@sbi I'm not sure what to reply to that.. besides; you should have studied harder before deployment
 
10:50 PM
no amount of studying corrects those errors.
 
sbi
@refp Boy, by that time I had been doing TMP for years.
 
it is the same reason we employ DRY
if you make code, you make error- the only way to not make an error is to not make new code and re-use existing code.
 
TMP = Trembling Massive PENIZ
 
@DeadMG No, no, your job as a programmer is to be a machine. Everyone knows that.
 
@RMartinhoFernandes ERROR_PARSE_FAILURE
 
10:51 PM
Your fault.
Those sentences are perfectly fine.
 
nah
I was gonna do a Clang-style error saying, like, "machine" is not allowed here
 
The puppy is buggy.
 
but I couldn't be bothered, so I just wrote parse failure instead
 
sbi
And STL container has quite a fat interface. That's a lot to implement, and you want to do it so that it's fast. It's easy to oversee something silly while doing that. If you add dynamic memory management to that, it's definitely not something the common newbie should attempt to do after a semester of C++.
 
Ell
10:52 PM
my biggest problem is underestimating the size of a project
 
I sent a quite serious mail to by bookers about upcoming fashion-weeks, and I get a text sayin': "we are drinkin champagne, want some? its sunday, not workday."
 
Dammit, I have UB somewhere.
Also, std::lower_bound and std::upper_bound are freaking confusing.
 
@RMartinhoFernandes what's confusing about them?
 
Figuring out which one I need.
 
*same-or-larger* use `std::lower_bound`
*larger* use `std::upper_bound`
 
11:04 PM
Not good enough.
 
hopefully I remember it correctly now, otherwise I'll come across as a tool
@RMartinhoFernandes why isn't that "good enough"?
 
have I mentioned that my stomach currently has a shortage of contentness with it's lot in life?
 
Ok, I have this sequence { {1, things}, {10, more_things}, {20, more_things} }. Each element represents a range from its number to the number of the next one (open at the end). Say, given 7 I want to find {1, things}, given 12 I want {10, more_things}, etc. Which one do I need?
(I already know, so think carefully before you fail to look smart)
 
upper
7 is the highest value you can deal with, so it is the upper bound.
is that even right
 
Nope. Not upper.
Not lower either.
 
11:08 PM
exactly
 
It's upper with reverse iterators.
 
@RMartinhoFernandes .. that won't work
 
It worked.
 
I can't see how it would?
 
Upper gives you the first one where the comparator returns true.
 
11:11 PM
my vote is something like std::upper_bound (std::begin (foo), std::end (foo), 11, std::greater_equal<int> ()); /* std::vector<int> foo = {1,10,20}; */
 
That fails miserably: the input is not sorted.
 
@RMartinhoFernandes it's fucking sorted, and your description of std::upper_bound is wrong.. afaik it will return the first element that compares greater than needle
 
Your comparator says otherwise.
 
@RMartinhoFernandes I will just write an example trying your way, and my way.. hold on
 
@RMartinhoFernandes If it's not sorted, then you need to sort it.
 
11:14 PM
@DeadMG My input is sorted. His isn't.
{20, 10, 1} would be sorted.
 
o ok
 
@refp strictly speaking, the first item that needle compares less than.
 
@RMartinhoFernandes ideone.com/VC71J
you got me all confused with this rbegin thing, I thought about it the opposite way in.. well the post with "my vote is something like"
 
@RMartinhoFernandes I'd go for prev(upper_bound) (ignoring failure).
 
Oh, I use greater than.
 
11:18 PM
@RMartinhoFernandes hmm?
 
If you reverse the iterators you have to reverse the comparator to make the input valid.
But what you wrote above used begin and end (not reversed) and greater than.
Anyway, I think it's clear they are confusing, now.
 
the difference between the two is clear though
figuring out which one to use isn't hard, but apparently arranging the arguments/elements is
 
Quick question about c++11 or boost::bind: Can I bind the first parameter of a function without having to have placeholders for the rest of the parameters?
 
I think in boost::bind you can, but not in std::bind.
 
Basically I have an std::list of a certain length (available at compile time), and I'd like to bind its elements to the parameters of a function
I can do that with a recursive templated function but I would need to be able to bind the first argument without having to worry about the rest
 
11:28 PM
A std::list? If the size is known at compile-time, why not a std::array?
That makes it a lot easier.
 
well the size of the list isn't actually known, but its assumed to be given by a different constant
I'm making a little RCP library for the heck of it, and I'm binding network commands to functions. The network command calls a function based on the command id and the number of arguments it passes with it. The bind function is a templated function that saves a lambda that takes a list of char vectors, decodes them, and passes them to the given function, gets the result, encodes it, and returns a char vector
I'll try the boost bind method. But can boost::function be cast to an std::function?
 
Why not a std::vector then? That would still be easy.
A std::list sounds quite silly, to be honest.
 
haha ok, well a vector of vectors of characters
thanks
oh duh, of course boost::function can be converted to an std::function, its callable
 
Hey @Xeo, you around?
 
Xeo
hai?
 
11:42 PM
Remember that talk we had about immutable strings and stuff?
 
Xeo
aye
 
Well, I don't :P And I'd like to.
 
hmm... lists can do pop_front which is helpful in my case
 
std::deque
 
@Ell we're working on it :)
 
11:44 PM
exactly what I was thinking
 
Xeo
@RMartinhoFernandes lol
 
well, it seems to me that the practicalities of variable-length encoding Unicode means that inserting a codepoint into an arbitrary spot is O(nasty)
 
Xeo
What specifically? I think we had multiple fragmanted discussions about it
 
Yeah.
@Xeo Well, for now, the parts involving the interface.
I remember we came to the conclusion it needed care.
 
so I can well see the argument that mutable Unicode strings only make sense if you guarantee UTF-32 internal storage, which is the sillies
 
Xeo
11:45 PM

Mutable + Immutable Strings

Jan 12 at 1:45, 32 minutes total – 78 messages, 4 users, 0 stars

Bookmarked Jan 12 at 2:28 by Xeo

I knew I bookmarked it
 
I don't want to make any irreversible mistakes on my text, because I'd like to add that optimization later.
@Xeo Oh, kewl. Thanks.
@DeadMG Yeah.
 
and as Unicode strings do not permit random access anyway
 
But how often do you start with a string and an index you need to mutate?
 
I see little advantage of an array (or deque) of UTF-X over, say, a rope.
 
11:46 PM
I think most of the time you get the index by searching or something first.
Anyway, my basic_text will gracefully degrade, or whatever they call it.
 
degrade?
 
If the underlying encoding and container allow operation X to work, you get it. If they don't, you don't get it, but the rest still works.
@DeadMG When If I finish this, the biggest obstacle for that will be that there are no implementations of rope around. (Am I wrong?)
 
bob
hi. I have a list of a unknown number of queues (depending on the usage of my application). Each queue has its own thread for reading and writing to it. I need to have a critical section for each of the queues, but I don't know how many to create since I don't know how many queues there will be. How to get around this ?
 
Xeo
@RMartinhoFernandes I have a feeling that wasn't the whole discussion, though
 
Pack the critical sections with the queues. And then anytime you create one, you create the other.
 
11:50 PM
@RMartinhoFernandes I remember seeing it. Don't quite remember where. Might be someting silly as Qt, that being something I don't use
 
?
 
@RMartinhoFernandes Dunno. I've heard of some language where rope was their primary string, so I know that they did exist.
 
@sehe didn't SGI STL have a rope?
 
but I've never seen nor heard of any Unicode rope.
@ecatmur Yes, I think it did.
 
11:51 PM
@ecatmur Not to my knowledge.
 
@DeadMG Oh, but I mean C++.
 
I had an unfortunate thought whilst pissing just now
 
bob
@RMartinhoFernandes I don't really understand how that would work. In order to access the critical section variable, I would need to access the queue, so I would be going in circles ?
 
UI really is a complete bitch
 
11:52 PM
struct super_queue { queue q; critical_section cs; };
 
@ecatmur Oh, splendid. I stand corrected
 
I mean, imagine if you are implementing a Unicode UI
 
@DeadMG That's it?
 
when the user clicks in the text box, you will have to determine what is the nearest glyph and such
 
Not my problem. The only mention of glyphs in my code is the bidi_mirrored_glyph property.
 
11:53 PM
@DeadMG Yup. And IME. And LTR/RTL. And combining. And zerowidth. And RTL/LTR overrides.
 
It's fucking hot in here. Damn it.
 
What's IME?
Oh, input method.
@EtiennedeMartel Who is fucking hot in there?
 
Input method editing. Arguably, not a property of text, but rather the mechanisms for the UI framework to deal with this chicanery
 
Xeo
1
Q: can i make optimizer blind against loops?

tuğrul büyükışıklets look at this loop: for(int i=0;i<100;i++) { //work to be benchmarked. is so complex that i<100 and jump time is small } and this two functions: int for_a(int i) { if(i<100)for_b(i); } int for_b(int i) { //work to be benchmarked. is so complex that function call is neg...

wat.
 
blank stare
 
11:57 PM
even ICU won't handle that
 
On the upside, this guy will remember the Turkey test!
 
lol
@DeadMG ICU sucks. (I know you know, and we've mentioned it countless times before, but I just can't help it)
 
I know
 
@Xeo Ha! I guessed the OP's intentions. lol
 
@RMartinhoFernandes The temperature.
 

« first day (638 days earlier)      last day (4309 days later) »