5 ms·
Hi, author here. Maybe "jQuery for Haskell" is not too descriptive: it is a pure Haskell html dom manipulation tool, mainly useful for templating and/or scrapi
by friendly_chap 13y ago
Hi, author here.
Maybe "jQuery for Haskell" is not too descriptive: it is a pure Haskell html dom manipulation tool, mainly useful for templating and/or scraping.
It uses the same selectors and API as jQuery, the only deviations are due to immutability (eg. if you modify a selection, the original graph will not be updated of course, so you have to use "alter" or something similar).
Edit:
Feel free to send a pull request or suggest any changes. The time I poured into the library was mainly focused on getting even the most complex nested selectors to work, because I felt that is the lion's share of the work.
- tych0 13y agoCool! I have a similar project, based on lift's CssSel's (which are sort of based on the jquery syntax): https://github.com/tych0/hquery https://github.com/tych0/hquery I've been playing around with making a DSL vs. using string based selectors, and I've had little success coming up with something sensible. Have you thought about this at all?
- friendly_chap 13y agoI will check your repo too. If you have problems due to similar naming let me know and I will change it. Regarding the selector DSLs, I also went with the string solution, however I translate all selectors to a recursive ADT which could be used directly. Maybe we should unite our powers ;)
- tych0 13y agoNah, no issues with naming, mine was just a pet project to pick up a bit of haskell. R.E. uniting forces, yeah! I looked through your code a bit, and it looks like we have the same underlying idea (yours seems a bit less convoluted than mine, though :-). I'm not really actively using hquery for anything more than a static site generator I wrote with it, but I wouldn't mind spending a few more hours/week on haskell code.
- friendly_chap 13y agoSeems like we are on the same page, I also test drived this library with a static site generator =). I was really surprised that there are no more templating languages for Haskell given the availability of the mighty parsec. I am following you on github, stay in touch.