bakpakin on master
Update for 1.14.1 (compare)
bakpakin on master
Add event loop docs. Merge branch 'master' of github… (compare)
bakpakin on master
Add janet.kak editor support Merge pull request #96 from pep… (compare)
bakpakin on master
Update index.mdz Merge pull request #95 from uvt… (compare)
bakpakin on master
Tweaks to functions doc Merge pull request #92 from sog… (compare)
bakpakin on master
Add :h, :h*, :h+, :H to built-i… Merge pull request #94 from sog… (compare)
bakpakin on master
Add column and line captures to… Add articles Merge pull request #97 from pep… (compare)
bakpakin on master
Tweak jmp* docs Merge pull request #93 from sog… (compare)
@bakpakin would like to be able to link to the sections within the janet docs but afaict the dom nodes lack ids (e.g. suppose i wanted to refer to "Compiling and running from source" at: https://janet-lang.org/docs/index.html).
is that sort of thing easy to add?
i think what i'm asking for is there to be a way to link to headers -- specifically that those "targets" get created automatically.
the use case is trying to send someone a link that points to something within a page. in the old days this was done using the value of the name attribute in an anchor tag (i.e. <a name="..."
) as a fragment identifier(?), but these days i think it's more common(?) to use the value of an id attribute in a node (assuming there is one) as the fragment id.
so by default if the title from headers (the 1-6 #
things) were converted to a suitable string and used as a value for the id attribute (assuming no collisions) of the appropriate node, may be that would work.
perhaps that can be done some how by modifying this: https://github.com/bakpakin/mendoza/blob/master/mendoza/markup.janet#L73-L75
as that's used here: https://github.com/bakpakin/mendoza/blob/master/mendoza/markup.janet#L117
am i making sense?
defn
there
repl:1:> (defn a| [] 1)
<function a>
repl:2:> (a|)
parse error in repl around line 2, column 4: mismatched delimiter
so docs at: https://janet-lang.org/docs/syntax.html say:
Janet symbols are represented as a sequence of alphanumeric characters not starting with a digit or a colon. They can also contain the characters !, \@, $, %, ^, &, *, -, _, +, =, |, ~, :, <, >, ., ?, \, , as well as any Unicode codepoint not in the ASCII range.
but some of these might lead to difficulties in some circumstances (e.g. |
, @
, ~
, ,
)
possibly it's good to have either a warning about that or may be not mention some of them?
i'm looking through the abstract machine page at: https://janet-lang.org/docs/abstract_machine.html -- it looks like there have been some changes since it got put together.
i think i've tracked down most of the changes and i've summarized them here: https://gist.github.com/sogaiu/381b12f4e7c981146d8af0979258315d
iiuc the table at the web page is generated from: https://github.com/janet-lang/janet-lang.org/blob/master/content/docs/gen-asm-table.janet
i don't think i understand stuff enough yet to fill in the names of the operands nor the descriptions (i think i figured out the number of operands though via the use of disasm
). i can make an attempt, but if anyone happens to know of a good way to figure that sort of thing out, please share :)
it's a work-in-progress, but based on the peg docs from the website, i've put together a tutorial meant to be used by evaluating the code from it: https://gitlab.com/-/snippets/2053876
i added things to it that may not be on the website (yet) including:
and updated some of the explanations (e.g. error
's argument is now optional)
i tried to add example code for every construct along with expected evaluation results.
it also has:
if anyone takes a look i'd be happy to hear what you think -- i'm planning to rearrange a bit and possibly split it up
(i may try to file some PRs for the site to address some of the missing pieces based on some of this work)