Hacker Newsnew | past | comments | ask | show | jobs | submit | robofanatic's commentslogin

why didn't ready to eat meals available so cheaply at any grocery store make the local mom and pop restaurants irrelevant?

People like experiences!

Plus those meals are disgusting! :-)

Plus plus… those meals are actually expensive!!


>I really really want this to be true. I want to be relevant

Think of yourself as a chef and LLMs as ready to eat meals or a recipe app. Can ready to eat meals OR recipe apps put a chef out of business?


I bought djangosquare.com with exactly the same thought a year ago and till today I haven’t done anything with it!

            *
            ^
           ^^^
          ^^^^^
         ^^^^^^^
          ^^^^^
        ^^^^^^^^^
         ^^^^^^^
        ^^^^^^^^^
         ^^^^^^^
          ^^^^^
           | |

I thought same and wonder what other platform one can migrate to and have the same kind of audience reach.

          *
         /|\
        //|\\
       ///|\\\
      ////|\\\\    
          |

Knowing which road is going to take you to a deadend and which one to the destination as early as possible.

No need to harshly judge the OP for merely using a tool. Also you wouldn’t have known some of the blogs listed here if he hadn’t asked it publicly.

How hard is it to put a simple hello world example on the homepage.

Because Lua's Hello World is just `print("hello, world")`, which looks a lot like Python and doesn't tell you much about actually using the language.

The point is, it shouldn’t be too hard just to find an example and get a sense of the language.

Learn x in y is always my goto: https://learnxinyminutes.com/lua/

So put a slightly more informative hello world example then.

Look at the Go homepage. Or Nim. (But not Rust sadly.)


Rather than Hello World, I'd rather see something like a classic Fibonacci calculator with recursion. That way you see function definitions, variable typing, math operations (Lua doesn't have increment/decrement operators or augmented assignments), and even tail-call recursion if it's an option. Hello World is really only useful as an environment verification - do you have your machine set up so you can run the code, or are you missing something?

  function fib(a)
    return countfib(1,1,a)
  end
  function countfib(a,b,n)
    if n == 1 then
      return a
    else
      -- proper tail call
      return countfib(b,a+b,n-1)
    end
  end
  print(fib(6)) --> 8

Look at the Go homepage. It has a variety of examples.

Well. You’d have to demonstrate that a[1] is the first offset in an array, and it’s not a great curb appeal to anyone who has programmed computers before.

I don’t see a problem. That’s how people count.

It makes sense when you look at how the numberic for loop looks in Lua.

In Lua you specify the “beginning” and “end” of the iteration, both included. It doesn’t work like in C, where you have an initialization and an invariant. What makes it short in C would make it longer in Lua, and viceversa.

You could argue “why not make loops like C”, then. But that can be extended to the limit: “why have a different language at all?”.


i think i might prefer indexing starting at zero, but it really isn't important. with c it makes total sense for zero-based indexing. frankly though, for lua, how it works and what an array is, it makes more sense for one-based indexing, the only counter-argument being that 1-based indexing puts off people who learned a thing one way and are unable or unwilling to do it a different way. to even include it on a list of considerations for not choosing lua is a bit silly, but to highlight array indexing and only that as the only thing you'd need to know... well i don't know how to put it that wouldn't be impolite.

either way, at least you can't toggle between indexes starting at zero and one, (at least not that i can recall.)


> either way, at least you can't toggle between indexes starting at zero and one

You can, you just have to explicitly assign something to a[0]. Lua doesn't have real arrays, just tables. You have to do it for every table you use/define though, so if you mean "toggle" as in change the default behavior everywhere then I believe you are correct.


iirc that value at key zero won't be included in any array handling functions. if that behavior were toggleable we'd have the kind of nonesense that early APLs allowed before they realized that's a bad thing to stuff in a global variable you can write to at any time in your program.

If you ever want to look at example code, try going to rosettacode instead of the handpicked selection on the homepage of many websites.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: