« first day (675 days earlier)      last day (4291 days later) » 

7:00 PM
@FredOverflow Both
 
@jalf You told me to make the compiler optimize for size, didn't you?
 
No, no. The point is Haskell should be taken as far as possible.
It maximizes fun.
 
@Mehrdad That doesn't involve changing /O2 to /O1.
 
@DeadMG Uh, then what does it involve? voodoo?
 
you should have /Ox, /Ob2, /Oi, /Os, changed from /Ot
 
7:01 PM
The fun is optimal man. IT'S OPTIMAL.
 
Ell
optimise the fun!
 
@CatPlusPlus No, it's not. Records.
 
@DeadMG Uh, [citation needed]
 
gcc /Ofun
 
@R.MartinhoFernandes Lenses.
 
7:01 PM
oh man, my boost version is old
Doesn't have phoenix
 
@jalf Get 1.50.0.
 
@Mehrdad Uh, it has a setting called "Favor size or speed" and you change it from "Speed" to "small code"
 
@DeadMG Is there /Osbi in there too?
 
@jalf ? When did you print it?
 
@Mehrdad I would, if I could be bothered to spend the next few hours compiling it :/
 
7:02 PM
@jalf It's header-only
 
You don't need to compile it.
 
Maybe /Osmosis, or /Orion
 
http://msdn.microsoft.com/en-us/library/8f8h5cxt.aspx

/O1 (Minimize Size) is equivalent to
/Og /Os /Oy /Ob2 /Gs /GF /Gy
 
Ell
not all of it
but the bit that takes compiling doesn't take long for me, and I have a horrible old laptop
 
@Mehrdad Doesn't even mention /Ox.
 
7:03 PM
XO
 
also, you really don't want /Gs
 
@DeadMG WTF? Click on the left, it's right there. msdn.microsoft.com/en-us/library/59a3b321 /Ox doesn't seem to have much more that would make things better.
 
@FredOverflow That's its biggest fault, really. They couldn't quite decided whether to imitate Lisp, Smalltalk, C, C++, or what exactly -- so what they got wasn't even a decent imitation of any of them.
 
I'm talking about boost in general, not just phoenix. If I download 1.50, I kind of want to be able to use all parts of it, which means all of it has to be compiled
 
@JerryCoffin Wait, Lisp?
 
Ell
7:04 PM
@jalf I don't think it takes long. what platform are you on?
 
What's Lispy about Java?
 
@Mehrdad The point is, that there is a lot more here than just /O1 or /O2
 
@jalf Well, if you're not trying the example yourself, then you should take my word for it. It's a lot more space-efficient that way.
 
Parentheses, duh.
 
Sure, I could just download it and have your test case running in 5 minutes or so, but eh, since you guys are already reporting file sizes I don't really need to .)
 
7:04 PM
and if you want to repro my results- the ones where using a lambda had literally no effect whatsoever on the code size
then you should set it how I've set it
 
@DeadMG Are you just sending me on a goose chase, or do you really think it will make a difference?
 
@Mehrdad Not if other people report different results
 
@jalf The irony is that, although Phoenix is header only, it is probably one of the libraries that will cost you the most net compilation time
 
I prefer fun-efficient.
 
@Mehrdad My test case indicates that it made literally all the difference.
 
7:05 PM
@DeadMG Sigh, ok, let me see...
@DeadMG While I'm at it, post your test case at least
 
@R.MartinhoFernandes Look at some math on BigInteger's: a.plus(b.times(c.plus(d)))...
 
I have /Ox /Ob2 /Oi /Os /GT /GL /MT /LTCG /OPT:REF and didn't really fiddle with the others
 
@DeadMG I meant the code
 
@JerryCoffin Haha, lol.
 
7:06 PM
@DeadMG We already noticed you don't like to fiddle with the others :)
 
@JerryCoffin Java has no operator overloading?
 
@DeadMG Even Microsoft says /Ox is obsolete, and retained only for compatibility with old makefiles and such.
 
@DeadMG Cool, thanks. A quick look says you have 'foo' in the second one... is that a typo?
 
@NikiC Not for user-defined types, no.
 
@FredOverflow amazing
 
