Fork me on GitHub
#clojurescript
<
2016-02-04
>
dnolen00:02:50

@dragoncube: we try to release every couple of months and the next release will probably get the 1.8 version

shaunxcode00:02:37

quick check on state of self hosted cljs - can it handle core async macros yet?

dnolen00:02:59

@shaunxcode: not aware that anyone’s tried that

dnolen00:02:10

pretty much everything with self-hosted is going to be “first” for some time

shaunxcode00:02:11

aww this is what I was thinking of https://github.com/mfikes/planck/issues/153 where 3 segment namespaces were problematic

dnolen00:02:38

core.async itself will probably need significant work to make that work

dnolen00:02:00

probably not going to be high priority given there are much more serious problems there to attend to

clumsyjedi00:02:57

Anyone know what version of cljs one needs to stop this bug happening: https://bugzilla.mozilla.org/show_bug.cgi?id=1138325

mfikes00:02:33

@shaunxcode: Yeah, I hacked on core.async and it is indeed significant. I came away feeling that it is highly likely that it is possible to pull it off, but not without major restructuring. Here is the hacking I was doing, FWIW: https://github.com/mfikes/core.async/tree/self-host

shaunxcode00:02:55

@mfikes thank you for the link! Exactly what I was hoping for.

trancehime03:02:25

Hmm. Anyone here familiar with how to get clojurescript building properly when using lein immutant war?

trancehime03:02:52

NVM, forgot to add :hooks [leiningen.cljsbuild]

adamkowalski07:02:58

Hey, I am really interested in using Clojure/ClojureScript to make native apps with Om Next but I have one concern

adamkowalski07:02:41

Is it possible to interface with the devices sensors? So if one of my project requirements is to connect with another device over bluetooth, is that something I can do?

meow07:02:07

@adamkowalski: Just FYI there is also an #C06DT2YSY channel where you could ask this same question and you might get responses there. simple_smile

jcouyang07:02:46

> Is it possible to interface with the devices sensors don’t think so unless using phonegap

joost-diepenmaat10:02:30

@clumsyjedi: how specific an answer do you need? IIRC any cljs version from the last couple of months should work.

clumsyjedi10:02:22

joost-diepenmaat: ok great, that is more than enough

clumsyjedi10:02:32

specificity wise

joost-diepenmaat10:02:47

@clumsyjedi: https://github.com/clojure/clojurescript/commit/d717b4edea074fcfd3e718a6134238ba26f76f82 mentions r3308 r3297 r3291 r3269 r3264 r3263 r3255 r3211 r3208 r3196 r3195 r3191 r3190 r3178 r3169 r3165 r3153 r3149 r3148 r3126 r3123 r3119 r3117 r3115 r3058 r3053 r3030 r2985 r1.7.228 r1.7.189 r1.7.170 r1.7.166 r1.7.145 r1.7.122 r1.7.107 r1.7.58 r1.7.48 r1.7.28 r1.7.10

joost-diepenmaat10:02:06

so at least anything from 1.7 upwards but the fix was in earlier

reborg10:02:40

clumsyjedi: thanks. Going to give a go at 1.7+

Yehonathan Sharvit12:02:25

@mfikes: could you help with this issue in cljs.js :

Yehonathan Sharvit12:02:26

I have an issue when requiring cljs.js and compiling in :optimizations :whitespace I get the following error in the browser: goog.require could not find: cljs.core$macros

Yehonathan Sharvit12:02:47

did someone else experienced the same issue?

savelichalex12:02:25

@adamkowalski: maybe with react native

mfikes12:02:10

@viebel: I've seen that as well but I don't know the root cause

martinklepsch14:02:14

is the performance for protocols vs. multimethods similar to clojure's, i.e. protocols are faster?

jaen14:02:42

@adamkowalski: #C06DT2YSY channel might not help you. but the #C0E1SN0NM one probably will. I didn't have a chance to use RN so far but one of it's features IIRC is the ability to write one's native modules in ObjectiveC/Java and then use them from RN application - for exa,ple https://facebook.github.io/react-native/docs/native-modules-android.html

dnolen17:02:59

protocols fns are only slightly slower than regular JS fn calls, multimethods require runtime look up or runtime cache check (not at the VM level) so quite a bit slower than both

dnolen17:02:57

