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

12:00 AM
We're programmers. We don't know any math.
2
 
It probably depends on the domain...
 
Xeo
@Shmoopy Question: What got you to ask here?
 
What should we do to people that don't say the magic words before entering?
 
@Xeo His question has nothing to do with C++, so it seems on-topic to me
3
 
12:02 AM
@Shmoopy Find someone that can review, buy them rounds.
 
Domain is computer science. More specifically: approximation algorithm.
 
@Shmoopy it is approximately correct
 
@RMartinhoFernandes Thanks!
 
Maybe someone there is willing to help.
 
Xeo
12:04 AM
I have the sudden urge to rename the room to "Lounge<DontComeHereJustBecauseWeAreTheOnlyActiveRoom>"
 
@Xeo Well, he came in asking for directions, not for a review. I don't think that's as bad as the people that ask to solve their PHP problem.
 
Xeo
Still :P
 
room topic changed to Lounge<C++>: Do not come here just because your target room is inactive and we are active. [c++] [c++11] [c++-faq]
 
@DeadMG instead, come here because we don't talk about C++
 
Xeo
We clearly need two topics for this room. Anyone dare make a ?
 
12:06 AM
I'd expend forever listing the numerous reasons to come here
 
@Xeo lol.
"Please allow the Lounge<C++> to have two topics"
 
@RMartinhoFernandes unneeded for other rooms, just Lounge<C++>
 
"We're one of four halves of the deletionism problem, and that makes us important enough to have two topics (just use the same maths as what led to four halves)"
 
Xeo
We clearly don't know math.
 
we do, we just don't like it
 
12:08 AM
You guys. Math is fine.
 
woo! My code compiles! And only two warnings with GCC! And they're both in code that cannot execute!
 
Xeo
@MooingDuck "code unreachable"? :P
 
Come on GCC. Speed up that build. I want to play DF.
 
@Xeo well one of them is if (integral_constant >= INT_MAX/2) x /= (integral_constant/10) and it's giving me "potential divide by zero"
 
"integeral"
 
12:11 AM
@RMartinhoFernandes I'm a programmer. Don't expect me to math or spell
 
Xeo
An constant inside an if should give another warning - "conditional expression is constant"
 
integeral constant <- missing underscore?
@MooingDuck I expect you to be pedantically careful about your mathing and spelling!
 
@RMartinhoFernandes it's psudocode
 
Xeo
@RMartinhoFernandes Overloaded operator" "
 
@rmartinho pass -fdfto -tune=df
 
12:12 AM
@MooingDuck "pseudocode" :P
 
@RMartinhoFernandes that's why we have compilers, for catching spelling mistakes
@RMartinhoFernandes seriously? wow. I fail today
 
lol
@sehe lol
lol
 
oh, both my "div0" warnings are in that if block. perfect!
 
@sehe dfto?
 
Oh god, the plink is way to loud on my phone, at least for bedroom purposes
 
12:14 AM
DF-time optimization, I suppose.
"bedroom purposes"?
Hmm.
 
@sehe you're using SO chat from your phone??
 
@je4d I have before
 
@MooingDuck android or apple?
 
And typing isn't exactly comfortable either so I'm calling it a day (@je4d that was a (bad) joke))
 
@RMartinhoFernandes what are you building that is a prereq for playing DF... oh right. Processor intensive.
 
12:16 AM
Night
 
