« first day (646 days earlier)      last day (4310 days later) » 

6:00 PM
> An event is starting 1 min ago in Lounge<C++> - "Today we're making fun of you."
lolwut?
 
@DomagojPandža I have observed you on numerous occasions, and not once have my detectors registered any sort of win.
@FredOverflow You're late to the party. Peasant.
 
@Ell right
 
@R.MartinhoFernandes Amateur -- thinking HP Lovecraft is worth quoting!
 
@JimNorton Didn't we already tell you?
CairoImage::CairoImage( std::string imageFile )
{
    m_surface.reset( cairo_image_surface_create_from_png( imageFile.c_str() ) );
    m_cr.reset( cairo_create( m_surface.get() ) );
    m_size.first = cairo_image_surface_get_width( m_surface.get() );
    m_size.second = cairo_image_surface_get_height ( m_surface.get() );
    std::cout << "Image Created" << std::endl;
}
 
Ell
@FredOverflow error checks? o.O
 
6:02 PM
Except use init list, dammit.
 
I dislike how in Windows when my mouse is over something, it doesn't scroll. I need to explicitly focus the window to make it scroll. Fairly obnoxious. Compared to Ubuntu, which scrolls on whatever my mouse is over.
 
is there any reason to do that rather than init list?
oh
 
does someone know how frequently does Xeo appear around here?
 
Ell
@CatPlusPlus init list? o.O
 
@Ell I have never been to Cairo, how the hell should I know how it signals errors?
 
6:02 PM
._.
 
@Ell doesn't need them, he's got unique_ptr, and one isn't allocated until the previous succeeds
 
@n2liquid Fairly, but mostly later at night.
 
@DeadMG Your detectors are obviously not calibrated to the proper emission spectrum.
 
@n2liquid always
 
@Drise @Mooing thanks
 
6:03 PM
@Ell "initializer list" (not to be confused with std::initializer_list)
 
Lol.
Only in C++.
 
@MooingDuck You mean "member initialization list".
 
@DomagojPandža They can detect me, and that's the only useful definition of "win".
 
@FredOverflow oh, is that the full name? Good to know
 
oh god why
 
6:04 PM
MIL is not std::initializer_list
 
Ell
@MooingDuck I don't understand? What if cairo_image_surface_create_from_png fails?
 
Mom I'd Love.
 
Also, the name for the std:: thingie is bitchy and will rape ALL the noobs.
 
@MooingDuck It's so confusing that I don't think people usually name it, but rather show a code example.
 
so it looks like I'm gonna be living in the shithole of all shitholes....
 
6:05 PM
Canada?
 
@TonyTheLion The PHP den?
 
@LucDanton I avoided trying to name it earlier and instead posted an ideone link out of fear of calling it the wrong name... :(
 
@DomagojPandža definitely has that feel
 
@DomagojPandža Y U USE DAT WORD?
 
Ell
Uganda?
 
6:05 PM
good comparison there :p
 
@Ell it throws an exception I'd expect
 
@MooingDuck It's C.
 
@Ell If it doesn't throw exceptions, then you'll need to check for the error condition and throw an exception yourself.
 
It crashes and burns and you deserve it for using C API.
 
is there no cairomm?
 
Ell
6:07 PM
@MooingDuck Right, I thought so
 
@FredOverflow Ok. I wasn't sure if it changed because of the changes made in the class definition.
 
not that it'd be an improvement.
 
@keith.layne Not that I'm aware of.
 
Crappy c++ built on crappy c...sweet.
 
@JimNorton Why are you wrapping C? Why not just use C++ all the way?
 
6:07 PM
What is Cairo, anyway?
 
It's a town.
 
Ell
@FredOverflow vector drawing library
 
@Drise existing 3rd party C api?
 
Cairo is a 2D Vector graphics library
 
6:08 PM
Cairo ( ; , literally "The Vanquisher" or "The Conqueror"), is the capital of Egypt and the largest city in the Arab world and Africa, and the 16th largest metropolitan area in the world. Located near the Nile Delta, it was founded in 969 AD. Nicknamed "The City of a Thousand Minarets" for its preponderance of Islamic architecture, Cairo has long been a centre of the region's political and cultural life. Cairo was founded by the Fatimid dynasty in the 10th century AD, but the land composing the present-day city was the site of national capitals whose remnants remain visible in parts of ...
 
Cairo is a software library used to provide a vector graphics-based, device-independent API for software developers. It is designed to provide primitives for 2-dimensional drawing across a number of different backends. Cairo is designed to use hardware acceleration when available. Although written in C, there are bindings for using the cairo graphics library from many other programming languages, including C++, PHP, Factor, Haskell, Lua, Perl, Python, Ruby, Scheme, Smalltalk and several others. Cairo is free software. The majority of it is Dual licensed under the GNU Lesser General Pu...
 
@Drise Because I'm using Cairo which is a C library.
 
> Although written in C
 
"The Vanquisher" ... awesomeness
 
^ stopped reading here
 
6:08 PM
Naming libraries after cities. Yay.
Just wait until Cat Plus Plus writes a graphics library with the name of one of his cities.
 
@MooingDuck I don't know, but I find it less ambiguous :)
 
Or me... Karadžićevo.
 
@FredOverflow good enough for me
 
@keith.layne Oh of course!
 
6:10 PM
Cascading style shits.
 
@TonyTheLion Women's logic is an oxymoron.
 
Hahahah, my Haskell raytracer hasn't moved an inch since I came to the Lounge. I need to take my leave of you now, gentlemen. You have entertained me well, I look forward to future procrastination.
2
 
@Ell a member initializer list is a way of (1) constructing members with values, instead of (2) default constructing them, and assigning values in the constructor body.
 
@DomagojPandža Learn to multitask.
 
6:11 PM
Sorry for wall of code.
 
stop posting walls of code
 
@MooingDuck members and base classes.
 
at least make houses with those walls
 
Get people on a multiplayer notepad.
 
1 message moved to bin
 
I don't want to miss a thing. :(
 
Ell
@JimNorton I will join you on a multiplayer notepad :D
 
Not ideone.
 
@CatPlusPlus IRC
 
6:12 PM
IRC sucks for that.
 
dinner time FTW
 
Netbeans on one screen, chat on the other....I think I'll stay eyes right.
 
Ell
@JimNorton try this piratepad.net/Q0Odhzdgos
not sure if it will work
 
interesting
 
6:14 PM
@JimNorton I still prefer the member init list
 
@JimNorton is make a cairo function, or a demo function that someone showed you earlier? If it's not a cairo function, use nullptr there instead.
 
@JimNorton :Sadface:
 
@JimNorton also you'll want to check for an error value (null?) after m_surface.reset
@keith.layne he is using a member init list (poorly)
 
@psyduck you know what I meant!! :)
 
