« first day (1432 days earlier)      last day (3509 days later) » 

10:00 AM
ugh
 
haha, free coffee again
 
so can i bind the functions to a local version of sol::state that's the question
 
I fucking love this vending machine!
 
user3010322
Yes.
 
@Cinch why wouldn't you be able to do that
 
user3010322
10:01 AM
@AlexM. Do you love fucking the vending machine, though? That's the real question.
 
lol wtf was that
 
@Jefffrey hmmhmh?
 
Anyway, let's try Sol.
 
lua.set_function("load_gui_skin", load_gui_skin);
 
by the way, yes I misread the T const& thingy
 
10:01 AM
@ThePhD I haven't tried yet
 
error: no matching function for call to 'sol::state::set_function(const char [14], <unresolved overloaded function type>)'|
 
@Cinch what is lod_gui_skin
 
@BartekBanachewicz The exam
 
it's my function
 
@Cinch it's overloaded
 
10:02 AM
It was such a wtf that half of the room forfeit before me
 
which overload do you want to bind?
 
Xeo
Is it a member function?
 
@Jefffrey lol
 
I don't understand
It's a base class
And I only defined one of its type in the header
 
user3010322
... Oooh.
 
10:02 AM
it does this for all the rest of them
 
I mean, it's not like I studied that much, but there were exercises I wouldn't even know where to start with.
 
@Cinch of them being what? member functions? overloaded member functions?
 
user3010322
You've passed it into a class, and now you're trying to load the class' functions into the local sol::state ...
 
Xeo
@Cinch What kind of function is load_gui_skin?
 
member functions of the object GUI_Engine
of which sol::state lua is also a member
 
10:03 AM
@Cinch bind this to it
 
Xeo
well that's not how you pass member functions...
 
I guess she increases difficulty in respect to when you take the exam (if at the beginning of the year or the end).
 
if you have a state local to instance and want to pass its member functions
 
user3010322
(What you're doing wouldn't work in Selene either, just as an FYI.)
 
okay
 
10:04 AM
member functions need an instance
 
Xeo
lua.set_function("load_gui_skin", [this]{ load_gui_skin(); });
(if load_gui_skin takes no arguments)
 
I can use Sol with Lua coroutines, right?
 
user3010322
I don't think Rapptz and I ever explored multithreading with Lua.
 
Ell
I probably
 
@Xeo why capturing this?
 
10:05 AM
uh what if it does?
 
user3010322
Give it a try, see what explodes. :D
 
Ell
lua has coroutines built in?
 
have arguments?
 
Xeo
@Jefffrey To access the member function?
 
@ThePhD Single OS thread.
 
Ell
10:05 AM
@ThePhD coroutines aren't multithreading
 
Xeo
@Cinch couple of options, AFAIK
 
@Xeo but... you are not doing that within the lambda scope
 
Xeo
@Jefffrey yes...
 
@Jefffrey he is doing that
 
Xeo
Since apparently, load_gui_skin is a member function
 
10:06 AM
jefff come on eat a snickers
 
You should vote you butte
 
Can I like avoid C++11?
 
no
 
Xeo
I don't think Sol works without C++11.
Also, why would you?
C++03 sucks tremendously in comparison
 
user3010322
I'm pretty sure we support regular INVOKE semantics.
 
10:07 AM
@Cinch no
 
Okay I don't understand why I need this
and especially in a []
 
    luaVm.register_function("exit", [this]{ this->console.write("OMG EXIT"); });
    luaVm.register_function("print", [this](std::string s){ this->console.write(std::move(s)); });
    luaVm.register_function("recalc", [this]{ this->world.recalcInstances(); });
    luaVm.register_function("recalc_full", [this]{ this->world.recalcInstances(true); });
    luaVm.register_function("save", [this]{ this->world.saveToFile("world.mcw"); });
    luaVm.register_function("load", [this]{ this->world.loadFromFile("world.mcw"); });
