« first day (482 days earlier)      last day (4692 days later) » 

08:00
Say std::cout.setf(std::ios::unitbuf) (from memory)
Plus, Boost does have to support C++03 for a while I think. I'm really going balls-deep into C++11.
@LucDanton fair enough
@RMartinhoFernandes quite sure it was - it always has been as far as I remember and my active memory goes back to 1.42 (but it might be off since I mixed different versions in different projects)
@LucDanton that's exactly how I feel about Clang - I will make an attempt with 3.1
@sehe Godammit, then it wasn't documented. I clearly remember looking for it and failing to find it.
@RMartinhoFernandes mmm quick google says 1_48 only: inurl:adapted inurl:std_tuple.hpp
08:02
Schweet!!!
It works!
The only thing left is some sort of manual mode.
@Moshe Of course it does :)
Cheers
@RMartinhoFernandes how'd you like my google trick for boost.org contents there :)
One last thing
@sehe How do I prevent cin from being printed back to the screen?
@LucDanton Isn't Boost.Phoenix done on top of Boost Proto? That would be an awful lot of code to 'recreate' in c++11?
@sehe I think the next Boost.Proto is going to break things (once again).
And I would expect it to use perfect forwarding where available, but that's wishful thinking.
8
Q: Read a password from std::cin

VargasI need to read a password from standard input and wanted std::cin not to echo the characters typed by the user... How can I disable the echo from std::cin? here is the code that I'm currently using: string passwd; cout << "Enter the password: "; getline( cin, passwd ); Edit: I'm lookin...

