Fork me on GitHub
#clojurescript
<
2016-01-13
>
darwin01:01:17

I have just released first alpha version of Dirac DevTools: https://github.com/binaryage/dirac still needs a lot of polishing and I still have to write tons of docs, but you can give it a try by following the demo instructions here: https://github.com/binaryage/dirac#a-demo-time thanks for testing! @jaen, tomorrow I will write down some instructions how this^ could be potentially used with boot

jvtrigueros02:01:02

So, I'm just getting started with ClojureScript, but I quickly realized that maybe I don't need to delve into Om right away. I started by creating a static page with [magnars/stasis](https://github.com/magnars/stasis) + [weavejester/hiccup](https://github.com/weavejester/hiccup). When I want to add clojurescript to the equation, what's the best way to go about it? I was using figwheel to help me out, but now I'm all confused and lost.

meow02:01:12

if you don't fully understand that and are skipping ahead to Om you are going to struggle

meow02:01:29

stop and do that quickstart until you understand it

jvtrigueros02:01:03

Gotcha, thanks @meow! My biggest struggle was figuring out that leiningen would do a lot for me. I come from a JS/Node.js background.

meow02:01:44

lein or boot

meow02:01:48

both are good

jvtrigueros02:01:54

I've stuck to lein because most tutorials use lein. Is boot any better or just different?

meow02:01:44

completely different

meow02:01:51

both are good because of that

meow02:01:56

learn lein

eyelidlessness03:01:14

lein uses declarative configuration, boot uses composable code. in a naive way, it's sort of akin to grunt vs gulp

jplaza04:01:54

Just curious, what do Clojurians used for frontend web development before any React wrapper existed.

eyelidlessness04:01:12

angularjs and sadness

eyelidlessness04:01:20

^ just speaking for myself

eyelidlessness04:01:51

sadness 1.x tho. that sadness 2.x is crazypants

meow04:01:51

I believe Luminus used to use something other than Reagent in earlier versions http://www.luminusweb.net/

jplaza04:01:47

I don’t see Cognitect using something like luminous, wonder what they used, or still use

meow04:01:55

I've only been doing clojure/script for 8 months so I kind of got in right when the react wrapper stuff was in full bloom

jplaza04:01:46

Why did you start using Clojure? I know, silly question, I really like Clojure and try to talk everyone I know into it, but it still feels alien for lots of developers

meow04:01:55

Not silly at all

meow04:01:10

I've been programming for 30 years

meow04:01:44

python since 1999 and was burned out on python and was looking for something else and "functional" kept coming up

Alex Miller (Clojure team)04:01:50

@jplaza: we do a lot of projects at Cognitect with a lot of different approaches

meow04:01:53

and some references to clojure

meow04:01:19

but I choose QML instead because I wanted to do UI stuff as well

meow04:01:10

after a couple of months with QML I wasn't happy so I looked again and this time tried clojure and the rest is history

meow04:01:29

very happy with that decision based on both the language and the community

meow04:01:56

overcoming my OO habits was hard but awesome people like @alexmiller helped a lot

eyelidlessness04:01:55

i got into clojure when my team at the time chose storm for a project (really a set of projects) and i couldn't stand the thought of writing java. got buy-in from the team, had a ton of headaches, but few if any clojure-related. when it came time to start a green field frontend project, put clojurescript against typescript and a variety of javascript solutions, and clojurescript was a clear winner in terms of tooling, libraries, and development joy

jplaza04:01:27

@alexmiller: I’ve been following Pedestal since you guys launched it and back then it came with a pedestal-app part that was discontinued later. So, the need for something like that was evident.

eyelidlessness04:01:57

also put clj(s) garden against sass and chose garden. it's been a total joy to work with

jplaza04:01:33

@meow: I’ve been doing Clojure for 2 years now and it’s been great. As you said, “functional” resounded. A friend told me about it and we started hacking away.. has been an amazing experience so far.

meow04:01:20

is everyone prepared for the #C0J5T38VB ?

Alex Miller (Clojure team)04:01:11

@jplaza: yes, we built several systems using pedestal-app before React. I think we've probably had projects using all of the React wrappers at one point or another.

jplaza04:01:27

@alexmiller: nice to hear you are continuously experimenting simple_smile

eyelidlessness04:01:17

@alexmiller: with all that time under your belt... do you have a clear personal preference?

meow04:01:45

@alexmiller: just curious - how many slack channels are you subscribed to

meow04:01:04

and what's your favorite reactji

Alex Miller (Clojure team)04:01:59

@eyelidlessness: to be clear, I didn't work on any of those - those are in the consulting team

Alex Miller (Clojure team)04:01:40

@meow: re channels, don't know how to tell. re reactji - I don't know what that means.

meow04:01:12

try it, it's fun

meow04:01:44

fun for me at least. annoying as (can't say f*ck here) for everyone else

eyelidlessness05:01:13

@meow: not going to tempt the fates, but wait... is there actually a policy in place that says we can't use that word? are there other words specified?

meow05:01:35

I ought to know since I've been helping with #C0CB40N8K and copy/pasted the CoC but I don't know for sure

meow05:01:39

let me check

meow05:01:53

The use of profanity is heavily discouraged. Please refrain from using language that could be deemed inappropriate. We use this Google list of bad words as a guideline for inappropriate language. Participants using inappropriate language will be asked to edit messages when it happens.

meow05:01:09

I'll leave it to others to judge my dropping the word fuck all over the place...

meow05:01:29

Anyhow, I do try to toe the line most of the time.

meow05:01:35

Any use of profanity is just part of my show. I'm a reactji performance artist, and we tend to be rather edgy.

meow05:01:30

And I have a license and liability insurance so... I'm covered.

meow05:01:03

Totally and completely 😇 even if I'm 🎸

meow05:01:30

🎸 was as close to :guilty: as I could :emoji:

eyelidlessness05:01:31

well i am dissapoint at that aspect of the CoC, but it's also respectably vague

mudphone05:01:24

@juhoteperi, @darwin, @martinklepsch, @jaen: thanks for your help yesterday, turns out I needed to bump Om to alpha 28 to get advanced optimizations to work.

eyelidlessness05:01:45

so i've been hilariously working on a clojurescript implementation of alter-var-root because i'd like to use it in a cljc file... i'm not sure if it's been omitted from cljs on principle or for other reasons. i have an implementation that works for my purposes (but surely has edge cases i haven't accounted for), and i'm curious how i should proceed with it

skardan07:01:24

@dnolen: I have a question regarding CLJS wiki. Mike Fikes suggested I should document setup of remote nodejs repl. 1) Is it OK to edit wiki pages directly or the update should be sent to you for review? 2) Where would be appropriate place to document remote repl? "Quick Start", "Running REPLs" or new page?

skardan07:01:25

@darwin: dirac looks incredible, thanks!

krchia08:01:38

what are my options for image processing in cljs?

krchia08:01:23

an opencv wrapper for clojure and mix it with cljs code?

jaen08:01:45

@jvtrigueros: I'm probably a bit late, but https://github.com/magomimmo/modern-cljs/tree/master/doc/second-edition is probably the best introduction to how set up Clojurescript in a project. It uses boot though. Like eyelidlessness mentioned it's a bit like grunt vs. gulp in the node world - one is declarative configuration, other is scriptable builds. If your build starts to get more complex boot pulls ahead IMO. One of things where it starts being noticeble is using Clojurescript - my experience with lein-based Clojurescript tooling had been fiddly at best. boot-based though was a breeze. That said it's about a years since I've tried boot, so maybe lein tooling also improved.

jaen08:01:12

@eyelidlessness: I suppose it had been omitted because it can't work at runtime in Clojurescript (no real vars), but unsure why would there exist something like it for the compilation phase. If what you wrote works, then that's neat

jaen08:01:17

Looking at your code though I see you're doing set! so you seem to be modifying things at runtime. Curious if it will have any side-effects.

ragge08:01:28

@juhoteperi: yeah, that's him simple_smile

magomimmo08:01:44

@jaen: thanks for the kind word. I would add that with leiningen cljs is a kind of second class citizen, which depends on the fact that when leiningen has been created cljs was not even in Rich mind.

dnolen12:01:37

@skardan: hrm what is there to document?

skardan12:01:15

@dnolen two tricks how to setup repl with remote nodejs eval

skardan12:01:19

no breakthrough, but it takes some time to figure it out

dnolen13:01:39

@skardan a Remote REPLs page with a Node.js section is welcome, other people can fill out the other cases as they develop.

dnolen14:01:43

@tony.kay: looking at your PR today, have a couple of brief questions

dnolen14:01:03

oops wrong channel

mrjaba14:01:31

Hi Everyone, could anyone recommend a good beginners tutorial for Clojurescript? Also - could anyone explain cursors to me in Om.. I've read the docs on it, but it's not quite clicking! As far as I can see, it's some data structure that contains the value and a path back into the global atom in the page?

mrjaba14:01:36

Sorry if that question has been asked many times before!

dnolen14:01:06

@mrjaba: there’s an #C06DT2YSY channel though things are more focused on Om Next these days - if you’re just starting out with ClojureScript - I would avoid Om for a least a little bit - you’ll be drowning in novelty.

dnolen14:01:16

@mrjaba: do the Quick Start

mrjaba14:01:53

I'm up to the advanced tutorial at the moment.. somehow managed to skip the quick start! Oops simple_smile Definitely feel like I'm drowning in novelty

mrjaba14:01:19

cool, will take a look in the #C06DT2YSY channel thank you

mrjaba14:01:46

also .. thanks for writing it all, it's very amazing

dnolen14:01:08

a lot of people seem to like this one ^

mrjaba14:01:42

fantastic, thank you

martinklepsch14:01:53

This is also a good getting started resource https://github.com/magomimmo/modern-cljs/

mrjaba14:01:43

that looks great too, thanks simple_smile

martinklepsch14:01:53

I guess ClojureScript Unraveled is more about ClojureScript as a language and Modern CLJS covers more practical aspects like setting up a project, how to work with the DOM etc.pp.

martinklepsch14:01:06

anyone correct me if I'm wrong

jaen14:01:58

Yeah, I think that's a prety fair assesment.

jaen14:01:29

Clojurescript Unraveled talks mostly about the language itself, relegating tooling to appendices mostly, while Modern Clojurescript gets you through a boot project setup and more practical aspects of doing Clojurescript (like certain libraries).

jaen14:01:46

If you didn't have any experience with Clojure then probably doing 3rd chapter of Clojure Unraveled before Modern Clojurescript would make sense (and later returning for chapter 5 and the appendix about core.async).

jaen14:01:53

If you had Clojure experience then Modern Clojurescript by itsefl should be enough. But that's just my viewpoint (and I'm biased towards boot), YMMV.

