Live data from Hacker News

I open sourced my game along with a tutorial on how to make it using Lua

github.com

71–80 of 96 posts

Re: I open sourced my game along with a tutorial on how to make it using Lua

#72
post #66

Earlier quoted context omitted.

They don't say that C was the first. The claim is that C's influence was responsible for the proliferation. (Bit of a tangent: Lisp predates C by at most 2 years if you count McCarthy's original 1960 paper, but afaict their respective implementations both got their first public distribution in 1962. Of course, Lisp was set to gain momentum from that time until the AI winter, while C was practically confined to UNIX u…

C wasn't from 1972? Basically a decade later?

Oof yes, that's correct. The manual is dated 12 June 1972, which seems to be the release date.

Re: I open sourced my game along with a tutorial on how to make it using Lua

#73
post #20

Earlier quoted context omitted.

I disagree. Particularly when parsing strings, it's useful if the upper bound of one substring is the lower bound of a nonoverlapping substring immediately after. For example, here's a routine to split a string into the part before the first dot and the part after: function split_dot(s) local idx = s:find(".", 1, true) if not idx then return s end return s:sub(1,idx-1), s:sub(idx+1) end It may come as a surprise that…

You wouldn't end up with this: s:sub(0, #s) You would end up with: s:sub(0, #s - 1) Which demonstrates the off-by-one error.

That would be strange, in Ruby

    s = "foo"
    s.length
    #=> 3
    s[0, s.length]
    #=> "foo"
Same in JavaScript

    s.slice(0, s.length)
and Python

    s[0:len(s)]

Re: I open sourced my game along with a tutorial on how to make it using Lua

#74
post #63

The author has some relevant blog posts (in GitHub issues) too: https://github.com/a327ex/blog/issues/35 - BYTEPATH Postmortem (2018) https://github.com/a327ex/blog/issues/44 - One Year Sales Data for BYTEPATH (2019)

That's a very interesting way to use GitHub issues. I wonder what sort of problems can arise with vendor lock-in, though.

It's probably better to just make them Markdown inside the directory, you can export the Markdown files (since they're in git) but you can't export issues. Github renders both the same since, well, they're both Markdown.

Re: I open sourced my game along with a tutorial on how to make it using Lua

#75

Earlier quoted context omitted.

A decade ago, I thought Lua would be where JS is today. But JS won... A new text editor in Lua, why not: https://github.com/rxi/lite (Rxi is awesome, see https://rxi.itch.io/ )

rxi indeed is awesome! Do you know in what language/engine his (her?) tools on itch.io are written? They all have an awesome pixelart look to them and I wonder if (s)he uses lua for them too.

The tools are all written in C and use microui[1] for the UI. The games are typically written in LÖVE with the exception of SCANLINE which uses Nim

[1] https://github.com/rxi/microui

Re: I open sourced my game along with a tutorial on how to make it using Lua

#76

I've never heard of Lua, but now that I am looking at it, it seems very friendly. Love how they call things what they are, for example `local` is just a local variable, or `repeat X until Y` for a loop. It's a joy to see, to be honest.

I first became aware of Lua in 2007, playing World of Warcraft. Really cool scripting language. Kinda wish it'd taken off the way it might've.

Re: I open sourced my game along with a tutorial on how to make it using Lua

#77
Something that really annoys me is a blob of code suddenly pushed to GitHub without a commit message, and then 10 random Update Readme commits. The repository holds no history.

A rich git history a lot of the times imo is necessary to understand why some parts are written the way they are written, and is also enjoyable to read.

Re: I open sourced my game along with a tutorial on how to make it using Lua

#79
post #54

Earlier quoted context omitted.

I'm confused. Lisp does 0-based indexing. Lisp predates C and C-like languages by decades.

They don't say that C was the first. The claim is that C's influence was responsible for the proliferation. (Bit of a tangent: Lisp predates C by at most 2 years if you count McCarthy's original 1960 paper, but afaict their respective implementations both got their first public distribution in 1962. Of course, Lisp was set to gain momentum from that time until the AI winter, while C was practically confined to UNIX u…

Historically, everyone who studied computing seriously learned assembly language, and it was much more widely used.

In early computing, assembly language saw a lot of use. The navigation program that sent the Apollo mission to the Moon was written in assembly language. During the micro-computer boom, which echoed the history of big iron boom, a lot of applications and systems were written in assembly language again. Most commercial video games for 8 bit micros were written in assembly language. The famous WordPerfect word processor for the IBM PC was assembly language. The VMS operating system: assembly language.

C became easily popular because it gave a nice notation, and a sprinkling of type, to assembly language memory manipulation concepts that most professional programmers already knew how to use.

Re: I open sourced my game along with a tutorial on how to make it using Lua

#80
post #70

Earlier quoted context omitted.

rxi indeed is awesome! Do you know in what language/engine his (her?) tools on itch.io are written? They all have an awesome pixelart look to them and I wonder if (s)he uses lua for them too.

also, just a sidenote which you might already be aware of, a lot of itch.io used to be written in Lua. Check out Moonscript, A language that is like the coffeescript of Lua ( https://moonscript.org ), and Lapis which is a web framework ( https://leafo.net/lapis/ ) that can use Lua or Moonscript. Itch.io used to be built with both, I don't know if that remains true today.

    curl -sI https://itch.io | grep -i server
    Server: lapis
Post reply on HN