Appologies if some of these are mis-categorized, I am a Janet newb!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/janet-lang/janet/blob/master/src/include/janet.h | |
https://github.com/janet-lang/janet/blob/master/src/core/abstract.c | |
https://github.com/janet-lang/janet/blob/master/src/core/marsh.c | |
https://github.com/janet-lang/janet/blob/master/src/core/typedarray.c | |
https://github.com/janet-lang/janet/blob/master/src/core/peg.c | |
/* A context for marshaling and unmarshaling abstract types */ | |
typedef struct { | |
void *m_state; | |
void *u_state; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
default: test-foo test-baz | |
build/foo.a: foo.c | |
jpm --verbose build | |
test-foo: build/foo.a | |
test 42 = $(shell janet -e '(import build/foo :as foo) (print (foo/bar))') | |
repl-foo: build/foo.a | |
janet -e '(import build/foo :as foo)' -r |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# find * and + to be confusing, trying to use sequence and choice instead | |
(def peg-simple | |
~{:main (capture (some :S))}) | |
(peg/match peg-simple "hello") # => @["hello"] | |
# from: | |
# https://janet-lang.org/docs/peg.html | |
(defn finder |
- High level overview https://yogthos.github.io/ClojureDistilled.html
- An Animated Introduction to Clojure https://markm208.github.io/cljbook/
- Interactive tutorial in a browser https://tryclojure.org/
- Interactive exercises http://clojurescriptkoans.com/
- Clerk notebooks with introductory examples https://github.clerk.garden/anthonygalea/notes-on-clojure
- More interactive exercises https://4clojure.oxal.org/
- Lambda Island tutorials https://lambdaisland.com/
- Functional Programming with Clojure resources https://practicalli.github.io/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
### utf8.janet | |
### | |
### Pure janet utf8 utils. You should probably just use C. | |
### | |
(defn utf8-encode | |
"Convert a sequence of codepoints to a string." | |
[x] | |
(def buf @"") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns ueaq.core | |
(:require | |
[goog.object :as gobj] | |
["react" :as r] | |
["react-dom/server" :as rds])) | |
(defn unwrap | |
[^js p] | |
(.-__unwrap p)) |
I'm able to get a Void Linux image (32bit, raspberry pi 2 image) to boot on the
raspberry pi 4. Currently, I can get it to boot and even handle upgrading via
xbps-install -Su
(networked over ethernet), however I can't seem to get it to
see the internal wlan (wifi) device.
huge shout out to kodifies on this reddit post for helping me to get this going.
- Create an hetzner server using Ubuntu
- Go to the Hetzner's Server dashboard > Images
- Click on "Mount" over the
alpine-linux-extended.iso
image - Shutdown the server
- Start the server
- Click the "Console" icon from the dashboard to open an interactive terminal session
- Login is
root
- Configure the interface using the command
setup-interfaces
- Pick to setup default
eth0
- Custom config:
no
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jdoc() { | |
export JANET_PATH=/usr/local/lib/janet | |
janet -l ~/scripts/misc/import-all -e '(import-all) (each b (all-bindings) (print b))' \ | |
| fzf --preview "echo {} | xargs -I[] \ | |
janet -l ~/scripts/misc/import-all \ | |
-e '(import-all) \ | |
(def is-fun (let [t (type [])] (or (= t :function) (= t :cfunction)))) \ | |
(if is-fun (doc []) (do (pp (type []))(pp [])))' \ | |
| sed 's/^\s*//g' \ | |
| awk NF" \ |