« first day (422 days earlier)      last day (4752 days later) » 

22:00
The Java code also has around 500 warnings. Not a few warn about actual or potential null-pointer dereference. I can't understand how warnings like this are just ignored.
However I complained about this too many times already. I'll stop boring you to death.
@StackedCrooked Sorry, you mean that most of the warnings are about null pointer accesses, or that the compiler doesn't warn about it?
They still think that using managed pointers will make the application slow.
@RMartinhoFernandes The compiler (Eclipse/Java?) complains about it but nobody seems to pay any attention to them.
Tell them crashing makes application even slower, with all the needed restarting and stuff.
3
@CatPlusPlus :D
@CatPlusPlus And the annoying losing of customers.
22:06
Tell them that you'll punch them in the face.
@CatPlusPlus Just add try { ... } catch(Exception e) { e = e; } in the right places.
just like that.
Silly e = e; is to shut up the warning about the unused exception variable.
// I recently found this (not-so) gem:
if (a) delete a;
if (b) delete b;
if (c) delete b; // Thank you Valgrind.
// NOTE: above code is a beautified version of reality
Then it doesn't crash anymore!
22:09
It's silly to check for nullptr before deleting.
Xeo
Xeo
Unfortunately, not many people know that.
Because this is one condition that will not make it crash and burn.
Even better, just punch them in the kidneys without a warning. I'm pretty sure they deserve it.
Unlike pointer pointing to already deleted heap area.
Which passes the test.
And replacing code means commenting out the previous code and inserting the new code. The old commented-out code remains FOREVER. You can imagine what this code-base looks like after 8 years of developement.
22:09
What.
Now you've got to be kidding.
Sigh, people that don't know how to use VCSes.
@CatPlusPlus You should have seen my face when I checked out the code for the first time.
Xeo
Xeo
@StackedCrooked But... but... you said you use source control!
wtf are you using excel for vcs
@StackedCrooked that's why if(x) delete x; is evil
22:10
@StackedCrooked I've done that before. Ended with a 3000 line file with 100 lines of code
@Xeo That doesn't prevent people from using their own personal VCS..
It's utterly stupid.
Commenting code is out is temporary measure. You delete this crap before committing.
Xeo
Xeo
Seriously, get some fresh wind in there.
22:11
Like hitting people with clubs. We have firearms now!
Only comments allowed is documentation.
If code looks wrong then simply add a comment: // FIXME: is this ok?. This comment will remain FOREVER.
Xeo
Xeo
// temporary hack - 2002
// temporary my ass - 2008
There are hundreds of *FIXME*s in the code.
22:12
You need a new job.
Actually, isn't if (x) delete x; necessary for template code as delete could be overloaded?
Xeo
Xeo
I need a job at all. :s
Xeo
Xeo
@Pubby that's the fault of the overloaded delete
Not your problem
22:12
what happens if you revert a commit? does that mean you'll have the same exact thing as the active code that stays commented forever?
Overloading delete is silly.
Xeo
Xeo
That's another issue
@CatPlusPlus Yeah... What am I thinking getting excited about maybe getting to introduce "-Wall -Werror" ...
@Stacked is that style called "Belgian notation"? :P
@keithlayne I hope not.
22:15
mmmmmmmmm....belgian waffles
@keithlayne Belgians have good beer. I don't care too much about the rest :)
@Xeo We're looking for developers. Feeling enticed? :D
Xeo
Xeo
Sorry, I'm going to correct myself
I need a good job.
mmmmm....beer
@StackedCrooked is that the problem? Everybody's drunk. That's the only sensible explanation. I deduced that like Sherlock.
@Xeo a good job pays the bills and doesn't require changing diapers. Unless those guys are really drunk.
The company makes a lot of profit. We get paid well. Extra holidays. Never expected to do overtime. It takes me a 30 walk to get there. It's a nice walk.
So I'm hesitant to leave.
that sounds great. We had a nice discussion earlier today about having your cake and eating it too. Except we were actually talking about cake. Sort of.
22:20
@keithlayne Who is drunk?
EVERYONE.
Every ... one ?
Xeo
Xeo
@StackedCrooked Sounds nice. But what are you actually developing?
your coworkers
The Matrix. That explains the glitches.
22:21
fucking red pill, should've seen that one coming
@Xeo Most of the profit comes from cable-modem certification which is done by a different team. I work in a small team that works on software that does network traffic generation for testing purposes.
@StackedCrooked do you actually like what you're working on? Is the problem interesting to you? I could get over a lot if I had that. And the other good things about your job.
@keithlayne The problem domain is interesting.
I think that's worth a lot.
Yep. Also the code quality has been improving a little bit under my influence.
I hope to gain more influence of the code base.
22:25
what creates all the inertia for stupid decisions? Bad people in charge? If you're able to influence it a little, do your peers/bosses recognize that?
@keithlayne I have four colleages. Two of them support me. Two of them seem to dislike my wanting for change.
One of my supporters is the director of the team. So that's a plus.
You know who to shoot. That's good.
And there's also a new guy who is pretty much clueless.
He's good for comic relief.
that's okay though, you can mentor him in your image. You will be his code god.
@StackedCrooked I've always heard that the warning doesn't affect the result of the program. Well, then, you can fix it without bothering testing then huh?
22:28
Are the haters old guys?
I recently explained to him that rvalues can only be bound to const reference in C++. I wonder if he got it, especially since the concept of "reference" seemed to be new to him.
@keithlayne Old people die on their own.
Except the persistent ones, who.... unfortunately... .keep living.
@Xaade where are you at in TX?
@keithlayne Houston, TX
I went to school there
Xeo
Xeo
22:33
I wonder if I'd make a good coworker. I know too much stuff about C++ and the standard so I'm worried I might want to overrule all of the missing knowledge my senior coworkers might have.
wunderkind
@Xeo you'd make a good co-worker if you teamed up with people up-to-par with your coding standards.
I'm sure the old guys would defer to your greater knowledge. ;-)
Or people willing to improve themselves.
@Xeo People never step down from leadership in recognition of a more apt rival. No, they cling to the bitter end until the cold death aura of their presence drives away all talent from their workplace.
22:35
well said
Xeo
Xeo
@RMartinhoFernandes: Did you see this comment by @Johannes? Makes me feel kinda stupid. :(
see: US Army
@Xeo Hmm... Er... Well...
BGL documentation is meh.
what's the standard say on dereferencing null?
Undefined behavior I think.
UB?
:2085279 They must have realized that someone moved their cheese.
Yes, UB.
Utter Bollocks.
22:39
Udder bullicks
Is it undefined behavior to throw an exception during stack unwinding that was caused by another exception?
I think it's defined behavior and that terminate will be called.
Best not be done.
Yay, I can debug this crap now. GLFW sucks.
what's the name of that ski guy? just saw a user named blueski
cliffski or something
22:42
at least I don't have singleton on my card
Ow.
Didn't notice that.
Xeo
Xeo
Y'know, reflecting on my comment about designing my own language, I'm now thinking on how I'd name my exception facility.
Pokemon. Gotta catch them all.
Xeo
Xeo
dare{
  spawn std::dragon();
}encounter(std::mob& m){
  // ...
}
Designing a language like a dungeon crawler. Hmm....
ever play crawl?
22:45
you would have to implement puzzles in the control flow
like a goto would go to itself unless called in the right order
@Xeo You should team up with @DeadMG. He's on par with you.
Differences in opinion might lead to heated arguments however.
lol
#define dare try #define spawn throw #define counter catch
#fail
BGL docs are really meh.
is it possible to have multiple #defines on a single line?
Oh, of course, I spend half an hour figuring out those damn property maps and there's a small note there's better thing.
Xeo
Xeo
22:49
@Pubby no
No, it's not.
\n doesn't work?
Preprocessor uses newline as statement separator.
\n is a feature of literals.
but \ joins lines?
Typing \n in raw source code won't do anything, except for triggering syntax error.
Inside defines it's a line continuation.
Dunno if it works outside, but I can't think of a use outside either.
Xeo
Xeo
22:52
Outside it's still a line continuation
if(!has_code_red())
  // phew, everything safe \\
  return;
fire_missiles();
guess the result
Oh, right, I recall silly trigraph problems in single-line comments.
if(!has_code_red())
  // what idiot tried to fire this ?????/
  return;
fire_missiles();
Line continuations are stupid.
Xeo
Xeo
@RMartinhoFernandes nice one
We need a better preprocessor.
Xeo
Xeo
22:54
Yeah, one that integrates with TMP
so we can conditionally compile stuff in
Time for another project!... ah screw it.
Xeo
Xeo
based on expressions and types
Maybe you guys can explain the difference between a software stack based machine and a software register based machine?
One is based on stack, the other on registers.
Sure, but what does that really mean?
stack as in what? registers as in what? it's still all in software
22:56
Well, do you know what stack and registers are?
not hardware here
It doesn't matter, the concept is the same whether it's software or hardware implementation.
Stack as a data structure? Or Stack as in something in physical RAM?
Stack in RAM is still a data structure.
Xeo
Xeo
@ManofOneWay How do you think hardware emulators work?
22:56
On the former, operations take operands from the stack and put the results there too. On the latter, they grab operands from registers and put the results on registers.
@Xeo They simulate interactions between subatomic particles, obviously.
Xeo
Xeo
There was this awesome YT Video posted here yesterday by @Idontknowwhoitwas, which showed a C++ based NES emulator.
E-MU-LATE!
Is it bad that I can read this?
Xeo
Xeo
@RMartinhoFernandes Damn, too slow!
@RMartinhoFernandes But doesn't the stack based machine also have to generate assembly code in order to operate? I'm thinking compiler here
Assembly is orthogonal to the issue here.
Assembly code as in saying which registers to use
Xeo
Xeo
2
Q: whats the easiest way to make a c++ program crash?

jonathan topfOdd question here... I'm trying to make a python program that interfaces with a different crashy process (thats out of my hands). Unfortunately the program im interfacing with doesnt even crash reliably! so i want to make a quick c++ program that crashes on purpose but i dont actually know the be...

Wtf.
If you only have stack and no registers, then assembly would not mention registers anywhere.
push 42 # 42
push 69 # 42 69
add # x = pop, y = pop, push (x + y)
You could use Forth as an assembly language for stack-based machine.
23:01
So if you are using the stack based machine, you cannot re-use your variables x,y without having to have them again somewhere on the stack?
Well, you'd probably have duplicate opcode or something.
x = pop, push x, push x
.NET IL has a dup instruction just for that: it pushes a copy of the top.
23:02
I'm still confused where in memory everything is done, does pop mean you put x in a register?
a register that is not callable by name
It doesn't matter.
To me it does =(
It's something internal to the implementation, and you can't use or see it.
But if I'm writing the compiler, it must matter?
The stack-based machine exposes enough basic opcodes for everything to be implementable.
Xeo
Xeo
23:06
I got that itch in my fingers of wanting to write a compiler, language, and hardware emulator.
Xeo
Xeo
I know I'd waste hours days months on it, so I can still restrain myself.
And Universe.
Creating Universe is usually a bad move.
Xeo
Xeo
big_bang();
void big_bang(){
  // FIXME: implement
}
23:08
I don't think I will be able to truly understand this now
I need to talk to the teacher
using dependency_graph = boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, dependency_node>;
// ../src/core/main.cpp:5:7: error: expected nested-name-specifier before 'dependency_graph'
Damn bug has been escaping me all day.
But as a token of appreciation you will get this wonderful picture from me,
http://www.asciipr0n.com/pr0n/pinups/pinup48.txt
Derp, I can't see the error.
23:09
Enjoy
Xeo
Xeo
@CatPlusPlus No using alias support? :P
Riiiiiight. It's in GCC 4.7, isn't it.
@ManofOneWay Doesn't onebox.
Damn, chat fail.
Xeo
Xeo
@CatPlusPlus Sounds like that at least. it expects something like using foo::dependency_graph;
@RMartinhoFernandes Fixed font?
I'm stupeed.
Xeo
Xeo
23:11
                           ___________
                          / `. `. `. `\_
                         / )  )  )  )  )\
                        /.'QQQQQQQQQQQ' .\
                       /(QQQQQQQQQQQQQQ(  \
                      /.QQQQQ. `. `QQQQQ`. \
                     | QQQ )  )  )  )QQQQ ) \
                     |QQQ.' .' .' .' .'QQQ .'\
                     |QQ(  (  (  ( A( /\QQQ  (\
                     |`. `. `. `._/ \/  \.QQ. `\
                     |  )  )  )_/        \)QQ)  |
                     |.'\_____/           |.' .'|
