Fork me on GitHub
#clojurescript
<
2017-07-07
>
mattly02:07:47

@wistb it's like selling a thirsty person water when all they've ever known to drink is sweat

mattly02:07:47

I've gotten people interested by showing them the actual real-world value that things like immutable data and pure functions bring to the table

mikera10:07:19

@qqq We have have core.matrix working on cljs but it needs some maintenance. The thinktopic guys did a lot of the initial implementation in order to make it possible to run cortex NNs in the browser.

urbank10:07:58

Is there any data on the percentage of people (or whatever) using clojurescript on the client without clojure on the backend?

dnolen12:07:48

@urbank https://www.surveymonkey.com/results/SM-7K6NXJY3/, Question #18 - non-Clojure backend is usage small

urbank12:07:57

Interesting. Expected a higher number

dnolen13:07:55

it’s on the rise but it’s not a large group of users

dnolen13:07:37

a huge value prop for Clojure(Script) is that it’s more or less that same language client/server

dnolen13:07:22

I suspect that it’s also because if it’s just client then there’s interesting competition - TypeScript, Elm, PureScript, etc.

dnolen13:07:12

but if it’s both client/server, Clojure(Script) is really, really far along compared to the alternatives

urbank14:07:48

@dnolen Yeah, good point. I would love it if I could convince the backend to switch to clojure. They're quite conservative about it though (which has its pros and cons)

urbank14:07:47

@dnolen Nope, python.

urbanslug14:07:48

😄 bad autocomplete

dnolen14:07:57

heh yeah sorry

dominicm14:07:06

Step 1: Jython Step 2: Clojure Step 3: ???

dnolen14:07:35

@urbank I feel like I heard of a company doing that - definitely there are some Rails + CLJS success stories

dominicm14:07:07

Puppet labs were/are Ruby. Then they did JRuby, then realised "Oh, we're dynamically typed on the JVM, might as well write Clojure" and slowly migrated via interop.

dominicm14:07:14

I think it was puppet.

urbank14:07:30

Yeah, I think I saw a talk from a guy from that company where he talked about it.

dnolen14:07:26

I’ve started a list of Book & Video resources on ClojureScript, feel free to add more via PRs if you’re aware of something I’m not https://clojurescript.org/community/books

souenzzo14:07:33

About clojurescript + non-clojure backend (golang) I'm using it, but I can use qualified keywords 😞 (it's a small/side project. I can change the json names) I tryied to change "name" -> "user/name" on JSON, when I parse it in clojurescrit, I get :user/name, awesome! But when I clj->js, to serialize/jsonify I get "name" back 😞 There is a bug about it on jira, but is a "wontfix"

dnolen14:07:08

@souenzzo because there’s a protocol to customize that behavior

dnolen14:07:34

IEncodeJS , extend Keyword to that yourself and go to town

souenzzo23:07:19

dnolen: I implemented (str (namespace k) "/" (name k)) Then

#object[Error Error: No protocol method IAssociative.-assoc defined for type cljs.core/EmptyList: ()]
   cljs.core/missing-protocol (jar:file:/home/enzzopc/.m2/repository/org/clojure/clojurescript/1.9.671/clojurescript-1.9.671.jar!/cljs/core.cljs:281:4)
   cljs.core/-assoc (jar:file:/home/enzzopc/.m2/repository/org/clojure/clojurescript/1.9.671/clojurescript-1.9.671.jar!/cljs/core.cljs:540:1)
   Function.cljs.core.assoc.cljs$core$IFn$_invoke$arity$3 (jar:file:/home/enzzopc/.m2/repository/org/clojure/clojurescript/1.9.671/clojurescript-1.9.671.jar!/cljs/core.cljs:1881:8)
   cljs.core/lift-ns (jar:file:/home/enzzopc/.m2/repository/org/clojure/clojurescript/1.9.671/clojurescript-1.9.671.jar!/cljs/core.cljs:9737:38)
   cljs.core/print-map (jar:file:/home/enzzopc/.m2/repository/org/clojure/clojurescript/1.9.671/clojurescript-1.9.671.jar!/cljs/core.cljs:9751:24)
   cljs.core/pr-writer-impl (jar:file:/home/enzzopc/.m2/repository/org/clojure/clojurescript/1.9.671/clojurescript-1.9.671.jar!/cljs/core.cljs:9567:12)
   cljs.core/pr-writer (jar:file:/home/enzzopc/.m2/repository/org/clojure/clojurescript/1.9.671/clojurescript-1.9.671.jar!/cljs/core.cljs:9623:6)
   cljs.core/pr-seq-writer (jar:file:/home/enzzopc/.m2/repository/org/clojure/clojurescript/1.9.671/clojurescript-1.9.671.jar!/cljs/core.cljs:9626:4)
   cljs.core/pr-sb-with-opts (jar:file:/home/enzzopc/.m2/repository/org/clojure/clojurescript/1.9.671/clojurescript-1.9.671.jar!/cljs/core.cljs:9634:6)
   cljs$core$pr_str_with_opts (jar:file:/home/enzzopc/.m2/repository/org/clojure/clojurescript/1.9.671/clojurescript-1.9.671.jar!/cljs/core.cljs:9644:11)

souenzzo23:07:54

Trying to debug #js{"foo/bar" 33} ->