mrjaba15:01:20

I've been working with Clojure for a little while now, so perhaps just modern cljs.. I'll take a look at both and see how I get on

mrjaba15:01:29

thanks for all your help!

bojanx10015:01:18

Hi, is there anyone who successfully configured figwheel to open a file in Intellij on windows using

:figwheel {:open-file-command "open-in-intellij"}
?

eyelidlessness16:01:44

@jaen: (re your comments on my cljs alter-var-root impl) yeah it just compiles to set! calls, the rest uses details from the compile phase to resolve a symbol passed to the macro to its var (since set! expects a var passed directly). it's pretty hacky and would break with any changes to the compiler implementation details it exploits, so i don't really know what to do with it

slotkenov16:01:05

Would you recommend react or om, for a new web app that needs a good ux and needs to be able to adapt quickly?

jaen16:01:48

I would recommend reagent over om.prev. It's certainly simpler to start out and if you need more complex, flux-like scaffolding then there is always re-frame.

jaen16:01:17

But if you anticipate your application to get complex, require complex realtime synchronisation with the backend, being able to deal with network latency and flakiness then om.next is worth looking at. The way it's structured isn't as simple as reagent+re-frame, but is certainly powerful for more complex applications.

slotkenov16:01:19

Cool, didn't know re-frame

