« first day (1017 days earlier)      last day (4157 days later) » 

17:00
@rightfold About the wasps we talked about yesterday... well, today I killed 21 more of them which makes it 42 so far. :D I doubled the score today. ;)
Didn't know constructors could be virtual. — Jeffrey 1 min ago
^ okay...
@sehe You made a typo.
> Both, STL and Qt Containers opt for non virtual constructors.
Both, STL and Qt Containers opt for non virtual constructors.
constructors :x
17:00
@Rapptz I noticed. Hehehe
@Rapptz Hes a bear so... he made a typaw
5
constructors :y
terrible pun, deal with it
constructors :z
@Jeffrey baha nice
Ell
Ell
17:01
@Borgleader sigh
@Borgleader LOL nice
@Borgleader this made me cry; but it's not bad
@Borgleader I'll bear with you
5
I can has hotpaths
17:03
And I'm still struggling to understand if the answer is a yes or a no. He is talking about the lack of virtual destructors which makes me think it's a yes but at the same time I was expecting a no.
@Jeffrey it's a definitive no. Lack of virtual destructors means no inheritance
No virtual destructor means you shouldn't inherit from it unless it's a private inheritance and you use using stuff::method.
14
A: Why do we actually need Private or Protected inheritance in C++?

Luc TourailleIt is useful when you want to have access to some members of the base class, but without exposing them in your class interface. Private inheritance can also be seen as some kind of composition: the C++ faq-lite gives the following example to illustrate this statement class Engine { public: E...

Then how should I deal with a "model" class that contains a containers? How should I allow the iteration over it?
17:06
also that shows that std::stack::push is extremely slow for some reason
Thats new o.O I dont remember seeing performance numbers being embedded like that before
Also, wait. But what's the problem with non virtual destructors if I don't add member variables to the object?
@Borgleader pretty cool,eh?
yeah thats actually really net
@Jeffrey that's an edge of tragedy
@EiyrioüvonKauyf this is kinda retarded, because it's not testing stack. it's testing deque
std::vector is a better stack IMO anyway.
heh, still push_back is the most expensive operation
@BartekBanachewicz how about std::list. seems faster?
17:13
@EiyrioüvonKauyf why should it be faster?
I'd say it would be much slower
well vector looks faster than deque anyway
also ugh no std::stack::reserve
@EiyrioüvonKauyf lists are slow, so very slow
@JerryCoffin and in general, I forgot to tell you (that was too obvious for me) this algorithm shines when run on 300 GPU threads. So well, I expect reasonable gains from parallelizing it on CPU too...
@BartekBanachewicz Do you build the whole GL SDK or just GLLoad?
@Borgleader it really depends on what you are doing.
just glload
17:18
It's obvious that accessing a specific point in the list is slow compared to a vector.
@Jeffrey no, pushing back is painfully slow
@Jeffrey even iterating is slow as hell.
cuz indirections
@BartekBanachewicz says who?
@Jeffrey ugh, everyone? just think about number of operations required in both cases
Oh noes
Is thepiratebay down for all of you?
std::vector should be preferred to std::list for 99% of the time.
@Magtheridon96 aye
Every node is a heap allocation. Unless you put in a special small-block, managed-heap allocator, you'll be fucking your own mouth in a std::list for each and every allocation.
@BartekBanachewicz you do realize that std::list is a double linked list right?
Compare to std::vector, which forward-allocates many spots for you to push_back/emplace_back into, and only resizes when capacity is full.
17:20
@Magtheridon96 isup.me
If you want a singly-linked list there's std::forward_list. I.. think. I might remember that wrong.
@Jeffrey which means at least one redundant operation
aaaanyway
I am not sure how to properly time the function :/
@BartekBanachewicz You're on linux right? So you compile gl_load_cpp.cpp and glx_load_cpp.cpp? Also, static lib/dll?
I compiled it into a static lib but I'm getting a lot of unresolved symbols.
@Tuntuni I compiled it on both OSes.
@BartekBanachewicz which we also have with the vector.
17:21
@Tuntuni sec
@Jeffrey what. what are you talking about
@BartekBanachewicz I'm on Windows and I used cl and lib from the command line.
@Tuntuni I've used g++, and MSVS solution for MSVS compiler
@BartekBanachewicz nevermind
@BartekBanachewicz How'd you get the solution?
@Tuntuni using premake? o.O
17:22
You made it?
I didn't use premake :P
Never used it and didn't have the will to download it.
Guess I'll have to xD
it has 400kB. seriously.
I was lazy :P
therefore you are wasting time?
way to go.
17:23
eh :/
i thought i could compile it on my own. i'll check the command line from the solution to see what i did wrong
@Tuntuni that's uselessly unnecessary
@BartekBanachewicz True, but I'm trying to get used to compiling from the command line with cl because I really hate firing up VS for single test.cpp files.
@Borgleader <3
@Tuntuni if you are not using ide then use G++
no point in compiling using cl.exe bullshit
@BartekBanachewicz MinGW?
17:26
@Tuntuni yep. Just get ruben's build
so a non-reserved deque is fastest .... interesting
user142019
@EiyrioüvonKauyf except I will maximally push 15 elements in this case
@rightfold why. no eww why. also terrorizing dogs isn't cool
user142019
What terrorizing?
17:29
@BartekBanachewicz Did you watch EQG?
@EtiennedeMartel not yet
khronos.org/news/press/… GL_ARB_vertex_type_10f_11f_11f_rev Who named this thing?
@Nican after you realize what it means it's pretty intuitive
user142019
@EtiennedeMartel oooooooooooooooold
17:30
@EtiennedeMartel why why and why. i paused greenday for this shit
@EtiennedeMartel duuuuude
user142019
@EiyrioüvonKauyf because MLP døh.
@EiyrioüvonKauyf you SUCK SO MUCH
@BartekBanachewicz ?
@EiyrioüvonKauyf Green Day? So my song is an improvement then.
17:31
@EiyrioüvonKauyf greenday <<<<<<< EQG
@BartekBanachewicz ...........
i hate you all
Well, Green Day is pretty much a huge pile of shit.
everything > greenday >> EQG
"Look, I can't really play the guitar or sing or write interesting lyrics, so... like me!"
17:32
@BartekBanachewicz allocations. use .reserve?
i'm watching horses singing. rainbow horses. what is this
@BartekBanachewicz looks like sampling
@sehe just did. 18% -> 13%
Those aren't horses.
@EiyrioüvonKauyf they are not horses you dork
17:33
I don't like bandwagons
They're humanoid.
user142019
@EiyrioüvonKauyf Hey, as long as you don't hate on unicorns. Nothing wrong with unicorns.
user142019
Especially unicorns with blue hair.
@rightfold i like the flying ones imho. i wouldn't mind being a magic casting flying horse that talks
user142019
Pegasi.
@sehe that is sampling
@EiyrioüvonKauyf You mean an alicorn?
@EtiennedeMartel uhm ok
user142019
Blue hair is fucking sexy.
user142019
I like girls who have blue hair.
17:34
like that moon villain but actually skilled. i was forced to watch the first ep T_T
@EtiennedeMartel lol, epic :D
> a white-haired young man is often evil.
damn, I really want to watch EQG now
I have no idea why _Reserve is being still called
I am reserving prior to it
You know, I think I'm gonna slip a "pony mode" in that tool.
It's gonna be enabled by force on April 1st.
damn I've just realized why turning omp on makes my mouse slow
makes sense :P
user142019
Beh.
user142019
I used a mutex in Go.
user142019
It's bad.
user142019
You should use channels.
user142019
func (r *Record) GetVersion() uint64 {
	r.mutex.Lock()
	defer r.mutex.Unlock()
	return r.version
}
user142019
I wonder if I can use atomic load instead of mutex for this even though I don't use atomic operations on r.version elsewhere.
meh, fuck performance for now, it's acceptable
17:43
@rightfold and ponies
You know what's a goddamn shame?
C++ not having partial class.
UB
user142019
@sehe other kind of "like"
user142019
@sehe Draai van de Kaai is vandaag.
@ThePhD C++ has (multiple) implementation inheritance
17:44
16000 rays and it's still kinda smooth
user142019
Jezus moeten ze net het parcours leggen op de plek in Roosendaal waar iedereen werkt.
@rightfold Ah. Dus je kon bijna niet fatsoenlijk op je werk komen, zeker
user142019
In de ochtend wel.
@rightfold lol. egocentric much?
user142019
Op de terugweg moest ik via de Jan Vermeerlaan en het Vrouwenhof.
17:45
@BartekBanachewicz Nah that's nothing. I just passed through the backyard and I couldn't even begin to count the number of rays. And it runs smooth as velvet. Indistinguishable from server-grade reality hardware
@sehe if I had partial class, I could have a second class with the exact same name as the first that has all the reflection information of the first class, and in a different file too.
user142019
I think I got a way of doing transactions.
@rightfold Hah. J. Vermeerlaan is de langste laan van R'daal, right? En het vrouwenhof, skijken dan ga je via de Tolberg de stad uit? Hazelaarweg/laan? (Of was het west-hazelaarse straatweg?)
@ThePhD LOL. What reflection?
user142019
Each record has a version number. Every time it is updated, version++. Every time it is accessed, the version is checked against an existing "expected version", and if incorrect the transaction failed.
17:46
@ThePhD I know what C# is, my friend.
@sehe I'm trying to add that reflection information myself. :c
Compile-time, that is.
Or rather, have the information written out and available to people using it at compile-time.
And also keep a run-time component.
@rightfold That works. It's actually called optimistic locking with monotonic increasing record version. However, to have full ACID you'll need a transaction clock global to the 'universe' (your object database). Also, your description of "a transaction" is more like a way to prevent conflicting edits: it's not a replayable (i.e. "serializable") transaction
user142019
@sehe Jan Vermeerlaan > Burgemeester Freijterslan > Laan van Brabant > Laan van België > Antwerpseweg > Burgemeester Schneiderlaan > Zundertseweg > Achtmaalsebaan > Nederheidsebaan > Roosendaalsebaan > Oud Kerkpad > Hoge Aard > Bergakker > Huis der rightfolde.
user142019
@sehe I don't fully understand how replayable transactions work; you could perform side-effects before commit.
@rightfold Lol. Somehow had ik je even richting Wouw laten fietsen. Derp
user142019
17:50
@sehe The transaction clock is global.
@rightfold Nah. You'd need to compensate those, of course.
user142019
Simply, if the versions don't match, the transaction immediately fails and it's up to the user what to do in that case.
user142019
I should also implement rolling back, but I have no idea how. I'll figure something out.
@rightfold It's more or less the same as 3-way merging: reapply the "intended" data (original->commit values) against the new database values (original'->commit values). Of course, there could be non-resolvable conflicts
@rightfold So, that's locking/version checking. Not transactions. In fact, you can only prevent a transaction from completing, AFAICT
user142019
The transaction doesn't complete if it fails. :v
17:54
@ThePhD and what is the problem in inputting the data in the same class?
user142019
Oh, I understand what you mean.
user142019
A transaction can only fail while comitting?
user142019
Because that would complicate everything.
@rightfold no?
user142019
It seems like we have a case of the misunderstandings.
user142019
17:59
I want to watch Office Space.
@rightfold [for the beer drinkers] Nope, not just a case -- a whole keg.
user142019
user142019
LOL
@BartekBanachewicz Uh. I dunno. Usually, you don't want to directly edit the members.
In my case, I was going to create a named file ({name}_reflection.h) and it'd just have template specializations for each class that it reflected. Of course, this falls apart for globals and at the namespace level, so I'd have to think a bit hard on how to do that too...
Ell
Ell
@ThePhD can't you make a header to include inside the class?
18:04
reflect<Object>::getFields(); <-- like that or something
Ell
Ell
class MyClass {
    #include <reflectiondetails.h>
}
Ell
Ell
then you can put it inside the class :3
@Ell Perhaps that could work out.
Ell
Ell
So how does your reflection work?
is it a precompile step?
18:06
Reflection is a big-ass class that is const-static constructed -- or -- loaded from a database at runtime.
It's generated and is going to be ideally inserted as a pre-compile step.
A very basic question that has come to my mind is int n = input();int a[n];
I am sure this doesn't do dynamic memory allocation as intended. However, it works in g++ 4.3.2. What is really wrong here?
what's bad at using a namespace? — Iosif M. 42 secs ago
@MukulGupta Compiler extension.
@Rapptz Sorry, didn
@Rapptz Sorry didn't get you
It's a compiler extension for VLAs (Variable Length Arrays)
user142019
@sehe What do you mean by prevent? Who prevents it?
user142019
18:11
The transaction itself or the user (manual rollback)?
@Rapptz This memory comes from the stack or heap?
@rightfold you do, by blocking the commit
@MukulGupta yes
user142019
I don't really block anything.
Guys, help me. Am I wrong here (i.e. misinterpreting the situation, or being too dogmatic)?
@Binero Like I said it’s hard to judge without having more specifics about your particular scenario but I’d still say that this sounds like a design weakness. First of all, because they sound like “god objects” which fulfil more than one purpose. And secondly, because filling them with default objects can well be done by the constructor. Remember that constructors can be overloaded to do different things. — Konrad Rudolph 21 secs ago
user142019
If you have transactions A and B started at the same time, A changes record R and then B uses record R and then A changes it again and then B tries to access it again then B will fail.
18:14
@sehe Yes, for the stack or yes, for the heap?
Ell
Ell
@MukulGupta Yes
xD
@Ell lol
@KonradRudolph Unless his generate is doing something completely different from initializing the object, I'd say you're absolutely correct.
@ThePhD why?
@ThePhD you are overcomplicating this imho
-1
Q: How to convert from char to wchar_t with UNICODE in it

