This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-07-23
Channels
- # announcements (1)
- # aws (13)
- # babashka (31)
- # beginners (102)
- # calva (46)
- # cider (16)
- # clj-kondo (1)
- # cljs-dev (3)
- # clojars (1)
- # clojure (396)
- # clojure-argentina (1)
- # clojure-australia (4)
- # clojure-europe (64)
- # clojure-nl (2)
- # clojure-uk (8)
- # clojurescript (20)
- # conjure (5)
- # cursive (4)
- # datomic (15)
- # emacs (48)
- # graalvm (69)
- # graalvm-mobile (1)
- # jobs (4)
- # jobs-rus (1)
- # lsp (6)
- # malli (15)
- # meander (2)
- # observability (11)
- # off-topic (10)
- # pathom (2)
- # portal (4)
- # re-frame (19)
- # reitit (1)
- # remote-jobs (3)
- # sci (1)
- # shadow-cljs (51)
- # tools-deps (11)
- # vim (12)
- # xtdb (13)
like we have when we use clojure with java libraries (for example cursive does that for java but not for npm i think),is there some ide/plugin that does that?
Hi. This is a noob question but how can I compile CLJS to JS but ask the cli command to use options from my deps.edn
file? The ClojureScript official documentation does not mention using deps.end in the compiler help doc and only gives examples of CLI commands where we have to provide all options inline?
thanks @U05224H0W!
@chandru89new you can use tools-deps aliases for this, pretty standard practice - like a :repl
alias a :release
alias etc. and these gather up the :main-opts
@takis_ Cursive does it for Google Closure libs - I don't see why it couldn't work for NPM deps too
The main problem is that the Closure code is written in a Java-y style that’s easy to statically analyse. I’ve made various attempts to do the same for random NPM libs and it’s much harder. I’m considering basing the analysis off TypeScript types, so users would just install the @types/react or whatever and get support from those.
i am using MongoDB nodejs driver,and it shows them as un-resolved symbols and no autocomplete for now.
I have a public solidity contract variable: uint public bidEnd
, and I’m getting its value using web3js like so:
83 (go
84 (.call
85 (.bidEnd
86 (.-methods
87 (web3.eth.Contract. (:contract-json db)
88 (-> db :creation :creation/contract-address))))
89 (clj->js {:from (->
90 (<p!
91 (.request
92 (:ethereum db) (clj->js {:method "eth_request Accounts"})))
93 (get 0))})
94 (fn [err result]
95 (js/console.log "error- " err)
96 (js/console.log "result- " result))))
And it’s printing the following in the console:
err is Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.
at require.decodeParametersWith (index.js:299)
at require.decodeParameters (index.js:286)
at Contract.global._decodeMethodReturn (index.js:471)
at Method.outputFormatter (index.js:761)
at Method.formatOutput (index.js:148)
at sendTxCallback (index.js:524)
at cb (util.js:703)
at Item.run (browser.js:154)
at drainQueue (browser.js:124)
What am I doing wrong and how to fix this?since it’s a call function which doesn’t use gas, it’s weird that it’s asking if I ran out of gas. I’m not sure about the other reasons for the error that it lists
What are the inputs and what are the outputs supposed to look like?
Hi! How to express this syntax in reagent:
<Button
classes={{
root: classes.root, // class name, e.g. `classes-nesting-root-x`
label: classes.label, // class name, e.g. `classes-nesting-label-x`
}}
>
classes nesting
</Button>
What are these double curly braces? (taken from https://material-ui.com/customization/components/#overriding-styles-with-classes), is it just
[button {:classes {:root (-> classes :root)
:label (-> classes :label)}]
@fbielejec the first tells JSX that the classes
attribute expects an object (ie. not converted to a string). so your translation is correct assuming whatever wrapper you use translates that to a JS object