?
08:06
(Also I only have a lazy-eval EDSL, not a Boost.Proto replacement.)
@LucDanton I don't know what Boost Phoenix uses of it, actually
@LucDanton Sounds like great fun. How come you guys find time to do these things. I have got to go to work now
@sehe sigh platform specific
I'd expect all that Boost.Proto provides, i.e. building those expression trees.
@Moshe And in fact the fact that user input is 'repeated' is platform specific.
@Moshe Afraid so. It is not actually std::cin that does the printing, you know. It is the terminal (emulator) that does it. In fact you know that because
... if you pipe input into your program, your program will not 'print' it to the terminal by itself.
In other words, it is not you program that echoes terminal input
sucks, cause I want to print out something instead of what the user typed.
08:09
Unix filter style, then? Socket based listeners do well in character oriented applications.
@LucDanton That's 'doable'; still impressive work of course. You should talk to Xeo about it.
@sehe Well, I didn't really plan on doing it in the first place. It's just that one day I had the epiphany that decltype would make it really, really easy to write a lazy-eval EDSL. I couldn't shake off the feeling so I spent a week-end hacking at it. C++11 really is powerful and expressive I find.
Oh wait, you already do, i guess
(I also just happened to have written polymorphic operators prior to that so I reused that, too. Cuts a bit of busywork.)
hey
hey
hey, folks
@sehe I think he knows about it? I'm not sure.
08:11
@LucDanton Do you have a repo/blog other sharing place? This sounds really interesting
@hey folks (hey!)
hey
hey
i have alphabet {0,1}. What is the regular expression which shows all words which has at least two 0s?
1 min ago, by sehe
Oh wait, you already do, i guess
@hey Is that a riddle or your homework?
hey
hey
(0|1)*0(0|1)*0(0|1)*
but it doesn't seem right
@sehe I put my library(ish) solutions into my public annex repo on Bitbucket. No license though, made it public to discuss the code here.
hey
hey
i am trying to learn regular expressions
08:13
@LucDanton ah I saw that repo before. I'll browse it some day. Anyways, off to work
\O/
hey
hey
hm, it actually seems right when i try it in Java, what do you think?
@hey 1*?0[01]*?0[01]* would be a braindead trick. This thing is tricky to express in regex though
hey
hey
dont you think mine is correct?
@sehe Non-greedy matches?
08:16
@hey haven't really looked. I have mine a lot of thouight. Google exponential runtime and greedy matching as to why
sbi
sbi
If you think TVTropes is bad, try Wikipedia. I followed the link to ellipsis and now, half an hour later, find myself stranded on Thor Heyerdahl's page, without any recollection of what happened in between, and a primordial fear of using my browsers history to find out, lest I get lost again...
I'm amusing myself.
@sbi Having tried both, I have to say TVTropes is worse.
And on TVTropes you don't run the risk of learning something interesting.
hey
hey
hm, it's interesting if there is any software or website or something, where you can type your regular expressions and see all results
not all, but let's say 20 length
sbi
sbi
@RMartinhoFernandes But that's the problem with Wikipedia: I always feel excused because it's so educating to get lost there, which overrides all my inhibitions...
Now back to that article about Thor Heyerdahl...
08:27
Just found this in boost source code:
template <typename T> class empty_base {

// Helmut Zeisel, empty base class optimization bug with GCC 3.0.0
#if defined(__GNUC__) && __GNUC__==3 && __GNUC_MINOR__==0 && __GNU_PATCHLEVEL__==0
  bool dummy;
#endif

};
Aaaand that's why I'm somewhat afraid of the transition to C++11. Boost supports really old stuff.
cruft
I love how the workaround is to make the class non-empty.
It works --> ideone.com/UNlXv
I'm also amused by my URL.
Why the #defines?
08:33
@Pubby Read it?
Oh, I should have mentioned that before, but return 1; isn't portable. return EXIT_FAILURE; is.
sbi
sbi
Wow, this is going to be a hard day for the puppy:
Not a single fuck can be given today, flying fucks are out of the question, shit is completely out of stock & I just sold the last rats ass.
What's he gonna do now?!
@LucDanton Huh?
@Moshe Only returning 0, EXIT_SUCCESS or EXIT_FAILURE from main are defined.
Wait, you're saying that the value returned from main is a boolean?
08:37
ok
I should fix that then, thanks
@RMartinhoFernandes Returning something else might be allowed under implementation-defined behaviour.
If it's UB, then I guess yes, it is.
Ah, so you don't know if it's UB or implementation-defined. Ok.
Ye. Since the return value of main is here to transmit something to the implementation I'd be surprised if it's UB.
Well, the program runs. Anyone care to compile it and try it?
Ok, I'm out.
3:40 AM here
What kind of filename can I pass to fopen? I'm looking at the C11 draft and I'm not overly familiar with it.
std::ifstream file { u8"foo" };
What about that?
> 7.1.1 Definitions of terms
> A string is a contiguous sequence of characters terminated by and including the first null character. [...]
> 7.21.5.3 The fopen function
> The fopen function opens the file whose name is the string pointed to by filename, and associates a stream with it.
So I guess you can pass anything, and what happens after is what the implementation wants to do.
But I can't get a crash, can I?
A file or no file, but never UB!
08:59
ok, as much as VS10 can be a pain in the ass, I have to admit it's rock stable compared to older version
2k5 is just ridiculous
@LucDanton true. filenames are just byte sequences to the standard. Most libraries have that policy (different FSes on the same OS can have different filename encodings and restrictions)
How do you store filenames (whether hardcoded or into resource files) then?
@Moshe Woot for UNIX SYSV!
@RMartinhoFernandes the hacker in me resists the urge to think it might be more efficient to use struct { unsigned onebit : 1 } dummy; Of course the compiler can never pack it with any other information lest the class wasn't so empty anyway :)
sbi
sbi
I might not have believed this without seeing a pic. Monk and tiger sharing a meal at the Tiger Temple in Kanchanaburi, Thailand. (Note that the temple is internationally criticized for the way they take care of the tigers.)
09:16
This just got accepted. Feels like years ago that I answered that obscure question :)_
2
A: warning:initialization from incompatible pointer type

seheEdit (old answer gone) Unfortunately, I'm not able to reproduce the message with the same Compiler and same options: T:\>"c:\Program Files (x86)\Microchip\mplabc32\v2.01\bin\pic32-gcc.exe" -g -mlong-calls -DNDEBUG -Os test.c No Errors. Likewise with pic32mx-gcc-4.5.1.exe - No Errors. D...

