« first day (601 days earlier)      last day (4346 days later) » 

3:00 AM
It's 5AM, so it's nap time.
 
Almost running time :Đ
 
@DomagojPandža by using a global variable?
 
If the C API takes (function pointer, void*), like the WinAPI does, it's easy. Otherwise it's either painful or impossible.
 
@RMartinhoFernandes that's trivial
 
C is like a bazooka with a hatch on the exhaust end.
 
3:05 AM
that reminds me
at some point I was going to go use JerryCoffins code to fix my SHA-2 solver
 
reason for my question regarding passing c++ member function pointer to a c function that takes c pointer as a parameter, is that i am working with gl api that is written in c, and my library is c++
either way they run side by side, so its resolved for now, was just looking for more elegant way
 
doesn't exist
 
oh well
 
C function pointers suck donkey cock and if you can, avoid like the plague any C library that uses them
 
well aside from being written in c glut is pretty nice
 
3:12 AM
There's no solution for doing it in glut.
 
You know what really rustles my jimmies? Bad ports. JBox2D, a Java port of C++'s Box2D, takes arrays and array lengths even though you can do foo.length in Java.
 
that's like saying "Apart from the fact that it's a rotting brown sludge that stinks and is covered in flies, this shit is pretty nice".
 
Also, Box2D is more like pseudo-C++.
 
deadmg whats my alternative?
 
just code against your OS API like a normal person?
 
3:13 AM
why waste time when its already coded?
 
Elegance.
Structure.
Performance.
Pleasure.
 
because the "already coded" version doesn't meet the minimum standards for quality?
"already coded" would indicate that it solves the problem acceptably well, which GLUT does not
 
Make it a normal function.
 
well, for now i'd like to be productive, not artistic
artistic comes later
 
Or use a global variable for state. It's not like using glut doesn't involve global state anyway.
 
3:15 AM
using high-quality code is not artistic
 
It's mandatory.
 
it's productive
throwing away quality just so you can rush some shit out the door is a terrible idea
 
For anything beyond spewing an interpolated triangle whose coordinates are already in viewspace, try harder.
 
and a lot of people have made that mistake and then paid for it heavily later
 
3:17 AM
Ahahah, is that a bronze badge?
 
@RMartinhoFernandes You only just earned that? :P
 
That seems like a hefty achievement nowadays.
 
for now i am just learning, so its a tool
 
Given the vote density in 2012.
 
3:17 AM
once i get how its orginized i'll encapsulate my own set
 
when you're learning is the most important time to write high quality code
 
@DeadMG I tend to just run from array-related questions.
 
else you will be stuck coding shit not just for the immediate future, but for years
@RMartinhoFernandes And who can blame you?
 
I'm sure you can understand why I do so.
 
@RMartinhoFernandes Beaten, nub.
 
3:18 AM
:)
 
sure, agreed. when i have full understanding of everything under freeglut headers, i'll replace it with my own quality (hopefully) code
until then, i'll learn from it
 
One of the most entertaining prospects of array questions is getting attacked for stating that an array is not a pointer. Second is the lack of understanding of how elements are laid out in memory. Third, and my favorite, is that you have to wage wars against people who think multidimensional arrays actually have a geometric shape in memory.
 
Nowadays, on questions about multidimensional arrays, I just post a comment with nothing but a link to ideone.com/gytw7 or ideone.com/oycrc and close the tab.
 
@DomagojPandža: Can I get the syntax for a hexagonal array?
A dodecagon might be fun too
 
Every time I see a generic avatar coming in here, I think John Smith has returned.
 
3:25 AM
lol
You're traumatized?
That was not the first time shit hit the fan, and it certainly won't be the last.
 
I know, but I started thinking... What if this guy comes down to my house with a knife demanding acknowledgement. Ahahahah :D
People are sometimes disturbing.
 
How long was the suspension he got?
 
Ken
What would you guys recommend? Codeblocks or VSC++ Express?
 
