« first day (544 days earlier)      last day (4386 days later) » 

3:00 PM
I was on Google desperately looking for this mysterious fruit. How silly that must have look.
 
hi
currently unemployed c/c++/java developer, need to upkeep my skills, what do?
 
Write code!
 
Unlearn Java and C!
5
 
aside from randomly joining online collaboration project there isn't anything i can think of
 
Bite into LLVM and fix Win64 EH!
 
3:08 PM
@Droopov start your own projects?
 
Find some funny framework/language/tool to work on and work on it.
Or give Python a try :)
 
Haskell* FTFY.
 
that's nuts
 
What's nuts?
 
C and Java.
 
3:10 PM
C is fine.
 
Maybe… as long as you don't have to deal with strings.
 
> Women. You can't live with them and yet... they're everywhere.
 
@daknokt: I'm on this C++ channel too, so I obviously prefer C++ to C too, but C isn't that bad imho ;)
 
there aren't any jobs for c/c++ coders
 
There are.
 
3:12 PM
it's .net this and java that
 
well there aren't in my area
 
I have a C++ program that is going to take forever and a half to run -- is there any way I can parallelize it or run all the subfunctions all at once or something
 
wow, a grand total of 3, 2 of those are for local finance bureaucorp
 
3:14 PM
@JohnSmith Give the code (or at least some more context) and maybe, otherwise no.
 
it contains sensitive information
 
Try std::async.
 
it's a function that has four chunks to it
and each chunk takes a long time to run
but I am wondering if I can somehow run all four at once
 
...fork()
 
Run std::async for each one.
 
3:16 PM
openmp.org/wp is always fun.
 
@Droopov if you want to go through all the pain of IPC…
 
daknok_t he didn't say they have to communicate
 
@daknok_t Real programmers can deal with c-strings
 
@Collin But nobody should ever have to.
 
Real programmers suck.
 
3:18 PM
@DeadMG Unless your platform doesn't support C++.. I work on some that do not
 
@Collin real programmers take the easiest approach (and only do something else when it turns out to be slow or too memory-consuming), and that's without C-strings.
 
C-Strings suck, but sometimes they're your only option
 
@Collin Then it's time to implement your own compiler.
 
@DeadMG Sounds like an excellent use of my time :-P
 
if the alternative is C-strings, then I'd absolutely judge it an excellent use of anyone's times
 
3:20 PM
@DeadMG just a back-end for LLVM would be enough, I guess?
 
nah
LLVM comes with exception intrinsics, so if you're on an embedded platform, it could be hilarities time
 
@daknok_t Anyone written a code generator for this DCPU-16 thing for LLVM?
 
Come on, you can compile C++ for the DCPU-16, a non-existing virtual CPU on a not-yet-existing video game..
@Collin Yes.
 
@RMartinhoFernandes I seriously doubt that.
have you seen the assembly listing for the DCPU?
 
@RMartinhoFernandes Nice!
 
3:21 PM
@DeadMG There's an LLVM backend.
 
no unsigned integers, or maybe it was no signed integers
no floating point
 
posted on April 12, 2012

Last week, a sharp-eyed reader pointed out a subtle pitfall in the code that I presented.

 
no I/O
no nothing, really
pointer arithmetic and signed integers was about all it could do
 
what the hell was that? why is there a feed inject right there?]\
 
so unless you want to take 9999 years to emulate malloc, free, floating-point, etc
 
3:22 PM
@DeadMG Sounds like some microcontrollers I've used (which supported C++)
 
you would never, ever get anywhere close to real C++
oh, I don't even think it had binary ops
you'll hardly be porting Boost to it any time soon
 
@DeadMG Freestanding implementations are fine without malloc or free.
Yes, floating point may be an issue.
 
> only partially implemented
 
@Collin Yeah, I've read it.
 
3:23 PM
But then, is there a requirement that floating point has to behave any different than integers?
 
the importance of the backend is directly proportional to exactly how "partial" that is
@RMartinhoFernandes Yes, I think so.
 
Where?
AFAIK, floating point is pretty much implementation-defined.
 
ok
so even if, technically, the Standard does not require that a float have anything different to an int
does that make the back-end able to deal with float in real programs?
or is it more of a case that nobody, ever, in the history of anywhere, did anything so incredibly stupid as to typedef float int;?
and there are no real programs whatsoever that use floating-point that behave appropriately if such a thing is true?
 
