« first day (677 days earlier)      last day (4287 days later) » 

Xeo
12:00 AM
@TonyTheLion Your next prey?
 
@MooingDuck click on each stack frame and print out the value of the stack pointer?
 
@jalf I can't figure out how to get at the stack pointer
 
Registers window.
 
@Xeo no, too cute
 
@MooingDuck in the watch or locals window, you can just add $<registername>, iirc
or yeah, use the registers pane
 
12:05 AM
sweet deal
 
Ell
gcse results in 8 hours aaah!
 
I can't remember all the icky details of this, but wouldn't something like ebp - esp give you the size of the stack frame for the current function?
 
Yes.
Or the other way around.
I'm always confused about that.
 
you're awake unusually late, jalf
 
@jalf But for other stack frames you need to retrieve the old ebp and old esp and go from there.
 
12:12 AM
my functions appear to be a wee bit big
also, in hindsight, some of that information should not be on the internet
 
@R.MartinhoFernandes won't VS do that if you just doubleclick on the stack frame in question?
 
Ah, dunno.
 
@DeadMG yeah, couldn't sleep...
 
still
 
12:13 AM
lol
 
but for those who didn't see fast enough, most of my functions are either 33KB or 65KB each, with a 131KB and a 229KB.
 
what do you care @jalf is still up, puppy?
 
which is a little excessive
 
I think that it should actually be possible to implement something like main() { cpp.std.cout << "Hello, World!"; } using Clang inWide
@TonyTheLion Merely being observant and thoughtful.
 
ah, unusual of you to be thoughtful :P
 
12:14 AM
Ow.
 
@MooingDuck yeah, that sounds pretty bad
 
@TonyTheLion oy
 
lol
bad me, I insulted someone on the internet
 
indeed
 
12:15 AM
you, sir, shall pay one Internets in fines.
 
oh Internets is a unit now??
 
haven't you ever seen people win one internets
 
It it subject to inflation?
 
I lost the internets. End boss was too hard
 
12:16 AM
 
lol, subject to inflation
 
@TonyTheLion Woah, you is uncultured.
 
yeah, back in 1990, one internet was like, a shitton
 
Now everyone gets one.
 
now I get 30 internets/second
 
12:17 AM
Right.
 
Ell
has anyone tried bitcoin hashing?
 
woah I am indeed uncultured
 
Growth of the Internet models the big bang.
 
Ell
*mining
what hash speed do you get if so?
 
never done bitcoin hashing
wouldn't see why I'd need to bother
or mining
 
Ell
12:19 AM
I did it out of curiosity
 
I think I first witnessed the Internet in 1996. It was a computer at school. A few guys were there sitting and waiting for a page to load.
 
It's no longer profitable or will soon no longer be, or something (i.e. doesn't offset the costs of equipment/power)
 
Ell
yeah it will soon no longer be profitable
 
I'm so confused. My biggest function is using 229556 bytes of stack space, with a reference, a long, a short, two pointers, a std::list, and a char[81].
obviously, something, somewhere, is inlined.
no wait, this is a debug build
 
@StackedCrooked I first witnessed the internet before HTML was invented. It was a text world... ftp, gopher, nntp
 
12:21 AM
Sounds fun.
 
Ell
@mooingduck does increasing stack space fix it?
 
@DeadMG When can I download that?
 
I remember first discovering Google could help me learn more about computers
 
Ell
gopher?
 
@R.MartinhoFernandes Dunnoes.
 
12:21 AM
@Ell It's a thing.
 
@Ell probably, but I'd rather figure out why I'm using so much stack space if I can
 
an animal too, a gopher is
 
The Gopher protocol () is a TCP/IP application layer protocol designed for distributing, searching, and retrieving documents over the Internet. Strongly oriented towards a menu-document design, the Gopher protocol presented an attractive alternative to the World Wide Web in its early stages, but ultimately failed to achieve popularity. The protocol offers some features not natively supported by the Web and imposes a much stronger hierarchy on information stored on it. Its text menu interface is easy to use, and well-suited to computing environments that rely heavily on remote text-orient...
It was kind of like the first search engine.
 
Speaking like Yoda, I am
5
 
@MooingDuck Recursion?
The ideone link doesn't load.
 
12:24 AM
@StackedCrooked I deleted it, corporate info :/
 
