Calling Nim from Squeak/Pharo via FFI

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Calling Nim from Squeak/Pharo via FFI

Göran Krampe
Hey guys!

Just wanted to mention an article I wrote yesterday:

http://goran.krampe.se/2014/11/03/squeak-to-nim

In fact, its the latest in a series of articles on Nim:

http://goran.krampe.se/category/nim


The gist of it and why I post here:

Squeak/Pharo has the ability to use .so/.dll libraries (typically
written in C) via either VM plugins or FFI. The plugin route is a bit
messy. The FFI route (there are multiple FFIs available as you may have
heard, but my article uses the "old" one) on the other hand is quite
easy to use.

Now... Nim is a higher level language than C, very very interesting in
many ways - and it compiles via C (or C++) to either binaries or
libraries. Such a library is just like a library in C, so we can easily
call it using FFI.

So, if you wanted to play with very fast native code that is not the
PURE PAIN like C or C++ is, then Nim is a very interesting alternative.

cheers, Göran

Reply | Threaded
Open this post in threaded view
|

Re: Calling Nim from Squeak/Pharo via FFI

garduino
Interesting option Göran, thanks for sharing!

2014-11-04 7:19 GMT-03:00 Göran Krampe <[hidden email]>:
Hey guys!

Just wanted to mention an article I wrote yesterday:

http://goran.krampe.se/2014/11/03/squeak-to-nim

In fact, its the latest in a series of articles on Nim:

http://goran.krampe.se/category/nim


The gist of it and why I post here:

Squeak/Pharo has the ability to use .so/.dll libraries (typically written in C) via either VM plugins or FFI. The plugin route is a bit messy. The FFI route (there are multiple FFIs available as you may have heard, but my article uses the "old" one) on the other hand is quite easy to use.

Now... Nim is a higher level language than C, very very interesting in many ways - and it compiles via C (or C++) to either binaries or libraries. Such a library is just like a library in C, so we can easily call it using FFI.

So, if you wanted to play with very fast native code that is not the PURE PAIN like C or C++ is, then Nim is a very interesting alternative.

cheers, Göran




--
Saludos / Regards,
Germán Arduino
www.arduinosoftware.com