7:07 PM
yep
I did a few undos and redos on the file so it might have such things in it
 
@NikiC Strings are magical and have + for concatenation.
 
@NikiC What's so amazing about that? Java practically doesn't have anything except the bare essentials. And stupid generics.
 
@NikiC What? PHP has no operator overloading. Most languages don't have it, AFAICT
 
btw I've targetted x64 not x86
 
Ell
x64? is that Itanium or something?
 
7:08 PM
@Mehrdad A lambda in that situation will only take more space than a function pointer if your compiler inlines it. It was bigger because a lambda opened up optimization options that a function pointer cannot do. If you didn't want it inlined, don't have the compiler inline it. Don't blame lambdas for for compiler taking advantage of the fact that lambdas can be inlined.
 
@Ell No, it's 64bit.
 
@sehe Yeah, but I wouldn't call that one of the good sides of PHP ;) Also I generally expect operator overloading in strictly typed languages.
 
@DeadMG Ah, let me try that
 
@FredOverflow They have no generics, really. They have compiler- supported hacked syntactic MACROS
 
@NikiC It has some, but (being Java) it's reserved for use only by the language designer. Since you're obviously a simpleton and an idiot, cannot be trusted with such power...
 
Ell
7:08 PM
@DeadMG I thought that was x86_64
 
@sehe Macros? WTF?
 
@Ell Which is often shortened to x64.
 
@CatPlusPlus Data.Lenses?
 
@MooingDuck Assuming the compiler generates the same code otherwise. But it doesn't, because the lambdas are different, and the stable_sorts() are therefore different.
 
Ell
@NikiC I thought php was weakly typed?
@DeadMG hmmm... okay
 
7:09 PM
Itanium is called, well, Itanium.
 
This is not what "lenses" meant in my time.
 
Only weak dynamic typing has problems with operator overloading.
 
@R.MartinhoFernandes That's what I was thinking.
 
@Ell I was referring to Java there ;)
 
Ell
@NikiC ah sorry I was butting in when I shouldn't be :P
 
7:09 PM
@Mehrdad If you disable inlining, sort on a lambda and sort on a function pointer should take almost* the same space. (*almost as in the lambda should be smaller)
 
The Monad Reader is weekly typed. Ha ha.
 
@R.MartinhoFernandes Yes. Or Data.Labels.
 
@FredOverflow Report for some pun-ishment.
 
It's stupidly simple concept, and makes records 1000 times better.
 
7:10 PM
@CatPlusPlus I should really get up to speed with what the kids are doing these days.
 
@R.MartinhoFernandes Bad comparison, come to think of it. I meant it is all a bit 'fake' on the VM level (type erasure, code sharing)
 
@DeadMG I call BS on your example. It grew from 14.5 to 17 KB the moment I included the second sort() on my code. And yes, x64, same flags as you.
 
@R.MartinhoFernandes Is that you, Van Leeuwenhoeck?
 
Hey, no need for battleships.
 
14.5 to 17 is too little.
are you dynamically linking CRT? I had static.
 
7:11 PM
@DeadMG Yeah I made it dynamic
 
try static
 
@DeadMG 57.5 to 60
@DeadMG Try the code yourself.
 
well, you must have something set differently to me, because I can't get it above 57.2 even with /Ot instead of /Os.
 
@DeadMG What sizes are yours with and without the second sort(lambda)?
 
51,712 without
 
7:13 PM
Guys, are you seriously comparing sizes?
 
and 51,712 with
 
@FredOverflow yes
 
It's starting to approach OCD.
 
@FredOverflow Don't know why.
 
come on, put 'em on the table
2
 
Xeo
7:14 PM
@rubenvb: So, got a solution to your problem yet?
 
@Xeo That came in on the wrong context.
 
but I also did some micro-opts on that memory arena allocator, remember?
 
Xeo
lol
 
@R.MartinhoFernandes Monoidal parsing.
 
Here's my *full* set of flags (even the ones that my editor sets automatically)
http://ideone.com/yKUr9
@DeadMG What are yours?
 
7:15 PM
@Xeo I refactored into two structs instead of a pair and two pairs of that pair, and made one member of the second struct mutable.
 
'Show me yours I'll show you mine.'
 
