Brian Rice | 30 Jun 00:49

[Personal] Moving from Seattle to Portland

I've spent the last couple of months searching for a suitable permanent position to replace my independent contractor/consultancy activity, and found it in Portland so I'll be moving down there. As such, my Slate activity has been low and will continue to be so until fully set up, which may take another month.


I feel remiss in not doing more, but the current economic instability and my medical conditions are conspiring to lead me to a stable situation. If any of you live near or visit Portland, be sure to look me up! I'll definitely be at local relevant tech events.

--
-Brian T. Rice

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "slate-language" group.
To post to this group, send email to slate-language <at> googlegroups.com
To unsubscribe from this group, send email to slate-language+unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.com/group/slate-language?hl=en
-~----------~----~----~----~------~----~------~--~---

Timmy Douglas | 9 Jun 00:24

Re: GTK and libraries loading in Windows


On Jun 8, 9:54 am, pocho <elpochodelage...@gmail.com> wrote:
> I also have a question... as I was told there's no way of saving gtk
> windows to be reopened later in slate, but is at least possible to
> save an image with all Gtk libs loaded? As I said before, it takes
> almost 8 minutes to load gtk so I don't want to do this loading
> everytime I turn on the vm.

Yeah it should be possible and fairly easy to do. If you can't do it
by loading gtk/init.slate and then saving your image, then tell me.
After than (like demo.slate), you run this to start the gui:
Gtk Main do: [ Gtk Workspace new show ].

Currently, entering the gui is the point of no return. It should be a
fairly easy fix (for someone that understands gtk) to make it where
closing the last window puts you back into a slate prompt so that you
can save again. The reason you can't just save in the gui is because
the GUI code uses bytearrays with C pointers of gtk objects and if you
save a slate image in that code and have it resume (by starting slate
with that image), the resuming code will deref those invalid pointers
and crash.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "slate-language" group.
To post to this group, send email to slate-language <at> googlegroups.com
To unsubscribe from this group, send email to slate-language+unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.com/group/slate-language?hl=en
-~----------~----~----~----~------~----~------~--~---

Brian T. Rice | 8 Jun 23:09

Cookbook-style examples posted to Rosetta Code project


See http://slatelanguage.org/2009/06/cookbook-examples-posted-to-rosetta-code/ 
  for details. We're still working on this; it seems to be a great way  
to itemize incremental progress and check that various features work  
and have examples (aside from unit-tests in the tests/ directory).

This might also be a good way to try your hand at Slate idioms... some  
of the examples are trivial RPG games and so on.

--
http://BrianTRice.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "slate-language" group.
To post to this group, send email to slate-language <at> googlegroups.com
To unsubscribe from this group, send email to slate-language+unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.com/group/slate-language?hl=en
-~----------~----~----~----~------~----~------~--~---

Brian T. Rice | 8 Jun 23:09

Re: GTK and libraries loading in Windows


On Jun 8, 2009, at 6:54 AM, pocho wrote:

> I also have a question... as I was told there's no way of saving gtk
> windows to be reopened later in slate, but is at least possible to
> save an image with all Gtk libs loaded? As I said before, it takes
> almost 8 minutes to load gtk so I don't want to do this loading
> everytime I turn on the vm.

Yes, because of all the libraries to be parsed, it's slow to load  
everything, and we should be able to avoid this overhead as much as  
possible. What ideally should happen is that external Gtk widgets/ 
resources could adopt or inherit the pattern of ExternalResource (also  
used by File, Socket, Directory, and ExternalLibrary objects), in that  
there is a "locator" attribute which stores some description of how to  
recreate the resource, and then startup/shutdown methods construct and  
teardown the actual objects in question. The ExternalResource also  
keeps a "handle" attribute for the low-level identifier that the VM  
gets and then passes into the image. ExternalResources also has a  
parentResource attribute which is currently used for the  
ExternalFunction-ExternalLibrary relationship but basically helps  
determine the part-subpart dependency structure, in that the children  
depend on the parent resource being enabled before they can be  
(re)created and work.

