This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # babashka (10)
- # beginners (27)
- # calva (91)
- # cestmeetup (3)
- # cider (27)
- # clj-kondo (12)
- # cljs-dev (4)
- # clojars (13)
- # clojure (35)
- # clojure-europe (30)
- # clojure-france (3)
- # clojure-houston (1)
- # clojure-nl (11)
- # clojure-norway (29)
- # clojure-spec (23)
- # clojure-sweden (5)
- # clojure-uk (128)
- # clojurescript (69)
- # conjure (44)
- # core-async (27)
- # crux (1)
- # cursive (13)
- # emacs (9)
- # events (3)
- # fulcro (52)
- # graphql (4)
- # jobs (2)
- # jobs-discuss (46)
- # kaocha (4)
- # luminus (12)
- # nrepl (10)
- # off-topic (29)
- # re-frame (17)
- # reitit (20)
- # remote-jobs (4)
- # rewrite-clj (1)
- # ring (4)
- # rum (13)
- # shadow-cljs (40)
- # sql (1)
using plumatic schema, is it possible to extend a schema? If you have
BaseSchema , can i have
BaseSchema, and add values on to it?
you can use a map from key to validator as a schema, and if you do that you can make a new schema using
most people have migrated from schema to spec.alpha (where deriving schemas works much differently)
yeah, but there really appears to be a dearth of compojure-api examples with spec. schema (so far) is really quite a bit easier to deal with.
Does anyone have any tips for reading/cleaning up runtime error messages in Chrome DevTools? This is the kind of thing I see with pretty much every error. I've highlighted the only line that contains a reference to my own source code.
these seem quite easy to read? - no cofx handler registered for last-time - no subscription for :viewing-project - no way to deref null at views.cljs at line 123
Part of me wants to be able to turn off any references to files that I didn't write myself. It feels "below my layer of abstraction" to be looking at references to code in the cljs runtime.
Thanks @dpsutton, I personally find it quite frustrating compared to errors in other languages like Python and Elm... particularly when there are multiple runtime errors and the DevTools console literally explodes with them. I also wish I could somehow see these errors in Emacs/CIDER instead of having to constantly change focus to the DevTools panel when something doesn't look right in the my web app.
But if this looks normal to you, I'll get used it. I was wondering I was doing something wrong with configuring source maps or something.
a benefit but also a price of clj / cljs is being "close to the host", that leads to leaked abstractions but it also leads to a lot of power
it would certainly be possible to improve tooling like emacs/cider to include the errors in the editor, but I think it's generally been easier to make UI in the browser than in emacs/cider.
I'm thinking about introducing spec into my workflow to help pinpoint the simplest errors I make (usually passing the wrong type into a function that expects a map or sequence, etc). Where should a total beginner start with spec? Is Spec2 best practice?
Spec 2 isn't ready for use yet (it will ultimately become just
clojure.spec.alpha is "best practice" for now.
That said, Spec 2's wiki https://github.com/clojure/spec-alpha2/wiki/Differences-from-spec.alpha and https://github.com/clojure/spec-alpha2/wiki/Schema-and-select are good reading insofar as understanding how thinking around Spec has evolved and where it is going.
One thing I will say as a caution: Spec is not a type system and you'll find it hard work if you try to use it like one. It's great for checking things at boundaries, such as APIs, but it's not really intended to be used "everywhere" (i.e., on every function).
Hey folks, I am looking at the guide on https://clojurescript.org/guides/promise-interop.
As shown below, I am wondering why . Thanks!
(.close browser) doesn't get wrapped with
Because regardless of the what happens in try, we want to close the browser next.