This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-07-23
Channels
- # announcements (1)
- # aws (13)
- # babashka (31)
- # beginners (102)
- # calva (46)
- # cider (16)
- # clj-kondo (1)
- # cljs-dev (3)
- # clojars (1)
- # clojure (396)
- # clojure-argentina (1)
- # clojure-australia (4)
- # clojure-europe (64)
- # clojure-nl (2)
- # clojure-uk (8)
- # clojurescript (20)
- # conjure (5)
- # cursive (4)
- # datomic (15)
- # emacs (48)
- # graalvm (69)
- # graalvm-mobile (1)
- # jobs (4)
- # jobs-rus (1)
- # lsp (6)
- # malli (15)
- # meander (2)
- # observability (11)
- # off-topic (10)
- # pathom (2)
- # portal (4)
- # re-frame (19)
- # reitit (1)
- # remote-jobs (3)
- # sci (1)
- # shadow-cljs (51)
- # tools-deps (11)
- # vim (12)
- # xtdb (13)
Morning!
Morning
mawning
GOOD MORNING!
Morning
wat ? that is very cool
this is on ubuntu w/the account syncing already set up so I don't know if it is using that behind the scenes
Good luck when you're und 2FA. Or does this work?
@ordnungswidrig I have 2fa turned on for google
anyone had a go w/ org-roam? https://github.com/org-roam/org-roam
I’m wondering, what’s involved in testing if a functions f
is using any function g
, h
, or i
… or even a macro m
, or n
? I’d like to have that feature in Rich 4Clojure, but I don’t know where to start.
I’d like for the rest of the tests to still work, but if I can’t have that, then maybe redefs is the way to go…
@U0ETXRFEW do you use a separate namespace for each problem?
For a problem like:
> Write a function which returns the last element in a sequence.
Which restricts the use of last
. And the tests:
(tests
(__ [1 2 3 4 5]) := 5
(__ '(5 4 3)) := 3
(__ ["b" "c" "d"]) := "d")
I’d like the tests to pass for a solution like:
(def __ last)
And I want to add a test that informs that the solution is not OK. In this case it is quite easy:
(tests
__ :<> last
(__ [1 2 3 4 5]) := 5
(__ '(5 4 3)) := 3
(__ ["b" "c" "d"]) := "d")
but it is sometimes much trickier than that.That would make the tests in the example with
(def __ last)
Throw exceptions instead of pass. The attached image is how I want it to work. (And it does work for this simple example.You have said this before but I didn’t understand what you said. Isn’t the whole point to make this fail because that specific var is forbidden?
It can be argued what the point is. 😀 I want the user to be able to freely explore. Also the restricted things. I am fine with not checking it at all, but one of the first users seemed to get confused by that. So want to investigate what it could take. And learn something in the process.
So you want to both allow and disallow it? Yeah I can see how that can be a conflicting requirement :-)
But again, I think with-redefs or some light macro around this called forbid or so, could work
Haha, yeah, conflicting requirements. I’m thinking more like clj-kondo, it gives advice, but doesn’t force you do to anything. Maybe it could even be implemented as a linter? That would be great!
@U055NJ5CC also asked for a similar thing, if he could somehow emit extra lint warnings so clj-kondo would display them (I think?)
clj-kondo could support this e.g. by having a directory in .clj-kondo
where people can dump extra findings in an EDN file, clj-kondo would return them on the next run or so
but then you would only see them on the next edit. and the tool should then also take care to remove the findings when the error was no longer there
a findings-file would be great. Or a socket endpoint in LSP-server to receive edn-events. In my use-case, I know a Var and would like to tag an issue for it, e.g.
{:var user/kikka
:level :warning
:message "invalid function schema, calling function with arguments (0, 0) produces invalid output \"00\", should be :int"}
for clj-kondo running as a non-server (standalone binary) a socket won't work, I think the only way would be a file
then clj-kondo has to run, but the editor tooling only makes it run on the next code edit
yes. It already recreates the full clj-kondo config per each check (which happens when user evaluates a form, via atom watcher)
I think something in CIDER could be more appropriate since it's really something that comes from the runtime. I'm surprised that people have made specific tooling for flycheck when it comes to eastwood linting since that could probably also be implemented as a CIDER middleware? E.g here is some code to display stack traces. https://github.com/clojure-emacs/cider-nrepl/blob/6d3934eb665574af891e81ef5c11cf9c2b4e1d65/src/cider/nrepl/middleware/stacktrace.clj#L197
@U051BLM8F any thoughts?
Somebody on the internet made something cool: https://twitter.com/RustyVermeer/status/1418652171558481921