In the window's case, the "locator" might be an array specifying  
dimensions, and maybe a display tree of widget children along with  
their dimensions and attributes. I'm hand-waving at this point, but  
does this make sense as a way to think about the problem?

--
http://BrianTRice.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "slate-language" group.
To post to this group, send email to slate-language <at> googlegroups.com
To unsubscribe from this group, send email to slate-language+unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.com/group/slate-language?hl=en
-~----------~----~----~----~------~----~------~--~---

pocho | 2 Jun 19:31

GTK and libraries loading in Windows


Hi again, this is a fork of the other post, specifically refered to
Gtk and libraries loading

As we said...

> > > > > All this was in order to make it work in Windows XP[...]
>
> > I think you might have been the first to try gtk on windows. It's
> > fairly new code
>
> Well, it seems to be almost working. I've been investigating a bit
> more... in src/ui/glib/lib.slate we have
>
> GLib define: #Lib -> (
>         ExternalInterface newForLibrary: 'glib-wrapper' primitives: #(
>                 (Void wrapper_g_object_connect_to_block_id(Pointer CString Int))"
>
>                 (Void wrapper_g_callback_queue_init())
>                 (Void wrapper_g_callback_queue_shutdown())
>                 (Pointer wrapper_g_callback_wait_next())
>                 (Void wrapper_g_callback_end(Pointer))
>                 (Int wrapper_g_callback_data_get_block_id(Pointer))
>                 (Int wrapper_g_callback_data_get_parameter_count(Pointer))
>                 (Pointer wrapper_g_callback_data_get_parameter_at(Pointer Int))
>
>                 (Boolean wrapper_g_type_is_fundamental(Int))
>                 (Int wrapper_g_type_fundamental(Int))
>                 (Int wrapper_g_type_from_instance(Pointer))
>                 (CString g_type_name(Int))
> ...
>
> Notice that loading fails when loading the first pure glib function
> (not wrappers, last line pasted), g_type_name, which makes me think it
> could load all wrappers, but then (I don't know why) searches glib-
> wrapper dll for g_type_name instead of looking in the correct place
> (gobject dll). Maybe there's a difference in steps needed to be
> carried when loading libraries needed by other libraries in Windows.
>

well... I think I found the answer. By debuggin slate in VS, I found
that my predictions were true. Slate is able to find glib-wrapper.dll
and even load all functions defined in glib-wrapper.c. The problem
comes from a diference of how symbols are searched in windows and
linux (done in external-library.c, lookupExternalLibraryPrimitive
(...)),

in line 83 you have

#ifdef WIN32
  fn = (void *) GetProcAddress(h, symbol);
#else
  fn = (void *) dlsym(h, symbol);
#endif

the problem is that, as you can read here,
http://www.opengroup.org/onlinepubs/009695399/functions/dlsym.html,
"... The dlsym() function shall search for the named symbol in all
objects loaded automatically as a result of loading the object
referenced by handle ."

but GetProcAddress used in windows doesn't (I wasn't able to find some
parametrized version to do this), so when you call GetProcAddress(glib-
wrapper handle, "g_type_name"), it just searches glib-wrapper.dll and
fails.

well.. I don't know how to solve this problem, but at least I think
I've given you a good enough description so that someone could fix it.
Also, I can send you the projects I had to create in VS to generate
the wrappers' dlls.

Bye.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "slate-language" group.
To post to this group, send email to slate-language <at> googlegroups.com
To unsubscribe from this group, send email to slate-language+unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.com/group/slate-language?hl=en
-~----------~----~----~----~------~----~------~--~---

pocho | 1 Jun 19:21

Building and working with slate


Hi, I've been trying to install and use slate, and run throug some
problems. I was able to solve some of them but need help to take care
of others. First of all, I tested it in two platforms: Win XP and
Ubuntu 9.04 inside a VirtualBox. I'd like to share the experience
because I think it might be useful for others. I used the lastest
version from git in both cases.

here the path diverges..

for windows.

1 - tried to open src/vm/windows.sln solution with visual studio 2005,
but didn't work because sln is from vs 2008.
    so, went to http://sourceforge.net/projects/vspc/ and converted to
