« first day (465 days earlier)      last day (4490 days later) » 

Als
5:00 PM
Shitt I am getting an Stack Overflow requires external JavaScript from another domain, which is blocked or failed to load.
 
user784668
Shit, SO requires external JS?
 
Als
Fuck it wont go.
 
user784668
Oh yeah!
 
user784668
 >> clang -v
clang version 3.1 (trunk 148808)
Target: i686-pc-mingw32
Thread model: posix
 
user784668
5:05 PM
POSIX?
 
Probably means it uses pthreads.
 
user784668
I told it not to use pthreads.
 
why can't I use T[] a = {}; =\
 
Zero-sized arrays are not allowed.
 
user784668
@Abyx What's that supposed to mean?
 
5:07 PM
@Fanael Zero-sized array
 
std::array<T, 0> x; is valid.
 
user784668
Oh fuck.
 
I use msvs2008 now, there is no std::array
 
user784668
I got the header directories wrong.
 
also I have a function which accepts reference to T[], not array<>
 
5:09 PM
@Abyx a T[] argument is the same as T*
 
Als
huh array<>
 
@SethCarnegie > reference to T[] - T(&)[]
 
Unless there's a size, that's a reference to a pointer.
No wait, I have no idea wht that is.
I'm not even sure it's allowed.
 
@Abyx I have void f(int (&arr)[])
says
 
Anyone have any ideas how to emulate std::async(std::launch::sync, ...), with boost and boost::unique_future?
 
5:12 PM
error: reference to a zero-sized array is illegal
 
user784668
@SethCarnegie Remember that the compiler is never right.
 
Whoa, never?
 
user784668
@SethCarnegie Absolutely never.
 
@Fanael @Abyx If the type of a parameter includes a type of the form “pointer to array of unknown bound of T” or “reference to array of unknown bound of T,” the program is ill-formed.
The compiler was right :D
 
user784668
@SethCarnegie
 
