Fork me on GitHub
#announcements
<
2019-05-20
>
noprompt05:05:54

[meander/delta "0.0.76"]
is available. The pattern matching and substitution compilers emit much better code than previous versions with more optimizations. The performance improvements are dramatic on both fronts.

👍 1
noprompt05:05:03

We’ve got a tutorial in the works with an open pull request for folks looking to learn how to use Meander in practice. I must apologize for doing a poor job on explaining the utility and philosophy of the library in the README! My primary focus has solely been on building the library itself rather than “marketing” it. Pending a release of a good tutorial and improvements to README, I’m happy to respond to questions at the project homepage and in the #meander channel. 🙂 https://github.com/noprompt/meander

👍 8
noprompt05:05:34

A novel addition to the latest branch of the project (`delta`) is the ability to express recursive patterns. Have a look! Give it a try! https://github.com/noprompt/meander#with

noprompt05:05:56

(Send me bug reports! 😅 )

noprompt07:05:44

Use 0.0.76 not 0.0.74 (just found a small bug). 😉

athomasoriginal20:05:04

Published a beginner friendly blog post on deploying ClojureScript to Github Pages https://betweentwoparens.com/deoploy-clojurescript-to-github-pages

🚀 6
felipebarros23:05:12

Thank you for taking the time to write and publish this. It may seem simple but I couldn't find a similar article back in the day. I've been using Netlify ever since (found it easier to begin at the time) but using GitHub pages seems to be just as simple.

🙏 1
practicalli_john13:05:00

I recently did a video of using ClojureScript, figwheel-main, reagent and Bulma CSS framework for deployment on GitHub pages https://www.youtube.com/watch?v=nn_5NVgCps4&amp;list=PLy9I_IfUBzKJSgctCJaRYcnF6kZdiZ5ku&amp;index=23 Nice to see the different approaches.

👌 6
👍 1
jsa-aerial14:05:48

@tkjoine Would 'static' here accommodate a self hosted ClojureScript site? No server, database, server side requirements, but fully 'active'

athomasoriginal14:05:56

Good question. TMK it should, but maybe I am missing something.

practicalli_john15:05:39

Maybe this is another example of Serverless computing 😁

phreed22:05:34

@tkjone I gave it a try and got an error.

$ clj -m cljs.main -d "demo-clojurescript-gh-pages/out"  -c demo.static-website -r
Exception in thread "main" java.io.FileNotFoundException: Could not locate cljs/main__init.class, cljs/main.clj or cljs/main.cljc on classpath.
I poked around a bit and there were some comments about issues with java 9 but I am running java 8. Any ideas?

athomasoriginal22:05:47

Hey @U0XTHMGMP, what does your current folder structure look like? and what does your static_website.cljs look like? I just switched over to Java 8 and it’s still working for me.

phreed22:05:14

What is the -d option anyway? I do not see any documentation for it. https://clojure.org/reference/deps_and_cli When I take it off things seem to work fine.

athomasoriginal22:05:24

Interesting. -d is a ClojureScript compiler option: https://clojurescript.org/reference/compiler-options#output-dir allowing us to set the output dir of our compiled ClojureScript. You can check out more options at the above link, or via command line:

clj -m cljs.main -h
You can for sure remove that flag, but if you do you should not be able to see a console log in the browser console

athomasoriginal22:05:48

Having said the above, I am able to reproduce the error your specified. It happens for me if I run the following command

clj -m cljs.main -d "demo-clojurescript-gh-pages/out"  -c demo.static-website -r
In a dir which does not have a deps.edn file

phreed22:05:51

Interesting, if the directory demo-clojurescript-gh-pages is present there is no problem.

athomasoriginal22:05:03

Yup. I wrote a footnote that hopefully explains this in greater detail because I figured it might not be clear https://betweentwoparens.com/deoploy-clojurescript-to-github-pages#fn-project-name

athomasoriginal22:05:03

Let me know if you have any suggestions for how to make this clearer as I feel it is something that will come up more often than not. Suggestions and feedback are very welcome 🙂

phreed23:05:17

It might be good to add a { :paths ["src"] ... in the deps.edn. I think that is the default. Also from the instructions is sounds like the clj command should be run from the src/demo directory.

athomasoriginal23:05:39

Awesome. That makes sense and would explain what happened to you. I will update. Thank you!

phreed23:05:02

I think the actual issue was that the deps.edn file had not yet been processed successfully. The unknown -d option having prevented a successful first run. I think what did the trick was running clj -m cljs.main -h which effectively retrieved clojurescript. I then created the "missing" directory and the next run succeeded.

athomasoriginal23:05:08

Oh wow. That’s interesting. I cannot speak to your case, but I can say that I deleted all local versions of ClojureScript and noticed that even if I ran the clj -m cljs.main -d ... command from the correct place, it would not download ClojureScript. I then deleted each directory generated by clj (because I still had the previously generated dirs from successful runs) out, demo-clojurescript-gh-pages and .cpcache and identified that if a .cpcache directory is present, ClojureScript will never (?) be downloaded (even if it is nowhere on the local). This includes if you run clj -m cljs.main -h and also if :paths is specified in deps.edn. In your case though, I would have to know where the commands were run. Either way, I def’ learned about some interesting behaviour 🙂

phreed23:05:51

Me too. Thanks.👍

phreed23:05:55

I have also been looking at the --output-to option for the production build.

athomasoriginal23:05:10

Yeah, that’s a good one too. I will post a more “best practices aligned” version of the demo in a few days to show how I might actually configure this if I was trying to maintain a static website and not just a demo