meander

All things about https://github.com/noprompt/meander Need help and no one responded? Feel free to ping @U5K8NTHEZ
noprompt 2020-01-22T23:17:33.024700Z

[meander/epsilon "0.0.383"]
• Fixes a bug that caused bad code compilation for some uses of or

noprompt 2020-01-22T23:24:30.025700Z

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.

🤯 1
noprompt 2020-01-22T23:25:51.027100Z

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.

noprompt 2020-01-22T23:27:50.028800Z

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.

noprompt 2020-01-22T23:30:03.030700Z

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.

shaun-mahood 2020-01-22T23:30:58.031500Z

That sounds fantastically satisfying

noprompt 2020-01-22T23:32:59.032900Z

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.

noprompt 2020-01-22T23:33:51.033600Z

The other nice thing is that I think it might be easier for people to contribute.

noprompt 2020-01-22T23:34:32.034400Z

Because, eventually, we’ll have it bootstrapping itself.

noprompt 2020-01-22T23:34:46.034800Z

So if you can read the patterns you can contribute to those parts.

noprompt 2020-01-22T23:35:27.036200Z

Right now I have a thing that pretty much macroexpands an epsilon rewrite and then replaces the epsilon runtime symbols with zeta ones.

noprompt 2020-01-22T23:36:05.037500Z

Then that gets wrapped in a function, compiled to a private namespace which can then be consumed elsewhere.

shaun-mahood 2020-01-22T23:36:42.038200Z

At the very least, bootstrapping itself means you can avoid the kind of questions that continually come up about Clojure-in-Clojure 🙂

noprompt 2020-01-22T23:36:55.038400Z

😄

noprompt 2020-01-22T23:37:09.038900Z

Well, the nice thing is, I’m not doing that! 🙂

noprompt 2020-01-22T23:38:40.040500Z

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.

noprompt 2020-01-22T23:39:31.041300Z

Anyway, much of the work on zeta will be concentrated in the dev/ folder on the zeta branch.

grounded_sage 2020-01-22T23:51:06.041800Z

Is there some examples of using Meander for web scraping?

noprompt 2020-01-22T23:53:16.042100Z

I think theres one in the cookbook.

grounded_sage 2020-01-22T23:54:02.042900Z

Yea I found it quickly but forgot I was on german keyboard to paste haha

grounded_sage 2020-01-22T23:54:06.043100Z

thanks!

noprompt 2020-01-22T23:54:21.043500Z

👍

grounded_sage 2020-01-22T23:54:29.043800Z

100% using this library tomorrow at work and going to save me a tonne of time and headache

grounded_sage 2020-01-22T23:54:38.044200Z

Even without the web scraping part

noprompt 2020-01-22T23:54:48.044500Z

Great! Let us know how we can help if you need anything.

noprompt 2020-01-22T23:55:06.045Z

Please also tell us what you think sucks or if you find a bug.

noprompt 2020-01-22T23:55:35.045600Z

Webscraping is good fun with Meander. 🙂

noprompt 2020-01-22T23:56:29.046900Z

I have some code somewhere that turns JSoup into EDN and then I m/$ a bunch of stuff out of that.

grounded_sage 2020-01-22T23:57:03.047700Z

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

grounded_sage 2020-01-22T23:59:40.050Z

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 ❤️

👍 1