@Ell Neat!
 
6:16 PM
Hi folks
 
@MooingDuck I don't know what make() is ... @LucDanton provided the template for me...
 
ok I'm skipping dinner, I have to walk all the way to a pub for it
can't be arsed
 
@JimNorton You were using some Cairo functions in your earlier versions of the code to initiate a surface and dispose of it. That's what you should be using instead of make/dispose that were placeholders for the sake of the example.
 
create_surface / kablooie_surface
 
6:17 PM
@LucDanton oh.. I was wondering what make was
 
@JimNorton make was what he called your cairo_image_surface_create_from_png function.
 
@JimNorton There was a comment above :)
 
dang
 
@JimNorton 99% of the time, the constructor body of a class should be empty.
@JimNorton and dispose should be the releasing counterpart to cairo_image_surface_create_from_png
 
@MooingDuck ha, I used make_pair because I'm dumb
 
6:19 PM
@keith.layne make_pair? Where? There's no pairs in his code...
 
@MooingDuck I'm offended by your comma placement
m_size is a pair, isn't it?
 
ew m_ prefixes.
 
some places require that crap.
 
@keith.layne Yes m_size is a pair
 
take that, @MooingDuck. I use my jigglypuff marker attack!
 
6:22 PM
What are you smoking?
 
are you a cop?
 
@keith.layne I'm not sure why I sometimes put commas at the beginning like that. I usually don't, but I tend to for initializer lists for some reason.
 
I like commas at the beginning of lines.
data Commit =
    Commit { message :: String
           , author  :: Author
           , date    :: DateTime
           }
 
and you accuse me of smoking shit.
 
If you put commas at the beginning, you pretty much never forget them. Whereas at the end of the line, I miss them all the time.
 
6:24 PM
oh no, I've started the Holy Comma War.
3
 
Another pro of comma's at the beginning, is that you don't have those ugly dangling commas in a list.
{
  foo: bar,
  baz: qux, // meh
}
 
:4640270 So I can put a free function in place of dispose? Or place this in it's place?

cairo_surface_destroy(m_surface.release());
 
What is make and dispose? And what happened to my cairo_destroyer? I think I'll stop now, "too many cooks spoil the porridge".
^ Germanism, do the English have something like this?
 
I only use them at the beginning in Haskell, really.
 
{ foo: bar
, baz: qux // problem solved
}
 
6:25 PM
Because that language is damn hard to indent just with shiftwidth otherwise.
 
@FredOverflow Yeah I understand... We are modifying code presented by @LucDanton ...
 
