« first day (697 days earlier)      last day (4250 days later) » 

6:00 PM
see c++ always counts, as in c becomes c+1
 
@MooingDuck Oh yeah, the input and output sequences of std::basic_filebuf are not as independent as I thought they would be.
 
heh, my work machine is lowish on HD space, so I was looking at the biggest folders. "documents and settings" makes sense. My userfolder... I guess. Local Settings? MY TEMP FOLDER IS 7GB!
 
My list of TODO just got a new item.
 
@Blank Haskell is one of those languages that really teach you to think about programming in a fundamentally different way.
 
@FredOverflow Thinking is great but is it good in practice?
 
6:03 PM
@Blank Almost nobody cares about Haskell in practice. But it will probably change the way you approach programming in any language afterwards.
 
Oh, I was afraid of some such statement coming.
 
That's not to say that you can't use Haskell in practice, it's just that putting Haskell on your resume will probably get you nowhere :)
 
Yeah!! most want C++
or Java duh..
or PHP..
 
In other words, the boring, real world stuff.
 
@FredOverflow Depending, of course, on what you've been exposed to previously. For somebody who's used (for one example) Lazy Racket, many of the concepts in Haskell will be pretty familiar, just with different syntax.
 
6:06 PM
@FredOverflow The fun and “deeply magical” RealWorld stuff!
 
@JerryCoffin fair enough :)
@daknøk What exactly is fun about Java and PHP, besides bashing them?
 
@MooingDuck Really confusing. In concolsion if i want to output without nuking what should i do?
 
@FredOverflow Laughing at people who like them.
 
haha
@FredOverflow Any example of out of the world stuff solved in Haskell.
 
6:09 PM
What do you mean? Fibonacci sequence in one line? :)
 
@Blank something like this?
module Main
( main
) where

main :: IO ()
main = putStrLn "Hello, world!"
 
fibs = 0 : scanl (+) 1 fibs
^ computes the entire Fibonacci sequence
 
cryptic
 
Not if you've done Haskell for a week.
 
@FredOverflow Interesting choice of words. I would have said "represents the entire Fibonacci sequence."
 
6:11 PM
@daknøk Everything is main?
 
@Blank the last line is the only required one.
 
nvm
 
Not that I'm saying that nothing is computed though.
 
main :: IO () means that main is a nullary function returning IO ().
 
By the way, you can also write main = { putStrLn "Hello, world!"; } if that makes you feel better :)
 
6:13 PM
So any IDE for Haskell? Or command line interpreter/compiler?
 
@Blank Emacs.
GHC is the best compiler ever, and it’s for Haskell.
 
Okay Vim + GHC
 
:)
 
6:15 PM
yes :-D
Emacs is a OS, one needs editor.
 
TextMate ftw.
Sublime Text 2 ftw-er, but only on Windows and Linux.
 
@daknøk yes, yes you are
 
Sublime Text 2 is literally the best editor I have ever used.
 
@daknøk most of my co-workers are emacs people, if it helps. I prefer vim
 
As of now, I am developing my own text editor. It can already delete lines! No copy and paste, though. But that's evil, anyway.
 
6:17 PM
@FredOverflow I also did that once.
It supported copy, paste, cut, undo, redo, writing, auto-indentation, opening and saving.
 
@FredOverflow Really? Is that called Fredit?
 
I like how the classes in the hotspot server compiler exposes its members
public:
PhaseCFG( Arena *a, RootNode *r, Matcher &m );

uint _num_blocks; // Count of basic blocks
Block_List _blocks; // List of basic blocks
RootNode *_root; // Root of whole program
Block_Array _bbs; // Map Nodes to owning Basic Block
Block *_broot; // Basic block of root
 
@daknøk I implemented undo and redo today, which was really simply due to the fact that I use immutable text.
@Blank As a matter of fact, that's exactly how it's called, yes :)
 
Too obvious :)
Build it for Linux as well.
 
Oh wait, I think it's "Freditor"... not sure, have to check tomorrow :)
 
6:19 PM
Call it fred, like ed.
 
no, Freditor sounds best
 
@daknøk too subtle, only nerds would get it.
 
Number of Google results for various queries:
 25  site:ruby-doc.org magic
 36  site:docs.python.org magic
497  site:perldoc.perl.org magic
 