jaen16:01:48

Yeah, it's pretty nice.

jaen16:01:18

And also has awesome documentation, including those great reagent tutorials - https://github.com/Day8/re-frame/wiki#reagent-tutorials

jaen16:01:55

@eyelidlessness: yeah, that doesn't seem like something the maintainership would be interested in supporting. But if it works for you, then neat!

slotkenov16:01:56

OK, I have looked at om next, but can't use that now for a production app unfortunately, since it's only still alpha

jaen16:01:50

Well, I've heard it's fairly solid even though it has the alpha tag. Kinda like reagent - it's still 0.6.0, but people are using it in production.

jaen16:01:53

So if you feel it's additional complexity is worth it for the gains in your case I'd probably go with it, but I can understand why you would be uneasy to.

slotkenov16:01:07

Oh, that sounds promising!

slotkenov16:01:01

Yeah, I need to see if the app might get that complex. But I don't think it will

slotkenov16:01:22

So reagent might sound like a good option then.

slotkenov16:01:19

Is it easy to make use of the ui widgets available to react, from clojure/reagent?

jaen16:01:29

Sure, relatively easy.

jaen16:01:41

Most of the time reagent/adapt-react-class is quite enough.

jaen16:01:59

That depends on the exact widget thought, probably.

jaen16:01:45