I have no idea, it's a damning property of the internet that you simply can drop the old nickname and come back under a new one... Try again and actually become friends with the guys you irritated the shit out of.
For fun, I compare that silly notion to a murderer who gets convicted, shaves his head, changes his name and after he gets out, becomes friends with the victim's family.
Perhaps...

He's here watching us as we speak.
 
He's not God, dude.
 
3:31 AM
Ahahah :Đ
 
> Funerary customs differ widely in the real world. But in a roleplaying game, there are many reasons to burn the bodies of fallen enemies and allies alike. Here are just a few of the reasons: Zombies. Ghouls. Vampires. Liches.
 
I remember when I blew up Megaton in Fallout 3. There was this cute girl that gave me some sort of a weaponized vacuum cleaner, she became a ghoul.
Sad panda is sad.
I love when I have to SSH into my phone over a wireless network just to hack in a few goddamn songs for my running session.
iAbsurd.
 
I can't SSH into my phone. Problem solved.
 
ssh-rsa 2048 32:c6:a3:09:a8:77:bd:c8:71:b0:d4:68:97:c9:90:78
Add key. Store songs.
I just realized I'm a bad person.
Sometimes, when I wait in the city for a buddy, I take out my phone and scan the surroundings for wifi activity. Usually, there's quite a bit of unlocked ones, I slytherin my phone onto the network, access their router control panel, input the generic user/pass they never remember to change (if it isn't factory set to something more complicated, like the modern ones), delete their accessing accounts, switch off wifi and remote restart it.
 
Just letting you know that HP references don't work on me.
Also, you're evil.
And your countrymen stupid.
 
3:42 AM
I think of myself as a hard, loving educator.
admin:0000 is not a sufficient protection.
1234 is better. Ahahah.
 
Here you can no longer find free wi-fi easily.
 
It's a great source of entertainment, if you have a laptop around, usually just go to a populated apartment complex, then you can log onto the network and check for various unprotected things they might have running and use that as an entry point of your villain activities.
But I usually just knock off their network because I'm the usual loving me.
In Croatia, 30-50% of the listed, broadcasted networks are unlocked.
I'm detecting three networks right now, none are protected. Free internets. But useless, 4mbit.
I need some coffee.
 
4:00 AM
go get some then
 
Just made some, tastes like shit, works like always.
 
@user167908 offtopic
 
he spammed it in every room @Abyx
i reported him for it
 
4:27 AM
hmmmm
did I use = or := for default arguments...
 
Why would you use :=?
 
I've used it for initializing variables most everywhere else
 
Oh. Then use that.
 
Hola
 
Hai.
 
4:31 AM
hmmm
would it be bad to use += to add items to a vector?
 
Yes.
I like D's concatenation operators, ~ and ~=.
 
eh
not really sure they warrant their own operator
 
Well, they definitely do in D because arrays are pretty powerful. D doesn't really have an STL equivalent yet.
Maybe it's not as common of an operation in Wide. But it's definitely not the same as addition, in any case.
 
I most certainly have a (much better) STL equivalent in Wide.
just feels a bit strange to name it PushBack instead of push_back :P
 
I love PascalCase. <3
 
4:37 AM
makes working with the Windows API a lot easier
right now, I have a complete mix of standard_case and WindowsCase, because I tend to just absorb whatever I'm using
 
I'm never sure what style to use in C++. I used to use camelCase, but now it just reeks of Java for me. standard_case looks C++-ish, but I think it's kind of ugly.
 
I agree
and _ is just a pain to get to
 
Yeah.
 
hmmmm
now I have a slight..., no, wait, nevermind
note to self: do not purchase that four cheese ravioli thing again, it's the badness
 
@DeadMG Gosh, no.
 
4:50 AM
@RMartinhoFernandes Is that "Gosh, no, it wouldn't be bad" or "Gosh, no, don't do that or international axe murder"?
 
