« first day (955 days earlier)      last day (4218 days later) » 

19:00
When I go to the register page and fill in popupEmailReg it still sees it as popupEmail and validates it on that
@Xegano first: ohh god... ohhh god no!!!!!!!! please never EVER create elements like that
never
@minitech is VB.NET the same as VB6?
Yea I expected a reaction like that it didnt really feel good working that way
But how else can I do this? :S
it really is a nightmare to maintain and read
19:01
@BenjaminGruenbaum VB6 : VB.NET :: C++ : C++/CLI
knowing this I expect you to look into other alternatives. templates or create the elements by hand, or create the elements on the page (hidden) and detach them.
var noAccountLink = '<div id="no_account" style="cursor:pointer">Ako nemate nalog za Dijelovi.ba mozete se ovdje registrovati</div>'; -- EEEK. Inline styles, HTML snippets in code, weird language ( :-) ). Think about what you'll need to do when you want to add another language version
What about using ajax and loading html pages with php?
@KendallFrey That was not a serious question :P
@BoltClock what are you doing here? You are the pet mod of C++
19:03
@Xegano that works as well. but you are already using jQuery so you can just .load()
@BenjaminGruenbaum Good
also, don't repeat selectors. $("#popupWindowFooter") is repeated at least twice.
@BenjaminGruenbaum VB6 is to VB.NET as C is to C#
Except VB6 is a less intuitive language than C.
@rlemon OTOH, ID selectors are quite fast
@Xegano I realize these are not your initial question, i'm just commenting as I read.
19:03
@minitech I heard VB is for noobs and you can only use it for drag & drop windows applications.
@BenjaminGruenbaum I can't tell if you're being serious here.
@JanDvorak yes they are, but pulling the element out of the DOM twice when you only need to do it once is still a relevant tip
@minitech I think you can :)
Is the "Behind every successful man, there is a women" phrase true?
@BenjaminGruenbaum, that's what I heard too
19:04
@DemCodeLines no
I mean that is how Facebook came up.
@DemCodeLines Still waiting on that friend request?
Your example email is @hotmail.com. It's bad enough per se :-)
Facebook came up because someone had an idea and implemented it semi-well with a fucking tonne of lucky timing
Okay, okay. You two are suspended
19:05
@BenjaminGruenbaum Yes, kinda almost giving up now. You can enjoy making fun of me and mocking me, if you wish to
@DemCodeLines, okay :)
@minitech Can I join?
@minitech xD Seriously though, is there any compelling reason to learn it? I know C# pretty well.
@BenjaminGruenbaum legacy
@BenjaminGruenbaum No.
19:05
@BenjaminGruenbaum Not really. But if you know neither, I would go VB.NET
I see a lot of vb.net code
constantly having to convert it over to c#
@rlemon me too :(
They're BASICally the same language.
@BenjaminGruenbaum, the power of christ compiles you?
@phenomnomnominal LOL
19:06
@minitech yea, but the small syntactical differences piss me off.
@minitech Hail no.
that escalated quickly.
@rlemon I know how you feel ;)
Different language, same libraries.
Know whats worse than VB.NET? VBA
19:07
@minitech Why? There are so many code-bases in C#, most of the open source interesting stuff, most of the tutorials and documentation. Except for MSDN which has both languages in that annoying tab thing, all the coding blogs I know are in C#
o_O
@phenomnomnominal If only I was Christian :P
1 message moved to Trash can
serves you right!
The current bundle is awesome humblebundle.com
Yes, if only :)
19:07
@BenjaminGruenbaum If you know VB.NET, you can read C# pretty easily.
@rlemon I dare you to find a worse language than Malbolge.
And obviously there exist online conversion tools.
@KendallFrey REBEL
@minitech gag
19:08
Good god, I just had a kernel panic, rebooted to join the room and now I wish I had a kernel panic again.
wow
@rlemon I've written a quine in REBEL. That's more than can be said about Malbolge.
@KendallFrey PHP
But VB.NET has a better syntax, in my opinion. Setting aside that subjective thing, though...
@OctavianDamiean Just tell your kernel to stay calm
19:09
VB.NET has better support in Visual Studio. The gap was enormous until VS 2012, but even now, it's still better.
@KendallFrey you can't write bad code in Malebolge
@minitech Yeah, if you like significant whitespace and lots of typing.
@minitech I think the most off putting thing about it is the fact it's a lot less popular, and its syntax is different from other popular languages. Although a lot of interesting ideas now in C# were in VB first
@JanDvorak Isn't broken code bad code?
In VB.NET, there are basically no arguments about whitespace.
In C#, you have to use new[] {} to create an array inline. VB.NET does {}.
19:09
@minitech Better how? (Even with ReSharper?)
VB.NET has XML literals.
@minitech idk, I write a lot of winforms. and I don't notice a difference in how VS treats c# and VB other than the fact that I hate writing VB
VB.NET has no semicolons.
Etc.
I am not so good at javascript and don't want to derail the conversation on the question but is regular expression a good idea to check if a string is a natural number?
@minitech Newlines are whitepace.
19:10
2
Q: How to check if a string is a natural number?