If it plinks, I suppose no Apple (it's Flash)
@MooingDuck GCC.
 
@je4d droid
 
nn @sehe
 
SSsssh!
 
A GCC build and DF process can't coexist on my system.
 
12:17 AM
@sehe I'm suddenly reminded of the script you had to plink whatshisname every half hour that you were sleeping
 
@RMartinhoFernandes yeah, I realized that during the asking of my question :/ DF does not play nice with other processor intensive programs
 
Hell, a single one of them already pushes things to the limit.
 
@RMartinhoFernandes well DF doesn't have a cap AFAIK for the processor does it?
 
Ftr that was once in exactly 35 minutes. I should post it one of these days, in all it's simplistic glory
 
12:19 AM
@MooingDuck You can cap the FPS. But I doubt that helps since it's already running at 30FPS at times.
 
@sehe its simplistic glory
 
ah, DF does have a cap: [FPS_CAP:100] (where [G_FPS_CAP:50] is graphics)
 
android, of course. Hackers will be hackers
 
And I still haven't turned on the pump stack. I suspect that will bump me down to single-digit FPS.
 
I plead phone-impediments @je4d
 
12:21 AM
@sehe fair enough... autocorrect breaks my grammar all the time
 
Ugh, autocorrect.
Real men stand by their mistakes.
 
@RMartinhoFernandes I enable autocorrect so that I can blame it for things that were my fault
 
I like Steve Oualline's approach of "What's wrong with the spelling of 'dog'?" "It's written 'cat'"
 
hmm, looking at stonesense I wonder, would it be possible to make a program that... redirected... DF IO to it, and use that to render stonesense with an actual UI?
 
@MooingDuck Maybe. With even more boatloads of hackery.
You can always wait until 2032, when Toady has everything else done and finally starts working on a usable UI.
 
12:25 AM
how did it become 25 past midnight so quickly?
it's time I slept.. nn all
 
@RMartinhoFernandes According to my calculations, DF v1.0 should be roughly 15-Dec-22
(roughly 12:42a)
(plus or minus a lot)
 
If Toady got 34% done in 10 years, I suppose we still have ~20 years ahead.
 
from the wiki: Version 0.34.04 Release date(s) 8 August 2006 (initial)
29 February 2012 (current)
 
(Development started in 2002, not 2006)
 
12:32 AM
@RMartinhoFernandes oooh
@RMartinhoFernandes 6/7/2030 18:21
 
"System requirements: Linux, Windows XP or higher, Mac OS X 10.3+, 100 MB hard drive space, 512 MB RAM, 3D accelerator card with OpenGL support"
 
Pocket world, 2x2 embark, 50 dorf cap?
 
I was wondering how one saves
hmm, wonder what happens if you set the max population for like.... 2
 
No migrants show up.
 
12:36 AM
you still probably start with 7 though
 
Xeo
@RMartinhoFernandes That actually makes some sense now.
 
Xeo
After reading this answer and the linked article.
 
Ah, Eric Lippert's explanation! I have that on my favourites and forgot to mention it.
 
Xeo
"Monad" just kinda implies a single thing.
 
12:46 AM
In C# you can appropriate LINQ syntax as a substitute for Haskell's do-notation, but I don't think there's any C++ syntax you can abuse for that.
 
Mmmh is yield return foo; how C# yields?
 
@LucDanton Yes.
Maybe nested range-fors.
 
Are there other forms of yield?
@RMartinhoFernandes lol.
 
yield break ends the sequence.
 
Aaaaand yield foo; would have been impossible to parse or what.
 
12:47 AM
Well, it would require a new keyword, which never happened.
Everything after v1 was contextual.
 
I see.
Patching languages feels so dirty.
 
Which means that class var {} can easily wreak havoc.
(var is C#'s auto, if there's no type named var in scope)
But you probably deserve it if you do that.
 
Xeo
@RMartinhoFernandes So what does the do-notation do?
 
@Xeo It's syntactic sugar for bind.
do x <- foo
   y <- bar
   return x + y
// is sugar for
foo >>= (\x -> bar >>= (\y -> return x + y))
// in C#, abusing LINQ
from x in foo
from y in bar
select x + y;
 
Xeo
So >>= is bind?
 
12:52 AM
Oh, you didn't read YCHIM till the end?
 
Xeo
Nope
 
Yes, x >>= f is bind f x.
(The former is actual Haskell, the latter was made for the article)
 
for(auto&& x: foo) for(auto&& y: bar) quux(x, y); seem really wrong.
 
@LucDanton And won't work for all monads, I think.
 
@RMartinhoFernandes I agree, needs to access the final expression (or its result, or get a lazy functor for it, or...). By then it's too late with range-for.
I still have no idea how to read >> or >>= out loud by the way.
Is one of them 'shove'?
 
12:55 AM
"sequence" and "bind".
 
That's ambiguous with sequence!
 
Yeah, I know.
sequence_ is foldr (>>) (return ()), so they're related.
 
I find the name bind to be a bit non-descriptive tbh.
 
Xeo
Okay... to reiterate. bind takes a value out of a monad, applies a function to it, and repacks it in a monad, all according to the monads inner working rules?
 
@LucDanton With that C# syntax above you can get either a function, or an AST, so it's probably even more powerful.
@Xeo Yes.
 
Xeo
1:00 AM
apply would be a nice name, since I'm distracted by std::bind and parameter binding and stuff...
 
($) is called the application operator though.
 
Xeo
@RMartinhoFernandes Why do both examples seem extremely similar to list comprehension...
 
@LucDanton Well, it's not like return or join are any better.
@Xeo Because list comprehension desugars into do-notation!
 
Xeo
Guessed as much
 
@RMartinhoFernandes I don't mind return and I'm not sure what join is, I haven't reread YCHIM.
 
1:04 AM
join :: Monad m => m (m a) -> m a
 
Oh ya that's not great.
 
I think it's concat for lists.
I think I only use join with the function monad.
Things like square = join (*).
F# calls their monad sugar "computation expressions".
I suppose they didn't want to scare away people with "monad".
But they do call the main operations "Bind" and "Return"
 
(arg1 = foo, arg2 = bar)[arg1 + arg2] btw. Have to do everything with a silly EDSL.
 
And of course simply no convenience gains unless working in a very specific problem domain.
 
Xeo
1:13 AM
Urgh. I kinda understood The Marvels of Monads until it hit the continuation monad...
 
@Xeo That's okay.
Don't worry about that. Really.
 
Uh, is that continuations as a monad?
 
@LucDanton The continuation monad is the mother of all monads.
 
Now that you say it, yes, that makes sense.
Like how you have to lift your 'regular' functions and operators to make sense in a world with continuations, hah.
It's okay, Scheme is dropping continuations.
 
lol
> ‡° ˆ“’S†rop‡Pg …op†c kr% ‡‰ˆXja} zy{@‰üƒ•U f…w n‡ˆS ie…gop“• ™‡ ÄU u t g …kq ”{S S ́ on‡• ‰ f‡P –j o“mve þv§ c ‰ ‡x “e“ –Â’ 4 – o†sj “†r‹ p “È m•˜ ‹ ‚•Š “•†‚†‰ ‚mw ÿ {¥‡ †S ” ™†g r‚m ™‡P nqj‰ ‰ n‡ g ‚qw †en†‡
‚m™”w ™q“”" ¡ ú
‰ jol –jˆ… g k–e† –‘–s– P ‰ ˜¤i‡ úp†mE – ˜ ˜¥¤“†† jl –" ‡® mG † j˜† †“enj¥ S “m‡l S 1 ˆ… •‚qn• ‰ 
sjƒ ́ —† 8 ¤ ˆ•Š– ™o™q‡–h @ d‰ ¤f u “’tg ‰ “‡† S ‚e g †e ˜’– jnj§”{v˜  l ’Šg 8 † j" l km† tu ‚…qg ‰ ‡Š‰ g j j% r“”g 8 ‚…‰ …g †l Õ —j…# n‡ g r ‹ r …t† †q§ E †–¤ †‚q ”m 8 q fq ™•pžu S f†• l j –‚m‰ jnq ™†™…P • Š8 P o‡ c w ”f” l mS ™…‡njsjl ”S ‚—‰ ˆ‰
 
1:23 AM
Okay, in an effort to understand join (*) I just figured out that join = (>>= id). I also see how type-wise 25 is the only possible result for join (*) $ 5 but I still have to grok arrows as a monad. So far I got the feeling that in (->) a b it's all about the b.
 
Great, borken PDF. CAn't copy from it.
@LucDanton Oh, it's not (->) that is a monad.
(->) is an arrow.
The monad is ((->) a)
So, yes, it's all about the b.
 
@RMartinhoFernandes Is that conceptual?
 
What do you mean?
 
undefined :: ((->) Int) is rejected by ghci.
 
Just as undefined :: Maybe is.
 
1:29 AM
Yes, so I'm having trouble understanding "The monad is ((->) a)". E.g. it doesn't mean that there's such a thing as instance Monad ((->) a).
 
Yes, that's exactly what it means.
 
What's that kind of thing called? Up to now I've always seen parametric types/typeclasses as a 'whole'.
Just noticed that (Either e) is also an instance.
 
It's a type constructor.
It has kind * -> *.
While Int has kind *.
(->) has kind * -> * -> *.
 
Thanks.
Those are higher kinds than * aren't they?
 
Yes.
(Latest GHC has some form of polymorphism at level now, apparently. I'm a bit afraid of investigating)
 
1:32 AM
Where do parametric stuff come into this? On the side? I.e. a has kind * too?
And is it okay to call (Either e) a section of the type constructor Either? Hah, not expecting much from this.
 
It's inferred from usage. If you write f :: m a -> n a b, then you get a::*, b::*, m :: * -> *, n :: * -> * ->*.
@LucDanton No, that's just partial application.
There are no sections at that level, i.e. (a ->) is not valid.
 
Okay.
I don't think I want to investigate ((->) a) in code tbh.
 
@RMartinhoFernandes: Thought I'd let you know, my friends and I started our own session map, and they elected me to do year one because I "make the most stable fortresses". :(
 
lol
@MooingDuck hehe.
 
@MooingDuck Survive off the land with no farm plots for the lulz.
 
1:36 AM
@LucDanton Plant gathering + dig down fast to the first cavern (~10-30 deep) + dig out very very large room, muddy it out.
 
Also hunting. How could that go wrong?
 
Depends on the location. Some embarks have game that fights back.
 
No way.
 
@RMartinhoFernandes I think he was being sarcastic
 
1:39 AM
s/think/hope
 
:S
Hunt with catapults!
 
How does that work by the way? Had my military mop off some monkeys, yet no monkey stew for dinner. Special rules for the military? Do I have to check the orders?
 
@RMartinhoFernandes that's... surprisingly effective as long as you don't also have hunters
 
Catapults suck btw. I was planning on placing a few atop my walls, but I discovered they don't cause damage if the bullets fall on different Z-levels.
 
@RMartinhoFernandes catapults are freaking amazing, they don't hurt friendlies in the way. You just have to know how to use them
 
1:41 AM
@LucDanton Oh. You need to a corpse stockpile near the butcher shop and set the dorfs to gather refuse from outside (press o).
 
@RMartinhoFernandes That's been here for a long time, too.
 
Versions aren't decimal numbers, so 0.34 != 34% done.
 
@LucDanton things involving military tend to auto mark as "forbidden" because it's considered unsafe
 
@RMartinhoFernandes It's okay, I have too much food. But for the next fortress or in a pinch or something.
 
@CatPlusPlus we were making that assumption that in his case it is
(roughly)
 
1:42 AM
@MooingDuck Ah I see. I do tend to reclaim after a raid, in the hopes that for once I won't get some socks out of the deal.
 
Have you ever seen the plans page?
 
Last time was troll fur socks.
 
@CatPlusPlus I just glanced at it now, I'm hoping he's removed stuff that's complete
 
@CatPlusPlus Yes, it is. I have Toady on record mentioning it.
(Well, I don't have a link on hand, but it's somewhere in the forums.)
Why do you think it jumped from 0.23 to 0.28 to 0.31 to 0.34 without intervening 0.24, 0.25, etc?
 
Internal versions that were released in between scheduled releases. Well, that's not how he works, but it could.
 
@RMartinhoFernandes "when we went to version 0.31 and then we started making all those changes and then we did all the stuff like the first night creatures for adventure mode, and the version number just kept going 31.18, 31.19, 31.20, and we never increased it because we had moved away from that core one hundred system and didn't really replace it with something else so..." bay12games.com/media/df_talk_14_transcript.html
"But yeah, if we're at 0.33 or 0.34 that sounds about right for next time. And that's significant, because we'd be crossing a third of the way through after nine years..." same link :(
 
See, I was right and the Cat wrong. I win, I'm awesome, and stop pissing me off.
 
@CatPlusPlus dwarffortresswiki.org/index.php/Version_number and dwarffortresswiki.org/index.php/Powergoal, (with it's 100 core goals, 34 of which are done)
 
It's as simple as "I don't really believe it".
 
Are those goals roughly ordered? I.e., are we expecting something next?
 
1:53 AM
@LucDanton no, he switches about depending on how he feels
 
He delineated the next 8 releases here: bay12games.com/dwarves/dev.html
 
Also, I don't really like the amount of Adventure-related goals on the dev page.
 
@LucDanton specifically, the third one is not started
@CatPlusPlus yeah, but he seems to care about adventure mode :(
 
Fix the fucking UI, then play with roguelike bits.
 
And 'fix' should mean 'crowdsource it and focus on what you want to focus on'.
 
1:55 AM
Are there UI improvements planned for next 9 releases? Nooo.
At the very least he should integrate Therapist into the game.
 
2 hours ago, by R. Martinho Fernandes
You can always wait until 2032, when Toady has everything else done and finally starts working on a usable UI.
2030 by Duck's calculations.
 
@CatPlusPlus Counts as crowdsourcing, so I'm up for it.
 
Stockpiles are also messy as heck.
Why are frakking sand bags treated specially?
 
@RMartinhoFernandes they're containers with stuff in them, so they're coded seperately (not a good reason)
 
Trying to run a fortress for the sole benefit of a large class of skilled craftsdwarves and yeah it sucks
New plan is "encrust everything, even the lowly furniture, and see if I care".
 
1:57 AM
@MooingDuck They're in the furniture section but not on the list: there's a special key to select/deselect them.
 
Then peddle the shit to elves or something
 
I keep forgetting to disable sand bags when I make a new furniture pile. End result? Frakking dorfs fill it up with sand bags, and bring my glass industry to a crawl.
And the spice magma must flow, I need those sand bags for pumps.
 
Sand bags for pumps?
Oh, you mean glass pumps.
Right?
 
Sand bag -> green glass -> green glass blocks, corkscrews, pipe -> screw pumps.
@CatPlusPlus Yes.
Glass is basically free and infinite once you have magma furnaces. And it's magma safe. Somehow.
 
Yeah, but then all you get is glass.
Rock is basically free and infinite too but nobody makes a big deal out of it.
 
2:02 AM
@LucDanton But glass can be made into almost everything!
 
So can rock?
 
Not as valuable.
 
I'm just jealous because all I get is clay :(
@RMartinhoFernandes My 'rock' is gold nuggets.
 
@LucDanton Not infinite!
 
It's hard to tell so far.
 
2:03 AM
"A lot" != "infinite".
 
I'm making rock pots out of it btw.
I'm a bit disappointed that my last two fortress feel a bit exploit-y, what with the eggs and now what with the amount of gold.
On the other hand I really wanted stability to get my craftdwarves going so there's that.
 
So, you hit a gigantic vein of gold, and you feel bad?
 
@RMartinhoFernandes Unremeltable Glass (TM), courtesy of Dwarven Technology Inc.
 
Gold is super boring, is my point.
 
@CatPlusPlus Why remelt it? Just make more.
 
2:05 AM
Trade it.
 
It's free and infinite.
 
@RMartinhoFernandes That's about it being magma-safe.
 
It melts only once, and never again!
 
@CatPlusPlus I still have gold leftover. Doesn't take a lot to buy you the whole caravan.
 
2:06 AM
@LucDanton Start a gold megaproject?
 
Giant golden cock, Minecraft-style.
 
Actually I think I'm sore because I thought I'd have more wood to smelt stuff and forge things.
 
Magma.
Dig down.
 
Cue cavern with Fun.
 
You don't need wood for forges unless you want steel.
 
2:08 AM
Yeah I'm about to do all that. After I take care of all those migrants that are tempted by my vast wealth.
(I don't have that many migrants actually so yeah I'll be doing it.)
 
Speaking of which, I have successfully collected 16 nuggets of raw adamantine.
I don't know what to do with them.
 
I'm reading atm btw this was a succint description of what I've done in my fortress so far. It's only three year old so it's all good.
 
It's not enough to make axes for everyone :(
 
You like axes? I'm more of a mace person myself.
 
2:10 AM
@LucDanton Adamantine maces are...
Well, what deals damage with maces is the weight.
Adamantine is ultra light.
 
Oh yeah.
 
Do the math.
 
Picks are supposedly nice for combat.
 
adamantine armor + steel maces = yay?
 
Adamantine armor uses up even more nuggets.
 
2:11 AM
Damn physics. I somehow screwed up units everywhere.
Doing homework at 3AM, 6 hours before deadline — not a good idea.
 
@RMartinhoFernandes No I mean, isn't that the math I'm supposed to be doing? Feel free to forge some axes lol.
 
Doing homework at 3AM, 6 hours before deadline, and chatting in the lounge — not a good idea.
@LucDanton Ah.
 
Is it possible to make adamantine bolts, and do they suck too? (And nevermind the colossal waste of raw material.)
 
FTR, my squads are either all-crossbows, or mixed 3 spears-2 swords-2 maces-2 axes.
 
Scientific notation be confusing.
 
2:15 AM
@LucDanton They'll probably pierce anything short of adamantine armor, so, yeah, that would be good.
 
Fuck, I want to play now.
 
Great, GCC build failed.
DF it is.
 
2:34 AM
I thought I could have a clever schedule for my squad where they patrol fortifications but I can't say I've had much success. They like to patrol before the fortifications instead of behind them.
 
Xeo
Okay, I'm gonna let that monadic stuff sink in now and go get some sleep.. g'night.
Just to reiterate before that... Monads add a new property to the types they wrap. They then allow you to operate on that wrapped type through some glue-code like bind and unit, while propagating that extra property. Anything I missed for a first impression?
 
@RMartinhoFernandes Why have I never noticed fail before?
 
@Xeo Yes, that's a fairly good way to put it.
@LucDanton It doesn't see much use.
 
Xeo
2:50 AM
@RMartinhoFernandes k, then I'll meditate over that for the night.
0
Q: Function overloads and inherited types are not calling the correct overload

sysrplI am having a problem with some code I wrote and need help. The problem is I am trying to associate variable number of arguments with overloaded formatting functions. Here is what I am trying to do. I wrote a function Format(String, ) which can be used like this: Format("Today is {0:mmmm dth yy...

Sigh, another one...
 
Should I just blank all the irrelevant stuff and boil down the question to "I have one overload for a base type and a template accepting anything, and I don't want the template to be called for derived types"?
 
Xeo
Yes.
Please do.
Although he might not learn the valuable lesson that one does not simply write Java or C# in C++...
 
Frak, rotten hearts are not harmless after all. The kids have started dying.
 
Meanwhile, I'm mining more gold.
 
Both captains of my squads are aflicted too.
 
3:05 AM
So, they're not even sick then? They just drop dead after a while?
 
Some kids had moderate blood loss too.
 
Ah well, it was moderate.
 
Wiki says advanced necrosis causes bleedings.
 
For a second due to the capitalisation I thought you went to Wikipedia to check what your dwarves were afflicted with.
 
3:08 AM
66 charcoal, let's smelt stuff.
 
Stupid masons keep walling themselves in.
 
@Xeo That guy seems to be somewhat sensible, but posting a generic version of a formatting functions as an example of best practices seems like an heroic effort.
Mmh, galena.
 
Silver!
Now you can make electrum.
 
I have tetrahedrite. 20%, but copper.
I guess I do need magma.
 
And the tantrums have begun...
 
3:16 AM
Adamantine tantrums!
 
3:33 AM
First legendary pump operator. How's it going for you?
 
@LucDanton no rent
 
7 kids dead, one war dog.
 
Ah, those tantrums are contained.
 
And just in, the cheese maker died too.
 
I like how most of my statues are statues of the former expedition leader.
I planted a few, too.
 
3:40 AM
 
lol. Can there be images of dorfs eating?
 
@LucDanton I think it's just "with" cheese
 
Btw that's a thumbnail.
 
Can't read.
 
3:44 AM
Hmm, most of my marksdwarves are aflicted. Some already have severe blood loss.
I think I'm going to lose ~50 dorfs to rotten-heartitis, and I have no idea how many due to the psychological effects of that.
The hospital floor is covered in blood.
 
hour 3 of new fort: Just picked embark location
I might be a little indecisive
 
I find preparations fun tbh.
 
Scratch that last message. There's blood all over everywhere.
 
Whoops, are bunny grazers? Looks like it.
Looks like stray bunny is on the menu.
 

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