Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
#######
#
# E-scripts on JavaScript.
#
# Note 1: use the eev command (defined in eev.el) and the
# ee alias (in my .zshrc) to execute parts of this file.
# Executing this file as a whole makes no sense.
# An introduction to eev can be found here:
#
#   (find-eev-quick-intro)
#   http://angg.twu.net/eev-intros/find-eev-quick-intro.html
#
# Note 2: be VERY careful and make sure you understand what
# you're doing.
#
# Note 3: If you use a shell other than zsh things like |&
# and the for loops may not work.
#
# Note 4: I always run as root.
#
# Note 5: some parts are too old and don't work anymore. Some
# never worked.
#
# Note 6: the definitions for the find-xxxfile commands are on my
# .emacs.
#
# Note 7: if you see a strange command check my .zshrc -- it may
# be defined there as a function or an alias.
#
# Note 8: the sections without dates are always older than the
# sections with dates.
#
# This file is at <http://angg.twu.net/e/js.e>
#           or at <http://angg.twu.net/e/js.e.html>.
#        See also <http://angg.twu.net/emacs.html>,
#                 <http://angg.twu.net/.emacs[.html]>,
#                 <http://angg.twu.net/.zshrc[.html]>,
#                 <http://angg.twu.net/escripts.html>,
#             and <http://angg.twu.net/>.
#
#######




# «.eloquent-js»		(to "eloquent-js")
# «.nodejs-docs»		(to "nodejs-docs")
# «.nodejs-from-git»		(to "nodejs-from-git")
# «.nodejs-bullseye»		(to "nodejs-bullseye")
# «.node-canvas»		(to "node-canvas")
# «.node_modules»		(to "node_modules")
# «.elk»			(to "elk")
# «.quickjs»			(to "quickjs")
# «.D3.js»			(to "D3.js")
# «.indium»			(to "indium")
# «.lsystem»			(to "lsystem")
# «.svelte»			(to "svelte")
# «.plotly»			(to "plotly")
# «.skewer-mode»		(to "skewer-mode")
# «.three.js»			(to "three.js")
# «.planes-in-3D-space»		(to "planes-in-3D-space")
# «.TAG»			(to "TAG")
# «.syntree»			(to "syntree")
# «.mdn-content»		(to "mdn-content")




#####
#
# eloquent-js
# 2024feb22
#
#####

# «eloquent-js»  (to ".eloquent-js")
# (find-fline "~/LOGS/2024feb22/javascript2" "Eloquent JavaScript")

;; <eloquentjs>
;; https://eloquentjavascript.net/
;; https://eloquentjavascript.net/Eloquent_JavaScript.pdf
(code-pdf-page "eloquentjs" "$S/https/eloquentjavascript.net/Eloquent_JavaScript.pdf")
(code-pdf-text "eloquentjs" "$S/https/eloquentjavascript.net/Eloquent_JavaScript.pdf" 12)
;; (find-eloquentjspage)
;; (find-eloquentjstext)
;; (find-eloquentjspage 4 "Contents")
;; (find-eloquentjstext 4 "Contents")
;; (find-eloquentjspage (+ 12 410) "Index")
;; (find-eloquentjstext (+ 12 410) "Index")
;; (find-eloquentjspage (+ 12 430) "require function, 171, 172, 179, 352," "354, 363, 374")
;; (find-eloquentjstext (+ 12 430) "require function, 171, 172, 179, 352," "354, 363, 374")


require:
;; (find-eloquentjspage (+ 12 171) "")
;; (find-eloquentjstext (+ 12 171) "")
;; (find-eloquentjspage (+ 12 172) "")
;; (find-eloquentjstext (+ 12 172) "")
;; (find-eloquentjspage (+ 12 179) "")
;; (find-eloquentjstext (+ 12 179) "")
;; (find-eloquentjspage (+ 12 352) "")
;; (find-eloquentjstext (+ 12 352) "")
;; (find-eloquentjspage (+ 12 354) "")
;; (find-eloquentjstext (+ 12 354) "")
;; (find-eloquentjspage (+ 12 363) "")
;; (find-eloquentjstext (+ 12 363) "")
;; (find-eloquentjspage (+ 12 374) "")
;; (find-eloquentjstext (+ 12 374) "")


;; (find-eloquentjstext (+ 12 430) "require function, 171, 172, 179, 352," "354, 363, 374")





#####
#
# nodejs-docs
# 2024feb22
#
#####

# «nodejs-docs»  (to ".nodejs-docs")
# (find-angg ".emacs" "ee-rstdoc-:nodejs")

# (find-status   "nodejs-doc")
# (find-vldifile "nodejs-doc.list")
# (find-udfile   "nodejs-doc/")
# file:///usr/share/doc/nodejs/api/index.html
# (find-nodejsdoc)
# (find-nodejsdoc "fs#fspromisesaccesspath-mode")
# (find-nodejsdoc "modules#requireid")
# (find-nodejsdoc "modules#modules_require_id")



#####
#
# nodejs-from-git
# 2024feb22
#
#####

# «nodejs-from-git»  (to ".nodejs-from-git")
# (find-git-links "https://github.com/nodejs/node" "nodejssrc")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# rm -Rfv ~/bigsrc/node/
cd      ~/bigsrc/
git clone https://github.com/nodejs/node
cd      ~/bigsrc/node/

# (find-fline "~/bigsrc/")
# (find-fline "~/bigsrc/node/")
# (find-gitk  "~/bigsrc/node/")

# (code-c-d "nodejssrc" "~/bigsrc/node/")
# (find-nodejssrcfile "")
# (find-nodejssrcsh "find * | sort")
# (find-nodejssrcsh "cat .files | grep '\\.c'$")
# (find-nodejssrcsh "cat .files | grep '\\.cpp'$")

cd ~/bigsrc/node/
find * | sort > .files
find * | sort | grep '\.c$'   > .files.c
find * | sort | grep '\.cpp$' > .files.cpp
find * | sort | grep require | grep js | tee .files.requirejs

# (find-nodejssrcgrep "grep --color=auto -nH --null -e 'const require' $(cat .files.requirejs)")
# (find-nodejssrcfile "test/es-module/test-esm-require-cache.mjs")
# (find-nodejssrcfile "lib/internal/modules/helpers.js")
# (find-nodejssrcfile "lib/internal/modules/helpers.js" "function makeRequireFunction")
# (find-fline "~/LOGS/2024feb22/javascript2" "modules/helpers.js")




#####
#
# nodejs-bullseye
# 2021sep07
#
#####

# «nodejs-bullseye»  (to ".nodejs-bullseye")
# https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-debian-10
# https://linuxize.com/post/how-to-install-node-js-on-debian-10/
# (find-sh "apt-cache search 'node-js*' | sort")
# (find-sh "apt-cache search 'nodejs*'  | sort")
# (find-sh "apt-cache search 'node*'    | sort")
# (find-sh "apt-cache search 'npm*'     | sort")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
apti nodejs nodejs-doc npm

# (find-status   "nodejs")
# (find-vldifile "nodejs.list")
# (find-udfile   "nodejs/")
# (find-status   "nodejs-doc")
# (find-vldifile "nodejs-doc.list")
# (find-udfile   "nodejs-doc/")

npm install canvas

# (find-man "1 node")
# (find-man "1 nodejs")
# (find-angg "JS/test1.js")




#####
#
# node-canvas
# 2021sep07
#
#####

# «node-canvas»  (to ".node-canvas")
# (find-angg "JS/canvas1.js")

# https://sebhastian.com/node-canvas/
# https://github.com/Automattic/node-canvas
# (find-git-links "https://github.com/Automattic/node-canvas" "nodecanvas")
# (code-c-d "nodecanvas" "~/usrc/node-canvas/")
# (find-nodecanvasfile "")
# (find-nodecanvasfile "examples/images/")
# (find-fline "~/usrc/node-canvas/examples/images/")

cp -v ~/usrc/node-canvas/examples/images/lime-cat.jpg ~/JS/examples/images/
# (find-fline "~/JS/canvas1.js")





#####
#
# The node_modules directory
# 2021sep08
#
#####

# «node_modules»  (to ".node_modules")
# (find-fline "~/JS/node_modules/")
# (find-fline "~/JS/node_modules/" "is-fullwidth-code-point")

node-string-width: /usr/share/nodejs/string-width/node_modules/is-fullwidth-code-point/index.d.ts
node-string-width: /usr/share/nodejs/string-width/node_modules/is-fullwidth-code-point/index.js
node-string-width: /usr/share/nodejs/string-width/node_modules/is-fullwidth-code-point/package.json
npm: /usr/share/nodejs/npm/node_modules/is-fullwidth-code-point/index.js
npm: /usr/share/nodejs/npm/node_modules/is-fullwidth-code-point/package.json




#####
#
# Elk: a tiny JS engine for embedded systems
# 2021sep24
#
#####

# «elk»  (to ".elk")
# https://news.ycombinator.com/item?id=28614092 Elk: A low footprint JavaScript engine for embedded systems (github.com/cesanta)
# https://github.com/cesanta/elk
# https://github.com/cesanta/elk/blob/master/elk.c



#####
#
# Fabrice Bellard's QuickJS Javascript Engine
# 2021sep24
#
#####

# «quickjs»  (to ".quickjs")
# https://bellard.org/quickjs/
# https://github.com/bellard/quickjs
# (find-git-links "https://github.com/bellard/quickjs" "quickjs")
# (code-c-d "quickjs" "~/usrc/quickjs/")
# (find-quickjsfile "")
# (find-quickjsfile "Makefile")
# (find-quickjsfile "readme.txt")
# (find-quickjsfile "doc/")
# (find-quickjsfile "examples/")
# (find-quickjsfile "om")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# rm -Rfv ~/usrc/quickjs/
cd      ~/usrc/
git clone https://github.com/bellard/quickjs
cd      ~/usrc/quickjs/

make            |& tee om
make build_doc  |& tee ombd



#####
#
# D3.js
# 2021dec11
#
#####

# «D3.js»  (to ".D3.js")
# https://d3js.org/
https://www.youtube.com/watch?v=_8V5o2UHG0E



#####
#
# indium
# 2022jan23
#
#####

# «indium»  (to ".indium")
# (find-epackage-links 'indium "indium" t)
# (find-epackage-links 'indium)




#####
#
# L-System Explorer (by ankava)
# 2023may13
#
#####

# «lsystem»  (to ".lsystem")
# https://news.ycombinator.com/item?id=32079041 L-System Explorer (anvaka.github.io)
# https://news.ycombinator.com/from?site=anvaka.github.io
# (find-git-links "https://github.com/anvaka/lsystem" "lsystem")
# (code-c-d "lsystem" "~/usrc/lsystem/")
# (find-lsystemfile "")
# (find-lsystemfile "README.md")
# (find-lsystemfile "README.md" "npm install")




#####
#
# svelte
# 2023may24
#
#####

# «svelte»  (to ".svelte")
# (find-telegachat "1487862914#218539" "https://svelte.dev")
# https://svelte.dev
# https://svelte.dev/tutorial/basics
# https://svelte.dev/docs#getting-started

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-fline "/tmp/sv/")
rm -Rv /tmp/sv/
mkdir  /tmp/sv/
cd     /tmp/sv/
npm create svelte@latest myapp
cd myapp
npm install
npm run dev

/home/edrx/e(edrx:sc)# rm -Rv /tmp/sv/
/home/edrx/e(edrx:sc)# mkdir  /tmp/sv/
/home/edrx/e(edrx:sc)# cd     /tmp/sv/
/tmp/sv(edrx:sc)# npm create svelte@latest myapp
npm ERR! code EAI_AGAIN
npm ERR! syscall getaddrinfo
npm ERR! errno EAI_AGAIN
npm ERR! request to https://registry.npmjs.org/create-svelte failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/edrx/.npm/_logs/2023-05-25T00_54_36_486Z-debug.log
/tmp/sv(edrx:sc)# 

# (find-fline "~/.npm/_logs/2023-05-25T00_54_36_486Z-debug.log")



#####
#
# plotly
# 2023nov04
#
#####

# «plotly»  (to ".plotly")
# https://plotly.com/javascript/
# https://plotly.com/javascript/getting-started/



#####
#
# skewer-mode
# 2024mar30
#
#####

# «skewer-mode»  (to ".skewer-mode")
# (find-fline "~/LOGS/2024mar29.emacs" "so skewer-mode is quite decent")
# https://github.com/skeeto/skewer-mode
# https://paste.mozilla.org/K6KRWyeg#L2

(use-package skewer-mode :ensure t :pin melpa
  ;; <https://github.com/skeeto/skewer-mode>
  :unless noninteractive
  :defer t
  :commands (run-skewer) ;; main entrypoint
  :init
  (defalias 'skewer-start #'run-skewer)
  :config
  (defun skewer-stop ()
    "Stop a skewer JavaScript REPL."
    (interactive)
    (skewer-eval "window.close();")
    (httpd-stop)
    ;; kill stragglers, if any
    (mapc #'delete-process
          (seq-filter (lambda (x)
                        (string-match (rx (or "httpd"
                                              "httpd <127.0.0.1"))
                                      x))
                      (mapcar #'process-name (process-list)))))
  ;; add hooks for js2, css, html
  (skewer-setup)
  ;; skewer-mode needs us to use `js2-mode'
  (push '("\\.js[mx]?\\'" . js2-mode) auto-mode-alist)
  (message "If HTML/CSS/JS files already open, revert them via \"C-x x g\""))




#####
#
# three.js
# 2024sep14
#
#####

# «three.js»  (to ".three.js")
# (find-fline "~/THREEJS/")
# (find-fline "~/THREEJS/script.js")
# (find-fline "~/THREEJS/index.html")
# (find-es "chrome" "webgl")
# https://github.com/mrdoob/three.js
# https://github.com/mrdoob/three.js#usage
# (find-telegachat "6264384040#237619")
# (find-telegachat "6264384040#237619" "pelo Whatsapp")
# https://gist.github.com/PHAredes/b060d316b6c3e9c198328f466d3fb222

To run the Three.js demo you described, you'll need to set up a basic
web project and include the Three.js library. Here's a step-by-step
guide to get you started:

Create a new directory for your project. Inside that directory, create
two files:

index.html script.js

To run the demo:

If you have a local web server, start it in the directory containing
your index.html and script.js files. If you don't have a local web
server, you can use Python to create a simple one. Open a terminal in
your project directory and run:

For Python 3: python -m http.server For Python 2: python -m SimpleHTTPServer

Open a web browser and navigate to http://localhost:8000 (or whatever
port your local server is using).

You should now see a rotating cube rendered using Three.js. Note: The
code uses a CDN to include Three.js. If you prefer to download and
include Three.js locally, you can do that instead of using the CDN
link.







#####
#
# planes-in-3D-space
# 2024apr28
#
#####

# «planes-in-3D-space»  (to ".planes-in-3D-space")
# https://github.com/alexharri/website
# https://github.com/alexharri/website/tree/master/src/threejs/scenes
# (find-git-links "https://github.com/alexharri/website" "alexharri")
# (code-c-d "alexharri" "~/usrc/website/")
# (find-alexharrifile "")
# (find-alexharrish "find *")
# (find-alexharrifile "src/threejs/scenes/")
# (find-alexharrifile "src/threejs/scenes/intersecting-planes-virtual-plane.tsx")

https://alexharri.com/blog/planes
https://news.ycombinator.com/item?id=40179015 Planes in 3D Space (alexharri.com)

https://stemkoski.github.io/Three.js/index.html#marching-cubes



#####
#
# TextAnnotationGraphs
# 2024oct11
#
#####

# «TAG»  (to ".TAG")
# https://github.com/CreativeCodingLab/TextAnnotationGraphs
# (find-git-links "https://github.com/CreativeCodingLab/TextAnnotationGraphs" "TAG")
# (find-gitk  "~/usrc/TextAnnotationGraphs/")
# (code-c-d "TAG" "~/usrc/TextAnnotationGraphs/")
# (find-TAGfile "")
# (find-TAGfile "README.md")
# (find-es "emacs" "boxy")

-MemoServ- Memo 11 - Sent by sachac, Oct 10 13:16:58 2024 +0000
-MemoServ- ----------------------------------------------------------------
-MemoServ- Your diagram reminds me a little of text annotation,
           maybe something like
           https://github.com/CreativeCodingLab/TextAnnotationGraphs
           . I wonder if someone can make an Emacs-y way to do
           something like that, or if there's a command-line tool.
-MemoServ- ----------------------------------------------------------------
-MemoServ- Memo 12 - Sent by sachac, Oct 10 13:20:12 2024 +0000
-MemoServ- ----------------------------------------------------------------
-MemoServ- Or maybe something like a syntax tree diagram? ex:
           http://mshang.ca/syntree/ I wonder if it might be useful
           to dig around in this cons cell visualizer in Emacs
           (https://github.com/zainab-ali/pair-tree.el) or maybe
           boxy (https://elpa.gnu.org/packages/boxy.html) for
           ideas.
-MemoServ- ----------------------------------------------------------------
-MemoServ- Read 2 memos.




#####
#
# syntree
# 2024oct11
#
#####

# «syntree»  (to ".syntree")
# https://mshang.ca/syntree/
# https://github.com/mshang/syntree
# https://github.com/mshang/syntree/wiki
# (find-git-links "https://github.com/mshang/syntree" "syntree")
# (code-c-d "syntree" "~/usrc/syntree/")
# (find-syntreefile "")
# (find-es "ruby" "rsyntaxtree")



#####
#
# mdn-content
# 2024oct16
#
#####

# «mdn-content»  (to ".mdn-content")
# https://github.com/mdn/content
# (find-git-links "https://github.com/mdn/content" "mdncontent")
# (find-fline "~/LOGS/2024oct16.emacs" "but vendor" "docs are probably the more important")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rfv ~/bigsrc/mdncontent/
mkdir   ~/bigsrc/mdncontent/
cd      ~/bigsrc/mdncontent/
git clone https://github.com/mdn/content .
cd      ~/bigsrc/mdncontent/

export PAGER=cat
git branch --list -a
git for-each-ref
git log --oneline --graph --all -20

# (code-c-d "mdncontent" "~/bigsrc/mdncontent/")
# (find-mdncontentfile "")
# (find-mdncontentsh "find * | sort")
# (find-mdncontentfile "README.md" "## Build the site")

# (find-npm-links "yarn")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd      ~/bigsrc/mdncontent/
npm   install yarn
npm ls
npm      view yarn
node -v
yarn -v
yarn
yarn start






https://stackoverflow.com/questions/25897951/is-there-any-standlone-gui-module-for-node-application?fbclid=IwAR0p4yIk8KX8iYO4CFVyzStKrMikJW8n2tgEYsFcf2fYSCoIM4mjycuP9GE

https://deskgap.com/
https://www.npmjs.com/package/deskgap
https://jaxenter.com/deskgap-cross-platform-apps-155615.html
https://www.saashub.com/compare-neutralinojs-vs-deskgap

https://news.ycombinator.com/item?id=28797535 Xterm.js (xtermjs.org)

https://jpmens.net/2016/03/05/a-shell-command-to-create-json-jo/





Notes by Cypher:

;; TODO
;; P5.js
;; library
;; there is ap5* editor as well...
;; programming for musicians and artists

;; getting started with WEBGL
;; https://riptutorial.com/webgl/example/8648/installation-or-setup

;; sudo npm install -g http-server
;; http-server
;; then open the URL address and load the html file

;; Using p5js with org-mode in emacs
;; https://alejandrogallo.github.io/blog/posts/ob-p5js/

;; The Coding Train channel
;; https://yewtu.be/channel/UCvjgXvBlbQiydffZU7m1_aw

;; 1.1. Introduction - p5.js Tutorial
;; https://yewtu.be/watch?v=8j0UDiN7my4
;; https://yewtu.be/watch?v=yPWkPOfnGsw&listen=false

;; Watch the videos:
;; p5.js Web Editor with Cassie Tarakajian
;; Acesssibility in the p5.js Web Editor with Mathura Govindarajan
;; p5.js for educators with Saber Khan 
;; Luisa Pereira
;; https://www.luisapereira.net/info.html

;; See these other beginner's languages
;; See pyret
;; See Racket language 
;; See javaScript p5.js

;; you need to download the library to use the book Manual
;; gitc https://github.com/processing/p5.js

https://dev.to/geoffreycopin/build-a-custom-javascript-linter-in-5-minutes-4a1j
https://www.gibney.org/bookmarklet_editor

https://kaleidawave.github.io/posts/ezno-23/
https://blog.orhun.dev/packaging-rust-for-npm/

https://git.sr.ht/~fitzsim/firefox-javascript-repl/tree/main/item/firefox-javascript-repl.el
https://lists.gnu.org/archive/html/emacs-devel/2023-05/msg00629.html [ELPA] New package: firefox-javascript-repl
https://boajs.dev/posts/2023-07-08-boa-release-17/

https://strudel.tidalcycles.org/
https://jvns.ca/blog/2017/06/26/vue-js-fun/

https://pong-wars.koenvangilst.nl/
https://github.com/vnglst/pong-wars
https://github.com/vnglst/pong-wars/blob/main/index.html

https://github.com/google/zx
https://news.ycombinator.com/item?id=39323986 ZX – A tool for writing better scripts (github.com/google)

https://www.charlespetzold.com/blog/2024/09/Rudimentary-3D-on-the-2D-HTML-Canvas.html
https://www.charlespetzold.com/blog/2024/09/CubeWireFrame.js

https://devdocs.io/javascript/

https://esoteric.codes/blog/calculating-with-jss-undefined
https://alexharri.com/blog/clipboard
https://jrsinclair.com/articles/2024/how-to-compose-functions-that-take-multiple-parameters-epic-guide/

https://hurmet.org/sample
https://hurmet.org/manual
https://github.com/ronkok/Hurmet





#  Local Variables:
#  coding:               utf-8-unix
#  End: