« first day (855 days earlier)      last day (4076 days later) » 

3:00 AM
@Cicada migrating to portable coding, moving away from MS UI
 
The class library is a bit awkward on places
 
user1357851
 
GTK... I heard about that while messing with Linux
For a second, that looked like a hairy taruntula.
 
@Telkitty Awwww yeaaaaah.
 
gtkmm is better than Qt at being modern C++ library in many places
Though Qt5 made improvements
 
3:02 AM
Also Qt uses a custom preprocessor up-front
For their signals and slots
It's not really "pure" C++
In case that bothers you
 
I'll take generated C++ over some random "RC" language anyday
 
Qt uses preprocessor for reflection
 
user142019
MSVC y u no link static libraries.
 
@Zoidberg what did you do wrong again
 
Qt5 did away with string-based connect
 
3:05 AM
I used Qt4, no idea how it evolved since
 
user142019
Also I get a warning about architecture mismatch; MSIL vs x86.
 
user142019
And I'm not even building anything as x86.
 
You're probably bad
 
Are you building with /CLR:pure? If not, do it
 
@Zoidberg go to configuration manager and make sure that the combos in the list are set right
 
user142019
3:06 AM
@doug65536 What should I set them to?
 
To right things
 
user142019
The C# libraries are "Any CPU" and the C++/CLI library is "x64".
 
whatever architecture you like. I suggest x64 unless there is some reason you want to use Any Cpu
 
user142019
I cannot set the C# libraries to x64 since it's not available in the list.
 
3:06 AM
@Zoidberg You're doing it wrong
 
user142019
VISUAL STUDIO Y U NO JUST WORK.
 
Put /CLR:pure somewhere in the general settings page of your cli project
 
@Zoidberg Fuck that, put everything in x64.
 
1 min ago, by Zoidberg
I cannot set the C# libraries to x64 since it's not available in the list.
 
@Zoidberg It does, youre just incompetent.
 
user142019
3:08 AM
@EtiennedeMartel how?!
 
@Zoidberg pick <New...> then add x64
 
I have a better theory
 
@Zoidberg Configuration Manager.
 
oh well if you won't listen screw you
 
user142019
Configuration Manager has the worst UI ever.
 
3:08 AM
@Zoidberg What @doug65536 said.
 
user142019
@doug65536 impossible.
 
user142019
Wait. I'll make a screenshot.
 
Whenever one of my friends leaves his laptop unlocked and unattended: i.minus.com/iwT2bDouoG6u5.gif
 
user142019
 
@Zoidberg uncheck "create platforms" thing
 
user142019
3:10 AM
But it's not in the list if I click the arrow on the drop down box.
 
user142019
Oh thanks. :)
 
yeah, the config UI is kind of bad. oh well
 
whoah
 
@Zoidberg FYI, you can press Ctrl+C in a messagebox to copy the content to the clipboard as text. would have saved you a lot of trouble there
 
if you use a transparent png as your desktop background
it displays the XP hill D:
 
3:12 AM
:O
 
Unless you're in a poor country
 
lol
 
I always take my desktop wallpapers from desktopography.net
 
