« first day (806 days earlier)      last day (4146 days later) » 

12:00 AM
@GamErix I don't remember what you do to make GCC spit out a shared object, unfortunately.
 
user1182183
so just remove the __cdecl stuff and the function will be accesible from the shared object file?
 
Or just #define MYSHITTYEXPORT __declspec (dllexport) for windows and #define MYSHITTYEXPORT <--- blank, leave it blank for Linx
 
user1182183
@Insilico $(GPP) -m32 -O2 -fshort-wchar -shared -o $(FIXES_OUTFILE) -lrt *.o
 
@GamErix I can almost guarantee you that the porting process will not be that straightforward.
 
user1182183
hm va_start is windows stuff?
 
12:01 AM
... No.
 
no
 
No.
 
Standard C variadic arguments
 
I can tell you're going to have a barrel of fun with this. :3c
 
user1182183
fixes.cpp:207: error: ‘va_start’ was not declared in this scope
 
user1182183
12:01 AM
alloca too
 
or end up like a monkey f'n a football.
 
you did not include the correct headers
 
@GamErix You have to include some kind of C standard header to use the variadic function stuff.
 
#include <cstdarg>, I think
 
#include <cstdarg>
 
12:02 AM
Aha, I'm right!
I'm so good at this game.
 
no you're wrong
 
lmfao
 
Of course, variadic functions (i.e. the ...) are very much a C-ism.
 
lol
 
Whatever you're doing, you're not going to be able to compile code full of MSVC-isms on Linux by just greping the source.
 
12:03 AM
:c
It was an 's' off, Sue me.
 
Can't. Too many people on the internet anal.
 
contacts his lawers to forward papers to ThePhD
 
user1182183
thank you guys, it compiled
 
... Wat.
 
user1182183
now it's not mine problem anymore if it doesn't work
 
user1182183
12:05 AM
:P
 
Roflmao.
 
user1182183
I just deliver the compiled file :F
 
@GamErix Ah, I assumed you wanted the code to work. :-P
 
@ThePhD What
 
must not have been that complex of an application
 
user1182183
12:06 AM
@Insilico well that's not my problem :)
 
@Rapptz Waht.
 
edit...1..2...3..
 
Hm.
Yep, I have no idea what I'm doing with Variadics. Time to just sprinkle ... everywhere and hope Magic happens.
 
LMFAO
 
@ThePhD Did you know that passing non-PODs to the ... part of the variadic function is undefined behavior?
 
12:09 AM
For reals?
Shit, I'm fucked then.
 
Don't use C varargs
Ever
 
@Insilico in a variadic template function?
 
I think he meant the C va args
 
@johnathon Not variadic template functions. Variadic functions.
 
Oh.
 
12:10 AM
yea, i thought ThePhd was using templates....
 
I'm not using C varargs at the moment.
 
Not being able to pass non-PODs to variadic template functions would destroy its usefulness.
 
see....
 
no one uses them.. I think
 
12:11 AM
@ThePhD Oh good.
 
printf uses them... but anways
 
Actually, there's a segment of code I have that uses va_args to work
2 places, actually.
 
C varargs are not type-safe
Don't use them ever for anything ever
 
@johnathon printf was invented literally last millenium. There are better ways of doing what printf does.
 
printf is fast, though.
 
12:12 AM
@Insilico i completely agree, i was just stating fact
 
Like NYEEOOOOM.
 
@ThePhD unsink with the c std and c++'s cout is fast
 
Yes it makes bugs fast
 
like NEYOOOOOOM
 
12:12 AM
Since we're on the topic fo va_args...
This is one place where I use va_args, and I've never thought of another way to do it. Any ideas on how to smash it and get better things?
 
I do not know what your code does
 
@ThePhD What's the code supposed to do?
 
All varargs can be translated to variadic templates
 
@ThePhD make it a template function expecting a container of elements
 
