« first day (1207 days earlier)      last day (3756 days later) » 

11:00 AM
@R.MartinhoFernandes Why not? It does handle some ambiguous syntax, not all. Maybe it can handle C's ambiguous cases.
 
What doesn't it handle?
 
@R.MartinhoFernandes I don't know
 
AFAIK C++ syntax only has more cases, but they're essentially the same issue.
 
@R.MartinhoFernandes IIRC C is ambiguous but decidable while C++ is undecidable. Or something.
 
That is because you need to implement a template processor.
some_template<int>::a * b; is undecidable because some_template is Turing-complete. But if you have code to deal with the template, you can handle it the same way you would handle a * b in C.
 
11:06 AM
> // Syntax error if not prime
lol
: D
 
Dammit, I meant "ambiguous" above.
 
11:27 AM
 
user3010322
Huh
 
user3010322
I'm still awake
 
user3010322
Not quite dead yet
 
coliru.stacked-crooked.com/a/c7864088f0d5e9fe I want "0.000%" for d and "95%" for e :S
 
11:31 AM
lol this just got upvoted
I guess someone had the same problem
 
user3010322
@R.MartinhoFernandes Lmao
 
user3010322
Nice formatting. :P
 
@Purrformance the proper answer would be "write a lisp parser instead"
 
Hell, even "0%" for d and "95%" for e would make me happy.
But d = 9.5e-05% and e = 95.000% I don't want at all.
 
user3010322
Isn't formatting fun?~
 
user3010322
11:35 AM
.___.
 
user3010322
0% breasts?
 
user3010322
What the hell does that even mean?
 
user3010322
Come on, get it together. =l
 
@Stacked do you have Mono on Coliru?
Hmm, seems so, but doesn't work without /proc mounted :S
Hmm, .NET does something similar to std::fixed
However... ideone.com/uV3nDi
 
user3010322
@R.MartinhoFernandes Is that syntax formally called anything?
 
11:43 AM
Now to find the right manipulators for this crap.
@ThePhD It's a custom numeric format string (msdn.microsoft.com/en-us/library/0c899ak8.aspx)
 
user3010322
I know that, I was wondering if it was formalized somewhere.
 
It's described there in those docs.
 
user3010322
I meant as like,
 
user3010322
a cross-language spec.
 
user3010322
Something that is considered "the standard way to describe string formatting."
 
11:45 AM
It's from .NET.
(I think it's based off of Office's formatting strings.)
The CLDR has some format string specifications, IIRC.
Dunno if .NET's is compliant with that, or compliant + extensions, or neither.
It is similar, though.
I guess I'll just if(x < 0.0005) this shit.
 
user3010322
Hehe.
 
For fuck's sake
 
user3010322
For sake's fuck?
 
I'm trying to find documentation about OSX data folder conventions
All fucking results are shitty articles HOW TO DO THIS THING IN OSX
 
user3010322
There is none? It's all packed in the application's binary package, right?
 
11:56 AM
Like seriously, how many fucking portals with shitty articles for idiots are there
 
user3010322
Easy google bait, easy money. vOv
 
Thank gods for inurl
 
user3010322
IIRC OSX's application icons are just fancy folders, though, I thought?
 
@ThePhD Bundle is immutable, configs and transient data goes elsewhere
 
user3010322
Ooh, where configs and transient data goes...
 
user3010322
11:58 AM
There should be a temp for the transient data, IIRC. Not exactly sure where.
 
I'm p sure it's ~/Library/Application Support, but I'd rather check, last time I wrote code doing that was forever ago
 
user3010322
There's Library, or Library/Applications, if my Macbook knowlege isn't terrible rusty.
 
user3010322
@CatPlusPlus Yeah, smething like that.
 
Or, you know what, fuck this shit, I'll just do good ol' ~/.whatever
 
@CatPlusPlus Doesn't look like they want you to hardcode it: stackoverflow.com/questions/9346222
 
12:10 PM
Whhhhh...what?
http://stackoverflow.com/questions/21552042/get-information-from-an-execute-file-that-debug-another-execute-file-with-one-ex
 
I don't give a fuck about Apple being happy or not
 
