« first day (1626 days earlier)      last day (3547 days later) » 

19:00
Isn't the pthread_t the id?
It's been a while. You mean the thread id, right?
consciousness is a feedback between the soul and the mind
SJD
SJD
@QuestionC I expect to get the same thread id as function [pthread_self()] returns.
19:25
in C, 25 secs ago, by fredoverflow
Wow, a C room. Is this where the bits are still woven by hand?
MLM
MLM
Anybody know of a nice cross-platform text color library (ANSI, etc)?
ANSI for platforms that support it and other stuff like SetConsoleTextAttribute for Windows
user1804599
No.
TUIs are slang for "I'm too lazy to make a proper GUI"
user1804599
Proper GUIs don't exist.
user1804599
GUIs are always shit.
MLM
MLM
19:31
This is for green/red pass fail text
Write pass and TEH FAIL instead
It'll be noticed immediately.
MLM
MLM
I am but I thought it would make it a little bit easier to spot where it went wrong. I understand
@MLM ncurses
user1804599
> nice
Except ncurses doesn't quite work as well on Windows.
19:35
haskell.org crashes on accented letters in URI string: haskell.org/hoogle/?hoogle=gluti%C3%B2
gg
user1804599
hahaha
user1804599
not funny
fred be trollin'
MLM
MLM
If I can get ANSI styles to work on Windows, that would be best. When using Node(javascript), colors seem to work just fine in CMD. That relies on this package which is just ansi. But when outputting ANSI with std::cout it isn't interpreted.
I have this function which binds a lambda and some params. You must specify the params or things may crash and bad things will happen. In the example, the params are {&width,&height}. Does anyone know a way to enforce including the params?
area = { [&](){ return width.Get()*height.Get(); }, {&width,&height} };
19:42
incoming repwhores — Lightness Races in Orbit 5 secs ago
a downvote each
@Pris IDGI. Doesn't look much like a function, to me.
Dec 27 '13 at 20:27, by Lightness Races in Orbit
rep rep gimme rep
@Pris Don't use a raw pointer.
@Jeremy Just cos I like it doesn't mean I sell my body for it
Yes it does
@LightnessRacesinOrbit Who would buy it?
19:45
@Pris std::reference_wrapper doesn't allow default construction.
I'm doing stackoverflow programming.
Actually, I should have a "smart dumb pointer" for these cases.
@LightnessRacesinOrbit The first bit is a lambda that captures @width and @height. The second bit adds pointers to those params in an internal list inside @area. I use the list to maintain dependencies between the parameters, so that when 'width' changes, area is updated
@Pris Is this C++?
@milleniumbug ya
area is being assigned an aggragate thats like struct { function<T()> f; vector<thing*>; }
19:49
Hey, now with std::initializer_list, whatever = { 1,2,3 }; may compile
It does compile... the issue is that the following would cause problems even though it compiles:
area = { [&](){ return width.Get()*height.Get(); }, {&width,&height} }; // good!
area = { [&](){ return width.Get()*height.Get(); }, {&width} }; // we're screwed!
@Pris nope still don't get it. doesn't look valid to me.
you need something a bit weightier than a lambda for that, since you're talking about dependency trees.
why do you need to pass those pointer arguments if you're capturing width and height?
@Xeo lol "lady's man" deliberately looks like "lady man"??
19:55
@LightnessRacesinOrbit Because area modifies &width and &height to install itself as a listener for changes.
user1804599
user1804599
Fucking delicious.
Xeo
Xeo
Frikandel?
user1804599
<3
Xeo
Xeo
looks good
19:56
Is that mayo with fries
mayo with fries should be a criminal offense
user1804599
No, it's great.
user1804599
@Xeo We call a frikandel with satay a "dick with shit."
user1804599
inb4 what's satay
@LightnessRacesinOrbit Its loosely based on this: woboq.com/blog/property-bindings-in-cpp.html
kinda cool imo
19:57
@райтфолд that looks dreadful
@райтфолд inb4 ur dick is shit
@Pris holy fuck
user1804599
omg shashlik
@райтфолд the only satay i know of is chicken satay... dat peanut sauce
user1804599
I have vla and hotdog.
@LightnessRacesinOrbit what?
@райтфолд Shudder!
Think I'll opt for pizza from my deep freezer today :-P ...
But even my Wieners with french fries I had yesterday, looked much more appetizing than @райтфолд's dish.
20:04
LMAO. This dude has awesome videos.
user1804599
@πάνταῥεῖ don't eat wieners.
@lightness prefers 12"
@райтфолд You can also have Frankfurter's, if you prefer these :-P ...
@wilx Without watching yet: It would be safe with a certain amount of cocaine mixed in :) ...
user1804599
@wilx lol the facepalms.
user1804599
20:14
I know a guy who once snorted paprika powder.
user1804599
It wasn't very good for him.
@LightnessRacesinOrbit I've answered that poor question, mainly because it somehow annoyed me for the braze facedness, and not even showing compiler errors, or compilable code and requirements.
0
A: How to ask for the user to input Boolean values and demonstrate various bit-wise operators?

