• 10 Posts
  • 924 Comments
Joined 1 year ago
cake
Cake day: June 24th, 2023

help-circle



  • Yes, I was shocked at how small it is. I had no experience working with such limited resources going into this project. Our router had 32MB of storage. At one point I was looked into adding a python interpreter, and it was like 11MB. The Lua interpreter is like 250KB. Tiny!

    Also, the ternary operator has the best syntax of any language I have ever used.

    x = [condition] and [true value] or [false value]

    No question marks or colons or anything weird. It’s a logical extension of && and || after commands in bash using keywords since it is a verbose language. I wish every language had this syntax.

    For contrast, python is:

    x = [true value] if [condition] else [false value]

    It just seems weird to me to have the condition in the middle.



  • I was the lead engineer on an Openwrt router for 2 years at my old job. Their documentation is complete and utter shit, but their design is extremely intuitive. Whenever I said to myself, “hell, let’s just try this and see if it works,” it had an insanely high success rate.

    I didn’t know Lua going into this project, but when I left the company, it made me really wonder why more people don’t use Lua. It’s a really nice language.

    I really enjoyed having my own open source router that I could just drop new features into by adding packages and recompiling. I was sad when I had to send all my dev units back.











  • Dandroid@dandroid.apptoStar Wars Memes@lemmy.worldNot Sparks.
    link
    fedilink
    English
    arrow-up
    9
    arrow-down
    1
    ·
    10 months ago

    I was a kid when the prequels came out. I remember the hate for them, but most of my friends that were my age all loved them, as did I.

    I think people tend to like what they grew up with and dislike what comes out when they are older.

    You can see this pattern in Pokemon games as well. I grew up with gen 2 and gen 3. When gen 4 came out, it seemed like everyone hated it. Same with gen 5. But now most people act like gen 5 was the last good one.


  • It can be really dangerous for some programs. I don’t know too much about Windows, but in Linux, if we try to close a program once, it sends SIGTERM (or SIGINT, I can’t remember right now), which basically asks your program to stop. You program can receive that signal and finish things up and exit cleanly. But if your program is deadlocked and can’t handle that right now, closing the program again sends it a SIGKILL, which is basically the OS saying, “Get fucked. You’re done whether you like it or not.”