[meander/epsilon "0.0.383"]
• Fixes a bug that caused bad code compilation for some uses of or
On a good note, I’m feeling confident that the next version of the library will have few bugs and be easier to maintain and reason about because… its going to be written with epsilon.
I’ve been doing some working on the zeta
branch experimenting with this and have been very happy with just how much easier it has been to write, for example, the parser using rewrite
alone.
Writing the parser by hand was very tedious and I made several mistakes. I put together a new parser using rewrite
and its been much easier to get right and experiment with along the way.
The same has been true of my experience writing a simple match compiler from the parsed AST. Instead of mulling over construction details like functions and how many arguments they take, destructuring, etc. I’ve been able to focus purely on building the thing.
That sounds fantastically satisfying
Its been nice. Well, for me, I think its nice. Because, I think, for the parts of the system that don’t need to be open can be written in this style and the code that comes out is mostly optimized for its inputs.
The other nice thing is that I think it might be easier for people to contribute.
Because, eventually, we’ll have it bootstrapping itself.
So if you can read the patterns you can contribute to those parts.
Right now I have a thing that pretty much macroexpands an epsilon rewrite
and then replaces the epsilon runtime symbols with zeta ones.
Then that gets wrapped in a function, compiled to a private namespace which can then be consumed elsewhere.
At the very least, bootstrapping itself means you can avoid the kind of questions that continually come up about Clojure-in-Clojure 🙂
😄
Well, the nice thing is, I’m not doing that! 🙂
Oh, the other thing, is the runtime namespace. Thats the other place where I think contribution will be helpful or, at least, a place where we can put specialized functions etc.
Anyway, much of the work on zeta
will be concentrated in the dev/
folder on the zeta
branch.
Is there some examples of using Meander for web scraping?
I think theres one in the cookbook.
https://github.com/noprompt/meander/blob/epsilon/doc/cookbook.md#webscrape-html
Yea I found it quickly but forgot I was on german keyboard to paste haha
thanks!
👍
100% using this library tomorrow at work and going to save me a tonne of time and headache
Even without the web scraping part
Great! Let us know how we can help if you need anything.
Please also tell us what you think sucks or if you find a bug.
Webscraping is good fun with Meander. 🙂
I have some code somewhere that turns JSoup into EDN and then I m/$
a bunch of stuff out of that.
Yea I was using Reaver before but realised it wasn’t a good fit. Was going to use Jsoup based on that being taught in Purely functional but I’d rather keep code consistent. If I am using Meander to transform my data from a json response I might as well do the same for the html data too
Ah I see. Well I will see how I go. But yea I actually found this because I was writing so much code I to pick out data I was discussing that we needed to document the data we wanted and where it was in the JSON responses. I figured there had to be a way to represent it as data and “match” it. Didn’t have to look far. Love clojure and the community ❤️