Fork me on GitHub
#clojurescript
<
2015-08-02
>
meow00:08:15

I used LT for a while and recently began using Cursive and really enjoy it.

shaym00:08:29

@grounded_sage: you can try the git version 0.8 , for me on linus its much faster then eclipse or idea

potetm00:08:08

@grounded_sage: If you know vim pretty well, you might do Cursive + IdeaVIM. I use that for my day to day, and I like it a lot.

jeffmk00:08:28

Anything else would be uncivilized.

grounded_sage01:08:43

I'm not invested in anything. I started learning programming about 8 months ago. Studying design so has been a part time thing. Started with JS but upon hearing the news on wasm decided it's time to do Clojure all the way. I do like the idea of my tools and environment being all in Clojure or ClojureScript so will probably bounce between the two.

lazy-lambda04:08:28

If you use vim don't forget to checkout fireplace

fluke77705:08:08

anyone used cytoscape in cljs? I am trying to use it (via js interop) but I am probably doing something stupid wrong

niwinz07:08:52

I'm experimenting some troubles using the new `{:module-type :commonjs} option, anyone have used it?

nikolap08:08:14

hey folks -- I've been looking at Planck (https://github.com/mfikes/planck) which made me a tiny bit jealous I'm not using OS X simple_smile is anyone aware of any attempts at trying to do something similar, but with Qt? i.e. wrapping the cljs compiler in a Qt webview? since Qt uses JSC, it seems like it should be doable.

nikolap08:08:08

(I guess it would also get some bonus points for being cross-platform)

dottedmag08:08:36

Why Qt at all?

nikolap08:08:45

simply to wrap the entire thing in a UI of sorts and to make it easy to distribute as a stand-alone REPL (a la Planck)... I've wondered specifically about Qt as it's omnipresent among platforms, has a JSC-powered webview, and I've briefly worked with it before simple_smile

martinklepsch09:08:25

@nikolap: I understood Planck to be a console program that doesn't use a webview but somehow talks to JSC directly

nikolap09:08:51

@martinklepsch: indeed, after a bit of further careful exploration, I've come to the same conclusion simple_smile thanks for the heads up!

lazy-lambda10:08:31

it is possible to compile jscore for linux

lazy-lambda10:08:57

Maybe, for windows as well

ul10:08:52

but it also possible to run repl/cljs interpreter under the node

ul10:08:07

and get roughly planck analog for node if i understand correctly

martinklepsch11:08:03

Is it currently possible to create custom @define’s from Clojurescript as described here: https://developers.google.com/closure/compiler/docs/js-for-compiler#tag-define ?

martinklepsch11:08:23

I tried with the following but when I try to override it by passing it in :closure-defines it’s still the original value

(js*
 "/** @define {boolean} */
  el.app.APP_DEBUG = true;")

meow12:08:37

@pri is doing some interesting repl stuff here: https://github.com/priyatam/replify

meow12:08:08

@pri: Can you explain a bit about where replify fits in the landscape of repls compared to Planck and so forth?

martinklepsch12:08:21

👍 Would also be curious if it could be a replacement for weasel

mfikes12:08:26

@meow: One way to characterize Replify is that it is a set of facilities built on top of the shipping REPLs. (Take a peek at the source; you’ll see the kinds of stuff it offers.)

jellea12:08:46

Just got my bootstrapped Quil editor to work! 😄 http://jellea.github.io/QuilFiddle/ Try adding (q/fill 0) to draw function and press cmd+enter! Live coding in the browser!

darwin13:08:32

@dnolen: just a quick question, I’m trying to compile clojurescript to target web workers, it looks that I need https://code.google.com/p/closure-library/source/browse/closure/goog/bootstrap/webworkers.js any prior work in this field?

darwin13:08:56

it looks like in ideal case I would just specify :target webworkers, like I do with nodejs

dnolen13:08:13

@darwin: people have used WebWorkers with ClojureScript, it works fine

dnolen13:08:17

not going to add configuration for it

darwin13:08:28

ok, np, will just write my boot script by hand

darwin13:08:42

just fighting some relative path issues with goog.base

dnolen13:08:34

@martinklepsch: you want ^{:jsdoc [“@define”]} meta

dnolen13:08:55

@niwinz: I would not try to use the new modules stuff unless you’re experimenting, it requires a custom build of Closure until they cut a new release

mikethompson13:08:19

@martinklepsch: do this: (def "@define {boolean}" SOMETHING true) or is it (def SOMETHING "@define {boolean}" true) I can never remember (update: the 2nd one is right)

mikethompson13:08:50

In particular .... notice that you CAN'T change that default value (`true` above) unless you are doing :optimizations :simple or :advanced. When :none it doesn't matter how you try to redefine that constant, it aint going to work.

dnolen13:08:42

@mikethompson: what you just wrote isn’t a valid way to do that

dnolen13:08:18

well the former one, the later one will work

mikethompson13:08:25

yeah, see the link. It explains it fully, I hope. There were some hard-won lessons.

dnolen13:08:57

making defines work under :none wouldn’t be a particularly challenging task, another good way to get the hands dirty with the compiler for the first time.

martinklepsch16:08:14

@dnolen: In that thread @mikethompson linked you said: "It works for ClojureScript originated Closure Defines, not Google Closure originated ones.” — Does that mean I should be able to override things I defined like (def ^{:jsdoc ["@define {boolean}”]} APP_DEBUG false) with :optimizations :none?