I have this notion that you don't like Apple very much.
 
btw Python's textwrap is awesome and every standard library should have it
 
If anyone is up for some iostream bullshit stackoverflow.com/q/21552310/46642
 
I mean Steve Job was never as sexy as ...
 
12:17 PM
@R.MartinhoFernandes I was actually sitting here and wondering if I could code some C++ using iostreams because I like it so much
 
@MartinJames I think we should close that. the question is obviously bad
 
@CatPlusPlus unwrap replaces newlines by spaces, so I suppose wrap replaces spaces with newlines?
:P
 
poor folk
 
you forgot 1 msg
 
12:22 PM
ho
 
@Purrformance hmmm?
 
morning motherfuckers
 
@Purrformance Of course. If you write the grammar :|
 
@CatPlusPlus hey, you know more about Mac than I realized
 
@DeadMG glad to see you in your regular mood
 
12:24 PM
@Purrformance It handles anything you imagine for the simple reason that semantic actions are turing complete and can feedback in the parsing flow
 
wrong mac. Not the whopper, not the fleetwood.
 
Cat is always well-informed. Even about the things he hates.
 
@R.MartinhoFernandes And I think it's appearing in side a "format specification", IIRC /cc @ThePhD
@StackedCrooked Duh. Is there anything outside that
 
@sehe lol
 
user3010322
12:27 PM
@CatPlusPlus textwrap? o.0
 
@sehe haskell
 
Cue lmgtfy
 
and pizza
and games
and tengen toppa gurren lagann
 
95%
9.5%
0.95%
0.095%
0.009%
0.001%
%
gah
serves me right for writing stuff myself
 
What is that?
 
12:29 PM
my solution
 
you solved yourself?
 
that would be "solution to myself"
 
user3010322
Huh. How does textwrap figure out what the end size will be?
 
user3010322
12:31 PM
Is it running under monospace rules?
 
Hey Telkitty remember when you were banned from posting images
 
you ran out of bandwidth again?
 
linux is desktop or not?
 
95%
9.5%
0.95%
0.095%
0.009%
0.001%
0.000%
there.
it works but you don't want to see the code.
 
12:33 PM
No, I care about those random percentages very much, I need to know how they were produced
 
I am wondering if 0.009 is ok actually
 
I'm calling my new internal tool to end all tools "multitool"
Am I clever or what
 
std::cout << "0.095%" << std::endl;
I'm a genius
 
I have some cool code too
config = load_config()
print(get_config_variable(config, 'test.test2', 'default'))
put_config_variable(config, 'other.test.variable', 42)
save_config(config)
:getin:
 
that's weird actually
why is it 0.009 and not 0.01, if the number is 0.0095
 
12:37 PM
@BartekBanachewicz There are multiple different rounding types for floating points.
 
user3010322
@CatPlusPlus Uh. What's multitool for? o.0
 
@ThePhD various things
@Griwes std::round_toward_neg_infinity, that's so negative
 
@ThePhD Creating Django projects from templates and managing GitLab repos right now
 
user3010322
@CatPlusPlus Kinky.
 
user3010322
12:40 PM
I should figure out what GitLab is.
 
Open-source GitHub clone
 
user3010322
Ah.
 
user3010322
There's community edition.
 
@Jefffrey I take it you noticed the hidden apology
@sudorm-rfTelkitty linux is an OS
 
Year of Linux on desktops
 
12:45 PM
@sehe but is it a desktop OS??
 
Is it webscale?!!!!11
@CatPlusPlus Every year since 1847
 
yes, proof: Coliru
 
The thing that dies on 10 concurrent requests
:v
 
It doesn't die, it processes them all sequentially.
Well, usually it dies.
www.coderbyte.com is kinda greedily using the Coliru API.
and they don't even credit Coliru
 
@sehe the broken link? yes :D
the broken <a> tag I should say
 
12:50 PM
@sehe I know what Linux is ... I was referring to the question whether "desktop development is going to die" - desktop as opposite to mobile or tablets development I suppose?
linux, windows & mac are all in the same category for that matter
you can always blacklist/block certain IP addresses unless they give Coliru credit :p even though that's a bit mean >_<
although links will improve your sites ranking
 
