This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-11-11
Channels
- # adventofcode (1)
- # aleph (1)
- # announcements (3)
- # babashka (39)
- # beginners (84)
- # calva (1)
- # cider (17)
- # clj-kondo (15)
- # cljs-dev (43)
- # clojure (132)
- # clojure-dev (1)
- # clojure-europe (4)
- # clojure-nl (7)
- # clojure-norway (4)
- # clojure-uk (22)
- # clojurescript (56)
- # clojurex (24)
- # cursive (11)
- # data-science (2)
- # datascript (33)
- # datomic (7)
- # docker (2)
- # figwheel-main (11)
- # fulcro (2)
- # jobs (3)
- # joker (29)
- # leiningen (3)
- # nrepl (4)
- # off-topic (11)
- # planck (4)
- # reitit (5)
- # ring (4)
- # shadow-cljs (205)
- # spacemacs (5)
- # xtdb (9)
@eliraz.kedmi happy to help, but probably best to move it to #shadow-cljs
I'm not so positive it's related to shadow-cljs directly. I'll just post the error I'm getting trying to compile / watch my app: Illegal UTF8 string in constant pool in class file jdk/nashorn/internal/runtime/linker/Bootstrap
Execution error (ClassFormatError) at java.lang.ClassLoader/defineClass2 (ClassLoader.java:-2).
Illegal UTF8 string in constant pool in class file jdk/nashorn/internal/runtime/linker/Bootstrap
how would I (js/console.log "dsad")
from repl ? I get this error message: No such namespace: js
Hello, you guys know some look n' feel stuff for clojurescript? Like a bootstrap ? Also, how can i make my views responsive?
@ramon.rios I enjoyed working with Semantic UI: https://github.com/cljsjs/packages/tree/master/semantic-ui-react
Semantic UI is responsive by default. in general, avoiding hardcoded dimensions (such as width: 400px
) and using media breakpoints will help you
Let me see if i understood: it is a component library for react?
Semantic UI is a UI library, Semantic UI React is a port of Semantic UI to React, and that cljsjs package wraps Semantic UI React in order to use it from CLJS
https://semantic-ui.com/introduction/getting-started.html https://react.semantic-ui.com
Oh, great. Thank you 😃
@ramon.rios there's Tailwind CSS https://tailwindcss.com/
Is this like Garden or something?
no, it provides low level utility classes, so you can build UIs
Got it, so i install it and i can use in my cljs project
Yeah, Garden generates CSS from Clojure(Script) code, so both have different purposes and can be used in the same project
Tailwind CSS is framework, sort of Bootstrap.
Is it responsive ?
yeah.
Do you have any example of how to setup this on a re-frame project?
You can read it from website of Tailwind CSS.
Is it possible to use e.g 'calc(100% + 224px)';
in Clojurescript? Haven't seen anyone use it. In my case I have a material ui css property that i need to calc.
if you scroll to the bottom of the page, it lists the support for it in various browsers. ensure that the browsers you target support it. if so, you can use it
👍 thanks
Worked like a charm when I updated my browser.
does anyone knows if there a difference in the way that Clojurescript escapes regex compared to Clojure ? I have a very simple regex which works on Clojure but fails on Clojurescript due to “improper” escaping 😕
do you have an example of the regex?
Clojure and ClojureScript use their respective host regex engines and you should not expect portability
the problem is actually that the regex that I am trying is valid in Js but not after passing through Cljs 😕
- this works in my chrome browser:
/^([^\s\/]+\/)?(\/|[^\s\/]+)$/
- but this doesnt
#"^([^\s\/]+\/)?(\/|[^\s\/]+)$"
if I dont then it crashes
/^([^\s/]+/)?(/|[^\s/]+)$/.exec("hello/world")
;; Uncaught SyntaxError: Unexpected token ')'
but I'm suspecting that a CLJS regex literal does not require that and in fact it breaks it
that seems to be the case yes. If I remove the \
in front of the /
then it works from Cljs … though it seems counter intuitive to have a regex that works on java, clojure, js but not on clojurescript 😞
that's because java regexes ignore pointless backslashes, whereas JS regexes consider them an impossible to match character by the looks of it
I think if you follow the rules for the JS "new RegExp(...)" constructor you'll be good
Hey all, I'm trying to run the example Sente project (https://github.com/ptaoussanis/sente/tree/master/example-project), however I'm getting quite a few errors that I suspect are related to my environment. I can't figure out for the life of me what the problem is though. Attached is the feedback/errors I get when I try to run lein start
. My lein version is Leiningen 2.8.1
and Java version is Java 1.8.0_222 OpenJDK
. All on Ubuntu 18.04.
The Sente example project relies on some pretty old libraries...
What does /tmp/clojure-3693083459432344239.edn
contain?
What I did last time to get it to work was removing the Austin dependency and updating the cider/cider-nrepl
dependency (https://github.com/ptaoussanis/sente/pull/338#issue-261453889 and https://github.com/ptaoussanis/sente/pull/338/commits/13a13fb1d3f0f9c9f4ad8146bb16abeed65a3596).
But the error you're getting seems like something else. It might actually be related to this bit: https://github.com/ptaoussanis/sente/blob/3673b474aa130968378927af9c232b15eeb25720/example-project/src/example/server.clj#L241-L243