FWIW I had some troubles with native types before, mine were related to IE
though. The culprit for your troubles is goog.typeOf (which is a basic wrapper
arrount js/typeof).
If you run this via phantomjs
-
console.log("typeof", typeof(5));
Number.prototype.foo = function() {
console.lo
Hey David,
looks really interesting although I have to be a little critical of your
benchmarks. Add a download of 200 todos via xhr and then do the render, you
will most certainly lose to other JS Framework out there (especially if you
choose EDN over JSON) cause of the extra overhead associate
Howdy,
I wrote a build library https://github.com/thheller/shadow-build which replaces
cljs.closure and I'd like the see some of the stuff I did flow back into core
cljs.
I wanted to start discussing some of the stuff I did since I feel the current
situation is "bad" for ClojureScript in gener
Now if I could only convince everyone that closure JSModules should be used
always since they are way more flexible.
@david: I'll look into creating a patch but unfortunately I realized that
cljs.closure is missing the extra part that you currently don't define "main"
namespaces and everything
On Tuesday, February 11, 2014 12:20:53 PM UTC+1, dead...@gmail.com wrote:
> Hello Thomas,
>
> sorry for bringing up this old topic, but having endured hours of frustration
> while trying to configure a build as a recent clojurescript adopter, I got
> curious how you are using closure JSModules?
Hey,
there are many ways to get the properties of a javascript object, but if you
want to rely on advanced compilation and might miss some externs its probably
best to use aget.
(let [name (aget req "params" "name")] ...)
But these work too
(.. req -params -name)
(-> req .-params .-name)
If
don't recognise it from my readings.
>
> Cheers,
> Mark
>
> On Monday, 10 March 2014 09:22:06 UTC, Thomas Heller wrote:
> > Hey,
> >
> > there are many ways to get the properties of a javascript object, but if
> > you want to rely on advanced compilat
Hey,
not sure what you are trying to achieve, since the compiler should already warn
you if a var is not found. Might not do so when nesting defs. def/defn are top
level forms und should not be nested, especially no def in a defn.
As for your question: the CLJS compiler supports vars in macros,
Your project.clj is missing a closing paren ")", thats why you are getting the
EOF error with lein.
HTH
--
Note that posts from new members are moderated - please be patient with your
first post.
---
You received this message because you are subscribed to the Google Groups
"ClojureScript" gr
On Saturday, July 5, 2014 9:53:33 PM UTC+2, Andrew Nguyen wrote:
> I am using a combination of pr-str cljs.reader/read-string to communicate
> between the front and backends. Everything has been working as expected but
> I'm now trying to send data that contains a clojure set and pr-str seems to
I've got no compiler-fu to speak of but the increase in size is due to
schema.core defining a lot of Protocols/Types on "native" types. They are
checked at runtime and therefore require basically the rest of cljs.core (I
guess).
But I wouldn't worry about it, the size is due to cljs.core (persi
Hey,
didn't try to reproduce with your example, but I know the cause. ;)
http://dev.clojure.org/jira/browse/CLJS-826
goog is undefined cause the third party goog/base.js is used which just contains
// This is a dummy file to trick genjsdeps into doing the right thing.
// TODO(nicksantos): fix t
Excellent. Thanks!
/thomas
--
Note that posts from new members are moderated - please be patient with your
first post.
---
You received this message because you are subscribed to the Google Groups
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an
Hey,
the problem is not that closure munges the window.ga function, it is that
closure creates a var named ga which can be anything but is not the analytics
ga. At least it was in my case.
My solution was to use the renaming feature of the analytics snippet to use a
name closure won't generate
Not an Om user here but sounds like you are receiving messages faster than you
can handle them.
A "slow consumer" is a common problem in a messaging situation and core.async
has 2 built-in ways to deal with that. You can either use (async/chan
(async/slliding-buffer n)) or (async/dropping-buffe
Hey David,
CLJS-826 is only partly resolved in this release since it only takes effect
with a new closure-third-party release since the current jar is causing the
problem.
Would be nice if you could build a new closure release and bump the
dependency in clojurescript.
Thanks,
/thomas
On Fr
What does your build look like? Those sizes don't look like advanced
compilation.
Also you there is no reason to ever serve any javascript without gzip
compression but first look into advanced compilation. {:optimizations
:advanced} with lein-cljsbuild for example.
Not using Om myself, but I h
Hey,
I'm running into alot of
java.lang.IllegalArgumentException: Duplicate key: :display-as
at
clojure.lang.PersistentHashMap.createWithCheck(PersistentHashMap.java:67)
at clojure.lang.RT.map(RT.java:1462)
at clojure.lang.EdnReader$MapReader.invoke(EdnReader.java:631)
Hey,
if you are feeling adventurous you could try
https://github.com/thheller/shadow-build, it is an alternate build "library" to
lein-cljsbuild that I wrote that doesn't have that problem.
But its quite alot more complicated to get started compared to lein-cljsbuild,
never tried figwheel so n
se as soon as we have a patch.
>
>
>
> David
>
>
>
> On Mon, Jul 28, 2014 at 8:16 AM, Thomas Heller wrote:
>
> > Hey,
>
> >
>
> > I'm running into alot of
>
> >
>
> > java.lang.IllegalArgumentException: Duplicate key: :dis
Not much closer but some log output
keyword a, keyword b, hash a, hash b
:tags :tags 250931621 1771418977
:contract-type :contract-type -585196394 580786577
:voice-de-o2 :voice-de-o2 1348274488 1352616807
:voice-de-telekom :voice-de-telekom 475690556 2143804784
:voice-de-eplus :voice-de-eplus -167
Thought it might be related to
https://github.com/clojure/clojurescript/commit/e92e8064813ed9a74c6dcf5bfd3adf5b85df1aea
but can confirm that that is not the issue. At least the (imul 0x 5)
outputs the correct -5.
--
Note that posts from new members are moderated - please be patient wit
Gave up yesterday, will try more today.
Last thing I tried
(hash :test)
(hash (keyword "test"))
(hash (reader/read-string ":test"))
and comparing those hashes, the error didn't show this way even when tried with
several different test strings.
Running out of ideas to test, but its reasonable t
Yes, I'm only testing Safari on iOS. Which looking at my logs seems to be the
only one affected. Only Mobile Safari User Agents were sending maps with
duplicate keys.
No luck producing a more compact example though.
--
Note that posts from new members are moderated - please be patient with you
Hmm it might be related to the way keywords are generated.
The compiler will emit ":test" as new
cljs.Keyword(null,"test","test",577538877) where the hash is precomputed in
Clojure, if now for some reason ClojureScript generates another Hash for that
keyword we have our problem.
I'm not a math
Created a patch to address that :emit-constants issue.
http://dev.clojure.org/jira/browse/CLJS-829
Can't say wether its related to the issue at hand but less duplicate code is
always good.
--
Note that posts from new members are moderated - please be patient with your
first post.
---
You rec
Thanks.
I give up.
I have no more ideas what to test, whats even more annoying is that when I
attach the remote debugger BEFORE navigating to the page producing the faulty
maps the bug doesn't show. If I do the exact same steps but attach the remote
debugger AFTER loading the page the bug happ
Uhm small hint on how I'd do that? My maven-fu is weak.
But given that
https://oss.sonatype.org/content/repositories/orgclojure-1311/org/clojure/google-closure-library-third-party/0.0-20140718-946a7d39/google-closure-library-third-party-0.0-20140718-946a7d39.jar
does not contain a goog/base.js o
No I don't.
The smallest "test" I was able to come up was my production app.
I was not able to isolate the issue and the app does way too much stuff to
pinpoint anything.
I can give you an URL and the steps to reproduce the issue but thats about it.
Sorry,
/thomas
--
Note that posts from new
0.0-20140718-946a7d39"]
Confirmed to resolve CLJS-826.
On Tuesday, July 29, 2014 10:30:21 PM UTC+2, David Nolen wrote:
>
> Just add sonatype to your :repositories project.clj entry
> https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L79
>
> David
>
David its probably best to hold off on that release. It seems the
closure-library HEAD version depends on a newer closure compiler version
than the one available via maven.
At least I'm seeing some renaming issues for advanced compilation.
--
Note that posts from new members are moderated - pl
Sorry, I would be if I could.
Trying to track it down, but debugging an optimized build is not exactly easy.
:(
When using 2277 I have no errors, when using 2277 with the new closure lib
release I have some "undefined" errors. That usually means some sort of
renaming gone wrong.
Error:
Cannot
Geez, 2277 actually works just fine. 2234 doesn't work, but it actually doesn't
work with either closure-library version. Forgot that I reverted to 2234 due to
the keyword issue.
2277 + [org.clojure/google-closure-library "0.0-20140718-946a7d39"]
seems fine, except for that keyword issue.
Sorr
affected.
>
> David
>
> On Wed, Jul 30, 2014 at 11:11 AM, Thomas Heller > wrote:
> > Geez, 2277 actually works just fine. 2234 doesn't work, but it actually
> doesn't work with either closure-library version. Forgot that I reverted to
> 2234 due to the ke
Looking at the code it seems like you are calling jquery style code without
actual jquery.
(.modal modal "show")
.modal is a method provided via bootstrap.js/jquery and usually called as
$('#div-modal').modal('show')
I'm not sure on how you'd interface bootstrap with Om but I doubt that there
Since a go block is async you cannot try/catch from outside. You need to either
try/catch inside the block and return the exception as the result of the go
block or use an extra channel to handle errors.
(def errors (async/chan))
;; exception handler
(go (loop []
(when-let [ex (! errors e
On Tuesday, September 9, 2014 11:06:07 AM UTC+2, Yehonathan Sharvit wrote:
> I am wondering why the cljs compiler emits code that calls functions using
> call and not straight js function call.
>
>
> for instance:
>
>
> (defn foo [])
> (foo)
>
>
> is compiled to:
> user.foo = function() {
>
As the author of shadow-build [1] and shadow [2] I'm obviously a bit biased on
what to use on the CLJS side of things so I'll skip that part.
As for CSS and other "static" assets (images, fonts, ...) I found it is best to
make it a build/compile step and deploy it seperately from the application
In general the REPL is the development feature and advanced compilation is for
production quality builds. I do not think it is possible (or even a good idea)
to use a REPL with optimized builds as they do not allow for any kind of
incremental updates.
HTH,
/thomas
On Wednesday, November 5, 201
On Friday, November 7, 2014 12:24:36 AM UTC+1, Tom Connors wrote:
> I've got a project right now that uses javascript on the client and server
> and I'd love to be able to migrate to clojurescript. I'm wondering whether
> anyone is aware of any software that will transform the js into
> clojures
My guess would be autocomplete, stored in your browser.
You can try (dom/input #js {:type "password" :id "test-password" :autocomplete
"off"}).
HTH,
/thomas
--
Note that posts from new members are moderated - please be patient with your
first post.
---
You received this message because you a
That is a limitation of Javascript not core.async. Since you cannot block in
Javascript (only one thread) you have to take the "callback"/async route for
everything.
Emulating blocking by running a loop is a bad idea since you cannot even
pause/sleep and while that loop is running nothing else
> and nothing works).
>
> On the other hand, conceptually, externs are part of a library, not my user
> code. So, if library author thinks his library needs externs, he specifies it
> and packs externs along with library code, and they’re automatically used
> when I add depen
That SHOULD be handled via the dependency graph of your namespaces, that means
if one namespace requires code from another to be loaded it should list it in
its (:require ...) declaration. This way you ensure that it was loaded in the
right order.
init.cljs:
(ns init)
(enable-console-print!)
Yes, but I would recommend using the require. It is much cleaner from the
dependency graph perspective and tooling can support you way better. Also it is
not that much work, maybe a couple seconds. I also tend to have a "util"
namespace with general helper functions which is a good fit for the i
Hey,
had a bit of time thinking about things.
"deps.cljs" seems like a band aid to be honest, it might be better than without
but I imagine we run into all sorts of issues in the future.
In my projects I use CodeMirror quite frequently with a handcrafted (sort of
incomplete) externs.js. To get
le reason I created
shadow-build [2] in the first place was to save bandwidth for the user.
/thomas
[1] http://codemirror.net/
[2] https://github.com/thheller/shadow-build
On Tuesday, November 18, 2014 3:18:57 PM UTC+1, Martin Klepsch wrote:
> With what Thomas Heller described here it might
Well yes, the compiler only needs to produce .js from .cljs.
The "second phase" is "packaging" everything together, this is where Closure
kicks in. That part needs externs, preamble and the like. I would agree that
does not need to be in ClojureScript itself, the whole Closure part ist not
act
Hey,
good luck with your efforts.
It seems to be that is was motivated by alot of frustration due to
lein-cljsbuild and Google Closure. Most of the issues mentioned in "S-exps in
your browser" are actually addressed in shadow-build [1], part of the reason I
wrote it due to some frustrations I
Hello everyone,
shadow-build picked up some users of the past few months which is great, but I
still consider it way too hard to use for beginners. I now included some
default build configurations to make it easier to get started and basically
provide what lein-cljsbuild offers.
Out of the box
Hi Julien,
headless tests probably fall into the category of advanced configuration but
I'd consider creating a "standard" configuration for it if we can achieve
consensus on how that should look and work.
I basically test my CLJS code the way ClojureScript does itself [1,2] which can
hardly b
Hello again,
I added basic live reloading of js (ala lein-fighwheel) to the default
"build-dev" configuration of shadow-build. I updated the example project to
include this feature.
See:
https://github.com/thheller/shadow-build-example
https://github.com/thheller/shadow-build-example/blob/maste
Hey,
I'm honestly not quite sure what you are asking but maybe I can shed some light
on the way the ClojureScript compiler handles Clojure code (ie. macros).
Whenever the cljs.analyzer reads a (ns ...) form and encounters anything that
mentions a macro, like
(:require-macros [some.ns :refer (m
I've been using my own DOM library for a while now which always was fast enough
for me.
I started a new-ish implementation for my react/om experiments and I started
using a simple memoization trick to do the "parsing" bit at most once.
Basically its just (pseudo-ish code, not the actual code)
I got curious, think I found a way to get closer to the macro. Only does
element contruction no attributes are set except id/className but that happens
later anyways.
Uses element.cloneNode
https://gist.github.com/thheller/7faf1c28ca14c9865376
See the related js-perf (not by me)
http://jsperf.c
I noticed this a while back [1]. I ended up not caring anymore since it doesn't
hurt and is removed by :advanced anyways.
FWIW it is caused by the alias (:require [clojure.string :as str]) which ends
with goog.require for 'clojure.string and 'str (which resolves to
'clojure.string). Without an
Ah, I stopped looking at the .js a while ago. Never noticed that :as didn't
cause this anymore.
Anyways, this time I submitted the patch. :)
http://dev.clojure.org/jira/browse/CLJS-908
Feel free to jump in there.
Cheers,
/thomas
--
Note that posts from new members are moderated - please be p
Hey,
I just looked at the warnings code and it seems like a mistake that disabling
one warning actually disables 3 by accident.
Anyways, the warning definitions [1] are all pretty self explanatory, more so
if you look at the actual text the produce in the error functions below [1].
You could
Cannot say without the rest of the code but I what is in (:transformations
resp)? sorted-set doesn't work if one item doesn't compare to another (eg.
numbers vs maps).
Suppose:
(def a (atom #{}))
=> (var user/a)
(reset! a (into (sorted-set) [1 2 2 2 3]))
=> #{1 2 3}
(conj @a {:name "test"})
Cla
-format)
>:response-format (ajax/transit-response-format)
>:handler (fn [resp](put! ch resp))})
> ch))
>
> The error message indeed seems weird, but everything I tried so far indicates
> a bug or a missing feature in core.async.
>
> In the meant
d the second aspect is that updates outside of the go block always work, no
> matter if it is a set or not.
>
> If it's still hard to follow I might put together a small example.
>
> Best Regards,
> Sven
>
>
>
> Am Mittwoch, 24. Dezember 2014 22:14:02 UTC+1 schri
re.async?
>
> Best Regards,
> Sven
>
> Am Donnerstag, 25. Dezember 2014 11:34:50 UTC+1 schrieb Thomas Heller:
> > Hey,
> >
> > I figured it out. Fun puzzle. ;)
> >
> > As expected core.async is not the real villain here, the behavior sure is
> &
Hey,
First of all, huge thanks to David Nolen for all your work on ClojureScript.
TL;DR: I want to help, but I'm sort of "stuck".
With all the recent CLJS commits going into tooling related issues (cljs.test,
caching, ...) I find a lot of overlap to what I have done in shadow-build. I
either f
On Wednesday, December 31, 2014 12:17:11 AM UTC+1, David Nolen wrote:
>
> Supporting both Node.js and the Browser has been a goal since the
> initial release. There's nothing new going on here except more &
> better.
What is tooling and what is CLJS? At which point does it make sense to address
Can you run this?
lein repl
(require 'pts.macros)
If not you are probably missing a classpath entry since macros have to be on
the classpath for Clojurescript (Clojure) to find them.
Your project should have
(defproject ...
:source-paths ["src/clj"]
:cljsbuild {:source-paths ["src/cljs"]})
FWIW there is absolutely no need to ship a production/development version of
the code. The Closure Compiler is perfectly capable of minifying any JS source
(NOT advanced optimize, just minify).
Therefore the full JS + externs would be enough.
As a build tool author I don't quite agree with usin
>
> That's right but for some projects the assumption that .min.js means
> "minified" is just not true. E.g. React ships with different logging levels
> enabled based on wether you're including the development or production build.
> I'm sure there are more projects that include extra debugging
On Thursday, January 15, 2015 at 5:08:27 PM UTC+1, Yehonathan Sharvit wrote:
> Because in my app , it is clearer from a semantic point of view, it is
> clearer as the value stands for a question asked to the user.
How about
(ns my-ns.util)
(def YES true)
(def NO false)
(ns my-ns
(:use my-ns
Boolean is not a protocol. It is a native datatype, just like in Clojure.
--
Note that posts from new members are moderated - please be patient with your
first post.
---
You received this message because you are subscribed to the Google Groups
"ClojureScript" group.
To unsubscribe from this gr
Hello everyone,
I recently started working in adding support for testing in shadow-build. I
have my own testing workflow but wanted to ask how everyone else does it?
ClojureScript AND Clojure because I'd like them to be as close as possible.
My CLJ workflow is opening a REPL and use "Run test u
1) The main js file is empty because of the closure compiler error. The
circular dependency is somewhere in your code, usually :none should detect it
as well but difficult to tell without the source.
2) I do not think the cljsbuild config should be in a profile.
https://www.refheap.com/96682
T
countered performing task 'cljsbuild' with profile(s): 'prod'
> > java.lang.Exception: All [:compiler :output-dir] options must be distinct.
> >
> > On Fri, Jan 30, 2015 at 10:21 AM, Thomas Heller wrote:
> >> 1) The main js file is empty because of th
Can you look at the pre-optimized js sources and grep for that string? It might
be a macro of a library. Hard to tell without knowing what that thing actually
is. It looks like something var-ish (ie. :line, :column, :file, ...).
Anyways look at the js files to see the full context, should make
That is probably dead code removal in action. Since none of your code is
actually called it all will be removed. :)
Try to ^:export a function that will keep it from getting removed or just call
one of the functions.
(ns com.foo.editor
(:require [com.foo.common :refer (blah)]))
(defn ^:exp
>
> Also, about the explicit module dependencies declarations: it seems like it
> should be possible to automatically generate these by analyzing the namespace
> metadata. Is there a reason to force this to be explicitly declared instead?
>
The reason the declaration is necessary is quite si
>
> In ClojureScript any namespace not enumerated in an explicit :entries will
> get moved into the base (common/shared) module. But this isn't as bad as it
> sounds because Google Closure supports cross module code motion at the
> function and method level. That is any code (even a single fun
If you change it to
;; In src/cljs/fancy/fancy.cljs:
(ns fancy.fancy
(:require-macros [fancy.fancy :as m])
;; In src/cljs/fancy/core.cljs:
(ns fancy.core
(:require
[fancy.fancy :as fancy]))
(fancy/fun 123) should then always equal the macro version (unless you use
apply). The name
You are going to need to talk to David Nolen about that. He decided that this
should be handled in a separate issue than [1].
The implementation in shadow-build [2] (and my original patch) properly support
:refer but I currently do not have the time to create a revised issue/patch for
CLJS core
IMHO that is not something you should handle at compile time. I would suggest
creating a proper API and a "main" namespace that serves as an entry point to
your application and configures it before starting.
For example:
(ns my-app.log)
(defprotocol ILog
(-log [this msg]))
(def logger (atom
You should have a "main" namespace where your app is started and this namespace
should "require" all component namespaces you are going to use.
(ns project.main
(:require [project.components.contacts]))
(start-the-app)
This way you ensure that all your namespaces are loaded in the proper orde
On Friday, March 13, 2015 at 4:10:04 PM UTC+1, Tyler Solomon wrote:
> I think perhaps you have already given me the answer, but I do not see it.
> I should require all of the component namespaces so they are available when
> rendering the root of application. Later when the code is split for produc
On Friday, March 13, 2015 at 6:19:29 PM UTC+1, Tyler Solomon wrote:
> Thanks, I will have a look at shadow-build. Am I correct to say that the root
> of my difficulty is google closure-compiler not supporting modules in any
> compilation level below `simple`?
>
> Potentially relevant link:
> http
> Caused by: java.io.FileNotFoundException: Could not locate
> cljs/closure'__init.class or cljs/closure'.clj on classpath:
Is it possible you are trying (require 'cljs.closure')? That trailing ' should
otherwise not be there. ' means quote in Clojure and is not a String.
--
Note that posts f
>
> Question: why exactly is this type hint needed when js/goog.DEBUG is used in
> an "if"? As far as I can see, js/goog.DEBUG is a boolean already.
>
Short answer: We don't evaluate or parse any Javascript when compiling
ClojureScript. That means we don't know about goog.DEBUG and what ty
The general advice is to use Protocols if you need more than one implementation
of a function (ie. different targets). If there is only one, use a function.
I found myself always starting with a simple function and eventually refactor
to a protocol if needed (which is quite rare). It is generall
I think you are using the wrong (async/go ...). Make sure it is
(cljs.core.async.macros/go ...) not (clojure.core.async/go ...).
On Thursday, April 2, 2015 at 8:14:07 PM UTC+2, Chris Perkins wrote:
> I'm having trouble with this macro, and wondering whether I am doing
> something wrong:
>
> (de
Hey Tim,
I have no real feedback for you since I don't use Reagent or Om but thought I
should mention that it might be better to leverage what the Closure Library has
to offer before grabbing external Javascript.
The Closure Library comes with a full fledged DatePicker that is fully
internatio
tuff, so I'll definitely look into it.
> I've also been thinking about using cljs-time in the public interface, and
> that uses goog.date.* libraries, so that's another nudge in the Closure
> direction.
>
> Also, thanks for publishing those demos, they are quite hel
On Monday, April 6, 2015 at 12:11:28 AM UTC+2, Shaun Mahood wrote:
> Thomas, have you got any good resources for working with Closure in Cljs?
> I've tried to figure it out and read a decent amount but have found it
> difficult to get the hang of.
Apart from the docs I linked not really. The dem
Been a while since I used that stuff, so I'm just guessing.
Are you on :none?
IIRC cljs only supports defines in anything higher than :none. You can however
include
CLOSURE_DEFINES={'goog.LOCALE':'de'};
in your HTML BEFORE including any other javascript.
Pretty sure the locale is only "de" for
If you feel like trying a new build setup you could try shadow-build [1,2].
None of this should be an issue with it and :libs is not required, just make
sure the .js files are in some listed source path and the rest should just work.
Might have a whole lot of other issues though so YMMV. ;)
Not
No idea if this is still current but closure defines only used to work in
anything but :optimizations :none. Are you testing in :none?
On Tuesday, May 5, 2015 at 12:13:12 AM UTC+2, Jamie Orchard-Hays wrote:
> Can't figure out what I'm doing wrong here:
>
> project.clj:
>
> {:compiler
> :closu
http://dev.clojure.org/jira/browse/CLJS-1014
makes me think that defines should work in :none, not sure why they don't.
If you want to use Closure defines in :none while developing you can put them
into your HTML manually before including the javascript (or use shadow-build).
For standard CLJS j
Hey,
you could take a look at shadow-build [1]. I wrote it for exactly the use case
you describe since I had that issue myself. CLJS itself will always include all
source files it can find in a build which leads to your issues. shadow-build
will also discover all source files but will only incl
This has nothing to do with core.async or the go macro. If you block the CPU
you will block the UI. The browser does not support threads so neither can
core.async.
What the timeout achieves is that you give some control back to the browser so
instead of 1sec "blocking" you get 5x200ms blocking.
On Tuesday, August 25, 2015 at 10:59:53 AM UTC+2, Daniel Kersten wrote:
> "The browser does not support threads so neither can core.async."
>
>
> To expand on that, core.async uses cooperative multitasking, which means you
> have to give control back every so often so it can schedule other go bl
Well, while we are on the topic perhaps we should mention the downside of using
Web Workers. For me it has been Data Transfer.
Since you can only transfer JSON type data between workers that usually meant
you had to pr-str/read-string to roundtrip CLJS data. If you only have very
small amounts
On Wednesday, August 26, 2015 at 1:29:38 PM UTC+2, Daniel Kersten wrote:
>
> If you can use newer browser, you've got Transferrable Object to transfer
> binary data with zero-copy.
>
True but I was talking about CLJS data which isn't binary.
>
> Agreed, its probably a bit of work. I guess t
This is not a bug as David said.
To expand a little more about why this happens. String.prototype.startsWith is
not part of ES3 or ES5. Only with ES6 will it become standard. The default
language level for the closure compiler is ES3 which is why it doesn't know
startsWith.
You can check the d
For a little JavaScript WTF and one reason why things are the way the are:
Number.prototype.whatAmI = function() { return typeof(this); };
var x = 1;
x.whatAmI();
"object"
typeof(x)
"number"
Fun times debugging that ...
Cheers,
/thomas
--
Note that posts from new members are moderated - please
1 - 100 of 205 matches
Mail list logo