"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
Clojure with panama
1. Interop with C in Clojure
2
with panama
netpyoung@gmail.com
September 2019
#1
2. Do you have any Questions?
- for keep time, to save each others time
- If you have questions, during presentation.
- message on slack #clojure-sg with page #numer.
- https://clojurians.slack.com/messages/clojure-sg
- ex) #10 - what is blabla?
- I will answer after presentation.
- so, I can polish this slide from your feedbacks.
#2
3. ● EunPyoung Kim
● KOR -> JPN -> SGP
● Game Client Programmer. (since 2012.04 ~ )
● I like Lisp (not only clojure)
● I’m Lazy
○ because of that I like automatation (code generate also)
○ I like macro (but don't abuse)
● I like Emacs
○ Cursive
○ (Neo)Vim….?
● https://netpyoung.github.io/
#3
4. What I want & What I did.
● I want to trying use SDL library via clojure
● I made some examples for c binding.
● I want to share approach and experience.
#4
5. Problem?
● How to load library.
● Writing wrapper function.
● C structure layout for pointer access.
#5
6. Java & C Binding
● performance check
○ https://github.com/yulewei/java-ffi-demo
● JNI > JNR > JNA (Direct Mapping) > JNA (Interface Mapping)
name date
JNI 1997.02
JNA 2007.03
JNR 2013.02
JavaCPP 2015.07
Panama EAB
#6
9. SDL
● Simple DirectMedia Layer
● cross-platform development library.
● designed to provide low level access to audio, keyboard, mouse, joystick, and
graphics hardware via OpenGL and Direct3D
#9
10. SDL Language Bindings
● https://www.libsdl.org/languages.php
● Ada
● C#
● D
● Go
● Lua
● OCaml
● Pascal
● Python
● Rust
#10