« first day (897 days earlier)      last day (4052 days later) » 

12:00 PM
@MartinJames I'm probably going to be
VS2012 loaded up
Let's see what I can do with this baby
 
Several hours later.... :)
 
nothing
that's the point
I mean you can write something easy
but sooner or later it will be like fuck
it doesn't have X
 
I like the user-defined type highlighting
waiting for something to fuck me in the ass now.
 
user784668
@BartekBanachewicz X sucks
 
Don
Hellohh thar
 
12:04 PM
Mmm. getline would be the pragmatic approach - as in quick and dirty. I wouldn't go so far as to describe it as "a great" way, except for... getting whole lines of input (imagine a format allowing [[1,3],[2,4]|5]). My $0.02 (the other $2 is in my answer) — sehe 25 secs ago
Good day everyone, I'm offline
 
@Magtheridon96 as editor it works nice
 
@Don LO. Beware - it's 'Install Visual Studio' day. Unsurprisingly, it's just before April 1st.
 
user784668
@MartinJames good thing I have it installed already
 
Don
D:
 
hallo) How can i recover my local repository using remote repository?
git
i have a local folder with code copyed from remote repository
and i add some files here
now i want to remove all changes ang get native remote code
 
12:07 PM
no
 
@GLeBaTi git reset --hard
 
user784668
mkfs.ext2
 
Don
If you initialize an object on a constructor like so: MyClass(void):foo(/*param*/){} it obviously creates a body for the constructor, therefore I can't implement my own anymore unless I just copy the whole existing ctor into it, is there any better way of doing this? ;x
 
@Don that doesn't make sense
 
Don
I'll just use pastebin to show more proper code
 
12:08 PM
and obviously you terribly misunderstand something
and use gist goddamn it
why do people keep using pastebin
 
Is there any theoretical performance difference between (const std::string& s) and (std::string& s) assuming 0 compiler interference? No, I'm not optimizing shit prematurely, I'm just wondering
 
@Magtheridon96 you are wondering prematurely
 
@Magtheridon96 const is a sanity check, not an optimization.
 
@BartekBanachewicz is this command touch(edit) remote repository?
 
@GLeBaTi no
it works locally
 
12:10 PM
@DogPlusPlus Okay, cool
 
user784668
@Magtheridon96 actually yeah, libstdc++ std::string uses CoW (which is illegal, but still), which means that accesses through a mutable ref will result in some funny checks and possible unsharing; these won't happen through a const ref.
 
Aw shit, GMT>BST, gotta go get ready for Sunday card game.
 
why is it illegal?
Can you do something legal that CoW will break?
 
Basically, you put it when you make a promise to yourself that you won't change it so in case that you do mutate the object, the compiler bitchslaps you.
 
user784668
@BartekBanachewicz because the standard is worded in a way that disallows it, duh
 
12:12 PM
@BartekBanachewicz thanks)
 
@BartekBanachewicz C++11 forbids it. It was legal under the C++03 wording
 
@Fanael Sometimes, I just can't pass them as const which saddens me because it breaks the symmetry in my header files :c
 
It's no longer legal under... jalf cut me off. :(
 
Well I can understand the word illegal thank you
I was asking why, i.e. about reasoning
 
@BartekBanachewicz you're welcome :)
I can't remember. The last time I got into a discussion about the semantics of std::string it took us days to get to the bottom of it.. I don't want to go there again... ;)
 
12:13 PM
@BartekBanachewicz Multithreading issues, for one.
 
that class has some absurdly contrived wording
 
user784668
@DogPlusPlus not an issue, libstdc++ does it right
 
they should reword it then, to allow correct implementations to exist
 
Also, CoW is dangerous.
 
12:15 PM
@Fanael well, it is sort of an issue in that under a CoW implementation, thread safety requires additional overhead which could otherwise be avoided. :)
 
It's playing with firebits.
 
WHY ARE THE MENU ITEMS IN CAPS
 
Copy Me Maybe.
 
@Magtheridon96 you can change it if you don't like it
 
@Magtheridon96 BECAUSE OTHERWISE YOU MIGHT NOT PAY ENOUGH ATTENTION TO THEM
 
12:16 PM
WHAT?
 
OH OKAY
 
FILE EDIT VIEW DEBUG SQL TOOLS TEST ARCHICTECTURE ANAL WINDOW HELP
 
