Skip to content

Instantly share code, notes, and snippets.

@sogaiu
sogaiu / janetslot-and-registers.md
Last active September 20, 2024 10:59
janetslot and registers

JanetSlot and Registers

From compile (janet code) to janetc_emit (bytecode)

Janet's compile calls janet_compile_lint:

/* C Function for compiling */
JANET_CORE_FN(cfun_compile,
              "(compile ast &opt env source lints)",
@sogaiu
sogaiu / gist:39c942042eaed1339c92e213aba8fd96
Created September 18, 2024 08:59
android recovery resources
https://thelinuxcode.com/access-android-recovery-mode/
@sogaiu
sogaiu / connection-between-janetslot-and-bytecode.md
Last active September 18, 2024 13:17
connection between janetslot and bytecode

Janet bytecode operates on an array of identical registers that can hold any Janet value (Janet * in C).

Most instructions have a destination register, and 1 or 2 source registers.

Instruction Signature Description
add (add dest lhs rhs) $dest = $lhs + $rhs

Registers are simply indices into the stack frame, which can be thought of as a constant-sized array.

@sogaiu
sogaiu / uuid-in-janet.md
Created September 16, 2024 06:50
uuid in janet
@sogaiu
sogaiu / golang-notes.md
Last active September 17, 2024 11:20
golang notes

general

  • Go at Google: Language Design in the Service of Software Engineering
    • assertions without support
      • Go was designed to address the problems faced in software development at Google, which led to a language that is not a breakthrough research language but is nonetheless an excellent tool for engineering large software projects.
      • Or to rephrase, it is about language design in the service of software engineering.
      • Our answer to that is that the properties Go does have address the issues that make large-scale software development difficult.
      • A larger view of software engineering is required
      • The primary considerations for any language to succeed in this context are:
      • When launching a new language it is important that the target audience be able to learn it quickly
  • essentially same observation made in the 1990s:
@sogaiu
sogaiu / git-and-line-endings.md
Created September 12, 2024 10:23
git and line endings
@sogaiu
sogaiu / gist:704dff34c0dc580d1fc4961a6276bce7
Created September 12, 2024 04:16
language learning tips
* try to learn a bit about "articulatory settings" -- there is no single agreed upon
definition, but it might be worth seeing what folks have mused about
* try to focus on bodily sensations while making sounds
* try to pay attention to what's going on in the mouth (and nearby) at
the beginning of words.