Fork me on GitHub
#graalvm
<
2023-03-23
>
telekid12:03:45

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.

borkdude12:03:55

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

telekid12:03:51

Ah, awesome

borkdude12:03:56

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

telekid13:03:50

thanks for your help!

borkdude13:03:38

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

telekid15:03:00

got it working!

telekid15:03:24

I'm making an asciicast recorder

telekid15:03:30

part of a larger project

telekid15:03:02

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

borkdude15:03:10

something like asciinema ?

telekid15:03:24

exactly, asciicast is their recording format

telekid15:03:11

will likely open source it if I get it workin'

telekid19:03:48

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

telekid20:03:15

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

borkdude20:03:28

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

borkdude20:03:48

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

telekid20:03:44

yeah that recording was with asciicinema

telekid20:03:59

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

telekid20:03:04

the printed bytes are from hypo

telekid20:03:16

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

telekid20:03:33

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

borkdude20:03:43

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

telekid20:03:59

> 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

telekid20:03:01

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

borkdude20:03:33

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

telekid20:03:09

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

telekid20:03:25

gotta figure out how to swallow it next

dekel08:04:13

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