Log In  

Originally I was attempting to write a compatibility library so that PICO-8's version of Lua would easily be able to support standard Lua 5.2 libraries. After some extensive research, I realize that this task is actually huge (perhaps insurmountable!). I have started documenting the differences between Lua 5.2 and PICO-8's version of Lua from a lower level technical standpoint.

The purpose of this document to help folks further troubleshoot PICO-8 when coming from a scope of Lua 5.2. e.g. math.random may exist in PICO-8 as a function, but it always returns 0.

While I do have a lot of experience using Lua (and thus many of my confused frustrations with the PICO-8 variant), I do not have total knowledge of Lua.

I hope that this document can act as a guide to future PICO-8 Lua developers.

TL;DR;

Currently I am curating a list of undocumented differences between Lua 5.2 and PICO-8's Lua :

https://gist.github.com/josefnpat/bfe4aaa5bbb44f572cd0

Please offer corrections or additions!

P#15388 2015-10-15 06:27 ( Edited 2016-06-05 01:36)

Hey, this is very useful. Thank you for putting this together.

Can you add that to the awesome-PICO-8 list, please? :)

https://github.com/felipebueno/awesome-PICO-8

P#15393 2015-10-15 09:36 ( Edited 2015-10-15 13:36)
P#15403 2015-10-15 16:38 ( Edited 2015-10-15 20:38)

I assume @zep noticed this post, and released a quick update for 0.1.3 :)

If that's so, I'm glad that this got cleaned up, but I am sad to see some commands go, like:

  • tostring/tonumber
  • type
  • assert
  • unpack
  • pcall

Regardless, I have updated the document!

P#15411 2015-10-15 18:52 ( Edited 2015-10-15 23:02)

Damn, there goes a lot of work. Love it when an API gets smaller without a period of deprecation so all your code stops working... (sarcasm)

P#16762 2015-11-19 00:56 ( Edited 2015-11-19 06:00)

amazing work!!

what about collectgarbage or another GC tricks? I see it as removed in the gist but is there any way to trigger it?

Can we use weak tables? is there any way to set the table mode beside setmetatable?

P#16763 2015-11-19 01:04 ( Edited 2015-11-19 08:38)

I have updated I have updated this document to 0.1.6.

@guntharpo wheeeeee!

@franciscod unless it's called by another function, I think you're SOL. Not sure though, folks can chime in here. As for weak tables, it looks like setmetatable has been added in 0.1.6 (mind you, getmetatable was not)

P#22306 2016-06-04 21:36 ( Edited 2016-06-05 01:36)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-28 23:27:31 | 0.017s | Q:23