AminetAminet
Search:
85211 packages online
About
Recent
Browse
Search
Upload
Setup
Services

dev/lang/NodeAmiga.lha

Mirror:Random
Showing: m68k-amigaos iconppc-amigaos iconppc-morphos iconi386-aros iconi386-amithlon iconppc-warpup iconppc-powerup icongeneric iconother icon
No screenshot available
Short:JavaScript runtime (Node.js-like)
Author:Juen/Project R3D+Appendix+Nah-Kolor
Uploader:biuro cdlabel info (Pawel Nowak)
Type:dev/lang
Version:0.11.0
Architecture:m68k-amigaos >= 2.0.4
Date:2026-03-26
Requires:68000+, 1 MB RAM, bsdsocket.library (for networking)
Download:dev/lang/NodeAmiga.lha - View contents
Readme:dev/lang/NodeAmiga.readme
Downloads:68

A complete JavaScript engine and runtime environment for classic
Amiga computers. Built from scratch in C, targeting MC68000 and
AmigaOS 2.0+. Inspired by Node.js, adapted for the Amiga platform.

Features
--------

 * JavaScript engine (ES5.1 + ES6+ features)
   - Arrow functions, classes with inheritance, super(), static methods
   - Template literals, tagged templates
   - Destructuring, spread/rest, default parameters
   - for-of loops, regex literal syntax /pattern/flags
   - Optional chaining (?.), nullish coalescing (??)
   - let/const block scoping, numeric separators
   - async/await, Promises
   - Automatic Semicolon Insertion (ASI)
   - Closures, prototype chain

 * Built-in objects and functions
   - console (log, error, warn, dir, time/timeEnd, table)
   - Math (27 functions incl. cbrt/fround/clz32/imul)
   - JSON (with reviver/replacer)
   - Date (full API incl. UTC, getUTC*/setUTC*)
   - RegExp (lookahead, non-capturing groups, quantifiers,
     lazy quantifiers, named groups, flags g/i/m/s/u/y)
   - Buffer (hex/base64)
   - Promise (then/catch/finally/all/race/allSettled)
   - Map, Set, WeakMap, WeakSet, Symbol
   - setTimeout/setInterval/clearTimeout
   - crypto (MD5, SHA-256), structuredClone
   - TextEncoder, TextDecoder
   - process.stdout.write, process.stdin.read
   - process.hrtime, process.nextTick, queueMicrotask

 * String methods: 29+ (charAt, indexOf, slice, split,
   replace, replaceAll, trim, includes, startsWith,
   padStart, normalize, localeCompare, codePointAt, etc.)

 * Array methods: 33+ (push, pop, map, filter, reduce,
   reduceRight, sort, find, findLast, findLastIndex,
   forEach, every, some, splice, flat, flatMap, entries,
   keys, values, copyWithin, at, Array.from/of/isArray)

 * Object: keys, values, entries, assign, create, freeze,
   seal, is, fromEntries, defineProperty/ies, hasOwn,
   getPrototypeOf, setPrototypeOf, getOwnPropertyNames,
   getOwnPropertyDescriptor(s), preventExtensions,
   isExtensible, getters/setters

 * Number: isInteger, isFinite, isNaN, isSafeInteger,
   parseInt, parseFloat, toString(radix), toFixed,
   toExponential, toPrecision, constants (EPSILON,
   MAX_SAFE_INTEGER, MIN_SAFE_INTEGER, NaN, Infinity)

 * Global functions: encodeURIComponent, decodeURIComponent,
   encodeURI, decodeURI, parseInt, parseFloat, isNaN,
   isFinite, eval()

 * Symbol: Symbol(), Symbol.for/keyFor, well-known symbols,
   Symbol as property key, Iterator protocol (Symbol.iterator)

 * Amiga Intuition GUI bindings
   - Open windows with title, size, position
   - Graphics: lines, rectangles, circles, text, pixels
   - Mouse and keyboard event handling
   - System requesters (alert, confirm)
   - Screen information query

 * Node.js-compatible module system
   - require() with module caching
   - CommonJS exports (module.exports)
   - ES modules: import/export (default, named, namespace)
   - Native modules: fs, http, net, buffer, os,
     child_process, crypto, intuition, readline, dns
   - JS modules: path, events, url, querystring, util,
     stream, assert, repl, timers

 * File I/O (fs module)
   - readFileSync, writeFileSync, appendFileSync
   - existsSync, unlinkSync, renameSync, statSync
   - readdirSync, mkdirSync, rmdirSync, copyFileSync
   - Full AmigaOS path support (Volume:dir/file)

 * HTTP/HTTPS server and client
   - http.createServer() — non-blocking, 8 concurrent
   - http.get(), http.post(), http.request()
   - HTTPS via AmiSSL (build with -DENABLE_AMISSL)
   - Automatic redirect following (301/302/307)
   - 10-second socket timeout, dns.lookup()
   - Requires bsdsocket.library (e.g. Roadshow, Miami)

 * OS integration
   - process.platform ("amigaos"), process.arch ("m68k")
   - process.argv, process.env, process.cwd(), process.exit
   - os.cpus() (detects 68000/020/030/040/060)
   - os.freemem(), os.version() (Kickstart version)
   - child_process.execSync() via SystemTagList()

 * Interactive REPL with command history (arrow up/down)

 * Error types: Error, TypeError, RangeError, ReferenceError,
   SyntaxError, EvalError, URIError

 * Error messages with filename and line number

 * Compiler: bundle JS + interpreter into standalone executable
   - NodeAmiga -compile MyApp script.js
   - Automatic require() and import dependency resolution
   - All JS modules bundled into single executable
   - No NodeAmiga, no libs/ needed to run the output