So... mutable.
 
where's the list?
 
Xeo
Meh, I don't like that. It's kinda custom-tailored to the std::set problem
 
7:16 PM
@DeadMG In the comment. FYI -- some of them are for other VC compilers, not for VS 10, so they can be ignored.
 
@Mehrdad No, I meant, where to find my own list :P
 
Xeo
What was wrong with the std::map solution?
 
@DeadMG Ah lol. Should be in project properties/command line, both compiler/linker
 
@Xeo guess I'm too lazy to implement it. Sorry :S
 
Xeo
7:17 PM
@rubenvb o_o"
 
I wonder why I have WIN32,NDEBUG, and _LIB defined for release x64
lol
 
@DeadMG NDEBUG should be defined for release
 
Mighty 0x.
 
> What is it with professors and their rigid rules about turning in papers by a certain time and date? Do they really expect a free spirit such as you to adhere to their patched-sleeve, tweedy, uptight schedules? Deadlines are for squares and businesspigs only-down with the man!
 
7:18 PM
Lol.
 
@DeadMG I just tried it with your flags (not 100%, since it's annoying to set everything, but close enough) and got from 48 to 49.5.
 
Actually quite some more bizarre 'services' on the net: good.is/post/deception-inc (deception.inc)
 
well
I do have SP1 installed, and also, VC 2012 RC.
and the RC does have some irritating habits of interfering with VS2010's normal operations
 
@Mehrdad How can it be annoying? You can just cl.exe /blablablabl or gcc /blablabla or enter the options in the 'additional commandline flags' text box in VS?
 
@sehe include/lib paths are annoying. I'm compiling with a text editor.
 
7:20 PM
@Mehrdad Whoa. Hard core. I compile with a pencil
 
I compile with neodymium magnets.
 
Ell
dd /dev/random ~/Homework.doc
 
I compile with a compiler. I hope that doesn't make me the odd man out.
 
@Mehrdad But serioiusly, why don't you copy/paste the compiler flags then?
 
You know you can set LIB/INCLUDE environment variables for MSVC?
 
7:21 PM
@CatPlusPlus Yeah, like I said it's annoying
 
@Ell Yeah probably. But I'm sure you actually want to be a bit more slick, by providing 'semi-legit' document 'magic' headers
 
Use Rapid Environment Editor.
 
@CatPlusPlus NUCK
 
@sehe I don't know what his include paths are, and they might be different on mine
 
@Mehrdad Man. Don't you know MSBuild, nmake, cmake, or for heaven's sake, common batch files with %VARIABLE%-s?
 
7:22 PM
@DeadMG WTF.
 
@DeadMG I call BS on the "I also have 2012 installed" thing, it has nothing to do with 2010. My environment vars are fine in that regards.
 
@Mehrdad Mm. Okay, I didn't realize you were talking about other options than optimization flags
 
@sehe Ah yeah, I was talking about the other flags, sorry
 
Ell
@CatPlusPlus ew.
 
7:23 PM
@R.MartinhoFernandes It's a misspelling of "nuke" by some guy who did not particularly speak English.
 
In the C9 interview at the Going Native event it is mentioned that the richness of constexpr makes it more prone to abuse. How does one abuse constexpr?
 
Xeo
@rubenvb: Ah, I see a kind of problem with the insert. Could swear I solved that somehow, though. Brb, searching my codez
 
@StackedCrooked By driving it into the lake.
 
@DeadMG As for SP1, so do I, so that's not the cause.
 
@DeadMG Ok. Urban dictionary was not helping there.
 
7:24 PM
@CatPlusPlus But that's stateful.
 
@DeadMG Can you check the binaries to make sure they at least differ?
I gotta get going for now...
Let me know how the binaries look.
 
room topic changed to Lounge<C++>: I shaved 2kB off my executable, and all I got was this lousy topic. [c++] [c++11] [c++-faq] [fun] [not-your-helpdesk] [nsfw]
 
Round and shiny
@Mehrdad Is this about size reduction? Use upx-nrv or similar!
 
Ell
not-your-helpdesk < lol
 
Why are people so keen to get more stuff into the standard lib? I don't think if matters weather ur using boost::filesystem or std::filesystem?
 
Ell
7:30 PM
convenience, I guess?
 
C++ lacks dependency management of any kind, so anything that you don't have to deal with is a blessing.
Also no official code repository.
Boost is half-fine, but anything outside of that is pain and tears.
 
@Nils Some (admittedly, stupid) employers frown on Boost (and in some cases, on open-source in general). For others, it's a simple matter of awareness: Boost has no sales people, so they won't know about it unless it comes with the compiler.
 
IOW: C++ and C++ community is still astronomical units behind modern languages.
 
Ell
@CatPlusPlus what is an example of dependency management? Isn't that the OS job? e.g. sudo apt-get install lib******-dev ?
 
Yes, because there's only one OS around.
 
Ell
7:33 PM
I wasn't implying that, apt-get was just an example
 
@CatPlusPlus Behind in some ways, ahead in others. C++ concentrates on being a language, not a platform. Many of the others try to take over everything, in some cases right down to the hardware.
 
Not to mention versioning and packaging woes that system-level packages bring.
@Ell ._.
@JerryCoffin I'd say a platform is what C++ desperately needs.
 
Ell
ruby has ruby gems, but when you try to install a gem that needs native packages it doesn't integrate well, IIRC
 
@CatPlusPlus Yes.. is the standards committee doing something about the long compile times? What about modules?
What is a static_if?
 
Between no official code repo, no ABI and fucking POSIX libraries, managing C++ projects is a pain in the ass.
 
Ell
7:36 PM
I think the no ABI is really annoying, as well as no modules. Not sure about the POSIX libraries
 
The first thing I do is collect dependencies and put them in a repo, because it's the only way to not deal with stupid shit later.
 
Xeo
@rubenvb: Meh, found it, but it's messy
 
And it makes me want to never do C++ projects.
 
I agree, but I wonder what the committee thinks about it?
 
(Also terrible build systems.)
 
7:37 PM
yeah build systems suck
 
Committee thinks about language, mostly, because that's the scope of the standard.
 
Ell
what is wrong with current build systems?
 
(Being a standard is bad bad bad.)
 
@Ell They suck.
 
@Ell Do a largeish C++ project and you'll know.
 
7:37 PM
Companies employ "build engineers" I wonder who wants to do this w/o having a gun pointed to his/her head..
 
Ell
in what way? too difficult to make work properly?
 
sbi
This guy is amazing!
 
hello all
1
A: float bits and strict aliasing

Johannes Schaub - litbThe following does not violate the aliasing rule, because it has no use of lvalues accessing different types anywhere template<typename B, typename A> B noalias_cast(A a) { union N { A a; B b; N(A a):a(a) { } }; return N(a).b; } unsigned bar(float x) { return noali...

 
@sbi wow :)
 
unfortunately that trick won't work anymore soon :)
 
7:39 PM
I don't really get what's happening in that video.
Some context?
 
Hey guys I need your suggestions
 
Xeo
@CatPlusPlus Watch till the end
 
@MohamedAhmedNabil Use Haskell.
 
Can you do an app in Haskell? Are there gui libs? OpenGL bindings?
 
Xeo
@JohannesSchaub-litb Why?
 
7:40 PM
I need a books that when it introduces for ecample #include <string> it goes through all the header's functions and stuff
 
Yes (it's an enormously stupid question, you know). Yes. Yes.
 
Xeo
I hope they didn't change it so T().member is an lvalue
 
Ell
@MohamedAhmedNabil just look at cppreference for string functions and stuff
 
@Ell I llook but i dont undertsand much
 
@Xeo because they will make "X().y" an xvalue :)
 
7:41 PM
@CatPlusPlus but people do not seem to use it
 
@MohamedAhmedNabil Nicolai Josuttis' the Standard Library
 
Ell
@MohamedAhmedNabil heres about strings en.cppreference.com/w/cpp/string
 
Xeo
mhm
 
also Clojure is this years in programming language :P
 
@Nils So what?
 
7:41 PM
@Nils I see a lot of people who do. In fact, entire Haskell community does.
 
@NightLifeLover Books on c++11 - Isn't that what the naughty kids get for christmas ?
 
Amazing, huh.
 
@Ell i know but i dont understand how this works, a book would be alot better
 
Xeo
So how exactly is that different from it being an rvalue?
 
Xeo
7:42 PM
@Nils Stupid tweet
 
Clojure is a Lisp, which makes me entirely uninterested.
 
Ell
@MohamedAhmedNabil just go to here en.cppreference.com/w/cpp/string/basic_string and scroll down to "Member Functions" that will tell you about all the functions. if a book would be better I recommend c++ primer
 
If I wanted to use a Lisp, I'd use Racket and not deal with JVM.
 
I'm afraid that a book will be about as informative to you, honestly
 
@Xeo I'll stick to the mutable for now. Maybe a cleaner way will spontaneously combust in my mind someday.
 
7:42 PM
looks like all the hyper nerds are learning Haskell so maybe I should..
 
Xeo
@rubenvb Yeah, I mean, it works, but it's really really messy
 
What is the difference between Clojure and Haskell?
 
Ell
I don't see the appeal of immutability - to me it seems backwards
 
@Nils Erm.
Is that a serious question?
 
@sbi Strange
 
7:43 PM
Yeah I have played a bit with Clojure, not with Haskel, so yes
 
@R.MartinhoFernandes "What's the difference between Haskell and Java" - much more valid question :)
 
