clj-yaml

Ingy döt Net 2023-08-02T14:40:17.763959Z

I've looked at the snake classes and can see what I need to do... I'm trying to decide if it would be easier to 1. write something around clj-yaml (which already has everything put together nicely) 2. write something new around snakeyaml directly (referring to clj-yaml for direction as I go, of course)

borkdude 2023-08-02T14:42:22.928269Z

May I suggest, just playing around with 2 first, use it privately for a couple of months, then learn the lessons how the API needs to be written to be used, and then we can move it to clj-yaml, if it turns out to be more generally useful? This way we don't have to commit to a new API that is not battle tested yet. Once we're committing to an API, we will never change, backward compatibility is rule nr 1 in clojure

borkdude 2023-08-02T14:42:37.368979Z

Unless it's a very trivial thing of course

Ingy döt Net 2023-08-02T14:44:18.395459Z

by number 1, I meant writing a new ingy/snakeyaml-parser package altogether, and just using clj-yaml as a dependency

borkdude 2023-08-02T14:44:38.887359Z

that's always possible of course

borkdude 2023-08-02T14:45:24.364189Z

I guess you could start that way and if clj-yaml gets in the way, you just inline whatever you need in your lib

Ingy döt Net 2023-08-02T14:45:29.571389Z

but probably better to do number 2, just to get experience making new clojure packages (is package the right term here?)

borkdude 2023-08-02T14:45:38.527819Z

we call it libraries

Ingy döt Net 2023-08-02T14:45:47.280299Z

of course, sorry

Ingy döt Net 2023-08-02T14:46:15.070899Z

my head's in too many rabbitholes atm

borkdude 2023-08-02T14:46:40.239309Z

no worries, just take it one step at a time :)

✅ 1
lread 2023-08-02T14:47:11.657319Z

Thing to consider is once you publish a library to clojars, Clojure folks will typically assume your API will never break.

lread 2023-08-02T14:47:35.658639Z

You can always have "alpha" caveats in your description tho.

Ingy döt Net 2023-08-02T14:47:56.365299Z

I doubt this library will get much usage by anyone but me, but good point

borkdude 2023-08-02T14:48:07.104489Z

what people typically do is just have the library available on github, you can refer libraries via a SHA

borkdude 2023-08-02T14:48:17.774249Z

there's no need to publish it to clojars, unless you want to serve leiningen users

borkdude 2023-08-02T14:48:32.464129Z

or if you have compiled Java artifacts

borkdude 2023-08-02T14:48:45.051759Z

but even that can be accomplished without publishing to clojars

Ingy döt Net 2023-08-02T14:49:21.634409Z

I would like practice publishing to clojars for other reasons 🙂

Ingy döt Net 2023-08-02T14:50:01.901869Z

https://github.com/ingydotnet/pst

Ingy döt Net 2023-08-02T14:51:23.933239Z

I realized I had already published to clojars last summer (as a test and immediately forgot)

Ingy döt Net 2023-08-02T14:51:58.694869Z

Funny thing, writing that pst tool is actually how I learned about Clojure at all!

Ingy döt Net 2023-08-02T14:52:19.565389Z

I was just looking for 42 languages to support

Ingy döt Net 2023-08-02T14:53:05.314459Z

I never did get all the way through publishing to maven central yet though. Remember that being a royal pain.

Ingy döt Net 2023-08-02T14:57:07.713399Z

And full circle (yaml-wise) I started pst because I want to write a full-featured, common-api YAML framework in 42 languages... So I needed to learn how to publish stuff in 42 languages. And I figured if I did that, I should save anyone else the torture by making a packaging tool that did things the same way in 42 languages. 😄

lread 2023-08-02T15:02:01.989529Z

Not sure if it is relevant to your pst effort, but a while ago I stumbled upon, but never looked into https://jreleaser.org/.

Ingy döt Net 2023-08-02T15:09:16.407339Z

Definitely looks worth exploring. pst wraps lein but can take advantage of anything better.

Ingy döt Net 2023-08-02T15:16:20.013529Z

https://foojay.io/today/how-to-release-a-java-module-with-jreleaser-to-maven-central-with-github-actions/#:~:text=JReleaser%20is%20a%20tool%20that,their%20modules%20to%20Maven%20Central. looks cool. Found it while I was trying to verify that jreleaser could actually publish to maven central. Didn't see that explicitly on http://jreleaser.org page

Ingy döt Net 2023-08-02T15:18:19.437729Z

@hifumi123 have you seen jreleaser before? ^^

hifumi123 2023-08-02T17:46:51.051349Z

I have not. For deployment I have always used Leiningen

Ingy döt Net 2023-08-02T17:51:02.000949Z

I struggled and failed to get stuff to maven central using lein (iirc) a year ago. If I can figure it out I'll wrap it into the pst flow.

hifumi123 2023-08-02T18:02:58.087399Z

There should be a guide to deploying to central here https://codeberg.org/leiningen/leiningen/src/branch/stable/doc/DEPLOY.md#deploying-to-maven-central

Ingy döt Net 2023-08-02T18:05:17.324019Z

I recall following a guide but giving up. I'll try again soon. Thanks.

Ingy döt Net 2023-08-02T14:58:12.333319Z

I started a #yaml for general yaml conversation if anyone's interested...

Ingy döt Net 2023-08-02T15:32:53.786299Z

lein new library snakeyaml-parser-events created a project.clj file but clj-yaml uses deps.edn which seems more standard around here. Is library not the best template? Or is lein not the best tooling for making new projects?

borkdude 2023-08-02T15:34:35.623889Z

@ingy I recommend just starting with #tools-deps which is the official tool whereas lein is a community project and doesn't let you use git or local deps as easy

borkdude 2023-08-02T15:35:34.975539Z

I recommend reading their guides and references and if you're stuck ask for help in #tools-deps

Ingy döt Net 2023-08-02T15:37:06.628579Z

I did realize that the topic is not specific to here, but all the context is here, so felt best to start here.

Ingy döt Net 2023-08-02T15:37:14.080919Z

Thanks for the pointers.

Ingy döt Net 2023-08-02T15:38:18.464819Z

Rush++ 🙂

borkdude 2023-08-02T15:38:30.913949Z

sure no problem, but all the people who know most about #tools-deps are in #tools-deps, that's why I suggested it

Ingy döt Net 2023-08-02T15:46:58.386069Z

Appears there's no avoiding bb in this world. Installing now 🤠

borkdude 2023-08-02T15:36:22.230829Z

@ingy Here is a super short quickstart, to get something going: https://blog.michielborkent.nl/new-clojure-project-quickstart.html

hifumi123 2023-08-02T17:44:41.041699Z

@hifumi123 has joined the channel