off-topic

https://github.com/clojurians/community-development/blob/master/Code-of-Conduct.md Clojurians Slack Community Code of Conduct. Searchable message archives are at https://clojurians-log.clojureverse.org/
eggsyntax 2020-12-05T15:41:26.451300Z

Just mentioned by Julie Sussman at the re:Clojure conference:

2๐Ÿ˜บ
eggsyntax 2020-12-05T15:42:31.452Z

Also up-and-coming from Gerald Sussman (middle of next year, they estimated) https://www.amazon.com/gp/product/B089423GC6/ref=ppx_yo_dt_b_d_asin_title_o00?ie=UTF8&psc=1&fpw=alm

borkdude 2020-12-05T16:23:27.452300Z

Still waiting for the Clojure edition ;)

3๐Ÿ˜€
borkdude 2020-12-05T16:23:42.452600Z

But meanwhile I have the printed Scheme version here. Should really just read it.

eggsyntax 2020-12-05T16:35:33.453800Z

Having it in JS feels exciting to me for exposing the ideas in SICP to a much wider audience.

borkdude 2020-12-05T16:48:47.454Z

Yeah, I agree!

borkdude 2020-12-05T16:48:58.454300Z

And this could eventually lead people to CLJS too

seancorfield 2020-12-05T18:39:09.454800Z

@eggsyntax Have you read Grokking Simplicity by Eric Normand? A lot of FP presented in JS.

eggsyntax 2020-12-05T18:49:04.459600Z

Haven't yet, but planning to at some point. Not a fan of JS, to be honest, but I've read a fair amount of Eric's blog and it'll be neat to see a culmination of those ideas. Perspective from two hours later on SICP/JS -- looking back, I feel like part of the magic of SICP was starting with something so simple that you could grasp it in its entirety, and building the rest from there. I'm curious about how well that'll translate to JS with all its idiosyncrasies -- maybe they start with a tiny subset of JS and build from there? Maybe build it into what JS might have been if it'd been built today in a more considered way rather than being added to piecemeal over decades from a rushed start?

seancorfield 2020-12-05T18:55:08.460400Z

I'm definitely no fan of JS either but Eric's book is good (although the JS hurts my eyes at times ๐Ÿ™‚ ).

1๐Ÿ˜†
2020-12-05T19:03:33.464100Z

When I went through (some of) SICP many years ago, I used Python, since that seemed the most appropriate language that I knew at the time and Clojure didn't yet exist. I definitely didn't get the magic feeling of building everything from the ground up but it was still very interesting. I feel like doing it in Clojure would be similar.

2020-12-05T19:04:01.464700Z

(And JS, though I have no desire to do that :-)

dharrigan 2020-12-05T19:32:40.465100Z

I would really really welcome a Clojure version of SICP

borkdude 2020-12-05T19:44:32.465500Z

@dharrigan there is this project: http://www.sicpdistilled.com/ but I think it stalled

dharrigan 2020-12-05T19:45:03.465800Z

5 years stalled :s

dharrigan 2020-12-05T19:45:13.466100Z

but thank you for the link, will read what is there...

borkdude 2020-12-05T19:55:15.466300Z

any opinions? https://twitter.com/borkdude/status/1335310728199335936

phronmophobic 2020-12-05T19:58:14.467100Z

if it's impure, I would prefer get-classpath!

borkdude 2020-12-05T19:59:04.467800Z

how impure would you consider reading from an atom to be on a scale of 1-10?

borkdude 2020-12-05T19:59:31.468400Z

The other function is called add-classpath (without exclamation mark, same as Clojure used to have)

phronmophobic 2020-12-05T20:00:06.468800Z

well, on a scale from 1-2, it's a 2.

borkdude 2020-12-05T20:00:09.468900Z

user=> (doc add-classpath)
-------------------------
clojure.core/add-classpath
([url])
  DEPRECATED

  Adds the url (String or URL object) to the classpath per
  URLClassLoader.addURL

borkdude 2020-12-05T20:01:48.469600Z

for counter-examples

phronmophobic 2020-12-05T20:04:11.470900Z

I think the ! is more important for a function like get-data than add-data as add-data is more likely to imply that the operation is impure. Does the classpath only grow? or can it shrink?

borkdude 2020-12-05T20:04:20.471100Z

The function deref itself also hasn't an exclamation mark btw :)

borkdude 2020-12-05T20:04:51.471700Z

right now we only have add-classpath so right now it can only grow

phronmophobic 2020-12-05T20:06:17.473200Z

the point of deref is to conduct a side effect. I think the ! helps especially when it might not be obvious that a function is impure. If you think get-classpath successfully conveys that, then it's probably fine.

borkdude 2020-12-05T20:06:48.473900Z

the question wasn't: get-classpath or get-classpath! but rather classpath or get-classpath

borkdude 2020-12-05T20:07:39.474400Z

but I can we can extend the poll to three options

borkdude 2020-12-05T20:08:35.475700Z

spec uses registry for getting the registry from an atom, but get-spec for getting a spec by some key

borkdude 2020-12-05T20:09:00.476100Z

so maybe get- also implies some lookup thing and some container thing

phronmophobic 2020-12-05T20:09:13.476400Z

personally, I feel like you gain more by saying "watch out! this is impure" and having a ! than any downside of having a ! , but I'm probably in the minority and it's probably fine either way.

phronmophobic 2020-12-05T20:09:47.476900Z

if that's the convention established by core clojure code, there's definitely a benefit to matching convention

borkdude 2020-12-05T20:10:17.477200Z

Boot uses get-classpath: https://github.com/boot-clj/boot/blob/master/doc/boot.pod.md#classpath

1๐Ÿ‘
dpsutton 2020-12-05T20:20:07.478400Z

If it is subject to change call it โ€œcurrent-classpathโ€?

2๐Ÿ‘
borkdude 2020-12-05T20:45:19.478700Z

not bad

souenzzo 2020-12-05T21:25:42.479Z

I use "current" in these cases too.