This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-09-29
Channels
- # ai (2)
- # beginners (12)
- # bitcoin (1)
- # boot (41)
- # chestnut (5)
- # cider (9)
- # clara (24)
- # cljs-dev (11)
- # clojure (107)
- # clojure-dev (2)
- # clojure-italy (4)
- # clojure-nl (4)
- # clojure-russia (10)
- # clojure-spec (19)
- # clojure-uk (71)
- # clojurescript (121)
- # cursive (3)
- # data-science (7)
- # datacrypt (1)
- # datomic (72)
- # docs (7)
- # duct (2)
- # emacs (3)
- # ethereum (1)
- # figwheel (1)
- # fulcro (58)
- # graphql (16)
- # hoplon (9)
- # jobs (2)
- # jobs-rus (1)
- # lein-figwheel (1)
- # leiningen (25)
- # luminus (2)
- # lumo (5)
- # off-topic (6)
- # onyx (22)
- # pedestal (3)
- # portkey (1)
- # proton (2)
- # re-frame (7)
- # remote-jobs (1)
- # ring-swagger (3)
- # rum (2)
- # shadow-cljs (38)
- # specter (7)
- # yada (30)
I am reading the “Clojure Programming” book (by Chas Emerick) and something made me intrigued. It mentions the “head retention” problem, with an example. Here’s the example: This apparently causes an OutOfMemoryError: `(let [[t d] (split-with #(< % 12) (range 1e8))] [(count d) (count t)])` While this doesn’t: `(let [[t d] (split-with #(< % 12) (range 1e8))] [(count t) (count d)])` The explanation is: “Since the last reference to t occurs before the processing of d, no reference to the head of the range is kept, and no memory issues arise.” I read this many times and I simply cannot understand the reason why this is happening. Can someone help me to understand this?
Found something on stack overflow -> https://stackoverflow.com/questions/15994316/clojure-head-retention
How can I include all clojure core libraries in a file so I don't have to fully qualify functions
(clojure.string/upper-case "string")
vs
(upper-case "string")
Its 100% bad practice, so much so ClojureScript decided to just remove the feature completly.
Thank you! I had a feeling that was a bad idea, sure enough when I tried it I immediately got namespace collision related Warnings in REPL, so I switched to using :as
and will be doing so from here out
@dannystanny01 (require [clojure.string :refer :all])
hi all, pls could you advise how do I use apache derby within a lein project