Fork me on GitHub
#beginners
<
2022-05-15
>
Benjamin10:05:05

when-not
    (bound? #'parse-long)

  ;; clojure.core
    defn parse-double
My issue is I want to use parse-double in library code but I want to be backwards compatible with clojure 1.10.1

pavlosmelissinos11:05:29

The parse- functions in v1.11 are for convenience, they don't do anything special. If you want backwards compatibility what's the point of using them?

👍 1
dpsutton14:05:53

Copy the implementation and define it locally and exclude it from the clojure require

👍 1
☝️ 1
Benjamin14:05:45

@UEQPKG7HQ datomic cloud uses clojure 1.10 that is why

dpsutton14:05:11

Note it is not an error to exclude vars from clojure core that do not exist. So no need to be clever about referring clojure and checking the version on whether to exclude parse-long

👍 2
pavlosmelissinos14:05:14

> @UEQPKG7HQ datomic cloud uses clojure 1.10 that is why > That's not the problematic part. You're saying that you want to "use parse-double". If you want to be backwards compatible, you shouldn't. You should do what @U11BV7MTK suggested instead.

pavlosmelissinos15:05:39

A while ago somebody here said that, unlike applications, libraries should be slow to adopt new language features and I agree completely. (Not directly related to the question but I think it fits in this thread)

❤️ 1
Benjamin15:05:49

I see. Yea makes sense

Baye22:05:54

Hi, 1. Do you know of any project/tutorial or examples of how to build a very simple clone of Roam research/obsidian type of app? Basically, an app connected information. 2. If there isn’t any, as a beginner how does one begin thinking about building this? 3. Also, are the apps mentioned built as web apps and then transformed into Chrome extension? 4. Lastly, I know Roam is built with Clojure but what is its mobile version platform built on? Thanks

respatialized23:05:32

On #4: I think they're an early adopter of ClojureDart. https://twitter.com/Austen/status/1506738969773367296

👍 1
dgb2307:05:55

On 2. You need a flexible foundation for an editor like prosemirror. Building a rich text editor from scratch might be an option if you want to invest more time. Then you need a database that can handle very flexible storage and access patterns. Document/graph/tripple based like xtdb, datahike come to mind. There should be some way to add decent search. Or maybe handroll something with files and see where it goes.

👍 2
zeitstein07:05:46

Athens and Logseq are open source Roam-likes, though I guess looking over that could be too much for a beginner. https://github.com/logseq/logseq/blob/master/CODEBASE_OVERVIEW.md can be instructive. For starting with Datalog DB's, check out http://www.learndatalogtoday.org/. Looking over https://www.zsolt.blog/2021/01/Roam-Data-Structure-Query.html can also be instructive.

👍 3
Baye15:05:40

These are all very help. Thank you. I will start from here.