@StackedCrooked how do you know?
 
so if you have a million links from other websites then your site's ranking will be quite high
 
I have noticed though that Coliru is getting slower.
@sudorm-rfTelkitty They are not really links, they are simply calling the coliru webservice from JavaScript.
 
you don't have a log who used Coliru?
 
12:55 PM
@sudorm-rfTelkitty yes, see my post above
 
@StackedCrooked I hope they donated something at least
 
haven't received any donations as of yet
 
at least give the site some credit
 
tbh, I never donated myself to a project
6
 
you can just donate money
you don't have to donate yourself
 
12:57 PM
^^
 
oh crap
too late for edit
 
I hate C++
 
oh god this code is getting out of hand
 
How much parsing does the preprocessor do?
 
@TonyTheLion we all do darling, we all do
 
1:00 PM
@Jefffrey <3
 
@TonyTheLion Welcome!
 
@TonyTheLion Then why are you using it? Apparently C# is very comfy :)
 
open arms
 
@StackedCrooked cause I'm currently fixing something in a C++ project, normally I do stay to the comfort of C#.
 
JBL
1:03 PM
@Jefffrey No ! :(
 
ffs, goddamn stone-age standards
 
@Purrformance None
 
@jalf Be happy you have standard
 
Even when the standard basically replaces DNS with what can only be described as a custom-format hosts file on every goddamn machine on the network?
 
1:08 PM
k. I guess I'm happy then :p
 
@jalf :lol:
Do you know why they didn't go with DNS?
 
@jalf See <3
@R.Martin Btw here they bug track with post-its
 
DNS -> Dumb Name System
2
 
@Purrformance That’s immune to power outages.
 
@LucDanton But not pen outages!
 
1:10 PM
@CatPlusPlus afaik because the standard predates it, and if it was good enough for them in 19whatever then it's good enough in 2014 too!
 
Graceful degradation though. You can still read the existing issues.
 
Twitter has graceful unsearchability and deletability.
 
I wanted to say that deploying DNS should be trivial, but then again it's probably one guy manually SSHing/physically going to every box and changing settings, isn't it
 
Physically SSHing!
 
telnet erry day
(via COM)
 
1:13 PM
@Purrformance oh yeah, that's the stuff
 
Or LPT for more comedy option
 
@R.MartinhoFernandes I give up.
 
<shudder> Facebook is ten
 
@BartekBanachewicz If the code is your own formatting logic, I am not interested.
 
yeah.
suckage.
 
1:17 PM
iostreams sucks.
 
I thought it might be a bit cleaner, but it just isn't.
 
        ss << std::setprecision(3);
        if(d != 0 && d < 5e-4) {
            ss << std::fixed;
            ss << 0.0001 << "%";
        } else {
            ss.unsetf(std::ios::floatfield);
            ss << (100. * d) << "%";
        }
 
@R.MartinhoFernandes +1
 
Mine looks just like this.
 
yeah or that.
 
1:17 PM
Not too unclean, but damn annoying.
 
@R.MartinhoFernandes needs more abs
I was thinking about doing a regex match on formatted string too
but it's just too suck.
std::cout << std::reasonable_format;
 
Btw, that thing above is buggy.
This is why I didn't want to write my own logic.
 
You mean Bartek?
Oh, the code.
:qualityjoke:
 
:siren: I'm making a global variable :siren:
 
@CatPlusPlus vOv fuck it
what ever it is, it's going to turn to shit anyway, why fight it?
 
1:24 PM
@CatPlusPlus I'm making tons but they explicitly asked me to and they pay me for it. So there's that.
 
@Purrformance ... what if they start offering to pay you to let them rip your nails off?
 
Whatever boats their floats.
 
@Purrformance boat floats?
 
@BartekBanachewicz Btw, ret.back() == '.' is also the kind of thing I wanted to avoid writing.
My code above makes no assumptions about which decimal separator is used.
 
@R.MartinhoFernandes fuck this shit
 
1:28 PM
Note how it outputs 0.0001 and not just a string directly. That's on purpose.
 
@R.MartinhoFernandes I will take that down if you think I should
 
It's ok.
@Stacked which locales are installed on Coliru?
 
sbi
Hi.
 
Hello
 
sbi
As mostly when I drop in here nowadays, I have a C++ puzzle to solve. :(
 
1:33 PM
What a vampire.
 
											}
										}
									}
								}
							}
						}
					}
				}
			}
 