@Nils One is Clojure and the other is Haskell.
 
sbi
@sehe Yeah. I couldn't find a way to download an image from flickr, so I made a screenshot. I blew the cropping, though.
 
@Ell i scrolled down, There isnt member functions
 
Xeo
@rubenvb (If you're interested... Note that it doesn't use std::reference_wrapper, since that doesn't allow reseating)
 
7:44 PM
@MohamedAhmedNabil So, upgrade to a browser that works
 
Ell
 
Xeo
You could make this less of a mess with member pointers, I guess
 
@Ell It makes programs easier to reason about (no side effects). It enables more optimisations, and makes automatic/cheap parallelism much easier.
 
its actually nott under member functions sooo..
 
Xeo
No, nvm, even then you can't
needs container support to really work
 
7:45 PM
@Xeo If anything should be a projection, not member pointers.
But yeah, it needs a new container.
 
@MohamedAhmedNabil Ah spoken like a true pedant. You'll get C++ - no worries!
 
Is there no Scala room here?
 
Xeo
@R.MartinhoFernandes Yeah, a functor that maps from object to key
Shouldn't be too hard to implement that actually, such a container
 
@MohamedAhmedNabil It sais 'Member functions' right there in a heading font
 
Xeo
Hmm
 
7:47 PM
@sehe not in the first link he gave :/
nvm that now
 
@MohamedAhmedNabil Keep at it. Pedantry level is rising. Sooner rather than later you'll be dreaming in C++
 
Xeo
I need to sent a small C++ work sample for my application... ugh
I don't have anything ready-made :(
 
@sehe sarcasm ?
 
@Xeo What kind of sample?
 
Ell
@Xeo quickly! write a wrapper for cairo!
 
7:48 PM
unlikely
 
Xeo
@R.MartinhoFernandes Anything, it seems
 
@Xeo Really not?
 
@Xeo can you just point to your github/bitbucket place?
 
Xeo
@sehe If I had one
 
@Nils Me neither, I'd have to polish something up for the purpose
 
7:49 PM
@Xeo How big? Showcasing what?
 
Xeo
sec
 
@Xeo In your case I would mention you SO account..
 
Xeo
"Please include a short work sample in C++ in your application."
Nothing more
(roughly translated)
 
What's a "work example"?
 
@Xeo 'work' or 'working' - pretty big difference there
 
7:51 PM
@Xeo No code from a thesis or something?
 
Xeo
@R.MartinhoFernandes I said it was rough, and then I typo'd while think of "sample" :)
@sehe "Arbeitsprobe" in German, so work sample
 
Ell
@Xeo #include <short_work_sample>
 
Xeo
@Nils nope
 
@Xeo Mmmm... Wondering, if you submit template wankery ... will they pass :)
@Xeo 'sample of work'
 