Usage
-----

  NodeAmiga script.js              Execute a JavaScript file
  NodeAmiga -e "code"              Evaluate inline JavaScript
  NodeAmiga -compile out script    Compile JS to standalone executable
  NodeAmiga                        Start interactive REPL
  NodeAmiga -help                  Show help
  NodeAmiga -v                     Show version
  NodeAmiga --ast script.js        Print AST (debug)

Installation
------------

  1. Copy NodeAmiga to C: or any directory in your path
  2. Copy the libs/ directory to PROGDIR: (same directory
     as NodeAmiga), or to LIBS:node/
  3. Optional: copy examples/ for demo scripts

Quick test:

  NodeAmiga -e "console.log('Hello Amiga!')"
  NodeAmiga examples/hello.js
  NodeAmiga examples/gui_hello.js
  NodeAmiga examples/fibonacci.js

Compile to standalone exe:

  NodeAmiga -compile Hello examples/hello.js
  Hello
  ; Runs without NodeAmiga or libs/ !

System Requirements
-------------------

  * MC68000 or higher CPU
  * AmigaOS 2.04 (Kickstart 37) or higher
  * Minimum 1 MB RAM (2+ MB recommended for scripts)
  * bsdsocket.library for networking features
    (Roadshow, Miami, AmiTCP, or similar)
  * No FPU required (software floating-point)

Technical Details
-----------------

  * Engine: custom-built lexer, recursive descent parser
    with Pratt precedence climbing, tree-walking interpreter
  * Memory: reference counting (no GC pauses), arena
    allocator for AST, integer cache 0-255
  * Stack: auto-allocates 64 KB via StackSwap

Included Examples
-----------------

  hello.js        Platform info and greeting
  fibonacci.js    Recursive/iterative/memoized benchmark
  file_io.js      File read/write/append operations
  http_server.js  HTTP server with routing
  http_client.js  HTTP GET and POST requests
  classes.js      ES6 classes with inheritance
  closures.js     Closures, IIFE, module pattern
  array_fun.js    map/filter/reduce/sort with real data
  regex.js        RegExp /literal/ syntax and methods
  events.js       EventEmitter custom events
  promises.js     Promise chains, all, race
  timers.js       setTimeout and setInterval
  buffer.js       Binary data manipulation
  streams.js      Readable/Writable/Transform streams
  sysinfo.js      Full system information display
  todo_app.js     TODO app with file persistence
  mini_grep.js    Pattern search in files
  url_parser.js   URL and query string parsing
  calculator.js   Recursive descent expression parser
  json_db.js      JSON file-based database
  myip.js         Fetch public IP from internet
  nettime.js      Internet time via HTTP API
  weather.js      Weather info for a city
  download.js     Download file and save to disk
  gui_hello.js    Simplest Intuition window from JS
  gui_demo.js     Interactive drawing with mouse events