that's how I did it in Minicraft
 
lol moving string
 
user3010322
e.g. lua.set_function( "load_gui_skin", this, &GUI_Engine::load_gui_skin )
 
@Cinch why don't you learn C++ first then?
 
user3010322
10:08 AM
^ That... that should work. o.0
 
@BartekBanachewicz that's a reference i know
 
Hmm, coroutines should be fairly easy to do.
Awesome. :D
 
You know using C++ usually requires knowing C++.
 
you don't actually want me to literally eat a sneaker
 
@Jefffrey no not a sneaker.
 
10:09 AM
@ThePhD it doesn't
 
user3010322
Sigh.
 
@BartekBanachewicz snicker, w/e
 
user3010322
Do you have a pastebin of your code?
 
@CatPlusPlus ~Quality C++~ (in all seriousness I couldn't take by reference there)
 
user3010322
A small example?
 
user3010322
10:09 AM
Anything?
 
@Xeo lua.set_function("load_gui_skin", [this]{ this->load_gui_skin(); }); maybe?
 
Same thing
 
@Jefffrey same thing
 
Xeo
^
 
wat
 
10:10 AM
this is implicit within a class you badlet
 
Xeo
You're in the this context in a member function if you capture this.
 
oh
didn't know that
 
wait a minute that's a lambda expression isn't it
 
lol init
 
10:11 AM
@Cinch someone tell this guy about configuration files
 
Let's try to get Sol to work with Lua coroutines and Boost.ASIO.
 
@Cinch use RAII uh
lol okay really fuck this lua thing and learn C++ first
 
user3010322
@Cinch It's supposed to be a lambda: you're not spelling it right.
 
Ell
@Cinch you need to put init in a constructor and cleanup in your destructor
 
Inconsistent naming
> for some reason the first two textures don't load
laff
 
Xeo
10:12 AM
@Cinch Guy, if you're taking advise, at least take it properly. Either set_function("load_gui_skin", this, &GUI_Enging::load_gui_skin) or the lambda version
 
I literally can't copy code
zung zing zong
 
@Xeo like i said, this doesn't work
 
user3010322
WOOPS
 
user3010322
Reverse the args.
 
This conversation doesn't work either
 
10:13 AM
^
it's been like this for 3 days
 
user3010322
set_function("load_gui_skin", &GUI_Enging::load_gui_skin, this)
 
user3010322
this should probably come first
 
user3010322
rather than second in the API
 
user3010322
QoI fixes time...
 
user3010322
How does std::bind and friends do it?
 
10:14 AM
Don't break the API for something stupid like that
 
user3010322
Is the object first or second?
 
Xeo
@ThePhD they don't care
it's an argument, so it comes after the function
guess I should've remembered that
 
@ThePhD okay, now why the fuck does this work and not the other lambda?
 
user3010322
@Cinch Because you wrote the lambda wrong.
 
user3010322
[this] &GUI_Engine::load_gui_skin
 
user3010322
10:14 AM
This isn't C#.
 
Xeo
@Cinch that is not a lambda
 
Does anyone know how I can get a mod to lock a question so people can't comment anymore? I'd use the "flag" thing, but I'm not entirely sure and I'd be flagging me own answer.
 
Xeo
@OMGtechy use the flag and write your reason
 
Thanks
 
@ThePhD That isn't C# either
 
user3010322
10:15 AM
A lambda is [ ... Capture List ... ] ( ... Arguments ... ) { ... Internals ... }
 
user3010322
@CatPlusPlus The idea in C# is you can leave off brackets and shit.
 
iah.
 
dat ....
 
i think i'll just ignore lambdas for now
 
lambdas are cool
 
10:16 AM
Lambdas are awesome
 
lambdas are cool
 
if you want to be popular you should not ignore lambdas
 
python has been using it, isn't it?
 
i know but i'm not ready for them
 
nonsense.
 
10:16 AM
are they functors btw?
 
yes, you are ready, don't be a pussy
 
@Cinch you have no defined meaning of a functor, so why ask.
 
It depends on the lambda
 
meh, lambdas
 
@BartekBanachewicz he has
i gave it to him some day ago
 
10:17 AM
fuck.
 
goats are much better for the sacrificing
 
user3010322
@Cinch All lambdas are effectively implemented as functors.
 
ok I'll shut up now.
@Jefffrey Also fmap you.
 
lambdas are their own type too, much like functors
 
in fact i've even mentioned they are used to implement lambdas
 
user3010322
10:18 AM
@Cinch They're really just syntactic sugar for generating a class that is a functor, plus a convert-to-function-pointer operator on the functor if it has no observable state (e.g., the [ ... Capture List ... ] portion is empty).
 
Burritos also have their own type, much like zings.
Zungs don't zong though.
 
uh also what type are they?
 
sometimes i don't follow
 
datatype that is, the example i have only has auto
 
10:18 AM
Magic type
 
56 secs ago, by OMGtechy
lambdas are their own type too, much like functors
 
Xeo
@Cinch You don't know, and don't care
 
sometimes i'm just confluzed
 
Xeo
the compiler generates one, with magic
2
 
no not the return type
say i wanted to store a lambda in a variable
 
10:19 AM
generic data type
 
We're not on about the return type
 
auto
 
They are their own type
 
i think it's probably string type data
 
user3010322
auto x = [] () { ... };
 
10:19 AM
then interpret as it goes
 
Like @Jefffrey said, you'll need to use auto
 
user3010322
You can observe the type with
 
is that the only way to store as a variable?
 
yes.
 
Xeo
10:19 AM
auto lambda = []{};
// decltype(lambda) == magic
 
I don't like using AUTO because it reduces readability
 
you're an idiot.
 
You can store stateless lambdas in an std::function
 
lol
 
10:20 AM
the type is something like ___magix_gcc_h7hd23h9hd89yoloh3d92_lambda
 
Xeo
@OMGtechy wrong - stateful ones too
 
@OMGtechy true
 
Xeo
and don't bring up std::function now, you will only confuse him
 
haha ok
 
Well I mean for what i'm programming now
I don't need to use auto
 
user3010322
10:20 AM
You do.
 
@Jefffrey Ask Itanium ABI.
 
you shall use it for lambda
 
But when I do get to using the algorithms or iterators and stuff i will
 
@Xeo I thought you couldn't? Not when using [&] as the capture anyway.
 
@OMGtechy You cannot convert them to function pointers.
 
10:21 AM
Capturing references has a lifetime problem regardless of std::function
 
Not necessarily.
 
@Cinch you can either use auto or type-erase with std::function
 
@Cinch then use std::function
 
@Xeo fuck.
 
YOU FUCKED UP
 
10:21 AM
@PolymorphicPotato makes sense, thanks :)
 
