- Markdown is a double edged sword in online commenting. It is so ubiquititous in popular community sites that it is expected to be used but it can be fragmented in what is used from the spec and how it is implemented. At hubski we use a small subset of the markdown spec with our own customizations (such as shout-outs). Normally I would use an appropriate library for parsing markdown and be done with it, but unfortunately no one has written one that I know of.
Hey, forwardslash, do you have any recommended resources for learning arc? I have pretty good experience with typed functional languages (haskell, OCaml) but not very much with lisp (if that makes a difference). Do you like it?
The only resources I use are the arclanguage forum, arc tutorial, and the source of projects like Anarki. All that I have learned about arc has been primarily from working with hubski's codebase. If there's some area that I'm not familiar with I'll try and follow the data path of a request that involves that area. For instance, the first thing I did when I joined the team was added magnet links. I started with figuring out how arc dealt with requests which lead me to how you define urls in arc (with the newsop function). Eventually I burrowed down into app.arc and found the functions which validate urls in order to make them clickable. Months of doing this is how I got to where I am now. As to whether I like it, I can say that I wouldn't choose it as a language for a project. That said, I still have enjoyed working with it. It was my first functional language (I later learned Haskell last semester) and got me out of thinking purely in the C/Java world I had lived in all throughout school. All in all it's a very simple language with unique features, but most of my complaints aren't necessarily with the language but with the code written with arc that we use. For example, we don't have nice urls like you'd expected from other sites with things like example.com/user/forwardslash; instead we have to use query strings. This stems from how we defined our routes such as user pages which starts with Other things I have grown to not be fond of despite being interesting concepts are dirty and anaphoric macros. Basically I just miss namespacing and I think anaphoric macros are bugged at the moment (they like to eat local variables).
This defines hubski.com/user and binds the value of id in a query string to the variable id. User here is not a string but a literal identifier, so we can't define any sort of dynamic route. There is probably a solution to this but it would involve rewriting some if not most of our server code. Again, not necessary a complaint with the language but with the srv.arc implementation. (newsop user (id)
...)
Small question about Arc, coming from a Haskell background. I've used Yesod for web applications, and it has a database-agnostic API for persistence (called yesod-persistent). Is there a similar tool for Arc, or is there at least a database API to any specific one?
I wish more than anything else that arc had any sort of database API, but as it stands our database is just flat files loaded into memory in a hashtable. Racket and scheme (which arc is built on) have some database APIs but you'd have to cross define them in arc which isn't trivial.
It is is still make sense for you, then there is a binding to C markdown library for Arc: https://github.com/mgiken/arc-discount