Fork me on GitHub
#announcements
<
2022-02-22
>
wilkerlucio00:02:19

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

🎉 6
❤️ 3
jacob.maine02:02:35

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.

🎉 3
olaf04:02:54

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!

❤️ 24
sci 5
clojure-spin 6
🧑‍🎓 2
1
👍 1
jeroenvandijk05:02:02

Beautiful! (3rd question only allows one specific list '( 1 2 3), but that should be any list I think)

olaf05:02:53

Yes, fixed thanks :thumbsup:

robert-stuttaford06:02:44

FYI @U01UYD2CL10 i get a certificate not valid SSL error when I visit, likely because i have https-everywhere enabled :)

olaf06:02:24

@U0509NKGK thanks. I’m waiting for netlify for it, maybe retry later

pez06:02:05

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.

olaf07:02:00

Thanks @U0ETXRFEW, fixed! Btw, it’s all done with #calva

calva 2
borkdude09:02:25

@U01UYD2CL10 Cool! I'll add it to the projects using SCI here: https://github.com/babashka/sci#projects-using-sci

babashka 2
🙌 1
sci 1
olaf10:02:44

Thanks!!

borkdude10:02:37

@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.

borkdude10:02:38

@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.

Jakub Holý (HolyJak)10:02:58

Perhaps mention to press Enter to Eval the expression?

borkdude10:02:55

I think you could even display what closing delimiter is expected still as this is exposed in the ex-data of SCI's parser.

borkdude10:02:48

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}

plexus11:02:37

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

🙌 3
olaf11:02:07

@U04V15CAJ sorry for the late reply I was literally doing it 😄 what about a placeholder?

olaf11:02:43

P.s. there’s also a dark version depending on your OS

borkdude11:02:16

@U01UYD2CL10 In the PR I showed it in the hint at the top of the REPL

borkdude11:02:37

Feel free to close the PR and do whatever you want, if you want to do it another way

olaf12:02:19

I’m scared the hint at the top is not fixed and disappears if I keep typing commands

olaf12:02:52

Thanks for the hints, I’ve added all of them

borkdude12:02:52

ok, just use the PR as inspiration and close it :)

🙌 2
mbjarland12:02:49

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

borkdude12:02:35

@U01UYD2CL10 Awesome, it works :) One very minor thing: there is a typo, demiliter is spelled as delimiter

borkdude12:02:49

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?

borkdude12:02:54

Also, when pressing ctrl-c, the delimiter hint can go away, now it stays there

olaf12:02:47

@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))))

borkdude12:02:34

This is probably because you transform the evaluated result in a string first.

borkdude12:02:50

Ah, I think using pr-str is better:

cljs.user=> (pr-str {:a (fn [])})
"{:a #object[Function]}"

borkdude12:02:24

Instead of format-out you can probably just use pr-str

🙌 1
olaf12:02:27

When I transform the output in a string I just check if is fn?. It works!

borkdude12:02:16

That won't work for nested things like {:a (fn [])} whereas pr-str will work

olaf12:02:46

Pushed the patch with pr-str

olaf12:02:21

=>(map inc)
#object[Function]

borkdude13:02:49

@U01UYD2CL10 I found another interesting edge case: Try typing {:a ;

borkdude13:02:24

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.

borkdude13:02:59

Similar for how [1\n2\n3] becomes [123] which imo should be [1 2 3]

pez13:02:09

Or eval using a button and let return enter newlines.

borkdude13:02:47

I like the current behavior better, no mouse usage

pez13:02:22

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.

pez13:02:37

@U01UYD2CL10 perhaps a Where to go next link in the footer could list some resources.

borkdude14:02:45

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.

borkdude14:02:03

I'll make issues

phronmophobic16:02:58

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.

jeroenvandijk16:02:18

@U7RJTCH6J IOS? Worked for me on Android in the Slack webinterface

borkdude16:02:54

@U7RJTCH6J This is Clojure-compatible behavior ;)

user=> "Hello World"
Syntax error compiling at (REPL:0:0).
Unable to resolve symbol: "Hello in this context

borkdude16:02:15

I hate those quotes on iOS... everytime I type code this trips me up as well

mbjarland16:02:33

can confirm it seems to work on android (galaxy S20 and brave browser, latest version)

phronmophobic16:02:56

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

phronmophobic16:02:46

If the repl wants to support iOS, then overriding quote insertion seems like a big improvement

phronmophobic16:02:55

For example, the same input "just works" at https://clojurescript.io

pez16:02:50

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.

👍 1
pez16:02:10

I agree it is better if it just works. Just sharing this info.

borkdude16:02:39

It doesn't work for me. Perhaps there is something in that site that checks the user agent or some other setting?

phronmophobic17:02:56

When I type “, http://clojurescript.io just inserts " instead

borkdude17:02:54

Curious which part of their code does that. Nothing special comes up when I grep for the smart quote.

pez17:02:27

Does it have spellcheck="false" on the input element, maybe?

phronmophobic17:02:41

I think that might be handled by codemirror. Does tryclojure use codemirror?

phronmophobic17:02:26

typing quote from iOS into a normal codemirror editor uses "

borkdude17:02:32

let's find out what codemirror does then

borkdude17:02:55

worth a shot then

olaf00:02:24

Thanks everyone for the help! Fixed all the bugs and merged PRs. spellcheck="false" was the solution

🙏 3
Jon Eskin10:02:33

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

🎉 21
emacs 15
👍 3
Ben Sless16:02:21

A. Very cool B. How would you like to turn it into a full-on porcelain for clojure CLI?

Jon Eskin18:02:55

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

Ben Sless18:02:55

similar story with learning git 🙂

quoll16:02:29

Done! :thumbsup:

p-himik17:02:57

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?

Alex Miller (Clojure team)17:02:49

Just take what you feel is closest, or put it in Other

👍 1
respatialized23:02:07

probably too late to update after deployment but should we consider babashka its own "dialect" of Clojure for the purposes of this survey?

Alex Miller (Clojure team)00:02:17

was considered, decided we would only include those dialects maintained under the Clojure org

1
Alex Miller (Clojure team)00:02:10

also consider filling out the Babashka survey! :) https://forms.gle/ko3NjDg2SwXeEoNQ9

Carsten Behring23:02:18

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 )

👏 9
docker 1