user784668
5:14 PM
Irony (from the Ancient Greek ', meaning dissimulation or feigned ignorance) is a rhetorical device, literary technique, or situation in which there is a sharp incongruity or discordance that goes beyond the simple and evident intention of words or actions. There is presently no accepted method for textually indicating irony, though an irony (punctuation) mark has been proposed. Ironic statements (verbal irony) typically imply a meaning in opposition to their literal meaning. A situation is often said to be ironic (situational irony) if the actions taken have an effect exactly opposi...
 
Als
Fuck my stomach hurts! I ate too much. :(
 
@SethCarnegie try T(&)[N]
 
@Abyx In that case, N can't be zero.
 
@Fanael irony is serious business
 
I know it already
 
5:16 PM
@Abyx thought you had a function that did that
 
user142019
Hi! I have a little question.
 
user142019
Why won't this compile? ideone.com/t6rds Seems like there are syntax errors but for as far as I know this is valid C++.
 
What is variable real? I don't remember it was part of the standard microsoft libraries...
 
fuck it! array<> can't deduce array size, like T x[] = {...}; does
 
user784668
@Abyx Both suck, but in different ways.
 
5:21 PM
@WTP GCC 4.5 doesn't support initializer lists.
 
user142019
Then why does it give an error on the for loop?
 
Also, you probably want to pass the container by reference.
@WTP It doesn't support range-based for loops either.
 
user142019
GCC sucks… :p
 
user142019
Thanks. Will try in clang…
 
The current release is 4.6, which supports both those things.
Ideone is still outdated.
 
user142019
5:23 PM
"non-aggregate type std::vector<double> cannot be initialized with an initializer list" ahh crap clang doesn't support them either. Thanks anyway!
 
user784668
And there's 4.7, which supports even more but may be broken more than GCC usually is.
 
well.. then I'll use pointer to array and pass NULL for empty array...
 
user784668
@Abyx +1 for KISS!
 
user142019
There was also a problem with the use of auto.
 
user784668
@Abyx But I'd pass something like ArrayRef. Or two iterators.
 
user784668
 
I can't use LLVM ADT, and don't want to invent them myself
 
user784668
@Abyx It's a very simple type, really.
 
anyway my goal is to make as less as possible code at caller's side
so, T x[] = {1, 2}; foo(x); was perfect solution
maybe I can use boost.assign, but it will increase compilation time
 
is there any type real in boost?
so I can assing it to x as real x;
 
user784668
@DzekTrek No types are real in boost.
 
user142019
5:29 PM
What do you mean by "real"?
 
greater than 0
 
user142019
That's called positive.
 
int? unsigned? (These are not in boost, though...)
 
it's confusing, I know
 
user142019
5:30 PM
A real number is a value that represents a quantity along a continuum. Do you mean that?
 
user784668
double?
 
but I wanted to check if there is any type named real in boost lib.
 
user784668
void?
 
user784668
Yeah, void will do the job.
 
user142019
void is an incomplete type
 
5:30 PM
Why do you care about the name?
 
typedef unsigned int real;
 
it's more like double with a premises of true or false.
 
Real programmers use unreal types.
 
maybe "rational" ?
 
@Fanael If there's a type that is not real, that type is void.
 
user142019
5:31 PM
Or "complex"?
 
user784668
@RMartinhoFernandes sssshhhh, he doesn't need to know that.
 
So, you want enum { true, false, file_not_found }.
 
@ronag, that is a tricky solution, however not so practical.
nah, void is more like I don't need to return you anything
 
You don't say.
 
@CatPlusPlus , I am not sure why should I use enum, also I wanted to make some sort of struct
 
user142019
5:32 PM
Void is a suit in which a player is dealt no cards.
 
user142019
In bridge.
 
in which I can have value, and the comparison of that value by true of false.
 
Really, what do you want this type to be?
 
I'm sorry, I can't do this. It's not healthy.
 
user142019
@RMartinhoFernandes not unreal.
 
user784668
5:33 PM
@DzekTrek If you want to make some sort of struc, you should use FASM.
 
I was thinking so
 
hovewer my teacher said it would be too harsh for this, and said to find better solution
Yep, we are doing some sort of robot
on our robotics class
 
Well, we can't help you if we don't know what you want.
4
 
5:34 PM
so
 
user784668
We don't need another robot. We already have one.
 
robot has one parameter, linear in which he computes basic distance using infrared double turn around values and sums the vectors
 
user142019
@DzekTrek what about… double or float?
 
user784668
5 mins ago, by Fanael
double?
 
user142019
that
 
5:36 PM
all around his location, ( angular + linear + vector assumption of the space + shelter( pass - used for survey of the surround ) )
 
user142019
Hello Mooing Duck.
 
Yeah, nah, I need real, for complexity ...
 
user142019
typedef double real
 
user784668
@WTP That's a misleading name for double.
 
Then I will have two additional functions for itterating in a real time this instance real and extracting what values are good to me
which is a bit complicated for robots memory
 
5:38 PM
@DzekTrek I think you're mistaken, real numbers do not have a premises of true or false. float/double are for reals.
 
use pascal, there is real type
 
Whatever, you haven't explained what this "real" type is yet.
 
:(
I will try it another way.
 
user142019
struct real { bool sign; uint64_t mantissa; uint64_t exponent; <overload all the f*cking operators here> };
 
You said you need it to compare with true or false, or something, and for complexity, whatever that means, but that doesn't make it any more clear. If anything, it makes it even less clear.
 
5:40 PM
@WTP don't recommend that, how is that different than double, other than it's buggy?
 
user142019
@MooingDuck the point is that it's not a double. The only difference is that it's uselessly big, slow and supports gigantic numbers.
 
@WTP at least do class real { double data; public: <operators> };
 
user784668
typedef long double real. It's not double, problem solved.
 
Lets say my robot wanders and collects one parameter ( named real ) which only collects some values greater than values passed to him by reference, so for all values greater than that he takes and computes some functions.
 
user142019
You want both a parameter and type called real?
 
5:42 PM
Yeap!
 
user142019
That's like saying int int = 0; which is as invalid as can be.
 
But for memory saving I need to put them in the same disk space on my ssd.
 
user142019
Hello ariscris.
 
real parameter - values passed to him by reference
 
user784668
What the fuck are you talking about?
 
5:43 PM
Finally, one requirement I can understand: this type has to be small.
 
user142019
typedef bool real
 
real type - computes all real parameters and extracts the choosen ones.
 
char is the smallest type around.
 
user142019
Isn't the required minimum size of bool 1 bit? Wait I'll look it up…
 
@DzekTrek don't call the type real, that's highly misleading. You seem to want a filter, not a type
@WTP no, bool can be any size greater or equal to one byte
 
5:44 PM
@WTP You can't have types smaller than one byte.
 
user784668
@RMartinhoFernandes void is smaller! Too bad we can't store voids around.
 
@WTP, based on the values I provide them it ranges from 4 bits to 64 bits
 
In Hell++, sizeof(bool) is 237.
 
@RMartinhoFernandes is that a prime?
 
And that's not even mentioning the value of CHAR_BIT.
 
user784668
5:45 PM
@RMartinhoFernandes That's the size of bool in your implementation?
 
@MooingDuck No, it's clearly divisible by 3.
 
@DzekTrek I think you have no idea what you're doing, but haven't realized it yet
 
Xeo
@Fanael Yes, Debian Squeeze 6.0.3
 
@R.Martinho, no it's not divisible by 3.
 
@DzekTrek Try it.
 
5:46 PM
@DzekTrek yes it is, 237 /3 = 79
 
2+3+7 = 12, 1+2 = 3. It's dvisible by 3.
 
@RMartinhoFernandes googling is easier
 
@MooingDuck, actually yes! I made a template function which takes two parameters one pointing to the values that robot calculates another to the collected values, so yes this way is more simplier for me.
 
user784668
Oh my.
 
@MooingDuck Than adding numbers less then 9?!
 
user142019
5:48 PM
@RMartinhoFernandes I'm talking about what the standard requires. But you are right.
 
@MooingDuck I'm supposed to be fast at googling, but I think I can sum single digit numbers faster.
 
@KianMayne easier than remembering the rules for what's divisible by 3.
 
@MooingDuck Meh
 
@DzekTrek can you show us the prototype for this template function? And explain each of the parameters?
 
@MooingDuck How can you identify primes quickly if you can't weed out multiples of 3 and 7 quickly?
 
5:49 PM
@RMartinhoFernandes google
 
That's not as fast.
 
it's very simple
 
@RMartinhoFernandes For arbitrary cases it is.
 
user784668
@RMartinhoFernandes Wolfram|Alpha.
 
5:50 PM
I keep wishing I could edit other people's things in here too
and +1 them. It doesn't need to do anything, but I want to show approval of good answers that make bad quotes.
 
template < typename T> struct calculateBiggerNumber { T operator() ( const T& robotCalculations, const T& surroundingCalculations){ return robotCalculations > surroundingCalculations ? surroundingCalculations : robotCalculations;}};
 
user784668
Oh fuck.
 
user784668
No, really.
 
@DzekTrek and why is double unacceptable?
 
user784668
What happened to std::min?
 
5:52 PM
it will leak in my memory, checked with IDA
 
@Fanael I use that to confirm the ones I can't weed out mentally.
 
@DzekTrek say what? What leaks?
 
there is whole section that leaks here if I apply d or f
 
@DzekTrek so fix the leaks
 
input structures
nah I can't
 
5:53 PM
double doesn't leak.
 
for robot it takes too much time to process in real time f or d
 
@DzekTrek then give up while you're behind
 
user142019
@DzekTrek buy decent processor. If floats or doubles are too slow, your real type will be even slower.
 
If it leaks with double and you replace double with foo, it will still leak.
 
I can't we are finishing it right now
 
5:54 PM
@DzekTrek "finishing" :D Except it's nowhere close to working
@DzekTrek what's the range of the input data? Is fixed-point arithmetic an option?
 
It moves, however for the precision we need to have it to work as a smooth
 
user784668
@WTP not necessarily, if "your real type" is fixed-point.
 
@DzekTrek what data type are you currently using?
 
Our robot works just fine, however this robot is a project for one foreign company and is used in the medicine surgery so we can't make any mistakes
this stage is testing and fixing everything what is possible.
 
@DzekTrek what's the range of the data? What data type are you currently using? We don't care what it's used for.
 
5:56 PM
fixed point arithmetic
 
medecine surgery... now I'm getting scared
"fixing everything what is possible"? even scarier
 
@DzekTrek so this isn't about your function at all, but you need to make the fixed point type more accurate?
 
user784668
@ronag That is, fixing nothing.
 
:) The software alone has 536 000 lines of code( more than half of that are comments )
 
what company are you doing this for, I'd just liek to know for future reference
 
5:58 PM
@MooingDuck , yes, you can say it that way.
 
user784668
W-w-wha-passes out.
 
sorry it's classified
we can't tell anybody about this project
 
I can imagine why
 
user142019
You just did, so you can.
 
This is really small and the code I provided is nothing in compare to what is done here.
 
5:59 PM
@DzekTrek so how are we supposed to have helped you with that given your original question? :D So you have to narrow the range of the fixed-point structure to get more precision, or fix the implementation. If you can't do either, you're done.
 
Plus, I must not tell the names of our clients.
It's something we call it ethics.
 
@Fanael I see nothing inherently wrong with verbose comments. Better than not enough
 
ethics is to do not write bad code
 
:) (sorry for english ) but our code is full of design patterns which significatly reduces code lines
 
@Mooing Duck: Better with readable understandable code than mountains of comments.
 
6:01 PM
I'm scared
 
user784668
@ronag +1000
 
Why_?
 
I have a question: what's any of this got to do with true and false?
 
void
 
user784668
I don't know what to say.
 
6:04 PM
@RMartinhoFernandes nothing at all tha tI can tell
 
user784668
@RMartinhoFernandes real
 
@ronag they aren't exclusive. If it's readable understandable code with mountains of comments, I'm cool with that
 
@Mooing Duck: mountains of comments == not readable code
 
user784668
@MooingDuck Then the comments are at best redundant, and better to be get rid of.
 
It's all reasonably commented, there is no redundant code at all.
 
6:05 PM
restarting computer
 
comments like "get_number(); // gets the number" make the code less readable
In my opinion
 
Yes, we don't use that type of comments.
/*
*/ only
 
oh ok, get_number(); /* gets the number */ is a lot better
 
user784668
Yeah, you use something like ++i; /* preincrement i. It's gazillion times faster than i++, i.e. postincrementation */
 
for instance /* @file Robotics.Starter.InjectionRDFL
.......
..... @name ....
*/ and so on and so on
 
6:07 PM
@Fanael I know from reliable sources that it is only two oranges faster, not a gazillion times.
 
user784668
@RMartinhoFernandes gazillion times is exactly one and a 0,(9) of an orange.
 
> The most common exception is trying to access a bad pointer, which is called a Null Pointer Exception
And then people don't agree with me that null is stupid.
0
A: C++ try / catch (new to programming and not much info about this clause)

Josh FalterTry-catch blocks are used to trap errors in the code. At the most basic level, errors occur because the program tries to execute an invalid instruction. That instruction (read: line of code) could be invalid for a number of reasons. In your specific instance, the instruction could be invalid i...

 
user784668
What's that null thing?
 
user784668
Is it similar to Nothing in any way?
 
void?
 
6:11 PM
@Fanael It's the same, but from C# or Java.
 
@RMartinhoFernandes: see code.google.com/p/safe-ptr
 
user784668
@RMartinhoFernandes So, all "references" are in fact Maybe a?
 
The poster seems to have fallen from Java into a C++ question and assumed his Java knowledge held.
@Fanael Yes, totally silly.
 
@RMartinhoFernandes I explain that null gratuitously increases cyclomatic complexity, but people still don't agree with me.
 
user784668
@RMartinhoFernandes Or, actually something like STRef s (Maybe a), because they're mutable?
 
6:13 PM
@LucDanton Yeah, using "complicated" words won't win you the minds of simpletons.
 
@RMartinhoFernandes Why is preincrement two oranges faster?
 
@KianMayne It's two oranges faster.
 
user142019
Hello Yusan.
 
What do you think that means?
 
Something made up
 
user784668
6:16 PM
I'm not the person with the smallest rep amount, yeah!
 
user784668
@KianMayne It really is two oranges faster. Measure it if you don't believe.
2
 
What @Fanael said.
 
Ell
hey guys
 
@LucDanton I can't immediately think of any reason we need a NULL pointer in C++. Are you saying it shouldn't exist?
 
@MooingDuck I'm saying nullable references aren't desirable.
 
6:22 PM
@LucDanton oh, makes sense. boost::optional in C++ terms. Yeah, the more I try to prematurely optimize, the more I realize the allocator isn't as slow as I'd been led to believe.
 
My bench marks say an average over 1,000,000 tests
Post increment: 30.464 ticks
Pre Increment: 30.6766
 
On an unrelated note, it's crazy how fast (creating a vector from iterators and sorting) is compared to (creating a set from iterators).
 
@KianMayne So, you missed the point of "two oranges faster".
 
@KianMayne was that an optimized build? Were both tests hot or was one cold?
 
Sigh.
I'll explain.
 
6:25 PM
@RMartinhoFernandes at least he benchmarked. That's better than most
 
I'm gullible :(
 
@KianMayne (hint: your data is misleading)
 
"Orange" is not an unit of measure of speed. The point is that you need real measurements.
 
@KianMayne also depends (highly) on the types involved, but I'd assume you tested int.
 
user784668
And what most people forget, you need real measurements in real code. Not some synthetic benchmark.
 
Ell
6:27 PM
what I want to know is why it's called the "postfix" operator instead of "suffix". Like prefix and suffix
 
Because sillyness.
 
Ell
All I know is its not as fast as Beethoven's Moonlight Sonata 3rd Movement
 
Programmers like to fuck up terminology.
2
 
@Ell suffix only applies to words. prefix is generic, and postfix is the corresponding opposite.
 
@RMartinhoFernandes because they suck at math, which uses the proper terms?
 
6:29 PM
@rubenvb math uses suffix? I guess my google-fu is weak
 
Ell
@MooingDuck fair enough :L
 
@MooingDuck "suffix only applies to words" [citation needed]
 
@MooingDuck I was speaking more generally. Like number theory and sets and all that.
 
In 10u, u is a suffix.
 
Ell
anyway I
I'm off for a piano lesson
 
6:30 PM
@RMartinhoFernandes I misread a quote from wikipedia. I was wrong. Suffix is the proper term
 
@RMartinhoFernandes so 10u is a word? I can't find it in my dictionary
 
@Ell press the up arrow when you've got the cursor in the text box
 
user784668
@rubenvb You're searching in wrong dictionary.
 
user784668
Try C++ dictionary, if you have one.
 
lol
 
6:32 PM
@DzekTrek are you using a custom or existing fixed point library. If existing, which one?
 
user784668
@MooingDuck "library"? That's an exaggeration.
 
@Fanael ish. Is there a better word for that?
 
user784668
Gotta go, see ya.
 
This is horrible!
The whole show is ruined now.
 
6:43 PM
custom, @MooingDuck.
 
hmm, So far for fixed point libraries I've found the "denominator" is: preprogrammed(2), a power of 2(1), variable(1), arbitrary constant(0). When I made one it was an arbitrary constant. It's not like it's hard, or slower with modern compilers.
 
morning
 
@DeadMG It's quarter to 7 in the evening :L
 
your day did not truly begin until I arrived
3
thus from your perspective, it is yet the morning
 
Haha brilliant
 
user142019
6:48 PM
@Kian Mayne no, it's a quarter to 8 in the evening.
 
he is in the same timezone as me
 
user142019
I'm not.
 
I gathered that
 
user142019
+1
 
@KianMayne that makes you, what? GMT+8? I gotta find me a map
 
6:50 PM
@MooingDuck No, GMT +0
 
Blah blah.
 
bah, I guessed that first, then second guessed myself
heh, from my math, you can deduce my timezone to one of two
and one of them has very few English-speaking programmers, and the other a lot
 
@RMartinhoFernandes ?
 
@MooingDuck We could also look at your profile.
 
@MooingDuck Merely believing that 18:45 is GMT+8 probably labels you as a Merkin
 
6:52 PM
@RMartinhoFernandes yeah.
@DeadMG you're a bad man
 

« first day (465 days earlier)      last day (4490 days later) »