Fork me on GitHub
#clojurescript
<
2020-06-30
>
stopa00:06:25

Hey team, is there a recommended library / way that I could build a web repl for clojure? (i.e if I wanted to teach folks how to use clojure, and start them off with a repl I could customize)

stopa00:06:15

I see https://github.com/arichiardi/replumb. are there others you'd recommend?

lilactown00:06:15

If you’re interested in an out of the box solution for what you’re looking for, Maria is pretty good

lilactown00:06:10

Not sure how customizable it is but IIRC it is open source

stopa00:06:25

ooh man! that looks dope -- was thinking of creating something like above

lilactown00:06:56

Yeah. It has its own pedagogy so you’ll have to see if it matches what you want

❤️ 3
lilactown00:06:00

The source at least might be illuminating https://github.com/mhuebert/maria

❤️ 3
dvingo00:06:11

there's also klipse http://app.klipse.tech/ but it only allows self-hosted cljs (as far I know)

❤️ 3
stopa00:06:01

https://web.archive.org/web/20171224182623/http://tryruby.org/levels/1/challenges/0 ^ i remembered this for ruby -- could be cool to have something like this for clojure!

MorongÖa03:06:25

Dumelang (Hi), Does anyone run storybook with clojurescript?

Oliver George05:06:53

I've only done a proof of concept to see if I could get storybook and cljs webpack playing nicely together. In case it's of interest, this is the code: https://github.com/olivergeorge/webpack-repros/tree/storybook-vs-reagent

🙏 3
Oliver George05:06:13

(With luck someone who has more experience can give you better direction)

Karol Wójcik07:06:32

Can someone please explain me what is the difference between :rename-prefix & rename-prefix-namespace? If I got multiple modules should I use both? If yes, then should the value for both be the same?

thheller08:06:40

@karol.wojcik :rename-prefix makes all names start with that prefix so fooA. :rename-prefix-namespace instead puts everything onto one object, so foo.A. only use one.

Karol Wójcik08:06:10

@U05224H0W It seems then that having :rename-prefix-namespace is more beneficial than :rename-prefix when it comes to build size.

Karol Wójcik08:06:11

@U05224H0W Surprisingly rename-prefix-namespace impacts build size more than rename-prefix. Which should be used?

thheller09:06:31

that is up to you and what you want

thheller09:06:44

shadow-cljs defaults to using :rename-prefix-namespace for multi-module builds

Maik Wild15:06:11

Hi! I remember reading a medium (or similar) post about clojurescript performance compared to 10+ other javascript frameworks. I cannot find it anymore. Does anyone know what I am talking about?

Lone Ranger15:06:03

I remember what you're talking about 🙂

Lone Ranger15:06:30

I think the major focus was on reagent outperforming react.js though, but I may be thinking of something else. Articles like this: https://yogthos.net/posts/2017-03-26-ReagentReactView.html

Lone Ranger16:06:22

So do we have a #clojurescript specific conference yet? 😄 for the 22 of us that would show up?

😍 3
Alex Miller (Clojure team)16:06:01

Has never been a cljs only conf that I’m aware of

Lone Ranger16:06:48

That's because by the time we figured out how to organize one, a new organization framework came out and we had to start over rimshot

Lone Ranger16:06:00

seriously though I am looking for a way to consolidate the fragmented information/best practices. hmm.

dpsutton16:06:00

@dnolen ran a cljs masterclass through kitchen table coders http://kitchentablecoders.com/ the site states that "You can also ask us do redo them, and we'll do our best!"

👍 3
dpsutton17:06:46

I would absolutely join one of these now if they ran again. especially if they were remote. sounds like a great saturday to me

👍 9
strsnd22:06:56

Hello, is it possible to use memfn in with -varname? e.g. if I want to extract multiple properties from an object ((juxt (memfn -a) (memfn -b)) obj) ? Doesn't seem to work, is there a short better alternative?

noisesmith22:06:47

I think #(.-a %) and #(.-b %) are the go to, though you could just combine into (fn [o] [(.-a o) (.-b o)])

noisesmith22:06:11

see also goog.object if the class might be advance-compiled

strsnd22:06:13

@noisesmith your first proposal doesn't work if I am already in a #() context, thus I will stick to the last one, thanks

noisesmith22:06:14

@hannes948 the translation between the two is pretty simple, and can be exposed with '

user=> '#(.-a %)
(fn* [p1__1282#] (.-a p1__1282#))

🤯 3
strsnd22:06:42

oh, I didn't know that one can expand functions like that with '# . I see.

noisesmith22:06:59

that works with any reader macro - ' doesn't prevent read expansion, but it does prevent evaluation

noisesmith22:06:06

so you get the expanded unevaluated form

strsnd22:06:54

I wonder if one can change the memfn macro so that this is possible. the only reason seem to be that it always adds parenthesis (. ~t (~name ~@args) around name, even if args might be empty

strsnd22:06:21

ah, good to know