lol
I nearly had a heart attack, by the way, when I realized that I had created a large ambiguity hole when drawing up this specification
then I remembered that I had already foreseen and solved this problem, because I'm awesome
 
I'm the hungries.
 
then eat something? :P
 
9 hours ago, by R. Martinho Fernandes
There's close to nothing edible in this house. I'm now biting down the last cookie.
 
4:53 AM
ah
then purchase something?
 
Shops are not open yet.
 
I'm going to go and buy 999999cookies in a few minutes
assuming it's not a Sunday or a Bank Holiday or some other, similar, BS
 
Yesterday was a holiday here.
 
D1? I have no idea.
 
I always pick more hurts.
 
4:57 AM
well, more relevantly, there should be an objective best but we would need to know the game's formulas and the values involved to make such a decision
 
Exactly.
@R.MartinhoFernandes, can you elaborate more ? lolz — anDroider 26 secs ago
Erm.
Was asked to elaborate on:
"private functions with names starting with 'n'", "private functions with names starting with 'o'", and "private functions with names not starting with 'n' or 'o'" :P — R. Martinho Fernandes 3 mins ago
 
hmmmm
wonder if I can write one generic function that can take either a tuple or a source range
well, I guess that if the object has a range's interface, then it's a range, else it's a tuple
dang, I write a sweet language
 
I'm way too sleepy. This was a terrible idea. I hate myself.
 
damn
I so badly want to get that prick's question deleted
 
Which one?
 
5:07 AM
-4
Q: NullReference when porting C code to unsafe C#?

user167908I'm trying to implement Knuth-Morris-Pratt algorithm in C# similar to the implementation in pure C. Don't tell me about Regex and being free from work with memory in C#, please. Because , the aim of this topic is not the true and useful of C# features, but about the work with pointers exactly in...

the one where he spammed it in pretty much every room with people in it
 
if you work with opengl, what are your thoughts on allegro 5?
 
@DeadMG Oh gawd those comments.
 
@RMartinhoFernandes Oh gawd can I kick this guy in the balls.
 
@DeadMG > So just add "Ability to access" in front.
:D
Lol.
 
@StackedCrooked What? It certainly works.
 
5:16 AM
I have tried to write without /unsafe and have work with C# on Silverlight and simple apps wihtout using unsafe stuff and I don't like it. Cause it reminds me the ready-toy, which frees you from pure understand what really proceses in you clr-program. I suggest the better way is to learn ILASM/unsafe and .net vm architecture. — user167908 56 mins ago
 
Ken
Any of you guys do game programming or design ?
 
This is kinda funny.
 
@Ken Domagoj and I have done some. Why?
 
@DeadMG I don't think you're supposed to change the question in order to be able to provide an answer.
 
@StackedCrooked I didn't change the question, I changed my answer with that.
 
Ken
5:17 AM
Just curious, looking for an active community to join.
Any recommendations?
 
@DeadMG Ah, I understand now.
 
@DeadMG Oh, I didn't see that coming. (Replying to the future)
 
@Ken gamedev.net is the only one I know of.
@RMartinhoFernandes See what coming?
 
There is an SE for game dev iirc.
 
@DeadMG "Anything but gamedev.SE"
 
5:19 AM
by the way: banning Size() on rvalues?
eh
gamedev.se is so bad, I get better answers on Stack Overflow
 
Ken
@DeadMG thanks!
 
What's so bad about it, btw? I don't think I ever saw you elaborate.
 
question, if have some framework from which I use a function, which offers serveral arguments, but I only want use a single parameter and I compile with -Werror, how should I silence the compiler then?
 
@RMartinhoFernandes Mostly that you can't ever get useful answers.
half the population is "OMG VIRTUAL FUNCTIONS SO SLOW" and the other half is like "Why don't you want to use a library full of Singletons? they're graet!"
 
@bamboon remove the argument names.
 
5:21 AM
@bamboon Don't write the parameter name?
Or -Wno-error=unused
@DeadMG lol, ok.
 
