beginners

Robin 2025-12-03T10:11:05.742309Z

Hi, I'm working on my first open source library in Clojure and planning to publish it soon. Are there any recommended steps, checklists, or best practices I should follow to ensure a smooth release and good community adoption? Any advice or resources would be greatly appreciated!

seancorfield 2025-12-03T14:29:44.403169Z

Maybe https://clojure-doc.org/articles/ecosystem/libraries_authoring/ will be helpful?

👀 1
seancorfield 2025-12-03T14:30:16.715699Z

You may also find some of this useful: https://clojure-doc.org/articles/cookbooks/cli_build_projects/

David Stepanic 2025-12-03T14:25:14.189409Z

Hi, can someone help me out with .gitignore file, I have only one deps file in my clojure app for just declaring functions. I pushed project on git and now i have plenty of unnecessary things. Teacher gave us task to write some functions and push it on git. Any advice or resources would be appreciated, thanks.

2025-12-03T14:26:37.939759Z

git can be tricky

2025-12-03T14:27:30.892749Z

https://raw.githubusercontent.com/github/gitignore/refs/heads/main/Leiningen.gitignore is a good basis for clojure gitignore

David Stepanic 2025-12-03T14:28:04.197569Z

Thanks a lot

2025-12-03T14:28:27.705969Z

once you add that, the files you want to remove won't magically be added

2025-12-03T14:29:18.289779Z

if it's only a couple files, you can remove them with git rm --cached file1 file2 dir1/ etc

2025-12-03T14:30:28.289099Z

if there's lots of files, you can do

# Source - 
# Posted by gtatr, modified by community. See post 'Timeline' for change history
# Retrieved 2025-12-03, License - CC BY-SA 4.0

git rm -r --cached .
git add .
git commit -m "Drop files from .gitignore"

David Stepanic 2025-12-03T14:41:33.570899Z

okay i will try it, thanks once again

David Stepanic 2025-12-03T14:53:31.192629Z

I did it :D

1
2025-12-03T14:53:38.985469Z

ayy congrats

2025-12-03T14:53:41.742009Z

glad i could help

🙌 1
practicalli-johnny 2025-12-03T21:26:06.290409Z

Rather than specify all the files and directories to ingnore in a project, all files can be ignored and then add specific files & directories to include. Thid usually reduces the amount of changes needed to the ignore file For example, use this as a .gitignore file in the root of each clijure project https://github.com/practicalli/dotfiles/blob/main/git/ignore

🙌 1
David Stepanic 2025-12-04T12:05:43.206549Z

Thankss

2025-12-03T16:48:34.749229Z

is there a reasonable way to get a clojure collection out of a java.util.Collection?

dpsutton 2025-12-03T16:49:27.275589Z

probably into, or perhaps vec , or similar?

2025-12-03T16:50:02.361609Z

haven't worked for me; vec tries to coerce it into an object array, and into requires the object be seqable which it is not

dpsutton 2025-12-03T16:50:56.749049Z

user=> (let [c (doto (java.util.concurrent.LinkedBlockingQueue.)
                 (.offer 1)
                 (.offer 2)
                 (.offer 3))]
         (into [] c))
[1 2 3]
user=> (vec (doto (java.util.concurrent.LinkedBlockingQueue.)
              (.offer 1)
              (.offer 2)
              (.offer 3)))
[1 2 3]

dpsutton 2025-12-03T16:51:03.592709Z

what’s the concrete type?

2025-12-03T16:51:11.515369Z

java.util.Collections$3 lol

2025-12-03T16:51:56.270389Z

it's the return result from java.util.Collections/enumeration

dpsutton 2025-12-03T16:52:31.359629Z

have you seen

clojure.core/enumeration-seq
([e])
  Returns a seq on a java.util.Enumeration

2025-12-03T16:52:37.497919Z

ah!

2025-12-03T16:52:38.917859Z

perfect

2025-12-03T16:52:50.885739Z

that's what I was hoping for

dpsutton 2025-12-03T16:53:03.892969Z

i’m not seeing java.util.Collections/enumeration though

2025-12-03T16:53:37.133259Z

not that I'm using java 8

dpsutton 2025-12-03T16:54:08.198499Z

https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html i don’t know why i didn’t see it here?

dpsutton 2025-12-03T16:54:34.661059Z

ah Collection vs Collections

2025-12-03T16:54:43.523139Z

yea

ghadi 2025-12-03T16:57:50.918949Z

the original question is wrong -- you have an Enumeration, which is not a Collection

2025-12-03T16:58:11.522789Z

yeah, my bad

ghadi 2025-12-03T16:58:35.266719Z

but you had a collection previously because you are calling something that you're feeding to Collections/enumeration

dpsutton 2025-12-03T16:58:39.111729Z

(apropos "enumer") is a useful thing to do

2025-12-03T16:59:03.858999Z

I also missed the s in collection, since the concrete type was java.util.Collections$3 I made the incorrect assumption that this would be a collection

2025-12-03T16:59:20.405259Z

but yeah, the question was wrong

ghadi 2025-12-03T17:03:15.039869Z

yeah it's somewhat unfortunate for a REPL to print private concrete classes instead of public capabilities (Enumeration)

ghadi 2025-12-03T17:03:51.297399Z

enumerations are super weird and precede 1.2 Collection API

ghadi 2025-12-03T17:04:07.560329Z

what dark pit do you find yourself in?

😆 1
2025-12-03T17:09:32.354269Z

Messing with jdbc for snowflake, doing lazy input stream construction to pass to a sequence input stream to make a csv upload.

2025-12-03T17:10:38.048869Z

what I've found is that apparently somewhere between creating an enumeration from the result of a clojure.core/map call and copying the bytes out of the sequence input stream, it truncates how many elements are consumed.

2025-12-03T17:11:58.761169Z

it doesn't appear to actually be the enumeration that's an issue because I get all the elements out of it when I try to coerce it back to clojure types with enumeration-seq

2025-12-03T17:12:10.790919Z

rather, it seems like SequenceInputStream is the problem

2025-12-03T17:23:33.164649Z

found my issue, apparently it's a jdk bug: https://github.com/openjdk/jdk/commit/2d609557ffe8e15ab81fb51dce90e40780598371