Fork me on GitHub
#yamlscript
<
2023-12-29
>
delon16:12:46

Congrats @ingy on all your hard work paying off!

delon16:12:25

I'd be interested in working on the Ruby bindings

Ingy döt Net16:12:31

I think I saw you on linkedin, no?

Ingy döt Net16:12:52

Are you new to Clojurians slack?

delon16:12:04

No we chatted a little earlier

delon16:12:18

No worries

Ingy döt Net16:12:39

A ruby binding would be great

Ingy döt Net16:12:09

Have you done FFI stuff in Ruby before?

delon16:12:14

I forked the repo so we'll see what my time looks like. But, it seems like it should be pretty straight forward

delon16:12:29

Yes, I've done a little

Ingy döt Net16:12:45

yeah, look at the python, perl, raku and rust subdirs

delon16:12:52

I think Fiddle is the tool we'll want to use in this case

Ingy döt Net16:12:57

they all have working bindings

delon16:12:12

Yeah, I was looking at the python implementation

Ingy döt Net16:12:01

we just have one API call load ruby-obj = yamlscript.load(ys-string)

Ingy döt Net16:12:46

the libyamlscript function returns json with either a data key or error key

Ingy döt Net16:12:28

the error message is in error.cause throw that if you get it

😎 1
Ingy döt Net16:12:56

throw an error is anything but data or error comes back

delon16:12:18

Yeah, that makes sense

Ingy döt Net16:12:12

submit a PR to the https://github.com/yaml/yamlscript and I'll release it to rubygems.

👍 1
Ingy döt Net16:12:01

when we make changes to YS we release the shared lib and all bindings at same time

😎 1
delon16:12:32

I should have a little time over the weekend to dig into it

Ingy döt Net16:12:48

oh... you need to bind to an exact libyamlscript.so.0.1.x version

Ingy döt Net16:12:51

put a line like

YAMLSCRIPT_VERSION = '0.1.42'
in the code. and then use that variable to load the lib. the release system will update the version for each release that way.

👍 1
Ingy döt Net16:12:25

ping me if you need anything! thanks again 🙂

delon16:12:12

Will do. Thanks for a cool project!

Ingy döt Net16:12:29

you bet! stoked that you like it

😎 1
delon16:12:18

It's another layer of Clojure's Lispy subversion

Ingy döt Net16:12:15

Since you know clojure well (I assume) my clojure code (under core libyamlscript and ys dirs) really needs review

Ingy döt Net16:12:42

I'm just not that good at clojure yet

delon16:12:52

No worries your perl magic and probably programming magic generally is much better than mine 🐫 😄

Ingy döt Net16:12:24

any clojure related PRs welcome 🙂

delon16:12:35

My Clojure experience is mostly around trying to implement more subversive versions of the system hence why lingy and yamlscript interest me. 🙂

delon16:12:27

So we're the perfect pair 😂

1
delon16:12:52

I've only worked on a few solo projects for pay

Ingy döt Net16:12:54

well I'm interested in using Clojure to spread cool ideas from Clojure to 42 languages

delon16:12:06

Yeah, I like that too

delon16:12:20

I've long been a fan of Acmeism

delon16:12:48

You got my imagination going with that a long time ago

Ingy döt Net16:12:04

well I'm also trying to figure out a business around YAML and YS. YAML LLC is my company. But haven't really started anything yet...

Ingy döt Net16:12:29

huh, wow. no idea how people find out about acmeism

Ingy döt Net16:12:38

that's quite a surprise!

😊 1
delon16:12:38

I could see it as a cool devops tool, but I'm sure you've already thought of that

Ingy döt Net16:12:35

lots of thoughts... I want to start trying out YS in places where YAML already is used but has struggles

Ingy döt Net16:12:17

A lot of Clojurians like to see everything as Clojure. I don't, but I think Clojure is gold. And my hope is that YS ushers in a whole new crowd to Clojure.

delon16:12:33

That'd be cool

delon16:12:59

One other thought is maybe an Acmeist build tool, dependency management tool or both. We have too many of them in different languages.

Ingy döt Net17:12:47

I'm working on that right now!

Ingy döt Net17:12:07

Soon you'll be able to write a new library in YS, compile to shared lib, and instantly ship bindings to 42 langs

delon17:12:20

That's pretty cool

delon17:12:26

No, that's really cool

Ingy döt Net17:12:43

that's really acmeism realized

Ingy döt Net17:12:15

and all thanks to clojure

delon17:12:40

That's pretty cool

delon17:12:11

I'm gonna have to get going, but it's been cool chatting.

Ingy döt Net17:12:21

I'll DM you

👍 1
delon16:12:37

I was also curious, is Lingy on hold?

Ingy döt Net16:12:25

It is on hold atm. When I gave the talk on Lingy and YAMLScript in July, Lingy was the big deal and YS was a cherry on top. But then I got found by here, and learned about graal and sci etc,

Ingy döt Net16:12:44

and my whole vision flipped

delon16:12:53

That makes sense

delon16:12:17

Graal is very cool tech

delon16:12:16

Initially I was thinking of contributing there

Ingy döt Net16:12:26

If you want to please do!

Ingy döt Net16:12:44

There's really big work to be done in Lingy

Ingy döt Net16:12:06

The Ruby binding to YS is a day's work likely

👍 1
Ingy döt Net16:12:17

Lingy is meant to go past Perl. Python, Ruby etc

Ingy döt Net16:12:56

One big milestone is getting all of clojure.core working

Ingy döt Net16:12:10

Not sure how much you've looked at Lingy

delon16:12:47

I looked a little

Ingy döt Net16:12:02

but it literally pulls in chunks of the clojure.core source that it handles into lingy.core

Ingy döt Net16:12:46

and the Lingy::Reader can read all of clojure.core

😎 1
delon16:12:12

I'd be interested in implementing the persistent data structures

Ingy döt Net16:12:26

that's the BIG part

delon16:12:43

I've done some of the simpler versions of them in PHP a while back

Ingy döt Net16:12:59

one idea was to have a liblingy shared lib / virtual machine written in LuaJIT to do the HAMTs etc

😎 1
delon16:12:00

The Ruby gem Hamster might be an interesting place to look for ideas on the Perl version

Ingy döt Net16:12:20

Lingy can interop with native perl objects. It boxes and unboxes as needed.

Ingy döt Net16:12:24

the hard part with perl is that things like hashes and arrays don't have OO access. unless you use ties

delon16:12:08

Do you mean as far as interop with the clojure side?

Ingy döt Net16:12:18

when a language (like java) has an OO interface to everything it makes it easier to work with

Ingy döt Net16:12:38

Yeah, I think so...

delon16:12:07

I've had to deal with some of that in some of my Clojure implementation experiments in JavaScript

Ingy döt Net16:12:38

You can make new instances from perl module classes and call methods. And call perl functions as well.

delon16:12:16

That's how I got around it in JS. The core lib functions ensured the interface for the native types.

delon16:12:26

In a lot of ways similar to how null in the Java implementation is a Seq even though it's not an object.

delon16:12:59

The Seq interface can't ensure that but the seq function does.