the version I have.
2 - opened the solution and tried to compile (after downloading
http://code.google.com/p/msinttypes/) but failed. There were various
problems:
     vc complained about inlines. Solved that adding this to slate.h

#define SLATE_INLINE inline
#ifdef _MSC_VER
#define snprintf _snprintf
#undef inline
#define inline __inline
#endif

	also complained about some local variables that weren't defined at
top of the scope, so I moved them.
	at last, had link errors for each inline function, the problem was
that in order to link with them they had to be in the .h, so I moved
every SLATE_INLINE to slate.h.

After doing that I was able to compile and start slate. It took me
some time to realize that i had to download the image from google's
project, I think that should be better documented.

Then I tried to use gtk in slate, but failed. To do this, I downloaded
GTK all-in-one bundle from this place: http://www.gtk.org/download-windows.html.
Then configured VS paths: added gtk/include/gtk-2.0, glib-2.0, gtk/lib/
gtk-2.0/include gtk/lib/glib-2.0/include to includes and gtk/lib to
libraries, also had to add gtk/bin to path and the place were I
downloaded msinttypes to includes because gtk needed it. After that I
created three dll projects in VS: gtk-wrapper, gdk-wrapper and glib-
wrapper. Each of them had only it's corresponding .c file found in src/
plugins. Compiled them to three dlls that placed in cslatevm/lib. Here
came the problem I couldn't solve:
 I tried to load gtk with the command specified in README:

	load: 'src/ui/gtk/demo.slate'

It was all good but then complained:

slate[2]> load: 'src/ui/gtk/demo.slate'.
 Loading P'src/ui/gtk/demo.slate'
  Loading P'src/ui/gtk/init.slate'
   Loading P'src/ui/gdk/init.slate'
    Loading P'src/ui/glib/init.slate'
     Loading P'src/lib/wordarray.slate'
     Loading P'src/ui/glib/lib.slate'
Library glib-wrapper was successfully loaded.
Debugging: ConnectionFailed traitsWindow
Backtrace (method @ source):
frame: 0        [defaultHandler] @ src/core/condition.slate:289
frame: 1        [tryHandlers] @ src/core/condition.slate:79
frame: 2        [signal] @ src/core/condition.slate:31
frame: 3        [connectionFailure] @ src/lib/extlib.slate:37
frame: 4        [enable] @ src/lib/extlib.slate:216
frame: 5        [open] @ src/core/external.slate:67
frame: 6        [functionNamed:] @ src/lib/extlib.slate:103
frame: 7        [functionNamed:returning:from: &callFormat:] @ src/lib/
extlib.slate:114
frame: 8        [(arity: 1)] @ src/lib/extlib.slate:194
frame: 9        [do:] @ Nil
frame: 10       [installMethodsForSigs:on: &nameTransformer:
&argumentFormats:] @ src/lib/extlib.slate:190
frame: 11       [enable] @ src/lib/extlib.slate:434
frame: 12       [evaluateIn: &optionals:] @ src/mobius/syntax.slate:
180
frame: 13       [(arity: 1)] @ src/lib/module.slate:212
frame: 14       [applyWith:] @ src/core/method.slate:6
frame: 15       [do:] @ src/core/stream.slate:150
frame: 16       [run] @ src/lib/module.slate:205
frame: 17       [(arity: 0)] @ src/lib/module.slate:188
frame: 18       [handlingCases:] @ src/core/condition.slate:64
frame: 19       [process:] @ src/lib/module.slate:180
frame: 20       [(arity: 1)] @ src/lib/module.slate:253
frame: 21       [applyWith:] @ src/core/method.slate:6
frame: 22       [(arity: 0)] @ src/core/external.slate:282
frame: 23       [sessionDo:] @ src/core/external.slate:275
frame: 24       [(arity: 0)] @ src/lib/module.slate:253
frame: 25       [load: &in: &verbose: &showLoadMessage:] @ src/lib/
module.slate:242
frame: 26       [load: &in: &verbose: &showLoadMessage:] @ src/lib/
module.slate:232
frame: 27       [evaluateIn: &optionals:] @ src/mobius/syntax.slate:
180
frame: 28       [(arity: 1)] @ src/lib/module.slate:212
frame: 29       [applyWith:] @ src/core/method.slate:6
frame: 30       [do:] @ src/core/stream.slate:150
frame: 31       [run] @ src/lib/module.slate:205
frame: 32       [(arity: 0)] @ src/lib/module.slate:188
frame: 33       [handlingCases:] @ src/core/condition.slate:64
frame: 34       [process:] @ src/lib/module.slate:180
frame: 35       [(arity: 1)] @ src/lib/module.slate:253
frame: 36       [applyWith:] @ src/core/method.slate:6
frame: 37       [(arity: 0)] @ src/core/external.slate:282
frame: 38       [sessionDo:] @ src/core/external.slate:275
frame: 39       [(arity: 0)] @ src/lib/module.slate:253
frame: 40       [load: &in: &verbose: &showLoadMessage:] @ src/lib/
module.slate:242
frame: 41       [load: &in: &verbose: &showLoadMessage:] @ src/lib/
module.slate:232
frame: 42       [evaluateIn: &optionals:] @ src/mobius/syntax.slate:
180
frame: 43       [(arity: 1)] @ src/lib/module.slate:212
frame: 44       [applyWith:] @ src/core/method.slate:6
frame: 45       [do:] @ src/core/stream.slate:150
frame: 46       [run] @ src/lib/module.slate:205
frame: 47       [(arity: 0)] @ src/lib/module.slate:188
frame: 48       [handlingCases:] @ src/core/condition.slate:64
frame: 49       [process:] @ src/lib/module.slate:180
frame: 50       [(arity: 1)] @ src/lib/module.slate:253
frame: 51       [applyWith:] @ src/core/method.slate:6
frame: 52       [(arity: 0)] @ src/core/external.slate:282
frame: 53       [sessionDo:] @ src/core/external.slate:275
frame: 54       [(arity: 0)] @ src/lib/module.slate:253
frame: 55       [load: &in: &verbose: &showLoadMessage:] @ src/lib/
module.slate:242
frame: 56       [load: &in: &verbose: &showLoadMessage:] @ src/lib/
module.slate:232
frame: 57       [evaluateIn: &optionals:] @ src/mobius/syntax.slate:
180
frame: 58       [(arity: 1)] @ src/lib/module.slate:212
frame: 59       [applyWith:] @ src/core/method.slate:6
frame: 60       [do:] @ src/core/stream.slate:150
frame: 61       [run] @ src/lib/module.slate:205
frame: 62       [(arity: 0)] @ src/lib/module.slate:188
frame: 63       [handlingCases:] @ src/core/condition.slate:64
frame: 64       [process:] @ src/lib/module.slate:180
frame: 65       [(arity: 1)] @ src/lib/module.slate:253
frame: 66       [applyWith:] @ src/core/method.slate:6
frame: 67       [(arity: 0)] @ src/core/external.slate:282
frame: 68       [sessionDo:] @ src/core/external.slate:275
frame: 69       [(arity: 0)] @ src/lib/module.slate:253
frame: 70       [load: &in: &verbose: &showLoadMessage:] @ src/lib/
module.slate:242
frame: 71       [load: &in: &verbose: &showLoadMessage:] @ src/lib/
module.slate:232
frame: 72       [evaluateIn: &optionals:] @ src/mobius/syntax.slate:
180
frame: 73       [(arity: 1)] @ src/lib/module.slate:212
frame: 74       [applyWith:] @ src/core/method.slate:6
frame: 75       [do:] @ src/core/stream.slate:150
frame: 76       [run] @ src/lib/module.slate:205
frame: 77       [(arity: 0)] @ src/lib/module.slate:188
frame: 78       [handlingCases:] @ src/core/condition.slate:64
frame: 79       [process:] @ src/lib/module.slate:180
frame: 80       [(arity: 1)] @ src/lib/module.slate:253
frame: 81       [applyWith:] @ src/core/method.slate:6
frame: 82       [(arity: 0)] @ src/core/external.slate:282
frame: 83       [sessionDo:] @ src/core/external.slate:275
frame: 84       [(arity: 0)] @ src/lib/module.slate:253
frame: 85       [load: &in: &verbose: &showLoadMessage:] @ src/lib/
module.slate:242
frame: 86       [load: &in: &verbose: &showLoadMessage:] @ src/lib/
module.slate:232
frame: 87       [evaluateIn: &optionals:] @ src/mobius/syntax.slate:
180
frame: 88       [(arity: 0)] @ src/lib/repl.slate:155
frame: 89       [on:do:] @ src/core/condition.slate:43
frame: 90       [(arity: 0)] @ src/lib/repl.slate:147
frame: 91       [handlingCases:] @ src/core/condition.slate:64
frame: 92       [interpretHook:] @ src/lib/repl.slate:42
frame: 93       [(arity: 0)] @ src/lib/repl.slate:139
frame: 94       [enter] @ src/lib/repl.slate:135
frame: 95       [start &resource:] @ src/lib/repl.slate:185
frame: 96       [start] @ src/mobius/prelude.slate:38
frame: 97       [(arity: 0)] @ Nil
The following condition was signaled:
Could not look up symbol 'g_type_name' in DLL 'glib-wrapper'The error
was: No se encontró el proceso especificado. (Trad: Couldn't find the
specified process).

So I don't know what to do next, I would appreciate your help.

All this was in order to make it work in Windows XP, now let's start
with Ubuntu. I have to say it was easier here. I had a clean install
of Ubuntu 9.04 set up in a virtual machine.

from console did make. I think it worked seamleasly. tried to open the
image, but ark denied, so used command line

bunzip2 slate.little.32.image.bz2

tried to run slate with that image, forgot the -i and had a lot of
errors. It took me some time to realize I was missing the -i in
command line, maybe a warning would have been fine! Opened the image,
everything fine. Then I tryied gtk.
did cd src/plugins. make. Had to install gtk-dev in ubuntu because it
was needed. Also, libtool was missing and I had to install it. Ran
make again and worked for gtk (despite it failed for something related
to llvm).

Then openened the image and did

	load: 'src/ui/gtk/demo.slate'

It took a while to load everything but worked like a charm. After some
testing I saved the image and quit. Now, when I try to open the image
again, it crashes. Here is the output I got:

$> gdb slate
(gdb) r -i slate8.image

Starting program: /home/javier/st/cslatevm/slate -i slate8.image
[Thread debugging using libthread_db enabled]
Old Memory size: 419430400 bytes
New Memory size: 10485760 bytes
Image size: 15330856 bytes
Defining function 'invokeDebugger' on: 'Condition traits'
[New Thread 0xb7d936c0 (LWP 6892)]

(process:6892): GLib-GObject-CRITICAL **: /build/buildd/glib2.0-2.20.1/
gobject/gtype.c:2458: initialization assertion failed, use
IA__g_type_init() prior to this function

(process:6892): GLib-CRITICAL **: g_once_init_leave: assertion
`initialization_value != 0' failed

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7d936c0 (LWP 6892)]
0x9cbd913f in gtk_text_buffer_get_selection_bound ()
   from /usr/lib/libgtk-x11-2.0.so.0
(gdb) bt
#0  0x9cbd913f in gtk_text_buffer_get_selection_bound ()
   from /usr/lib/libgtk-x11-2.0.so.0
#1  0x0804b878 in applyExternalLibraryPrimitive (oh=0xb7b83008,
    fnHandle=0x9e2197e4, argsFormat=0x9f8b422c, callFormat=0x1,
resultFormat=0x7,
    argsArr=0x9e238248) at external-library.c:358
#2  0x0805ad0b in prim_applyExternal (oh=0xb7b83008, args=0xbfa66888,
arity=6,
    opts=0x0, resultStackPointer=23384) at primitives.c:1326
#3  0x08050179 in send_to_through_arity_with_optionals
(oh=0xb7b83008,
    selector=0x9ecfc458, args=0xbfa66888, dispatchers=0xbfa66888,
arity=6,
    opts=0x0, resultStackPointer=23384) at interpreter.c:370
#4  0x0805102e in interpret (oh=0xb7b83008) at interpreter.c:741
#5  0x0805eeab in main (argc=3, argv=0xbfa66ff4, envp=0xbfa67004) at
vm.c:217
(gdb)

After that I couldn't reuse the image so tried again with a blank one.
Loaded Gtk again, and saved another image. Now this seems to work but
each time I reopen slate it thakes a looooong time to load gtk which
is a big pain.

Well, that's all I could test. Do you think you can help me solve the
problems in Windows and/or Linux?

Thanks.
   Pocho.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "slate-language" group.
To post to this group, send email to slate-language <at> googlegroups.com
To unsubscribe from this group, send email to slate-language+unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.com/group/slate-language?hl=en
-~----------~----~----~----~------~----~------~--~---

Brian Rice | 7 May 02:32

Updates, website

Hello all,


Mailing list discussion became sparse over the last couple of months, but activity continues. Lately I've been putting daily effort into improvements for the system along with Timmy Douglas' equal efforts, and we're motivating each other well enough.

I'll give a quick run-down of what's going on:
- IDE improvements, starting with the REPL-based debugger and the emacs mode now integrates with it to make frames and restarts "hyperlinked" to take action on them.
- Platform plugin integration into the VM, to get uname() results, run system() calls, and get/set/list environment variables.
- Revival and stabilization of the Windows port.
- Re-instating the old tests/ directory, and verification that most non-delegation-related tests work fine still.
- Re-instating the ability to run in she-bang scripts and CGI (and generate some XML).
- Re-making most of the installers, including "make install" for unices and a Windows NSIS installer.
- A portable VM timing facility to benchmark methods, and re-instating of tests/benchmark.
- A counting/tracing-style profiling facility.

- Core bootstrap files have been separated into src/core/ to relieve pressure on src/lib to contain every standard library.
- I'm starting to work on the GTK-based IDE, to develop a real usable browser (that hides grotty details by default) and debugger.
- There are many other plans, mostly half-way formed, and of course we do want to continue to innovate (LLVM dynamic JITting, Erlang-style concurrency at least for image-level messaging and I/O).

I've also ported the website over to Wordpress: http://www.slatelanguage.org and will focus on communicating about Slate issues there that don't quite fit an email forum.

I am more or less motivated right now to make Slate consumable for the public, which means addressing a lot of the rough edges and core engineering for now, and not much in the way of a release schedule yet, unless we go with a monthly clockwork release process. If you have priorities you'd like to see addressed, please discuss it.

--
-Brian T. Rice

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "slate-language" group.
To post to this group, send email to slate-language <at> googlegroups.com
To unsubscribe from this group, send email to slate-language+unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.com/group/slate-language?hl=en
-~----------~----~----~----~------~----~------~--~---

Timmy Douglas | 10 Jul 05:24

towards a 64 bit vm / image


I put together some patches that redo the pidgin type system to use
traits instead of rules, use sizeof instead of hard coded
bit/byte/word sizes, and write slate images based on a given bitsize
instead of assuming 32 bits. I'm doing this because i want to run
slate on my amd64 system. Unfortunately it's broken now and nothing
works, but hopefully I'll fix that in the next few years if I'm lucky.
It includes some other stuff I think.

Attachment (64bitstart.patch): text/x-diff, 174 KiB
Timmy Douglas | 27 Jun 04:31

slate pidgin woes


I'm trying to make some changes to the slate pidgin code to help make
porting the VM to my 64 bit machine easier. I probably did a few too
many search/replaces but basically I'm getting this error:

Generating function PSObject_isImmutable

Generating function PSObject_restrictsDelegation

Generating function PSObject_addSlotNamed_valued_at_

The following condition was signaled:
Error: A method translation wasn't found for copyBytes:into:.

The following restarts are available:
0)      Abort evaluation of expression
1)      Quit Slate

Enter 'help.' for instructions.
Debug [0..1]: up.
[tryHandlers]

the method translation searcher is:

g@(C SimpleGenerator traits) generateCFor: selector@(Symbol traits) on: arguments
[...]

g: ("SimpleGenerator" currentColumn: 0. currentLine: 0. level: 0. columnsPerLine: 1000.
    original: ("Stream" ...). inlining: True. asserting: False. verbose: False. useSymbolicConstants: True.
    useRightShiftForDivide: True. generateDeadCode: False. methodCalls: {"Bag" ...}.
    module: ("Module" ...). scope: {"Stack" ...})
selector: #copyBytes:into:
arguments: {obj cast + obj firstSlotOffset. offset - obj firstSlotOffset. newObj cast + newObj firstSlotOffset}
Debug [0..1]: (arguments at: 0) type
.
("Any" rules: ("Cloneable" ...))
Debug [0..1]: (arguments at: 1) type
.
("Any" rules: ("Cloneable" ...))

Debug [0..1]: (arguments at: 1) type is: Types C Type
.
False
Debug [0..1]: (arguments at: 1) type dispatcher.

The following condition was signaled from within the debugger:
The method #dispatcher was not found for the following arguments:
{("Any" ...)}
Debug [0..1]: #copyBytes:into: asInferenceRule
.
#__copyBytes:into:

I think the funcall is here:

  obj!(Byte pointer) cast + obj firstSlotOffset
    copyBytes: offset - obj firstSlotOffset
    into: newObj!(Byte pointer) cast + newObj firstSlotOffset.

The definition is here:

src@(Byte pointer) copyBytes: n into: dst
[| dst!(Byte pointer) |
  src < dst /\ (src + n > dst)
    ifTrue:
      [dst: dst + n.
        src: src + n.
        [dst: dst - 1.
          src: src - 1.
          dst store: src load.
          n: n - 1.
          n > 0] whileTrue]
    ifFalse:
      [[n > 0]
        whileTrue:
          [dst store: src load.
            dst: dst + 1.
            src: src + 1.
            n: n - 1]].
] export inline.

I can't really figure out what's going on here... it looks like the
first argument to #copyBytes:into: is casted to !(Byte Pointer) so it
should return a Byte Pointer after the addition statement. However the
repl shows "Any"? I don't even know if that's declared anywhere. When
I look at rules.slate and #union: it seems like most of the operations
will return a LongInt or something. But I don't know if that code is
used.

One thing that is changed that I can remember off the top of my head
is that firstSlotOffset's return type is changed to Word rather than
UnsignedLongInt. Word is aliased to the same thing so I don't think it
would matter. If anyone could give me some advice on how to debug
this, it would be great. thanks.

For those curious, I want to make two main changes to the slate pidgin
vm code: use a smaller group of types (and only use abstract ones like
Word/ObjectPointer/Byte rather than LongInt etc), and use
'sizeof(unsigned long int)' instead of inlining integers with
#[ObjectPointer byteSize] etc... I think this will make it easier to
port. This way instead of modifying bitSize fields for every type and
regenerating the vm everytime you switch platforms, you could just use
the same code everywhere and gcc would switch out sizeof depending on
the abi you were compiling against. ugh this is taking forever. maybe
by xmas i'll have the bootstrap working again. then it would be easier
to play with getting an inliner working.

BrianTRice | 18 Jun 02:25

darcs patch: Fixed bitShift: for BigIntegers for the case of 0.

Sun Jun 17 17:25:23 PDT 2007  BrianTRice <at> gmail.com
  * Fixed bitShift: for BigIntegers for the case of 0.
Timmy Douglas | 10 Jun 00:26

64 bit slate VM images


I just upgraded my computer to a dual core amd64 machine. I'd like to
use this machine to work on slate, but I can't find any 64 bit images
and I'm not sure how I could use the initial lisp sources to generate
a new kernel image. Anyone have any ideas or experience here?

I'd like to stay away from installing any 32 bit programs on this
computer. Thanks.


Gmane