Kudos for stack overflow supporting UNICODE about right, otherwise this question would have been unanswerable:
@sbi well, you can't judge animal well fair based on one photo
but if they where starving those tigers, I am sure there wouldn't be any monks
sbi
sbi
@thecoshman Yeah, I am sure, too, they are not starving them. :)
@sbi god dam people changing things so that responses seem stupid
case in point :P
There's an extraneous "in" in the room subject.
sbi
sbi
@RMartinhoFernandes Copy'n'paste.
4 hours ago, by Moshe
Well, enough about ObjC, I don't want it to land up in in the room subject.
09:31
@RMartinhoFernandes clearly "in the room subject" is a thing that someone does not want to land up in. It makes perfect sense
I like to think that on my death bed I will be able to write out my last words with out any typos
@Moshe what's the purpose? (of the app)
09:51
We need to get rid of Dietmar
(good morning from a snowy UK, by the way)
Good morning from a mild Ireland
good morning from a cold Denmark
who's Dietmar?
Dietmar Kühl
because he makes us look bad
09:55
Who is he?
C++ guru, serves on the standardisation committee, smartass :p
@KonradRudolph us, as in C++ programmers or us as SO C++ Lounge
oh, that dietmar
us, as in the resident C++ “experts” of SO
@KonradRudolph oh, you mean who proved you wrong once and you have never let it go?
09:56
in the last few weeks, whenever I open a new C++ question, Dietmar has already given the answer
so what do you propose? Collect money for a hit squad to take him out?
@thecoshman Not that I remember, and he’s only been around for a few weeks
kickstarter is supposed to work pretty well. Could try there
@jalf That may be a bit drastic :D
@KonradRudolph that is kind of how SO is meant to work...
09:57
I can kill him but it won't be cheap
@thecoshman No, you don’t get it. SO is meant to make us look good
contrary to popular belief, SO is not designed to just be a list of obscure questions about problems that never really come up in normal programming
@thecoshman Eh, I’ve never subscribed to that interpretation of SO ;)
SO is for getting answers to my questions when I have them
all the other questions and answers are just there to keep its momentum going until the next time I get stuck on a problem I need answers to
10:04
Trying to get the configuration guys to set up a branch. I say "Sorry for being a bit confusing, but clearcase just seems arse backwards to everything I ever seen" I think I'm doing it right
sbi
sbi
@KonradRudolph This seems to be really itching you, huh? I haven't seen you here in months, and when you suddenly appear then it's to get rid of someone who's better than you are.
@sbi Hehe, spot on
It just irks me that this guy appears out of nowhere and accumulates 6000 rep within days, essentially :p
no, seriously, I’m actually quite impressed
sbi
sbi
@KonradRudolph But he didn't appear out of nowhere. There's a reason he's a mod on clc++m. He's been a C++ guru a decade ago — if not two decades.
There seem to be a lot of flags cropping up in the PHP room around tereško guy recently. That's annoying.
do like me then: never look at the flags. ;)
sbi
sbi
@jalf But you only got half as many questions as I have, and you're around here much longer!
@jalf I can't. That button popping up irks me to no end. It's like a phone ringing, I cannot concentrate on anything else, and just have to pick it up.
10:16
@sbi You realise I’m only joking, right? I know who Dietmar is …
sbi
sbi
@KonradRudolph Well, we've had a few beers together twice, and you seemed like a decent and likable pal, so I didn't think you really meant to collect money to have him killed, no. :)
Still, it did bother you enough to come here for sympathy.
:p
It’s really just an excuse to visit the chat again
I can’t just come here without any reason whatsoever, right?
sbi
sbi
@KonradRudolph You don't need an excuse to pop in here. You're perfectly welcome without any reason.
but … but it’s a chat, and I’m at “work” …!
sbi
sbi
@KonradRudolph I'm sure you are not at work. I know for sure because I am there and I don't see you around.
10:21
Today I'm on sick leave, for the second time in my life.
sbi
sbi
@StackedCrooked You are that young?
@sbi I guess :)
sbi
sbi
@KonradRudolph "...around the world"?
@sbi Case in point, I’m working here: g.co/maps/6zgrq
Morning
10:23
grr, now I accidentally deleted my message instead of editing and cannot undelete?
Usually I still go to work even if I'm sick. But this time the irritation in my throat caused impulsive swallow reflex every 10-20 seconds. This makes it impossible to fall asleep. So I was a wreck yesterday morning.
I need help from you smart, funny and good looking people.
@Graeme You’ve come to the wrong place
(try the PHP chat :p)
@StackedCrooked that's what she said :)
@Graeme Every 10-20 seconds? She should be happy :)
10:24
^-^
sbi
sbi
in PHP, 15 secs ago, by sbi
Can you guys please stop to get on our nerves with your stupid flagging wars?
@sbi … got flagged …
sbi
sbi
@KonradRudolph Yeah, I saw. I'm actually tempted to validate the flag. :)
@sbi Wait, you can validate flags on your own posts?
sbi
sbi
@KonradRudolph Yeah, I was surprised, too. But maybe I would have gotten an error message had I tried. I dunno.
10:27
@sbi I liked the one saying 'sigh' 'india-asking-pattern' in tag markup. Marked it 'unsure' though :)
Flags have to be validated now? So the system has a improved a little?
@StackedCrooked for as long as I can remember (dating my chat presence there, I guess)
I'm getting a linker error of "undefined reference to `__cxa_end_cleanup'" in _vector.h, _string.c, basic_string etc etc, from searching i'm lead to believe because i'm linking to the wrong stl version.
Did what I just say make sense or was it absolute bullshi&
sbi
sbi
@StackedCrooked Chat flags always had to be validated. Get 3k more rep, and you're going to be annoyed by them, too.
@Graeme no, that makes sense. You're linking a version of the libstdc++ incompatible with your headers
10:29
Ah good. So i'm holding onto understanding with my fingernails then.
I actually want to see them. I'm like an envious little kid.
@StackedCrooked What? His fingernails? :D
@StackedCrooked grew up without fingernails. It's a condition called fingernologia...
Very sad.
> thought this was for getting answers...more like a sad hang out
PHP chat is fun
@Pubby other rooms can have surreal impressions. It is fun to wander into them sometimes
10:31
When girls meet a potential boyfriend they look at the fingernails and shoes. They reveal whether you are a slob or not.
@StackedCrooked So Graeme would just rank as 'extremely tidy' :) No nails at all. Extreme cleaning
@sehe So shoes are crucial then.
My shoes are just a woven mat of reeds and vines...
sbi
sbi
in PHP, 31 secs ago, by Gordon
@sbi tbh, i dont care what they think about me. waltzing in here and shouting at us is offensive and rude. hence the flag.
10:34
And thus started the great C++/PHP war of 2012
Clever retort :)
sbi
sbi
@KonradRudolph You can edit messages using the up key. This is explained in the newbie hints, linked form the right-hand panel, which you might want to have a look at. :)
Java > c/c++/php
@sbi It works fine. I tried it once. And ended up getting a suspension.
I'm sure everything is better than a c/c++/php hybrid
sbi
sbi
10:37
@Graeme No, that should be Java > PHP > C > C++. You were talking about the ick-factor of languages, right?
php > java
sbi
sbi
@Abyx Or maybe that way. I have never really been up in those shitty spheres to be able to compare.
0
Q: Linker errors in Android NDK (undefined reference to `__cxa_end_cleanup')

GraemeI'm getting this output after adding in a set of code from a colleague: ./obj/local/armeabi/objs/jniWrapper/native.o: In function `_Vector_base': D:/opt/android-ndk/sources/cxx-stl/stlport/stlport/stl/_vector.h:73: undefined reference to `__cxa_end_cleanup' ./obj/local/armeabi/objs/jniWrapper/na...

@sehe @sbi Tried, didn’t work. Perhaps it’s a focus problem … I’ve noticed this before
sbi
sbi
@KonradRudolph Just press up several times. I believe this, too, is explained in the newbie hints.
10:49
@KonradRudolph press 'up' arrow more than once?
@Abyx most definitely (in ick factor)
lol, now I screwed up completely … ah well …
@KonradRudolph Now that happens to me quite often :) I have learnt to press Escape several times before starting a message (to avoid accidentally clobbering a prior entry)
(apparently the permalinks to items from the message history still link to the most recent version. Too bad)
sbi
sbi
> Of course, this doesn’t mean you should take a hammer to your frontal lobes. [...] the next time you are in need of insight, avoid caffeine and concentration. Don’t chain yourself to your desk. Instead, set the alarm a few minutes early and wallow in your groggy thoughts. And if that doesn’t work, chug a beer. — Jonah Lehrer @ Wired
@sbi I don't think work will like that
sbi
sbi
@thecoshman My parser threw an std::exasperation_error while trying to make sense of that sentence.
11:01
@sbi really... let me try again. I think the company I work for would disapprove of me chugging a beer on the job in an attempts to solve a problem
@thecoshman depends on what problem. It could certainly help stopping you form interfering with their code base
@sehe personally, if I could get away with out touching the code base, I think my job would be a lot nicer
Can't room owners kick and temp ban users?
@thecoshman Huh. Why
Flag flag flag. It's the mechanism. Or endure it :)
Why flag a user repeatedly when you could kick them from the room for a half hour
I doubt many users would come back to continue being a pest
You can't kick without accepting flag
11:11
justice fail
@thecoshman woah
@thecoshman why have democracy if you can just shoot lock-up the opposition? I doubt many citizens would come back to be the opposition
Indeed
40 months = just over 3 years = slightly less than 6 years… lol but he'll serve 1 year maybe.
sbi
sbi
11:30
@thecoshman When I joined the common gang here going out for lunch the other day, or boss told of about that potential client they had a meeting with in Hamburg, last month. After having discussed a potential purchase for 2hrs in an exhausting meeting, their boss put beers onto the table, inviting everybody to have some and relax.
I find this very clever, maybe we could adopt it:
@sbi if the boss gives you beer, you drink it down!
Indeed
sbi
sbi
(Note that they seem to have a meme of abusing , those aren't real ones.)
@sbi that was my suggestion though!
11:32
@sbi well then, we best flag all those posts :P
@sbi yeah, that's why we need so many other questions, to keep SO primed and active all the time, and ready to spring into action when I have a question
sbi
sbi
@jalf Yeah, but I reserve the right to disagree, even though you say something.
man, what happened? This morning I was feeling completely rested and ready to take on the world. That lasted for about 3-4 hours. Now I just want to go home and sleep
sbi
sbi
@jalf See, lucky me can go home now. Unfortunately, unlucky me will have to pick up a sick child of mine at the school, so I probably won't get to rest.
See you guys later!
bye
I’m going as well …
12:03
I wonder if anybody got the units example compiled stroupstroup presented at going native. www2.research.att.com/~bs/Computer-Jan12.pdf
VS doesn't support constexpr
I wonder about clang, but don't want to install it right now on windows
12:14
only gcc seems to support user defined literals :(
so I have to go back to work
@Nils For shame… in the second sentence he screwed up units by quoting a "megawatt-hours" figure as simply "megawatts." If only he ran the article through a strong type system!
12:47
God damn mandatory password change, I keep putting in my old one
@thecoshman Can't change it back with a voluntary password change ;v) ?
can't reused a password if it has not be changed at least 15 times since
so, <passowrd><count> it is :P
what does it mean when we have in an algorithm, a condition like: if (probability a/b event occurs) ... ?
@user995434 I'm not really sure what you mean
can you provide a more complete example?
@user995434 Do you mean something like fuzzy logic? Mixing probabilities with concrete conditions?
12:53
no wait
@Potatoswatter oh yeah, it does sort of look that
page 4, line 6
the code in question
though that did seem to mangle the code :P
it could mean probability of either event happening....
I am not to well read when it comes to probability symbols
or it could be performing some sort of portability maths, I suggest wikipedia and read for a bit
my first thought is something like: if a/b < random([0,1]) then ...
but it will not make sens here :p
Doesn't make sense to me either at the moment. It's not the probability of two events. The first argument is a distance-squared and the second argument is a kind of adjustable fudge factor with no apparent units.
13:01
I assume you have read the rest of the paper
yes !
f = 1/(k(1+log n)) where k is the final number of desired clusters and n is the size of dataset
no offence man. I've seen people ask questions like this before that are answered if they just read a bit more :P
sigma is the squared distance from a datapoint to its nearest unit
Well, if you read it enough times, either it makes sense or it was BS to begin with. But that's not always the best use of time ;v)
if (probability sigma/f event occurs) ===> ? :/
13:06
@user995434 perhaps it is saying if(event occurs){ /* do stuff */ } and the probability of that event is sigman/f
Yeah. What is the event? Did you also read [9] by "Vladimir Braverman, Adam Meyerson, Rafail Ostrovsky, et al"?
this is the same as if sigma/f < random([0,1]) then ...
@user995434 perhaps
but from my point of view sigma/f is not always between 0 and 1
Are the distances normalized beforehand to a scale similar to f?
13:07
no
perhaps wolfmanalfa might be able to shed some light on the issue
or is that wolfmanalpha?
So, these would appear to be completely incomparable quantities.
but the squered distance of a point to its nearest unit can be any value ..
well I will ask on Stats maybe :p
Wolfram Alpha is useful for approximately nothing.
@Potatoswatter :O
13:10
If you need to perform some kind of odd calculation, it's faster to use Google to find a specialized tool somewhere else on the net, then (learn to) use that instead.
probably :P
@thecoshman Yeah. That's what everybody does. Those password policies are oh so effective.
@user995434 OK, see the code at web.engr.oregonstate.edu/~shindler/kMeansCode/kMeansCode.tar.gz , file SWM11.cpp, line 158
lolz
wolfram alpha is the best
13:22
    		if( prob( delta/f) )
    ...
    bool prob(float f)
    {
	// returns true with f's probability.
	return randfloat() < f;
    }
What does he meant by : "The problem is due to incorrect name lookup: gcc is finding the namespace-scope function template f (//Which f?)at the point of declaration, then at the point of instantiation resolves f to the member function template of abc."
So, it looks like initial suspicions were correct. Rather than esoteric, valid mathematical notation, he just took poorly-styled C++ code and maimed it to look vaguely "pseudo."
Or got a student/underling to do it with no understanding of the equations.
@RMartinhoFernandes got to protect us from leet haxzors
@MrAnubis The confusion over which f is exactly the bug. GCC finds (or did as of 4.4.6) the wrong f, the function ::f, during the first pass, even though it isn't accessible after the . operator (being a non-member function). So it fails to emit an error. Then during the second pass it finds the correct f and compiles the code as intended.
@Potatoswatter Thanks a lot , got it :)
13:41
my 17th birthday is just 17 days away. :)
@IntermediateHacker Do you want me to wish Happy B'Day now in advance? :)
does any one know if awget is the same as wget?
user142019
awget is auto wget deamon, wget is just wget
user142019
awget is just a tool that watches a specific directory you can drop urls in and it will download the files at those urls using wget
well then why the fuck is awget on these servers if wget isn't
user142019
maybe wget is included in awget
what would be the proper path for wget?
user142019
depends on the operating system/package manager.
might just not be aliased properly
unix of some sort :P
because bollocks am I going to do this manually!
though I might be able to do it via cygwin...
What are you trying to do?
user142019
13:53
@thecoshman maybe this can be of help: glass.ptv.ru/awget.html
I need to pull down a package (software package used by my work) then extract it and play around with it's contents
@thecoshman So, you need to download something. By HTTP. Can't your browser do that?
@Potatoswatter like I said, fuck doing it manually
and yes, it is via HTTP
wget is useful for spidering sites (read: porn) and pulling large individual files over poor connections.
user142019
Use cURL :P
13:54
though there might be an FTP version I can pull from
user142019
but wait
user142019
using wget or cURL is still doing it manually.
user142019
just from the command line
curl not found
yeah, but I can script it once I have it sorted
user142019
$ sudo apt-get install curl
13:55
How is there a distinction between manual and automatic when you're only loading one URL?
it's not just downloading, and it is going to be put into part of a build script
unix man, and can't be installing shit, else it needs to be installed on all the dev servers
Oh. In a script, definitely use curl. It's the conservative choice.
what's the casing for curl?
user142019
cURL
@Potatoswatter, yes it is: if ( random([0,1]) < delta/f ) but for me delta/f can not always be between 0 and 1, since delta and f are completely different quantities o_O
13:57
Casing?
user142019
uppercase/lowercase, that crap
I invoke curl all lowercase.
from the looks of it, I might have to use cygwin...
@user995434 Yes, I've looked at the code a bit more and I have no idea how/why he expects the distances to be normalized.
at least I can wrap the entire build into one script from my client
user142019
13:58
The official name is cURL. The command is called curl, though.
@Potatoswatter his C++ code style is not great, right ? :p
Perhaps there is some kind of convention known among K-means specialists.
@user995434 Yeah, the paper says it's written in "C/C++", and that's no lie.
essentially it's in C, but he uses new instead of malloc about half the time.
user142019
Aarrghh I hate websites that both have a footer and infinite scrolling!
fuck, cygwin does not have wget or curl installed by default >:(

« first day (482 days earlier)      last day (4692 days later) »