This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-08-22
Channels
- # announcements (13)
- # babashka (22)
- # beginners (22)
- # biff (17)
- # calva (6)
- # clerk (20)
- # clj-kondo (25)
- # clj-together (5)
- # clj-yaml (20)
- # cljdoc (16)
- # cljs-dev (1)
- # clojure (42)
- # clojure-brasil (1)
- # clojure-europe (26)
- # clojure-nl (6)
- # clojure-norway (24)
- # clojure-turkiye (3)
- # clojure-uk (5)
- # clojurescript (37)
- # core-async (7)
- # core-logic (2)
- # datalevin (7)
- # datomic (43)
- # events (2)
- # fulcro (7)
- # gratitude (1)
- # hyperfiddle (7)
- # java (7)
- # jobs (3)
- # lsp (4)
- # off-topic (16)
- # pathom (18)
- # polylith (1)
- # portal (27)
- # reitit (4)
- # releases (3)
- # shadow-cljs (47)
- # tools-build (14)
- # tools-deps (16)
- # yamlscript (11)
Looking for the source for load-file
user=> (resolve 'load-file)
#'clojure.core/load-file
user=> (source load-file)
Source not found
nil
user=> *clojure-version*
{:major 1, :minor 11, :incremental 1, :qualifier nil}
but don't see it in https://github.com/clojure/clojure/blob/clojure-1.11.1/src/clj/clojure/core.cljThanks, Alex.
kind of down in the guts there :)
Yeah. ns
in-ns
and load-file
seem to be the only ones defined with Var.intern
in RT (and a bunch of dynamic vars).
I'm working on a new version of yamlscript written in clojure and the 2 primary functions I have so far are yamlscript.core/load-file
and yamlscript.core/read-string
which take ys, convert it to clj and then do their clojure.core counterpart's equivalents.
My load-file looks like (->> ys-file slurp yamlscript.core/read-string eval)
...
But then I realized that clojure.core/read-string
only reads the first form.
So I was looking to see what clojure.core/load-file
did.
Unfortunately now that I've seen it, that's unlikely to help. :)
You probably want read with some options instead of read-string
This seems to work fine for now:
(defn read-string
[ys-string]
(clojure.core/read-string
(str "(do\n" (ys-to-clj ys-string) "\n)")))
😄Hi. I remember there's a website to find usable Clojure functions if we give the input and the expected output, but I forgot the URL. Tried Googling but no luck. Does anyone remember what the website's URL?
Yes, this is it. Thank you!
maybe not the best channel to ask the question but i am really curious - How do you monetize your skills? What are different income streams you have? Yeah day job and working at the company is great, but not what i have in mind. I know some people who are involved in many projects at once, that have popular blogs or create content for a hobby they love, or have consulting agencies... I am really wondering what people here do. Thank you for your time
this is an interesting question but this is absolutely the wrong channel for this. Can i ask you to delete this here and ask in #C03RZGPG3?
i was hoping you would delete it. I’m going to delete this for you and hope you post it in a more appropriate channel.
It happens automatically as part of ns
and is usually only necessary if you wish to alter its default behavior re excludes or renames
I ask because running older clojure code that defines things like abs
actually gives an “unbound function” error when running on a Clojure 1.11 container. I was curious if refer-clojure would avoid that issue.
that's a case where using :refer-clojure :exclude [abs]
would help
but another case where you could use it to "do something" would be to rename core functions to something else (occasionally useful if you are also defining things that overlap)

@U064X3EF3 Is there a way to make these warnings be errors? WARNING: int? already refers to: #’clojure.core/int? in namespace: org.acme, being replaced by: #’ai.dsl.backports/int?