They're Visual Studio's sole concession to the whole Metro thing, so THEY'RE DAMN WELL GONNA MAKE SURE YOU NOTICE THEM!
 
21 mins ago, by Bartek Banachewicz
Oh god WHY THE FUCK DO I NEED A POPUP ABOUT CAPSLOCK ON FOR HALF OF THE SCREEN YOU FUCK
 
Don
@BartekBanachewicz I added some comments that describe what I was thinking of doing but I'd love to know what you think about that and if it would actually work gist.github.com/anonymous/35dcba4591cfdcb19c97
 
12:17 PM
ANAL-IZE
 
@jalf Particularly, there are many places where you might only read, but the class can't know that, so it has to be absurdly pessimistic about what might be a "write".
a class intended for COW with a different interface may well fare better than std::string.
 
@Don get rid of raw pointers
also I believe you have no idea what a constructor is
 
A constructor makes tractors that can be driven by con-artists.
 
nah, back to books.
It would take to much time to explain.
just get Primer, for example.
 
user784668
@BartekBanachewicz ideone.com/9myDvU
2
 
12:20 PM
@Fanael ohoho.
funky.
I wouldn't imagine.
 
Don
@BartekBanachewicz What did I do wrong in that code that I sent you that makes you believe I have no clue what constructors are?..
 
new sleep
 
user784668
Seems that not_equal_to is not blessed, unlike less/greater/…, but the point stands.
 
@Don you can use setup in constructor, just make it private
but I see no reason for not putting the code simply in constructor
 
How does one handle AppStates WITHOUT a manager? :L
 
12:25 PM
uh
a lot of ways
depends on the application
 
user784668
@Magtheridon96 by handling AppStates
 
or that.
using a manager or singleton is like hitting screws with a hammer just because you can't be bothered to look for a screwdriver
 
Oh wait, I think I got it
I would create an AppState instance in the main App class
 
