Log In  

I seem to recall that you said you might break some elements of backwards-compatibility in 0.2. If so, I have a request. I'm not sure it'd even break anything, to be honest.

Current PICO-8 executables allow the use of // instead of -- for comments. This has the unfortunate side effect of preventing us from using lua's // operator, which is the 'idiv' operator, e.g. a//b == flr(a/b).

I have never seen anyone upload code that uses "//" comments, so I think it might not even break anything. You'd probably know better, since you presumably have all of the uploaded carts in some kind of database. If nothing else, maybe you could disable it based on the version number you added to files recently?

It'd just be nice sometimes to use that operator, and if it's already supported but masked by the alternate comment form, I'd hope it wouldn't be a big chore to unmask it.


P#50570 2018-03-18 16:21 ( Edited 2018-03-21 12:48)

:: Felice

Actually, as an aside, I'd also like to request access to lua's built-in unpack().

It feels weird having lua and the ability to turn a tuple into a table, but not having unpack() to turn a table back into a tuple for passing to functions. That's really useful in drawing code.

Maybe cost 1 or 2 cycles per table element converted to tuple element? I dunno, something like that.

Whatever the assigned cost would be, it's gotta be better than the cost incurred by writing unpack() in Lua, which is both slow and requires some ugly recursion.

P#50571 2018-03-18 16:33 ( Edited 2018-03-18 20:34)

Short term shopping list:

  • wave support: a good number of old arcade cabinet/console had some level of waveform support. Some sounds are currently impossible to do (like voice or good explosion)

Long term:

  • a limited set of code that could run at "assembly" speed (a la Gameboy Advance): as of now, you cannot code, say, a line drawing code that could compete w/ native function.
  • modem support: network supports can only be shipped with the cartrige within a web page. Why not allow communication with a central server (an api gateway) that would forward requests to a url provided during cart upload? I can even think of a monetization scheme here (eg money for you ;)
P#50588 2018-03-19 03:07 ( Edited 2018-03-20 20:02)

"ctrl-f should remember last typed search (or introduce a ctrl-n)."

On Mac at least, cmd-g repeats the last search. Maybe ctrl-g does what you're asking for?

P#50591 2018-03-19 03:34 ( Edited 2018-03-19 07:34)

Thanks - silly me on ctrl+g, did not check the manual :/

P#50592 2018-03-19 08:41 ( Edited 2018-03-19 12:41)
:: Stompy

I use a recreated unpack on almost every project. I would sure love that

P#50650 2018-03-21 00:49 ( Edited 2018-03-21 04:49)
:: Stompy

What version of lua has //? I get:

>> =8//3
stdin:1: unexpected symbol near '/'
P#50651 2018-03-21 00:54 ( Edited 2018-03-21 04:57)
:: Felice

I've got 5.3.4 installed and it works for me:

Lua 5.3.4  Copyright (C) 1994-2017 Lua.org, PUC-Rio
> print(49/6)
> print(49//6)

I guess that means it might not even be in the older version (5.2?) zep used for PICO-8. Hrm. :/

P#50652 2018-03-21 01:18 ( Edited 2018-03-21 05:19)
:: Stompy

Looks like it was new to 5.3

P#50655 2018-03-21 06:34 ( Edited 2018-03-21 10:34)
:: enargy

I use // for comments...

But this would be a useful feature, so I wouldn't mind switching to just -- and --[[]].

P#50660 2018-03-21 08:48 ( Edited 2018-03-21 12:48)

[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2020-06-06 05:52 | 0.016s | 2097k | Q:30