but you should use auto
 
I FUCKED UP
 
GO VOTE
 
WE ALL FUCKED UP
 
10:22 AM
i'm beginning to understand std::function
 
I didn't.
 
You don't
 
@PolymorphicPotato lies
 
because auto is even more magic than lambdas alone
 
but i don't understand why you really need a std::function if you have a function already
 
10:22 AM
He doesn't
@Cinch type erasure.
 
and you need more magic to do magical things
 
@Cinch you can pass an std::function around
 
unless it's to facilitates these other types of functions brought into a language
 
yes. no. maybe. sometimes.
 
10:22 AM
well i mean can't i just use a function pointer?
 
Call me when this nonsense is over and we're talking about something fun
 
user3010322
@Cinch The type of a lambda is generated at compile-time and cannot be observed until it is created. Therefore, the only way to grab the type is with auto. You can ruin the magic and potentially incur overhead by putting it in a named std::function, which provides a singular type for many different kinds of functions that have effectively the same argument-and-return-value signature.
 
@Cinch no
 
user3010322
But please, don't ruin the magic.
 
@Cinch not always. Plus, std::function is just a lot nicer to look at
 
user3010322
10:23 AM
Don't use std::function.
 
too late
world is doomed
 
I have no interest in using lambdas right now anyways
 
