Fork me on GitHub

day for first timers eh 😄 I also "finished" my first thing now working on merging the buttons into just one with all three functions, animated timer and a table of the last five events plus plot with Oz uff


I've been trying to follow a tutorial and get a Github project to build, with no luck. Could someone work with me in PM? Thanks.


Hello, what is the best way to get more clojure experience for a newbie? Currently I'm pretty comfortable with the language (1.5 books & easy/medium 4clojure problems completed) but developing the app from scratch is still challenging. I was able to setup simple shop app with bidi, ring, hiccup, monger (mongodb atlas) but when I get to authentication part there was a bug I couldn't wrap my head around. And also the absence of pleasant workflow was really frustrating. After googling I found out the there is a notion of a reloaded workflow. Somebody recommended to look into juxt/edge where the integrant is the dependency. I watched 4 talks by James Reeves & today I tried to setup project with duct... ...and I couldn't do anything unfortunately. It still looks too complicated & I genuinely don't know how to work with it. Thank you for reading to the end. The question remains the same. How to continue getting more experience. What would you do? Thank you.


I have somewhat similar question, anyone knows how to setup 'lein ring server' to start the server on a LAN mode, so it can be accessible for anyone on my network instead of localhost ?


@cybersapiens97 change the bind address to (warning: it makes the service public)


@cybersapiens97 seems you can specify :ring {:host ""} in your project.clj for doing that


by public you mean accessible by others on the same network


@cybersapiens97 no, would mean anyone who can reach you


if you want just the local lan, you would have to bind to your local lan address (usually something like 192.168.x.x)


oh right, but how would one reach me on trough my IP ?


through any IP your network cards are listening on


if external hosts can't reach your computer, it's only reachable via the local lan, won't be a problem to listen on but normally good practice to only bind to addresses you actually care about. is a nice shorthand for public services


btw, 'lein ring server-headless 3000' automatically starts on


Yeah? Seems like a really bad default

👍 5
Sy Borg15:02:42

is there any way to extend (doc xx) functionality to also show examples (e.g. from clojuredocs) in REPL? any extra libraries? like man xx -Examples in Powershell.


if you are using CIDER you can hit C-c C-d r and see examples from This is a great feature

Sy Borg15:02:02

I'm on Cursive

Ville Vuorinen15:02:54

Hey, what's the best ide (and easiest to setup) when using arch? i triend IntelliJ with cursive but couldn't get it fully working.


I have a intellij + cursive setup on my arch, works fine


I unpacked the archive from jetbrains directly in a local folder in my ~ and symlinked the launcher


if your java setup is correct it should work out of the box

Ville Vuorinen15:02:36

Thanks! I had problems with run configurations, Like I couldn't get lein run work with trampoline etc. Can you give me screenshots of your run configurations?


that's default setup. I don't use leiningen anymore but I've successfully made it work in the past

Ville Vuorinen15:02:19

Cool cool, thank you very much!


I recommend you install clojure-related tools manually instead of pacman as they tend not to be updated frequently


I have good experience with VS Code and clojure plug-ins. Vs code is available via pacman

Sy Borg15:02:52

what is arch?

Ville Vuorinen15:02:12

it's a linux distribution


