Fork me on GitHub
#clojure
<
2024-01-23
>
Michael13:01:06

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

p-himik13:01:36

There's an official guide: https://clojure.org/guides/install_clojure So should be just a single command. Does it not work for you?

Michael13:01:45

I was able to install clojure but find it hard to set up eMac. Can I use intellij IDE ?

p-himik13:01:22

What is "eMac"? Do you men Emacs?

Michael13:01:51

Yes emacs sorry my keyboard change the text

p-himik13:01:39

Are you familiar with Emacs by itself, without Clojure?

Michael13:01:39

Nope but I felt I can learn along with clojure since most clojure developers uses emacs

1
p-himik13:01:06

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.

7
Michael13:01:06

Okay Thanks a lot. I will go with intellij since I use it for my day job

Michael13:01:09

Thanks

👍 1
fogus (Clojure Team)13:01:16

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?

thomas13:01:03

maybe also ask in #C03S1L9DN ?

👍 1
jpmonettas14:01:43

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

👍 1
fogus (Clojure Team)14:01:15

No need to discriminate web vs non-web now. Learning more about the landscape will help me to formulate the question(s)

tommyB14:01:20

HTMX has been nice with Clojure and hiccup

👍 8
delaguardo14:01:17

electric

3
Alex Miller (Clojure team)14:01:05

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 :)

Ed14:01:24

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?

thheller14:01:25

graft is not a framework, so probably not worth mentioning

jpmonettas15:01:25

maybe it could be about GUIs strategies/libraries instead of frameworks?

👍 1
Thomas Cothran15:01:00

Htmx and other non-RPC/SPA options.

jpmonettas15:01:10

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.

kennytilton15:01:53

Maybe also ask in #C03A6GE8D32? think_beret

fogus (Clojure Team)22:01:36

@U0739PUFQ is it enough to distinguish as web vs non-web or is more granularity needed?

fogus (Clojure Team)22:01:50

How useful is a selection vaguely corresponding to “bag of libs rather than framework”?

Alex Miller (Clojure team)22:01:03

other options as a "first year" question are: open ended (no choices) or vaguely worded question with lots of options across both

jpmonettas02:01:37

> 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

Omer ZAK07:01:17

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.

Reut Sharabani16:01:22

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?

Reut Sharabani16:01:44

Maybe I'll just build the jar "manually" and that's it but still curious

dpsutton16:01:48

from clj -help

-X:deps mvn-install       Install a maven jar to the local repository cache

dpsutton16:01:18

although without a way to build i’m not sure what that actually does

Janet A. Carr16:01:13

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.

Reut Sharabani16:01:25

There is a build alias but sadly I'm not sure how to use it yet.

Janet A. Carr16:01:59

Are you comfortable sharing the repo? It should be something like clj -T:build jar

Reut Sharabani16:01:14

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)

Reut Sharabani16:01:13

I tried clj -M:build but it just drops me into a repl 😐

Janet A. Carr16:01:19

Yeah, so if you have tools.build installed, you should be able to do clj -T:build jar to build.

Janet A. Carr16:01:28

Need the -T, as it's a tool

Reut Sharabani16:01:49

what do you mean by "it's a tool"?

Reut Sharabani16:01:47

nm, I think I understand

Reut Sharabani16:01:53

-T provides tools.build ?

Janet A. Carr16:01:56

That's good question. I've never really thought about it beyond being a utility written in Clojure.

Janet A. Carr16:01:39

but yes, -T will run the alias as utility. The jar part calls the jar function in the build.clj file.

Reut Sharabani16:01:15

It looks like the build.clj imports stufd from tools.build so I assume -T provides these deps

Reut Sharabani16:01:19

thanks! it worked btw

Janet A. Carr16:01:50

No problem, did you get the jar installed ?

dpsutton16:01:07

the build alias will need to provide the build.deps dependency

💯 1
Reut Sharabani16:01:32

-T:build built me a jar so I think I can take it from here

👍 1
Alex Miller (Clojure team)16:01:57

if you want to learn more about tools.build and what's happening here, check out https://clojure.org/guides/tools_build

🙌 4
Reut Sharabani16:01:34

Some day I'll spend time building a mental model for it. Right now I just want to try this cool library :)

dpsutton17:01:08

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.

greg18:01:45

Is there any documentation about how Clojure compiler is implemented, how it works, etc?

seancorfield18:01:55

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.

seancorfield18:01:31

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?

dpsutton18:01:59

i think there are a few conj talks about it

seancorfield18:01:22

Yeah, there was one that delved quite deeply into Clojure internals, now you mention it...

dpsutton18:01:30

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?

seancorfield18:01:46

Ghadi perhaps?

dpsutton18:01:53

“what are all these class files about” is the one i was thinking of

❤️ 1
dpsutton18:01:14

ha. the “clojure compilation, backwards” is the bronsa decompilation talk

❤️ 1
dpsutton18:01:35

i love that he released the jar at talk time and let you decompile the jar. and then released the source a week later

seancorfield18:01:11

My question still stands for @U023TQF5FM3 tho' -- what drives you wanting to know?

seancorfield18:01:41

(I don't think it's particular useful knowledge to Clojure developers -- unless you're planning to create a new hosted implementation?)

greg18:01:19

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

greg18:01:01

thanks for all the links, this is exactly what I was looking for

dpsutton18:01:16

the clojurescript compiler would be quite helpful. might be easier to follow the emission of javascript than bytecode

seancorfield18:01:16

Cool! What runtime are you thinking of hosting it on?

dpsutton18:01:32

and the history of clojure pdf from HOPL would be worth your time if you haven’t already read it

❤️ 1
greg18:01:59

@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 🙂

jpmonettas18:01:02

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

❤️ 2
doug kirk22:01:25

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.