« first day (509 days earlier)      last day (4665 days later) » 

04:13
@MooingDuck I've spent two hours designing bedrooms in a Quickfort spreadsheet recently.
Haha, that dehydrated loafer did come back as a ghost.
did anyone buy an ipad 3?
0
Q: Is there a way to check if a variable is a whole number? C++

user1247509I need to check if a variable is a whole number, say I have the code: int foobar = 3; //Pseudocode if (foobar == whole) cout << "It's whole"; else cout << "Not whole"; How would I do this?

facepalm
I don't think I've bought a single Apple product in my life
Me neither! highfive
04:24
Yeah! highfive
I kinda fail to see the point of tablets, if you're not drawing or stuff.
Or maybe I'm too old.
@CatPlusPlus Apps!
I thought that for a long time cause I had an ipod touch, but once you actually use them they are pretty cool
If we only had something that isn't 8" flat screen to run apps. We should call 'em computers.
haha yeah I dont like apples desktop move to try and make Mac OS like the phones
Mac OS lion sucks
04:28
Any edition of OSX sucks.
> I think C++ is outdated for standard desktop applications because the amount of time it takes to do things that are easy in other languages (C#, Java).
quoting my profile page there?
I like the implication that command-line tools always require extremely high performance.
@CatPlusPlus What?
Well, read on.
04:34
Not sure what you're talking about
> it is a strong option for applications that require extremely high performance such as command line tools or games
Anyway, it somehow always takes me 10 times as long to do anything in Java than C++.
But the result is more modern.
It takes only a single line to do it in language foo
Maybe because the language is so damn primitive it might as well be called "C 2.0, with poorly done generics and almost-real-classes".
@Pubby It takes only a single column to do it in language bar.
04:37
Expressiveness of a language is a real thing.
Let that sink in for a moment.
It's not easily quantifiable, but it's visible.
And in Java, it's just terribad.
@RMartinhoFernandes In language Qux it's actually doable using negative characters - literally deleting part of your hard drive.
GHC did that, once.
Frak. How can I convince dorfs to dig a hole without trapping themselves on the other side?
04:39
Fun: compiler edition.
@RMartinhoFernandes Set the other side to restricted?
@CatPlusPlus You could say 'GHC did that' about anything and I would believe you
@CatPlusPlus Oh. Good idea.
@CatPlusPlus Didn't work.
What about putting a construction? Suspending it if needed.
@LucDanton That's what I do for walls. But doesn't seem to work for deconstructing floors.
I'm tempted to leave the damn kid stranded.
It's not like it's going to be a big dent in the current morale.
There are so many more ppl here than in the Java room
04:48
Argh, I'm digging an alternative exit route.
@math4tots Not necessarily - most of us are animals, robots, or other non-humans.
Not sure if anime characters are considered humans
@Pubby lol.
How do training weapons 'work'? Will the dorfs automatically pick them up for training or do I have to micromanage that?
From what I recall, they will pick them up automatically, although I recall them also picking up steel weapons and killing eachother
Yeah, that's what I'm afraid of. Not that I have steel.
04:53
Well you could do that until one dwarf is left. Like some sick tournament to yield the ultimate dwarf fighter
A fair point.
@LucDanton They used to. But now they know how to spar, so mine train with steel.
What? So do I forget about training weapons unless I want to build a trap for training?
That's what I do.
Oh okay.
04:56
They hit each other "lightly tapping the target".
AFAIR training weapons are more or less useless now.
Cheap weapons for traps.
Going to make a squad of expendable copper speardwarves for kicks.
Man, extracting a single adamantine strand takes forever.
05:06
Macaques are stealing socks again. Let's call the military.
They're doing you a favour.
And now I ran out of coffins.
05:41
How do I decorate a large gem? Is it a craft?
Oooh, native silver.
who is this 'Kony' guy everyone seems to hate?
I've never even heard of him.
@LucDanton I don't think you can.
I had one with spikes. Maybe 'decorate' wasn't the right word.
Native gold statue of a leech? Why.
> This is an exceptional large yellow spessartine. This object menaces with spikes of exceptionally worked native gold.
Decorate with rock?
Yeah, but I was wondering whether it was a craft or a furniture. On second thought, that's a silly thing to wonder.
05:54
I think I only have enough adamantine to equip one dwarf.
Breastplate uses 9 pieces.
Motherfucking bismuthinite.
I like it when it's late and I can spam stupid images without annoying people.
The "real" test is if you can slip in a gif for a few hours...
They're dying faster than my mason can make coffins.
I hope one day options such as "Make cloth article" are available. Especially if/when clothing becomes more important.
06:09
@LucDanton Erm, make a clothier's workshop?
And go over each individual cloth piece ('robe', 'shirt', 'sock') just like for armor except it's made of worthless stuff? I think not.
Ah, I see what you mean.
I import silk and export silk dresses.
One more legendary pump operator!
I export native gold statues and import whatever I please.
And then I sew it over my leftover gold statues.
06:12
My dorfs wear adamantine.
Well, one does.
That's nice.
Btw how old is your fortress and what's your exported wealth?
Six years, exported ~30k.
Created almost 2M.
So, I was running low on food. The elves came and brought lots. But I would have to select it 5 items at a time, and that's tedious. So I butchered them.
The caged animals that you conveniently bought without selecting anything right?
Welp I guess that works too.
06:34
3rd legendary pumper.
06:48
lol, the ghost is overseeing a child taken by a fey mood.
You still haven't put it to rest?
Blame my dorfs.
I guess it's not an issue if not violent.
I'mma try a memorial.
1M+ created wealth, 143k exported, starting my 4th year.
07:15
Woo, a minotaur showed up. Time to test my soldiers.
I'm confused by that memorial/slab thing.
Okay, got it.
For obvious reasons that can't get done through the manager menu.
You make a slab (masonry), then engrave (crafts workshop), and place.
@LucDanton Ah.
Aw, can't see the value or the description of the slab once placed.
Only worth 1580, disappointing. Even though it's an exceptional native gold slab encircled with bands of superior quality octagon cut schorls!
07:28
Damn. Swordsdwarf entered a tantrum in the middle of the battle.
Send the mayor to reason with him.
Sigh. I liked the conversation better when it concerned gastronomics and reproductive organs
Game crashed.
@sehe Hi.
That's probably good news /
for the Portugese economy
07:33
@RMartinhoFernandes Please link to a message. "What" out of context takes way too many CPU brain cycles to process and the ambiguity simply cannot be resolved.
@LucDanton @RMartinhoFernandes I noticed the discussion about C# yield return. I don't know if someone mentioned it, but Boost Asio comes with some pretty powerful Stackless Coroutines which introduces exactly this kind of yield syntax/semantics in C++
Lol no. That was for fun.
@LucDanton There is also Boost Coroutines proposal (crystalclearsoftware.com/soc/coroutine) but these are stackful
@LucDanton Morning, by the way
Boost.Coroutine is orphaned and we have to wait until Boost.Context is reused by someone to get a higher-level construct :(
Or the bold can dive right into Boost.Context.
07:52
@LucDanton Or just use Asio coroutines
Asio does not come with coroutines.
@LucDanton ?! see the link
> $ grep coro -Ri boost/asio/
The link is the personal blog of the author. That's all. He wanted to write something funny and insightful at the same time.
It might be included in the documentation as an example however.
@LucDanton nope. See think-async.com/asio/boost_asio_1_5_3/doc/html/boost_asio/… (Http Server 4 - sample): 'A single-threaded HTTP server implemented using stackless coroutines.'
> sample
51 secs ago, by Luc Danton
It might be included in the documentation as an example however.
08:00
@LucDanton What's that? Some rhetoric to downplay it, AFAICT
Also, he presented it (at some length) in BoostCon 2001 (raw.github.com/boostcon/2011_presentations/master/thu/…) IIRC
What do I include to get those Asio coroutines?
Found the video link for that presentation Why C++0x is the Awesomest Language for Network Programming
@LucDanton: mmmm. It seems, indeed, that 'coroutine.hpp', 'yield.hpp' and 'unyield.hpp' are part of the sample, indeed. It is also used in the test suite (for the latency test).
I wonder why Chris Kohlhoff spends so much time of his PR on promoting a feature that isn't technically part of Boost Asio then...
Anyways, I have to go to work. Thanks and I'll be lurking
08:09
In any case stackless coroutines are not worth having. But it took me that example to get that insight.
@LucDanton Call me naive, but I tend to believe BoostCon is about the libraries, not about toy projects. See my last question: chat.stackoverflow.com/transcript/message/2872409#2872409
My only problem with that is
"I wonder if feature X is present in library L, should I:
- write a program that attempts to use that feature
@LucDanton In Chris's own words: blog.think-async.com/2009/08/…
- read the documentation
The proposed boost::coroutine library provides stackful coroutines (vs the stackless ones I showed).

The advantage of having a stack is that you can yield from a nested function, which means you can layer non-async-aware APIs (e.g. a boost.spirit parser) over the top of async calls.

However, one of the disadvantages is that you have a stack :)

You can't transparently implement composed operations using stackful coroutines because you have to pass the coroutine's "self" reference to the function. (Well actually you could do it by creating a new coroutine stack for each composed operation,
08:10
- or read/watch related-ish sort of stuff"
You chose poorly.
@LucDanton Not really. Your bullets are a logical response to a presupposed question: "I wonder if feature X is present in library L".
I never had that question. I knew the library had the feature because I'd seen it presented, demoed, used in the samples for over a year.
I do admit I judged it wrong, but a part of it has to go with the sender of the message :)
Blame the messenger.
Yes, blame me. Do that.
@LucDanton Are you a messenger? I was talking about Chris Kohlhoff, obviously
My message was simultaneous with Martinho's.
08:15
@LucDanton That changes it? I still don't blame you. Not even simultaneously :)
@LucDanton But I won!
@RMartinhoFernandes Depends on the observer.
@RMartinhoFernandes Meh, you always do, so not newsworthy
Anyways, thanks again for punching my dreams about stackless coroutines :) and have a nice day. Afk
Nah, don't worry, they're not worth having. Steal his implementation if you want to have fun once or twice.
@LucDanton Sure will do
08:21
@sehe what do you mean
morning all
sbi
sbi
08:37
Good morning from London.
Hi!
How's the weather?
ahh, so it was the London Museums you where exploring
sbi
sbi
leans forward to look out the window
@RMartinhoFernandes Cloudy.
Well, I could have guessed that without making the effort of leaning forward.
yeah, the British Natural History is awesome
sbi
sbi
@thecoshman Actually I was just spending five hours at the NHM. An I haven't seen half of it.
08:40
@sbi after another 15 hours, you still won't have
it's one of the few things / places that truly deserve the description awesome
sbi
sbi
@thecoshman If you like it, you should see the Berlin Naturkundemuseum. That's wonderful, too.
@sbi what a moustache!
it's ok
sbi
sbi
@thecoshman Once we're at awesome, might I point out the JuraScope? It's a kind of digital telescopes in the dino hall, which you can point at dinos, and which will then transform them... youtube.com/watch?v=61XSDdpjirQ
@sbi :O
@sbi Have you seen Dippy?
sbi
sbi
08:46
@RMartinhoFernandes Yeah, I had a brief look at it. But if you had a look at the video I linked to above, you'll understand that I wasn't that excited about it.
Dippy?
@thecoshman A large diplodocus skeleton replica.
sbi
sbi
@thecoshman lmgtfy
oh yeah, that's what they called it :P
hello, world. Good morning-noon-afternoon thing.
08:50
@sbi Well, Dippy is famous. Those other ones not so much.
sbi
sbi
@RMartinhoFernandes The Brachiosaurus brancai in Berlin is famous for being the biggest dino skeleton being on display. Many of the "small ones" you see hanging around it are almost as big as Dippy. :) And on the wall beside it is, among many others, the famous original(!) archaeopteri fossil.
@StackedCrooked Awesome, they left the sneaky "i" from my un. lol
@Mysticial They always do.
@sbi meh, I think the robotic t-rex was cooler
sbi
sbi
08:55
@thecoshman Yeah, that was pretty cool.
Indeed it was :D
sbi
sbi
Although I ran from it rather fast, because all the kids hanging around it were screaming in a much more scary way than the thing itself.
next time I head over, I want to go to the other history musem... the one that is not about natural history
luckily, when me and my misses went, it was relatively kid free
@StackedCrooked Yeah, that's what happens when something makes front-page of a major sub-reddit. They get twittered, blogged, etc...
sbi
sbi
@thecoshman Maybe I was a bit too late for that. What with me having to clear the airport, get to Victoria, leaving the big bag there, and unciphing the London public transport system far enough to take me to Kensington, it was 10am before I arrived. That might have been the ideal time for school classes to arrive, too.
09:01
yeah, not the best timing. and fyi 'unciphing' is not the word you are looking for. I believe you mean 'deciphering'
sbi
sbi
@thecoshman Ah, that's why FF frowned its red eyebrows at me.
I say that under the assumption that if I where to be attempting to learn German, you would do the same for me
I came across this link a week ago: http://rcl-rs-vvg.blogspot.com/2012/02/denormal-floats-across-architectures.html