@DeadMG Just generate code that uses integer operations.
 
which was dog slow, which is the whole reason we have dedicated FPU units on real CPUs
 
3:26 PM
@DeadMG Define behave appropriately in the context of floating-point.
@DeadMG No, I mean operations on integers.
 
On microcontrollers with no intrinsic floating point, gcc will emulate it (IIRC)
 
Zero decimal places.
 
@RMartinhoFernandes How are you going to deal with 1/3 in that?
 
Hi all!
 
@DeadMG It's 0. So what?
One third is not required to be representable.
 
3:28 PM
that's true
but also totally irrelevant
 
I'm having a little trouble here with class names. I got A and ns::A. I want to declare B as derived from ns::A and having a A variable. But when I declare the A type variable on the B header file, a ns::A type is assumed. How can I solve this?
 
because "What the Standard says" and "What people actually do" are not necessarily related at all.
it's so rare, IIRC, that the specifications of newer languages like Java and C# do define at least IEEE754 32bit FP support
 
@DeadMG People that use a limited system know its limits.
 
a technically conforming implementation that meets the programmer expectations of 1970 is worthless
 
3:30 PM
If I'm working on a system without an FPU I know I'll have to expect either slowness, or crappy support.
 
right
but if I was coding Windows on paper, I'd know to never expect it to execute, but that doesn't make the exercise less pointless
 
@DeadMG DCPU-16 is a CPU of the 80s.
 
which probably explains why it's fairly pointless
IMO, it would be much faster and easier for them to say "We interpret some given subset of JVM bytecode"
 
Because it can't do floating-point?
 
or CIl
it's for a game
how many three-dimensional games do not involve FP?
hell, even all the 2D games involve a bunch of it, if I recall correctly
 
3:33 PM
@DeadMG It's just part of the game mechanics, not the actual implementation of the game
 
The DCPU-16 is not for writing games.
 
right
 
It's for controlling spaceships.
 
but how can you ever even interface with it?
you can never, say, get your own position in 3D space, for example
whoops, it's a triplet of floats
 
It could be a triplet of shorts.
 
3:33 PM
@DeadMG or a triplet of fixed point integers
 
Space is small, after all.
 
what would have been much better for them is just to take an existing extension language like Python, Lua, or JS and just use that
 
How is the game designer's choice relevant, anyway?
 
@DeadMG But it wouldn't have the same cool factor
 
I think Notch just likes assembly.
 
3:35 PM
@RMartinhoFernandes Since I don't intend on playing, you could fully argue that it isn't :P
 
This is interesting, and retro-y and gets the community working on contributing to the game, instead of just embedding a python interpreter
 
I was probably deliberately kept simple.
 
so there's no way to run all my shizzle at once?
 
Well there's threads...
 
@Collin "The community" will get pretty bored pretty quickly with such a limited system
 
3:36 PM
I mean, my point was that if you can get a C++ compiler for that thingy (obviously limited by the platform), you should be able to get one for a real platform where there's money involved and all that.
 
@DeadMG Not if you can compile C++ to it
 
Plus, the game is not about coding.
 
@DeadMG You might get bored pretty quickly.
 
That would indeed be boring.
 
@Collin As I've spent the last 20 minutes discussing, the language that will compile to the DCPU-16 is almost certainly a massive distance from anything I might recognize as C++.
 
3:37 PM
@DeadMG I mean, redstone in minecraft is just wires and repeaters.. and people have gone NUTS with it
 
The way I see it, it's an improvement of redstone logical gates in Minecraft.
 
According to the Wallstreet Journal, the best job to have is Software Engineer. Hahah :P
 
lies
Finance ftw
 
@Collin True. But the number of people who play Minecraft is so ridiculously large, that it's not really an accurate sample of what would happen for a game with a normal number of users.
 
You mentioned porting Boost before. What's so hard to port to it that is in Boost? BLAS? IOStreams (it would be useless anyway)?
 
3:39 PM
It pays ungodly amounts and moves like Jagger
 
@DeadMG And you can't get people playing this one?
 
@Collin So how do I break it down hardcore style and get some wicked threads flowing here
 
@Collin Even Notch doesn't think it's remotely likely that the game will be as big a hit of Minecraft.
 
It could certainly be a flop, but with minecraft's inertia attached to it, it has a chance
 
@JohnSmith Money isn't the only thing. I prefer being paid well and have fun than being paid ridiculously well and bore myself to death.
 
3:40 PM
@JohnSmith depends
 
You can't throw threads at things.
 
@Collin People will play it because it's "from the same guys as Minecraft"
 
@EtiennedeMartel A valid point, but not all finance is boring. Working as a quant is quite fun -- it's like doing software development and risk management for financial firms and the pay is great (and you don't have to work retarded hours doing mundane work like ibankers)
 
@RMartinhoFernandes Sure you can. They don't fly very far, though.
 
@RMartinhoFernandes There's nothing specific about Boost. All I'm saying is that since the entire modern paradigm is set up to deal with devices with something like 30bits of useful memory or more, it's not going to scale well at all to just 64k
 
3:41 PM
@RMartinhoFernandes One does not simply thread into Mordor
4
 
> I mean, the odds against you being right are staggering. You have a great advantage: you know the outcome. You WILL be wrong. Don't fear it, embrace your wrongness!
 
@EtiennedeMartel Yeah, and (not like there's a lot of game design we've seen) it seems to have enough geek porn in it to at least garner a cult following
 
I mean, stuff like FP- sure, you could emulate it, but it might well be vastly too slow for any practical purpose
 
@Collin Those creepers have quite the phallic shape, indeed.
 
@RMartinhoFernandes I can C clearly now
 
3:42 PM
The rain is gone.
 
all I'm saying is, I don't see the purpose in including a gimped 16bit CPU assembler instead of just a normal language
 
Limitations add to the challenge!
 
@RMartinhoFernandes It's gone? What do you mean it's gone? Where did it gooooooo?!?
 
Also, it lets you use other languages.
 
@DeadMG Better than nothing, I suppose.
 
3:44 PM
@DeadMG I guess it's the added challenge, what fun would it be to program your own game inside 0x10^c in python?
 
@RMartinhoFernandes What's important is the end result, not the difficulty of getting there.
 
@RMartinhoFernandes I can C all Oracles in my way
 
But I wonder if you could write a C compiler in DCPU-16.
 
@DeadMG It's a game the entire point is the difficulty in getting there
 
It's not there because notch wanted a way to program in-game events, it's there because he wanted a geeky and cool way to interact with your ship
 
> So on a up beat and happy song we start bashing people for their opinions and start a religious debate. You stay classy Youtube.
 
@RMartinhoFernandes What, they argue about programming languages and editors on Youtube too?
 
how do I multithread this beast
 
Hell sweet fuck, they even got a LLVM backend: github.com/krasin/llvm-dcpu16
 
3:47 PM
No one can answer that without code. Fuck.
 
@JohnSmith The beast shreds you into multiple threads
 
♪♫ Fuck emacs ♪♫
(afk)
 
Fuck salt
 
You sing that?
I mean, I know vim is the best editor there can ever be, but singing "Fuck emacs" is taking it too far.
 
3:50 PM
man
I want to work more on Wide, but I also want to work more on my renderer
so little time, so many decisions
 
Fuck decisions, get shitfaced instead.
 
ll
no thanks :P
 
I wonder how "shitfaced" came to mean drunk.
 
so drunk, you'd rub your face in shit?
 
Ever been drunk? Your face feels like shit.
 
3:53 PM
Oh.
@EtiennedeMartel No, never. That might explain it.
 
So can anyone actually tell me how to multithread my thing or does nobody here know?
 
@JohnSmith That completely and totally depends on what "your thing" is
 
Nobody knows how to multithread code they never saw.
 
it's like how to implement "your thing" in the first place
 
I have a feeling of déjà vu.
 
3:56 PM
Why does the code itself matter? It's just int main() that calls a function f() with some parameters
 
Man, French is hard to type.
 
runs f() four times with different parameters, that is
 
it matters because dependencies arise in multi-threading that do not arise in single-threading
 
@RMartinhoFernandes Nah.
 
that is, useful multi-threaded code is a subset of useful single-threaded code
that is, it's more than possible that your code needs to be refactored before it can be multi-threaded
 
3:57 PM
@EtiennedeMartel Do French keyboards have dead keys for accents?
 
