This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-01-30
Channels
- # admin-announcements (1)
- # announcements (1)
- # babashka (8)
- # bristol-clojurians (1)
- # calva (36)
- # clojure (115)
- # clojure-europe (5)
- # clojure-italy (4)
- # clojure-nl (3)
- # clojure-norway (3)
- # clojure-uk (161)
- # clojuredesign-podcast (3)
- # clojurescript (71)
- # core-async (34)
- # cursive (26)
- # datomic (43)
- # docker (2)
- # emacs (24)
- # figwheel-main (1)
- # fulcro (36)
- # graalvm (7)
- # immutant (2)
- # jackdaw (1)
- # jobs (2)
- # leiningen (8)
- # luminus (5)
- # off-topic (29)
- # onyx (1)
- # other-languages (5)
- # pathom (6)
- # pedestal (3)
- # reagent (11)
- # ring (8)
- # shadow-cljs (42)
- # spacemacs (17)
- # specter (6)
- # tools-deps (80)
- # videos (1)
anyone building successfully with closure compiler releases after v20190909? they seem to have phased out a few things leading to errors. can't find anything related in the CLJS Jira yet.
standard clojurescript is not currently compatible with newer closure-compiler releases
ok, good to know. I was just a bit surprised that there isn't an issue where this is tracked.
I think there might be another. the reason the closure-compiler can't be bumped easily is because of changes in the closure-library, so that needs to be bumped also. but there were changes in the closure-library that require using the closure-compiler a bit differently than CLJS currently does. so its not a super trivial upgrade.
I've already tried bumping it myself and seen the errors. Luckily it doesn't seem to be too urgent to update.
yeah it was a bit higher priority in shadow-cljs it depends more on the JS processing. for CLJS itself it barely makes a difference.
it's getting close, we'll probably cut a release just for CLJS-3208 - tests are already all passing. However need to handle goog.module
. The browser REPL already works since debug loader magically handles it. Node.js REPL not working (and probably the other non-browser ones). It's finicky but it should get sorted out this week and that'll be it.
Ah, that's right. In any case, it should be considered an undefined behavior with non-numeric arguments. So even if you 100% what it will return, you should not rely on it.
Yea so + and * return identity and and - and / return a warning + ##NaN. Itās clear from the implementation of why this is the case, but unexpected nevertheless.
Latest version of clojurescript increases size of āHello worldā bundle dramaticaly. From 5.3K -> 94K
// Compiled by ClojureScript 1.10.597 {:static-fns true, :optimize-constants false}
goog.provide('jslt.sample');
goog.require('cljs.core');
console.log("Hello, World!");
result is
-rw-r--r-- 1 delaguardo staff 94K Jan 30 15:55 min.js
@delaguardo file a bug report, sometimes there's regressions around dead code elimination - usually something simple
from a quick look, seems like itās pprint
but it is useful for the times when you're being very careful and you want to use ClojureScript as a DSL over JS
bisect points to this commit https://github.com/clojure/clojurescript/commit/3a0c07477ae781bf521bdc2b074ed7b783bb93f3
sometimes āeliminate everythingā could be usefull. Iām trying to write simple reader macro to generate JS snippet and embed it directly to hiccup form:
something like [:script #inline/cljs (js/console.log "!")]
but right now Iām getting 94K of JS in html) but even with previous version 5.4K is overkill for such a task. So Iām curious - is it possible to āeliminate everythingā?
I'd say no in a practical sense. if you restrict yourself in what you actually use maybe but that doesn't look like CLJS at all anymore then š
Yes, but as long Iām not using math and write direct DOM manipulations - why it is not deleted?
And again - Iām completely understand that there is no practical use) just curious
@maik.wild note the only issue is the lack of warning - you cannot depend on the result (this is different from JS - the behavior is well defined there)
Hello, is it normal that set!
turns kebab-case into snake_case ? I have the following
(let [o (js/Object.)]
(set! (. o -add-points) "hello")
o);; #js {:add_points "hello"})
add-points
is not a valid JS property name. since it would be add - points
doing actual math. therefore it is always munged by the compiler.
ok so to build an object with a field named "add-points" i must use a function which will do o[fieldName] = value
. thanks
@thheller Is there a way to hook into shadowās heads up display? Say if I want to build one for a custom platform. Is there some multimethod or something?
any other rendering target than web or react native
each "platform" has its own namespace for handling the hot-reload stuff. so you'd probably start bt taking one and adding the hud however you need to
see https://github.com/thheller/shadow-cljs/tree/master/src/main/shadow/cljs/devtools/client
I guess I can wrap Nodeās process-message
, this should be enough
Already built it, thanks!
thanks. I see there is also the js-obj
util but it uses the gobject/set
functions you mentionned