Known Limitations
-----------------

  * No Proxy, generators/yield
  * await is synchronous (spin-waits on event loop)

Version History
---------------

  0.11.0 (2026-03-26) 
    - NEW: fs.readdirSync, mkdirSync, rmdirSync, copyFileSync
    - NEW: Array: reduceRight, entries, keys, values,
      findLast, findLastIndex, copyWithin
    - NEW: Object: getOwnPropertyNames, hasOwn, getPrototypeOf,
      getOwnPropertyDescriptor(s), setPrototypeOf,
      preventExtensions, isExtensible, isPrototypeOf,
      propertyIsEnumerable
    - NEW: Number.prototype.toExponential, toPrecision
    - NEW: Math: cbrt, fround, clz32, imul + constants
    - NEW: String: codePointAt, fromCodePoint, localeCompare,
      normalize, raw, replace with callback
    - NEW: encodeURI/decodeURI, encodeURIComponent/decodeURIComponent
    - NEW: console.dir (JSON-formatted output)
    - NEW: ES modules (import/export) with default, named, namespace
    - NEW: RegExp: {n}/{n,}/{n,m} quantifiers, lazy (*?/+?/??),
      non-capturing groups (?:), lookahead (?=)/(?!),
      named groups (?<name>), flags s/u/y
    - NEW: Symbol as property key, Iterator protocol
    - NEW: eval() global function
    - NEW: EvalError, URIError error types
    - NEW: Date.UTC(), getUTC*/setUTC* (15 methods)
    - NEW: Class static methods
    - NEW: Destructuring assignment without var/let/const
    - NEW: Compiler (-compile) — bundle JS into standalone executable
    - FIX: Function.prototype.bind() partial application
    - FIX: ES module export function declarations
    - FIX: instanceof Error for all Error subtypes
    - Tests: 960+ assertions covering all features
    - FIX: String.fromCharCode, Number.isInteger/isFinite/
      isNaN/isSafeInteger now work correctly
    - FIX: Number.prototype.toString(radix) for hex/bin/oct
    - FIX: querystring.unescape percent decoding
    - Removed 68040/68060 builds (focus on 68000/68020)
    - HTTPS support via AmiSSL
    - Interactive REPL with readline and history
    - Buffer hex/base64 encoding
    - Tagged template literals
    - Promise chain fixes
	

Credits
-------

  Juen/Project R3D+Appendix+Nah-Kolor


