graalvm

telekid 2023-03-23T12:49:45.105619Z

I'm looking to include https://github.com/jline/jline3 in a Graal-based Clojure project, but I'm running into an issue related to JNA: JNA: Problems loading core IDs: java.lang.Object. I'm new to Graal and don't quite know where to begin troubleshooting. Any suggestions? Is Graal incompatible with JNA? There doesn't seem to be much in the way of documentation on the subject.

borkdude 2023-03-23T12:50:55.091799Z

Graal is compatible with JNA. Here is a demo project: https://github.com/borkdude/jna-native-image-sci

telekid 2023-03-23T12:51:51.863249Z

Ah, awesome

telekid 2023-03-23T12:51:57.278119Z

just found https://github.com/phronmophobic/jna-native-image, too

borkdude 2023-03-23T12:52:56.951999Z

ah yes, my example was a fork from that example which adds SCI evaluation

telekid 2023-03-23T13:17:50.416619Z

thanks for your help!

borkdude 2023-03-23T13:18:38.555419Z

@him what are you making (if I may ask)?

telekid 2023-03-23T15:40:00.581339Z

got it working!

telekid 2023-03-23T15:40:24.374929Z

I'm making an asciicast recorder

telekid 2023-03-23T15:40:30.790949Z

part of a larger project

borkdude 2023-03-23T15:40:32.398159Z

oooh nice

telekid 2023-03-23T15:41:02.836109Z

the official cast recorder is GPL, I need a non-GPL version

borkdude 2023-03-23T15:41:10.258279Z

something like asciinema ?

telekid 2023-03-23T15:41:24.546899Z

exactly, asciicast is their recording format

borkdude 2023-03-23T15:41:40.037999Z

exciting

telekid 2023-03-23T15:42:11.929409Z

will likely open source it if I get it workin'

telekid 2023-03-23T19:58:48.971939Z

This is a bit meta, but here is a recording (in asciinema) of me demoing hypo record , which itself has recording capabilities: https://asciinema.org/a/TF1ygU1PU4oxG2msx7jpfmqnt

telekid 2023-03-23T20:00:15.752459Z

now all I have to do is convert that byte stream to the asciicast format

borkdude 2023-03-23T20:05:28.223419Z

but you didn't actually record that recording with hypo right?

borkdude 2023-03-23T20:05:48.783609Z

the ls with colors was just to test if asciinema could record colors, or did I misunderstand?

telekid 2023-03-23T20:07:44.022929Z

yeah that recording was with asciicinema

telekid 2023-03-23T20:07:59.881479Z

but then inside that recording I ran hypo's record command

telekid 2023-03-23T20:08:04.414979Z

the printed bytes are from hypo

telekid 2023-03-23T20:08:16.145989Z

but shortly, I'll be converting the hypo bytes into the asciicast format

telekid 2023-03-23T20:08:33.338029Z

at which point it will be compatible with / playable in asciicinema

borkdude 2023-03-23T20:08:43.348389Z

I only saw "Oh I gotta disable that logging" and "vim works"

telekid 2023-03-23T20:09:59.629799Z

> the ls with colors was just to test if asciinema could record colors, or did I misunderstand? That was actually to prove (to myself) that I'm properly shuffling all bytes back and forth through hypo's PTY

telekid 2023-03-23T20:11:01.034719Z

in the recording, once 'hypo record' is run, hypo fires up a shell in a PTY and then proxies hypo's stdin / stdout to the shell process via the PTY

borkdude 2023-03-23T20:12:33.728589Z

oh I thought hypo record didn't work because of the logging messages, but now I get it. really cool :)

telekid 2023-03-23T20:13:09.596389Z

yeah the logging is just debug logging from pty4j (I think)

telekid 2023-03-23T20:13:25.997239Z

gotta figure out how to swallow it next

dekel 2023-04-03T08:37:13.572079Z

Just adding my 2 cents (late): I have a small graalvm-compiled tool I use that includes jline 2.x as a dependency - https://github.com/dekelpilli/cr2.0-encounter-calculator. I don’t know how transferrable it will be to jline3, but feel free to use it as a reference point if you’re still attempting this