Arc Forumnew | comments | leaders | submitlogin
A tasklist, written in Arc, including source code. (99.60.16.192)
4 points by zck 3045 days ago | 9 comments


2 points by zck 3045 days ago | link

I made a simple task manager in Arc. It supports adding, editing, and deleting tasks.

Go to http://99.60.16.192:8080/source to see the source. I'd love to hear any comments about the code.

-----

3 points by CatDancer 3044 days ago | link

  (= (taskslist*.user task!id) nil)
could be

  (wipe (taskslist*.user task!id))

-----

2 points by profquail 3027 days ago | link

Did anyone notice that the domain for the link isn't parsed properly? If the link is just to an IP address and not a domain, it should print the entire IP address...but it just printed "16.192:8080".

-----

2 points by fallintothis 3026 days ago | link

The offending code from news.arc:

  (def parse-site (url)
    (rev (tokens (cadr (tokens url [in _ #\/ #\?])) #\.)))

  (defmemo sitename (url)
    (and (valid-url url)
         (let toks (parse-site (rem #\space url))
           (if (isa (saferead (car toks)) 'int)
               (tostring (prall toks "" "."))
               (let (t1 t2 t3 . rest) toks  
                 (if (and (~in t3 nil "www")
                          (or (mem t1 multi-tld-countries*) 
                              (mem t2 long-domains*)))
                     (+ t3 "." t2 "." t1)
                     (and t2 (+ t2 "." t1))))))))
The isa test is thrown off by the port number

  arc> (parse-site "http://99.60.16.192:8080/")
  ("192:8080" "16" "60" "99")
  arc> (isa (saferead "192:8080") 'int)
  nil
which leads down the first else-clause of sitename, where

  arc> (and (~in t3 nil "www")
            (or (mem t1 multi-tld-countries*)
                (mem t2 long-domains*)))
  nil
leads to

  arc> (and t2 (+ t2 "." t1))
  "16.192:8080"

-----

2 points by pg 3017 days ago | link

thanks, fixed

-----

2 points by jcw 3044 days ago | link

I'd like to see the source, but the link is broken.

-----

2 points by zck 3044 days ago | link

For some reason, my IP address got changed overnight. Sorry. Now, look at http://99.35.58.214:8080/ or http://99.35.58.214:8080/source . I've also put the code up at http://docs.google.com/View?id=dgjgbnzn_123dcb5g9hc

-----

4 points by CatDancer 3044 days ago | link

Use a dynamic DNS service such as http://zoneedit.com/doc/dynamic.html . This will keep your domain pointed to your IP address as it gets changed by your ISP.

-----

2 points by zck 3044 days ago | link

Great advice. I set it up at http://zck.dnsalias.com:8080/ . The source is at http://zck.dnsalias.com:8080/source .

-----