@JimNorton ideone.com/19rwR (note where I put cairo_surface_destroy
 
Ok so you just put the name of the function there instead of:
cairo_surface_destroy(m_surface.release()); ?
Is that because the STL or whatever knows what parameters to use when calling cairo_surface_destroy..?
 
I think that for the time being you should forget that release even exists.
 
@JimNorton yes, what it's doing is telling unique_ptr: "when it's time to clean up, use this function to clean up your data"
 
6:30 PM
Who brought up release? I'm with Luc, it doesn't exist.
 
it will call that function if you reset it, or destroy it.
 
@MooingDuck Now cairo_surface_destroy() is a library function, will it automagically be called with the correct parameter?
 
@JimNorton yes, unique_ptr will call it with the data it holds before it clears itself
 
@MooingDuck No, not on release.
 
And now I don't need an explicit destructor... cool
 
6:30 PM
@R.MartinhoFernandes oops
@JimNorton right
@JimNorton that's why unique_ptr is awesome. It solves all problems
 
@FredOverflow Usually stated as "too many cooks spoil the broth', but pretty much the same idea.
 
Ok, I'm going to attempt to put this all back together, with this one smart pointer and the rest the same and see if it works... then will modify the rest to remove the remaining raw pointer..
 
GitHub client is meh.
 
@JerryCoffin I've never heard that. In US it's "too many cooks in the kitchen"
 
@JimNorton cairo_surface_destroy happens to be compatible because as it happens it's very frequent to write dispose functions in that manner, and the way std::unique_ptr was designed it just works. You're right that if it were slightly different it wouldn't be possible to pass it directly and we would need to take some care.
 
6:33 PM
@MooingDuck My experience is primarily in the US.
 
:4640423 The title is so funny :)
 
I REALLY appreciate the willing to help everybody... I will be back after integrating this stuff... thank you very much.
 
hello jim
jerry
fred
 
@Steve Hi Steve.
 
Hi Steve
 
6:35 PM
> Well, he only eats 'em because they're Open Sores ;)
lol
 
i'm extremely bored, and am in desperate need of entertainment
 
@Steve YouTube
 
blocked
 
YouPorn
 
Bored at work? How's that possible.
 
6:36 PM
do a little dance for me
 
0
Q: What are these extra bytes in my binary file?

George EdisonI am in the process of writing a small operating system in C. I have written a bootloader and I'm now trying to get a simple C file (the "kernel") to compile with gcc: int main(void) { return 0; } I compile the file with the following command: gcc kernel.c -o kernel.o -nostdlib -nostartfiles ...

^--- I realize that's not C++, but...
 
nooooo vidvir shut down
it was like the only thing to play youtube videos no one knew about
 
238
A: Hidden Features of C++?

