« first day (309 days earlier)      last day (3725 days later) » 
00:00 - 20:0020:00 - 00:00

8:02 PM
Ah I wasn't clear, I was talking about GLSL
But similar principles still hold
 
Same concept ... IEEE 754
Santa put me to repmax ... and nice badges ... Happy XMas all.
 
damn you like maxing out your rep
 
@skiwi If you don't have isnan already defined, one fairly common way of defining it is like bool isnan(float n) { return ! n == n; }
 
0
Q: Best practice on CFML logic embedded in cfquery

James MohlerI am trying to remove <cfif> from inside of a <cfquery> ? For example: <cfquery name="qryUser"> SELECT firstname, lastname FROM dbo.Users <cfif isnumeric(userid)> WHERE userid = <cfqueryparam value = "#UserID#" cfsqltype = "cf_sql_integer"> </cfif> </cfquery> Vs. <c...

 
It's there, but thanks for the suggestion
Google autosuggest FTW
 
8:06 PM
@skiwi Wasn't so much of a suggestion as an observation about the nature of NaN's--a NaN doesn't even compare equal to itself.
 
seems like NaN's behave like they're not numbers
 
@skiwi - are you trying to be sarcastic or something?
 
@skiwi who'd a thunk it?
A lot of things that aren't numbers can still at least be compared for equality, and consistently at least compare equal to themselves.
 
I don't get though how a non-NaN divided by a non-NaN can give NaN? or is that exactly when you divide by zero?
 
Divide by zero is one case.
you can get it through shifting, serialization, etc.
 
Anonymous
8:17 PM
@skiwi I think somehow you can recreate batman's NaNaNaNaNaNa in javascript
 
@PatoSáinz - you ignore the more obvious Monkey nananananana
 
58
A: In Java what does NaN mean

KennyDeriemaekerTaken from this page: "NaN" stands for "not a number". "Nan" is produced if a floating point operation has some input parameters that cause the operation to produce some undefined result. For example, 0.0 divided by 0.0 is arithmetically undefined. Taking the square root of a nega...

 
Anonymous
@JerryCoffin that's what i was looking for
 
ah ok
so if I am dividing by zero, then I messed something up...
 
Anonymous
8:24 PM
@skiwi most probably
 
