Arc Forumnew | comments | leaders | submit | kens2's commentslogin
4 points by kens2 6065 days ago | link | parent | on: arc2c update

Oh, Unicode combining characters and normalization. I classify that as "somebody else's problem." Specifically, if you're writing a font rendering engine, it's your problem. If you're writing an Arc compiler, it's not your problem. If you want complete Unicode library support in your language (like MzScheme's normalization functions string-normalize-nfd, etc.), then you just use an existing library such as ICU, and it's not your problem. ICU: http://www-306.ibm.com/software/globalization/icu/index.jsp

-----

4 points by kens2 6065 days ago | link | parent | on: SVG

Firefox's Live HTTP Headers plugin tells me that news.ycombinator.com/rss has "Content-Type: text/html; charset=utf-8". I imagine RSS clients are not very strict about what they accept.

-----

1 point by drcode 6065 days ago | link

ahh... I need to get me that plugin :)

-----

3 points by kens2 6065 days ago | link | parent | on: help deploying arc to a web server

I haven't actually tried this, so my advice is probably worthless, but take a look at "Configure mod_proxy" at http://confluence.atlassian.com/display/DOC/Using+Apache+wit... and use news in place of confluence.

I don't think .htaccess will help you at all; example.com/news exists in "URL-space" not in the filesystem. So you don't need to do anything with a /news directory.

-----

2 points by kens2 6066 days ago | link | parent | on: Comments on srv.arc

One comment on app.arc: readvar in app.arc uses valid-url, which is defined in news.arc. If valid-url were in app.arc instead, the layering would be better-defined. (Also, readvar wouldn't break when I comment out news.arc to work around the || redefinition problem.)

-----

2 points by kens2 6067 days ago | link | parent | on: Comments on srv.arc

I hope splitlines in app.arc is a leftover obsolete function. It makes no sense otherwise.

-----


The HN code is (more or less) the news.arc file in the arc distribution. http://arclanguage.org/install

-----

2 points by kens2 6068 days ago | link | parent | on: Strange coercion from string to int or num

I suspect that parsing a float (or complex) is a nonimplemented feature. According to my documentation http://arcfn.com/foundation-doc.html#coerce a string can be coerced to sym, cons, or int only.

-----

1 point by cchooper 6068 days ago | link

Well, parsing a float is implemented, in the sense that read will parse it for you, so that's not the problem. I suspect it doesn't work because num is just a place-holder for "this kind of number is not yet fully implemented; don't expect much". It will probably die in a future release.

-----

2 points by cchooper 6068 days ago | link

Oh well, I was wrong. It was a bug.

-----

3 points by kens2 6069 days ago | link | parent | on: Comments on srv.arc

Ok, I'm stumped. What's the difference between arform and arformh? I thought arformh gave access to the headers, but they both do. arformh doesn't update save-optime, but I think that's just an accident. Why do these both exist?

Here's sample code:

  (defop prreq req (prn req))

  (defop a1 req (arform [do (prn "Set-Cookie: foo=234") "prreq"] (submit)))

  (defop a2 req (arformh [do (prn "Set-Cookie: foo=345") "prreq"] (submit)))
Going to /a1 or /a2 and clicking the button shows that both update the cookie and redirect to /prreq. So why are there separate arform and arformh macros?

-----

2 points by almkglor 6069 days ago | link

My bet is, this is a thinko by pg. He planned to restrict arform to not emitting anything, but forgot to actually put the restriction.

The code for both forms are quite a few lines apart too.

http://www.paulgraham.com/gh.html section: recognition

Edit: after some time scanning through the code - it seems that arformh's time is measured, but arform's time is not. Or vice versa, I could've gotten confused.

Cref: rfnurl* and rfnurl2* . rfnurl* is "r", r is (defopr r ...), defopr is (... (defop-raw ...)), defop-raw is (... (save-optime ...))

rfunurl2* is "y", y is (defopr-raw y ...), defopr-raw doesn't add any code to the body: (fn ,parms ,@body)

-----

4 points by kens2 6069 days ago | link | parent | on: Where is the git ?

I wrote up a document on how to use the git: http://arcfn.com/2008/02/git-and-anarki-arc-repository-brief...

-----

4 points by kens2 6069 days ago | link | parent | on: Comments on srv.arc

When you say you've been able to use srv.arc with success, do you mean the unmodified arc2.tar version or a patched version such as Anarki? Let me clarify that when I said above that srv.arc was broken, I was referring to the official version.

-----

1 point by drcode 6068 days ago | link

you are correct- I should have clarified I'm using the patched version with success :)

-----

More