This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-05-02
Channels
- # announcements (4)
- # aws (18)
- # beginners (227)
- # boot (1)
- # calva (13)
- # cider (22)
- # clara (2)
- # cljs-dev (17)
- # clojure (85)
- # clojure-brasil (2)
- # clojure-dev (55)
- # clojure-europe (2)
- # clojure-italy (18)
- # clojure-japan (4)
- # clojure-losangeles (1)
- # clojure-nl (5)
- # clojure-uk (53)
- # clojurescript (46)
- # clojureverse-ops (8)
- # cursive (17)
- # data-science (3)
- # datascript (3)
- # datomic (25)
- # duct (4)
- # emacs (2)
- # figwheel-main (1)
- # fulcro (9)
- # hoplon (2)
- # hyperfiddle (1)
- # jobs-discuss (5)
- # kaocha (7)
- # leiningen (3)
- # nrepl (50)
- # off-topic (32)
- # portland-or (1)
- # re-frame (19)
- # reitit (2)
- # shadow-cljs (30)
- # spacemacs (2)
- # sql (8)
- # tools-deps (4)
- # vim (26)
- # xtdb (3)
- # yada (8)
All the assertions fail. As soon as the empty let block is removed, it works.
Putting the empty let block before the (let [f ...
, also works
It only break when we define the destructing fn in a test ns. In normal code we can use varargs destructuring fine
good evening! I need to decode a string to base 64. In clojurescript is a namespace cljs.source-map.base64 with decode. But its not working it throws cljs.source_map is undefined.
@ferdi.kuehne use the closure library. (:require [goog.crypt.base64 :as b64])
in ns and then (b64/encodeString "xxx")
or (b64/decodeString "a base64 string")
for those of you who write single-page apps in clojurescript, what's your average / ballpark file size when using advanced compilation?
@joshkh that's really just a function of your deps, especially non-ClojureScript, non-Closure
you could write everything with ClojureScript + Closure and it could be quite small - I do that for blogs etc.
if you're going to use a Webpack build then nearly all of your payload is going to be what you expect from a JS build
this is an old thing I did http://swannodette.github.io/2013/06/10/porting-notchs-minecraft-demo-to-clojurescript
it's 4K written in ClojureScript w/o persistent datastructures or most of the standard lib
cool project! and thanks for the response. i struggle to keep my usual re-frame / reagent / routing / <insert usual cljs dep here> apps under 1mb (uncompressed), and that's without cljsjs or node-js deps. hmm.
still you're gzip size is probably 120K or something right? I would consider this acceptable
when you say React w/o frameworks, do you mean not using reagent? Or simply sticking to reagent's first- and second-form components (i.e. just the hiccup-esque templates and pure functions) and using hooks instead of using lifecycle methods?
I can’t endorse as I haven’t used it, but I stumbled across https://github.com/Lokeh/hx the other day. Seems like it allows hiccup with react hooks. https://github.com/Lokeh/hx/blob/master/docs/why-not-reagent.md @UJCC8TWBZ
hmm... So I used to use recompose heavily when I was writing a lot of React/JSX. Recompose has been deprecated due to hooks making it redundant. Hooks are definitely an improvement over writing classes, and I wish reagent had at least some ability to incorporate react hooks (the lifecycle ones, anyway), but I don't think I'm ready to give up reagent's state management yet -- it's really nice how little boilerplate is involved. I'll probably switch to hx down the road, but for now I'm going to stick with reagent so I can focus on other things.
it's obvious that 50% of 120K is just React and cljs.core, and your other deps / app are the rest
@joshkh also don't forget about code splitting, as your app scales that becomes important to do, and Closure is really good
fwiw I just don't think people understand that until you can DCE large deps - you're never going to get out of this hole
i.e. projects like Svelte are cool - but it doesn't fix the fact that when you drop in MapBox or CodeMirror none of that effort matters
somebody should write a post showing that it's equally easy to do this with ClojureScript 😉
Still new to Clojure but it was pretty simple https://davezen1.github.io/serve-cljs-app/
Still new to Clojure but it was pretty simple https://davezen1.github.io/serve-cljs-app/