@PatoSáinz One of my favorites (though I think it's only fair to point out that at least some of those problems have been fixed since then).
 
Anonymous
@JerryCoffin i don't like javascript that much
 
Anonymous
there should be other languages to manipulate a fucking dom inside a browser ffs
 
@PatoSáinz I think Sun had the germ of a good idea with the HotJava browser. The browser should really just have a byte code interpreter (and I'm fine with it including a JIT compiler). It should then be up to the programmer to choose whatever source language he wanted, and it would compile to that byte code.
 
Anonymous
@JerryCoffin You can't expect to have a standarised bytecode VM in every browser, it's not even like android with dalvik... Also, ew Java
 
8:32 PM
@PatoSáinz I think you could expect it. While I'm not a big fan of Java, the JVM is actually a perfectly reasonable design.
 
Good evening everybody!
I am making some coffee. Is anybody interested?
 
Anonymous
@JerryCoffin that would need too many companies to agree with it
 
@Morwenn Sorry, I don't do coffee. I only consume caffeine pre-mixed with precisely the correct amount of sugar and FC&C yellow #3 food coloring.
 
Anonymous
@JerryCoffin mtn dew diabetes in a can?
 
Anonymous
fucking markdown
 
8:37 PM
@PatoSáinz Given the number who've agreed on JS, getting them to agree on something halfway decent should be a piece of cake.
@PatoSáinz An ace.
@PatoSáinz aka Letdown.
 
Anonymous
@JerryCoffin yea but JS is something legacy from a time when competition wasn't that big
 
Anonymous
even, js might have been a copied feature imo
 
@JerryCoffin I did not quite grasp what you wish to drink.
 
@PatoSáinz I seem to remember competition being pretty serious at the time.
 
Anonymous
@JerryCoffin there was competition, but less competitors
 
8:39 PM
@Morwenn He had it right. The only caffeine I consume is Mt. Dew. The "letdown" was a reference to Markdown, when it...lets you down.
 
@JerryCoffin Well, it's the first time in my life I heard about Mountain Dew. No wonder I didn't get the joke^^"
 
Anonymous
69
Q: Project Manager asks for complete 100% confidence everytime committing code

MiroI've got an ongoing relationship with a long term business partner as a consultant where his role is project manager (task manager + direction), and my role is a contracted developer. He has a tendency to micromanage my time with his tasks and oversight, but also has a strong sense of perfection...

 
Anonymous
Mountain Dew is piss yellow
 
@Morwenn I guess that would kind of ruin the joke.
@PatoSáinz My dad use to joke that: "a vet would say that horse had bad kidneys."
 
8:54 PM
0
Q: Solving a Recursive method with Mazes

Roy KesserwaniGiven any map such as the one below, 1 for path and 0 for walls, can you guys review my code and see what I am doing wrong. My code is supposed to return an arrayList of the positions that it passed by on the map. But my code is not returning any positions and I'm confused on how I can record the...

 
9:32 PM
Fresh zombie!
0
A: C-style language lexer for a syntax highlighter

JamalJust a few things that stand out to me: You're using single-character variables in various places. Except for loop counters (such as i), variables should be descriptive and not need comments to explain their meaning. #defines aren't too common in C++ as opposed to C: #define ST_ROOT 1 #de...

 
That's strange: that guy is using initializer_lists, but appart from that, it's c++03 everywhere.
 
That is true. Still, I refrained from mentioning C++11.
 
There are even some C remnants in the code.
`struct CLexerToken;
typedef struct CLexerToken CLexerToken;`
 
Ah! I didn't notice that. If you find more, feel free to post an answer as well.
 
Well, if the guy uses C++11, there many things that could be improved.
For example, replacing the typedefs by using de clarations (arguably a matter of taste).
 
9:39 PM
With the initializer lists, I'll just assume C++11. But there's also C code, so... yeah, kinda confusing.
 
He could use = default for CLexer constructor and destructor, or simply let the compiler generate trivial ones.
Also, his function parameters have rather cryptic names :D
 
I'm mentioning the typedef now, but I can cancel if you've found anything else you'd like to mention. :-)
 
Also, he is __attribute__((unused)) which not portable while he could simply drop the variable name.
 
Regarding the ctor and dtor, and assuming C++11, perhaps ClassName() = default and ~ClassName() = default could be recommended.
 
And he explicitly gives void to functions that take no parameter. That's also a C remnant^^
And return 0; in main is not really useful.
But overall, I am too lazy to write down all that I just wrote down.
 
9:46 PM
Should I edit them in, then?
 
If you feel like it, go ahead :)
I'm gonna make myself a coffee.
 
Alright. Unfortunately, mods cannot convert chat messages to answers. :-P
 
Oh, and one more thing, which is more subtle: he wants "fast" code. Therefore, he should get rid of std::map and use std::unordered_map instead. Or even use a plain old array of function pointers since he uses int indices.
The std::map is actually overkill for the task.
 
10:05 PM
Are you going to edit your answer or shall I post a new one?
 
I've already done so.
3
A: C-style language lexer for a syntax highlighter

Jamal You're using single-character variables in various places. Except for loop counters (such as i), variables should be descriptive and not need comments to explain their meaning. I see some remnants of C code that's not required in C++: You have a typedef struct, but C++ does the same thing wit...

 
My bad, didn't see it.
 
I didn't mention std::map, so feel free to do so yourself. There may be other things as well.
 
It is hard to get rid of std::map actually, but I have things to add :)
 
Cool! I still have a few bullets left.
 
10:08 PM
feel?
Meh, I hit DVLR
 
That's what I was gonna ask.
 
Well, I do also like to feel the bullets (for good luck) before I get a good kill.
 
@Jamal - still maintaining our stats: data.stackexchange.com/codereview/query/161411/…
 
@Morwenn: The OP has another zombie:
1
Q: QPlainTextEdit subclass function to indent lines in selection

CmdrMoozyI am, primarily for learning purposes, working on creating an editor component in C++ with Qt. As a first step, to begin getting familiar with editing a document via QTextCursor, I wrote this function on my subclass of QPlainTextEdit to indent multiple selected lines: void MyEditor::increaseSele...

 
@Mat'sMug - you are an ugly blue colour: data.stackexchange.com/codereview/query/167924/…
But the good news is that you're now ahead of @Jamal ... :(
And, thanks I guess to @palacsint - Java has dropped off the list of the top 15 Zombie tags: data.stackexchange.com/codereview/query/172449/…
2
 
10:20 PM
0
A: C-style language lexer for a syntax highlighter

MorwennThere are still some things to add to complete Jamal's answer: You are using the GCC extension __attribute__((unused)). That's useful for C code, but since you are using C++, you can simply drop the parameter name, that's allowed an encouraged: int CLexer::stringEndTransition(char) { retur...

There were still some things to review actually :)
 
Ah! I forgot about the strongly-typed enums.
 
0
Q: Is this a proper singly linked list?

horvste/* * LinkedList.h * * Created on: Mar 9, 2014 * Author: steven */ #ifndef LINKEDLIST_H_ #define LINKEDLIST_H_ #include <iostream> using std::cout; using std::endl; template<class T> class LinkedList { template<class E> struct Node { Node<E> *rightNode; E data...

 
And the ->. T_T
 
