arachne

Project Page: http://arachne-framework.org/ Kickstarter: https://www.kickstarter.com/projects/1346708779/arachne-rapid-web-development-for-clojure
jcf 2018-02-04T19:19:22.000031Z

Anyone had success mixing Webjars and Arachne SASS (via jsass)?

jcf 2018-02-04T19:19:44.000008Z

I can see Arachne Figwheel notifying the browser about CSS in the webjar, but I can't import SASS.

jcf 2018-02-04T19:19:54.000146Z

I've tried a few different :load-paths.

luke 2018-02-04T19:19:58.000088Z

@jcf I did at one point.

luke 2018-02-04T19:20:12.000082Z

let me see if I can find any public examples

luke 2018-02-04T19:20:19.000083Z

(can’t send client code unfortunately)

👍 1
jcf 2018-02-04T19:22:16.000108Z

@luke if it helps I've pushed my WIP here: https://github.com/jcf/usr/pull/1

luke 2018-02-04T19:22:25.000131Z

cool

luke 2018-02-04T19:22:36.000017Z

btw did you come to any resolution on the fileset and open files limit stuff?

jcf 2018-02-04T19:22:36.000055Z

The errors from the compilation process aren't very helpful.

jcf 2018-02-04T19:23:23.000056Z

RE: the file limit - not really.

jcf 2018-02-04T19:23:42.000088Z

I've not worked on this side project much, and have been focussed on the SASS side of things for the last half hour or so.

luke 2018-02-04T19:23:50.000114Z

ok

luke 2018-02-04T19:23:57.000071Z

that error is indeed a bad one

jcf 2018-02-04T19:24:01.000075Z

