« first day (551 days earlier)      last day (4396 days later) » 

10:00 AM
@sehe I have. 0x10co.de
 
Yeah, I found a counter-example... damn.
 
@classdaknok_t You're not the only one. Google and SO agree on that. I just 'SCNR'-ed the quip
 
@classdaknok_t It's incredible the ecosystem that already sprung up around essentially nothing.
 
@RMartinhoFernandes aliens Notch
 
@RMartinhoFernandes Nah. It's not vaporware. It'll still be mainstream by 281 474 976 712 644 AD
 
10:04 AM
From the sounds of it, 0x10c should be a really good game
 
you know hack-a-day plan to do a competition at some stage for a real life implementation of a Dcpu-16 computer
 
@RMartinhoFernandes :O
 
Apparently there's already video hardware (not official).
 
10:07 AM
It seems Notch has turns into some sort ventriloquist (spelt that first time) programmer
 
> $1 = std::vector of length -283193, capacity 247853
Thanks, GDB, for being so useful.
 
@jalf Yeah, fixed it. (I think) It's ugly...
Oh wow, I really do get residuals every time I answer a non-trivial question.
@jalf And who in the world would downvote your question?
 
Are you kidding me… -_-
 
Anyways, 5AM here, got class at 11. lol
 
@classdaknok_t Ten mines in two squares.
You're screwed.
 
10:13 AM
@jalf, you might want to add a C or C++ tag if you're interested in intrinsics as the answer. (which I assume you do)
 
@RMartinhoFernandes And guess what? I won.
I think that there's 10 mines max.
 
So, buttons work, extracting pixels fails somewhere.
 
> My first DCPU-16 project, or assembly project even. If I did anything absurdly wrong feel free to point it out
 
0
Q: C++11 nullptr References

NordlöwI just noticed in GCC-4.7 C++11-mode that I can write f(int & x = nullptr) { optionally do something with x } This is really sweet, but how do I check whether X is defined (non-nullptr) or not?

?!
 
@classdaknok_t I think 010 is a binary number
 
10:17 AM
@sehe no. There is only one mine in that field, as you can see.
Probably just a bug.
 
@classdaknok_t I don't speak minesweep. I don't know how the code works.
@classdaknok_t See ^^^
 
I think I shall work a bit harder at my Dcpu-16 emulator
 
@sehe the numbers indicate the number of mines adjacent to them, horizontally, vertically and diagonally.
 
You go girl!
 
Though I have found the compiler to be the hardest part so far, which I need to port to C++
 
10:19 AM
@classdaknok_t I figured. Wasn't sure about diag, so 0b010 was still an option, if I did miss something
@thecoshman You are porting the 'compiler' (assembler)? Why: if you emulate the VM, you should be able to run program binaries
 
There is only one mine, not two.
 
Yeah. You explained. I explained my earlier line of thought.
 
@sehe I wrote a compiler (the ASM text to BIN/ROM) in perl, mostly to play with perl
 
@thecoshman Oh. I think I remember something now
 
10:21 AM
I suppose I could just run the code as raw ASM code...
 
you mean, the assembly instructions/binary image
 
yeah, sort of like JIT
but then, It wouldn't really take in account the use of short labels vs long labels
 
@thecoshman you know that the DCPU-16 allows self-modifying code, right?
How are you going to do that with just-in-time compilation?
 
yeah, which probably means that I need to emulate the code as a compiled ROM even more
 
@sehe: Was it you that asked if any of us had gotten to our "vote allowance"?
 
10:28 AM
@classdaknok_t I'm glad you said that, I thought I might have wasted my time working on compiling the asm text into a bin
 
@GManNickG yup. Strangely, I have voted on a flag (only 'invalid') since without a problem
 
@sehe: Because I just found out I have. :) Probably from clearing all those flags from earlier.
 
Yes, I got to my flag vote allowance today.
 
Don't you agree it looks like the flag system thus is vulnerable to DOS?
Making it even more broken IRL
Someone just needs to exceed the flag quota for all 10k users and they get a free pass. Well, sock puppetry FTW
@thecoshman Oh good, I remembered that 'Hack Language' thing from IH:
 
one thing I am not to sure about though with Dcpu-16 is how to label values. Lets say you wanted to use a value in a lot of places, could I just have a label for a literal?
 
10:32 AM
Jan 3 at 14:10, by IntermediateHacker
 
@sehe oh right, never mind
 
@thecoshman Just read the quote, please.
You know the thing I reimplemented in about 20 lines of perl: ideone.com/H5z0d (modulo a number of bugs)
 
> # allow silly windows CrLf
 