Well, it seems that the guy had a strong C background, recently moved to C++ and felt that using the latest norm was cool. Hence the time warps in the code :p
Argh, I forgot to make my coffee -____-
 
Make that coffee! Now!
 
Anonymous
10:26 PM
sudo make me a coffee
 
@PatoSáinz - you don't have sudo privilidges here... anyway, it's the 2nd monitor, not the 2nd cup
 
Anonymous
@rolfl what privileges do i have?
 
Coffee done!
CAN U RVEW MY COFE PLZ???!!!!
2
 
Anonymous
@Morwenn 0/10 you probably put sugar in it
 
@PatoSáinz Does brown sugar count?
 
10:32 PM
If it's decaf, I'll have to downvote. :P
 
Anonymous
@Morwenn all sugars, fake sugars (sacarose, etc.) and GNU/sugar
 
It's not decaf, but it's some lame soluble Arabica.
 
Anonymous
 
@syb0rg: Waiting for the reload? :-)
 
There are some questions that I really don't want to review...
1
Q: STL and Dijkstra's Optimization

user2058841http://www.spoj.com/problems/SHPATH/ This is the problem and my solution to this is #include "iostream" #include "stdio.h" #include "algorithm" #include "math.h" #include "string.h" #include "time.h" #include "stdlib.h" #include <list> #include <vector> #include <string> #include <queue> #defin...

 
10:42 PM
Yeah, I'm not sure what else to say about that one.
 
There are too many things to be said and I have no idea where to start^^"
Oh, yet another linked list question. We should really create a linked list meme or something.
 
Anonymous
@Morwenn create one
 
Anonymous
it won't be as forced as the CoD one
 
It's also the same user who won't vote. It's also a weird title question to ask, considering you can do some research to determine if you're doing it right. But of course, the OP wants to see if there's room for improvement.
 
Wow, his previous question was "Is this a proper doubly linked list?". And now he's asking for the singly linked list. I don't really understand...
 
10:52 PM
Well, technically, a yes/no should be considered an answer.
 
XD
And he even reproduced some mistakes that people already noticed in his previous question o___o
 
(but seriously, don't do that in an answer here, although a comment is okay)
 
I don't know, I still don't have [badge:peer-pressure].
 
One quick thing I've noticed: getSize() should be const. I also see that this wasn't corrected from your previous question. You should ideally be showing some improvement with each question asked. — Jamal 24 mins ago
I had to check back to make sure, and you were right.
 
Yay, I got the site's 22nd Outspoken badge :o
 
11:01 PM
RELOAD!
 
Anonymous
 
@Jamal - I thnink yu will find that reload is in an hour still.
Daylight savings does not change Zulu time
 
0
Q: Autoloader functions

George NewtonEvery time I write a new PHP page, I usually need to include this at the top: <?php require_once(__DIR__ . '/../libraries/global.lib.php'); function load_classes($class) { // appears to get all the names of the classes that are needed in this script... $file_name = './classes/'...

 
@rolfl Oh yeah, I forgot about that. I'll need to get used to that.
Hey, @Yuushi!
 
hi @Jamal
 
11:07 PM
Even on SO, there are only 538 Outspoken badges awarded. That's not many...
And many of the first ones belong to Lounge<C++> users...
 
That must be quite a room. I'm too afraid to go in there.
 
Anonymous
>C++
 
Last messages: "Hm, Programmers is shittier than I imagined" and "yep, it's seriously shit". Typical :D
 
Anonymous
not getting near even with a ten metres pole
 
Thank God for chat transcripts.
 
11:16 PM
There are some pretty interesting discussions over there. They also have game jams, trolls, trolls again, programming languages bashing, telling everything is crap, discussions about politics, philosophy, etc... and sometimes they talk about c++ :)
 
The last thing does relieve me. :-) And I thought they were all srs 'bout c plus plus.
 
Nope, there are also some strong C# or Haskell supporters over there telling C++ is basically crap. And it's not a place where you can get help if you have a problem xD
 
Must... not... go in and... troll...
 
Oh boy.
 
11:23 PM
Also, the guy who created Coliru is a regular over there :p
 
O.o
Prospective first message:
"lol c++ sux"
 
11:40 PM
Hey guys. I did one of the "Codility certification" tests, and couldn't come up with a solution. It was rated "Hard", and I feel like there is an important computer science concept I'm missing. Is posting the question within scope for CR.SE?
 
@AlexWebr If you don't have an already working solution, it probably doesn't belong here.
 
@Morwenn Noted. Thanks.
 
00:00 - 20:0020:00 - 00:00

« first day (309 days earlier)      last day (3725 days later) »