And third party libraries can be included with -isystem to avoid compiler warnings from them. (This won't fix your specific problem though.)
 
damn
 
Virtual functions too slow. I just love that damn excuse, they act like it's loaded off a satellite in the orbit of Mars.
 
@DeadMG "This account is temporarily suspended because of low-quality contributions. The suspension period ends in 7 days."
 
the only requirements I have right now for every container are, size, swap, clear, and construction/assignment.
@RMartinhoFernandes yaaay
 
5:24 AM
@DeadMG No accessing?
 
@DeadMG No rangification?
 
@StackedCrooked What am I going to write that covers both associative and non-associative containers?
@RMartinhoFernandes Oh yeah, and that. Already wrote that (haven't actually specced ranges yet, but hey).
 
To touch it?
 
I got some great speedups by reducing the number of virtual method calls in a time critical piece of code.
Static polymorphism rocks there.
 
5:26 AM
@StackedCrooked So did I, but they're not a "MUST NEVER USE OR ALL PERFORMANCE DIES" thing, removing them is a micro-optimization for critical code paths only.
 
@ScottW As a cum box?
 
Exactly, nobody dies if you enjoy the benefits of polymorphism every once in a while.
 
In Hell++, if you don't use virtual functions anywhere, you get a bonus 10x slowdown (and <iostream> doesn't count).
 
@StackedCrooked I so want to forget that I even know what that is
 
@DeadMG ...and then primarily for places you didn't really need it in the first place.
 
5:27 AM
@JerryCoffin Yeah, absolutely.
 
@RMartinhoFernandes @StackedCrooked ok cool thanks, didn't know I could just drop the names and it would still work
 
I wish I could find it. One of the funniest ever was a Java fan talking about how Java was better because virtual function calls in C++ were so slow...
 
@JerryCoffin ROFL
 
@ScottW Good point.
@crazyfffan: Also, you failed to state the "idiot lecturer" requirement in your question. — DeadMG 12 secs ago
 
5:29 AM
lol
If I were asked that in an exam, I'd probably answer as per my comment on the question.
I've done similar in the past.
 
lol
 
Seriously, you ask for "things", I'll give you "things".
 
Pizza leftover breakfast is great.
 
Don't mention food! I'm hungrily waiting until the shops open.
 
and I'm feeling rather sick
 
5:32 AM
So, a Java fan comments on performance of C++ virtual function calls? That's like a janitor commenting on relativity.
 
At 7 bakers are already open here. I can buy a tasty prepared sandwich close to where I live.
 
@DomagojPandža No, it's like a creationist janitor commenting on relativity.
@StackedCrooked 6am here.
hmm
to mandate random access for Sequences?
 
@DeadMG You need some extra time in order to get better anyway :)
 
nah
I'll just go RA sequence and bidi sequence
 
@StackedCrooked Why would you want to close a sandwich?
 
5:34 AM
@RMartinhoFernandes Or walk by one?
aaargh you cock, you forgot to wait two minutes
 
@RMartinhoFernandes Phew, fixed with less than 6 seconds remaining.
 
oh, lols
 
I am so going to enjoy a cold shower in a few minutes.
 
How to get your SO question closed in no time: "I know I should post my code, but I am not being lazy. Nothing that I have done works, and I am starting to believe that it is not easily achieved."
 
Programming is a sport.
 
5:35 AM
Adrenaline is pumping through my veins now.
 
here's a question
why do the Standard containers define empty()? Surely it could be easily cut
oh, I guess for linked lists, if they had O(n) size()
 
whereas I decided to mandate O(1) size() on all containers
 
Constant time for the win.
 
well, linked-lists are hardly an important container, and even if it proves desperate for people to have O(1) splice or whatever, then I'll simply say that they are not a container.
 
5:41 AM
@DeadMG C++11 did too.
 
here's another thing where I decided, apparently, to grow some balls
I decided to define debug containers
 