works
Yeah that's hot
@CatPlusPlus We know.
@CatPlusPlus You go and implement me a stack based machine
23:12
I'm busy.
Xeo
Xeo
This song is awesome
Btw, what's happend to the OpenGL?
There it goes, damn bug was killed with fire. Now I can commit this.
I need a good build system for that first.
I somehow convinced Java to do what I want after four hours of coding. Finally!
23:13
@FredOverflow Congratulations!
Is it the stack based machine of Java that's messing with you?
lol
@ManofOneWay Btw, why don't you try looking at some .NET or Java bytecode?
Maybe it will clear things up.
@RMartinhoFernandes Actually I've been working some in CPython in school
Dunno about Java, but for .NET you can run ildasm on a .exe or .dll and it spits out all the precious IL.
I get the byte code thing, but it's the very last step when turning code into assembly or machine code or whatever that bugs me
I'm thinking some way that must be the same for both stack and register based
23:16
@ManofOneWay No, it's mostly stupid APIs.
Bad checked exceptions?
And then there are also stack frames (as in regular calls), which adds to the chaos
Xeo
Xeo
So, my router just failed on me again
@RMartinhoFernandes What do you mean, "bad" checked exceptions? Checked exceptions are a terrible idea that get in the way of Genericity and decoupling, so all of them are bad :)
There could be data stack and code stack.
23:17
@ManofOneWay Oh, you're talking about compiling bytecode, not compiling to bytecode?
Yes
Compiling to byte code should be going from the AST to byte code
I'll try to look it up tomorrow
@FredOverflow It's a figure of speech. A pleonasm.
Jeez, silly meatbags.
Machine code, bytecode, no difference.
Damnit, I wanted to get to sleep three hours ago.
Curse you, Java! And goodnight.
23:20
Native compilers usually output assembly, and then finish. It's native assembler that does the rest.
Which is also a compiler. It's fun, isn't it.
@CatPlusPlus But translation from native assembly to machine code is trivial.
Well, it's certainly easier than the former step.
Oh, BGL docs actually have ToC.
Also hidden in a small note somewhere in a wall of text.
Xeo
Xeo
I wonder if you'd get anything out of compiling native code to IL and then compiling to machine code on the installation site.
What do you think about that one?
23:24
@Xeo Knowledge of the supported extensions, for one.
So you can use SSSE8 or whatever new fancy thing is.
@FredOverflow Good night
Without runtime implementation swapping.
Xeo
Xeo
Hmm, should actually be doable with LLVM and libclang.
Now the only thing that needs to be done per-platform is the installer
sounds a bit like Java and .NET >_>"
Well, .NET does that.
Xeo
Xeo
just that this is "code once, install everywhere" not "code once, run everywhere"
23:27
Java only uses hot JIT.
Which is arguably better, because it has even more contextual knowledge.
that's hot jit
Dat JIT.
Xeo
Xeo
@CatPlusPlus Well, that makes the code kinda interpreted, which was not what I was going for. Only crossplatform installable without having to crosscompile yourself.
CPU is an interpreter.
universal binaries work like that or no?
23:29
@Xeo So, it's an installer that packs the source and compiler?
Xeo
Xeo
@RMartinhoFernandes Not directly the source
not the crosscompile at installation, I mean
Xeo
Xeo
IL compiled source
I only ever heard "universal binary" used in context of OSX PPC/x86 binaries.
Xeo
Xeo
@CatPlusPlus Fair point
23:30
You're going to compile anyway.
@Xeo What's the reason not to?
Xeo
Xeo
Though "double interpretion" sounds as bad as "double dereference" :P
@RMartinhoFernandes Smaller package, not releasing source code, dunno exactly. Something along those lines.
IL is high-level enough that getting source code back is trivial.
Time to rest
Cu guys
Good night
Xeo
Xeo
I know IL can be reverse-engineered pretty easily, but oh well
It's the same with most high-level bytecodes.
Xeo
Xeo
23:31
I'll find a reason to just include IL not the source. :P
The argument for smaller package is good though.
Xeo
Xeo
@CatPlusPlus Well, even using platform independent bytecode instead of IL would work, and just compiling that down to machine code on the install site
does LLVM actually have a bytecode?
IL is platform independent bytecode.
Xeo
Xeo
hm
What Cat said.
23:33
Yes, LLVM Intermediate Representation.
Xeo
Xeo
Hm, so no good for obscuring the original source a bit
It looks a bit like normal C syntax IIRC, right?
LLVM IR is more like assembler
you won't be able to reconstruct meaningful source from it, I think
Well, yes, IR is assembly. IR bitcode is output.
especially as you can put it through the optimizers first
It's bit lower level than IL.
23:36
I think the point was to optimize on-site.
And it's SSA.
0
Q: How to specify degenerate dimension of boost multi_array at runtime?