Someone really went in depth after reading that Q/A.
Awesome! Someone just gave my vote #40 on my DCE answer.
sbi
sbi
@thecoshman I'd be merciless. :)
@sbi eyebrows... I didn't think Germans looked that different :S
@sbi I'd be the perfect student :P
sbi
sbi
09:04
@thecoshman What?
@sbi I assume you where referring to the red underline that misspelt words get
sbi
sbi
> I just had a really great thought. But it rolled under the fridge. — Patrick Star
@thecoshman Yeah, I did. But I didn't get your remark about it.
@sbi that's a follow :D
@sbi I wouldn't describe my eyebrows as underneath my face
sbi
sbi
@thecoshman Yeah, that is an awesome funny remark.
@thecoshman Well, this is FF for you. Not a German product, mind you.
that underlining is more like a fiery red beard of a digrunteled (sp?) scot
sbi
sbi
09:07
@thecoshman FF's beard says it's "disgruntled".
sbi
sbi
Anyway, I like the frowned eyebrows metaphor better.
09:20
I think it safer for every one if we enforce the notion that the red line is the beard of angry scot about to burst through your screen
is there a fucking way to install visual studio on another disk ?
@thecoshman reminds me of Barbara Liskov's name for a toString() function, namely unparse() :-)
&rsquo;?
HTML much?
fuck, I fucking think there just fucking might be a fucking way to fucking do what you fucking want, but fucked if I'm fucking going to fucking answer a fucking question that fucking introduces it fucking self with fuck
3
09:26
xhtml, but yes.
Can somebody answer to my question ?
sbi
sbi
@ddacot Yes.
@ddacot I just did.
can you help me to do that too?
please , i tryied but fuck, it didn't work.
did my response not count as an answer? oh well
@thecoshman i think that's a real motherfucking answer :-)
09:28
@CheersandhthAlf that answer was a mindfuck ))
@CheersandhthAlf I aim to please :¬)
What the frak is going on?
hey sbi.
Time for me to be unawake.
sbi
sbi
09:31
Well, time for me to disentangle myself from my computer and get out. See ya'll, guys!
Engrish all the items
09:50
@thecoshman fuck that's awesome :)
@TonyTheLion your welcome
and believe it or not, I'm not in a bad mood :D
@ddacot good morning to you too, I guess
@ddacot Also, mind changing your gravatar? Java is considered offensive in this room
10 hours ago, by Mysticial
We're programmers. We don't know any math.
guys, do you have a link to the standard handy?
^^ Irony in distilled form, considering who posted it
10:00
There's one in my profile page.
@RMartinhoFernandes thanks man
I seriously wonder if it's possible to write a template metafunction that randomly samples the poisson distribution
key word being "randomly"
you'd need a compile-time source of entropy
No side-effects at compile-time.
first, define your criteria for random
@kmore isn't there a macro inserting the build timestamp?
10:07
Oh, __TIME__
What format has that?
@jalf I'm looking now
Well-defined "hh:mm:ss".
Parsing can be done with a constexpr function.
Of course, seconds aren't exactly the best resolution, but... as long as building takes more than a second it should be ok :D
@RMartinhoFernandes both __DATE__ and __TIME__ might work, now that constexpr exists
constexpr int get_seed(const char* time = __TIME__, int multiplier = 3600) {
    return *time? (((time[0]-'0') * 10 + (time[1]-'0')) * multiplier) + get_seed(time+3, multiplier/60): 0;
}
10:13
you could do some wonderfully evil things with this :)
@RMartinhoFernandes that's awesome, thank you
I think that will one out of bounds at the end, so it may need one more condition.
Yep, goes out-of-bounds.
oh god, putting random values into the compile process is surely just asking for trouble... or trolling o_0
@thecoshman haha, it's 5am on a thursday, and I'm trying to write a random forest that trains at compile time
just for fun
Changing time+3 to time+2+(multiplier!=60) works. But simply return time[0]*36000 + time[1]*3600 + time[3]*600 + time[4]*60 + time[6]*10 + time[7]; is probably better.
10:21
@kmore "a random forest that trains at compile time" o_0 what's that :S
@thecoshman a probabilistic classifier that creates an ensemble of random trees (decision trees with information gain determined on a random subset of features)
yes... I know some of those words
Well, the tricky part is done. Now all you need to build is a compile-time PRNG.
@RMartinhoFernandes which should be relatively straight-forward, since it's possible to write a compile-time linear congruential generator
With constexpr it should be super easy.
10:32
yup
10:51
won't that undo any optimizations a runtime rng has? The rng code would run in the compiler, I'd say that'd be a bit inefficient
@rubenvb it means I could train the random forest at compile time and test it at run time
whether that translates to performance gains is left to be seen
is the sort of training that you want to continual improve?
@thecoshman not at all... although, I suppose I could by generating & including multiple pre-compiled headers
well then, as you where
I just don't see what is wrong with keeping the training data in a data file
and training at runtime?
10:58
yeah, train once at run time, save the results
next run time, just load it in
please tell me you had actually thought about this and for what ever reason decided against it
@thecoshman haha, of course I had. there's nothing intrinsically wrong about that particular approach, but I want to see whether compile-time training translates into run-time efficiency boosts, since it's the exact same framework
the only advantage to compile training is that the training data is IN the program
it saves you having to load that data from a * separate* file, but you still have the data stored on disk and have to load it in
personally, I think you are doing something very stupid
@thecoshman You're forgetting there are compiler optimizations involved.
@thecoshman the difference is that the training data is in the program vs in memory
The compiler knows more about the program, so it can optimize more.
11:05
no no no
we are talking about the performance gain once we have the training data
it dose not matter how you generate it, the performance WITH it will be the same
@thecoshman for batch algorithms that consider the full training set each time a sample is encountered, there's a clear efficiency gain by effectively hard-coding the values in the program (or rather, having the compiler do it for you...which is the point of metaprogramming)
@thecoshman A generic program that loads arbitrary data and runs depending on it will not be as fast as one designed to run specifically with a predetermined set of data.
AFAIK there is a hard coded value (even TMP generated) has no significant speed gain over just loading in the value at run time
Of course, it all depends on how well the compiler does its job.
@RMartinhoFernandes ah yes, true here.
11:08
You can hardcode the precalculated data...
well, I suppose for science, you must continue and compare the speed differences
which I suspect will be very slim
then there'd be no "loading at runtime"
@rubenvb That's exactly the point of TMPing it in.
@rubenvb but why calculate it by hand when you have TMP :P
besides, I didn't even get to the part about how the present solution abuses dynamic polymorphism
11:11
how much training data are we talking about?
a few values here and there, or gigabytes of data?
@thecoshman less than a megabyte of data
still, I would be inclined to go for data file. Allows you to swap out the training data at will
and personally, I don't think you can really call it training data if it is just pre-set values
all training data is pre-set values
@thecoshman Dynamic libraries!
11:17
@RMartinhoFernandes are you suggesting a different dynamic lib for each set of training data...
DYNAMICALLY LINK ALL THE THINGS!
@RMartinhoFernandes let me just find my extra large slapping paddle
oh, just noticed the room topic, love it :D
2
Q: How do I write a proto transform templated by a function?

