This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-02-22
Channels
- # announcements (88)
- # autochrome-github (2)
- # babashka (26)
- # beginners (5)
- # biff (2)
- # cider (73)
- # clj-kondo (4)
- # cljsrn (6)
- # clojure (54)
- # clojure-art (3)
- # clojure-europe (73)
- # clojure-germany (5)
- # clojure-new-zealand (1)
- # clojure-nl (13)
- # clojure-norway (16)
- # clojure-uk (8)
- # clojurescript (73)
- # conjure (1)
- # core-async (10)
- # cursive (17)
- # datahike (51)
- # datalevin (21)
- # datomic (4)
- # emacs (2)
- # events (3)
- # fulcro (35)
- # honeysql (6)
- # introduce-yourself (1)
- # jackdaw (3)
- # jobs (1)
- # leiningen (4)
- # lsp (3)
- # malli (17)
- # off-topic (60)
- # other-languages (5)
- # pathom (17)
- # pedestal (3)
- # polylith (19)
- # portal (2)
- # practicalli (1)
- # rdf (14)
- # reitit (3)
- # releases (1)
- # reveal (9)
- # sci (1)
- # shadow-cljs (26)
- # spacemacs (17)
- # sql (4)
- # testing (10)
- # tools-build (6)
- # tools-deps (16)
- # vim (9)
Pathom 3 2022.02.21-alpha
is out! This release includes:
• INTERNAL BREAK: the internal plan-and-run!
from all runners now return env instead of the graph plan
• Runner exceptions now return a wrapped error that includes environment data
• Boundary interface errors are always data
• Boundary interface omit stats by default, open with the :pathom/include-stats? flag on the request
• Add pbip/env-wrap-plugin
https://clojars.org/com.wsscode/pathom3
Also new doc pages for some of the new features:
https://pathom3.wsscode.com/docs/eql/#strict-errors-as-data
https://pathom3.wsscode.com/docs/built-in-plugins#extend-environment
https://github.com/mainej/headlessui-reagent 1.5.0.47 is out. This release adds the Combobox (a.k.a. Autocomplete) component introduced in @headlessui/react 1.5.0. The repo also includes a new https://github.com/mainej/headlessui-reagent/tree/main/example project showing all the components in action. headlessui-reagent brings accessible, keyboard-friendly, style-agnostic UI components from https://headlessui.dev/ to Reagent and re-frame projects.
Just published https://tryclojure.org/ a simple tutorial with the REPL for the Clojure syntax. I got inspired by http://tryhaskell.org and I’ve used #sci to create the command line interface. Source: https://github.com/elias94/tryclojure My girlfriend completed it so I hope is simple enough for totally beginners. Contributions and ideas are welcome!


Beautiful! (3rd question only allows one specific list '( 1 2 3)
, but that should be any list I think)
FYI @U01UYD2CL10 i get a certificate not valid SSL error when I visit, likely because i have https-everywhere enabled :)
@U0509NKGK thanks. I’m waiting for netlify for it, maybe retry later
Awesome stuff! Minor things I noted: On the phone it still said that the repl is on the right, and the content spans past the screen width, making the whole page scroll sideways.
@U01UYD2CL10 Cool! I'll add it to the projects using SCI here: https://github.com/babashka/sci#projects-using-sci