I always take my desktop wallpapers from the RGB cube
(It's always black)
 
I steal mine from /wg/
 
3:14 AM
rofl the rgb cube
 
user142019
I have a LittleBigPlanet wallpaper.
 
desktop? what's that? the thing I see for about 20 seconds before I open 50000 browser tabs, consoles, and IDE's?
 
@doug65536 Yep
 
user142019
But yeah basically what the fuck.
 
i don't use it either but i like it to look clean
 
user142019
3:15 AM
I link to all LLVM libraries but I still get a linker error.
 
user142019
And only when I include an LLVM header.
 
vs2012 doesn't support default/delete?
 
@Zoidberg add /VERBOSE to the "command line" part of the linker options in the project
 
user142019
And where the fuck is IRBuilder.h.
 
o_O
I changed my desktop wallpaper and VS 2012 immediately crashed and restarted.
 
3:18 AM
makes sense
 
WM_SYSTEMSETTINGSCHANGE is sent to all top level windows when you do that
 
Makes sense
 
And.... it crashes VS?
They can't handle window-messages?
 
user142019
1>  Unused libraries:
1>    LLVM\libgtest.a
1>    LLVM\libgtest_main.a
1>    LLVM\libLLVMAnalysis.a
etc...
 
For realsies? o_O;
 
3:20 AM
everything is possible
 
user142019
STUPID VISUAL STUDIO I TOLD YOU TO LINK TO THOSE YOU PIECE OF SHIT.
 
@ThePhD That makes no sense
 
@ThePhD not justifying it, just showing that it's a rational cause and effect possiblity
 
.a ?
why is it making .a ?
this is windows
 
user142019
3:21 AM
.a is a static library.
 
MinGW takes .a
And not .lib
Usually.
 
windows uses .lib
 
user142019
Does it seriously look at the file extention? ;_;
 
yes probably
 
3:21 AM
Lol
 
gcc does the same fyi
you throw a bunch of files at gcc
and he decides what to do
 
GCC only lets you link by name unless you do that weird specify-long-direct-file-name.
 
unless you tell him
 
The names are always appended with .a, and usually prefixed with lib.
 
i'm not sure naming these .a is a good idea
maybe it doesn't change anything but who knows
 
3:22 AM
MSVC linker takes filenames
 
after all, it crashes on desktop change right?
 
Lol
 
What I'd check is the fucking file format not the stupid extension
 
I'm gonna change it again
Just to amke sure.
 
But hey, what do I know about computers
 
3:22 AM
@CatPlusPlus That's how I do my magic number system! :D
I check the first bytes of the file.
 
maybe try adding #pragma comment(lib, ..)
 
Yes that's how magic numbers are used
 
idk really
 
they are archives. they are like zip files with no compression and next to no ways of doing anything to them
 
It doesn't work too well on Text Files, though.
 
3:23 AM
There's a whole database of magic numbers
 
Those are a crapshoot.
 
who the fuck invented magic numbers
 
Magicians
 
@CatPlusPlus AFAIK libmagic is the most comprehensive one. But I could never get at its source, so I have my own.
 
3:24 AM
are there still people on 9fag
 
user142019
1>  Unused libraries:
1>    LLVM\libgtest.a.lib
1>    LLVM\libgtest_main.a.lib
1>    LLVM\libLLVMAnalysis.a.lib
1>    LLVM\libLLVMArchive.a.lib
 
user142019
Meh. :<
 
user142019
I've always hated linkers with a passion and now I know why.
 
Are you even using imports from those??
 
@Cicada Silly question
 
user142019
3:25 AM
@Cicada does it matter?
 
user142019
If I tell the linker to link, the linker must link.
 
user142019
It must do what I tell it to.
 
user142019
I'm the boss and the linker is my slave.
 
@Zoidberg Yes
 
3:26 AM
new.weavesilk.com this is cool
 
@Zoidberg Well yeah? D: You can force him I suppose
 
@CatPlusPlus Sexy. I should incorporate the source into my project. I hope it's public domain.
 
@ThePhD 2-clause BSD
 
user142019
Well I can force specific symbols.
 
3:30 AM
@CatPlusPlus I've never really looked at teh BSD clauses...
Guess I should now.
 
magic number: read two bytes and bang, you know what to do. maybe read to eol, and you know what to do. overoptimized
 
@Rapptz Hello attractors
 
@doug65536 I usually just grab the first 12-16 bytes.
 
@Zoidberg There's a series of posts on The Old New Thing about linking
From January
 
for an interface should i use a pure virtual destructor or empty virtual one?
 
user142019
3:44 AM
Pure virtual.
 
user142019
But you still have to implement it.
 
user142019
I don't really think it matters.
 
user142019
But I'd do this.
 
user142019
class foo {
public:
    virtual ~foo() = 0;
};
inline foo::~foo() { /* dtor must be implemented */ }
 
what? no such thing as pure virtual destructor right?
 
3:46 AM
ofc there is lol
 
user142019
You have to define dtors, even if they're pure virtual, unless they're implicit.
 
@Zoidberg describe why that's better than virtual ~foo() {} inside the class
 
@doug65536 you can have virtual destructors I thought?
Just not virtual constructors.
 
not pure. or am I wrong
 
user142019
@doug65536 because the class is still abstract if you remove all pure virtual methods. :)
 
