Better HN
topnewbestaskshowjobs
Log inSign up

nmz

679 karma · joined Mar 3, 2019 (7y ago) · 680 submissions

Submissions

comment 2y ago · link · parent

Did you try tinygo?

comment 2y ago · link · parent

I'm not concerned, mispelling a variable can be fixed via using luacheck. Something I always do via tmux + editor + {entr -c}. that or using strict.lua which sets _G's metatable __index to error out. A limitation is disallows using ENV and you have to constantly be like local foo = _G.foo, but that makes your code a bit clearer I guess.

I think having a special datatype differing between nil and null would still render the code the same, instead of using if var==nil, you're just now doing if var==null, if you're using a variable after you know a function was used and its nil you know it returned null. you can always just use { or false } if you really need to differ between nil (and waste space), that or use assert()

Also my problem with pattern matching returning nil is it breaks usage of concatenative :, as in match:""match"":match""

So if you use concatenative objects with :, make sure you never return any other type but the object itself. its what allows lpeg operator overloading to not error out in the middle of it.

comment 2y ago · link · parent

dillo is more lightweight, although it doesn't support html5, while netsurf does support some html5. The website itself of dillo does not render the same in dillo.

comment 2y ago · link · parent

FWIW the textadept lexer can return everything well defined and supports everything, the rest is just styling.

comment 2y ago · link · parent

Whenever a pattern match fails, be it string.match or string.find, it returns nil. Could it return false instead?

comment 2y ago · link · parent

That sounds more like a setmetatable(tbl,{__index = function () error"got nil" end}) variables are harder but you can make a wrapper function that errors whenever you get nil.

I cannot even imagine how pattern matching will work when it always returns nil, not to mention tables are full of nil sometimes, it would be an incredible waste to have a table full of false instead of nil.

comment 2y ago · link · parent

At least for continues and frozen tables, lua already semi offered them via goto and setting __newindex in a metatable.

Conditional expression which I imagine is ternaries can be done with a constructor and the condition in the field a la {nil,"b"}[cond and 1 or 2]

comment 2y ago · link · parent

Penlight[1] was supposed to offer python like batteries. It's kind of been abandoned by now, as has most of lua IMV. To me you still need luastd and a couple of other things (posix, lfs, socket, luasec) you can just fetch with luarocks and you're semi set.

[1]: https://lunarmodules.github.io/Penlight/

comment 2y ago · link · parent

Play any old movie and you will see the intro meander for a while, opening credits will take sometimes almost 5 minutes. As opposed to now, movies start fast before you click out and watch another thing. Sure, they didn't particularly waste film, but they did meander... or, you could say they weren't meandering but setting the mood/ambiance for the film. One must remember directors were artists, cinema existed for the art not for the audience, there wasn't a whole lot of pandering.

comment 2y ago · link · parent

Is Bart Simpson black then? Urban culture is culture.

comment 2y ago · link · parent

I don't remember this in Donkey Kong. most of this was introduced in DK64, with that said.

Yes DK does play the bongos and Diddy plays rap and Dixie plays the electric guitar and Lanky plays the trombone, and Chunky plays the triangle.

Also Feynman played the bongos, It's a famous gift for children because its cheap. blacks don't own bongos, nobody owns any instrument.

comment 2y ago · link · parent

I also always had access to it but I never saw the harm in it, always knew it was unrealistic, the same way an action movie is.

FWIW Instead of protections that will be eventually breakable, What I would like is more a mandatory disclaimer saying that everything about it is unrealistic and that its pure entertainment.

comment 2y ago · link · parent

What you said did not make much sense, if it got poorly remade how can the local one be bad? that would mean the local one is better because the remake is worse.

Most horror remakes are seen as bad and a lot are forgotten, The mist, The Shining, Psycho. Shows imported from britain are bad, like The it crowd, a good deal of panel shows from britain crashed and burned.

Hollywood also has the capability of throwing away movies if they think are bad enough. "Release the snyder cut". There's plenty of bad remakes, I'm not young but a lot of things are remakes from the 50s 60s 70s 80s and we just don't know, apart from the adaptations of foreign movies and films.

comment 2y ago · link · parent

I like to shit on electron because plain old tcl/tk is a better/leaner alternative. Apart from the myriad of other[0] alternatives that exist.

[0]: https://github.com/sudhakar3697/awesome-electron-alternative...

comment 2y ago · link · parent

Which is quite something considering I can't have foobar running for more than an hour before it crashes.

comment 2y ago · link · parent

There's gobolinux, which in my view solves everything and isn't as complicated as nix... nobody cared.

comment 2y ago · link · parent

The price is quite high for a jobless minor, of which most gamers are.

comment 3y ago · link · parent

Is this surprising anyone? If lack of sleep causes a myriad of symptoms like hallucinations, mood swings and etc. Then the opposite would probably true.

comment 3y ago · link · parent

They'll have your data regardless if you pay for the service or not. And nothing is free, they need to pay for the service, now, if you do pay for the service they should enable more privacy.

comment 3y ago · link · parent

if ++languages>1500 { error "too many languages" }

comment 3y ago · link · parent

Culture has social conventions that are not based at all around survival of the fittest, fashion and language for one are different between cultures. I do not see how they maximize survival, if anything they create needless competition.

comment 3y ago · link · parent

Morality is set around cultural norms not animal behavior.

comment 3y ago · link · parent

Whatever raises survivability and QOL is ethical. Though there is a feeling/emotion when dealing with QOL, it is measurable.

comment 3y ago · link · parent

Not to mention it now requires a new PSU. Before you could use your standard $5 (android) phone charger at (5W), then you had to buy a 15W one and now a 27W.

To whoever thinks pi's are cheap, you can get more functionality out of a used laptop for less money, but probably worse specs and probably x86.

comment 3y ago · link · parent

I used to acknowledge, but, I've gotten bitter, I've been hearing about Hedy since I joined reddit. which was years ago, and I don't even care about frequency hopping, I can only be forcefully swallowed propaganda for so long until I start actively working against the subject no matter what it is.

comment 3y ago · link · parent

Goes without saying, its a browser, browsers are never finished. unless you discarded html/js and started from scratch... but then you'd have no data for the browser and what would be the point of that.

comment 3y ago · link · parent

If BSD had to split apart their additions with the original unix code, then that means copyright headers should be avoided/obsoleted and only a vcs based historical viewing (who committed what) should be allowed. Since whatever anybody writes contains a copyright itself.

comment 3y ago · link · parent

Now I like lua and think single pass is the way to go for interpreted, since you don't have the disadvantage of a slow compile time no matter how big your codebase gets, BUT its not great to write in. some things are (apparently) not possible, which means the only solution is to transpile into it, which has led to some good languages like moonscript[0], and the dynamic nature is a boon as your codebase grows, which has led to teal[1] which offers static type checking.

[0]: https://moonscript.org/

[1]: https://github.com/teal-language/tl

comment 3y ago · link · parent

So it basically does

  function M(...)
    if select("#",...)>3 then
      error("failed arity check on M()")
    end
  end
1
91011
23