If I can get SASS working I want to see about cache busting (I've used Optimus in the past).

luke 2018-02-04T19:24:03.000049Z

but it indicates an error thrown by SASS itself

jcf 2018-02-04T19:24:13.000110Z

Yep, and I've seen where it comes from in the source.

jcf 2018-02-04T19:24:19.000072Z

Something about a JSON version of the error.

luke 2018-02-04T19:24:20.000058Z

(the fact that it doesn’t relay the actual error message is a bug)

luke 2018-02-04T19:24:22.000138Z

ok

luke 2018-02-04T19:24:26.000151Z

I’ll repro

jcf 2018-02-04T19:25:24.000124Z

I'm not familiar with the exception class, but I'd hope we can get more data out of it.

jcf 2018-02-04T19:25:38.000014Z

I hope this little project of mine is proving useful! 😉

luke 2018-02-04T19:26:08.000105Z

hah, definitely. There are clearly some rough edges to knock off here

jcf 2018-02-04T19:26:30.000037Z

I'm hoping to get some time to dig into the fileset file exhaustion stuff this week, but I'm pretty busy with client work and stuff.

luke 2018-02-04T19:26:54.000079Z

Tell me about it. I confess I’m finding it difficult to do maintenance/support and also maintain forward progress on the framework itself.

luke 2018-02-04T19:27:02.000018Z

but we shall press on

jcf 2018-02-04T19:27:15.000119Z

I'd think getting a few more people using the thing for hobbies/client work would be a solid start.

jcf 2018-02-04T19:27:41.000001Z

I found myself trying to convince someone that Arachne was worth another look. There were some interesting misconceptions about what Arachne really is I think.

luke 2018-02-04T19:28:28.000030Z

yeah. And in my experience talking about it doesn’t seem to make too much of a dent. So my goal has been to finish up enough pieces that it clicks for people when they check it out

luke 2018-02-04T19:28:50.000087Z

since the value you can derive from it is multiplicative with the number of existing modules you’re able to use

jcf 2018-02-04T19:30:28.000069Z

Having a critical mass of shared modules will light the fire I think.

jcf 2018-02-04T19:30:52.000070Z

All it would take (in my opinion) is showing a dev and production build of a minimal SPA.

luke 2018-02-04T19:31:22.000072Z

The data store stuff is important so you can show some CRUD, and I’d like to demo some deployment stuff as well

jcf 2018-02-04T19:31:46.000097Z

Unfortunately, that's a significant undertaking because I think you need to demonstrate: - Server-side rendering - cljs compilation - Shared routing logic - Testing of both client and server - …

jcf 2018-02-04T19:32:01.000051Z

I think you can get away with no DB layer for now if I'm honest.

jcf 2018-02-04T19:32:29.000007Z

It's easy enough for someone to do the CRUD piece the way they already do in Ped. interceptors/handlers.

jcf 2018-02-04T19:32:45.000094Z

That's just my two cents.

jcf 2018-02-04T19:33:38.000015Z

And the really hard part (for me at least) is the list above and a good dev experience. Not so much error messages as solid code reloading (tools namespace does not mix with cljs and Boot right now for example).

jcf 2018-02-04T19:34:15.000096Z

Anyway… enough about my problems. 😉

luke 2018-02-04T19:34:32.000108Z

heh, I agree with them all

luke 2018-02-04T19:34:35.000004Z

there’s a lot to do

luke 2018-02-04T19:34:49.000142Z

striking a balance between polishing what I’ve got already and realizing the full vision

jcf 2018-02-04T19:35:03.000146Z

80% of the core value prop. 🙂

luke 2018-02-04T19:35:26.000029Z

for example I’ve got some really cool data model stuff in the works. I hear what you’re saying about persistence, but this other stuff will be very attractive when I can get it going, and in line with the core vision.

jcf 2018-02-04T19:35:30.000020Z

The 20% can be done by people who get it and join in. The other modules come I guess on demand.

jcf 2018-02-04T19:36:19.000071Z

Defining Datomic schema from a unified representation, and then a sync. layer between client and server? Something not dissimilar to Replakativ?

jcf 2018-02-04T19:37:01.000037Z

There's a lot of boilerplate synchronising state. om.next has an interesting pattern that allows you to generate subscriptions from a view…

jcf 2018-02-04T19:38:38.000096Z

Am I missing something obvious with the :load-path and Webjars stuff?

luke 2018-02-04T19:50:06.000096Z

it looks right, but it’s been long enough since I messed with this that I’m trying to replicate before I get comfortable

jcf 2018-02-04T19:50:57.000118Z

I'm not wedded to any particular SASS framework, but want to show the asset pipeline working with third-party deps without needing NPM etc.

luke 2018-02-04T19:50:58.000004Z

having trouble running your app though; loaded a repl with bin/repl, when I try to load your dev/user.clj I get CompilerException java.lang.RuntimeException: Unable to resolve symbol: face in this context, compiling:(NO_SOURCE_PATH:4:68)

jcf 2018-02-04T19:51:15.000099Z

I don't use bin/repl at the mo. Just lein repl.

luke 2018-02-04T19:51:19.000089Z

ah, ok

jcf 2018-02-04T19:51:58.000074Z

Sorry! Rough edges here too apparently. I think that script uses deps.edn directly via clj but I needed Leiningen to get Arachne up and running.

luke 2018-02-04T19:52:24.000117Z

yeah I’m working on fixing that this week, I’d like Arachne to be usable fully from clojure deps

jcf 2018-02-04T19:53:30.000154Z

I need to take better notes! I got reasonably far but couldn’t get a decent REPL running from Emacs. Maybe UNREPL with help.

jcf 2018-02-04T19:53:37.000020Z

Not sure how that’s capitalised.

luke 2018-02-04T19:53:44.000020Z

yeah

luke 2018-02-04T19:53:53.000056Z

I just use inferior lisp directly with like one or two helper functions

luke 2018-02-04T19:55:26.000064Z

@jcf so what you are trying to do here should definitely work

luke 2018-02-04T19:55:37.000140Z

I will work on this today and get back to you

luke 2018-02-04T19:55:51.000014Z

either figure out what subtle thing you’re doing wrong or if there’s a bug in Arachne.

jcf 2018-02-04T19:56:15.000138Z

Ha. Cool, thanks. I may be in bed by the time you fix things, but will check in here tomorrow AM if I don’t hear back.

jcf 2018-02-04T19:56:23.000106Z

Thanks again, @luke!

luke 2018-02-04T19:56:53.000041Z

@jcf btw I’m having some weird artifact errors, you aren’t using a forked version of Arachne itself by any chance are you?

jcf 2018-02-04T19:57:05.000110Z

No forks.

luke 2018-02-04T19:57:11.000034Z

:thumbsup:

luke 2018-02-04T19:57:13.000092Z

I’ll figure it out then

jcf 2018-02-04T19:57:42.000084Z

I slurp the deps.edn into project.clj, which may cause some oddness, and I have installed versions of various Arachne libs into my local Maven repo…

jcf 2018-02-04T19:58:05.000065Z

BTW, I think it's Leiningen that complains about no HTTPS on the Arachne Frog-repo thing you're using.

jcf 2018-02-04T19:58:16.000159Z

Can't remember the name of the project you use for your private Maven repo.

luke 2018-02-04T19:58:29.000038Z

oh, right, the one hosted at maven.arachne-framework.orgb

jcf 2018-02-04T19:58:34.000092Z

That's the one.

jcf 2018-02-04T19:58:57.000046Z

It needs a valid HTTPS cert ideally. I probably wouldn't install from there at work. 🙂

luke 2018-02-04T20:00:01.000151Z

yeah, that repo is kind of a quick and dirty solution since I didn’t want to shove a ton of alpha stuff into Clojars. I didn’t realize lein started enforcing that

luke 2018-02-04T20:00:14.000151Z

I’ll probably move to git deps instead soon, since that does the same thing with fewer moving parts

💯 1
jcf 2018-02-04T20:01:12.000027Z

Clojure shipped a tonne of alpha stuff into public repos. 😉

luke 2018-02-04T20:01:31.000062Z

true but their release process doesn’t trigger a release on every commit like mine does

jcf 2018-02-04T20:01:32.000006Z

Don't see why you can't (I guess with .alpha on the end of all your nses).

jcf 2018-02-04T20:01:50.000017Z

> trigger a release on every commit like mine does Yeah, that's somewhat unusual. 🙂

luke 2018-02-04T20:01:52.000059Z

didn’t want to abuse their hard drive space

luke 2018-02-04T20:02:07.000117Z

basically I wanted to emulate the benfeits of git deps before those existed by continuously releasing every commit

jcf 2018-02-04T20:02:09.000015Z

Tell that to Arachne filesets! 😛

luke 2018-02-04T20:02:22.000005Z

hey now! Those should in theory work fine.

luke 2018-02-04T20:02:39.000113Z

still need to replicate that issue, but hopefully that’ll be easy once I have your project up and running

jcf 2018-02-04T20:02:56.000054Z

I'll tidy the project up a little and document how to run things now.

jcf 2018-02-04T20:03:35.000144Z

Just force pushed to my sass branch because I'm cavalier like that.

jcf 2018-02-04T20:03:42.000117Z

reset --hard if you want/need. 🙂

luke 2018-02-04T20:04:01.000066Z

it’s good, thanks

jcf 2018-02-04T20:20:16.000030Z

I think I might have fixed it…

luke 2018-02-04T20:20:30.000106Z

oh yeah? (sorry, I’m multitasking here so going a bit slow)

luke 2018-02-04T20:20:32.000044Z

what was it?

jcf 2018-02-04T20:21:08.000113Z

I didn't have ::webjars connected to ::sass-build in my arachne.assets.dsl/pipeline.

jcf 2018-02-04T20:21:42.000022Z

Just need to verify that I can get the Zurb bits. I've got a CSS file being served by ped assets now.

jcf 2018-02-04T20:25:51.000031Z

Yep. That did it!

jcf 2018-02-04T20:30:00.000090Z

@luke I think something like this will fix the problem, although maybe improving error messages will help as well. https://github.com/arachne-framework/enterprise-spa/pull/5

luke 2018-02-04T20:42:58.000076Z

aha

luke 2018-02-04T20:42:59.000069Z

yes

luke 2018-02-04T20:43:08.000086Z

neglecting to wire up the pipeline will definitely do it.

luke 2018-02-04T20:43:29.000086Z

one thing on my near-term roadmap is to build a “project browser” that will make that kind of thing more evident

luke 2018-02-04T20:45:17.000050Z

if the open files issue causes you trouble again, please open an issue on https://github.com/arachne-framework/arachne-fileset with steps to reproduce (including SHA of a sample project if you have one). I really want to get that that one nailed down.

jcf 2018-02-04T21:33:13.000020Z

@luke I can't reproduce the fd leak at the mo. I've just watched my open file count go from 7000 down to 1000.

jcf 2018-02-04T21:33:20.000043Z

Something's cleaned up somewhere.

jcf 2018-02-04T21:33:45.000083Z

Not sure if that's because I'm running a REPL via lein repl rather than by jacking in with Cider.

jcf 2018-02-04T21:34:04.000046Z

I'd guess there isn't a relevant difference between the two, but can't say for sure.

jcf 2018-02-04T22:03:09.000138Z

I've made jcf/usr private, but added you as a collaborator, @luke.