waforth icon indicating copy to clipboard operation
waforth copied to clipboard

Implement ANS Core Extension words

Open remko opened this issue 7 years ago • 5 comments

Implement the most interesting ANS Core Extension words

  • [x] .(
  • [x] .R
  • [x] 0<>
  • [x] 0>
  • [x] 2>R
  • [x] 2R>
  • [x] 2R@
  • [x] :NONAME
  • [x] <>
  • [x] ?DO
  • [x] ACTION-OF
  • [ ] AGAIN
  • [x] BUFFER:
  • [x] C"
  • [ ] CASE
  • [x] COMPILE,
  • [x] DEFER
  • [x] DEFER!
  • [x] DEFER@
  • [ ] ENDCASE
  • [ ] ENDOF
  • [x] ERASE
  • [x] FALSE
  • [x] HEX
  • [x] HOLDS
  • [x] IS
  • [x] MARKER
  • [x] NIP
  • [ ] OF
  • [x] PAD
  • [x] PARSE
  • [x] PARSE-NAME
  • [x] PICK
  • [x] REFILL
  • [x] RESTORE-INPUT
  • [x] ROLL
  • [x] S\"
  • [x] SAVE-INPUT
  • [x] SOURCE-ID
  • [x] TO
  • [x] TRUE
  • [x] TUCK
  • [ ] U.R
  • [x] U>
  • [x] UNUSED
  • [x] VALUE
  • [x] WITHIN
  • [x] \

remko avatar May 27 '18 11:05 remko

@remko

TIME&DATE could also be interesting (see https://forth-standard.org/standard/facility/TIMEandDATE) for example to make less predicable results.

The "Plant" in Thurtle always gives the same pattern.

farvardin avatar Feb 21 '24 09:02 farvardin

@farvardin That's a good one, but since this depends on the environment (and I want to keep the dependencies of the core minimal), I'm probably going to add it to the JavaScript wrapper, and provide an easy way to load these extensions from within JavaScript.

remko avatar Feb 22 '24 20:02 remko

@remko I don't really know how WA works, but I was thinking to use it with JS, since the browser has access to the system's clock :)

farvardin avatar Feb 22 '24 20:02 farvardin

@farvardin Not sure I want to add TIME&DATE anymore (i want to keep the system dependency as simple as possible, and computing time and date is not trivial), but for the purpose of bringing randomness into the system, I added a RANDOM word (and adapted the Plant example).

remko avatar Feb 23 '24 19:02 remko

@remko sure, random will probably be even more useful for most people, and given thurtle's goal!

farvardin avatar Feb 23 '24 22:02 farvardin