@RMartinhoFernandes: That guys question was based on a faulty premise, apparently. I was quite surprised at the claim it compiled.
 
print <<TOP;
TOP
I forgot about those :P
 
10:36 AM
@thecoshman Really, one of the few 'niceties' in Perl (and similar hack languages): Here-docs with interpolation.
 
@sehe erm... what's it for? I see what it is doing, but what is it for?
 
By the way, before you say you would never write such contorted perl code: it was more or less literally what IH wrote in code.google.com/p/hack-programming-language (go, help yourself, it's only MIT licensed)
 
is it just to let you write a language in a lazy way?
@sehe how can it be perl code if it isn't contorted?
 
Your guess is as good as mine. But his C# implementation certainly didn't do it the Lazy way. It used The Enterprise Trajectory Plan
Well, it could be glorified shell script with datastructures. Well, that's mildly contorted
 
dang... wish I had ssh to my home PC set up :(
 
10:43 AM
@thecoshman To do what? Also, you can, of course.
 
@sehe oh god, I hate videos where the guy just types stuff for you to read
@sehe I want to get some files from my home PC. It's not currently set up
I was working on setting up WOL through my router, but the router my ISP gives me is not that configurable
 
Woo, I think I'm done.
It works.
 
what does?
 
Amazing.
My letter recogniser.
 
OCR?
 
10:47 AM
"It looks like you're trying to write a letter..."
 
Yeah, a simple one.
 
uni stuff?
 
Yeah.
600 LOC.
 
@CatPlusPlus Impressive
 
10:55 AM
It's just a direct implementation of probability equations. Most of that code is UI.
 
@thecoshman Posted a long overdue comment at that vid
@CatPlusPlus what input format do you use? Some kind of Ink/Pen/Vector format?
I hear WPF has nifty support for that
 
A panel with mouse drawing.
Then extracting black pixels as a list of coordinates, and deriving predefined traits from that.
 
@CatPlusPlus So, you translate it into your own representation? I was wondering how/what kind of presentation
@CatPlusPlus Ok, not vectorial but bitmap-oriented. Does that mean it only recognizes fixed-scale/fixed-shape letters?
 
Then calculating normal distribution based on precalculated estimators, and choosing the most probable result.
You train it first.
And then it guesses.
I can upload it later, if you want.
 
@CatPlusPlus So it only recognizes the scale and shapes trained with?
 
10:59 AM
The traits are designed to tell A, B and C apart.
 
@CatPlusPlus Sounds like fun, as long as the training comes with it (otherwise, it just bed side reading)
> "The idea that you'd settle down in a deep leather chair with your smoking jacket and a snifter of brandy for a fine evening of reading through someone else's code is absurd." - Jeff Atwood.
 
Yeah, I did training data, it's required by the assignment.
It's really "draw this letter as best as you can 5 times, each time pressing 'learn'".
And then hoping it'll work later. :P
 
Oh noes, AWS has 'apps' too now: Introducing: AWS Marketplace
 
Goodbye room, have a good one!
 
11:52 AM
> The friar disappears into the book, leaving his wallet behind. You quickly change your name to Victor, and to Victor go the spoils.
> Then you change your name back, and continue your search.
 
12:05 PM
@sehe oh god I NEED a deep leather chair, smoking jacket and a snifter of brandy
@CatPlusPlus can you not train it with more then five examples? what if it guess a letter wrong, can you tell it what it should have picked it up as?
 
12:33 PM
mawning
 
This is probably painfully basic for many of you, but when using Hg, or any DVCS for that matter, when I commit, that only commits my changes to my local copy of the repo, in order to have my changes reflected on bit-bucket, I would have push is it?
 
correct
 
so what is a pull request?
is that something others do when they want me to take their code changes?
 
yeah
so they'll point you toward their public repository (which has new changesets on top of yours) which you can pull into your local, then push up to your public
after resolving any merge problems or whatever
 
so... what is it that lets me push willy nilly to the my public bit bucket repo, but not any one else?
 
12:35 PM
right
 
what stops others from pushing to my public repo?
 
Permissions.. only you can push to it
They'd have to login as you
It's 'public' because anyone can pull from it
 
which permissions where? what let's me push? is it the old ssh key files?
 
Yeah, bitbucket only lets certain users push to your repository, they're authenticated by the ssh keys
 
oh ok... so what about https? what stops Joey Ramone from using https to push to my repo?
 
12:38 PM
or https
@thecoshman Your username and password?
 
well that makes sense I guess :P
 
@thecoshman Maybe it doesn't even allow pushes over https?
 
ok then... I think I understand things well enough
@Collin the tutorial shows pushing via https first, then sets up ssh afterwards
 
ah, then yes, your username/password
 
@thecoshman http(s) would typically be anonymous, and public repos usually disallow anonymous pushes, but it can be configured to allow this. So I'm guessing the tutorial just starts with a repo where everyone are allowed to push anonymously, and then locks it down in later, when the ssh stuff is introduced
but it's just configuration. The DVCS can be configured to allow pushes from some users but not others
 
1:05 PM
erm... does any one know what the but bucket default is?
 
private, I think
 
yeah... I turned that one of :S
which I thought just controlled who can clone
 
@sehe It's basically an experimental playground for concurrency. I've thought about creating an actual game from it, but I don't have much inspiration in that regard.
 
16
Q: My compiled C++ program is too small. How can I make it larger?

Dustin CowlesI have a C++ program that compiles to 9.5k. I would like it to be over 1MB. I did the following to pad it up to about 18k, but doing this all the way to 1MB would be hard. The code is unreachable, but due to compiler optimizations I had to make it appear reachable, hence the bool changes. #incl...

^ WTF?
why in the world would anyone want to make his executable bigger???
 
hmm
 
Mat
1:19 PM
To make it seem like something its not.
 
sqrt(3) + 1 < 2*sqrt(2)?
yes
 
Mat
Pen and paper says you can square both sides, simplify, square both sides again, and it will end up as 2<4, so true. I would have thought you could have some method of embedding a lot of nops in code though.
 
@IntermediateHacker I get daily spam about that. It appears plenty of people want to make their tools bigger for no obvious reason
 
Mat
What is more logical: int[] a; (C# style) or int a[]; (C(++) style)? I can't make up my mind at the moment.
 
definitely int[] a;
consider the idea of an array of points
C#, easy: int[]* a; and it's clearly not int*[] a;
 
1:26 PM
@DeadMG Agreed, having the type declaration all in one place makes way more sense
 
in this case if you want to know the type you can just read LTR
or RTL or whatever
but in C++, int* a[]; // pointer to array or array of pointers?
 
Mat
But C also has quite a nice spiral rule.
 
nice? it's horrific
 
@Mat spiral is not nice, certainly not compared to RTL or LTR
 
Mat
Then why do we use int a[] then?
 
1:28 PM
It's a semi-elegant way of parsing C's insane declaration syntax, but shouldn't be necessary
 
because the guy who invented that syntax didn't realize how stupid he was being
in short
 
@Mat It was one of the first structured procedural languages, they were bound to make some silly mistakes
 
yes, of course
and if you read the rationale, it's not actually that bad an idea
it just doesn't work
damn
drawing up the rules for 3D A* JPS is gonna take some time
 
2:26 PM
anyone else wanna have a good rant at the MSVC team? blogs.msdn.com/b/vcblog/archive/2012/04/18/10295093.aspx
12
 
@jalf What's wrong with that?
oh, wait, I see
that's really kinda dumb
 
@DeadMG that roughly 30% of the world still runs on XP, and if we can't target XP machines, VC11 is pretty useless
 
why would you drop support for targetting XP in your compiler and libraries if you haven't dropped consumer support for it yet?
 
with ye old HG, if I 'commit' changes a few times, and then push them, does the remote repo get updated to have the few independent commits, rather then seeing just one big change?
 
@thecoshman it gets each individual commit
 
2:34 PM
and this 'shelve' option? is basically like doing a temp branch with what ever changes I have made, and then reverting back to before I made those changes, but keeping them saved for me to make use of later?
 
@jalf Or that, if developers start using VC11, XP becomes useless.
 
there must be something so wrong with me
I bought a bunch of food, and now I feel like I have nothing to eat in the house
 
@DeadMG I have this problem all the time too
 
@thecoshman Which DVCS are you using again? Hg?
 
@jalf yeah
 
2:38 PM
All the food I have involves cooking it, so I never feel like any of it is edible
 
But yeah, that's basically what it does. Put your changes away (in a temp branch), so you can work on something else and then get back to where you were
 
mostly, mine is eaten cold
and I'm currently quite cold
so it's a bad match
 
microwave whatever it is?
 
Yeah, let's microwave ice cream.
 
lol
or yoghurt and various fruits :P
 
2:41 PM
sigh...
microwave ALL the things!
 
lol
sure
so
 
Or drink tea, I drink a lot of tea at work
 
I'mma go buy eggs; and probably sausages or someshit like that too
hot meaty goodness
also pesto and onions, because they're tasty
 
eggs are good for you
 
and some bacon
and a pork chop
and some ribs
and a leg of ham
 
2:43 PM
that's quite the breakfast
 
so many tasty animals
ewe, I thought this guys emails look unsettling; then it dawned on me 'Comic Sans'
@ScottW "comic sans is the shit" FTFY
 
lol
 
Better submit that to area51
"How can I install ComicSans on my Apple II?"
"Is my grandfathers obituary an appropriate place to use Comic Sans?"
Closed as not constructive: "Which is better, Comic Sans or Helvetica?"
 
@ScottW awe! panda!
 
"How do I properly kern Comic Sans in Microsoft Publisher?"
 
2:58 PM
fuuuck
ca't find my wallet
 
@ScottW (╯°□°)╯︵ ┻━┻
 
Well, you know…
 
see how friendly that code looks
 
Beware that it isn't friendly at all; it's Objective-C code.
 
@ScottW Just FIY, that was flagged.
Twice already.
I would invalidate it, but I have used my flag vote allowance for today.
 
3:09 PM
yay, found it
 
@ScottW return O?
 
> For the next release if VC++, you should leave out the compiler entirely! Invest all your resources to the UI.
You're so gonna be suspended.
 
I cancelled one flag.
 
I can't cancel any, I wasted my votes on that 60+ flag fest this morning.
 
erm, what do you make of the idea of using a std::string as some sort of special code for what to initialise values of a class to?
 
3:14 PM
@jalf RE: the MSVC11 for XP thing: would you want to try to implement std::thread without Vista's threading primitives? I don't know how Boost.thread does it, but I'd guess it's a small hell in itself.
 
@thecoshman what? Can you give an example?
Meh cloning the Linux git repo takes long…
It's about 1.6GB.
 
What's so special about Vista's threading primitives? Better, what's so problematic about XP's?
 
erm, well sort of like myClass(std::string magic){ if (magic == "foo"){ age = 10; } else { age = 20; }}
 
@rubenvb Why? Microsoft's CRT team built much more advanced threading abstractions for the PPL in VS2010, and that supported XP too.
 
@thecoshman what about an enum?
Enums are less error prone (compile-time checking) and faster.
 
3:17 PM
because I intend to read in this string value from a text file
 
@RMartinhoFernandes they closely match pthreads in functionality.
There's stuff you can do with them (or so they say) you can't do in XP.
 
Exactly what stuff can you do that std::thread requires?
 
@DeadMG true, I guess the fact that Boost did it makes my argument moot
 
might be better to make use a factory, so that I can properly handle an invalid string being passed in
 
I would convert it to an enum value somewhere.
Or just use a bool if it's only important if it's "foo".
 
3:18 PM
@thecoshman Just get a proper interpreted language.
 
FTR, std::thread provides basically join and detach functionality.
 
@RMartinhoFernandes Both of which can be implemented quite easily on XP's thread primitives.
 
can I have a private enum? so that the class it self is able to make use of it, but out side of the class, the enum does not exist?
also, what is neat way to get an enum value based off of a string?
 
It's irrelevant how much more power Vista brings. It's not needed for std::thread.
 
3:20 PM
@thecoshman The only way to do it is a lookup table, and you can make them private like anything else.
 
ok, ok. I keep overestimating std::thread it seems.
 
@thecoshman yeah, you can have private enums. class foo { private: enum bar { baz }; };.
 
@DeadMG sort of using switch (stringValue){ case "frank": return myEnum::fran} etc.
 
@thecoshman just an std::map<std::string, foo::bar>.
return lookup_map.at(string_value);
 
@classdaknok_t where would I build this map? could that be done compile time?
 
3:22 PM
You'll automatically get an std::out_of_range exception, which is neat.
@thecoshman make it static and use an initializer-list.
 
@thecoshman Not with std::string.
You can make it initialise before main, but not at compile-time.
 
If you make it static (and global?) it will initialized before main is called.
But the runtime overhead is infinitesimal.
 
@classdaknok_t which is not the same as compile-time -> Initialization order fiasco!
 
A solution for that is to make it a function-local static, which is constructed the first time that "get" function is callled.
 
3:28 PM
@rubenvb That is a good idea.
But is that thread safe?
 
@classdaknok_t Yes. The robot knows why.
 
I doubt initializing a constant map of strings to the equivalent enums will suffer from SIOF.
 
@RMartinhoFernandes if you use it in another static initialized thing
I had it happen
 
Sure, but this scenario is pretty innocent.
 
Mat
@classdaknok_t moon != mooh!!!
 
3:30 PM
meh
Stupid Mac OS X Lion auto-correct.
 
@classdaknok_t Because it's missing a return type for meh.
@classdaknok_t It is in C++11.
 
@thecoshman example: ideone.com/ng1eM
 
I prefer asserts.
 
Over std::out_of_range?
 
Outputting ones.
 
3:34 PM
It's just an example…
 
I know. I mean I prefer asserts for examples.
:)
 
Ah k. :)
 
11
Q: Is it acceptable to use pirated software on the job?

PatrickIs it a acceptable to use pirated software on the job without telling your boss about it? I find that getting your employer to buy the software, pirating the software and then use it to do your work, and then not telling anybody else about the fact that you used the pirated software can be a lot ...

Wut?
 
I love the "without telling your boss" part.
 
> …the company can get into trouble because of your actions.
But… that's awesome.
 
Mat
3:42 PM
Nobody likes the preprocessor right? But what would you say to something like this: pastie.org/3817368
 
The compiler could optimize that.
 
It doesn't compile?
 
@RMartinhoFernandes it's hypothetical code.
 
Mat
I know in that case the compiler could do it, I'll try and think of a more complex example where this might actually be useful.
 
3:45 PM
@Mat you can probably do it using some template magic and the compiler will inline everything.
Even for complex cases.
 
The problem with the preprocessor is that is manipulates text.
# for (int i = 0; i < 2; i++) {
     *
# }
pointer
// dereferences the pointer two levels.
 
Also, Boost.Preprocessor can do loops.
 
Mat
So do you think we actually need a preprocessor at all? Compiler optimises most stuff anyway, so #define is pretty much obsolete now.
 
The power of the preprocessor is that it manipulates text (well, tokens).
Removing it would take that power away.
 
My computer lags due to Git resolving deltas.
2435868 objects. 😲
 
3:56 PM
What are you gitting?
("gitting", get it?)
 
I'm cloning the Linux kernel.
 
Mat
... Why?
 
I'm writing a GUI front-end for Git and I want to test if it slows down on big repositories.
 
Mat
Oh ok. I just thought you might be trying to rewrite large parts of the kernel, that's all.
I was worried for your sanity
 
Especially because it loads the entire log at once and I want to find out if it's worth to add pagination.
 
Ah it's done.
And… yes. It slows done as hell…
FUCK
 
Mat
Why does it slow down? Surely most of the work is done by git, and so the GUI makes no difference to the actual transfer of data...
 
I use libgit2.
And it takes ages to read the entire log, and create an object for each commit.
 
Because it's ginormous.
 
Pagination is difficult to implement when using NSTableView.
Meh it's even slow when loading only 50 log entries.
I think I'll have to pass it on another thread.
The app shouldn't hang for ten seconds.
Sorting the log differently (by time instead of topological) fixed the problem.
 
4:15 PM
Isn't that just hiding the problem?
 
I’ll try again …
6 hours ago, by Konrad Rudolph
What is the etiquette when receiving a recruitment email from a recruiter (not a head hunter) when you’re not interested (and did not solicit contact requests)? Ignore it? Reply & decline?
 
@RMartinhoFernandes I want it to sort by time anyway.
 
What's the difference between recruiter and head hunter?
 
@KonradRudolph Inform them of all the depraved sexual acts they can perform on your corpse?
 
4:16 PM
or you could just ask them why they contacted you
if there's a third party out there spreading your contact info saying you're available, you want to correct them
and one single recruiter might be just the tip of the iceberg
 
@DeadMG (At least in my book:) recruiter works for the company that’s hiring, head hunter is outsourced and has a (justifiedly) bad reputation for just sending out requests shotgun-style
@DeadMG It was via Careers.StackOverflow.com ;)
by the way, it’s from Facebook ;)
 
@KonradRudolph maybe ask on programmers?
 
does your profile still list you as available/interested?
 
@KonradRudolph I'd reply, then.
 
@DeadMG No, it doesn’t … but on the other hand it doesn’t (as far as I know) say that I must under no circumstances be contacted
ok, thanks, need to catch the bus now :)
 
4:21 PM
@KonradRudolph It depends. If it's pretty much generic spam (e.g., you just got it as a high-rep user, and it's not at all relevant), I'd ignore it. If it seems to be aimed more directly at you, I'd probably reply and decline. Looking at it slightly differently: if it's something/someone you'll never care about, just ignore it. If it's something you don't care about now, but might in the future, be nice to them. (I know, self serving and such, but that's life).
 
the windows api is conspiring against me.
I wonder why I even wanted to use that shit for UI dev again. :(
 
it's the Windows API, what were you expecting? :P
 
@IntermediateHacker I am guessing that someone warned you.
 
@IntermediateHacker Never attribute to malice what can be explained by stupidity! Believe me, there's enough stupidity there to explain almost anything!
 
4:58 PM
:)
 

« first day (551 days earlier)      last day (4396 days later) »