Code Monkey home page Code Monkey logo

tosh2's Introduction

This is a rewrite of Tosh, my text-based Scratch project editor.

This version is open-source, with a readable, modern codebase.

Dependencies

  • Project player thanks to Nathan's Phosphorus, as before
  • Uses Nearley for parsing. (Originally Tosh used a home-grown Earley parser for performance reasons; I've now rolled lots of perf improvements into Nearley :-))
  • Uses my optimised lexer Moo
  • Uses nearley-reverse for transforming Scratch AST into Tosh code (on load); this is the opposite of parsing, which happens on save/run
  • Uses Nathan's v2 for views, model, undo, menus, etc

Current status

  • Load/save seems to work

  • Importing / compiling scripts is there, but needs extensive testing & improvement

  • Measuring scripts is fully implemented & tested (so we can "clean up" when saving to sb2)

  • Playing projects seems to work

  • No sprite management

  • No costume management (nor am I particularly interested in adding this!)

  • Highlighting almost works

  • Completion is in-progress but goodness it's a difficult problem

Future plans:

  • A desktop version for Win/Mac based on my unreleased lightweight Electron clone

Running

git clone --recursive https://github.com/tjvr/tosh2
cd tosh2
echo ';window.P = P' >> phosphorus/phosphorus.js
yarn
yarn grammar && yarn test
yarn start

http://localhost:8080/app/

If someone wants to set up browserify/babelify for bundling, that would be excellent

tosh2's People

Contributors

bates64 avatar tjvr avatar towerofnix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tosh2's Issues

Tosh x Ryfelta Project

Tosh x Ryfelta Project

Dear Blob8108, as I don't have any other way of communicating w/ you, I will ask a question here.
Wanna help make this?

It's basically Tosh, but with block category sorted script lines and a much better graphical user interface.

Feel free to contact me on Discord (Speedblocks#0678) or Instagram (@SargentCoding)

Thanks,
Speedblocks

Synieq OS and Ryfelta (12)
Synieq OS and Ryfelta (13)
Synieq OS and Ryfelta (14)
Synieq OS and Ryfelta (15)

Hacked blocks

I use a lot of hacked blocks, such as set (varname) to 1, which sets a variable named the contents of varname to 1.

In tosh, these blocks are marked red, and I get

Error saving project: Couldn't compile project

when trying to save.

Can you add support for hacked blocks (i.e. putting something else where an item from a drop-down is expected)?

/app/JSZip.js does not exist

ReferenceError: JSZip is not defined

Thrown from tosh.bundle.js after a Webpack build. This is just a case of OS differences, I believe. I'm assuming that, @tjvr, you're on a Mac here: on Linux/Windows filenames are case sensitive, unlike on Macs!

The problem here is that /build/index.html has this line:

<script src=/app/JSZip.js></script>

Whereas the actual filename is jszip.js.

Support turbo mode

This requires someone to go hacking around with Phosphorus in player.js. Looks like it should be a pretty easy fix!

Add a paint editor

I would like a paint editor to be installed at tosh cause I like to make custom characters.

Proposal of specifications for mobile use

The online version of Tosh does'nt show a preview screen when used on devices such as smartphones. In the first place, it is nearly impossible to do text coating on mobile devices, and there may not be much demand for it. Therefore, we propose the following two options:

  • Eliminate mobile display Make each option visible by
  • When tap a menubar, show options

Thanks.

Missing dependencies: nathan/phosphorus, nathan/v2

I realize this project is no longer under active development, so I am not seeking resolution to this issue. However, these notes might help people trying to use this in the future.

It looks like @nathan has deleted or made private the repositories nathan/phosphorus and nathan/v2. I looked for source code for both of these, but could not find anything for the latter.

nathan/phosphorus (used as submodule)

nathan/v2 (imported as yarn dependency)

Fix the build

  • Is Webpack really that great anyway?

  • I had to do this locally, to get Phosphorus to play nicely with the tests:

    var P = window.P = (function() {

    We should probably send this patch upstream, or find a workaround that doesn't require doing this (global maybe?)

  • We should generally make sure the built output is ready for consumption. Are we building the CSS properly yet, for instance?

Tosh installation

First of all, thanks for sharing the code. Second, I translated the grammar.ne file and would love to test if the translation will work. How can I make the code run?

Is project dead?

So, this project has been a great one..
I see that it has a lot of potential..
But there hasn't been any activity for years now!
WHY?
Is the project dead?
If not dead, can @tjvr , could you please add support for scratch 3.0?
If not then, a windows executable? Please?

Phosphorus Replacement

Can I recommend that instead of using Phosphorus for Tosh 2 you should use Sulfurous? It's a clone of phosphorus but supports vectors and bug fixes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.