Contents of dev/lang/NodeAmiga.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[Amiga]                   1096    3034  36.1% -lh5- 3766 Mar 26 10:14 NodeAmiga/examples/array_fun.js
[Amiga]                   1182    3150  37.5% -lh5- 1a8b Mar 26 10:14 NodeAmiga/examples/buffer.js
[Amiga]                   1431    5426  26.4% -lh5- c117 Mar 26 10:14 NodeAmiga/examples/calculator.js
[Amiga]                    982    2821  34.8% -lh5- f646 Mar 26 10:14 NodeAmiga/examples/classes.js
[Amiga]                   1139    3231  35.3% -lh5- 4786 Mar 26 10:14 NodeAmiga/examples/closures.js
[Amiga]                    516    1194  43.2% -lh5- 4ea6 Mar 26 10:14 NodeAmiga/examples/download.js
[Amiga]                   1070    3068  34.9% -lh5- c202 Mar 26 10:14 NodeAmiga/examples/events.js
[Amiga]                    734    1951  37.6% -lh5- 1b80 Mar 26 10:14 NodeAmiga/examples/fibonacci.js
[Amiga]                   1014    2567  39.5% -lh5- 8170 Mar 26 10:14 NodeAmiga/examples/file_io.js
[Amiga]                    833    2193  38.0% -lh5- b184 Mar 26 10:14 NodeAmiga/examples/gui_demo.js
[Amiga]                    398     702  56.7% -lh5- 1454 Mar 26 10:14 NodeAmiga/examples/gui_hello.js
[Amiga]                    598    1415  42.3% -lh5- ff7f Mar 26 10:14 NodeAmiga/examples/hello.js
[Amiga]                    763    2145  35.6% -lh5- 6c82 Mar 26 10:14 NodeAmiga/examples/http_client.js
[Amiga]                   1077    2894  37.2% -lh5- f64d Mar 26 10:14 NodeAmiga/examples/http_server.js
[Amiga]                   1516    4783  31.7% -lh5- c8a7 Mar 26 10:14 NodeAmiga/examples/json_db.js
[Amiga]                   1269    3404  37.3% -lh5- dc7b Mar 26 10:14 NodeAmiga/examples/mini_grep.js
[Amiga]                    609    1346  45.2% -lh5- 0db5 Mar 26 10:14 NodeAmiga/examples/myip.js
[Amiga]                    829    1960  42.3% -lh5- ec37 Mar 26 10:14 NodeAmiga/examples/nettime.js
[Amiga]                   1105    3330  33.2% -lh5- 5242 Mar 26 10:14 NodeAmiga/examples/promises.js
[Amiga]                   1341    3300  40.6% -lh5- de0d Mar 26 10:14 NodeAmiga/examples/regex.js
[Amiga]                    949    3002  31.6% -lh5- 0cd7 Mar 26 10:14 NodeAmiga/examples/streams.js
[Amiga]                   1034    2982  34.7% -lh5- fe72 Mar 26 10:14 NodeAmiga/examples/sysinfo.js
[Amiga]                    832    2523  33.0% -lh5- 802b Mar 26 10:14 NodeAmiga/examples/timers.js
[Amiga]                   1078    2952  36.5% -lh5- 1bc1 Mar 26 10:14 NodeAmiga/examples/todo_app.js
[Amiga]                   1239    3162  39.2% -lh5- 3470 Mar 26 10:14 NodeAmiga/examples/url_parser.js
[Amiga]                    686    1596  43.0% -lh5- da4d Mar 26 10:14 NodeAmiga/examples/weather.js
[Amiga]                    349    1675  20.8% -lh5- 3360 Mar 26 10:14 NodeAmiga/libs/assert.js
[Amiga]                    862    3445  25.0% -lh5- a260 Mar 26 10:14 NodeAmiga/libs/events.js
[Amiga]                    719    2263  31.8% -lh5- ab6b Mar 26 10:14 NodeAmiga/libs/path.js
[Amiga]                   1137    3669  31.0% -lh5- a120 Mar 26 10:14 NodeAmiga/libs/querystring.js
[Amiga]                    879    2569  34.2% -lh5- 7444 Mar 26 10:14 NodeAmiga/libs/repl.js
[Amiga]                   1319    6375  20.7% -lh5- b0b0 Mar 26 10:14 NodeAmiga/libs/stream.js
[Amiga]                   1779    6756  26.3% -lh5- e2cc Mar 26 10:14 NodeAmiga/libs/url.js
[Amiga]                   1940    7973  24.3% -lh5- e1c2 Mar 26 10:14 NodeAmiga/libs/util.js
[Amiga]                 116644  227992  51.2% -lh5- 630f Mar 26 10:14 NodeAmiga/NodeAmiga
[Amiga]                   4259    9644  44.2% -lh5- 757d Mar 26 10:38 NodeAmiga/NodeAmiga.readme
[Amiga]                 116117  225628  51.5% -lh5- 0d39 Mar 26 10:14 NodeAmiga/NodeAmiga_020
[Amiga]                   1721    5317  32.4% -lh5- 3eda Mar 26 10:14 NodeAmiga/test/benchmark.js
[Amiga]                  25542  100478  25.4% -lh5- c731 Mar 26 10:14 NodeAmiga/test/test.js
[Amiga]                    695    2465  28.2% -lh5- 2ff3 Mar 26 10:14 NodeAmiga/test/test_async.js
[Amiga]                    385     862  44.7% -lh5- 53d8 Mar 26 10:14 NodeAmiga/test/test_esm.js
[Amiga]                    152     246  61.8% -lh5- 6841 Mar 26 10:14 NodeAmiga/test/test_esm_lib.js
[Amiga]                    147     225  65.3% -lh5- de8e Mar 26 10:14 NodeAmiga/test/test_module.js
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total        43 files  299966  677713  44.3%            Mar 26 10:42
Page generated in 0.03 seconds
Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>