[Pharo-project] Popularity of Smalltalk in Software Industry

Toon Verwaest toon.verwaest at gmail.com
Fri May 6 10:52:10 CEST 2011

Exactly right.

BUT! Very cool job. I'll have a look at it in detail once I start 
interfacing more thoroughly with real C apps outside of my own natives :)
I wonder if being able to extend the object model of Smalltalk for 
native object wrappers would give you benefit... I guess it would?

On 05/06/2011 10:30 AM, Stéphane Ducasse wrote:
> Igor
> We should face it: the FFI and Alien... are not that simple. Laurent spent time to try to cnnect to libs and it did
> not work. So we should really improve that aspect.
> Igor not everbody is able to code in assembler for nativeboost.
> So NB is probably a good insfrastructure but not ready for consumption for everybody.
> The interaction with C should be improved :)
> Stef
>> So, read about it. It doesn't bites. :)
>>> As I said, I am totally unaware of the limitations of the system, but that
>>> it did what I need, and would have liked to do that from Pharo/Squeak. I
>>> know Dolphin has/had certain capabilities. But I don't prefer to use
>>> non-open source software if at all possible for development. I also am very
>>> preferential towards cross-platform software. Dolphin fails on all accounts.
>>> I would choose my Python/Pharo blend over Dolphin any day. I know it
>>> introduces some pain, but I am willing to accept the pain. I like tools that
>>> allow me to use them where ever I am and whatever I am doing.
>>> However, that said, when I look at the facilities Python offers for such
>>> capabilities it on appearances looks quite impressive.
>>> http://docs.python.org/library/ctypes.html
>>> """
>>> ctypes is a foreign function library for Python. It provides C compatible
>>> data types, and allows calling functions in DLLs or shared libraries. It can
>>> be used to wrap these libraries in pure Python.
>>> Loading dynamic link libraries
>>> ctypes exports the cdll, and on Windows windll and oledll objects, for
>>> loading dynamic link libraries.
>>> You load libraries by accessing them as attributes of these objects. cdll
>>> loads libraries which export functions using the standard cdecl calling
>>> convention, while windll libraries call functions using the stdcall calling
>>> convention. oledll also uses the stdcall calling convention, and assumes the
>>> functions return a Windows HRESULT error code. The error code is used to
>>> automatically raise a WindowsError exception when the function call fails.
>>> Here are some examples for Windows. Note that msvcrt is the MS standard C
>>> library containing most standard C functions, and uses the cdecl calling
>>> convention:
>>>>>> from ctypes import *
>>>>>> print windll.kernel32 # doctest: +WINDOWS
>>> <WinDLL 'kernel32', handle ... at ...>
>>>>>> print cdll.msvcrt # doctest: +WINDOWS
>>> <CDLL 'msvcrt', handle ... at ...>
>>>>>> libc = cdll.msvcrt # doctest: +WINDOWS
>> So? Why do you think that you cannot do the same in Pharo?
>> Have you digested what is available before doing it in Python?
>>> """
>>> It has examples for windows and linux.
>> I feel that you are seriously under-informed.
>> Just try googling for:
>> Squeak + FFI
>> Alien
>> NativeBoost
>> and just check what you can do using it:
>> http://www.squeaksource.com/NBOpenGL/
>> also check mail archives.
>> Forgive me, but i really can't understand , why you can't just look
>> for what you need by yourself?
>> Are google.com banned by your ISP?
>> For me this subject is interested in aspect, why this information
>> (while being available openly) didn't catch your
>> attention , so you using python instead.
>> (Okay, you might miss some functionality like being able to
>> automatically generate bindings to COM interfaces).
>> But again, i am sure that if you surf the net or ask right questions
>> on mailing list, you will probably discover that
>> there is already work being done in that direction.
>> And at last, if you feel that there is missing some key functionality
>> which you want, and you expect that it is also
>> could be useful to community, you can always implement it and share
>> with people (instead of using Python ;).
>> So, next who will come after you won't find himself in a desert with
>> couple of oasises few hundred miles away.
>>> I didn't read it all as I am unqualified to assess its capabilities or
>>> limitations, nor do I presently need it as the win32 extensions do easily
>>> and well what I presently need to do.
>>> Hopefully it can inform us as to what is expected and doable in alternative
>>> languages which are dynamic like Smalltalk.
>>> Jimmie
>> -- 
>> Best regards,
>> Igor Stasenko AKA sig.

More information about the Pharo-project mailing list