https://reagent-project.github.io/news/news050.html ctrl+F "Simple React integration" for a cursory overview.

meow17:01:15

I wonder why more devs don't use tonsky's Rum for React work? When I looked at his source code it struck me as quite elegant and reasonable. I know they are using it in production apps, but I don't see it get discussed much.

jaen17:01:57

Well, I agree it's pretty cool, mixins seem like a great feature and it doesn't require pixie dust on atoms like reagent does, but probably not a lot people use it because they are fairly invested in the other two wrappers.

jaen17:01:25

I wanted to try it once or twice when I had to write a university project, but in the end it was just faster for me to get reagent, re-frame and re-com ; d

jaen17:01:36

One of these days, though...

meow17:01:41

plus it works well with tonsky's datascript

jaen17:01:07

Well, turns out reagent can to - someone once told me about :on-dispose on reactions.

meow17:01:30

if I had the spare time I would create an app using rum/datascript

meow17:01:59

seems like a gem that needs a light shone on it

meow17:01:44

all discussion about it is on gitter

jaen17:01:31

It is also a bit more rigid wrt. atoms - you can only be reactive on atoms that you pass as arguments if I understand it correctly.

meow17:01:43

I just think Tonsky did a brilliant job of decomplecting his solutions

jaen17:01:34

Yeah, I love datascript for one.

slotkenov17:01:15

My original question was actually if you'd recommend writing a react app in js or cljs ;-)

darwin17:01:43

I have used rum in Dirac: https://github.com/binaryage/dirac/blob/master/src/options/dirac/options/ui.cljs just a small thing, didn’t have a single problem with the lib will definitely consider using it in my future project

eyelidlessness18:01:29

I went ahead and released cljs alter-var-root, cos why not https://github.com/eyelidlessness/alter-cljs

jaen18:01:50

@slotkenov: welp, my bad; I kind of assumed you've meant reagent not the JS-React '

jaen18:01:09

But I guess then a lot depends on your language preference.

jaen18:01:52

ES6 is reputedly pretty okayish, but it is still an imperative, mutable, prototype-based language at heart, which brings it's own problems.

jaen18:01:25

On the other hand Clojurescript avoids those being functional and immutable by default, but having nice mutable state control mechanism in atoms. It also has a really high power ratio - things that seemed like endeavours in Javascript seem pretty easy to accomplish by comparison in Clojurescript.

jaen18:01:09