dnolen16:08:46

not supported, someone needs to make it work for :none

dnolen16:08:40

landed a bunch of optimizations yesterday for people building self-hosted ClojureScript stuff on the web, now documented https://github.com/clojure/clojurescript/wiki/Optional-Self-hosting

dnolen16:08:51

by following these instructions you can get your project down to ~450K gzipped, http://swannodette.github.io/2015/07/29/clojurescript-17/ updated

dnolen16:08:10

for some fun comparison the top jpeg on my post is 100K simple_smile

martinklepsch16:08:16

@dnolen: is there a JIRA ticket already?

dnolen16:08:39

@martinklepsch: not sure you should check

martinklepsch16:08:13

@dnolen: can’t find any but my JIRA-fu might be insufficient 😛

dnolen16:08:46

@martinklepsch: I would just search for “closure define"

dnolen16:08:55

if nothing comes up, then unlikely and go ahead and open a ticket.

martinklepsch16:08:48

then there is none simple_smile — just to make sure I understood correctly: "It works for ClojureScript originated Closure Defines, not Google Closure originated ones.” — is this mixed up? i.e. it works for closure originated ones but not cljs ones?

mhuebert16:08:57

is it possible to specify in deps.cljs that a :foreign-lib depends on the :foreign-lib of another dependency? e.g. should the following deps.cljs work? (I’m trying to load a :foreign-lib that depends on cljsjs.codemirror; in this example, overlay is loading before cljsjs.codemirror & therefore fails) http://i.imgur.com/kjo4niw.png /cc @martinklepsch

mhuebert16:08:38

@martinklepsch: ok, I’ll keep debugging then simple_smile

martinklepsch16:08:14

@mhuebert: I assume you have cljsjs/codemirror on your classpath yes?

mhuebert16:08:39

@martinklepsch: ie. in :dependencies in project.clj? yes

martinklepsch16:08:14

@mhuebert: might be good to check if just doing (:require cljsjs.codemirror) works fine

mhuebert16:08:03

I can see both the CodeMirror JS & the overlay js in the compiled js file, but in the wrong order

mhuebert16:08:30

& I don’t get an error at compile time, only when I load the page

mhuebert16:08:16

i’ll try making an isolated example

dnolen17:08:12

@martinklepsch: this just an enhancement over Google Closure

dnolen17:08:34

it provides nothing itself for this, so not a real defect

dnolen17:08:04

onetom: aget is only for arrays - the fact that it works for objects is coincidence

dnolen17:08:22

it’s long standing pattern that we’re encouraging people moving away from

onetom17:08:48

i will discourage my colleagues too then

dnolen17:08:16

goog.object also contains many helpers for POJSOs that we’re never going to implement

dnolen17:08:31

people should familiarize themselves with this namespace

mhuebert17:08:55

@martinklepsch: I got it to work by changing the name of my provides to something other than “cells.*” but I can’t reproduce the issue in a clean repo.

martinklepsch17:08:02

that sounds funky

mhuebert17:08:45

@martinklepsch: yep. I would do more testing in my repo if every cycle didn’t take 120+ seconds.

martinklepsch17:08:05

mhuebert: why does it take so long?

mhuebert17:08:18

@martinklepsch: i should correct. only 40 seconds w/ no optimizations

mhuebert17:08:28

@martinklepsch: last one was 132 with optimizations: simple. perhaps from using cljs.js - it builds a 10mb file

mhuebert17:08:48

@martinklepsch: dependencies are CodeMirror, rewrite-cljs, reagent, and core.async

mhuebert18:08:32

@martinklepsch: do you know if :foreign-libs can/does use min versions of js files with :optimizations :simple?

dnolen18:08:43

Releases does not, master does

mhuebert18:08:10

@dnolen thanks for the self-hosting advice page. would loading the analysis cache for other dependencies (e.g. cljs/core/async.cljs.cache.edn) be a reasonable way to bring that into the compiler state to use?

dnolen18:08:44

@mhuebert: sure but you should be realistic about how much stuff you need to load

mhuebert18:08:18

@dnolen thanks. yeah I can keep it slim, core.async is just hard to live without.

martinklepsch20:08:11

Is there anything I can read to better understand the interplay between cljs compiler & macros?

mhuebert21:08:37

so I’m trying to use core.async in cljs.js, in an app that already uses core.async. My *load-fn* successfully fetches the source & runs it, but on the second file, cljs/core/async/impl/protocols.cljs, I get the error Namespace "cljs.core.async.impl.protocols" already declared. It seems the compiler knows enough about its environment not to create a conflicting namespace, but not enough to require the existing namespace instead of trying to compile from source. Any pointers about what to try or read would be most welcome! *working on an example*