because, at least for MSVC, the whole thing is a giant mess
 
I mean, I know what's the use case, but why define them?
 
@DomagojPandža I think you're missing the main point here. It wasn't just general ignorance, but something much more specific: that Java doesn't require you to use the virtual keyword, because all calls in Java are virtual.
 
5:42 AM
because I can define them on a parameterized basis
and I want libraries to be able to offer debug modes too
in a uniform interface
else you're just going to end up with BS like #define _SECURE_SCL and that lot
 
Instead of defining a bunch of containers with a common interface, I'd think hard about one or two container templates, with template arguments to specify things like whether to support insertion at the beginning, middle and/or end. I'd like it to be one template, but I think sequences and associative containers are enough different (and both necessary) that you probably want to keep them separate.
 
@JerryCoffin I know, I know, I just have a tendency to roar at any comment coming from the Java community. It fairly bugs me that people fail to understand what really happens behind the scenes because the damn online tutorials where they "learned" their respective* languages make it far too easy.
* PHP, Java excluded
 
@JerryCoffin Eh. There are too many combinations which I could not genuinely support. Not to mention extra requirements like contiguous storage for C compatibility, or iterator invalidation rules.
 
@DeadMG I haven't tried to do it, but I"m not sure about combinations that really couldn't be supported. Contiguous storage sounds like it should really be (mostly) up to the Allocator (assuming you retain that).
 
@JerryCoffin No Allocator can make two arbitrary storage requests (with arbitrary frees and allocations in the middle) contiguous, and the Container controls those requests. (and yes, I did retain that).
 
5:50 AM
@JerryCoffin Well, not all, but I get your drift.
 
It's not a problem that something involves a vptr/table nor is it slow because of that. Its deferred execution produces bottlenecks only in very critical code paths such as rendering code. And that's only because the compiler cannot observe what the hell is going on but has to take the high road, defeating any possible optimizations where they would be mighty welcome in a 16ms timeframe.
Careful usage makes polymorphism a beautiful tool.
And I, for one, hate our Java underlords.
 
@DeadMG I think you may be staying too close to the C++ model. I was thinking in terms of giving the Allocator more control over storage. Specifically, the container would basically say: "I need to be able to hold N more items" instead of "I need a block of X bytes." It's then up to the Allocator to make the "more storage" contiguous or not.
 
@JerryCoffin I am going to introduce a realloc requirement to allocators.
 
@DomagojPandža we also have static polymorphism
 
Bloated. Or something.
 
5:54 AM
Bloat is the biggest enemy of all programmers.
 
however, more generally, I absolutely intend to do things like, HashMap(key, value, comparator, Allocator = ObjectPool).
 
however static polymorphism looks like manual vtable constructing in C
 
and an object pool absolutely does not support "Just give me X bytes".
 
One other point: I'd try to include something that lets you take advantage of the underlying virtual memory so you get contiguous addressing, and just map physical pages to them as needed.
 
isn't that what the OS does?
 
5:55 AM
It is something that the OS should be doing.
I have strange urge to dabble in kernel design again.
Don't feel like preparing a virtual environment, though.
 
@DeadMG OSes do it (and Windows lets you in user code too) but it's not reflected in any container class of which I'm aware. The virtual memory hardware really makes most copy/move construction arguments entirely moot if you just use it -- don't move or copy to the new storage; just add more contiguous storage to the existing block.
 
@JerryCoffin So basically realloc()?
 
@DeadMG realloc that guarantees it never moves the data to new addresses, so (for example) your vector never invalidates references/pointers/iterators.
 
@JerryCoffin That only works if you allocate full pages to each container.
 
@JerryCoffin ... so how is it different to simply allocating a new chunk and moving it over?
 
5:59 AM
@RMartinhoFernandes Quite true -- and that's not always worthwhile, which is why it should be done in the allocator, not the container.
 

« first day (601 days earlier)      last day (4346 days later) »