This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-07-19
Channels
- # aleph (3)
- # beginners (90)
- # boot (1)
- # cider (1)
- # cljdoc (23)
- # clojars (1)
- # clojure (91)
- # clojure-dev (8)
- # clojure-greece (1)
- # clojure-italy (17)
- # clojure-japan (1)
- # clojure-nl (6)
- # clojure-spec (4)
- # clojure-uk (89)
- # clojurescript (48)
- # core-async (5)
- # cursive (79)
- # datascript (1)
- # datomic (40)
- # duct (1)
- # emacs (7)
- # figwheel-main (2)
- # graphql (7)
- # jobs (5)
- # nyc (5)
- # off-topic (61)
- # other-languages (2)
- # parinfer (6)
- # re-frame (63)
- # reagent (131)
- # ring-swagger (6)
- # shadow-cljs (158)
- # spacemacs (14)
- # tools-deps (15)
With regards to VDOM or lack thereof, I’m excited to see what #precept / https://github.com/CoNarrative/precept can cook up.
@henrik Thanks, I did not have Precept on my radar.. Looks brilliant. I wonder if they can hide the rules thing. At a not very high scale logic programming can be a bear.
@hiskennyness Yeah, it’s hard to predict the ergonomics of managing a sufficiently large site as rules right now. If the base concept is successful, there will probably be abstractions layered on top of it.
Just been bitten by (clojure.string/blank? :a)
yielding false from a cljs REPL and throwing an exception from a Clojure REPL. How do I check to see if something has already been filed? Or is this just difference supposed to live with?
The problem I see, @henrik, is that we want to write natural, branching code that happens to work off app state here and there, without thinking about anything other than what we are building. To automatically rewrite that as logic rules almost takes compiler support. I think Prolog could be the poster child for cool things that utterly did not scale beyond Socrates being mortal.
@cjmurphy (clojure.string/blank? :a)
is not a valid program right? (It has undefined behavior.)
That's just what I typed into two REPLs, a Clojure and CLJS one. Not sure what you mean really.
clojure.string/blank?
only accepts CharSequence
in Clojure, and strings in ClojureScript. If you pass it anything else, then the behavior is undefined.
In the future, you may see instead
user=> (clojure.string/blank? :a)
ExceptionInfo Call to #'clojure.string/blank? did not conform to spec:
In: [0] val: :a fails at: [:args :s] predicate: (instance? java.lang.CharSequence %)
on Clojure and something similar in ClojureScript, but related to string?
.Okay I see. Spec will help me/us out here down the track. Happy path only for Clojure(Script) functions.
(I'm assuming this is the case based on item 4 in (doc clojure.string)
in Clojure, and by making a few mild assumptions.)
I updated some dependencies then downgraded. Figwheel was working before that but now I get "WebSocket connection to '<ws://localhost:9091/>' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED goog.net.WebSocket.open @ websocket.js:279" ... "Closed Websocket REPL connection". I even deleted the entire repo and cloned it again from origin and still getting this error! Are the updated files cached outside the project directory?
@somedude314 try deleting the ~/.cljs/.aot_cache
@bhauman: Same issue 😞 I actually updated ClojureScript yesterday but reverted the version number today. I am on a Mac.
@bhauman I assumed this is something Figwheel uses internally. I am accessing the app from http://localhost:3449
if you are using a straight lein figwheel setup and haven't set the port then it should be '<ws://localhost:3449/>'
I will try to see when it's not connecting to that websocket. Thanks for the info @bhauman.
Heh, apparently the classpath resource cljs/externs.js
file is automatically used by the compiler.
I spent quite some time trying to figure out the source of my JSC_DUPLICATE_EXTERN_INPUT
error from also adding it to my :externs
array.
is there a different approach to scroll
event handler in reagent? all the other events seem to fire, except this one:
(r/create-class
{:component-will-mount
(fn []
(.addEventListener js/window "scroll" #(js/console.log "hello")))
...
})
if I change that to resize
, it worksi don’t see any obvious reason why that isn’t working. reagent shouldn’t have anything to do with it
maybe stick another console.log just before the call to addeventlistener just to double check that the code is running?
yeah it’s definitely running because if I change that to literally any other word like click
, resize
, keypress
, then it works 😕
scratch the above - the actual reason was overflow: hidden
on the body tag. the scroll was only visible on a container div