This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-07-23
Channels
- # babashka (1)
- # beginners (26)
- # clj-kondo (15)
- # cljdoc (2)
- # clojure (14)
- # clojure-europe (13)
- # clojure-norway (6)
- # conjure (2)
- # etaoin (4)
- # events (2)
- # expound (2)
- # fulcro (1)
- # hyperfiddle (6)
- # london-clojurians (2)
- # malli (3)
- # meander (10)
- # minecraft (3)
- # nbb (34)
- # off-topic (10)
- # pathom (13)
- # reagent (7)
- # vim (3)
I have a function defined
(defn sentence [] (concat (noun-phrase) (verb-phrase)))
With the functions noun-phrase
and verb-phrase
not yet defined. The compiler doesn't like this:
Syntax error compiling at (REPL:1:27).
Unable to resolve symbol: noun-phrase in this context
But it's not really an "error", at least to me considering the function did get compiled and so is really a warning. Is there a way to temporarily disable/mute this? Within Cider (Emacs) it's especially annoying with a popup every time.Essentially, Clojure namespaces need their functions defined "bottom-up".
There's a couple options:
1. you can place the noun-phrase
and verb-phrase
definitions before the sentence
definition (my preference)
2. you can add a (declare noun-phrase verb-phrase)
statement before the sentence
definition
I've always found the cider error popup annoying, you can customize cider-auto-jump-to-error
and cider-auto-select-error-buffer
to nil
to prevent that behavior.
If you do M-x customize-group
and go to the cider
group, then you can browse the options under "Cider Auto Jump To Error" and "Cider Auto Select Error Buffer"
How does a perennial beginner up their proficiency/expertise when they don't code/develop for a living?
Tried building stuff but it's always basic. I’ve never used multimethods, see their utility but nothing compels me to use them. Dabbled in the datalog variants but didn't get past rules
@U06GMV0B0 Are there open source projects you depend on? You can get involved with those to expand your horizon in terms of experience. But also remember that not all Clojure features are in common production usage (multimethods, yes, I'd say so but not everything).
I think the things I personally find helpful outside of work are: • practice (obvs) • helping others - often people with questions have problems that are different from what I'm used to, and answering those questions (even if someone else gets there first and I don't actually send my answer) can help new ideas click for me
@U04V70XH6 good point I remember reading Stu's book a decade ago and pretty sure defstruct was a thing. Haven't seen it since. Wrt to libs I’ll take a closer look
"Basic" can work. I am doing nothing but adding localstorage for persistence to a ClojureDart TodoMVC and, unlike with the Web variant, I am getting killed -- and learning a ton. You might need a variety of small projects. A bigger project building sth that amuses you (think Wordle) is preferred.
Does anyone know a general way of inverting a matrix in neanderthal? I found the method of (upper triangular) x (lower triangular) but, from what I've read, that only works for some invertible matrices, not all invertible matrices. Am I correct or am I missing something? Is there some straightforward way of doing this that I'm not picking up on?
not transpose? invert?
yes, invert
https://neanderthal.uncomplicate.org/codox/uncomplicate.neanderthal.linalg.html search for inverse. In general, you triangularize the matrix first, and then cal tri, or tri!. Maybe there's something else for specific cases, but this one is the first thing that comes to my mind (I'd have to check out my book to refresh my memory, and I don't have time for that now :)
what the heck is a matrix inversion
can I implement a constructor with reify
? - ah I think I should use proxy (still don't get how to provide a constructor with 1 arg)
Ah yeah probably like this style https://clojuredocs.org/clojure.core/gen-class
@benjamin.schwerdtner construct what? (Object. ___)
is a way to construct an Object named _