@clumsyjedi: that bug is from before ClojureScript 1.7.X

mfikes19:02:23

@comma: FWIW, back in mid-2012, an addition was added to https://github.com/clojure/clojurescript/wiki/Differences-from-Clojure/fb7f481cbb132741a443ad6973ec4286344ea4de indicating There is currently no runtime enforcement of arity when calling a fn (My emphasis)

comma19:02:52

mfikes: thanks for the link

comma19:02:11

would you be able to confirm that this is for the sake of efficiency then? do you think it’ll change in the future?

mfikes19:02:54

@comma: I can’t confirm, unfortunately. It is the case that in many situations, arity warnings will be emitted.

mfikes19:02:15

(Also, by the way, that link is very old… it is the point at which the comment was added.)

comma19:02:32

i see, thanks again!

mfikes19:02:04

For example:

cljs.user=> (identity 1 2 3)
WARNING: Wrong number of args (3) passed to cljs.core/identity at line 1 <cljs repl>
1

dnolen19:02:18

@comma: it’s not really about efficiency

dnolen19:02:28

we could emit a compile time warning for that case like we do with others

comma19:02:04

mfikes: ahh yeah we noticed that you get an arity error for (arity 1 2 3)

dnolen19:02:37

@comma: it should even work for (let [f (fn [x] x)] (f))

dnolen19:02:45

it just doesn’t work for an immediate self call

dnolen19:02:07

as usual patch welcome 😉

mfikes19:02:31

@dnolen: You had previously explained the philosophy surrounding oftentimes just warning and not erroring out the compile, and I believe it was related to either an inability to conclusively know an error exists (dynamic, Lisp arguments), or the benefit of seeing subsequent errors. I was trying to dig up the explanation of that philosophy. Will share it if I find it.

comma19:02:42

haha, thanks for letting us dnolen

dnolen19:02:06

efficiency is a concern, but in this case that’s not what’s happening

dnolen19:02:24

multi-arity fns generate dispatching code with arity checking

mfikes19:02:44

Concretely, (identity 1 2 3) seems like it could just balk and refuse at analysis time. But… what if the user redefined identity… hrm.

dnolen19:02:05

but single arity functions do not, inlining an arity check yes would be less efficient and complicate the compiler for little benefit in this case

dnolen19:02:36

but we already try to cover these cases at compile time when we can and we should just do that

dnolen19:02:26

there will still be a gap here for the case where you make a higher order call with such an fn - but we’re just going to leave that be

mfikes19:02:06

Here is the bit where @dnolen explained that there is a rule of thumb that the analyzer only blows up when it cannot proceed: http://irc.fikesfarm.com/log/clojurescript/2015-03-22.txt

dnolen19:02:53

@mfikes right though to be extra clear that behavior can be customized by setting up your own warning handler simple_smile

dnolen19:02:12

that is, you can convert warnings into exceptions

mfikes19:02:18

Yes, Jake’s "ClojureScript: Treat Warnings as Errors” covers it: http://jakemccrary.com

adamkowalski19:02:49

@mfikes @dnolen hey I have a quick question for your guys, if I wanted to make an app with Om Next and have it work on iOS and Android would that mean that the whole app must be built with Om Next? Could I instead build part of the application using swift for example and then just incorporate the components I built in Om?

mfikes19:02:27

@adamkowalski: You can mix things up. Artem has partially converted bits of his app. Check out #C0E1SN0NM channel.

adamkowalski19:02:58

awesome thanks

dnolen19:02:02

@adamkowalski: there’s also an #C06DT2YSY channel where more people might be able to share their experience

dnolen19:02:24

I’m not actively doing anything related to React Native at the moment other than making sure Om works

adamkowalski19:02:38

Thats fine with me haha

adamkowalski19:02:46

it seems like the right place to focus your energy

mfikes19:02:09

Things compose simple_smile Let’s you focus. simple_smile

adamkowalski19:02:09

Yeah great work guys! Honestly I didn’t think I would be able to experience using a functional language with the same reach as javascript

adamkowalski19:02:20

its blowing my mind the things you guys have accomplished already

mfikes19:02:55

It all continuously blows my mind somehow simple_smile

comma19:02:16

thanks for the help dnolen, mfikes (sorry for the delay, macbook crashed)