Irit KatrielI would like to reuse code by writing a proto transform which is templated by a function pointer: template <typename Ret, typename A0, typename A1, Ret func(A0,A1)> struct apply_func : proto::callable { // Do something with func }; However, the function itself is polymorphic so I do no...

looks interesting. Unfortunately my Proto experience is too shallow. Perhaps the robot or Luc?
(PS ^^ Bounty)
Sorry, no crazy Boost libs for me.
11:29
@Mysticial Ah, I hadn't noticed the 'i' myself.
11:39
any one have much experience with bugzilla
anyone know wtf Apple's "quad core graphics" means? O.o
@jalf that they can charge an extra $250
@jalf probably Intel integrated GPU in quad core CPU graphics
QUAD-CORE ALL THE THINGS!
@thecoshman yeah, I understand that part
@rubenvb it's something they've started saying about ipad and iphone. So not Intel
11:44
ALL THE THINGS ALL THE THINGS
@jalf oh, then it's Nvidia's tegra 3 kind of thing. Wasn't that a quad core chip?
there is no such thing as a quadcore graphics
I don't think it's that
it refers specifically to the graphics chip
@bamboon That's why I want to know wtf they mean by it
it makes no sense
it's probably just marketing bull crap
tegra for example has 24 cores I think
but you can't compare them
they probably mean the SOC which has 4 CPU cores
11:52
@thecoshman yeah, but bull crap based on some arbitrary incidental fact
I mean, there's 4 of something, which leads them to say "hey, our GPU is quadcore"
I seriously wish constexpr arrived a few years ago
@bamboon no, because the new ipad, for example, has a dualcore CPU, but quadcore graphics, according to their specs/marketing
@jalf "Our GPU has four corners!"
@jalf indeed strange though
Lunch time
you must all go get lunch now

« first day (509 days earlier)      last day (4665 days later) »