@RMartinhoFernandes What do you mean by "dead keys"?
 
@JohnSmith Because there's no universal way to do it.
 
multi-threaded code must be a lot more strict about a number of things in order to succeed
in addition, there are several useful concurrency models
 
You can't just add threads and put it in the oven.
 
and you would have to pick the most useful
 
3:58 PM
@RMartinhoFernandes Indeed, code isn't meant to be baked.
 
@EtiennedeMartel Keys that you press but don't "output" anything, until you press a letter, and then that letter comes up with the accent.
 
But a wise philosopher once said
It's a piece of cake to bake a pretty cake
 
Ell
hi guys
 
So shouldn't this be trivial
Unless the way is hazy?
 
no
threading is extremely non-trivial
 
3:59 PM
No, multithreading is not trivial.
That's Threading 101.
 
threading is harder than pointers, harder than recursion, harder than iteration, harder than object-orientation
 
What if we do the cooking by the book?
 
threading is about the hardest thing you can do
 
You know we can't be lazy
 
@RMartinhoFernandes Oh. Well, it depends on the keyboard. Mine ("canadian multilingual standard") actually has keys for é, è, à, ç and ù. There are dead keys for ^ and ¨.
 
4:00 PM
@EtiennedeMartel Ah. That explains it.
All accents are dead keys on mine. Typing words with more than one accent with dead keys is painful.
 
yay for no accents in English
 
Especially if said accents sit on the same key, but one is the Shift-ed version of the other.
@DeadMG But English doesn't have a word for déjà vu!
 
we just type it deja vu :P
 
Some people also type "i".
 
really? i hadn't noticed
 
Ell
4:04 PM
I don't understand why threading is so difficult
I have never done it so I would never know :L but it seems relatively easy :o
 
Because God made it so.
 
@Ell Simple.
 
consider the number of states any given program can be in
assume that I have N1 bytes of code and N2 bytes of working memory
then my program can only ever be in N1 * N2 states at once
but if I have two threads
 
Ell
yeah
 
4:05 PM
now it's N1 * N1 * N2
 
COMBINATORIAL EXPLOSIOOOONNNNN
Sorry, wanted to yell that.
 
Ell
so...? that doesn't make coding it more difficult
 
@Ell It makes it massively more difficult to actually know what your code is doing at any one time.
because it can be doing more things at once.
and in addition, there are huge sections of single-threaded code which are invalid
and threading bugs are non-deterministic
 
Ell
actually the non-determinism I can understand
 
Damn it. I hate it when a mail server intercepts my email because there's a .exe in it.
 
4:06 PM
so your program could be doing many more different things, your old single-threaded code is junk (and you have to understand every single part of it well to know if it's useful)
 
Ell
but shouldn't it all be modular and separated with a thread?
 
when you're writing single-threaded code, each interface only has to meet it's own requirements
but when you're writing multi-threaded code, you have to know the implementation
because implementation details can break your external threading
and the implementation of "everything you've multi-threaded" can be a lot
way more than you'd ever need to understand at one time to write a single-threaded program
 
Ell
what do you mean by "external" threading?
 
what I mean is
if you supply an interface with some methods and their requirements, you can supply any implementation you want
 
Ell
yeah
 
4:08 PM
but if the user is going to call them from multiple threads, even though your methods meet the specification, they can still be illegal
because if they contain dependencies that are shared, the threading will explode
 
Ell
oh I see
 
that means that method and data dependencies and a whole bunch of stuff which used to be implementation details are now public interface details, which makes writing to interfaces and abstraction much more difficult
 
Would be nice if it did explode.
 
Ell
yeah I understand that
 
Instead, it just UBs away.
 
Ell
4:10 PM
is there a way you can specify some kind of threading requirements in the interface?
 
sure
you can say "Is free-threaded" or whatever you want in the specifications
 
Ell
I mean is there something the compiler can enforce
 
the problem is that many convenient single-threaded designs do not meet updated multi-threaded requirements
@Ell Nope.
 
Ell
Hmm. Someone should develop that xD
 
that would be solving the Halting Problem
and is mathematically impossible
 
Ell
4:11 PM
really? :o
 
yep
 
Ell
but programmes are deterministic?
 
yes
but they are also infinite
 
Ell
oh yeah
 
which makes it impossible to determine, in a finite time, if they ever perform any given action
 
Ell
4:12 PM
does the halting programme say you have to execute the programme to find out if it finishes?
 
halting is just the example problem, but answering many other questions is equivalent
@Ell No, the proof for it basically says that that would be the only way to ever find out.
 
Ell
hmm
 
and because you can never execute it and determine if it halts, then it must be impossible
 
Ell
yeah - it makes sense now
 
of course, that's the theoretical version, and real programs are subject to many more restrictions
but if you could develop a program which could solve this problem on real programs, you would be one ridiculously rich man
 
Ell
4:15 PM
...how rich? :P ;)
 
