Showing posts with label smalltalk syx development. Show all posts
Showing posts with label smalltalk syx development. Show all posts

Saturday, August 11, 2007

SyxGtk vs SqueakGtk

Hello,
a friend requested me a screenshot of syxgtk, it's the first one here:
http://code.google.com/p/syx/wiki/ScreenShots.

I would like to explain how the 'asd.st' script works:
1) Create the window, and connect buttons with something like button when:
#clicked send: self -> #onClicked
2) Gtk main
2.1) This forks a process that calls a primitive
2.1.1) The primitive create a thread in which gtk_main() will run
2.2) Semaphore new wait (won't never be signaled this semaphore, it's used
just to keep the process suspended so keeping Syx up if no other process
is running)
3) Suspend the current process. This because the console actually is in
blocking mode, so we need to suspend the process. There's a way to let the
console be asyncronous, already tested using Semaphores, but won't work
with readline (any suggestion here?)

Now, we connected signals to a special syxgtk marshaller, which does the
following:
  • transform GValue to SyxOop
  • obtain the callback to call
  • create a new process
  • wait that process for being terminated (remember the callback is called within a OS thread)

These i think are pure Syx callbacks, really very easy to implement for
any other external loop.

How it differs from my old SqueakGtk? Just read:
  • each C call had one more redirection than in Syx, because in C calls using SWIG automatically handles self pointers by accessing instance variables
  • main loop had to be implemented in a Squeak-side method by doing the iteration manually
  • the marshaller had to forward its function to Squeak, because we can't convert from GValues to Squeak objects since we can't lookup classes
  • we save all that GValues in a special C-side stack
  • set the jump for future longjmp and call the interpreter
  • the main loop checks for callbacks, then obtain the list of arguments from that list of GValues and does its job
  • once returned from all callbacks, it's time to do the longjmp to return from the C callback

It was a pain, slow and moreover wasn't so safe to use setjmp/longjmp and a
stack of callbacks.

Bye.

Friday, July 13, 2007

Syx 0.1.2 has been released

Hello,

this version of Syx has a bunch of new features added to the Smalltalk
environment, and a more stable VM. Major enhancements includes:
  • New compiler flags to build Syx on Mac OS
  • Added Sets and Bags
  • Refactored objects to hold both instance variables and indexed variables
  • Literals in methods are now constant
  • Added basic WriteStream
  • Doubled initial memory size to hold 20000 objects
  • Fixed ByteArray/String small integer to character conversion
  • Added object finalization by fixing GC transactions
  • Added support for infinite-precision numbers using GMP
  • Integer overflow checks when doing sum, difference, multiplication and bit-shift

Note that Syx can be compiled also without GMP. Eventough you use an
image containing LargeIntegers, Syx will run without problems but won't understand that
numbers.


Bye.

Thursday, July 05, 2007

Syx 0.1.1 has been released

Hello,
this second version of Syx includes as many bug fixes as feature enhancements. I wanted to release this version just after 3 days because i think these changes are very important.
  • Implemented linear hash tables, similiar to double hash
  • Added method caching to unary and binary messages too
  • Added bdist command to create a binary distribution
  • Improved exception handling and tracebacks
  • Added Integer class with basic bit-wise operations
  • Inline whileFalse: block
  • Covered most of PositionableStream? standard
  • Added basic subclassing at runtime
See the ChangeLog for a complete list of things that changed.

I've also added binaries for Linux on x86 and x86-64 platforms.

Please comment, give me suggestions but especially critiques ;)
Bye!

Monday, July 02, 2007

Syx 0.1 has been released!

Hello,
finally after a month, i've just released the first version 0.1 of Smalltalk YX.

You can find detailed informations on what Syx reached till now by reading the release notes.
Downloads and installation instructions are provided on the home page, including binaries for Win32 and an installer.

Feel free to add comments of any type, from critiques to suggestions.
You can also email me and ask about the project.

Bye.