Loading...
  OR  Zero-K Name:    Password:   

script coder's wat

25 posts, 1400 views
Post comment
Filter:    Player:  
Page of 2 (25 records)
sort

9 years ago
http://www.myvideo.de/watch/8680856/Gary_Bernhardt_WAT

+5 / -0
Skasi
9 years ago
Shush, you're supposed to be dead!
+2 / -0
well i feel like


plus, im disconnected.

so im trapped between the worlds, alone with my thoughts.
+0 / -0
9 years ago
you liar!I thought you are dead!!
+0 / -0

9 years ago
Kudos to whoever ported zombies mode from the game to the lobby!
+1 / -0
quote:
Shush, you're supposed to be dead!


[colour=red]You can't kill the messiah DErankAdminmojjj . @Mojjj lives on in death![/colour]
+0 / -0

9 years ago
oh boy, oh boy, the joys of javascript XD
+2 / -0

9 years ago
Now here is another one for you:

What is negative infinity divided by undefined? :D:D:D:D
+0 / -0
Skasi
9 years ago
ur face
sorry :(
+1 / -0


9 years ago
quote:
What is negative infinity divided by undefined? :D:D:D:D

The result of this doesn't seem any surprising to me, because i guessed it and it wasn't illogical.
+0 / -0

9 years ago
the entire concept of being able to use almost every combination of datatypes with any operator still makes my head hurt.
+0 / -0
EDIT: oops, made a reference to the video in the OP without realizing it. Better start reading threads before hijacking them.
+0 / -0
quote:
the entire concept of being able to use almost every combination of datatypes with any operator still makes my head hurt.

Did you even into Spring?
+0 / -0
9 years ago
excellent lulz, thx!
+0 / -0
quote:
Did you even into Spring?


I don't agree with this. Lua is one of the best programming languages I've ever used. What's wacky are the individual implementations of Lua bindings in different projects. Spring's is reasonable, but there are some real lemons out there.

Lua = C + JavaScript - brain damage

Most of the WTF?'s mentioned in that link are probably from people who don't understand closures or miss the unintuitive programming idioms like the ternary operator and using numbers as booleans.
+0 / -0
The same link shows that Lua isn't amongst the most hated. You provide extra points of evidence to that: you profess your like of that language in the same line with "unintuitive programming idioms".

Still, Lua is a dynlang, so you can do quite a lot of that stuff with "comparing uncomparable types".
+0 / -0

9 years ago
I think you misunderstood, or I worded it poorly. I mean that in my experience, people who don't like lua get hung up on specific features it does not support. For example, lua has no ternary operator ( condition ? true : false ) which is commonly used in C, and does not support using numbers in conditionals (if numberOfSomethings then ... ), as commonly cited examples. I was not saying lua uses unintuitive idioms, rather that it *does not support* idioms that are unintuitive to beginners, and this gives experienced programmers reason to put WTF? in a commit message if they don't understand why that is the case.
+0 / -0


9 years ago
Mmm fair point.
+0 / -0

9 years ago
quote:
For example, lua has no ternary operator ( condition ? true : false ) which is commonly used in C, and does not support using numbers in conditionals (if numberOfSomethings then ... )


Lua by nature is itself very similar to a ternary operation.

local value = condition and valueiftrue or valueiffalse
-- only caveat is that valueiftrue doesn't evaluate false

Lua does support numbers (and anything) as conditionals. The difference from other languages is it doesn't evaluate 0 as false. While in C functions are designed to return 0 on an error or not-found scenario for use in a condition, in Lua they instead return false. The resulting usage of the return value is just as concise.
+0 / -0
quote:
Lua does support numbers (and anything) as conditionals

I think what he meant was that using a number (or anything except an explicit boolean) as a conditional tells you absolutely nothing about the value of the number itself (ie. it only says whether it's nil). When counting stuff you may want to know whether there were any at all and that's where the simple

if (smurfs)

seems more concise and natural than

if (smurfs > 0)
+0 / -0
Page of 2 (25 records)