Log In  

Cart #picotron_wiki-11 | 2024-04-17 | Embed ▽ | No License

The Picotron Wiki

This is a viewer for the online Picotron wiki

If you'd like to contribute to the Wiki please make a pull request on the GitHub. The interface and capabilities will be updating soon!
(Just wanted to get this cart out today)

Here's a guide on how to contribute: https://www.youtube.com/watch?v=_8zS45cHeRA

Warning: This cartridge may not work in the web player

You can run load #picotron_wiki to use it inside Picotron

P#143916 2024-03-20 01:32 ( Edited 2024-05-27 21:04)


This is really cool. I love the idea of a built-in wiki access. I look forward to this being a bit more fleshed out on the content side. If I can find the time I might come see if I can contribute to doing that, I'm currently pulling apart the create_diff/apply_diff functions we're given and will probably want to put my findings somewhere others can access. This utility could definitely use a search field too once the articles start pouring in :)

-- the typical lua "1 and true or 0" doesn't seem
-- to be working, if it is and I'm being [rightfully confused by weird syntax that isn't the common C ? T : F]
-- please let me know

it seems to be working for me, but the operand order matters a lot: it's (condition) and (true value) or (false value), not (true value) and (condition) or (false value) as you have written in that comment. i am always a little paranoid of operator precedence breaking my ternaries and math so i tend to over-parenthesize. both of these work as expected and can be tested on the terminal:

> print(true and "a" or "b")
> print(false and "b" or "a")

this works for simple conditions and values. if they get complex (inline comparisons as a condition, or expression values, etc) i tend towards suggesting:

> print((1 == 1) and ("result ".."GOOD") or ("RESULT ".."bad"))
result GOOD
> print((1 == 2) and ("makes ".."NO SENSE") or ("TOTALLY ".."makes sense"))
TOTALLY makes sense
P#144161 2024-03-22 20:28

I appreciate it, I didn't realize I just had it backwards the whole time

EDIT: Turns out I had gotten it mixed up because I have been doing lots of development in Godot recently.

P#144174 2024-03-22 23:11 ( Edited 2024-03-23 17:23)

runtime error on web version

P#144183 2024-03-23 01:02

This is because the web player doesn't currently support using the include() method properly, since the wiki is split off into a few separate files it won't work on the web.

P#144184 2024-03-23 01:06 ( Edited 2024-03-24 16:18)

Here's a tidbit of info to add to the wiki:

Returns information about the mouse.
pos_x, pos_y, button, scroll_h, scroll_v = mouse()
button == 1 -> left button
button == 2 -> right button
button == 4 -> scroll wheel button

P#144484 2024-03-26 01:12

You're welcome to make a pull request on the Github to add this, I'm focusing my efforts on improving the page editor. Speaking of which this is out now, so you can easily create and edit pages within the Wiki app (although you will need to make a request on Github for changes or pages to be added)

P#144487 2024-03-26 01:49 ( Edited 2024-03-26 01:50)

pressing the getting start button make it crash, giving errors on json.lua:377 in field 'decode'
and main.lua:102 in function 'refresh'

P#144544 2024-03-26 15:57

This cartridge does not work in the web player.

P#144548 2024-03-26 16:14 ( Edited 2024-03-31 15:31)

This is so nice! The web version is erroring on me, but the cartridge loads just fine

P#145245 2024-03-31 14:23

We'd like to start a page for the audio workspaces, but we can't figure out how to build a new page to be able to submit a pull request, or even how to see changes we make locally. Is there any kind of step-by-step guide on how this works?

P#146013 2024-04-08 01:13

No, there isn't a guide but I can make one real quick

P#146046 2024-04-08 13:01

That would be super helpful, thank you!

P#146052 2024-04-08 13:36

Alright, here's the video I made https://youtu.be/_8zS45cHeRA

I'm a bit sick so my voice is a little off, and my headphones died at the very end so it ends pretty abruptly.

P#146053 2024-04-08 13:42

Okay, here's our understanding:

  1. Download wiki cart (load #picotron_wiki)
  2. Click the pencil button on a page to open the page editor. You will see the list of elements on the current page - POD images, various formats of text, wiki reference links, etc. - and a "New Element" button. Each element can be edited, moved up or down, or removed with buttons on its line. In the left column are four buttons - a diskette icon (save page to a JSON file inside the wiki app), a folder symbol (which shows the folder where your files are saved), a pair of parentheses (for page metadata), and an eye symbol (show changes).
  3. There is currently no make-a-page-from-scratch control; the workaround is to go to an existing page, hit the Edit button, and delete everything. Remember to update the metadata as well.
  4. Add elements. Save periodically - the name of the save file is based on the page title you wrote in the metadata.
  5. To open a JSON file in the wiki editor, drag the file from the folder onto the wiki window.

The available elements are:

  • Label: standard body text.
  • Note: A text aside - currently displays in a blue box.
  • Warning: Another type of text aside - currently displays in an orange box.
  • Code snippet: a chunk of text with syntax highlighting.
  • Demo: ditto, but with a button to run it (this permits interactive examples, but keep them short).
  • Embedded Pod Image: An image, copy-pasted from the sprite editor. (The window width is 240 pixels, if you're wanting to make some full-width images.)
  • Wiki page reference: A link to a page in the live wiki (warning: don't move to other pages if you haven't saved!)
  • Directory reference: A link to a local directory (please make sure you link to one that you know exists...)

You can also edit the file with an external text editor or non-default Picotron text editor like SLATE - it's not very readable, but this can e.g. let you work around bugs.

To contribute to the wiki on Github, either:

  • move a copy of your page out of the app to a directory your host system can access (e.g. your Picotron desktop) and then delete Picotron's file metadata pod line from the top of the file, or
  • open the file in a non-default Picotron text editor like SLATE, copy the JSON contents, and paste it into an external text editor (which could even be the Github web UI text editor).

...and then go through the standard process to commit changes to the Git repository, which you're gonna have to look at another tutorial for instructions on.

P#146067 2024-04-08 14:46

Precisely, also I've fixed the image pasting so it works in the latest wiki app version.

P#146069 2024-04-08 14:50

Cool! We'll get started on a rudimentary version of the audio workspace guide.

P#146070 2024-04-08 14:59

Fixed one line so it works on the latest version

P#146804 2024-04-17 00:05
--[[Hello picotron, I do not have an app on my computer, but i now use it on web player, In the future, Splore OS is supported, When do you expect? Roblox? Youtube? Antimatter Dimensions? Spotify? or Redstar OS?

That is what you know for... You may expect something...]]
P#150862 2024-07-05 02:15

[Please log in to post a comment]