omegaIn javascript, how can you check if a string is a natural number (including zeros)? Thanks Examples: '0' // ok '1' // ok '-1' // not ok '-1.1' // not ok '1.1' // not ok 'abc' // not ok

@minitech That's a con :P
@KendallFrey And there are no arguments about it because it doesn't have semicolons.
@KendallFrey code that is subtly broken (most PHP code) is worse than code that is obviously wrong (anything even remotely readable in Malebolge)
@minitech semicolons == good
@KendallFrey Why?
19:11
@KendallFrey I thought in this room, semicolons === good?
@kush what is wrong with parseInt(n, 10);
(Uh-oh. Did I just ask the question?)
@KendallFrey I'm not missing semicolons in Ruby
@minitech TBH I'm surprised VB.NET is even getting Roslyn, I just never saw it actually used much anywhere I've been.
Well, Zuckerberg got that idea because of Winklevoss, who shared it with him because he created FaceMash, which he created because of that girl.
19:11
@kush Good in JavaScript because they are optional
So it was really a woman behind it all.
@minitech Because significant whitespace == bad.
@rlemon That was my initial thought but someone pointed out that that "15bananas" does not give NaN like you'd expect.
@kush That would evaluate to false.
@KendallFrey Wait, wait. Slow down.
19:12
@KendallFrey That's highly subjective, python programmers swear by it
Do you... not like CoffeeScript then
@BenjaminGruenbaum they are optional, but try omitting them, and using the [].method.call trick on the next line.
@BenjaminGruenbaum I hate it with a passion.
@OctavianDamiean python detected?
@KendallFrey, don't worry, it's okay to be wrong.
19:13
@kush huh? No, I'm serious.
@KendallFrey Python is awesome. Except for some parts of it.
Obviously, if minitech made it to mod.
@minitech The room is pretty divided with me and phenomnomnominal (and somethimes JanDvorak and OctavianDamiean) liking CoffeeScript and the rest disliking it
Also, Ruby has significant whitespace and it is a pretty good language as they go.
Again, sometimes.
@minitech Python has a lot going for it, but I really dislike how it's trying to avoid being functional
19:13
@minitech ruby has significant newlines, not significant whitespace
@BenjaminGruenbaum I actually consider checking out CoffeeScript.
@JanDvorak VB.NET has significant newlines, not significant whitespace.
@OctavianDamiean Build one big project with it, that's how I evaluate new technologies to learn them properly
I actually almost thought about maybe possibly checking out...
@minitech newlines are whitespace
19:14
@KendallFrey Okay, so Ruby has significant whitespace.
Aaagh
@KendallFrey significant whitespace normally refers to indentation
@OctavianDamiean I think the assumption was that semicolons is actually a function that returns a boolean which is true if semicolons are indeed good
If Ruby has significant whitespace, so does javascript
@JanDvorak That's the most common, yes. Also whitespace for separating statements.
@kush give me a sec
19:16
I like some of the ideas of CoffeeScript, but I am currently employed working with it
And it's horrible.
Hye guys!
I can't tell where things begin and where they end. This is not just a matter of picking a better editor, either.
@kush I'll tell you why typeof semicolons === "noun" and typeof good === "adjective" thus noun !== adjective
@minitech Huh? What do you mean can't tell where things begin and when they end?
@OctavianDamiean I bow to you. Finally, I get to call someone else a Grammar Nazi :D
19:17
Well, I'll blog about why VB.NET is so obviously superior some day, but right now I have to go to PE class. Joy.
@minitech Lol, enjoy highschool :)
@BenjaminGruenbaum The combination of 2-space indentation and significant indentation makes blocks incredibly difficult to read.
@minitech So don't use two space indentation, use four space indentation
@BenjaminGruenbaum I'll try.
@BenjaminGruenbaum Not my project!
@minitech you can go deeper
19:18
Cool :)
@JanDvorak that's what she said ...
I just couldn't resist ...
That's what she said
@JanDvorak Eh
0
A: How to check if a string is a natural number?