mezhakaI have a 3D multi_array and I would like to make 2D slices using dimensions specified at runtime. I know the index of degenerate dimension and an index of slice, that I want to extract in that degenerate dimension. Currently the ugly workaround looks like that: if (0 == degenerate_dimension) { ...

and reverse-engineering the optimized output is going to be non-trivial fo sho
But you can strip variable names and it'll work.
Yay, a multidimensional array question that doesn't annoy me.
23:36
@RMartinhoFernandes Because it uses MultiArray!
Xeo
Xeo
@DeadMG The intent was to compile and optimize at the installation site
@CatPlusPlus Exactly.
Xeo
Xeo
So you'd have the non-optimized code in the install package
you only need to instantiate the platform-specific libraries at the installation site
you can run it through plenty of generic optimizations before it gets there
Xeo
Xeo
True enough
23:37
like register lowering, inlining, and all that stuff
Well, you'll want to do some optimisations at compile-time anyway.
Xeo
Xeo
Hmm, makes me want to play around with that
I mean, LLVM IR is completely target-independent
You might want to delay e.g. power reduction to know whether it's profitable on target.
you can produce it, optimize it like a bitch, then link in the platform-specific libraries, do a little LTO, and then be done
23:38
But stuff like constant folding is generic.
Xeo
Xeo
But for today, I'll settle with having had this discussion and go to sleep. Gotta get up in 6 hours, urgh. G'night guys.
Xeo
Xeo
Oh yeah, how can I convert something into a conversation so it's linkable? I want to bookmark this
I'm going away now too. To the movies :P See you later.
@Xeo "room" > "create new bookmark".
Pick start and end, input name, et voilá!
Xeo
Xeo
Thanks!
With that, I'm out. See ya
23:43
Woo, large amounts of errors.
btw, I have a question
is there anyone still here? :P
Xeo
Xeo
By chance, I forgot to actually bookmark the conversation. :P
ah well
never mind
I'll ask on the main site
Xeo
Xeo
lol
Wait 10 minutes, I already reached my repcap for today
I'm always here.
23:50
0
Q: Difference between shifting and look-ahead

DeadMGGiven a simple grammar, like rule1 := token1 token2 token3 token4 || token1 token2 token3 token3; What's the difference between shifting the first three tokens, then looking at the fourth to see which rule to reduce, and simply performing a lookahead of four tokens to see which rule to...

Xeo
Xeo
Ugh, okay, I don't know about that.
Good luck. :P

« first day (422 days earlier)      last day (4752 days later) »