I was following the Picotron manual example provided under sock:accept(), found here, and whenever I use it it will invariably start detecting hundreds of new clients in that port. I have tested it in a cartridge with a counter as well to confirm that it is, in fact, hundreds of clients (around 300-500 before stopping on its own in the "listening" stage). The problem isn't just tied to the port "8899" since using any other ports will yield the same results. When my partner tested it, this didn't happen.
Furthermore, whenever this happens, I am also unable to create a socket in a different terminal. Typing in a = socket("tcp://localhost:8899") will not do anything while the listener terminal is up. Typing it in a terminal without having opened a listener will freeze up Picotron for a few seconds. In both cases, doing ?a prints nothing and doing ?a != nil prints "false".
My antivirus (Bitdefender) doesn't detect it as a threat and I've added Picotron into the allowed firewall rules, so at this point I am at a loss.

I was reading the Pico 8 manual and I was surprised to see that the pack() and unpack() functions aren't in the manual. I understand that they are Lua functions and not necessarily a Pico 8 API thing but it still feels like they're important enough to add here, especially since they are a great alternative to use a for loop to manually unpack these elements. Just here to ask if they could be added so more people can be aware of them please !! Especially the small percentage of people who do want to download the manual (hi) haha

I would like to preface this is an issue in version 0.2.6b, both in my downloaded executable of Pico 8 and Pico 8 Education Edition
So I have been reading and re-reading the pico 8 manual for the past weeks now and I have noticed that there is a really big discrepancy in the way that sub() works vs how it is presented. The manual establishes that:
When POS1 is specified, but not a number, a single character at POS0 is returned. PRINT(SUB(S,5,TRUE)) --> "Q" |
This does not seem to be the case, however, as using non-numerical values such as a boolean, nil or a string all still will return a string from the index all the way to the end of the string. I tried looking information about this in the forums and it seems like at some point this behavior was indeed implemented, but in another update it seems to have been removed. I don't know if this was intentional or if this is the product of a bug/oversight but it would be nice if the change was reflected in the manual.

Small disclaimer: You are free to use these in your projects, free of charge !! Only thing I ask in return is attribution by crediting me somewhere in the project.
Here are two little code snippets to shift patterns!! The token cost is 55 tokens for the vertical shifting code and 76 tokens for the horizontal shifting code. These code snippets also account for additional settings on bits 0b0.111 of the pattern (to learn what the hell that is, check this part of the manual). I am choosing to leave the snippets as they are in the cartridge in here to people can see (and try to understand if they want to) what is going on under the hood without reading something that looks like a keysmash.






4 comments