I'm creating a list of Vertex Elements, which I pass into a Vertex Declaration. The Declaration keeps a hold of all the Vertex Elements, which can be any number between 0 and WhatTheFuck.
 
12:17 AM
templated might be better no?
 
Or container/initializer_list
Or pair of iterators/range
 
oh that's a good one
 
@ThePhD Use std::initializer_list, since the code looks like it's for a constructor.
 
MSVC doesn't have initializer_list lol
 
I'm using this at before-main time, when crt0dat is running and initializing data.
 
12:18 AM
MSVC is bad
 
@Rapptz But it does!
 
Stop using it
 
When was this?
 
November CTP.
The new initializer_list header was added, yo.
 
They didn't add any headers in november CTP iirc
 
12:19 AM
IT WORKS! MWAHAHA
3
I have used an LLVM optimization pass to strip the problematic definitions, so it now actually compiles and links
 
They work with anything that's a container, as the std lib's container classes lack initlizer_list constructors
 
yeah you're right, it has the new header but it doesn't use it for constructors
 
It's the only one, lulz.
Hm.
So I guess I'll have to learn how to use it.
 
not that hard
 
12:21 AM
@ThePhD Why don't you try out using std::initializer_list and see if it works
Just pull an example from the C++11 Wikipedia page and compile that.
 
@StackedCrooked sounds good
 
I never realized it was an Aretha Franklin cover.
 
@Insilico I don't think it will work with standard stuff but
 
user1182183
12:27 AM
oh btw, does anyone know why this code is crashing? ->
boost::property_tree pt; pt.get<int>("Updater.NotificationType");
 
she's good... no doubt.
 
user1182183
@ThePhD I want also such colors
 
user1182183
howto? :P
 
i despise metro.
 
12:28 AM
By going to Fonts and Colors and slapping the keyboard.
 
My example was nicer.
Trust me on this.
 
There's only one standard initializer_list constructor, and it's the default one
This one is implementation detail, don't use it
 
user1182183
@CatPlusPlus then how would you get data from a (...) parameter?
 
Oh, well oky.
okay*
 
The only standard way to construct initializer lists is to use the {a,b,c} syntax
@GamErix What?
I'm telling you to not use that
So you don't get data from that
 
12:30 AM
@StackedCrooked this is one of my favorite soul songs
 
@ThePhD Also why not for(auto i : meow)?
 
user1182183
@CatPlusPlus then how would you pass an undefined dynamic amount of parameters? ; o
 
for reals yo
 
Container or variadic template
Are you even paying attention
 
he missed it cat
 
user1182183
12:31 AM
@CatPlusPlus I was gone for like 20 mins
 
user1182183
chat system didn't notice? :(
 
@JohanLarsson That sounds good right from the start.
 
@Rapptz Too C++-ey.
 
user1182183
Stack Overflow chat should have inactivity under nickname when hovering over profiles
 
@ThePhD Your example was bad. slaps
 
12:32 AM
@Rapptz Ow. Dx
 
I also fail to understand why it wouldn't work
 
I wrote a better one, I swear:
 
sighs i so miss vs2012 cries
 
So std::initializer_list is good to go in MSVC, although you can see from the Red Squiggly line that Intellisense is as late as ever.
 
@ThePhD for(x : meow) std::cout << x << std::endl;?
 
12:33 AM
auto x : meow
 
It's hte same thing god I get it I can use a ranged for loop I understaaand Dx
 
your while loop is awful
fix it
 
Ranged for is nice.....
 
