Better HN
topnewbestaskshowjobs
Log inSign up

iplusplus

5 karma · joined Mar 19, 2014 (12y ago) · 10 submissions

If you find yourself in the unfortunate position of being hellbanned without merit, or rate limited without merit, or if all of your comments start at the bottom and stay there, please contact me at shawnpresser@gmail.com.

Banding together is the only chance to change the situation.

Submissions

comment 8y ago · link · parent

Current code is at https://github.com/lumen-language/lumen/blob/f7bfd4dca71ed1e... if anyone's curious. It's basically a copy-paste from the official arc3.1 release.

(You can diff with the official sources at https://github.com/arclanguage/anarki/blob/f01d3f9c661eed055...)

Apologies for the nested replies; wasn't able to edit.

comment 8y ago · link · parent

FWIW, React is a built-in feature of the new Arc-in-JS port. Here's how it looks:

  (<a> href: "https://news.ycombinator.com" "Hacker News")
That lets you merge s-expression syntax with React syntax quite nicely.

  (<html>
    (<body>
      (<div> width: "100%" "Hello, world")))
Here's the output of a REPL session.

  $ rlwrap bin/lumen-node

  > (load "arc.l")

  > (print:compile:expand '(<a> href: "https://news.ycombinator.com" "Hacker News"))
  React.createElement("a", {href: "https://news.ycombinator.com"}, "Hacker News")

  > (print:html (<a> href: "https://news.ycombinator.com" "Hacker News"))
  <a href="https://news.ycombinator.com">Hacker News</a>

  > (print:html (<html> (<body> (<div> width: "100%" "Hello, world"))))
  <html><body><div width="100%">Hello, world</div></body></html>

  > (print:html (whitepage "Look ma, no Racket"))
  Warning: Each child in an array or iterator should have a unique "key" prop.

  Check the top-level render call using <html>. See https://fb.me/react-warning-keys for more information.
    in body

  <html><body bgcolor="white" alink="blue">Look ma, no Racket</body></html>
You can see it's actually JS, since you get all the same warnings that you'd normally get in a node repl. (It's literally running on Node.)

And (print:html (msgpage 'shawn toofast*)) spits out a page saying "You're submitting too fast. Please slow down. Thanks."

I find it much easier to generate HTML than traditional methods, and much more maintainable. But it's not fair to claim that something new is inherently better. Time will tell.

I'm most interested in any unexpected warts, but there don't seem to be any so far.