This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-10-25
Channels
- # announcements (14)
- # aws (1)
- # babashka (23)
- # beginners (442)
- # calva (50)
- # chlorine-clover (1)
- # cider (32)
- # clojure (124)
- # clojure-europe (35)
- # clojure-france (5)
- # clojure-gamedev (5)
- # clojure-nl (2)
- # clojure-portugal (3)
- # clojure-uk (4)
- # clojurescript (56)
- # conjure (5)
- # cursive (24)
- # datalevin (1)
- # datomic (57)
- # fulcro (35)
- # helix (15)
- # holy-lambda (8)
- # introduce-yourself (1)
- # jobs (5)
- # kaocha (1)
- # lsp (99)
- # malli (10)
- # music (1)
- # off-topic (22)
- # pathom (38)
- # podcasts-discuss (10)
- # polylith (10)
- # reitit (1)
- # releases (1)
- # remote-jobs (4)
- # shadow-cljs (18)
- # spacemacs (6)
- # tools-build (22)
- # vim (66)
- # xtdb (22)
You cannot do that with the default select
. Perhaps some libraries might offer that functionality.
Thanks @U2FRKM4TW I got it working.
I double checked it and seems like you can add the title
attribute to the option
tag. It used to be the case not so long ago that some browsers didn't show it at all - perhaps now the situation is different.
Yes, I am using bootstrap so I used data-toggle="tooltip"
with title
. It worked
how can I use cljs.repl/source-fn
at cljs repl time to fetch a string for a var definition?
% clojure -A:cljs -M -m cljs.main -re node -r
ClojureScript 1.10.773
cljs.user=> (source inc)
(defn inc
"Returns a number one greater than num."
[x] (cljs.core/+ x 1))
nil
cljs.user=>
I want to not return nil
to have the string for the function π
there's a way ? @U11BV7MTK
(with-out-str (source inc))
"(defn inc\n \"Returns a number one greater than num.\"\n [x] (cljs.core/+ x 1))\n"
look at the source of source with (source source)
. Notice it is calling println
. Just make your own source function that just returns the string
I'm getting an error on a production cljs build Uncaught TypeError: goog.global.setTimeout is not a function
From looking at goog.global it's set with this
which by default tends to be the window (thus assigning setTimeout to window.setTimeout). When I'm building a production build it's undefined (the cause I believe is that webpack is wrapping it's js code with (()=>{var __webpack_modules__=
therefore this is no longer the window which violates the expectation in a lib I'm using that goog.global will have setTimeout. Is their a special way to handle closure lib during webpack bundling?
hi. is there anything similar to https://github.com/mdgriffith/elm-ui for clojurescript?
that being said, i am suspicious of anything that claims to abstract HTML and CSS for you. in almost all cases i'd rather have easy access to the underlying primitives
thanks. yeah, i'm not sure about how it will work out in practice. but ideally i'm all for abstracting away from html and css
I used dreamweaver quite a bit to build websites, years ago, and burned myself on things that attempt to abstract HTML and CSS from me while building anything for the web π
There's also https://github.com/lelandrichardson/react-primitives which was inspired by React Native Web
If you can compile ruby, clojure, go, scala, c, typescript, etc. to javascript, I don't see why it shouldn't be possible to compile some sane graphics and event model to html+css
I'm not sure it does
I guess I'm implicitly adding in to your sentence that the HTML & CSS compiled to would be acceptable to deploy
I think it could be more accessible and efficient.
I just don't think that the HTML, CSS and event system in browsers is well formed enough to not have to make hard tradeoffs
I do think it would be a lot of work, but I think it makes sense long term.
We compile CLJS to JS. And yet, we use interop all the time. It's not abstracted away, it's not hidden - it's all there. Just a .
away.
React is certainly an improvement over what I used before (which was jquery and that was an improvement over the options before)
I still think there's a lot of room for improvement.
I think that's greatly helped by the fact that the semantic differences between ClojureScript and JS are very few
interoping between React and imperative DOM manipulation is harder IME because the models are more different
in Elm, the language and compiler fights you at every step if you want to drop down to JS
Yeah, CLJS makes deliberate choices to not stray too far from the platform. And if a web UI framework decides to go way too far from the underlying HTML/CSS/JS, the abstraction becomes either incredibly leaky or incredibly restrictive.
I like sitting at about the level of abstraction that CLJS and React does, personally
10 years ago, using a compile to JS language seemed crazy, but there's a ton of options now. I would bet that compile to html/css (or potentially canvas) will be accepted as normal 10 years from now. π€
> And if a web UI framework decides to go way too far from the underlying HTML/CSS/JS, the abstraction becomes either incredibly leaky or incredibly restrictive. I think that's an argument for why we shouldn't be using html/css as UI primitives in the first place.
Alas, that ship has sailed. Will be quite a while till something new arrives and replaces it.
Oh, and that ship keeps on sailing with full mast. :) And is growing by the minute. Like Katamari Damacy of the software world.
I think it feels like it going fast, but it's a giant, slow, rudderless, leaky boat with no captain.
would be great to have something other than a web browser to deliver applications remotely
I was looking at the cljs-ajax
library (https://github.com/JulianBirch/cljs-ajax) and in its GET
/`POST` examples it seems to be using GET
synchronously. For example ((GET "/hello")
, is this correct?
they are asynchronous. the results are not returned, but rather passed to the handler
function on completion
So, if you don't provide a :handler
function, does it just grab whatever function is called handler
in your current namespace and use that?