Giter Site home page Giter Site logo

dragoncoder047 / phoo Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 1.33 MB

My (broken) first attempt at a Javascript concatenative programming language. DOES NOT WORK RIGHT NOW

License: GNU General Public License v3.0

JavaScript 83.64% Forth 13.63% HTML 1.16% CSS 1.57%
compiler concatenative-programming-language forth-like freeform interpreter rpn scripting-language stack stack-based

phoo's Introduction

  • I mostly use Javascript for web apps and Python for tools.
  • I picked up C++ and C via the use of Arduinos and have been self-taught otherwise.
  • I enjoy functional, homoiconic, and object-oriented langauges (especially Scheme) but have not had much experience using Scheme or Lisp. I'm trying to design one of my own but so far it's all just theoretical.
  • I have a blog that I occasionally write stuff on.
  • I am a member of the Conwaylife.com forums under the username wirehead.
  • I have a YouTube channel -- check that out when you get a chance.

Some of my projects

Noteworthy but incomplete/WIP stuff

  • Parasite - A game that can't be beaten by the player: you have to teach the NPC's how to play it for you.
  • PICKLE and Tinobsy - A new idea for a programming language, and a type system to implement it.
languages languages

Note: I excluded Javascript from the above language stats because its verbosity (curly braces, JSDoc comments, etc.) compared to other languages artificially inflates the amount of Javascript I seem to have written. Only about 60% of those lines are meaningful code.

phoo's People

Contributors

dragoncoder047 avatar github-actions[bot] avatar

Watchers

 avatar

phoo's Issues

Actually finish documentation comments & generator

  • Comments
  • Generator script

Doc comment format:

/* >>
word> WORD
description> DESCRIPTION
sed> A -- B
A> A DESCRIPTION
B> B DESCRIPTION
*/

outputs:

WORD (A โ†’ B)

DESCRIPTION

and hovering over name in sed in heading brings up their description

foo> are the tags (like JSDoc). maybe have implied tags and have it glean the name from the next line?

add libraries (inspired by Python)

  • collections.counter
  • itertools
  • stringtools
  • toml / yaml parsers
  • unit testing (in progress)
  • base64, base16
  • base32
  • colorsystems
  • functools lru_cache
  • hashlib (crypto.subtle)
  • uncompile
  • statistics
  • autoformatter
  • turtle graphics
  • more?

Importing JS files doesn't work

Bug Description

use X crashes when you import a module that is or depends on javascript modules

To Reproduce

Web console.

Welcome to Phoo.
Version 0.2.0 (e1e8d3e)
Strict mode is ON
Press Shift+Enter for multiple lines.
(0)--> use web/fetch
Stack: []
(1)--> use random
Error!
(No stack trace)
PhooError: Expected at least 1 items on stack, got 0
Stack: []
(2)--> 

web/fetch is OK because it is pure Phoo. random crashes because it depends on math which depends on _fmath and _imath which are JS.

Expected Output

Importing random succeeds.

Javascript Information

  • Browser version: Chrome 96.0.4664.207 64-bit
  • JS engine version: V8 9.6.180.33
  • Latest Phoo commit hash that has the bug: See banner in console output above.

`random.01` produces negative values

To Reproduce

Welcome to Phoo.
Version 0.2.0 (f343500)
Strict mode is ON
Press Shift+Enter for multiple lines.
(0)--> use random 89496 random.seed random.01 echo
-0.2356127928942442
Stack empty.
(1)-->

Expected Output

Not ever negative!

Strict mode is not obeyed

get:

Welcome to Phoo.
Strict mode is ON
(0)--> this_word_does_not_exist
Stack: [undefined]
(1)--> 

expected:

Welcome to Phoo.
Strict mode is ON
(0)--> this_word_does_not_exist
Error!
Word this_word_does_not_exist does not exist
{... 0}
(1)--> 

Macros defined in Phoo code don't work

I get:

Welcome to Phoo.
Version 0.2.0 (cfca97d)
Strict mode is ON
Press Shift+Enter for multiple lines.
(0)--> ' [ [ 1 2 + ] const ]
Stack: [[[1, 2, Symbol(+)]]]
(1)--> // drop
Stack: []
(2)-->

(0): const is not turning the [ 1 2 + ] into 3.

(1): the drop should be commented out but it isn't.

expected:

Welcome to Phoo.
Version 0.2.0 (cfca97d)
Strict mode is ON
Press Shift+Enter for multiple lines.
(0)--> ' [ [ 1 2 + ] const ]
Stack: [[3]]
(1)--> // drop
Stack: [[3]]
(2)-->

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.