Fork me on GitHub
#clj-yaml
<
2023-08-02
>
Ingy döt Net14:08:17

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)

borkdude14:08:22

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

borkdude14:08:37

Unless it's a very trivial thing of course

Ingy döt Net14:08:18

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

borkdude14:08:38

that's always possible of course

borkdude14:08:24

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 Net14:08:29

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

borkdude14:08:38

we call it libraries

Ingy döt Net14:08:47

of course, sorry

Ingy döt Net14:08:15

my head's in too many rabbitholes atm

borkdude14:08:40

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

2
lread14:08:11

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

lread14:08:35

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

Ingy döt Net14:08:56

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

borkdude14:08:07

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

borkdude14:08:17

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

borkdude14:08:32

or if you have compiled Java artifacts

borkdude14:08:45

but even that can be accomplished without publishing to clojars

Ingy döt Net14:08:21

I would like practice publishing to clojars for other reasons 🙂

Ingy döt Net14:08:23

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

Ingy döt Net14:08:58

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

Ingy döt Net14:08:19

I was just looking for 42 languages to support

Ingy döt Net14:08:05

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

Ingy döt Net14:08:07

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. 😄

lread15:08:01

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 Net15:08:16

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

Ingy döt Net15:08:19

@U0479UCF48H have you seen jreleaser before? ^^

hifumi12317:08:51

I have not. For deployment I have always used Leiningen

Ingy döt Net17:08:02

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.

Ingy döt Net18:08:17

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

Ingy döt Net14:08:12

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

Ingy döt Net15:08:53

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?

borkdude15:08:35

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

borkdude15:08:34

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

Ingy döt Net15:08:06

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 Net15:08:14

Thanks for the pointers.

borkdude15:08:30

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

Ingy döt Net15:08:58

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

borkdude15:08:22

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