Pinky Dye.
 
post ponies
 
but I just have a question
 
10:23 AM
1 message moved to bin
 
why use [this]
 
oh god
 
sheeeit, it's pinkie pie
 
nope ಠ_ಠ
 
you have no interest in using anything right now
 
10:23 AM
@Cinch to capture this.
 
Posting ponies is kick
hth
 
So you can access members of *this in the lambda.
 
@CatPlusPlus agreed
 
ah that makes more sense now
 
do you have interest in becoming a c++ wizard?
 
10:24 AM
well enough
 
because it's gonna be hard without magic
 
we should probably get some sort of rule book to write all this in...
 
I'm a butt wizard
4
 
I'm programming a game and I'm also in a Computer Engineering program
So uh, sure?
 
You're butt a wizard
 
10:24 AM
@CatPlusPlus ... sure
 
user3010322
God's speed.
 
@Cinch so... double shit!
 
@Cinch then use lambdas and auto FFS
 
Lambdas for everything
 
@CatPlusPlus did you actually kick?
 
10:25 AM
No
 
yeah but I don't have much use for lambdas right now at this minute
I'll use it when appropriate
 
is there a meta about the lack of audit for kicks?
 
lambdas cure ebola basically
4
 
someone get on that
 
I posted a comment under the announcement but got ignored as usual
 
10:26 AM
also brb catching a train
 
We should just abuse it so much they're forced to implement audit messages
What could possibly go wrong
 
@Jefffrey It is technically possible to write a lambda which cures ebola when invoked.
 
So long as it's linked to nanobots
Nanobots everywhere!
 
ugh okay
so i linked most of my functions
except....
    void add_window(SpritePool gui_skin, int x, int y, int w, int h, bool visible, std::string str);
    void add_button(SpritePool gui_skin, int x, int y, int w, int h, bool visible, std::string str, std::string parent_name);
    void add_textbox(SpritePool gui_skin, int x, int y, int w, int h, bool visible, std::string str, std::string parent_name, std::string def_text);
 
don't
stop
 
10:27 AM
these aren't
@BartekBanachewicz believing?
 
Oh know, you're not stringly typing are you?
 
how many downvotes would I need to spend to bring you under 20 rep
 
Bartek the Belieber
 
uh....
@OMGtechy what?
 
Bartek the Bartender
 
10:28 AM
std::string parent_name, it burrrrnnnnss
 
why?
 
you're showing me terrible code and are surprised I react badly.
 
Because it's on fire.
 
Why not pass a pointer to the parent?
 
oh no, it's the name of an object
 
10:28 AM
@BartekBanachewicz Dunning–Kruger
 
user3010322
@PolymorphicPotato There's an umalaut in that name somewhere, isn't there?
 
@Cinch Why is it a string and not a reference?
 
It's because the parents are stored in a std::vector, managed by the GUI_Engine, and dynamically allocated
3
 
@ThePhD nope.
 
The system makes sure each object is deallocated
So I don't want to mess with it
 
10:29 AM
I don't see how that stops you giving it a pointer?
 
You can make references to dynamically allocated objects.
 
Use a weak reference if you're that worried
But I don't even think you need that
If it's the parent, then as soon as it's destroyed shouldn't the child be?
 
user3010322
Meh.
 
user3010322
He'll learn in time.
 
Well...
 
10:30 AM
Using a string when a reference is a better choice is utterly retarded.
 
I know that but
 
@PolymorphicPotato people like challenge
 
