Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
copx
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
30 ms
·
271.
▲
by
copx
13y ago
Those are great. I did not expect to learn something new given that Lua is a very simple language but I actually did!
272.
▲
by
copx
13y ago
No, that wasn't my point at all. My point was that I mistrust all braggart claims about how language/paradigm X will turn water into wine.
273.
▲
by
copx
13y ago
The H.264 encoder I use is written in a mixture of C and ASM. It is damn fast and maxes out all cores. I dare you to write a full-featured, functional H.264 encoder in Haskell with equal or superior performance. Once such a thing exist I wi
274.
▲
by
copx
13y ago
www.reddit.com/r/python www.reddit.com/r/javascript www.reddit.com/r/webdev
275.
▲
by
copx
13y ago
This system to identify Australians has way less false positives: https://www.hnsearch.com/search#request/all&q=crikey&start=0
276.
▲
by
copx
13y ago
Great news, up until now there was no good Lua profiler. You can thank GIANTS Software for this one: http://luajit.org/sponsors.html GIANTS Software GmbH is sponsoring the development of a low-overhead profiling functional
277.
▲
by
copx
13y ago
To me it looks like a pretty straight clone of Terraria and that game was a commercial success. Personally I didn't like Terraria though. Way too simple for my taste.
278.
▲
by
copx
13y ago
>The use of chemical weapons has been considered a particularly heinous war crime since before WW2. By whom? Certainly not by the US. America bombarded Vietnam with millions of gallons of Agent Orange. Vietnam estimates 400,000 people we
279.
▲
Snowden impersonated NSA officials, sources say
(investigations.nbcnews.com)
33 points
by
copx
13y ago
|
72 comments
280.
▲
by
copx
13y ago
I discovered Euphoria back in the DOS days when it was still commercial. I agree that it seems a little dated these days but I still fondly remember it. Also it is still a great language for non-professional programmers and still has an ac
281.
▲
by
copx
13y ago
One good argument I can think of would be compile time. C compiles slowly compared to almost every other language not C++. And of course you get the C compile time on top of the compile to C time, so I expect the Nimrod compile chain to be
282.
▲
by
copx
13y ago
Some of my relatively obscure favorites: Io: http://iolanguage.org/ Dylan: http://opendylan.org/ Euphoria: http://www.rapideuphoria.com/
283.
▲
by
copx
13y ago
Yes. I once thought about cheating my way to "the fastest Ruby implementation ever" by simply compiling Ruby to Lua and handing the result to LuaJIT. Many people "compile to C" if they just want to write some personal to
284.
▲
by
copx
13y ago
Will you also work on providing a better Windows package? I don't understand why you don't just bundle all the dependencies, given that they all seem to be open source and redistributable. Call me spoiled but I expect a one-click
285.
▲
by
copx
13y ago
Here is a hacky "REPL" of sorts in Lua: while true do io.write("> ") exp = io.read() print((loadstring("return " .. exp) or loadstring(exp))()) end Actually kinda works. Example session:
286.
▲
by
copx
13y ago
I think with Python and Ruby the assumption is that the typical code base is either in a state of permanent change or dead and thus the advantages of improved code / improved API outweigh the advantages of backwards compatibility. It&#
287.
▲
by
copx
13y ago
>It's declared and defined in the function argument list No, it isn't. No value is ever assigned to "extent" if the function gets called without a second argument. "extent" is nil just like all other non-exi
288.
▲
by
copx
13y ago
>Is Closure(function ... end) really an improvement over the normal IIFE look of (function ... end)()? Now that you say it.. no, it's not. Changed.
289.
▲
by
copx
13y ago
extent is declared, not defined. You wrote "accessing non-existing elements" .. extent may not exist in my example. And as I said bigger Lua project usually use a script which prevents the use of undeclared globals. Such a script
290.
▲
by
copx
13y ago
Some things to add: * Lexical scoping * Tail-call optimization * First class functions / closures Lua is not a functional programming language but I tend to have a large number of closures and recursive functions in my Lua code. Lua&#x
291.
▲
by
copx
13y ago
Lua is an industry standard in the video games business. The scripting language used is usually Lua or Python. Examples of Lua-scripted games: Civilization V, King's Bounty, SimCity 4, Dawn of War, Crysis etc.
292.
▲
by
copx
13y ago
Years ago I read a Lua tutorial but I didn't like the language much. Nowadays I am working on a large 99% Lua code base and I love the language! Lua has a small set of building blocks and only if you try to write something non-trivial
293.
▲
by
copx
13y ago
It is the norm (for larger projects) to use a "strict" script which prohibits the use of undeclared globals. As far as local nil access is concerned, it is necessary for idiomatic Lua. For example, this is how you implement option
294.
▲
by
copx
13y ago
All good points but there is one strong argument in favor of Rust: memory safety. It seems to be the norm for games these days to CTD (crash to desktop) sooner or later. I find that unacceptable to the point that it makes me angry. C++ make
295.
▲
by
copx
13y ago
Just for comparison: b, a = a, b is actually valid code in Lua (and works as expected). Grabbing only one value looks like this _, y = returnsTwoValues() -- grab only the second y = returnsTwoValues() -- grab only the first
296.
▲
by
copx
13y ago
Go is not the only language with multiple return values. Lua for example had them before Go. In Lua it would look like: addsub = function(a, b) return a + b, a - b end a, b = addsub(32, 44) And if you run that code with LuaJIT it
297.
▲
by
copx
13y ago
Thanks!
298.
▲
by
copx
13y ago
Just wanted to say that I like the color scheme. Where can I find the color definitions?
299.
▲
by
copx
13y ago
JavaScript was originally as "open" as Dart. It was developed by Netscape and was only supported by their browser. It quickly became popular so Microsoft had to write their own implementation to stay competitive. Only after that J
300.
▲
by
copx
13y ago
Quite a few people write deeply nested code for some reason unless you tell them not to. Maybe it depends on how your brain works. There is surprising variance within the human population. I find deeply nested code ugly and unreadable, othe
More ›