You should be fired!
 
Ell
@mooingduck well yeah just to double check its not recursion or something
 
@Ell I can see the stack, there's no recursion. Just a function call that takes two hundred thousand bytes for no apperent reason.
 
Can a compiler that is trying to optimize too heavily cause stack overflows?
 
Recursion or array. Can't think of much else. Alloca.
 
12:25 AM
It should take ~120 bytes
@Chimera in a debug build?
 
@MooingDuck hmmm ok
 
Undefined behavior is also a possibility.
 
@StackedCrooked I'm not aware of using alloca, but that's the hypothesis being kicked around here.
@StackedCrooked .... hadn't considered that.
 
You kick hypotheses? Hypotheses are people too!
 
12:27 AM
Insensitive clod!
 
Hey, clods are .. never mind.
2
 
@StackedCrooked well, it appears that 7 functions of mine are all using close to multiples of 33000 bytes each. But I don't know what to make of that.
 
How do you measure that?
 
So, sizeof(encoding_iterator<utf8, codepoint*>) == 20. That big?
 
@StackedCrooked I checked the ESP at each stack call
 
12:28 AM
@R.MartinhoFernandes That's a fat iterator.
 
@R.MartinhoFernandes bigger than expected, but still within the "ok" range.
@EtiennedeMartel 16 is two pointers. I presume he has a range
 
32 bit.
On 64 bit... Ow.
 
@R.MartinhoFernandes oh, that is big then
 
Why does your utf8 encoding iterator need that much state? My utf7 range iterator didn't have that much.
 
12:29 AM
how do I delete empty elements from a vector
 
@Rapptz erase?
@Rapptz how are they "empty". Did you make a vector of pointers?
 
@Rapptz std::vector<T>().swap(myvector);
 
"" string
no
I tried holder.erase(std::find_if(holder.begin(), holder.end(), [](const std::string& s) {return !s.empty();}),holder.end());
 
Ah, that kind of empty.
erase/remove_if
 
@Rapptz you want holder.erase(remove_if(holder.begin(), holder.end(), [](const std::string& s) {return !s.empty();}), holder.end());
 
12:31 AM
It's called the "erase/remove idiom".
erase_if?
 
@StackedCrooked close enough
 
lol
thanks
 
@Rapptz surprisingly close actually
 
@MooingDuck Two pointers for a range, an empty type that is the state of the stateless UTF-8, a transient array of four bytes to store the last encoded codepoint, the size of that array, and... oh! I forgot, add four more bytes for the current index into that array.
I can optimize away the empty state if I use a tuple (aka EBCO-in-a-package).
The rest I don't think so.
 
it removed everything from the vector now
meh
 
12:33 AM
@R.MartinhoFernandes you can fit a codepoint in 20ish bits, and use the rest for the index(indecies?)
I feel like that's wrong. how many bits does it take
 
I can also optimize away one of the two indices by storing the array in reverse (i.e. one will always be 0).
@MooingDuck 21.
 
@R.MartinhoFernandes I calculate 36.08, but I like your answer better.
 
@R.MartinhoFernandes my thoughts exactly
 
The highest codepoint is 10FFFF.
 
12:35 AM
ah right, I typed in 10FFFFFFFF, realized that was wrong, erased it, and typed in 10FFFFFFFF.
stupid brain
 
Ell
what is 2^21 - 1?
 
But there's no codepoint stored in the iterator.
@Ell 1FFFFF.
 
Ell
how about in decimal?
 
What it stores is an UTF-8 sequence (which can be 32 bits long).
 
Ell
12:37 AM
ty, googling is tedious on mobile
 
I guess I could pay some speed and store the codepoint instead with the current index packed in the high bits. Then I decode at each dereference.
 
Ell
2097151
 
@Ell yes
 
That brings it down from 32 to... 8+8+4 = 20.
 
@R.MartinhoFernandes on 64 bit? better.
 
12:38 AM
Yes.
 
@R.MartinhoFernandes it's an iterator. 100% of the time it will be dereferenced only once per advance anyway.
 