user142019
3:47 AM
I'd say consistency/matter of taste.
 
what's a "pure" destructor?
 
pure-virtual
= abstract
 
user142019
A pure dtor would be a dtor without side-effects that doesn't depend on global state (i.e. no-op because dtor returns nothing).
 
oh I googled it
29
Q: Pure virtual destructor in C++

Ivan KrechetovIs it wrong to write: class A { public: virtual ~A() = 0; }; for an abstract base class? At least that compiles in MSVC... Will it crash at run time?

 
@Zoidberg I guess I've never had much implementation in a destructor. that technique could be a way to handle forward references, putting some declaration that your definition needs between foo destructor declaration and definition
 
3:49 AM
a pure method is a method that doesn't depend on state
 
user142019
And performs no side-effects.
 
also that, yes
 
user142019
Pure functions are the best functions.
 
@Zoidberg just the semicolon would also work right? instead of ` = 0;`
 
don't mix pure with pure virtual
pure virtual is just c++'s name for "abstract"
 
user142019
3:51 AM
I'd probably be better off with writing code generator myself than using LLVM.
 
purity is an unrelated, broader concept
 
user142019
Or porting LLVM to C# LOL.
 
user142019
@doug65536 no.
 
user142019
That's a decl of a non-pure-virtual dtor.
 
user142019
Ohh in this case yes it works too.
 
3:51 AM
@Zoidberg What kind of code are you trying to generate
 
user142019
@Cicada x86-64.
 
but why are you pretending it won't be defined? it's guaranteed to be defined, right?
 
@Zoidberg From what kind of application, C#?
 
user142019
4 mins ago, by Zoidberg
I'd say consistency/matter of taste.
 
user142019
@Cicada yes.
 
3:53 AM
ok, just making sure I didn't have some wrong idea
 
user1357851
@doug65536 how do I make an array of hash in perl? :x
 
user1357851
push (@contents, \%content);
 
user1357851
doesn't seem to work
 
@Telkitty goto perl room
 
user142019
You cannot have arrays of hashes.
 
user142019
3:54 AM
You have arrays of references to hashes.
 
@Zoidberg There's AsmJit for C++. I don't know if there's something similar for C#. You could P/Invoke or DllImport, I suppose.
 
user142019
Oh well.
 
user142019
Playing with machine code is fun anyway.
 
Doing it from the managed world prolly isn't the best idea, though
 
user142019
I already got a function that returns 42 to work.
 
user142019
3:56 AM
@Cicada Why not.
 
user142019
Also yes I obviously need unsafe if I want JIT. :P
 
Because I have a feeling that the runtime doesn't "just work like this"
I mean, you can JIT MSIL
But there's plenty of hidden stuff going around, like method caching, relocation and stuff
So idk.
Maybe it works just by chance. Maybe not.
 
user142019
I need to think of a good abstraction of machine code that is portable.
 
@Zoidberg =_=
MSIL???
 
user142019
Does that compile to machine-code ahead of time too?
 
3:58 AM
of course
 
user142019
Or only JIT?
 
user142019
Oh. lol.
 
user142019
Let's see.
 
user142019
But wait.
 
butt weight
 
user142019
3:59 AM
Doesn't that bring extra dependencies for the final executable?
 
Yes no depends
 

« first day (855 days earlier)      last day (4076 days later) »