Xeo
I mean, I could include my dependency checker, but that thing is kinda unfinished and not that short
 
7:52 PM
@Xeo I can read german
 
Xeo
That was just to justify my choice of words :)
 
I can read German too. So what? I can't understand it.
 
@Xeo Ok. 'sample of one's work' was nicer
 
I have had that question too
 
@R.MartinhoFernandes Well, that must have been the difference then. Thanks for correcting my use of unclear terms
 
7:53 PM
@CatPlusPlus While I wouldn't argue the basic notion, the starting point for the committee is normally some existing practice to standardize -- and I don't see anything right now that I'd like to see standardized (or used as the basis for a standard either).
 
I just took some code I once wrote and submitted it
whatever code that may be
 
@TonyTheLion Soooo copy Tony's snippet, since he got the job!
 
Xeo
heh
 
Xeo
Btw, it's for the position of an online technology programmer
 
7:54 PM
WTF is an "online technology programmer"
 
Xeo
But I have no work samples of anything online, and now I think of coding one
 
web apps sounds like
 
@TonyTheLion Someone that programs technology online.
 
@TonyTheLion I think that makes sense. They'll just look for smells (like, pointers, leaks, odd formatting/style, Rule-Of-3 correctness, const-correctness, MACRO-wittiness and stuff)
@R.MartinhoFernandes :)
 
@sehe if they know that much
 
Ell
7:55 PM
@sehe macro-wittiness? :L
 
cause some are bad, and don't know much at all
 
Xeo
@TonyTheLion platform for their client-based game
 
@TonyTheLion Then you don't have a problem!
 
oh I see
 
@TonyTheLion That's ok, if they don't, it doesn't matter what they think of your snippet
 
7:55 PM
true
I've been meaning to take a shower all day, and have been too lazy to get it done
 
Xeo
@Tony: here
 
As long as they don't start comparing snippet sizes (asking you to put your snippet on the table is a red flag, IYAM)
 
I'm the epitomy of lazyness at the moment
 
Xeo
ugh, that didn't format nicely
 
you need to be in my flat for 10 minutes, and the sweat is flowing all over you
 
7:56 PM
Btw which were the videos starred this afternoon?
 
@TonyTheLion I'd start to worry if you can get the task done in a month
 
it's hot in here. i guess that's because i'm at the 8th floor
 
@JohannesSchaub-litb Whose sweat?
 
@sehe "snippet". Is that what kids call it these days?
 
@sehe yours, if you were here xD
 
Ell
7:57 PM
hmmm. My cookies aren't disabled, they are perfectly able bodied
 
@sehe This is one place we'll really hope that "six weeks" isn't right.
 
@R.MartinhoFernandes It's a little term-application of my own invention. <giggle/>
 
@JohannesSchaub-litb Where did you get sehe's sweat? Are you a stalker?
 
@sehe I need some time to work myself up to committing to taking a shower and then actually doing it :P
 
Xeo
7:57 PM
@Nils Oh, thanks for reminding me of my own message :D
 
lol @R.MartinhoFernandes
 
@JohannesSchaub-litb What a relief. It'd be rather digusting if someone else's sweat would be flowing around
 
Ell
@TonyTheLion showers make you feel clean! isn't that enough motivation?
 
Xeo
Hm, I could send my "train oracle" that I wrote for the 3rd semester's C++ exam, but that's bad C++...
 
7:58 PM
lol
 
@Xeo I watched that video, they aren't being very kind to metaprogramming
 
Xeo
Maybe I'll just write a short chat thingy, with Boost.Asio
 
Shoot 'em.
 
@Xeo Better not then. Also, that would send the impression that you only programmed for homework. Maybe
 
Xeo
@sehe Fact is, I didn't really code any apps this last half-year :)
 
7:59 PM
@R.MartinhoFernandes you're in an elite priesthood of template wankers
 
@Xeo Yeah, I think that would rock. Especially if make it clear you whipped it up just for the application
 
Xeo
Except working on that dependency checker thing and snippets on SO
 
as they call the people focusing on TMP
 
@sehe Having sweat from just the right person flowing on you can actually be pretty awesome. Being rubbed on you works too...
 
oh god
 
Xeo
7:59 PM
@sehe Aye, but the job offer is online since Jul 15 IIRC, so I need to make it fast
 

« first day (675 days earlier)      last day (4291 days later) »