Oforth V0.9.24 is released

Oforth news and releases

Oforth V0.9.24 is released

Postby Franck » 24 May 2016 20:15

Oforth V0.9.24 is released with 2 major updates :

1) Memory allocated at startup :
Work has been done to optimize memory allocated at startup.
Some features are now only available on optional packages.

Current memory allocation at startup is now (on Windows 8.1 with --O command line option) :

mem
Dict : 64 Ko (54824 bytes used)
Code : 64 Ko (62496 bytes used)
Heap : 42 Ko allocated
Total : 170 Ko
ok

This is corresponding to about 800 words.

Now, features loaded at startup are :
- Native code generation.
- Local variables and parameters.
- Memory management.
- Oriented Object model (classes, methods, ...) + runtime.
- Arbitrary precision integers.
- Float objects and basic float operations.
- Characters, Symbols.
- Strings and UTF8 support.
- Exceptions.
- Assertions and unit tests.
- List syntax : [ 1, 2, 3 ]
- Collections (Collection, List, Interval, Stack, ...).
- High order words.
- Quotations and closures.
- Durations (ticks, times, ...) and benchs.
- Files support.
- Json support and words for Json syntax : { ... }
- Packages support.
- FFI support.
- Disassembler.

Others features are now available as optional packages and must be loaded explicitely ( using import: or use: ) :
- parallel : resources, tasks, channels, multi-threading.
- math : extended float operations (cos, sin, ...).
- date : Date class and operations on dates.
- console : keyboard, ...
- emitter : event mangement.
- libc : load dynamic libc according to current OS.
- os : os features (genenv, cmd, ...).
- socket : sockets
- tcp : tcp connection and server.


2) FFI support
Oforth now support calls to dynamic libraries.
Dynamic libraries and dynamic procedures are words.

FFI calls are simple : once a function is declared, it can be called
as other words : just push parameters on the stack and call the
function as a word :

Windows example :
Code: Select all
"KERNEL32.DLL" WPARAM OSLib new: KRNL
KRNL 1 null "Sleep" OSProc new: WSleep
5000 WSLeep


Linux example :
Code: Select all
"libc.so.6" CPARAM OSLib new: LIBC
LIBC 1 Integer "getenv" OSProc new: getenv
"PATH" getenv tostr .s


Franck
Franck
 
Posts: 140
Joined: 29 Oct 2014 19:01

Return to Announcements

Who is online

Users browsing this forum: No registered users and 1 guest

cron