BenYou can put URIs into C++ source without error. For example: void foo() { http://stackoverflow.com/ int bar = 4; ... }

Never thought about this.
 
6:38 PM
@GeorgeEdison just drove by to link? Where's our newbie hints?
@Drise tis awesome
 
@Drise, Yeah I liked that one.
 
@GeorgeEdison Is that not some kind of alignment padding?
 
@keith.layne Hang on... I've got a screenshot of the contents...
 
or minimum file size or something silly like that?
 
6:40 PM
@GeorgeEdison I'm tempted to downvote for the driveby.
 
@Drise The what?
 
@GeorgeEdison they don't go in chat
 
@GeorgeEdison The drive-by link. But I suppose I'll give you a +1 for Linux. Net votes: 0
 
@TonyTheLion Don't be too sure. What would be constantly bash if Java weren't around?
 
@GeorgeEdison it's common for us to downvote questions where people just show up and talk about their question and dont join our conversation
 
6:40 PM
@GeorgeEdison the GNU is telling, I think...
 
@FredOverflow PHP, BASIC, Fortran, Pascal, PL/I, COBOL, ECMAScript, ...
 
@GeorgeEdison Why don't you tag as C?
 
I suppose I could.
 
@GeorgeEdison now you have to engage in silly talk about chipmunk porn lest your question be destroyed by surly loungers.
 
does endl flush the output stream
 
6:42 PM
@keith.layne Dude, that chipmunk was soooo hot.
@Steve Yes.
 
@GeorgeEdison what's the binary format?
 
@Steve Yes.
 
@JerryCoffin You said "women" and "moron" in the same sentence. I can already hear the siren of the sexism police.
 
@keith.layne Well, it's supposed to link a flat binary file.
I'm not quite sure if it is doing that.
 
@GeorgeEdison of what format? ELF?
 
6:43 PM
What do you mean?
 
I honestly know more about chipmunk porn than what you're asking, just trying to be helpful.
 
It's flat binary file.
 
@MooingDuck There shouldn't be an ELF header
 
@GeorgeEdison what is the file format of the executable?
 
There's no format.
 
6:43 PM
ELF, A.OUT, etc.?
 
Gods.
 
@CatPlusPlus wait what?
 
It's just assembled machine code.
Nothing else.
 
@CatPlusPlus: Exactly what you said.
At least, that's what I want it to do.
 
Hence why we call it "flat".
 
6:44 PM
@CatPlusPlus no header information or anything?
 
@MooingDuck No.
 
@GeorgeEdison It would be good to have something to compare it to...
 
@FredOverflow Sex and handcuffs? Pretty sure that room is down the hall on the left.
 
@CatPlusPlus I dislike that idea immensly
 
@JerryCoffin Never tried it, and hostly, I don't think I'm missing much.
 
6:44 PM
It's required for bootloaders.
You probably wouldn't use it for a kernel, but nothing's stopping you.
I used ELF for a kernel just because GRUB supports it out-of-box so why not.
 
@GeorgeEdison You did not pursue discussing chipmunk porn. -1.
 
@FredOverflow Nor have I -- handcuffs seemed like a distraction.
 
My name's Cat. I know everything!!! Fuck you, losers.
 
@keith.layne We already have a Cat. Get out.
 
@GeorgeEdison There's GNU in there, so maybe it's stray debug info or something.
 
6:46 PM
@keith.layne Sounds more like a puppy than a cat.
 
Ah, lemme try.
 
@CatPlusPlus Could be... I did find the 'GNU' string a little odd.
 
I still can't get over the fact that my Radeon graphics card has an audio device built in :)
 
@GeorgeEdison Um, are you're running gcc without -c?
 
6:48 PM
@FredOverflow A complete television, minus the actual screen.
 
@CatPlusPlus Wait a minute...
 
No! You fools! Do not upvote one that drive-by links and fails to discuss chipmunk porn! ... I was actually looking forward to that one..
 
Also -ffreestanding, but I don't really remember what it sets exactly.
 
@FredOverflow Waste of space. Could have had moar powers.
 
@CatPlusPlus Wow... what a dumb mistake I made there.
Now it's 72 bytes.
 
6:50 PM
@CatPlusPlus If you're laying down it..oh wait, Chipmunk porn was a different thread. Sorry, carry on with your normally scheduled flaming.
 
@Drise I don't think I've ever used the 3D capabilities of my Radion since I got it a couple of months ago.
 
@FredOverflow Meh, I don't want to have to wear glasses all the time, and buy a special monitor and shit.
 
@MooingDuck @LucDanton @R.MartinhoFernandes

Ok after integrating all the stuff you folks provided I have the following along with some compile errors.

http://ideone.com/aChaN
 
@FredOverflow 3D bah -- just a way of selling OpenCL hardware to enough people to keep the price reasonable.
 
@Drise What? I just meant normal 3D stuff, not stereographic 3D.
 
6:51 PM
@GeorgeEdison Run with -S.
 
The linker?
 
Military Intelligence? Oxymoron?
 
typedef std::unique_ptr<cairo_surface_t, void(*)(cairo_surface_t * )> surface_type;
^ use this for line 14
 
@JimNorton Obviously. What about it?
 
@GeorgeEdison Compiler. To output assembly.
 
6:52 PM
@JimNorton It might be the case that the compiler you're using does not support this kind of alias declaration (i.e. line 14 with using). Try Fred's fix to see if it helps (using typedef has the same effect).
 
@JerryCoffin Oh just adding a comment based on your comment about women's logic :-)
 
Ell
Finished helping mum with her ipod and now everyone is gone off pirate pad :'(
 
@FredOverflow Erm... So you're telling me you have never rendered 3d anything in a few months? As in no videogames?
 
@LucDanton Why would anyone use using for a simple typedef?
@Drise Unless Xubuntu does it somewhere, no. Solitaire uses 2D as far as I can tell.
 
@FredOverflow Reads better?
 
6:53 PM
@FredOverflow Why would anyone use typedef for a simple alias?
 
@FredOverflow Wow.
 
@LucDanton compiles better on older compilers
 
Well with an argument like that.
 
old compilers suck
 
Ell
typewithme.me is better than piratepad
 
6:54 PM
@CatPlusPlus: dpaste.com/774290
 
@bamboon But old compilers are real. Does VS2010 support using?
 
VS2010 sucks.
 
@GeorgeEdison That identification stuff must not be stripped out.
 
Is it one of the six things it does support? What are the odds?
 
Try with -s.
 
6:55 PM
Finally accumulated enough crap to make a small server to rape multiplayer crap on. :Đ
 
@FredOverflow jaja, your are right. but if you don't try to push the new stuff here on the internet, it will be done nowhere.
 
@DomagojPandža y u no power da mudderburd?
 
@Drise Working on a custom little box to hold the stuff in, not as sexy as the real deal I have, but to feel homey.
 
@Ell typewith.me?
 
Ell
etherpad could do with syntax highlighting
 
6:59 PM
@DomagojPandža dafuq, y u need little box?
 
Ell
@Drise oops. yeas
 
@Drise I like when things are organized. Makes me feel good.
 

« first day (646 days earlier)      last day (4310 days later) »