rlemonHere is my solution: function nNumber(n) { var n1 = Math.abs(n); n = parseInt(n, 10); return !isNaN(n1) && n1 === n; } Here is the demo: var tests = [ '0', '1', '-1', '-1.1', '1.1', '12abc' ]; function nNumber(n) { var n1 = Math.abs(n); n = ...

@kush
user1125394
!!Did Java actually threatened w3c to add the applet tag?
19:20
wat?
user1125394
<applet> is for java code only?
@rlemon +1 for the radix
@rlemon You got an upvote, but one has to define what a natural number is
yea, but It meets your needs doesn't it @kush? :P
It is not me btw :)
19:23
oic
nvm then
thought I was helping you
I was curious why everyone was recommending regular expression
@rlemon you solution also doesn't work for the cases the regex one doesn't
because they're idiots
@rlemon Quick, delete the answer then.
Because they're super easy to maintain
19:23
@BenjaminGruenbaum what is said case?
does not work for +42 or 5e3 or 0xFF or ... long story short: numbers are more than text to parse — Jan Turoň 8 mins ago
+42 works, the other two don't
@rlemont Sorry had to do something real fast and I looked into load() and it's something I have been looking for but I even got downvotes when I asked for the equivalent of file_get_contents() in javascript :S But this clearly is that
But would this fix my problem? Can I select ids in the html file that I loaded with load()?
I cant when I use html()
@rlemon i have a question about your answer, i see it a lot, where people use tiny variables like n1 instead of number1 or nNumber instead of naturalNumber, im just curious why people do this because i have seen a quote before saying "Anyone can write code a computer can read, a good programmer writes code a human can read". not dissing your code lol :)
Hey, has anyone here worked with Selenium? My company is thinking of integrating it into our testing procedures, but I've never used it before. Any words of wisdom from you folks?
function nNumber(n) {
    var n1 = Math.abs(n),
    n2 = parseInt(n, 10);
    return !isNaN(n1) && n1 === n && n2 === n1;
}
fixed.
I think
test rlemon test
dammit
19:25
See rlemon test.
now none of them work
Test, rlemon, test!
Rlemon tests the code.
Work, code, work!
Can you get intravenous caffeine?
The right amount of money can get you anything
That's not true
19:27
I think you can take it as tablets, is that good enough
or you can snort it
@rlemon hm
I want a caffeine drip.
Anything less is failure.
SCIENCE
I've never felt a proper hit from, say, coffee
oh, wait. Drank about four or five pints of coke in a pub once and felt somewhat strange on the way home.
@TomW Try espresso. It works.
On the other hand, energy drinks rarely work for me. 5-hour energy, Monster, Redbull, that sort of thing - just get nothing from them.
19:29
I have an espresso maker. I must never have loaded it with anything that's any good, as the result has only ever been adequate
@rlemon 1.1 gives true now
It has to be coffee or soda/pop/carbonated-sugar-water-with-caffeine.
does anyone have a opinoin on the question i asked @rlemon ?
@Connor LAAAAAAAAZZZZYYYYYYY
Out of action since some fscking imbecile moved/lost the filter insert
19:30
@TomW 5 pints of Coke? Jesus.
@RyanKinal LOL
Seriously
@RyanKinal so you don't write like that?
@Connor Did I say I wasn't lazy?
@RyanKinal no
19:31
@ShotgunNinja I was 17 and had been grassed up for being underage. Everyone else I was with was too, but no proof had been seen. I just switched to the non-alcoholics and drank as much of it as I did beer.
Really, it depends on when/where/why I'm writing it.
function nNumber(n) {
    n = n.toString(); // force the value incase it is not
    var n1 = Math.abs(n),
    n2 = parseInt(n, 10);
    return !isNaN(n1) && n2 === n1 && n1.toString.length === n.length;
}
ok now it is fixed.
ignore the console
@rlemon, you has bad variable names :)
If I'm writing something I know I'm going to have to maintain, I'll probably write descriptive variable names.
@RyanKinal k cool
19:32
@phenomnomnominal I can change them to o or p
If I'm writing something quick and dirty, or an example for someone else, I might not care so much.
If I'm trying to beat the trolls on SO, I probably don't care at all and will go for pure speed over functionality or semantics.
@Connor It's a symbol, notation; not an essay.
@TomW Enormous bladder much?
@loading... your name tricked me
My childish sense of humour!
19:35
@rlemon anything to make it clear that they aren't natural numbers
Do I need an API key to access tweets client-side?
@rlemon Do you think load() would fix my problem? Can I select ids that I loaded with load() which I cannot select with html()?
Probably
@phenomnomnominal does this help?
function nNumber(userInput) {
    userInput = userInput.toString(); // force the value incase it is not
    var absoluteUserInput = Math.abs(userInput),
    parsedUserInput = parseInt(userInput, 10);
    return !isNaN(absoluteUserInput) && parsedUserInput === absoluteUserInput && absoluteUserInput.toString.length === userInput.length;
}
thats WAY overkill tho
19:37
@kush, no that's awful.
@mikedidthis still here?
@Xegano you cannot select anything with .html() afaik
@phenomnomnominal haha
absoluteUserInput.toString.length
@XCritics STOP BOTHERING HIM HE'S (PROBABLY NOT) WORKING ON LEMONMEME!
19:38
:D
TOO MANY NAMES STARTING WITH X
But I need him more than you do!
XLAX!
guys, don't google lemonmeme at work
19:39
@rlemon Then if he's doing that for you, come help me :D
I'm going to smoke
what do you need
and don't invite me to a room just say it
I'm not DICK
:) go smoke
SPIT OUT YOUR QUESTION!
No
I'll just fumble around through 100 incognito windows
I just wanted feedback on design / function
It's bad
^ = feedback
19:41
No it's not :(
It's good.
That's what I was looking for
It's not beautiful
19:42
Why you gotta be like that homie
Would you rather I lie?
I'd rather a reason supplied with it, Just calling it bad by its self seems more trolly than feedback :)
I don't like the red at all
I don't like the font either
You need to change your favicon
I just left the default express font, and I'm trying to stay with the dota colors
Then use the blue
Or swap it around so the red are the highlights
It's drowning in it right now
19:44
LOL
Good point, I guess there is a lot of red there
Your buttons are inconsistent
How so?
What browser are you on?
19:45
input vs button, perhaps? css rules at war
Who cares, fix it :)
Everything is in line for me
Also, see what happens when I add more text here
and I'm on Chrome too
19:46
They're still imbalanced
wrong font sizes
The chat window is a bit average too
@XCritics The gradient in the footer is in the opposite direction to the lighting on the send-message box.
Does everyone other than me have a 1080p laptop?
=== chat window
@loading... Sorry what
19:48
yes, please pour more salt on my wounds
@kush Im on a shite laptop at work
1440x900 or whatever
@XCritics, I don't like it. Reminds me of the old GeoCities clan sites I used to make
but its biased, its just not my style
@Loktar shitty work laptops unite!
19:48
The drop shadow on the chat window should be bottom and right. It's different to the gradient in the footer, and different from the norm (look at any 3d button for example)
My idea is to use tweets as my random noise for a coin flip
@Shmiddty nice!
@XCritics I think it could look good, it just needs some polish.
Webcam + grab a frame === random noise
could be gamed
(more-so than tweets)
19:50
just use random.org
that's too straight-forward
tweets containing wtf
@rlemon @dystroy Y U NO
function nat(n){ return n>=0 && Math.floor(n) === +n;}
is there an API of scrabble words?
It's way shorter, and it's self-explanitory
A natural number is a number that is bigger than 0, and flooring it keeps it the same so it has no fractional part
19:53
@rlemon ok so you gonna come help me test functionality then real quick, and gimme feedback on that :)
Works for all the stuff like 1e5 and +42 correctly
call API of scrabble words, pick a random word, call twitter API searching for that word.
@BenjaminGruenbaum because that would be too fancy
@Shmiddty what are you making?
fuck you and your more efficient code. :( grumble grumble
19:54
@rlemon It's the definition of a natural number given the real numbers -_-
2 hours ago, by SomeKittens
http://omg2.thedailywtf.com/
ahh ok
@rlemon also, if I wanted to be clever I'd do |0 instead of Math.floor
nono
make sense why you are using random to get a random work to get a random tweet to get a random number :P
19:55
bitwise operators are not real js
didn't we cover that earlier?
@Shmiddty atmospheric noise to get a random jquery function, pick a random letter from that function using the jquery source viewer, get a random scrabble word containing that letter, find a tweet containing the word and check whether is is even length or odd length. Boom.
@BenjaminGruenbaum Returns true for the empty string. Dunno what the spec is so I don't know if that's intentional or not.
@Shmiddty I don't know what the qualifications are going to be. I mean I can write one that will take a webcam snapshot and always force an answer depending on say: hair colour. That is pretty WTF to me. or I can write a 1000+ LoC engine to do some really fucked up shit to generate a random true/false.
what is more WTF?
Im going to enter this :)
I suppose zero is nothing.
19:58
whats the deadline?
@loading... the value of empty string is 0 according to the spec, +"" evaluates to 0
@BenjaminGruenbaum Yeah, wasn't sure if it was meant for input validation or something else.

« first day (955 days earlier)      last day (4218 days later) »