skenney26


12 points by skenney26 over 2 years ago | link
cached 4 days ago

SVG
9 points by skenney26 over 2 years ago | link
cached 9 days ago

8 points by skenney26 about 1 year ago | link | parent | top
cached 1 day ago
Why not just 'hash? Using 'hash would also help to distinguish hash-tables from html-tables in html.arc

7 points by skenney26 about 1 year ago | link
cached 6 days ago

6 points by skenney26 about 1 year ago | link | top
cached 23 days ago
Great question. According to the comments in ac.scm PG is wondering the same thing:

  "do we really want is to ret t for distinct strings?"

6 points by skenney26 about 1 year ago | link | parent | top
cached 1 day ago
I agree that the exclamation marks aren't that useful.

Here's a macro that might be useful for digging down into a nested table:

  (mac dig args
   `(,@(reduce list args)))

  arc> (= x (table))
  #hash()
  arc> (= (x 'y) (table))
  #hash()
  arc> (= ((x 'y) 'z) 0)
  0
  arc> x
  #hash((y . #hash((z . 0))))
  arc> (dig x 'y 'z)
  0
  arc> (= (dig x 'y 'z) 1)
  1
  arc> x
  #hash((y . #hash((z . 1))))

5 points by skenney26 about 1 year ago | link
cached 10 days ago

5 points by skenney26 over 2 years ago | link
cached 10 days ago

4 points by skenney26 over 2 years ago | link | top
cached 10 days ago
Perhaps we could call this doc rather than help.

4 points by skenney26 over 2 years ago | link | top
cached 9 days ago
It looks like the final left paren in hyfac is misplaced. It needs to be before the call to fac. Also, unless you explicity return y, hyfac will just return nil.

  (def hyfac (n)
    (let y 1
      (for x 1 (+ n 1)
        (= y (* y (fac n))))
    y))