sbi
Uh oh. This is about overloading, and @Xeo isn't here. Too bad.
 
I love this internship already
 
:)
 
sbi
I have this code:
template<typename Target, typename Value>
struct dynamic_caster {
    typedef Value                                               value_type;
    typedef Target                                              result_type;

          result_type& operator()(      value_type& v) const    {return dynamic_cast<      result_type&>(v);}
    const result_type& operator()(const value_type& v) const    {return dynamic_cast<const result_type&>(v);}
};
And that compiler yells at me I can't overload this operator. (This is local tests, BTW, so it's GCC 4.8.1.)
 
1:35 PM
@sbi You can do (Target)Value. I TESTED IT IT WORKS
 
What's Value here?
 
sbi
src/std_lib_util/iterator.hpp:143:21: error:
'const result_type& dynamic_caster<Target, Value>::operator()(const value_type&) const [with Target = {anonymous}::node_test::node_foo&; Value = tree_node&; dynamic_caster<Target, Value>::result_type = {anonymous}::node_test::node_foo&; dynamic_caster<Target, Value>::value_type = tree_node&]' cannot be overloaded
  const result_type& operator()(const value_type& v) const    {return dynamic_cast<const result_type&>(v);}
                     ^
src/std_lib_util/iterator.hpp:142:21: error: with 'dynamic_caster<Target, Value>::result_type& dynamic_cas
@R.MartinhoFernandes ^
 
ohhh puzzles
 
sbi
Yeah, we've been two staring at that error message for 20mins now, and can't make head nor tail of it.
 
I can't either
 
1:38 PM
treenode&
 
my guess is that the source of the problem is that Value is a non-const reference type.
 
sbi
@R.MartinhoFernandes Reference collapsing?
 
@sbi Banned in C++03.
you probably need to decay Value for value_type before forming references to it.
 
1:39 PM
@sbi That won't matter if you didn't enable C++11, I'm pretty sure. The compiler behaves as C++03 by default. I think.
 
Doesn't matter in C++11 either.
 
oh, wait, you can't even run the test without C++11, so
 
:') only 3.5 days left
 
C++11 changes nothing.
 
1:41 PM
right
 
sbi
@DeadMG This must be enabled. The tests do use C++11 features.
 
Doesn't matter.
 
sbi
@R.MartinhoFernandes Interesting. So I need to remove the reference, huh?
 
working on load handling issues is so painful
 
1:41 PM
ok
 
would it be easier to use a hashmap for each instruction in a simulator? Eg, {"Opcode": 1, "Op1Mode": 2 ...} and put that in memory instead of the long for the instruction?
 
but all I'm saying is that it compiles fine if you don't pass a reference.
 
"It slows down when we throw a metric butt tonne of work at it"... well, yes. It's not magic.
 
whereas if you do pass a reference then GCC errors.
 
@Crowz Better? Yes. Some specify quality? It depends.
 
1:42 PM
@Crowz ...I have a weird feeling we already answered this question one day.
 
@thecoshman "Any sufficiently advanced technology .... "
 
@TonyTheLion ¬_¬ this is not advanced
 
probably... I have no clue what I am doing
 
@Crowz Then don't do it!
 
then I'll fail the class ._.
 
sbi
1:44 PM
Interestingly enough, the old GCC we use for the target platform compiled this just fine. But then, this might be because this new template stuff isn't instantiated anywhere yet...
 
@R.MartinhoFernandes Huh, why is the static_assert not firing there?
 
@AndyProwl Because the assertion holds.
 
I really hate those 'tests' you have to do when reviewing edits
 
@R.MartinhoFernandes ...
 
@sbi Just instantiate without a reference type for Value and Target, and [coliru.stacked-crooked.com/a/fa8435d7f670a328](GCC accepts), so I recommend simply decaying Value and Target for value_type and result_type.
 
1:46 PM
Not for result_type.
 
well
 
Oh wait, he adds the reference.
Nevermind.
 
since dynamic_cast returns an rvalue, you're going to have hilarities returning a const result_type&.
although I guess that if result_type is not a pointer, you should be fine.
 
sbi
@DeadMG Well, this is instantiated about three levels deep into template layers, and I have no direct control about that thing being a reference. However, I will liberally sprinkle the whole mess with remove_reference<> flakes, and see what this results in.
 
@DeadMG It doesn't. dynamic_cast doesn't work with non-reference non-pointer targets.
 
1:49 PM
@R.MartinhoFernandes Yeah, but if you give it a pointer type, then the result is going to be an rvalue pointer.
 
@R.MartinhoFernandes See the bottom of this file.. (Those are the commands I used to install them. I still need to cleanly integrate it in the installer script.)
 
which the result reference would be referring to, which is obviously bad.
 
@R.M how about digging up the implementation of << (Floating) and basing on that? Could it possibly be based on regular std:: primitives?
 
I think a defensive specialization would be good.
 
Why does my fopen_s return EACCESS error??? WHY WHY
Why is TinyXML using C??? DAMNIT
 
1:51 PM
@TonyTheLion don't use TinyXML duh
use Pugi
 
@TonyTheLion Poco::SAX parse is nice.
 
@TonyTheLion you fancy heading in to town for a tasty bite on sunday then?
 
I thought this iostreams crap used the system locales. (sv-SE uses commas)
 
or maybe the Saturday night?
 
1:52 PM
@TonyTheLion FWIW there's also a C++ wrapper for TinyXML
 
@R.MartinhoFernandes char point = std::use_facet< std::numpunct<char> >(std::cout.getloc()).decimal_point();
there.
 
Goddammit, are you sure there's nothing else to consider?
 
of course not
 
Then what's the point?
 
dunno, it's hard to admit complete and utter failure
 
1:55 PM
@thecoshman hmmm, Saturday would definitely be my preference here.
because I get up on Monday morning at 5 am
and I don't want to be in bed late on a Sunday eve
 
@R.MartinhoFernandes Cubbi, directed me to install them starting here.
 
sbi
Folks, this reference thing was the culprit. I freely admit that I have little knowledge about reference collapsing, but it seems there's more to it than I knew. :)
 
@BartekBanachewicz Its quite easy. "I failed utterly and completely, I'm a worthless piece of shit."
 
another point for the puppy
 
@BartekBanachewicz I'm happy enough with the special casing I have. I am more curious about coaxing iostreams to do this shit for me.
 
1:56 PM
@R.MartinhoFernandes I don’t think that’s right. Give me a moment.
 
sbi
Anyway, as always in C++:
This complex compiler error messages puzzle is solved, just to be immediately replaced by a new one...
 
@LucDanton It's not.
 
I’m confused.
 
@sbi Don't you hate C++?
 
Today is my first time using a enum forward declaration.
 
1:57 PM
@LucDanton sv-SE uses commas, not dots: ideone.com/rrcumN
 
@DeadMG you like to hammer it in, don't you?
 
@R.MartinhoFernandes well there's locale::facet::num_put, but I don't think you can get inside of it
 
Sure, but your example isn’t right.
 
sbi
@TonyTheLion The last 20 years of doing C++ have not made me hate it. However, the next 20mins of puzzling over yet another stupid error message might very well be all that is required to finally push me over the edge. :-/
 
@TonyTheLion How do you know that?
 
1:58 PM
Do you know that sv_SE is a valid locale there? I’m getting exceptions.
 
@sbi Show and I'll lend you a hand.
 
@MartinJames cause puppy
 
@LucDanton It's in the list Stacked installed.
 
@sbi Well at least you lasted 20 years.
 
1:59 PM
@TonyTheLion aye, but we get in on the Saturday... flight is at 15:00... so not sure if I would feel up to it...
 
Hmm, so it defaults to the C locale always?
 
probably be fine though
 

« first day (1207 days earlier)      last day (3756 days later) »