@MooingDuck I can get rid of the speed penalty by specializing it (I can encode each byte of UTF-8 independently of the rest), but in general I have no choice but to encode the whole thing for each unit of the encoded result.
(If it's not clear, dereferencing this yields a code unit)
 
@ell Couple of days back I saw an icon on Google search page which said "Write on your Screen" or something. Wherein you just write your alphabets on the screen by drawing and it picked up pretty nicely. I don't know if that was just an experiment or a feature they plan to release. I just had it for few minutes.
@ell for mobile, of couse.
r*
 
Anyway, I'll get this working slow and fat first.
 
Ell
then optimize
then tradeoff
 
12:43 AM
It makes me less uneasy to know I have some optimization space.
@C-xC-t You can edit messages if you press the up arrow. (Maybe not if you're on mobile).
 
whoa, late. Time to go home
 
drive safe
 
@R.MartinhoFernandes ty, new here.
 
Ell
welcome :)
 
getline defaults '\n' for delimiter right?
 
12:51 AM
Yes.
Oh, yeah, my idea of encoding conversion by decoding with the source encoding form to codepoints and encoding those with the target encoding form will end up using iterators that are 64 bytes large. Damn piece of crap iterators.
 
Ell
worry about efficiency later :D
 
@R.MartinhoFernandes that sentence confuses the crap out of me :/
 
@TonyTheLion Well, the idea is, to convert from UTF-8 to UTF-16, you do UTF-8 -> codepoint -> UTF-16.
 
ah
and why does one need to convert?
 
Often at communication or API boundaries.
 
12:56 AM
right
 
Ell
winapi uses utf16 doesn't it?
 
Ell
what uses utf8? well known API wise?
 
It's the dominant encoding of the Web.
 
Ell
kk
 
1:03 AM
Also, Linux.
 
btw, robot
I finally found some source code that's as bad as ICUs
 
Clangs
 
two-phase initialization
implicit variables (think OpenGL's matrix stack kind of thing)
owning raw pointers
Managers everywhere
it's surprising, because I was quite expecting le clean C++11 best practices kinda stuff
 
1:17 AM
I like C++11's syntactic sugar
 
Good programming is rare.
 
Ell
what is two phase initially?
initialization*
 
I hate it when I write code and I immediately think "Oh gwad this is sooooo not going to compile".
 
@R.MartinhoFernandes You can think?
 
@Ell Having an init() function that does the actual initialization, instead of a constructor.
 
1:22 AM
it's where, instead of initializing shit in the constructor like you're supposed to, you add an initialize() method
 
@StackedCrooked Ow.
 
which effectively guarantees that nobody has any clue whether or not your object is initialized
 
@StackedCrooked And.... Oh wow, it did compile. surprised look
 
Stop thinking :P
 
and generally wastes everyone's time pointlessly
 
Ell
1:22 AM
ahh okay. does that count for "virtual constructors" (e.g. private construct method)
 
Ah, wait. I need to uncomment the tests...
Sigh.
 
no
 
It probably just compiles because you didn't instantiate.
:D
 
@StackedCrooked Exactly :(
 
two-phase initialization is about giving people objects before they can actually be used
 
Ell
1:23 AM
what cab virtual constructors be used for?
 
using a factory function doesn't qualify
dunno, I've never used them
 
Ell
nor me
 
I don't mind two-phase initialization if it's encapsulated in factory function (and constructor and init method are private).
 
Ell
I want apple juice but I'm afraid of the slenderman.
 
@StackedCrooked That doesn't really count
I mean, two-phase initialization is an interface flaw. If it's not part of the interface, then it can't be a flaw, if you get my drift
 
1:25 AM
@Ell How are the two even related?
 
Sometimes you need to create objects and then also register them in a container. The registration thing is something I prefer to keep apart from construction.
 
@StackedCrooked Mwhahaha, I was right, it doesn't compile! Yupee!
Oh wait, I shouldn't be happy.
 
Ell
it is dark and if I go downstairs into the dark to get my apple juice I will almost certainly be consumed by the slenderman
 
Turn on the lights?
 
@StackedCrooked factory's better for that
 
Ell
1:28 AM
I will need to go into the darkness to turn the lights on. also I will need to go downstairs. its too risky.
 
Get a flashlight?
Make noise?
 
Ell
ahh no the flashlight will go out, just like in the game!
and noise will wake my family up
ill have to wait till morning
 
What are you more afraid of? Your family or the slenderman?
And once more, the brave robot triumphs in its plight against the terrible error-spewing compiler.
 
Ell
have you played slender yet? did it scare you at all?
and I'm scared of slender :o
 
@Ell No, not yet. I have downloaded it, but I've been playing Arkham City lately.
 
Ell
1:33 AM
kk, when you play it, play it in a pitch black room, alone
and with as realistic audio as possible
 
That was the plan all along.
 
Ell
good :D
I am a wuss when it comes to horror but I swear this would scare any grown man
 
I am far from fearless.
 
Ell
you should film your reaction to it :D
then post it on youtube for us all to see
 
lol
I have a bunch of stupid fears I'd really like to get rid off. I am afraid of "deep" natural waters (as in, deep enough to swim :S), cephalopods, arthropods, and the dark outside.
 
Ell
1:48 AM
cephalopods? crabs? arthropods?
the dark outside seems perfectly logical to me
and I think you should be afraid of swimming in some waters but most are okay
fast or vast water can be dangerous
flying insects make me panic
 
@Ell Octopi and bugs.
@Ell No, it's not logical. My grandma lives 100 metres from my parents, and when I go from one house to the other at night alone, I run, even though I know there's no danger.
 
Ell
you can never know there is no danger when its dark, hence natural fear
like water because you don't know what is under your feet
the unknown is what is scary
 
@Ell It's inside our property. If any kind of danger shows up I can run, or shout. There's people 50 metres away! It's ridiculous.
 
Ell
hmm I guess its a little bit paranoid but it can't harm
 
Ok, I need to sleep now. Good night.
 
Ell
2:02 AM
nighty night
 
2:14 AM
posted on August 22, 2012

It is important to avoid undefined behavior wherever possible when teaching beginners.

 
2:25 AM
@R.MartinhoFernandes weakling :P
it might shock you guys, but I really prefer the dark
 
I need to work tomorrow, you know?
@DeadMG Erm. Well.
 
shouldn't you already be in bed? it's been at least 24 minutes since you posted you were going
 
I got distracted.
 
lol
 
@DeadMG At home I'm always in the dark.
 
2:28 AM
good stuff
 
I'm really tempted to shell out 80€ for PA's alpha.
 
same#
 
But that would mean no books for another month :S
 
correct me if I'm wrong
 
2:32 AM
but even a relatively low-paid programming job here in the UK pays more than enough to live and purchase books and purchase PA's alpha.
so unless your job pays criminally low wages, it seems to me like you shouldn't have a problem
 
My job is not paid yet. It's a start-up, and we may get some funding next month.
 
ah
 
I'm living off my savings.
 
that reminds me, I really should apply for more jobs
 
2:33 AM
if I actually got one, then I'd be a much happier person
but all those people asking for graduates depresses me
 
Also, I really prefer to save the monies and I control my expenses tightly. Well, except on Steam sales, it seems. :S
 
yeah, I had a big problem with Steam sales the first one or two I ran into
but it's been better recently. Last sale I didn't buy a thing
 
Oh, wow.
I won't be able to play all I bought before the Holiday sale.
 
I've still got a number of games from the preceeding sale kicking around
and a HIB I bought
amnesia, dark descent, Batman Arkham Asylum, Braid, Limbo, Lone Survivor, Mass Effect 2 (and only an hour or so of Mass Effect), Psychonauts, both Stalker games, Super Meat Boy, Superbrothers: Sword&Sorcery (wtf, I don't even know this title)
 
Amnesia was really worth it.
 
2:44 AM
I've got far too many ways to waste my time already
 
I like the Batman games too.
 
hmmm
 
I started ME2 some weeks ago, but I don't enjoy it much.
 
Assassins Creed 2 was a big disappointment.
 
More of the same?
 
2:46 AM
it was very much "F = X" kind of port from console
ah, I'm not so humped about that
it was a shitty control scheme from hell
 
Ah.
I found the first one too repetitive.
 
I'm not the kind of guy who cares about repetitive too much, as long as it's basically fun.
same reason I can listen to the same track ten thousand times on repeat
 
And the second one has crappy virus-y DRM, so I'm not touching it any time soon.
@DeadMG That reminds me I have new stuff to listen to.
 
I greatly dislike DRM.
 
Yeah, it's annoying to have a better product from warez scenes than from the actual makers of the game.
 

« first day (677 days earlier)      last day (4287 days later) »