beginners 2025-12-03

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!

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.

Thanks a lot

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

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

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"

okay i will try it, thanks once again

I did it :D

1

glad i could help

🙌 1

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

Thankss

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

probably into, or perhaps vec , or similar?

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

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]

what’s the concrete type?

java.util.Collections$3 lol

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

have you seen

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

that's what I was hoping for

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

not that I'm using java 8

ah Collection vs Collections

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

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

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

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

but yeah, the question was wrong

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

enumerations are super weird and precede 1.2 Collection API

what dark pit do you find yourself in?

😆 1

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

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.

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

rather, it seems like SequenceInputStream is the problem