@U01UYD2CL10 I like the UI design, awesome work. One possible improvement: when pressing Ctrl-C or so, perhaps abort reading an incompleted form. E.g. when I typed: (first '("foo "bar"))
it was difficult for me to see that I still needed to insert another quote and some parens to get back into a functioning REPL. Having a way to start over from scratch, like Ctrl-C or so, could help.
@U01UYD2CL10 btw, did you know that:
(clojure.repl/doc inc)
also works? :) You might want to evaluate (require '[clojure.repl :refer :all]))
in your SCI ctx so doc
is available immediately and document this.Perhaps mention to press Enter to Eval the expression?
I think you could even display what closing delimiter is expected still as this is exposed in the ex-data of SCI's parser.
user=> (ex-data (try (sci/eval-string "[") (catch Exception e e)))
{:type :sci.error/parse, :line 1, :column 2, :edamame/expected-delimiter "]", :edamame/opened-delimiter "[", :edamame/opened-delimiter-loc {:row 1, :col 1}, :phase "parse", :file nil}
scratched my own itch: https://github.com/elias94/tryclojure/pull/3
Great stuff! Thanks for making this! small suggestion, put the current "page" people are on in the URL, so they can bookmark and jump back, etc
@U04V15CAJ sorry for the late reply I was literally doing it 😄 what about a placeholder?
@U01UYD2CL10 In the PR I showed it in the hint at the top of the REPL
Feel free to close the PR and do whatever you want, if you want to do it another way
perhaps also a link to the clojure exercism track (`https://exercism.org/tracks/clojure`) at the end as that seems to get a lot of traction lately
@U01UYD2CL10 Awesome, it works :) One very minor thing: there is a typo, demiliter is spelled as delimiter
Another idea: print functions as a special format instead of the JS output.
https://news.ycombinator.com/item?id=30426531
E.g. (if (fn? ...) "<function>" ...)
There may be a better way for this, e.g. overriding some protocol or multi-method. @U5H74UNSF how does clerk do this?
@U04V15CAJ thanks, I’ve also added (help)
with some functions. Fixed ctrl-c.
For the print
function makes sense but seems not working as expected. It seems that s
is always a string.
(defn set-print-fn
"Setup a custom `print-fn` for sci."
[f]
(sci/alter-var-root sci/print-fn (constantly f)))
(set-print-fn (fn [s]
(if (fn? s)
"<function>"
(write-repl! s))))
Ah, I think using pr-str
is better:
cljs.user=> (pr-str {:a (fn [])})
"{:a #object[Function]}"
Thanks @U04V15CAJ
@U01UYD2CL10 I found another interesting edge case:
Try typing {:a ;
there is no way to finish the input because following inputs are seen without the newline. Perhaps it makes sense to include the newline in the read input.
I was using it from a phone. 😃 On a computer alt+enter
could evaluate. But including the newline in the read input might also work.
@U01UYD2CL10 perhaps a Where to go next link in the footer could list some resources.
Made an issue about it here: https://github.com/elias94/tryclojure/issues/5
Some more feedback: https://news.ycombinator.com/item?id=30428311 • can't copy/paste from REPL • description of range unclear. might want to point out that (doc range) is available.
when I try to use it on mobile. I get stuck at hello world. I'm pretty sure it's because the quotes on mobile are the wrong kind. “Hello World”
shows an errror.
@U7RJTCH6J IOS? Worked for me on Android in the Slack webinterface
@U7RJTCH6J This is Clojure-compatible behavior ;)
user=> "Hello World"
Syntax error compiling at (REPL:0:0).
Unable to resolve symbol: "Hello in this context
can confirm it seems to work on android (galaxy S20 and brave browser, latest version)
I'm on iOS. I know that this is clojure-compatible behavior, but I'm not sure even how to type a normal quote on iOS
If the repl wants to support iOS, then overriding quote insertion seems like a big improvement
For example, the same input "just works" at https://clojurescript.io
I think there should be some way to inform the browser about this. I used iOS also this morning. As a workaround I long-pressed the quote key and could enter the ones that work.
It doesn't work for me. Perhaps there is something in that site that checks the user agent or some other setting?
When I type “, http://clojurescript.io just inserts " instead
Curious which part of their code does that. Nothing special comes up when I grep for the smart quote.
I think that might be handled by codemirror. Does tryclojure use codemirror?
typing quote from iOS into a normal codemirror editor uses "
I think it's as @U0ETXRFEW , suggested. They set spellcheck="false"
https://github.com/codemirror/CodeMirror/blob/145c3e23e2bcd1a6643c706c74129b2c3ec5f3fd/src/input/input.js#L119
Thanks everyone for the help! Fixed all the bugs and merged PRs. spellcheck="false"
was the solution
I made a Magit-style interface for creating projects with clj-new and deps-new in Emacs. I included a couple cool templates I've come across but I'm looking for worthy additions if anyone knows any 🙂 https://github.com/jpe90/emacs-clj-deps-new

A. Very cool B. How would you like to turn it into a full-on porcelain for clojure CLI?
that's not a bad idea! I'd finally be forced to actually learn how clojure CLI works instead of copying and pasting random aliases off the internet
done 👍
I wonder if you can help me understand some options in question 13. There's Scientific and there's Education. But then there's also Academic - what would be an example here that fits neither Scientific nor Education?
probably too late to update after deployment but should we consider its own "dialect" of Clojure for the purposes of this survey?
was considered, decided we would only include those dialects maintained under the Clojure org
also consider filling out the Babashka survey! :) https://forms.gle/ko3NjDg2SwXeEoNQ9
I updated my polyglot docker image and it contains now the Clojure dependencies inside the image for faster startup:
The included libraries and their versions are listed here: https://github.com/behrica/clj-py-r-template, v .1.6.0
It is now more usable standalone and you can run it simply by
docker run -ti -p 12345:12345
It starts a clojure repl on port 12345 where all Clojure interop libraries (clj-python, clojisr and others) work out of the box.
It is full extendable if needed by either:
- providing a local deps.edn file
- install python , R or other non-clojure packages in a Dockerfile (suing the FROM behrica/clj-py-r:1.6.0
)