#object[Error Error: No protocol method IAssociative.-assoc defined for type cljs.core/EmptyList: ()]
   cljs.core/missing-protocol (jar:file:/home/enzzopc/.m2/repository/org/clojure/clojurescript/1.9.671/clojurescript-1.9.671.jar!/cljs/core.cljs:281:4)
   cljs.core/-assoc (jar:file:/home/enzzopc/.m2/repository/org/clojure/clojurescript/1.9.671/clojurescript-1.9.671.jar!/cljs/core.cljs:540:1)
   Function.cljs.core.assoc.cljs$core$IFn$_invoke$arity$3 (jar:file:/home/enzzopc/.m2/repository/org/clojure/clojurescript/1.9.671/clojurescript-1.9.671.jar!/cljs/core.cljs:1881:8)
   cljs.core/lift-ns (jar:file:/home/enzzopc/.m2/repository/org/clojure/clojurescript/1.9.671/clojurescript-1.9.671.jar!/cljs/core.cljs:9737:38)
   cljs.core/print-map (jar:file:/home/enzzopc/.m2/repository/org/clojure/clojurescript/1.9.671/clojurescript-1.9.671.jar!/cljs/core.cljs:9751:24)
   cljs.core/pr-writer-impl (jar:file:/home/enzzopc/.m2/repository/org/clojure/clojurescript/1.9.671/clojurescript-1.9.671.jar!/cljs/core.cljs:9567:12)
   cljs.core/pr-writer (jar:file:/home/enzzopc/.m2/repository/org/clojure/clojurescript/1.9.671/clojurescript-1.9.671.jar!/cljs/core.cljs:9623:6)
   cljs.core/pr-seq-writer (jar:file:/home/enzzopc/.m2/repository/org/clojure/clojurescript/1.9.671/clojurescript-1.9.671.jar!/cljs/core.cljs:9626:4)
   cljs.core/pr-sb-with-opts (jar:file:/home/enzzopc/.m2/repository/org/clojure/clojurescript/1.9.671/clojurescript-1.9.671.jar!/cljs/core.cljs:9634:6)
   cljs$core$pr_str_with_opts (jar:file:/home/enzzopc/.m2/repository/org/clojure/clojurescript/1.9.671/clojurescript-1.9.671.jar!/cljs/core.cljs:9644:11)

souenzzo00:07:20

on browser x = {"foo/bar", 33} on repl js/x => same exception Is it a bug?

souenzzo00:07:11

On lumo (both 1.9.671), #js {"foo/bar" 33} works

dnolen14:07:51

finally fixed some styling stuff that was driving me crazy on the Quick Start https://clojurescript.org/guides/quick-start if there any other docs with weird styling issues (strange padding, no syntax highlighting, sections running into each other), please file issues on GitHub

martinklepsch15:07:28

“Only seven people outside of Google have ever gotten an application to build with ADVANCED_MODE turned on.“ 😄 https://tomdale.net/2017/04/making-the-jump/

dnolen15:07:31

Oh Tom Dale

martinklepsch15:07:59

Le Provocateur 😄

martinklepsch15:07:32

Ember is a fun parallel universe though

dnolen15:07:08

my issue with Ember is not the tech but the way they market it - too much hype (i.e. Tom et al’s communication style) too little substance <end rant>

dnolen15:07:34

this aside I still think Clojure(Script) have a ways to go on the ease front to match - but we’ve also made a lot of progress

martinklepsch15:07:23

yeah, their docs pages, tooling etc is really good. Don’t really understand e.g. Glimmer though, it’s all just ember new ... 😄

martinklepsch15:07:00

seems similar-ish to incremental-dom with some build-time stuff on top

roberto17:07:06

ha, he is still writing about trying to justify Ember?

roberto17:07:24

That is what most of his posts sound like to me: Hey, these other frameworks suck and Ember rules!

roberto17:07:48

And the only way he seems to know how to market Ember is by saying how terrible everything else is.

roberto17:07:45

when you have to argue about the merits of your project by mostly enhancing the demerits of other competing projects, I assume something is wrong with that project you are selling.

roberto17:07:58

and it is annoying to hear that for years from the Ember team

dnolen18:07:29

Agreed, I like Tom Dale & Yehuda Katz quite a bit - but this part about the Ember messaging is so annoying

hmaurer18:07:54

@roberto @dnolen that has been a issue with quite a number of open source projects in recent years though… Ember is just a prime example

hmaurer18:07:37

Really sad; I don’t get why developers would intentionally hype-drive their project. It discredits potentially good tech

hmaurer18:07:47

And is intellectually dishonest

dnolen18:07:55

and probably good for the pocketbook

hmaurer18:07:36

@dnolen True… I have more of an issue with it in the case of open-source projects though. With enterprise products, you expect them to market it, to try to “trick” you, and so you are on the watch for arguments without substance. But in the case of open-source project I feel the expectation is the arguments they put out are honest (even though they might be “wrong”, as everyone has a different set of problematics / perspective on a subject). Hype-driven marketing of open-source projects goes agains that, by trying to sell them as a product.

hmaurer18:07:09

Someone referred to this as sophistry in an article I read long ago; I tried to find it but forgot the link 😞

wilkerlucio22:07:39

I'm trying to use __dirname from Node.js in CLJS, with (js* "__dirname") but it's returning nil most of times, and sometimes (after a reload) it works if I set it into a variable

wilkerlucio22:07:53

does anything know how to make it consistently get the correct __dirname?

wilkerlucio22:07:42

for context: trying to use to get the correct index.html file for an Electron app

noonian22:07:50

@wilkerlucio maybe try js/__dirname? It seems to work from lumo’s repl for me at least

anmonteiro22:07:11

Lumo sets is explicitly

wilkerlucio22:07:12

@noonian I tried that, still got nil =/

anmonteiro22:07:25

there’s an open issue in CLJS JIRA to make that work

wilkerlucio22:07:49

@dnolen do you think this can be out in a release soon? just wondering because I don't see any way to work around it

wilkerlucio22:07:26

except hard coding it, but then only works on my machine