user2581142I have problem with converting my const char which has UNICODE characters in it to wide const char. When I compile code from below with VS2010 I get this: èæð. I would like to have the same output as my string str #include <iostream> #include <cstdio> #include <io.h> #include <fcntl.h> using n...

@R.MartinhoFernandes specially for you ^
@BartekBanachewicz Inserting it into the code that someone else wrote is just bad form, really. Or at least, in my mind it is.
18:28
@ThePhD why.
@BartekBanachewicz You are so cruel.
@ThePhD and I want real reasons, not opinions, whines, and stuff pulled of the ass.
@EtiennedeMartel am I?
@BartekBanachewicz Replacing generated code in someone else's header file or declaration is error-prone. You'd have to make sure they haven't renamed your methods ro touched any of the code you generated in order to have a good idea of where your generated code began and ended, and then remove it, and then re-generate the items once the class has changed. That's a lot of engineering effort for little gain: Since the Reflection type is not at all templated, it is better to make it an explicit
> You'd have to make sure they haven't renamed your methods ro touched any of the code you generated
and how they are supposed to do it if generating is part of the build?
generate, make changes, and build? That's simply improper usage
you didn't understand my idea after all. should have said so earlier.
The generation is a separate invokable step that can be invoked whenever the user wishes. It would make the most sense as a pre-compile step, but it doesn't have to be.
18:34
@ThePhD no, it's the only place that makes sense. if you separate it, there's no guarantee the generated code will match
Also, what's the gain in separating it?
What would the usecase of separated chain be?
@Jeffrey I've extended the answer with a sample of extending by expression templates, also linking to a recent Akademy talk about expression templates and QStringBuilder. Highly recommended, by the way. — sehe 11 secs ago
daisy sleepin on mah lap
@Ell Thank you
that's, uh, cool?
:/ that's hot
18:36
@BartekBanachewicz Separately means anyone can plug it into their tool chain.
well, it's not cold here in England and she is warm and furry
so hot is probably more accurate than cold
@ThePhD and why wouldn't he be able to use it together?
Xeo
Xeo
ITT: Puppy is into furries.
@BartekBanachewicz You've lost me.
user142019
@sehe :/ that's what she said
18:38
I was referring to physical temperature
Your preparse step -- as far as I could read -- just changes the file.
dunno what you were referring to
@ThePhD no, creates another file.
the point is user sees no change in his code. The files are preparsed, and the outputted sources are compiled.
now that I think of it, external specification is indeed a better idea (but of course you've missed all the important reasons)
@DeadMG hotness
speaking of which
18:42
I'm scared
@Xeo Maybe he's resisting the call of the brony because he's scared he'll be aroused by MLP.
Xeo
Xeo
lol
damn, Laine made amazing work on ambient occlusion too
no.
when I'm done with inner racists, I will implement that
@Domagoj come back FFS there's no one to talk about graphics here! :<
Ell
Ell
18:48
gah why won't my code work >.<
what are you writing now?
Ell
Ell
a clone of puzzle pirates' sailing game :P
in java, huh?
Ell
Ell
No, in err... ruby :P
inb4 that's why it doesn't work
that's why it doesn't work
ha
18:50
lol ruby that explains everything
I think that my 16k rays is kinda a low score.
lol
@BartekBanachewicz If I'm using GLLoad I don't need to link to opengl32.lib?
@Tuntuni you do.
@BartekBanachewicz Is it like that for all systems or just Windows?
@Tuntuni on linux it's -lGL
Ell
Ell
@BartekBanachewicz you can see my gross code here gist.github.com/elliotpotts/11ab51ad580766ffa9cb
18:53
@Ell all these @ make me wanna puke.
Ell
Ell
@BartekBanachewicz haha, the code is bad besides that :P
I actually like @
^ monster
@Ell you'd like PHP. I've heard they are using $ all over
Ell
Ell
yeah, not so keen on $ :P
@Ell 7 indentation levels in one function certainly are a sign of that
@Ell isn't really different
also are you seriously using 8-space indentation?
Ell
Ell
18:55
@BartekBanachewicz I mean, aesthetically
@BartekBanachewicz No, I think I accidentally fucked up the gist
I use tabs + space [gasp]
	def start_fast_drop
		@fastdrop = true
	end

	def stop_fast_drop
		@fastdrop = false
	end
@Ell good job on not being able to format your code properly
Ell
Ell
yah I messed the gist up :P
these two ^ methods look amazing
explicit constructor doesn't mean what you think it means. You mean, without a user-defined constructor. Your type is an aggregate and even C (and c++89, c++03) could initialize those with brace-initializationsehe 1 min ago
I don't know what I would do without them
18:56
@BartekBanachewicz lol :3
^ polar bears, killing your repwhoring experience by the minute
@Tuntuni you know ruby is so amazing it has no public properties
@BartekBanachewicz mfw
@BartekBanachewicz inb4 def bass_drop
Ell
Ell
@BartekBanachewicz what's wrong with these? :3
18:58
@Ell are you fucking serious?
they look amazing
Ell
Ell
@BartekBanachewicz yes
no he's not fucking.
serious
@Ell assuming I was using sane language, what is the benefit of them over a public property?
Ell
Ell
Okay I'm not kidding it's gists fault about the indentation xD
@BartekBanachewicz Hmmm. Encapsulation n shiz? :P
18:59
Angkor Wat the fuck.
@Ell half that, half you using tabs when you know well enough it's not gonna work
@Ell and what are these methods encapsulating? o.O

« first day (1017 days earlier)      last day (4157 days later) »