User talk:GordonCharlton: Difference between revisions

m (→‎Quackery: oops)
(→‎Quackery: reply.)
Line 27:
 
::: Which reminds me, I have a question for you about stack comments. Words like <code>witheach</code> have a stack comment like <code>( a --> ) or ( [ --> )</code>. This makes sense strictly from the ''stack'' standpoint, but as a ''word'' contract I find it doesn't give me the picture I'm looking for to understand the word, since there is no indication of the nest it expects following the word. Is this something that could be resolved with a stack comment notation, like <code>( [ . [] --> )</code>? Just spitballing here; the <code>.</code> indicates the word position, while the <code>[]</code> indicates a nest following the word. No wrong answer either way; I understand wanting to keep it simple. --[[User:Chunes|Chunes]] ([[User talk:Chunes|talk]]) 12:39, 26 January 2021 (UTC)
 
::::I almost included set operations in Quackery, but I decided to let users roll their own in the end. I mostly only put in things that I needed for the REPL - which is why bigrat.qky is an add-on. I ''really'' wanted rational arithmetic, but it's more than bare-bones Quackery, so it got shifted into its own file at an early stage.
 
::::I would have done sets with bitwise operations. i.e.
 
::::<lang>Quackery [ 0 ] is empty.set ( --> set )
 
[ 26 bit 1 - ] constant is set.of.letters ( --> set )
 
[ char A - bit ] is letter->set.element ( c --> setnum )</lang>
 
::::and so on. Something along those lines.
 
::::After the "fun" of coding Quackery in a language where formatting is part of the syntax I would never seek to impose a style on any part of Quackery. Develop your own in-house rules that you are comfortable with. Mine are based solely on making the source-code look super-consistent and fit nicely on a sheet of A4 with 12pt inconsolata for the book. Now they're a habit I feel no need to get out of. Good point about words that use ]'[ though.
1,462

edits