Woohoo, C++ Primer latest edition shipped today! Also, The Quick Python Book.
 
books are meh
 
6:24 PM
@MohamedAhmedNabil it looks like ofstream with out will nuke unless you give ate or app. An fstream will only nuke if given trunc.
 
@daknøk Books are great for reading in bed. What else would you do in bed, except sleeping, of course?
 
@FredOverflow Lounge<C++>.
 
I think that would feel a little porny to me :)
 
Yo momma is so fat she can’t enter the voting booth.
 
@FredOverflow Which one is the latest C++ primer? Url please
 
@FredOverflow that's a big onebox
 
say what? :)
 
@FredOverflow he changed the matrix!
 
@MohamedAhmedNabil If you want to open an existing file without nuking the current contents, specify std::ios::in | std::ios::out. If you want the initial writing point to be at the end by default, add | std::ios::ate to that. Note, however, that this will fail if the file doesn't exist. In that case, you need just use std::ios::out (and you could include std::ios::ate, but it does nothing).
 
Xeo
Wait wait wait, shouldn't | std::ios::trunc nuke the file content?
 
6:35 PM
@Xeo for an fstream, yes, for an ofstream, then no.
 
Xeo
wat.
 
@Xeo Yes, but iostreams can add that automatically, depending on what else you've specified. This is one place that C was better (at least I found it less problematic, though still well short of perfect).
 
Xeo
Okay, wait, from the beginning please.
An ofstream will/may by default kill the file contents?
 
@Xeo unless you specify ate or app, it will, yes.
 
Maybe a quick demo is easiest. Creates file first run, appends to file on subsequent runs. Reads and displays record from beginning of file afterwards.
 
6:41 PM
but an fstream will only kill contents if you have trunc.
 
Xeo
wtf, seriously.
> An instance of basic_filebuf behaves as described in 27.9.1.1 provided traits::pos_type is fpos<traits::state_type>. Otherwise the behavior is undefined.
why even allow pos_type to be something else?!
I see, ios::out and ios::out | ios::trunc both map to "w"
and "w" kills the content
while "w+" does not
no, wait
"w+" does too, it seems.
only "a(+)" and "r(+)" do not
how stupid is that.
oh well, something has to be the default
though they could require you to always specify what you want
 
@Xeo I once traced through the (C++03) spec on some of that, and finally decided that it came down to one thing: somebody had a half-baked idea that different types should be allowed for positions, distances, etc., but either gave up short of making it work, or decided it really couldn't work after all, but didn't remove the typedefs.
 
Xeo
@JerryCoffin I had a thought that maybe it just exists as a shortcut
 
@Xeo Maybe -- but when you look carefully, there's a fair amount of circularity where it says Section X says type A must have characteristics defined in section Y. Section Y refers to section Z, which refers back to section X, and as far as I could find, the characteristics were never really specified, other than something saying size_t will work for one of the types (and by inference, ptrdiff_t should for one other). Don't remember all the details though.
 
Xeo
I see
 
6:58 PM
I just used my new vacuum cleaner, and it sucks awesomely good :)
 
@Xeo I.e., exactly what C did. This one place Windows is cleaner, IMO. You pick CREATE_ALWAYS, OPEN_EXISTING, or OPEN_ALWAYS (maybe another choice or two that I'm not remembering at the moment). Each is pretty clear about what you're going to get though.
 
@JerryCoffin on the other hand, the function you call is called CreateFile.... :)
 
Xeo
lol'd
 
@daknøk S.a.m.p.l.e. .b.i.a.s.
 
CreateFile stands for create-file-descriptor then. Or something like that. Ok still confusing.
 
7:04 PM
@jalf ...which actually makes more sense than is initially obvious. It always creates a File object, even if the thing that refers to on disc is an existing "file". I.e., it's vaguely similar to x = new ifstream("some existing file");, where new only creates a new ifstream object, not a new file.
 
@sehe Shirley you meant sample bias.
@TonyTheLion What if my first name was Dick? :(
 
@JerryCoffin yeeeeeeeeah, kind of. But it's called CreateFile, not CreateFileObject or CreateFileHandle. :)
 
I believe him if he says he didn't find it to be confusing.
Why would he lie about it?
 
posted on September 12, 2012 by Herb Sutter

  Today Microsoft released another free Express version of Visual C++ 2012. In addition to the free Express Visual C++ compiler for building tablet applications, Visual Studio Express 2012 for Windows Desktop directly supports traditional Windows and command-line applications in C++. This a great free C++ compiler on Windows for everything from hobby development to [...]

 
@StackedCrooked As in: "Can you spell [X]?" - but then in implicit form :)
@Feeds Smart of them to make it umambiguous right there, up front: `directly supports traditional Windows and command-line applications in C++` - That nips a revival of that painful episode in the bud
 
7:09 PM
@Feeds Support for override and final. Complete C++11 standard library. Seems like a good deal.
 
@jalf True -- not the best name they could have chosen. It reaches a new height of silliness if you pass the FILE_FLAG_DELETE_ON_CLOSE flag, so you're using CreateFile to destroy a file.
 
@StackedCrooked No variadics. Buggy lambdas.
2
 
Wow starfest!
@sehe No variadics? That sucks!
2
 
But it is still a reasonable deal, of course. The IDE has value. Unsure how much: it will depend on what you want to use it for
@StackedCrooked Starfishing?
 
I've been using them for quite a while in GCC. Didn't realize they were still missing from VC.
 
7:11 PM
@StackedCrooked They emulate it via the preprocessor for the standard library.
 
@StackedCrooked where "complete C++11 standard library" means "as complete as we could make it with all the core language features we're missing"
 
Hm...
 
This directly implies limits on the size for tuples (and especially the generic conversion constructors, as the law-of-squares applies to the number of combinations there)
 
Ok. Use GCC suckers.
@sehe Apparently.
 
@sehe It undoubtedly does, but do you honestly plan on creating tuples with hundreds or thousands of members? I haven't looked to see how many they support, but everything I've tried has worked.
@StackedCrooked That loses a fair number of things too though. The core language is closer, but fairly substantial chunks of the library are missing completely (not just limited in ways that are mostly theoretical).
 
Xeo
7:17 PM
@StackedCrooked Use Clang + libc++, suckers.
 
@Xeo and say goodbye to Windows support? ;)
 
@JerryCoffin I didn't notice that. But I haven't used all of the new features from the standard library yet. The only thing I'm still missing is inherited constructors.
 
Xeo
@jalf Didn't @rubenvb have a MinGW port?
 
@Xeo There is a windows port of which Ruben provides regular builds on sf.net
 
science-fiction.net?
 
Xeo
7:20 PM
Clang's list is only missing attributes and inherited ctors in the language
 
@Xeo still buggy on Windows. Especially with exceptions if I recall
 
Xeo
Well, and much of the concurrency stuff, which doesn't seem to be a priority for them
 
@sehe a fully functional, production-ready one? As far as I know, it's nowhere near that yet
 
@StackedCrooked I suppose I should add that it depends on which standard library you use --- there are at least two or three, though if any of them is truly complete I'm not aware of it.
 
They they have a team for that that develops it in parallel with the rest.
 
7:23 PM
free karma for me :)
 
someone burnt Cat++ ?
2
 
@jalf Who knows. I didn't say so
 
hi, i have a question about SDL_Surfaces
say I make a surface and load an image onto it
then I load a new image
do the h and w of the surface get changed
 
 
okay
 
7:30 PM
@Link btw, why don't you just check it?
 
that's not free karma
 
:-)
 
Programmers Day Today Happy Programmers Day everyone!!
3
We forgot something very important
 
Silly, it's free Koala
 
7:32 PM
onebox fail
 
room topic changed to Lounge<C++>: Happy programmers day! [c++] [c++11] [c++-faq]
2
room topic changed to Lounge<C++>: Happy programmers' day! [c++] [c++11] [c++-faq]
 
@TonyTheLion Wasn't this year a leap year? So wasn't it yesterday?
 
so what you do on programmer's day? relaxing and not programming?
yes, is leap year, so was yesterday ... lol
 
@TonyTheLion Let's get drunk!
 
@Walter You should make your gravatar white so it's ironic.
 
7:35 PM
@Walter We write bugs
 
@Drise he you remember
 
@EtiennedeMartel Yes :)
@Drise donno, don't ruin it.
 
@Walter Today in CEST
 
@Walter Remeber? Bitch I made that show popular.
 
@TonyTheLion Babies Beat kittens or Koalas.
 
7:36 PM
:D
 
@JerryCoffin true :)
 
how is your child?
 
@Sehe okay let's think about the most vicious bugs
 
You get a star from me @JerryCoffin
 
7:37 PM
@Drise Actually, no. It's the 12th on leap years, and 13th otherwise.
 
Awww :)
 
@Walter Nah, we don't think about them
@JerryCoffin Someone feed the boy: he's almost eating the baby!
 
@EtiennedeMartel So... I'm an idiot?
 
@TonyTheLion Doing quite nicely, AAMOF. Still sleeps a lot, of course, but healthy and seems to be pretty happy.
 
@Drise Yes.
 
7:39 PM
Wait
Is that your kid? @JerryCoffin
 
@sehe I heard a joke once about a child going to school and bragging about how he's going to have a baby brother, then suddenly stops. After a few days, the teacher asks, worried that they may have lost the baby. The child replies something about "I think mommy ate it." Wasn't really a great joke though.
 
@JerryCoffin Awesomes :) :)
@Drise Yes it is his kid :)
 
@TonyTheLion Oh. I'm so sorry for having made that joke.
 
@Drise Um...I believe the correct phrasing would be more like "are those your kids", to which the answer would be "yes".
 
I held a baby for the first time in my life only a few months ago
interesting experience
 
7:41 PM
I feel bad, because I am bad.
 
The Party for the Animals having more than three seats would be a disaster.
@JerryCoffin hehe. I like it :)
@daknøk No more than two party animals? You don't accept competition?
 
@Drise Don't be. When it comes to my children, I doubt there's anything you could say that would make even the slightest dent in my happiness.
 
Cute kids.
 
user image
14
 
7:46 PM
@Rapptz Thanks -- I'm obviously biased, but I certainly agree.
@Chimera If that isn't obvious star-bait, I've never seen such a thing.
 
I think a lot of kids are cute since I helped with preschool for about 3 years.
 
@JerryCoffin We can only hope so! :-)
 
@Chimera classic
 
@JerryCoffin We won't. We don't need to. It's what the children themselves are going to say when they grow :)
 
@JerryCoffin It's called a meme, they are all over the interwebs :P
 
7:48 PM
@TonyTheLion Thanks. I never would have known otherwise! (who says Americans can't do irony?)
 
@JerryCoffin You do. (Otherwise, you'd not have added the disambiguating clause)
 
@sehe Yeah, they'll be teenagers soon enough, but for now they're still pretty enjoyable.
 
Someone was a little too star happy. I canceled the star on the least-starred topic change notification...
 
@sehe Perhaps.
 
7:50 PM
@sehe Huh?
 
@JerryCoffin Well. Don't believe a word of what people say. I think bribery upbringing goes a long way
@Rapptz I changed the topic twice and both notifications had been starred
 
I was a real asshole as a teenager, now I'm less of an asshole :P
 
I see.
 
@sehe I don' t have to believe what people say. I just have to remember what a monumental PITA I was as a teenager.
 
@JerryCoffin Really. I kind of forgot when my time was due. Oh well
 
7:53 PM
Haven't they got enough wars as it is?
 
@sehe That someone is most always me. :D
 
I stopped talking to my parents when I was 13. At least, talking to them a lot.
 
@Rapptz Interesting. I tried that, and it never really worked.
 
@TonyTheLion Most Americans clearly think we already have more than enough.
 
@JerryCoffin at least some faith in Humanity was restored by that fact. Now I don't have any hope for Mitt Romney and I have some little hope for Obama in these upcoming elections.
 
7:56 PM
@Drise They got really upset about it when I hit 16. It wasn't all too bad.
 
Seriously, Mitt Romney is bad news
 
@TonyTheLion You mean, RMoney?
 
If I got a matrix A and an identity matrix I, does A * I = I * A = A?
 
just look at some of the recent headlines regarding him, says enough
 
7:58 PM
 
matrix multiplication is a funny one
because it's Row * Column
but because it's the identity matrix, it may not matter, I can't remember
 
And man, is he a good Christian or what. Procreating and all.
 
Damn. 5 kids?
 
@EtiennedeMartel yes
 
@Drise Whatever. Religion means nothing in Presidential elections.
 
7:59 PM
@TonyTheLion Bullshit
 
it shouldn't do anyways
 
@TonyTheLion lol.
but it does.
 

« first day (697 days earlier)      last day (4250 days later) »