Don
@BartekBanachewicz So technically changing the title of my constructor in the implementation to the same one as I have in the header should be alright? Like so: myApplication::myApplication():bar(&foo){ //the original code }
 
12:28 PM
no, App is not a singleton or a manager
 
@Magtheridon96 how do you do it WITH a manager?
 
@Don what the fuck is "title of constructor"
@Magtheridon96 fyi that's something that should be done in script language in games
just sayin'
 
@jalf My manager just keeps the current appstate stored in an int and it provides a method for changing between appstates and that's about it. I'm trying to get rid of it because the design is terrible
 
state stored in an int seems legit
 
@BartekBanachewicz yeah, you are right about it having to be part of the game rather than the engine, but this is for the level editor atm :/
 
12:30 PM
@Magtheridon96 what's the problem in using script language in level editor again?
 
Don
@BartekBanachewicz The.. name of the method? in the code I sent you it was myApplication::myApplication(){ while in the header it was myApplication():bar(&foo){
 
@BartekBanachewicz .. I see what you're getting at here.
 
@Don the name is the same in both cases
9 mins ago, by Don
@BartekBanachewicz What did I do wrong in that code that I sent you that makes you believe I have no clue what constructors are?..
 
Don
@BartekBanachewicz k
 
@Don have you even tried compiling it?
 
Don
12:32 PM
No I'm just trying to understand it
Thanks for throwing me some info, sorry for being a bother though
 
that's why I suggested a book
because you won't magically spawn knowledge in your head y'know
 
Don
Yeah they all suggest books here and I understand why, but I just had a few things I was wondering about and I came here to get a better understanding
 
I am afraid you will get incomplete knowledge by this
 
Don
A book will probably fill in the lack of knowledge I have, do you have any specific book that you'd recommend me buying?
 
@Don I bought C++ Primer and I find it very nice
 
12:44 PM
I went to see my grandma and now I'm after 3 shots of vodka (it is 3PM and I only ate breakfast)
 
:poland:
 
Yup
That's the emoticon above btw
 
oh indeed
I think @kbok Variant type is borked, as a side note.
 
So Merry Easter everyone
 
oh yeah food
 
user1357851
12:50 PM
you drinking vodka with your grandma? you legend :p
 
@CatPlusPlus Food.
No moar. :'(
Owned.
Owned again.
 
.htaccess saves
 
user1357851
 
Telkitty, y u no go away and make this Easter a memorable one?
 
1:02 PM
oh my god colleagues premature optimizing
~lower memory usage~
 
That's what she said
 
good, you ain't grumpy
Wanna discuss the Variant? I am just not sure how to bite it
 
user1357851
@DogPlusPlus same reason why you people spend Easter here
 
What about it?
 
lua::variant is a concept of a cross-language type
i.e. type that can hold values that C++ can read but in Lua meaning, more or less
so for example, when C++ calls Lua functions, it returns a vector of Variants
(that's one use case)
 
user1357851
1:05 PM
I should have got this Android version done by the end of March ... omg it's April 1st!
 
but now, what is C++ code user suppsoed to do with it?
 
I'd call it lua::value or something
Variant kinda implies a sum type on a closed set of types
Unless Lua doesn't have user-defined types or something
 
well kbok used boost::variant inside
no, Lua has only limited set of types.
 
But what you need is marshalling support
 
1:06 PM
A way to convert C++ types to Lua types and the other way around
 
My PoC didn't use additional type, I just provided get specializations that return optional
@CatPlusPlus point is, Lua types can change at runtime.
 
@BartekBanachewicz So?
 
so when you get a lua::value, it can have anything in it
 
Same principle as with boost::variant
You act depending on the type of the value
If it's not the type you can support, you bail
 
You can't act in vacuum.
 
1:09 PM
(Or convert)
 
but how is the user supposed to get a type from it.
I mean in code.
 
Boost.Variant uses visitors
 
what interface would you like to extract something from it?
kbok just did typedef boost::variant<signed int, double, bool, char const*, nil> variant;
 
AFAIR it's something like struct visitor : boost::static_visitor<return_type> { return_type operator()(const T1& value) const { ... } return_type operator()(const T2& value) const { ... } };
 
yea that's what he did
 
1:10 PM
For boost::variant<T1, T2>
Then you do boost::visit(variant, visitor()) or something like that and appropriate operator() is called
Your interface with optionals is fine
An empty optional signals a type error
(Or you could throw)
 
so I should combine it?
(I throw now)
i mean, use get interface, but operate using visitors internally?
That sounds like an idea
 
If you already got a variant-based code then sure
 
yea, apparently me and kbok wrote parts that fit together instead of writing the same thing
which is nice.
 
Variant here is not strictly necessary really, but I don't know Lua interface much either so hard to tell
 
Lua interface is in C. 'nuff said.
 
1:14 PM
I only remember unwieldy API based on horrible stack concepts
 
yeah, it is both of those things
 
and we are fixing both.
 
Didn't really get into types
 
what, by re-implementing the Lua VM?
 
no, by wrapping the original API
 
1:15 PM
good luck with that
 
we thought about modifying VM
 
many have tried, all have failed, essentially
 
There's Boost.Python-like wrapper already fyi
 
@DeadMG so far it shows very promising signs of not sucking
 
LuaBind
 
1:16 PM
:/
terrible.
 
I hate it when you ask a question and nobody gives you the right answer... but they expect you to accept one :\
 
All these LuaBind, OOLua, whatever, are outright terrible
 
If it doesn't answer your question then don't accept anything
Lua is outright terrible so this adds up :v:
 
I know someone who worked in detail on a Lua wrapper
it's not really that simple
 
I am not saying it is
 
1:17 PM
The API is really bad
 
vm.registerFunctionAsGlobal("cppfoo", []{ cout << "yes, I called that\n"; });
^ my PoC
 
user1357851
Does anyone know any good philosophy chat rooms? You might even get rid of me if you do indeed know one - at least sometimes
 
Name too short
 
that's not impressive
 
do it using raw Lua API, I dare you
 
1:18 PM
vm.register_global
 
In my experience, any chat room can become a philosophy chat room... but no, I don't.
 
@CatPlusPlus names are subject to change
 
Or maybe function I don't think Lua has modules or whatever
 
@BartekBanachewicz I've done a lot more using the raw API
 
I thought about writing a generic scripting host
But meh
 
1:18 PM
@DeadMG care to show the code?
 
not especially, it's dead and gone now
 
@CatPlusPlus Java has one, IIRC
@DeadMG cough
 
much like virtually every other Lua wrapper in existence
 
C++11 is essentially required to do anything sane
and given all these wrappers don't use it...
 
I had a thought yesturday. Things used to be made in assembly. And, I mean, things like SMB. Were they better, as programmers? I am conflicted.
 
1:22 PM
@BartekBanachewicz Some of the ones I've seen do.
@Pawnguy7 The fundamental task of programming in assembly like that is totally different to programming today.
 
@DeadMG well Havok just rewrote the VM, I believe
 
@DeadMG Can you expand on this?
 
@Pawnguy7 you write different things
I mean, things that now can be written by one person were unimaginable
 
@Pawnguy7 Programming a simple game in assembly is all about not making errors and manually managing small sections of code to an extremely high precision.
programming today is about managing complexity in vast codebases in the easiest way possible on the largest scale
 
yeah, so when coding in ASM you could really make something simple and everyone was like WOW
now every newbie can download UDK and teach yourself to it over a weekend...
 
1:24 PM
more relevantly, it was a vastly smaller scale
 
Well, I'm off to bed. Have fun with Lua.
 
:o
 
"I made a string concat function in ASM"
 
Goood niiiight.
 
"FUCKING AWESOME MAN GIMME 5"
 
1:25 PM
I see what you mean. Still, were they not better programmers? About the same? Neither?
 
"better" implies that the two skills are remotely comparable.
they're not.
 
@Pawnguy7 they were different programmers.
 
Well. Some of them must have made the first compiler. Could you make a compiler, in assembly?
 
dunno
but it's also irrelevant and uncomparable
not least because those compilers only ever had to work on one machine, in vastly more restricted conditions, and could only compile massively simpler languages
 
Why would you want to write a compiler in assembly
Waste of time and energy
 
1:30 PM
I didn't state what language was compiled.
 
It doesn't matter
 
I find it easier to believe that they were able to make a compiler in something like BASIC as an example
maybe not BASIC, but pretty sure it's not assembly directly
 
BASIC interpreters had to be implemented too
 
Somebody had to make BASIC.
 
I know, but it's simpler to make a BASIC interpreter in assembly first :p
 
1:31 PM
BASIC is simple to implement
 
not saying it's simple, but it's certainly simpler than C
 
FORTH interpreters in assembly aren't that complicated either
 
that being my core point
the entire skillset required is totally different
 
well after you have one compiler you can use it to make better compilers :P
 
So you are saying, assuming we could find an individual who has been programming in assembly for, say, 20 years, they would be bad at non-assembly programming?
 
1:33 PM
not necessarily that they would be bad
 
if he programmed only in assembly, then yes
 
well, they sure would be if they had never done anything else
 
I see.
I guess they got to debug a lot :D
 
nothing like debugging Java
 
1:35 PM
Yes, debugging Java is so hard
Assembly is a waste of time
 
user1357851
lol? try debugging database installed on iphone/android
 
Is this sarcasm?
 
Its use cases today can be counted on one hand
@Pawnguy7 That Java is hard to debug? YES
 
ISAs have been designed for compilers instead of people for like, 30 or 40 years.
 
It should be pretty obvious
 
1:37 PM
Was the first reply literal? As in, not that Java was of greater magnitude, but rather as how one would compare to things on opposite sides?
 
@CatPlusPlus tell that to uni teachers
@Pawnguy7 you think too much :P
 
@Pawnguy7 It's totally different. Also, Java programs grow far larger than assembly programs.
 
Probably, but as I have said, I am not good with sarcasm. And, this is the internet.
 
@Pawnguy7 What
 
user1357851
Oh dear, you are on the internet, get used to the sarcasms, especially on programming/gaming related forums/chats
 
1:40 PM
you gotta love specialization for empty functions
 
Any hardships in Java debugging come with retarded overdesigned pseudo-OO architectures created by idiots, which thankfully you can skip for the most part
 
I didn't say I wasn't used it, I said I am bad at... for lack of a better word, correctly parsing it, such as this case.
 
Debugging assembly is hard even if it's your own code
 
Lol.
There's no printf or in Assembly.
Either shit fucks up or shit works.
 
oh and now const char * got matched as bool
 
1:41 PM
I probably cout-debug more than I should, but I am to lazy to run it to a breakpoint... I think I lost time in the long run.
 
@ThePhD Er what
 
@ThePhD there is a debugger
 
There we go.
 
Any source-level debugger can also debug on instruction-level
 
No printf, but there's stepthrough debugging.
 
1:42 PM
which is by far better.
 
You can call printf if you want
 
user1357851
Java is hard to debug only if it is multithreaded and the code resides on another continent and you wonder why sometimes it takes 1000ms for some packets to reach you but other times others only take 30ms
 
Which will tell you about all those lovely register values you have.
 
also yes
why not call printf
what's the fucking problem
you can even call MessageBoxA
 
Well, I'm assuming if you're writing assembly, you don't have printf to begin with. =l
 
1:43 PM
then make one
 
Which is a tiny fraction of those use cases that can be counted on one hand
Namely freestanding systems
 
on freestanding systems you can use LCD
and write on it.
 
Or video memory if you're writing an OS (but then again you can write this in C++ not assembly)
 
writing in assembly is more or less useless
as much as I hate C, it's by far better
asm is not even a language for me.
 
asm is a last resort.
 
1:47 PM
Asm is not a resort at all
Outside of few special cases, it's not relevant
But then again neither should be C and yet people are using it so w/e
 
Since this is generally the lounge, I got a quick question, has here played infinity blade 2 ?
 
Come to think of it... somebody had to make ASM...
 
C's usage is in its ease of use and ability to write a parser/compiler for your little mobile trinket that fits in 1 KB.
 
C is not easy to use
 
@BenjaminGruenbaum first part was as dumb as one can imagine, so no
 
1:49 PM
It's easy because it's ruleset is tiny.
 
@Pawnguy7 If you'd like, there is a great tutorial on creating a dumb computer from scratch, followed by creating a language like assembler, and then C
 
No, it's not easy
 
@ThePhD asm ruleset is smaller
 
That ruleset becomes easier when you take malloc off the table entirely, which most (tiny) Mobile platforms do too.
 
so no, C is not easy to use
 
1:50 PM
It's not easy
 
@BenjaminGruenbaum That sounds interesting.
 
@BartekBanachewicz Was the first one really short too?
 
No language employing undefined behaviour is easy
 
Only good use-case for asm that I've seen other than OS meddling is very fast computation where things that are often considered premature optimization actually make a huge difference. The Great Internet Mersenne Prime Search is an example. I participated in it in the past and it took me 2 months to check whether something like 2^51 million - 1 was prime or not
 
@BenjaminGruenbaum I don't know. I passed after 5th bloodline
 
1:50 PM
@Pawnguy7 It's a course in many universities/colleges, you can get (at least up to the asm part) for free (maybe the whole thing?) at nand2tetris.org
 
@Magtheridon96 SSE, maybe. Assembly, no
 
@Magtheridon96 thats not a good use case
 
Ask @Mysticial how much he wrote in assembly
(He has the world record on pi digits fyi)
 
IIRC he wrote it in C/C++
 
he also states he doesn't know C
 
1:52 PM
=O
 
so yeah that goes for C
 
yeah, I don't think he did any assembly-level code
 
@Magtheridon96 so yeah saying C++ isn't well suited for fast computation is FUD
 
He uses a lot of SSE intrinsics because C and C++ compilers are not very good at vectorisation yet
But writing this directly in assembly has no benefits
You throw away a (crappy but still) type system
And automatic boilerplate
 
writing it in assembly is still harder than using SSE intrinsics
 
1:54 PM
and get nothing in return
 
And gain nothing
Because intrinsics are basically 1:1 to CPU instructions anyway, and everything but them is better generated by the compiler
 
@BartekBanachewicz They didn't have the compilers that we have today when the software was written :/
 
@Magtheridon96 too bad
also GPGPU
all these CUDA crap and so on
hint : no assembly
 
They didn't have electricity in the past, too
 
sometimes, I question my ability to gain speed through hardware acceleration
 
1:56 PM
Obviously lack of electricity is the best solution to everything
 
I have one of the worst GPUs you can buy today
 
@Magtheridon96 buy something like GT620 :shrug:
 
It's still faster than your CPU for what it was designed for
 
I have an integrated one :D
 
1:56 PM
in fact, they probably don't even sell it
 
@Pawnguy7 Intel one?
 
GPUs are specialised chips
 
with specialized compilers
 
They're not just generic CPU bolted on the graphics card
 
1:57 PM
having stuff like hardware matrix multiplication certainly helps
hi @Robot
 
@BartekBanachewicz I believe so. 4 series express chipset family.
 
@Pawnguy7 ah, the ones in chipsets were meh
things got rolling after they were put in CPUs
 
better for the pipeline? (bottleneck-wise)
 
I believe the pipeline is still slower than between my i7 and GTX670
 

« first day (897 days earlier)      last day (4052 days later) »