=[
Grumbles.
 
lol
 
12:35 AM
Most people use a for loop too..
 
for loop is just complicated while, it's not like it's not doing the same thing. D:
 
like for(auto it = garbage.begin(); it != garbage.end(); ++it) etc
 
God.
 
different scope
 
Use range for scrub
 
12:36 AM
Fiiiiiiiiiiiiiiiiiine.
 
// adl
for (auto it = begin(items), e = end(items); it != e; ++it) { ... }
 
@ThePhD conceptually it is, however with for loops the optimizer can hit, with whiles im not so sure
 
i refuse to elaborate, last time i tried an 18 year old practically bit my head off.
 
user142019
>:3
 
12:40 AM
What.
 
But yeah
Std::initalizer list works
So I guess I can just use that.
I hope it works for non-POD types...
 
it's a template, it works for all types
 
Agggh shit I'd have to rewrite the declaration of it in like 12 different places.
Fuck that, va_args I wubs you.
 
Um... lol....
 
72
A: Please help make 3d images in php

ceejayoz<?php print " /----------/|\n"; print " / / |\n"; print " / / |\n"; print "/----------/ |\n"; print "| | |\n"; print "| | / \n"; print "| | / \n"; print "|----------|/ \n";

 
12:46 AM
I saw that yesterday and I upvoted it.
 
user142019
lul
 
Were you looking at the Reversal badge thing? Because that's how I found it lol
 
Yeah, I always look at the latest reversal badges when I want a good laugh :)
 
Dinner time.
 
Upvoted
I saw the counter go up like 2 times while I was on the page lol
 
12:47 AM
upvoted too
 
@Insilico Psssssst. I managed to make a std::initializer_list version of my previous va_args code. I think I need some help though to try it out with variadic templates. Wanna help? <3
Oh wait, Silico's gone.
Darnit. :c
 
mmmhumm
 
@ThePhD I am still here.
 
@LuchianGrigore haha, that one is epic
 
@DeadMG Ooh, ya- .. Wait. This isn't a trap to just call me bad, is it? :c
 
12:50 AM
I'll only call you bad if you do a bad thing, and replacing va_args with initializer_list is definitely not bad.
 
agrees.
 
There's a glaring bug. <?php is never closed — sehe 8 secs ago
 
That's not a bug
 
@sehe hence the rest of the up voters were not php programmers
 
user142019
@sehe that's fine and even recommended.
 
user142019
12:53 AM
It prevents "headers already sent" if you or your editor inserts a newline or other crap at the end.
 
@johnathon ?! that's reversed logic. Obviously, all the php crowd don't care
 
user1182183
hm does anyone have a tut on how to make your own language for Visual Studio 2012 (for example, lua, python etc.. custom language, pawn) + intellisense?
 
@Zoidberg'-- wokay
 
@sehe i said rest of.. as in referring to myself and people like myself.
 
Comment withdrawn. PHP is sooo nice
@johnathon :)
 
user142019
12:54 AM
PHP is terrible.
 
user142019
Almost as terrible as Java.
 
user1182183
@sehe woot, "PHP IS GOOD" post in a PHP hater room
 
user1182183
(I am neutral!!!)
 
Ell
Hi all
 
user142019
Hi ell
 
12:55 AM
@GamErix erm that's not neutral
 
cpx
Hi
What a nice day to start with programming!
 
user1182183
@sehe I just pointed something out, doesn't mean that I hate or love php
 
@cpx what part of the world are you in?
 
user1182183
well I don't have anything against php, ofcourse it's not perfect, but hey all website use it so it's good to learn it
 
user1182183
not here - ment for HDDownloader
 
12:56 AM
You're not being neutral, I think. You just suck at PHP and c++ right. Unbiased, perhaps :)
 
Ell
I haven't drank enough
 
No, not "all website" use it and that's crappy argument
 
kafc
(^ keyboard away from computer)
 
@Ell Drink more
 
Ell
I want to, but have been sent to bed by my father :L
 
user142019
12:57 AM
 
user142019
Me gusta.
 
Ell
I need to think of something good to do with the pi!
 
user142019
Multiply it by two and call it tau like a hipster!
 
@StackedCrooked Psst, where did those begin and end global functions come from? Which header, that is?
 

« first day (806 days earlier)      last day (4146 days later) »