[HN Gopher] Pg-Basic
       ___________________________________________________________________
        
       Pg-Basic
        
       Author : sillysaurusx
       Score  : 57 points
       Date   : 2020-05-02 14:41 UTC (8 hours ago)
        
 (HTM) web link (repl.it)
 (TXT) w3m dump (repl.it)
        
       | jshaqaw wrote:
       | Very cool. For all it's age and warts there is nothing like Basic
       | for a kid to start textual coding.
        
       | amasad wrote:
       | Cool see this here! But let me provide some context: This is a
       | program PG wrote with his kid. He asked me to build into Repl.it
       | a classic Basic implementation and make it really easy to do
       | graphics programming. So I wrote an interpreter and called it pg-
       | basic
       | 
       | Try it here: https://repl.it/l/basic
       | 
       | Docs: https://docs.repl.it/misc/basic
       | 
       | Interpreter source code: https://repl.it/@amasad/pg-basic
       | 
       | PG's tweet: https://twitter.com/paulg/status/1256526589300441093
       | 
       | However, we realized that we can do a much better job on syntax
       | and other features. So in collaboration with PG, we're evolving
       | the language to make it more expressive and cleaner without
       | losing the magic that makes Basic a great introductory
       | programming language.
        
         | marcell wrote:
         | Thanks for making this, I'll try it out.
         | 
         | I've been trying to do Pyxel (via repl.it) with my kids. They
         | really like coding that draws things, and I really appreciate
         | how easy it is to get started. Downside is that some of the
         | syntax is a bit confusing. Kids have a hard time with
         | whitespace for indent, and the Pyxel draw loop is not really
         | intuitive for them. I'll try out this Basic interpreter to see
         | if it's a bit better for them.
        
           | amasad wrote:
           | Yes try Basic. But even if you want to use Python, I would
           | started with our Python Turtle environment which would be a
           | lot less confusing than Pyxel: http://repl.it/l/python_turtle
        
         | parhamn wrote:
         | Thats awesome! Have you ever written a blog post or anything
         | about the how repl.it works? Its not typically a JS
         | reimplementation right? I always assumed a container/nsjail.
        
           | amasad wrote:
           | Yes so regardless of what language or where the language
           | runs, we give you a container, inside that container we drop
           | in a server that's responsible for most of the functionality
           | including editing, collaboration, hosting, etc. A little
           | about that here: https://blog.repl.it/collab
           | 
           | The IDE is built on top of a window-tiling manager
           | abstraction we built in React.js: https://blog.repl.it/ide
           | 
           | Now, as for languages, most of them do run inside the
           | container, which is built from our base image polygott
           | (https://github.com/replit/polygott). However, a select-few
           | are better suited to run on the client. We have a client-side
           | jail called: replbox (https://github.com/replit/replbox).
           | Basic, for example, runs on replbox because I wanted to
           | graphics to be instant. For something like PyGame or LOVE
           | frameworks we had to go with VNC streaming but that's not
           | ideal for obvious network reasons.
           | 
           | There is a lot more to it -- it sometimes feels like building
           | an entire city -- and you can find some more posts on our
           | blog: https://blog.repl.it/ (which incidentally is hosted on
           | Repl.it).
        
         | qnsi wrote:
         | pg and amasad colab is like a childhood dream of seeing Batman
         | and Robin
        
           | amasad wrote:
           | Ha!
        
       | harel wrote:
       | This is actually a little bit emotional to see line numbers,
       | gosubs and gotos. Throws me back to wee old me in the 80s,
       | hacking along on my VIC 20 before I even had a grasp of English.
        
       | jedberg wrote:
       | When I was a kid, I thought one of the coolest things in the
       | world was that when I turned the PC on, it dropped into a
       | programming environment if you didn't put a disk in the A: drive.
       | 
       | I felt like my kids would miss out on this experience of random
       | programming.
       | 
       | repl.it is a nice substitute though. Maybe I'll just pull out an
       | old computer and force it to boot into repl.it...
        
         | amasad wrote:
         | Fun idea! Two years ago on HN I said something similar: "We
         | think repl.it is the C64 of the cloud era"
         | 
         | https://news.ycombinator.com/item?id=18279085"
        
       | beagle3 wrote:
       | This is awesome and cool. Related (from 20 days ago):
       | https://news.ycombinator.com/item?id=22841336 - a similar setup,
       | not inside repl.it
        
         | amasad wrote:
         | I just made line numbers optional and it kinda starts looking
         | like EasyLang. I think they also started from Basic.
        
       | canada_dry wrote:
       | +1 Kudos for providing the repl.it tool.
       | 
       | The classroom/assignment feature [i] is absolutely brilliant!
       | Also, now might be a great time to do another [ii] hackathon.
       | 
       | [i] https://docs.repl.it/classrooms/intro
       | 
       | [ii]
       | https://repl.it/talk/announcements/Massively_Multiplayer_Hac...
        
       | capocannoniere wrote:
       | PG tweet for context:
       | https://twitter.com/paulg/status/1256526589300441093
       | 
       | > I wrote this yesterday as an example for my kids.
       | 
       | > A lot of people learned how to make web pages using
       | view->source. Replit is view->source for code, plus a server you
       | can run a copy on. A generation of kids will learn to program
       | from it.
        
         | capocannoniere wrote:
         | Replit sounds awesome, especially once you put it this way
         | ("view-> source for code, plus a server"). Kudos to the team.
        
       ___________________________________________________________________
       (page generated 2020-05-02 23:00 UTC)