This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-01-23
Channels
- # announcements (1)
- # babashka (13)
- # cherry (12)
- # cider (6)
- # clj-kondo (3)
- # cljs-dev (28)
- # clojure (77)
- # clojure-europe (25)
- # clojure-nl (1)
- # clojure-norway (35)
- # clojure-uk (5)
- # clojurescript (31)
- # conjure (7)
- # cursive (12)
- # data-science (9)
- # datalevin (5)
- # datomic (8)
- # hyperfiddle (21)
- # jobs (7)
- # kaocha (19)
- # malli (26)
- # matrix (3)
- # releases (1)
- # shadow-cljs (42)
- # squint (95)
- # testing (2)
- # vim (14)
- # wasm (1)
Please is there a resource that simple explain how to set up cloture with eMac. I'm a beginner and finding it hard to setup clojure
There's an official guide: https://clojure.org/guides/install_clojure So should be just a single command. Does it not work for you?
I was able to install clojure but find it hard to set up eMac. Can I use intellij IDE ?
Nope but I felt I can learn along with clojure since most clojure developers uses emacs
Doesn't matter that much what most people use. Emacs has a steep learning curve, I wouldn't advise learning it alongside something else. Especially given that it might not be your thing at all. Try something more beginner-friendly first. VS Code + Calva or IntelliJ IDEA + Cursive.
I've started the process of preparing the 2024 State of Clojure survey and have considered adding a question for front-end frameworks. What are the popular and promising options these days for Clojure devs doing front-end dev?
with front-end you mean web stuff only, or in general ways of building graphical interfaces? If the later I guess it can also include javafx, cljfx, membrane and humbleUI
No need to discriminate web vs non-web now. Learning more about the landscape will help me to formulate the question(s)
You could also consider this question from the perspective of: if you were starting a new project and were trying to assess relative popularity of frameworks for ui, what options are you considering? ideally the answer to this question would be useful to someone :)
Having read this recently: https://code.thheller.com/blog/shadow-cljs/2023/07/13/the-lost-arts-of-cljs-frontend.html, I've been meaning to try https://github.com/thheller/shadow-graft ... is that the sort of perspective you mean?
Htmx and other non-RPC/SPA options.
imho the web and general GUIs questions should be discriminated. I would be interested in seeing how people are approaching web interfaces, which is a world on its own, but where things like javafx or humbleUI don't make sense. On the other hand, I would be interested in what people are using when going for backoffice or dev tooling like morse, portal, flow-storm, etc where all the technologies apply. Like portal choose web tech while morse and flow-storm did javafx for their GUIs.
Maybe also ask in #C03A6GE8D32?
@U0739PUFQ is it enough to distinguish as web vs non-web or is more granularity needed?
How useful is a selection vaguely corresponding to “bag of libs rather than framework”?
other options as a "first year" question are: open ended (no choices) or vaguely worded question with lots of options across both
> is it enough to distinguish as web vs non-web or is more granularity needed? @U050WRF8X imho those two categories are enough : 1 - about building GUIs for "desktop applications" where you can choose from javafx, through react/re-frame with browser/electron and everything in between. 2 - specifically about web browsers front-ends
As a newcomer to Clojure, I would benefit from knowing which framework to choose for non-web Clojure applications and for web ClojureScript applications. So, I suggest that you ask both questions: 1. Multiple-choice question to identify one as non-web/web/both user. 2. Two lists of frameworks, single-choice question for each, for the developer to choose his preferred package for non-web and for web. If a developer says he is exclusively non-web (say), show only the non-web frameworks question.
I want to use a library that uses deps.edn and doesn't release versions to maven.
I want to use it from a project that uses leiningen.
I'm used to doing lein install
to test local libraries in local projects.
Is there an equivalent to lein install
in deps.edn? How can I make them interact?
Maybe I'll just build the jar "manually" and that's it but still curious
from clj -help
-X:deps mvn-install Install a maven jar to the local repository cache
Could build the jar with Tools.build. Conveniently, the tools.build API also has an install
function. That's might be a bit heavy handed though.
There is a build alias but sadly I'm not sure how to use it yet.
Are you comfortable sharing the repo? It should be something like clj -T:build jar
sure, this is the library: https://github.com/s-expresso/rubberbuf And I want to use it's recent version from a leiningen project (there's only 1.0.0 in maven)
I tried clj -M:build but it just drops me into a repl 😐
Yeah, so if you have tools.build installed, you should be able to do clj -T:build jar
to build.
Need the -T, as it's a tool
what do you mean by "it's a tool"?
nm, I think I understand
-T provides tools.build ?
That's good question. I've never really thought about it beyond being a utility written in Clojure.
but yes, -T will run the alias as utility. The jar
part calls the jar function in the build.clj file.
It looks like the build.clj imports stufd from tools.build so I assume -T provides these deps
thanks! it worked btw
No problem, did you get the jar installed ?
if you want to learn more about tools.build and what's happening here, check out https://clojure.org/guides/tools_build
and the https://clojure.org/reference/clojure_cli#use_tool section of the new Clojure CLI reference
Some day I'll spend time building a mental model for it. Right now I just want to try this cool library :)
lein and tools.build are both simple programs for building a jar. Tools.build makes them easy to see. Lein makes it truly annoying to know what is going on and to modify it.
Is there any documentation about how Clojure compiler is implemented, how it works, etc?
There's the source code -- that's about it. It's a relatively straightforward compiler (as compilers go) since the language is small and it deliberately does not optimize -- leaning on the JVM/JIT to optimize hotspots.
I guess my question would be: what specifically do you want to know and/or what problem are you trying to solve by knowing more about that?
Yeah, there was one that delved quite deeply into Clojure internals, now you mention it...
i know someone went through it but can’t remember their name. bronsa did a decompiler that might have some insights. maybe halgari has as well?
Ghadi perhaps?
That led me to this post, which links to some talks: https://clojureverse.org/t/resources-for-learning-how-the-clojure-compiler-works/9059
i love that he released the jar at talk time and let you decompile the jar. and then released the source a week later
My question still stands for @U023TQF5FM3 tho' -- what drives you wanting to know?
(I don't think it's particular useful knowledge to Clojure developers -- unless you're planning to create a new hosted implementation?)
Yep, I'm flirting with making a side project to create another hosted implementation. It might never happen but wanted to get familiar myself first with existing implementation and then decide
the clojurescript compiler would be quite helpful. might be easier to follow the emission of javascript than bytecode
Cool! What runtime are you thinking of hosting it on?
and the history of clojure pdf from HOPL would be worth your time if you haven’t already read it
@U04V70XH6 At this point I just want to research the topic. Most likely I never get to the point to share something, so don't want to make unnecessary noise 🙂
@U023TQF5FM3 I wrote this comment some time ago for a similar question https://clojurians.slack.com/archives/C03S1KBA2/p1697455307674269?thread_ts=1697398141.175179&cid=C03S1KBA2
also wrote this post some time ago on how the ClojureScript compiler works and some tools that helps to study it https://jpmonettas.github.io/my-blog/public/compilers-with-flow-storm.html
Yep, I've been working to learn enough Zig to host Clojure there. It seems quite amenable. I like Zig because you can translate to Zig's AST and then let the Zig compiler optimize it for the platform being targeted…including bare metal (no OS)! My plan currently is to write an EDN parser to take the output of the Clojurescript compiler's stored format, translate that to Zig AST, and then it's largely just a matter of library work.
the early CLJS compiler was approximately 500 lines and a good study https://github.com/clojure/clojurescript/blob/29704da016b89529631979b8598f8572b4b4b9aa/src/clj/cljs/compiler.clj