This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-12-02
Channels
- # adventofcode (153)
- # announcements (29)
- # architecture (6)
- # babashka (5)
- # beginners (197)
- # calva (71)
- # clj-kondo (27)
- # cljfx (4)
- # cljs-dev (33)
- # cljsrn (1)
- # clojure (52)
- # clojure-australia (5)
- # clojure-boston (1)
- # clojure-europe (38)
- # clojure-france (1)
- # clojure-hungary (5)
- # clojure-italy (1)
- # clojure-nl (19)
- # clojure-uk (5)
- # clojurescript (12)
- # conjure (4)
- # core-async (3)
- # cursive (22)
- # datalog (70)
- # datomic (32)
- # deps-new (8)
- # emacs (79)
- # events (2)
- # fulcro (15)
- # graalvm (15)
- # leiningen (2)
- # lsp (5)
- # minecraft (1)
- # nbb (1)
- # off-topic (37)
- # polylith (11)
- # re-frame (9)
- # reagent (1)
- # reitit (3)
- # releases (1)
- # reveal (2)
- # shadow-cljs (35)
- # spacemacs (1)
- # tools-build (4)
- # tools-deps (55)
- # vim (11)
- # xtdb (6)
I started with the learning clojure script! and I started reading books of clojure script, But the books almost contains how clojure is writtern and its basic syntax's.. I wanted to understand how clojure script is written , Basically more about the clojure script! Can anyone guide me about learning clojureascript ?
The main website mentions a decent amount of materials: https://clojurescript.org/community/resources
I’m trying to call the d3-dsv library from ClojureScript and getting myself embroiled in externs issues. I’d appreciated some help working out how to fix them.
I’m compiling with Figwheel Main with :auto-bundle
set to :webpack
(which implies :infer-externs
).
Specifically, I’m trying to write the equivalent of:
import {dsvFormat} from "d3-dsv";
dsvFormat(";").parseRows(s);
I have this:
(ns ... (:require [d3-dsv :refer [dsvFormat]]))
(.parseRows (dsvFormat ";") s)
Which works just fine in a development build, but fails in a release build with:
Uncaught TypeError: LY.dsvFormat(...).Zk is not a function
And sure enough, if I set *warn-on-infer*
then I see:
Cannot infer target type in expression (. (dsvFormat ";") parseRows s)
I’m damned if I know how to tell it what the right type is though, given that it’s the default export from this file:
https://github.com/d3/d3-dsv/blob/main/src/dsv.js#L155
I’d be very grateful for any pointers in the right direction.So even if you don't know the type of x
, if your compiler can't infer its type, you can just write ^js x
.
I’m using Figwheel Main
@U4YGF4NGM Yeah, ^js
is in the CLJS compiler code.
So this?:
(.parseRows ^js (dsvFormat ";") s)