πάντα ῥεῖThere's a number of very nonsensical errors in your code (I've pointed them out as comments in my fixed code below), where getting boolean values from a std::istream is fairly simple: #include <iostream> #include <iomanip> // using namespace std; <<< You better don't use this int main() { ...

@milleniumbug Well, at least ncurses is "cross-platform" against various flavors of Unix ;)
@LightnessRacesinOrbit Yes, padavan I am.
20:20
6
Q: Switching on Strings

fredoverflowI was curious to see how Java and Scala implement switches on strings: class Java { public static int java(String s) { switch (s) { case "foo": return 1; case "bar": return 2; case "baz": return 3; default: return 42; } } } obj...

> Is it possible to convince Scala to employ the hashcode trick?
> This depends on the JVM that is running. Remember that Java is just a language, how the bytecode is generated depends on the JDK that you use.
great answer...
user1804599
@fredoverflow have you measured the difference at runtime after a JVM warmup period?
user1804599
Perhaps the JIT-compiler optimises it!
I'm not experienced enough to measure my code.
@πάνταῥεῖ Padawan, you noob.
But I can't imagine for the life of me that the JVM would be able to optimize this penalty away.
user1804599
20:24
I'd use Map[String, () => Int].
Why () => Int instead of Int?
Not that much _noob_ :-P ...
You meant the spelling _padavan_? I wasn't actually sure ...
user1804599
Also, I doubt there's a big difference for only 33 keywords.
user1804599
Go optimise cancer curing techniques instead.
@райтфолд I would love to contribute to cancer curing. Github link?
20:26
Gotta love that. Proving that somebody is totally full of shit in their bashment of someone else, is "pedantry".
user1804599
@LightnessRacesinOrbit What is the meaning of the isolated sentence "proper kicked off"?
23
Q: How do I tell my supervisor his idea is incorrect?

alexMy supervisor gave me some guidance in order to complete my Masters thesis and to publish the result in a journal. His idea to develop the work is not correct and in this case I know my thesis better than him. How do I tell him his idea is not correct?