void GUI_Engine::add_window(SpritePool gui_skin, int x, int y, int w, int h, bool visible, std::string name)
{
GUI_Window* window = new GUI_Window(gui_skin, x, y, w, h, visible, name);
this->push_window(window);
}
that's what it wraps
How do I differentiate between two different windows?
Besides index number?
I mean, say I create a Menu and then a HUD window
I'd have to keep those two pointers somewhere...
or I can just label them and call them by the labels that make sense
Does that make sense?
 
@Cinch pointer
You could every overload ==
 
Oh wait I think I might remmeber
I store the base class pointers in the vector
And the object types all vary
Wait, no...
 
10:34 AM
bool operator == (const GUI_Window & lhs, const GUI_Window & rhs)
{
// blah
}
 
Ah yes, I think I remember now
 
const, noobcake.
 
yeah
 
user3010322
GUI_Window meow(gui_skin, x, y, w, h, visible, name);
GUI_Window woof(gui_skin, x, y, w, h, visible, name);

if (&meow == &woof) {
     std::cout << "Shit be fucked, yo.";
}
 
I was about to say xD
@Puppy happy now? :D
 
10:35 AM
@Cinch If you wrote this system yourself, then you're doing it wrong.
 
But the world needs more crappy GUI frameworks
 
Okay, but how do I associate the pointers with the actual windows?
 
They are actual windows you badlet
 
facepalm
 
@OMGtechy another facepalm
 
10:36 AM
Why am I following this
 
There, it's easy to see which window is which
 
Maybe even facefoot
 
But if I dynamically allocate those windows, what names do they have?
 
Joe and Barry
 
I'm giving up.
 
user3010322
10:36 AM
@Cinch What are you using to do development?
 
user3010322
QtCreator?
 
user3010322
Visual Studio?
 
Code::Blocks
 
user3010322
Code::Blocks?
 
Ell
@Cinch I think you need to take a step back and read a good c++ book
 
10:36 AM
Code::Blocks!
 
user3010322
Kinky.
 
lol CB still exists
 
It's alright man
 
user3010322
@CatPlusPlus ikr?
 
Ugh.
 
10:37 AM
I quite like CodeLite
 
user3010322
Thought it had died.
 
I don't understand why the code is bad
 
Continue to use it then, and you shall soon discover
 
I know it's a bad convention to use strings vs pointers but I use the string as the label
 
You don't need any labels
 
10:38 AM
@Cinch it takes time
 
Well, you might need labels, but not for making the hierarchy
 
user3010322
Every object has a unique address.
 
Suppose you have two windows, which you accidentally give the same name, now they appear to be the same window.
 
Also just integrate CEF
 
Which is bad.
 
10:38 AM
Fuck GUI
 
user3010322
CEF?
 
Yes I know that flaw
 
CIF - the cleaning product
 
@OMGtechy And I'll account for it
 
user3010322
Chromium Embedded Framework?
 
10:38 AM
@Cinch why not just solve it?
 
Yes
Unless you have external stylesheets that need to address the windows then you don't need labels
 
Well here:
 
Please just use the address of the object
 
idk why I'm bothering but here's an example
 
it's so much simpler and gives you all the benefits with none of the costs.
 
It's even cheaper to pass man
 
omg itt cat helps
 
I know
 
And get rid of the fucking Init/Cleanup
 
So much string. It burns!
 
10:40 AM
Also learn about single responsibility principle because damn
 
I say this because I have done this once, and it was horrible.
 
@CatPlusPlus CB is niceish. Best IDE apart from VS atm
 
Yeah no
 
What's wrong with the code besides the Init/Cleanup?
I was thinking I should remove those but eh.
I do it to control the order in which my systems initialize
 
Breaks the rule of three.
 
10:42 AM
*five
 
user3010322
Zero.
 
@Loopunroller Meh, no.
 
GUI_Window* GUI_Engine::get_window(std::string name)
{
    GUI_Window* window_ptr = NULL;
    for (unsigned int i = 0; i < window_list.size(); i++)
    {
       if (window_list[i]->get_name() == name)
            window_ptr = window_list[i];
    }

    return window_ptr;
}
Just no
 
