Distribution of application written in ObjectIcon and related problems

32 views
Skip to first unread message

Dr.Rihman

unread,
Sep 13, 2012, 5:24:14 AM9/13/12
to objec...@googlegroups.com
 Advice please,how to distribute applications written in ObjectIcon?

Ivan Sukin

unread,
Sep 13, 2012, 10:14:05 AM9/13/12
to objec...@googlegroups.com
What's the problem? ObjectIcon system looks just like Arizona Icon: it has the translator "oit" and bytecode-interpretator "oix", so take a look on some packages, using Icon, for example, noweb Debian package -- http://packages.debian.org/squeeze/noweb

The one problem I see is that ObjectIcon is not a part of main GNU/Linux distros' package repositories, so  you might need to create and maintain such packages...

r.parlett

unread,
Sep 14, 2012, 8:29:01 AM9/14/12
to objecticon
One thing which may possibly be of relevance is the -B option to oit.
If you compile with

oit -B prog.icn

then the output file (prog) will contain a "bundled" copy of the
runtime interpreter oix.
"prog" can then be run as a standalone program, without requiring oix
to be available
elsewhere on the system. Of course if you then run "prog" on a
different machine you may still have issues
about shared libraries needed by the bundled oix being available (you
can run ldd on prog/oix to
see which ones are used).

Dr.Rihman

unread,
Sep 14, 2012, 12:37:59 PM9/14/12
to objec...@googlegroups.com
I actually have a problem, then when I made the executable with command oit -B. Compilation itself was successful, but on a different operating system, there is a problem with a font (typeface just "slipped") ...

пятница, 14 сентября 2012 г., 16:29:05 UTC+4 пользователь r.parlett написал:

r.parlett

unread,
Sep 20, 2012, 8:42:42 AM9/20/12
to objec...@googlegroups.com
Could you give a bit more context about the problem, as I'm not quite sure what you mean.  Font selection is certainly tricky and depends on whether xft or raw x11 fonts are being used (this choice is not dynamic - it is compiled into oix), and obviously on the fonts available on the machine in question.  There is a bit of info about font selection on the wiki page :-

http://code.google.com/p/objecticon/wiki/GraphicsPackage#Fonts

Hope this helps

R

Dr.Rihman

unread,
Oct 3, 2012, 10:09:32 AM10/3/12
to objec...@googlegroups.com
This helped)))
  but there was a new question: is it possible to ObjectIcon use libraries written in C? (I read about RTL, but there is too little information)

четверг, 20 сентября 2012 г., 16:42:42 UTC+4 пользователь r.parlett написал:

r.parlett

unread,
Oct 9, 2012, 8:01:22 PM10/9/12
to objec...@googlegroups.com
Hello

Yes, it is possible on Unix-style systems with dynamic shared library loading, although it can be rather hard work, and it does require some knowledge of the inner workings of the runtime system (particularly memory management).  This wiki page details the nuts and bolts of the process :-

http://code.google.com/p/objecticon/wiki/DynamicLoadC

There are also two examples of dynamically loaded libraries in the source code.   One is an interface to mysql, and the other is a library for unix IPC calls (queues, semaphores and shared memory).  The RTL code for them can be found in the lib/native directory, and the corresponding icon source files (which load the .so libraries at run time) can be found in the lib/main (grep for "package ipc" and "package mysql").

Obviously there is a lot of RTL example code to look at in the runtime system - see the directory base/oix

There is a manual for the original RTL here :-
http://www.cs.arizona.edu/icon/ftp/doc/tr92_18.pdf
but please bear in mind that I modified it quite a bit for Object Icon, so this doc is just a rough guide.  In almost all respects Object Icon's version is simpler.

Undoubtedly the trickiest thing to get right in writing RTL code is memory management.  The garbage collector moves things around in memory which can be rather disconcerting!  It is very important to know when this can happen and to declare the correct variables as "tended".   Failure to do so can make your program prone to mysterious runtime crashes.

Hope this helps.

R
Reply all
Reply to author
Forward
0 new messages