Why do people like making simple things complicated?
user1804599
Because they are complete and utter morons?
that was harsh but maybe you are right
user1804599
20:30
I think I will go with postfix control structures.
@khajvah Whoah, without seeing the thesis?!?! How should this be answered? But well, there are things like diplomacy I've been sometimes advised to make use of already.
user1804599
Say you want to pass the same value to f without creating an intermediate variable: f(%_, %_) given a + b * c vs let x = a + b * c; f(x, x).
user1804599
Reads nicer than given a + b * c { f(%_, %_) } IMO.
@πάνταῥεῖ You dont need diplomacy to have a simple argument.
I am sure his boss is able to have an argument
user1804599
If somebody is wrong it's best to tell them outright they are wrong before they do more damage.
user1804599
20:32
Any other action is instantly bad and moronic.
argument is not the right word probably. Discussion is better
@райтфолд read that as "before they do marriage"
@fredoverflow It's a chavvy colloquialism, a corruption of "properly kicked off", used like "it has properly kicked off" or, translated, "an event or sequence of events have been initiated in a dramatic and/or noticeable manner", probably derived from football lingo ("kick-off" being the start of the match/'fight')
like when Bartek starts gobbing off about his incompetent colleagues, it inevitably proper kicks off up in this gaff
user1804599
In Perl 6, && is AND and !&& is NAND.
user1804599
You can put ! before any Boolean operator!
20:33
Nice, I use NAND all the time... NOT!
@khajvah Nope! That's one of the main failures frequently appearing to domain experts, when they answer questions of customers within there expertise.
@fredoverflow good one
user1804599
%% checks divisibility.
user1804599
> 1 !%% 90
True
what a waste
I guess that 90 % 1 == 0 is too much effort
user1804599
20:34
Why?
user1804599
If you don't want it you can shadow it!
oh dear that sounds even worse
user1804599
Operators aren't built-in. You can create custom ones.
@πάνταῥεῖ Oh cmon. Of course you shouldn't say: "You are wrong, you idiot, I am right". But having a simple discussion like "I think, this should be like this..." is nothing complicated. You boss is not the god. He is a human being like you and should be able to have a discussion.
@khajvah ""You are wrong, you idiot, I am right"." Did I say so, cmon?
20:37
Snake can go underwater
It still does not have a proper head though
3D snake? nice
@πάνταῥεῖ I wasjust pointing out what would sound wrong and what would sound like a normal argument.
@райтфолд How do you define precedence and associativity?
@khajvah I was just talking about what I've been experiencing the last 25 years or so :-P ...
@AndyProwl water looks good
20:38
The snake is barely noticeable though.
@fredoverflow An attempt
Pawnguy!
@khajvah Admittedly it looks better in the screenshot than it does live
@πάνταῥεῖ I don't even have a one year experience, so maybe you are right but honestly, if my boss would take a simple disagreement badly, I would quite right away.
That's the name of the guy about whom I was wondering when I came back.
20:39
@fredoverflow Yeah. I should make it thicker or something. Head is the priority though
user1804599
@AndyProwl You should give head.
@caps It's for the Pawnguy jam!
@AndyProwl Agreed. You should give head to the snake.
I'm gonna give him head
@khajvah There are more subtle and better stratgies, to achieve what you want.
user1804599
You can define precedence, associativity and fixity.
Tomorrow maybe
@πάνταῥεῖ I don't there is anything better than simply discussing the issue, is there?
user1804599
sub circumfix:<START END>(*@elems) {
    "start", @elems, "end"
}
say START 'a', 'b', 'c' END;        # start a b c end
user1804599
hahahahah
20:42
@AndyProwl I saw the pin.
user1804599
There are five associativities.
@khajvah There is. Fuck your boss' wife and toy tremendously good, and let them tell him what's correct for instance.
When I write git checkout -- foobar.txt, what exactly does the -- stand for? Could I write something else, but equivalent, instead? Can I use the -- in other git commands?
@πάνταῥεῖ lol yeah, that would work too.
user1804599
@fredoverflow Welcome to the wonderful world of Git commands.
20:44
@khajvah ^Sure ;-) ...
@fredoverflow -- is used in POSIX to terminate optional command line arguments
So anything after -- are positional arguments
@MartinJames: You know what the BBC's April Fools' joke is gonna be this year, dontcha?
Clarkson is not fired?
yes, he was fired.
I don't really see why though, if you're gonna hire Clarkson then him being a dick is kind of the expected outcome and practically the sole purpose of hiring Clarkson.
He punched another employee over a sandwich..
user1804599
20:51
Who is Clarkson?
hah, this would have been relevant during Brotak's rant earlier
well I personally would not hire Clarkson
but if you're going to...
@райтфолд A very popular dick here who just got fired for punching his producer over not providing hot food.
He does his job very well
user1804599
I see. Well, I got this wonderful idea anyway.
but is it wonderful?
20:58
@LightnessRacesinOrbit Is that douche version of master Bra'Tac?
user1804599
My wonderful idea is as follows.
Is there any bug reporting server software that is easy to use and is not made just for developers? I feel like you need some knowledge just to report bugs you found.
@khajvah FogBugz
user1804599
# prints all category names:
for categories {
    outln(%_.name)
    recur %_.children
}
@Borgleader yes :D
user1804599
21:00
Jinja2 has this and it's incredibly useful.
user1804599
Why write functions when you can not write functions?
@Puppy It was not "over not providing hot food". You've been brainwashed by a lazy mainstream media.
can anyone think of a case where "y" is a vowel in the beginning of a word?
you
it's not a vowel there...
is it?
user1804599
21:02
that's a consonant you idiot
is it?
user1804599
@Blob Yggdrasil.
:|
is it
@райтфолд wtf is that
user1804599
21:03
It's a tree.
user1804599
Look it up.
ok, fuck this. always consonant.
it isn't always a consonant
I just don't get why it has to be in the beginning
21:06
@Sehe it's not a duplicate at all.. — Erowlin 5 hours ago
Boy. I took an awful lot of time "justifying" to some dismissive twat(s?) that indeed the linked dupe answers the OPs question
0
A: Using Dijkstra algorithm on a c++ boost graph with a vector of weights on each edge