would you guys say that a minimal clojure web application is good enough with just 3 libs, Ring, Compojure and a DB lib? (i'm going to build a simple web app for training my back end skills) and also, what is a easy to use and simple lib for a simple DB ?


I'd say so; I like hiccup as well for building HTML


oh nice, thanks

Tom Sanders19:02:15

For DB I like It will stop you going to SQL hell in the early days


HugSQL relies on under the hood (as do nearly all SQL libs).


oh yeah, i kinda remember this, i asked the same question 2 months ago, but i had to stop my studies and now i'm back

Tom Sanders19:02:47

Certainly, yes. I'm recommending it as much from a structure point of view


and now i remember about clojure java jdbc


If you like a DSL for SQL and want to compose queries from fragments, look at HoneySQL (I maintain that as well as the Contrib java.jdbc lib).


If you like your SQL external to your code, HugSQL looks great.


so would you recommend this hugsql for complete beginners? I ultimately want to make full stack apps but not sure when I should go for it. I don't know anything about sql or databases. I was planning on using luminus and the creator's book on web development when the time just so I can focus on one thing. not sure if he emphasizes one db over the other though.


i'm finding most beginner tutorials just mention you have multiple db options, they never assume I don't know a thing about databases

Dan Zurawski20:02:22

I think having a basic understanding of SQL, doing queries, insert, update, and joins is really important


any recommendations for learning sql from the beginning?

Dmytro Bunin20:02:04

just get db running locally with few tables and try doing everything with it


fair enough!


hugsql is good for beginners and experts that just want to write SQL


so SQL will be a whole new language I have to learn? And it's a language for writing databases? And those db's contain all the saved info from my app? What is edn? Is that clojure's database language? is that what datomic uses instead of sql?

Lennart Buit20:02:54

SQL is a domain specific language for querying data from a database

Lennart Buit20:02:35

so, for example, SELECT * FROM users WHERE id=12 would be SQL for ‘Give me all information you have about a user with id 12’


and so hugsql is a way to take that and bring it into the clojure world?


HugSQL lets you write that SQL in separate .sql files and it wraps that SQL in Clojure functions that it generates for you.


And it uses to run the SQL against a database.


Without HugSQL, you still have to write SQL. You would just write it in a string in your Clojure code instead. HugSQL is like having those strings in a separate file instead.


(jdbc/query db-spec ["SELECT * FROM users WHERE id = ?" 12])

Lennart Buit20:02:26

And then to complete your questions, EDN is a data notation that is like JSON, but more specific to clojure. Just like JSON is a subset of JavaScript, EDN is a subset of Clojure and is focussed on data instead of code


ok, ok. nice. I'm basically wanting to have the ability to create web apps like the folks who recently posted on the jobs board. I want to get there in a couple of years if possible. Is luminus and hugsql/sql a good way to get there


Luminus is definitely a "batteries included" approach but it involves a lot of code and libraries and config combined so it can be pretty overwhelming.


re-frame sounds like the path I want to take, just not sure when to jump all the way to that from right now basically going through various clojure books and learning programming as a whole.

Lennart Buit20:02:26

well, writing webapps comes in several varieties


I think it's much better for beginners to get a simple server-side "Hello, World!" up and running with Ring and Compojure first.


Then learn some SQL and experiment with -- so you can learn that independently of your basic web app stuff.

Lennart Buit20:02:12

re-frame is a clientside framework for making single page applications. Like @U04V70XH6 is suggesting, first have a serverside rendering of some plain HTML


ok! I think I've been told that before too. Ring and Compojure. So that's the back end doing server rendering? old school web app approach right?


Yup. Simple HTTP request/response handling.

Lennart Buit20:02:35

yeah pretty oldschool, but I think very valuable information


and then maybe throw some hiccup in there? That's the clojure way to generate html from the server?


Ring is the core lib. Compojure helps you write "routes" in your request handling (mapping URIs to handler functions).


or did I just complicate it again? I want clojure all things basically. I've drank the kool aid

Lennart Buit20:02:16

first things first ^^ start small, expand from there


Hiccup is another layer, and one way to generate HTML from data.


perfect. I think I get that.


At work, we use Selmer, because we like working with external HTML files that our designers can also work on.


Compojure and Ring, just get something small on the browser. And that's something I would be able to show my family and friends pretty easily?


Selmer is like Django in terms of templates.

Lennart Buit20:02:11

oh thats cool sean!


Yes, Ring/Compojure will get you a small, interactive web app.

Lennart Buit20:02:35

is it a direct port of Jinja uhh that other django templating language?


perfect! And eventually if I use things like luminus or rum or whatever, they use Ring and Compojure anyways right? So thats the perfect first steps


I'm not sure if it will help or not, but here's a simple example of a Ring / Compojure / Selmer / Component web app that uses a database


(Component may well make it too complex to learn from but it's also another piece of the puzzle when you start building systems that include things that have some sort of start/stop lifecycle, such as database connections, web server startup, etc)


@chase-lambert What's your background prior to Clojure?


I'll bookmark it. I'm sticking to this compojure/ring advice first.


started with a little javascript with freecodecamp, read way too much language war garbage, played around with elm, haskall, rust, racket, and then clojure. finally told myself to stop hopping and focus as clojure really clicked pretty quickly. so I know clojure most of all (and I don't know much clojure yet)

Lennart Buit20:02:33

exciting, learning to program is the best thing I ever did ^^!


Cool. SQL will definitely be something you'll need to learn if you want to write non-trivial programs -- and it's a useful skill, to be able to query and manipulate data from other people's databases when you're on a team.


it's so fun! I wish I had taking more of a liking to it years ago. I remember doing Basic and such but it never took hold. Now I'm 38 and falling for it hard.


My dad bought me a programmable calculator when I was a young teen and that got me hooked! 🙂

Lennart Buit20:02:22

hah, I remember writing code in highschool on my TI-84

Lennart Buit20:02:26

that was basic too!

Lennart Buit20:02:00

we should applaude Texas Instruments for inspiring young people to start programming

Lennart Buit20:02:50

@U04V70XH6 how does a “program” on that calculator look?


I "graduated" to this a year or two after the Sinclair.


It was basically "assembler". And you had to step through it line by line when entering/editing it. When you ran it, all it could do was display numbers on the screen.


My friend and I created an interactive solo version of "battleships" for the TI-58 that did "animated" sonar pings in the numeric display when you were looking for enemy ships to blow up 🙂

Lennart Buit20:02:25

did it have (non-volatile) memory to store the programs, or was it like ad-hoc procedures?


The Sinclair was all in-memory and not persistent. The TI-58 let you save programs to magnetic card strips and read them back in.


We thought that was luxurious at the time!


At university, we "backed up" our programs to rolls of punched tape 🙂

Lennart Buit20:02:34

haha yeah! I am sometimes envious in that I didn’t really experience such fundamental “you can understand it all” programming

Lennart Buit20:02:09

nowadays, code runs inside a vm, and that vm runs on top of cpu that is absurdly complex

Lennart Buit20:02:28

there is no way that I can ever understand the full stack

Dmytro Bunin20:02:00

code runs in a container in a vm on top of cpu


Imagine a job where you wrote COBOL to target a multi-user departmental mini-computer that had just 4MB of RAM 🙂


The "good ol' days" 🙂

Lennart Buit21:02:02

My dad (still 27 here) prepared me a 8086 computer with a batch script that booted a little game for each letter on the keyboard

Lennart Buit21:02:13

my carreer path was basically sealed back then 😛


my workflow is usually: first mold the query in pgadmin until it works, then copy it to a .sql file and hook it up with hugsql

Tom Sanders20:02:25

Whether you know SQL or not won't affect your choice of Clojure DB lib but you'll obviously need to know enough SQL to write some queries. Sounds like you will have to digress into that first


@chase-lambert Feel free to join #sql and ask for help with SQL as needed -- it's a pretty low traffic channel and I keep a close eye on it (also #honeysql if you decide to explore that and there's a #hugsql channel too).

Raymond Ko21:02:16

For shadow-cljs users, do you know if there is an equivalent of lein-ancient to check which dependencies are out of date?

Raymond Ko21:02:33

in shadow-cljs.edn?


there is not currently


so with the official cli tools, can you also use that to connect into nrepl through something like emacs/cider? lein repl shows me the nrepl port to connect to but I don't see similar stuff with clj when in a project and not seeing the info about that on the official repl or cli pages


by default clj doesn't start a networked repl (nrepl being one of the networked repl implementations)


oh wait, would you manually add the nrepl and assorted info in the deps.edn file?


you can. and you could manually start an nrepl server and then connect from emcas


however, just try m-x cider-jack-in in a deps.edn project


cider tries its best to figure out the type of project and how to get it up and running.


ahhh, cool. that makes sense. I was just curious. I keep playing around with rebel readline too. Some really neat tools out there in this community.


What is the relationship between the Clojure command line tools and Are clj or anything related to deps.edn technically still an alpha release?


And were the clojure command line tools introduced in 1.9.0 or did they exist previously?


tools.deps is a library for managing classpath stuff based on deps.edn; clojure uses tools.deps under the hood.


they were introduced for 1.9, with earlier versions all you needed was a single jar for standalone clojure startup


1.9 introduced a non-optional but not bundled dep (spec), so it needed a dep resolution tool for a minimalist test case


Technically, tools.deps is still alpha, as is clojure.spec. But Clojure's "alpha" is most languages' "release candidate" to be honest 🙂


At work, we've run alpha builds of Clojure and its tooling in production for nearly eight years.

👏 5