more money than God
 
> It is only a matter of time before the lolcat compiler cross compiles to [DCPU-16]. ICANHAZSPACESHIP?
 
Ell
so any amount of money :L because god has none :D
 
oh yes
robot
 
4:16 PM
I came up with a new proof to show that the Chinese Room is impossible
because Chinese is Turing-complete
 
Fire away!
Damn timeouts.
 
so if it were ever possible to write any function f that performed as described, it would be solving the Halting Problem
the only way to get the actual output would be to understand Chinese
in fact, it's directly equivalent to, say, a processor
an ARM CPU doesn't understand x86 and the only way to get out any data about an x86 program would be to install an emulator, so that it could "understand" x86
 
Ladies & gents, for your consideration:
0
Q: Why does reallocating a vector copy instead of moving the elements?

Konrad Rudolphinsert, push_back and emplace(_back) can cause a reallocation of a std::vector. I was baffled to see that the following code copies the elements instead of moving them while reallocating the container. #include <iostream> #include <vector> struct foo { int value; explicit f...

 
@DeadMG I don't see how solving the halting problem is required. Are you saying that "understanding of Chinese" is enough to solve it?
 
no
imagine instead of Chinese, we are discussing a computer language which is Turing-complete
if I passed a sample program to be executed
the only way to behave as if you were executing the actual program would be to "understand" the language and execute the program
else would be solving the Halting Problem
 
4:22 PM
@KonradRudolph Hmm, that's nasty.
@DeadMG Ah, so your argument is that executing the program is actual understanding?
 
What does "nil" mean?

as in wiki, there is info:

nil probably does have its origin in latin "nihil" meaning "nothing"
NIL might stand for: "Not In List"
What do you think, which variant is right?
 
Usually it's used to mean the same as "null".
 
@RMartinhoFernandes C++11: still the language with plenty of room to shoot in someone's foot, though sometimes you'd not even notice anymore :)
 
I'd say C++11 is still C++, it's just that you have a more accurate gun and an armored foot now.
 
Armored with PVC, perhaps?
 
4:33 PM
Better than nothing.
 
@EtiennedeMartel I don't see the armoured foot. There are aiming aids now, like optional target laser lighting and perhaps a tripod. But those aren't applicable in all field conditions
 
Where is my bazooka++11?
 
@rubenvb std::thread.
 
Zzzzzzzzziiiiiiiinnnnnggggggg!
 
DISCLAIMER: do not shoot yourself in the foot with this. Warranty does not cover personal damage, PC gnomes, or fried children
 
4:44 PM
OMG, so many awesome videos to download and watch!
Is throw() equivalent with nothrow?
 
What's nothrow?
 
Isn't that a C++11 feature?
 
right :)
 
For the last time, throw() is not noexcept. noexcept has only compile-time semantics. throw() has the runtime semantics of std::unexpecteding your program if violated.
 
4:48 PM
@RMartinhoFernandes Sorry, it was my first time :)
 
Now someone please star that to make sure it is the last time :P
 
There you go.
 
I like the use of the verb "to std::unexpected".
 
sounds aweful
 
You're forgetting the parentheses
otherwise it doesn't parse as a function call, and it is no verb
 
4:51 PM
@rubenvb I know it's not a verb. Artistic license.
 
I call bullshit. Robots have no artistic license.
 
0
Q: How to call MessageBox with GetProcAddress function?

user1131997I want to call MessageBox() function in such way: 1). load needed library 2). get the function address 3). call it So, for such aim as I understand, I should define new type with all types of arguments in MessageBox function. It returnes INT and acccepts: HWND, LPCSTR, LPCSTR, UNIT. So I regi...

 

« first day (544 days earlier)      last day (4386 days later) »