seheSince it's apparently not immediately clear that this question is answered in the other answer, I'll explain. All you really need is a custom weight_map parameter that is "stateful" and can select a certain value for a given date. You can make this as complicated as you wish ¹, so you could eve...

there are others but they're crap
Complete with moving images. /cc @Blob ^ firmly in the "wokay let's do this" department o.O
user1804599
@Blob Yttria-stabilized zirconia
@райтфолд nice
@райтфолд thanks I guess :S I really don't get why people don't see the dupe answers that. If it doesn't "look" the same (in this case "Erm. I don't see Dijkstra anywhere in that linked dupe") people get uppity and entitled.
user1804599
I know nothing about Dijkstra but the answer is shiny.
user1804599
21:10
And the picture reminded me of Markov chains.
@sehe i'll get banned if you continue this
@Erowlin Anyhow, to make it more obvious how the question was related, I've proceded to explain that in an answer that ought to be comprehensive. May I ask what made you so confident to say it wasn't a duplicate? (If I had to guess it was the absense of the word "dijkstra"?). — sehe 15 secs ago
@Blob I don't get that
@sehe i rarely +vote. it's pretty suspicious
Oh. Don't upvote then!
I felt appreciated enough by your feedback in the lounge (didn't think you upvoted the other one either for that matter)
@LightnessRacesinOrbit Hey I know george brown college
21:15
@Erowlin Anyhow, to make it more obvious how the question was related, I've proceded to explain that in an answer that ought to be comprehensive. May I ask what made you so confident to say it wasn't a duplicate? (If I had to guess it was the absense of the word "dijkstra"?). — sehe 2 mins ago
There. I'll leave for today. Night all
@Pris Do you know why the commenters on the imgur thread are going on about a "TCC"?
user1804599
@sehe See you in a few minutes.
@LightnessRacesinOrbit "TTC" -- toronto transit commission, that ad is from a TTC bus stop
@Pris aha!!!
ty
although cut it out with the comma abuse
yeahhhh
are we posting funny images
i never got this one
Maybe one of you can explain the C++ one
21:22
@Pris Apparently not
@Pris It described C++ before move semantics.
Is this interesting?
2
A: Double closing angle brackets (>>) generate syntax error in SPECIFIC case

πάντα ῥεῖYou have used a pre c++11 standard compiler. The older standard had a problem letting the parser disambiguate a pair of closing angle brackets >> used in a nested template type specifier, from the operator>>(). Thus you had to write a space between them. The samples like >>> or >>* are falling u...

@Blob Yeti
21:22
@CatPlusPlus You were too fast ....
@milleniumbug Yeah but you had references and pointers before that. 'creating copies' wasn't exactly something that defined the language was it?
they should have made a template joke
2
@πάνταῥεῖ now for added fun, make that operator>> a template, and call it explicitly :p
@Pris Yes, it often was.
theres no way to like... pull out captured stuff out of a lambda is there
user1804599
The only good part of /g/ is Gentoo.
user1804599
> The /g/ Wiki:
http://wiki.installgentoo.com/
user1804599
> For tech support/issues with computers: duckduckgo.com (i.e., fucking google it)
user1804599
lol
21:45
@райтфолд I use DuckDuckGo
user1804599
Last time I used it it was DuckDuckSlow.
user1804599
It took like, over half a second to load the fucking results.
user1804599
Maybe they fixed that bug by now.
user1804599
@Borgleader As long as they're white I'm fine with it.
@Borgleader I thought Intel dropped that idea.
user1804599
21:55
What's the opposite of initialisation?
user1804599
I don't like DEINIT.
Internally a compiler turns a lambda into a functor right? And it probably stores the things you capture as members of this functor. Is it weird to want a way to access the captured things from outside the lambda/?
@Pris arguably it is one (template instantiations leaf to copying the code, conceptually. So in the case of the paper they defined a generic paper and instantiated it a zillion times? )
user1804599
And the thesaurus lists no antonyms.
user1804599
@Pris Yes.
user1804599
21:58
How about $x .= f(1, 2) <=> $x = f($x, 1, 2).
Yhello

« first day (1626 days earlier)      last day (3547 days later) »