Ro5 is quite unimportant.
 
lol linear scan
 
Xeo
10:42 AM
@R.MartinhoFernandes :(
 
user3010322
std::find ?
 
Okay say I replace the string with a pointer
 
Missing it is an oversight, if you will. Missing the Ro3 is just flat-out wrong.
 
@R.MartinhoFernandes Reasons please.
 
How the hell am I gonna know what pointer to input?
 
10:43 AM
The same way you know what string to input
 
Yes, but where do I store those pointers
 
Seriously don't write GUI frameworks
 
So I know what to input?
 
Bah...
 
user3010322
I'm actually going to write a GUI framework one day ._.
 
10:43 AM
nevermind. Have fun!
@ThePhD It's painful, but a good learning experience
 
I mean seriously is it really that bad?
 
user3010322
@Cinch You kind've already are storing the pointers: std::vector<GUI_Window*>
 
Yes.
 
lol singleton
 
Why do you think you need those names
 
10:44 AM
But how do I know which one I want to search for?
 
@Cinch Breaking the rule of three is unacceptably bad.
 
Search where for what
What for
 
@R.MartinhoFernandes not always
 
Let's say I create five different windows
 
@OMGtechy Always. No exceptions.
 
10:45 AM
How do I know what each one is for without the names?
 
If you break the rule of three, your C++ license is revoked.
 
The pointers do not tell me that
 
You don't need to know it
You have the fucking objects right there
 
So do I just use the index?
 
@R.MartinhoFernandes I don't know what that rule of tree is
 
user3010322
10:45 AM
Just keep a named variable around.
 
You use the pointers
 
But that's the thing:
If I keep a named variable around, I can't create more than the number I name
And as far as I know, there isn't another way of automating declaring addtional variables in C++
 
please elaborate
 
like if i have this:
GUI_Window* hello = new GUI_Window
 
10:46 AM
then hello is your pointer
 
gah, new
 
yes
but what if i want to store hello in the vector?
 
Then you go do that
 
user3010322
my_window_vector.push_back(hello);
 
the name "hello" doesn't transfer with it if I try to look up the pointer hello later
 
10:47 AM
gui_skin.load_texture("for some reason the first two textures don't load");
gui_skin.load_texture("hi some reason the first two textures don't load");
 
user3010322
Then you just keep using hello
 
I don't even...
 
No, but I don't ever create that hello you see
 
Your lack of std::unique_ptr disturbs me.
 
I think we need to let him fail, and learn that way (hopefully)
 
10:48 AM
one hello is the factory that creates the objects and stores it into a vector
 
@milleniumbug the force is weak
 
and that's it
 
user3010322
Because your API is violating the Single Reponsibility Principle and is making your life miserable.
 
i never name the windows and set them to a named pointer
 
user3010322
For example...
 
10:48 AM
@Cinch Where do you want to look it up and for what
Wherever you need it, you just pass it along
 
@ThePhD Apparently it needs a virtual destructor to be a polymorphic base.
 
You're incompetent QED.
 
Or...
Maybe the virtual destructor is what is wrong because there are no other virtual members whatsoever.
 
user3010322
That we can see, anyhow.
 
@CatPlusPlus I want to be able to create a variable amount of windows in a way so that they call get deallocated and then be able to call a specific window i want at will to add on widgets to it
 
10:49 AM
As far as polymorphic bases go, it's a rather poor one.
 
user3010322
He is subclassing, though.
 
@ThePhD So what?
 
Seriously don't write GUI shit this is not trivial
 
There's no real polymorphism involved.
 
Shall I show you the base classes?
 
10:50 AM
406
Q: When to use virtual destructors?

LodleI have a solid understanding of most OO theory but the one thing that confuses me a lot is virtual destructors. I thought that the destructor always gets called no matter what and for every object in the chain. When are you meant to make them virtual and why?

 
The dtor is also empty, it seems.
 
user3010322
No no, please, one thing at a time..
 
It's just the usual anti-pattern you learn from crappy Java-ish tutorials or crappy Java-ish IDEs.
 
Class:      GUI_Element
Purpose:    -To provide an ABSTRACT base class for all the GUI elements within the framework.
 
10:51 AM
lol get set
 
Most clear documentation ever.
 
Is that sarcasm?
I honestly can't tell O.O
 
No, it's seriousØŸ
 
Oh I guess that's a compliment
 
10:53 AM
Why so serious?
<meme>
 
Okay I said that thing about not writing this 2 times already I don't care
 
guys, are nested functions really forbidden in C? :(
that really sucks
 
Okay but I already rewrote the structure thrice
 
user3010322
You can write nested declarations though!
 
10:53 AM
So it goes like this:
 
WET: write everything thrice
2
 
GUI_Element -> GUI_Panel -> GUI_Window
-> GUI_Button
-> GUI_Textbox
Each class has it's own individual non-virtual function for rendering and checking input
 
@BartekBanachewicz same reason overloading is forbidden, C doesn't have complex name resolution
 
//dtor yes I can see that it is the fucking destructor.
 
Oh that's just a leftover from the premade class creatore in Code::Blocks
 
10:55 AM
whahaha
 
4 mins ago, by R. Martinho Fernandes
It's just the usual anti-pattern you learn from crappy Java-ish tutorials or crappy Java-ish IDEs.
Knew it.
Stop using premade class creators.
 
Remove redundant shit no matter what or who created it.
 
Typing class foo {}; isn't that hard.
 
Yeah but I also have to create header guards the stuff
I do it because it's faster
 
Typing #pragma once isn't that hard.
 
10:56 AM
Pretty much all premade class creators out there are terrible and written by people that demonstrably don't know C++ (the demonstration being the fact that they wrote those broken class generators).
 
@PolymorphicPotato cough
private:
	//! Private constructor.
	MyClass();
	//! Private destructor.
	~MyClass();
found this
 
Ugh.
 
@Cinch "I am lazy" is not a good excuse for having bad code.
Just no.
 
while strolling through some code here
 
user3010322
 
user3010322
10:56 AM
Anyone have any idea what ^M means?
 
But the program itself runs fine
 
@ThePhD dos2unix
 
Control+M? Dunno. :D
 
user3010322
FML.
 
You have shitty line endings
 
How do I have bad line endings
 
Don't use \r\n for files ever
 
@ThePhD That's a CR.
 
Unless you're on Windows
 
10:57 AM
@BartekBanachewicz That's just execute-around.
 
user3010322
Well, I'm accessing a shared document
 
Only if you use shitty VS because it's broken like fuck
 
@R.MartinhoFernandes shh
 
user3010322
that was unpacked in Windows
 
Ugh what the hell is wrong with my program?
 
10:58 AM
Everything.
 
Like what?
 
user3010322
@Cinch Not you, me.
 
user3010322
I have the bad line endings.
 
Sheesh do I indent wrong or something?
 
@BartekBanachewicz gcc has an RAII extension to C
 
10:58 AM
@OMGtechy Which part of Windows has a strong tie to CRLF?
 
@BartekBanachewicz There's extension for lambdas in C
 
Xeo
@BartekBanachewicz That's broken
 
Xeo
> T* X = malloc(sizeof(X));
 
@BartekBanachewicz __attribute__((cleanup(...)))
Still shit.
 
10:59 AM
(That's not a trick question! There is actually a bit that does)
 
Don't use C.
 
@Xeo oh yeah forgot to change that
 
@R.MartinhoFernandes No idea, but when in rome.
 
btw how's that really different
 
10:59 AM
But uh okay
 

« first day (1432 days earlier)      last day (3509 days later) »