Congrats @ingy on all your hard work paying off!
I'd be interested in working on the Ruby bindings
Hi @delon!
I think I saw you on linkedin, no?
Yes
Are you new to Clojurians slack?
No we chatted a little earlier
ah sorry 🙂
No worries
A ruby binding would be great
Have you done FFI stuff in Ruby before?
I forked the repo so we'll see what my time looks like. But, it seems like it should be pretty straight forward
Yes, I've done a little
yeah, look at the python, perl, raku and rust subdirs
I think Fiddle is the tool we'll want to use in this case
they all have working bindings
Yeah, I was looking at the python implementation
we just have one API call load
ruby-obj = yamlscript.load(ys-string)
the libyamlscript function returns json with either a data key or error key
I see
the error message is in error.cause
throw that if you get it
throw an error is anything but data or error comes back
super easy
Yeah, that makes sense
submit a PR to the https://github.com/yaml/yamlscript and I'll release it to rubygems.
when we make changes to YS we release the shared lib and all bindings at same time
I should have a little time over the weekend to dig into it
oh... you need to bind to an exact libyamlscript.so.0.1.x version
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.ping me if you need anything! thanks again 🙂
Will do. Thanks for a cool project!
you bet! stoked that you like it
It's another layer of Clojure's Lispy subversion
Since you know clojure well (I assume) my clojure code (under core libyamlscript and ys dirs) really needs review
I'm just not that good at clojure yet
No worries your perl magic and probably programming magic generally is much better than mine 🐫 😄
any clojure related PRs welcome 🙂
My Clojure experience is mostly around trying to implement more subversive versions of the system hence why lingy and yamlscript interest me. 🙂
me too
So we're the perfect pair 😂
I've only worked on a few solo projects for pay
well I'm interested in using Clojure to spread cool ideas from Clojure to 42 languages
Yeah, I like that too
I've long been a fan of Acmeism
You got my imagination going with that a long time ago
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...
Got it
huh, wow. no idea how people find out about acmeism
that's quite a surprise!
I could see it as a cool devops tool, but I'm sure you've already thought of that
lots of thoughts... I want to start trying out YS in places where YAML already is used but has struggles
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.
That'd be cool
One other thought is maybe an Acmeist build tool, dependency management tool or both. We have too many of them in different languages.
I'm working on that right now!
Awesome!
Soon you'll be able to write a new library in YS, compile to shared lib, and instantly ship bindings to 42 langs
That's pretty cool
No, that's really cool
that's really acmeism realized
Indeed
and all thanks to clojure
and friends
Yeah
That's pretty cool
I'm gonna have to get going, but it's been cool chatting.
I'll DM you
I was also curious, is Lingy on hold?
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,
and my whole vision flipped
Got it
That makes sense
Graal is very cool tech
Initially I was thinking of contributing there
If you want to please do!
There's really big work to be done in Lingy
The Ruby binding to YS is a day's work likely
Lingy is meant to go past Perl. Python, Ruby etc
One big milestone is getting all of clojure.core working
Not sure how much you've looked at Lingy
I looked a little
but it literally pulls in chunks of the clojure.core source that it handles into lingy.core
iirc
and the Lingy::Reader can read all of clojure.core
I'd be interested in implementing the persistent data structures
that's the BIG part
I've done some of the simpler versions of them in PHP a while back
one idea was to have a liblingy shared lib / virtual machine written in LuaJIT to do the HAMTs etc
The Ruby gem Hamster might be an interesting place to look for ideas on the Perl version
cool!
Lingy can interop with native perl objects. It boxes and unboxes as needed.
Ok, cool
the hard part with perl is that things like hashes and arrays don't have OO access. unless you use ties
Do you mean as far as interop with the clojure side?
when a language (like java) has an OO interface to everything it makes it easier to work with
Yeah, I think so...
I've had to deal with some of that in some of my Clojure implementation experiments in JavaScript
You can make new instances from perl module classes and call methods. And call perl functions as well.
Yeah
That's how I got around it in JS. The core lib functions ensured the interface for the native types.
In a lot of ways similar to how null in the Java implementation is a Seq even though it's not an object.
The Seq interface can't ensure that but the seq function does.