So if you're not afraid of having to write a lot of parens and sometimes less-than-comprehensible errors/stacktraces, I would probably suggest going with Clojurescript.

slotkenov19:01:17

Thanks jaen! I certainly prefer Clojure, obviously simple_smile. Only don’t have to much experience with it yet. And getting other developers with clojure experience, or willing to obtain it, is a hurdle as well. This makes the choice for Clojure less easy

jaen19:01:49

If you scroll a bit above your questions there were some recommendations for Clojurescript tutorials. Could be helpful.

meow19:01:08

@darwin: any reasons that would keep you from using Rum now that you used it once?

dnolen19:01:03

@slotkenov: I think the most important question here is whether you are already using Clojure on the backend

jaen19:01:49

Also yeah, I can imagine Clojurescript being a harder sell due to lack of developers and while it is a really simple language (module warts, but what language doesn't have those), the difference of paradigms between functional and imperative, immutable and mutable can be daunting to programmers new to those concepts.

slotkenov19:01:42

@jaen Yeah, already saw those books! Paradigm shift is the hardest part indeed

slotkenov19:01:01

@dnolen There is no backend yet either. While we have a backend developer who will be developing in java. The frontend will be one project together with the rest services. Which means I could definitely write those rest services in clojure as well. That’s a win of course.

dnolen19:01:57

@slotkenov: if you already using Clojure on the backend then using ClojureScript on the frontend is kind of shoe-in

dnolen19:01:12

if you aren’t then there are real tradeoffs to consider

slotkenov19:01:30

So it should start at the backend you’re saying…? simple_smile

slotkenov19:01:57

What tradeoffs are you talking about when you use only ClojureScript?

dnolen19:01:05

ClojureScript was created to be used with Clojure

dnolen19:01:30

if you aren’t using Clojure then the obvious benefits start diminishing very rapidly

dnolen19:01:01

i.e. at that point why not TypeScript or ES6 + React, or whatever

slotkenov19:01:40

hmm, interesting thoughts

angusiguess19:01:43

@slotkenov One tradeoff is that you might have to write libraries twice rather than just once.

angusiguess19:01:16

Another is that you probably don't use edn as a serialization format, so your data structures don't map as nicely as they would with clojure v. clojurescript.

dnolen19:01:54

@slotkenov: I would say that the Clojure community has realized that this whole “backend and frontend are two distinct things” is just a bunch of bull

dnolen19:01:19

you are building a system - being able to share code and philosophy has immeasurable benefits for system design

angusiguess19:01:22

The clojure design philosophy already stresses separating concerns by shipping data around and transforming it, doing it from front-end to back-end is a natural extension of that.

slotkenov19:01:41

The problem would be having a java backend then; there is no java at the frontend. You would have the tradeoffs anyway

dnolen19:01:20

right so if you’re using Java then it’s a tossup

dnolen19:01:59

people do couple Java with ClojureScript - it’s not unheard of just not common

slotkenov19:01:28

Coupling ClojureScript with rest services written in Clojure would make sense. And our backend would contain further isolated backend (micro) services (written in Java).

tommichaelis19:01:43

@martinklepsch: Regarding incremental dom, I've been having a bit of a play with building a reagent-like wrapper if you're interested - https://github.com/tommichaelis/inkle

darwin19:01:47

@meow: I cannot tell, I have used it only once for a really simple page. I have yet to discover its shortcomings

jaen19:01:48

Hmm, being able to easily share code and data between the backend and the fronted using - respectively - cljs and transit when writing both in Clojure is certainly a boon, but I don't think you loose all that much when doing only the frontend in Clojurescript. I had to write a frontend part of a university project where the backend guys wrote it in Groovy.

jaen19:01:46

I was still pretty glad I could've used Clojurescript, reagent and such on the front rather than Javascript. I don't have anything against the language, but it just doesn't give you as much agility as Clojure does IMO.

jaen19:01:23

One thing that was pretty annoying was dealing with JSON using Schema, but it turned out in a later project I was just doing reverse coercion wrong and it's workable.

dnolen20:01:27

@jaen right I was arguing from the perspective of adoption

dnolen20:01:57

if you already know ClojureScript very well - obviously you might develop a strong preference about any project that targets JS environment

pandeiro20:01:01

the typescript and babel compilers are how much faster than cljs?

dnolen20:01:53

@pandeiro: I haven’t seen any real evidence of that - but pretty impossible to draw a comparison

pandeiro20:01:02

(i should say cljs + closure compiler, advanced is where it gets painful)

pandeiro20:01:15

esp. on e.g. circleci machines

dnolen20:01:44

right nothing you can do about :advanced except make sure you are giving the JVM more RAM on the build machine

dnolen20:01:49

1-2g at leaset

dnolen20:01:04

otherwise it’ll take forever because of GC

pandeiro20:01:05

i think that is really the only arg i would make against cljs adoption, honestly

dnolen20:01:49

that said it’s not clear that typescript or babel + whatever optimization settings you use actually uses significantly less RAM or time

dnolen20:01:13

building React cold on my i7 mac takes 20+ seconds

jaen20:01:16

@dnolen: right, just wanted to point out "diminishing very rapidly" sounds quite discouraging, while even using just Clojurescript is a productivity bonus over Javascript (considering similar skill level in both). I certainly do agree that having Clojure on the backend as well is even better though.

dnolen20:01:02

@jaen while I of course agree with you if I’m not feigning objectivity simple_smile

jaen20:01:21

As in, trying to describe it in a way as to sell Clojure on both ends?

dnolen20:01:07

no I mean the relative merits of ClojureScript as standalone compile-to-JS solution

jaen20:01:41

Ah, gotcha, I kinda misparsed the sentence.

slotkenov20:01:40

Nice discussion simple_smile

slotkenov20:01:25

I would need to adopt something anyway. Be it ClojureScript, React, ES6, Elm or Angular2

slotkenov20:01:37

I really like Clojure and the biggest hurdle, the paradigm shift to functional programming, I have already taken (at least at a theoretical level)

jaen20:01:30

Elm has great type errors (something I wish Clojure had) but no typeclasses (ain't fun writing This.map, That.map instead of just a generic map). Kind of a toss up. Also forces FRP on you, which while an interesting paradigm is yet another thing to learn.

jaen20:01:39

Clojurescript wins over it in simplicity, in general.

jaen20:01:28

As long as you start to be comfortable with functional programming there's not all that much to writing Clojure, relatively to - say - Haskell.

jaen20:01:35

You can just pick parts as you go along.

jaen20:01:42

The hardest thing in Clojure for me was grokking component to be honest, rest was relatively straightforward.

jaen20:01:58

Tooling used to be a bit of a pain, but now with boot it's pretty painless.

slotkenov20:01:47

Yeah, thats great, just pick the libraries you need and combine them

jaen20:01:48

Also this - https://github.com/binaryage/cljs-devtools - was a lifesaver; not sure if any other compile-to-JS language has something similar.

slotkenov20:01:53

What do you mean with component?

slotkenov20:01:16

Only just heard of boot, have to look into that

slotkenov20:01:25

And the dev tools as well simple_smile

jaen20:01:45

Re: boot try the Modern Clojurescript mentioned before, it's really neat.

jaen20:01:16

There is a library called component that lets you manage stateful objects (like database connections, queues, whatnot).

jaen20:01:24

I couldn't quite figure out how to handle it at first.

spieden20:01:31

hmm, does anyone use the figwheel repl? i can’t seem to require any of my project or third party namespaces from it, only cljs.core ones

jaen20:01:58

It's mostly used in backend development, though. Both component and it's alternatives like mount and bounce have Clojurescript versions, but for better or worse I don't see people using them as much for the frontend.

jaen20:01:05

(could be proven wrong though)

spieden20:01:12

ah nm, rtfm

slotkenov20:01:09

Thanks for the great info! I’m off to bed now

fappy20:01:22

@jaen @slotkenov when looking at the library called component, be sure to also check out mount as an alternative

jaen20:01:31

Mentioned it later as well if you noticed, along with bounce ; d

jaen20:01:54

I think I like bounce more than mount, it feels too... implicit.

jaen20:01:30

That said I didn't experiment with either more in-depth yet.

fappy21:01:33

ah. I should get my eyes checked 😛

jaen21:01:00

Well, not hard to miss things in a wall of text though ; d

spieden21:01:26

is it possible to load-namespace in a figwheel repl an ns that’s not in the dep tree for the currently loaded page?

spieden21:01:38

can’t seem to load in arbitrary namespaces

dnolen21:01:52

@spieden: should work just fine

dnolen21:01:07

however you can’t just add a dep to your project and expect to load that w/o restarting your REPL

spieden21:01:36

wow, making http requests from a REPL in cursive and inspecting them in the Chrome dev tools is pretty great 😃

meow21:01:57

be sure to check out #C09GR9UJC as well - they are awesome

peeja21:01:54

I'm working on our Karma test setup, and I notice a lot of ClojureScript Karma configs include a cljs_deps.js file, but our CLJS build doesn't appear to output one. What's that file supposed to be?

dnolen21:01:25

@peeja: you shouldn’t need to provide that - the compiler generates it

peeja21:01:45

I mean that I'd load it into the browser to help run my tests

dnolen21:01:13

yes you need it if you don’t use :main under :none

peeja21:01:08

Huh, I don't use :main in my dev (`:none`) build, but I'm not seeing a cljs_deps.js in the :output-dir

dnolen21:01:19

ah I think in the old days maybe you needed it

dnolen21:01:25

but it might be automatic now

dnolen21:01:33

and it’s harmless to include if you do

peeja21:01:40

:thumbsup:

dnolen22:01:08

@peeja: ah yeah reminded myself by looking at closure.clj

dnolen22:01:27

the main script is the deps file if you don’t supply :main

dnolen22:01:42

also under Node.js we always generate cljs_deps.js and include it for you

peeja22:01:11

Wait, you mean if you do supply :none?

peeja22:01:31

Ah, :main simple_smile

dnolen22:01:04

sorry yeah typo

fappy22:01:25

Is there a trick to using a library that has .cljx files? lein is saying No such namespace: automat.core, could not locate automat/core.cljs, automat/core.cljc, or Closure namespace "automat.core" and automat has .cljx files

fappy22:01:41

hmm... "cljsbuild crossovers are deprecated, and will be removed eventually. You should never use them. Please use either reader conditionals (available in Clojure >= 1.7.0-beta2 and ClojureScript >= 0.0-3255), or cljx to target both Clojure and ClojureScript from the same codebase" ... ah... "I am happy to announce that the reign of cljx is over: Clojure 1.7 brings us glorious Reader Conditionals (AKA .cljc files)" ... so perhaps automat should be updated to use .cljc files

darwin22:01:27

ok, I have finished the first version of the installation docs for Dirac: https://github.com/binaryage/dirac testers welcome 😝

spieden22:01:40

@darwin: wow that looks great! does it use the self-hosted cljs compiler?

nonrecursive22:01:24

oh man, :parallel-build cut my initial build time in half. this is awesome

darwin22:01:36

@spieden: no, it connects to an nREPL server

spieden22:01:00

ah ok, just curious

jaen23:01:44

hm, but does that expression even make sense? The tags seem to affect only :eval keyword, is that intended?

fappy23:01:14

porting can include fixing simple_smile

jaen23:01:42

What I mean is I'm not sure what's the intended meaning of that.

fappy23:01:53

ya me neither

fappy23:01:59

not my lib. but would like to use

fappy23:01:57

I'm going to guess intended meaning is only try the first case for clj.

jaen23:01:45

Then it should've been

(case backend
  #+clj :eval #+clj eval/compile
  :base base/compile)

jaen23:01:53

IIRC how to do cljx