Fork me on GitHub

I'm having trouble getting the threeagent project to run ( )... I ran 'lein repl' in a terminal, cider-connect'ed from emacs, and when trying to evaluate

  (:require [threeagent.core :as th]
            ["three" :as three]))
in emacs, getting
Call to clojure.core/ns did not conform to spec:
thoughts? are there additional steps I need to be taking?


I don't know if I should be doing something with figwheel, too... didn't explicitely start that. I'm definitely guessing I've left out a bunch of steps to get this to run.


"three" in your require is not valid


To add to the above, it's valid in clojurescript not clojure.


The only thing allowed there are symbols (which name namespaces) which is why you got that error telling you your call to the ns macro is malformed


definitely in over my head but this is so cool I want to see it work!


It may be valid clojurescript(the cljs ext means clojurescript not clojure), but lein repl is a clojure reply, not a clojurescript repl


You may have better luck asking cljs questions in #clojurescript


oookay... just realized I cloned the master branch (the default) and there is a 'release' branch...


I doubt changing the branch will fix things if you are try to run clojurescript code in a clojure reply, they are different languages that only share a vaguely defined subset of syntax and semantics


Like trying to paste python into a ruby shell


ah ok just absorbed what you were saying...


although I use figwheel from a terminal launched repl usually via figwheel.


so, in that case, somehow, lein repl leads to cljs happiness, but it's all fuzzy. and your point about #clojurescript is true.


How's the status of using graalvm native image with clojure? Any significant gotchas to be aware of?

Jakub Zika09:10:32

Hello everybody, can you recommend me a function that I should use to get these results? I know that problem is the data input to extract-info function. I can't find a right function to use with merge-with to pack all the elements into list ( current implementation creates nested list for every element ) with unique occurences (sets). Thank you


<@U7S5E44DB> yes -- i don't know of a nice summary page, iirc, there is some locking-related things and on windows, there appears to be an issue involving _*in_* -- <@U04V15CAJ> knows pretty well, so you might ask him for more specifics. there's also a <#CAJN79WNT|graalvm>, fwiw.


it does work pretty well for many things though.

👍 4

why does tools.reader accept multiple :features in a set?

user=> (r/read-string {:read-cond :allow :features #{:clj :cljs}} "[#?(:cljs 1 :clj 2)]")
user=> (r/read-string {:read-cond :allow :features #{:clj :cljs}} "[#?(:clj 1 :cljs 2)]")


what does it mean to support multiple features? and what happens when there are multipe overlapping branches/features?


It's the same api as clojure.core's, first one in the reader conditional expr wins


left to right


I don't know if this is related, but when reader conditionals were first added to Clojure, before the first official release containing them, they were designed to contain any keywords you wanted, for 'sub platforms', i.e. much more specific than just :clj :cljs :cljr


That was pared back to only those choices shortly before the release, in hopes of keeping things simpler for everyone, especially for other tools that parsed Clojure.


@andy.fingerhut I guess that is related, since most parsers will probably only use one feature at a time and not a multiple?


I don't recall the history, but when the feature was originally proposed, it was perhaps necessary for the proposed generality that there be multiple features 'enabled'.


The paring back to at most one of :clj :cljs :cljr being enabled, when that restriction was made, perhaps did not cause the developers to change the API to eliminate that generality, so hence a set rather than a single keyword as a parameter.


And perhaps they wanted to leave it open for that future generality again, later.


right, thanks for the comments on this

Alex Miller (Clojure team)18:10:08

The reader, as an independent component, can still take multiple features and do something useful when reading arbitrary code. So that feature still exists and is potentially useful.

Alex Miller (Clojure team)18:10:21

Separately, the reader is used by the language platforms to parse source code for that particular language. In these cases, a “platform” feature is injected when reading source files and that is not currently an open set.

Alex Miller (Clojure team)18:10:04

Doing so is still a possibility in the future but we decided that was a lot of flexibility with a lot of pros and cons and we would leave that decision to a future date


Hi! One question: Is there a library that can help me with this? I need a function to create an interval N minutes around some timestamp and a function to check if a timestamp is contained in that interval. I tried java-time but the interval function (``) doesn't seem to exist anymore. I created some functions to solve this using java-time/instant and interop but I feel I might be doing extra work that a library can do for me.


Tick has a lot of interval calculus that will help you


I'll check it


I'll read the docs and give it a try 🙂 Thanks!


Has anyone used marginalia with clj? There's mostly just a lein plugin. (And a "zi" plugin which appears to be some kind of maven thing.)


@lvh Yeah, been a while since I did it tho'...


Thanks! I'll give it a shot.