Building and working with slate

17 views
Skip to first unread message

pocho

unread,
Jun 1, 2009, 1:23:54 PM6/1/09
to slate-language
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.

Brian T. Rice

unread,
Jun 1, 2009, 3:01:18 PM6/1/09
to slate-l...@googlegroups.com

On Jun 1, 2009, at 10:23 AM, pocho wrote:

>
> 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.

The original version was for VS 2005 but was then forward-converted to
VS 2008 this year. Is there a reason why you're using or prefer/need
the older version?

> 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

Okay, I can incorporate this for you.

> 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.

I hope we don't have to do that forever, but I'll see about some kind
of fix for that.

> 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.

We agree. Where would you have expected to see it?

[SNIP]


> 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.

You're missing the Slate-GTK wrapper plugin from src/plugins/. "make
plugins" builds this in a GNU or POSIX environment. So, gtk-wrapper.c,
gdk-wrapper.c, and glib-wrapper.c should be compiled into dll's and
linked dynamically.

> 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.

This is where the Slate effort was revived, so it should be the
simplest here. The Windows port was only revived in the last month or
two.

> 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.

There's a trigger in load: which looks for ".image" in the filename
and throws an error, but the VM expects there to be a slate.image in
the current directory (or "make install"'s directory, /usr/local/share/
slate/) if an image argument isn't given on the command-line.

I used to have some makefile rules that would take care of the
download step; maybe I could re-instate them (or improve the docs, as
you say).

The GTK plugin hasn't ever worked with image restarting that I'm aware
of. I've spent a little time trying to fix this lately but have been
distracted.

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

Thanks! Hopefully these answers are helpful.

pocho

unread,
Jun 1, 2009, 4:11:16 PM6/1/09
to slate-language


On 1 jun, 16:01, "Brian T. Rice" <briantr...@gmail.com> wrote:
> On Jun 1, 2009, at 10:23 AM, pocho wrote:
>
>
>
>
>
> > 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 tohttp://sourceforge.net/projects/vspc/and converted to
> > the version I have.
>
> The original version was for VS 2005 but was then forward-converted to  
> VS 2008 this year. Is there a reason why you're using or prefer/need  
> the older version?
>

Yeah.. it is the only one 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
>
> Okay, I can incorporate this for you.

Thanks

>
> >    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.
>
> I hope we don't have to do that forever, but I'll see about some kind  
> of fix for that.
>
> > 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.
>
> We agree. Where would you have expected to see it?
>

In the README file. Reading the part of setup I first thought that I
could automagically generate one image using 'make slate.image'. Then
in Command Line section says that

./slate -i <image>

This starts slate using <image>.

maybe it could also say

This starts slate using <image>. If you already didn't, download a
clean image from http://code.google.com/p/slate-language/downloads/list
.
That's actually what I did (as I told above).. I created three VS
projects which generated a dll each (gtk-wrapper.dll, glib-wrapper.dll
and gdk-wrapper) and placed them in cslatevm/lib. It kind of worked, I
mean load: was able to do a bit more than before, but then failed
with

> > 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).

which looks like either it is looking for g_type_name directly in glib-
wrapper.dll (which is obviously wrong, it is in libgobject-2.0-0.dll)
or maybe the glib-wrapper couldn't find g_type_name in
libglib-2.0-0.dll (because as I said before, it is in
libgobject-2.0-0.dll).

> > 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.
>
> This is where the Slate effort was revived, so it should be the  
> simplest here. The Windows port was only revived in the last month or  
> two.
>
> > 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.
>
> There's a trigger in load: which looks for ".image" in the filename  
> and throws an error, but the VM expects there to be a slate.image in  
> the current directory (or "make install"'s directory, /usr/local/share/
> slate/) if an image argument isn't given on the command-line.
>
> I used to have some makefile rules that would take care of the  
> download step; maybe I could re-instate them (or improve the docs, as  
> you say).
>

The problem was, not that I didn't specify an image file at all, but
that I did that without the -i, like this:

./slate slate2.image

I think it is an invalid argument, should have been

./slate -i slate2.image

But what I would expect in the first case is an error message because
of the incorrect argument...
Ok! Maybe this can be documented also (ie in README or by creating a
window that says exactly that when you load the GTK plugin).

> > Well, that's all I could test. Do you think you can help me solve the
> > problems in Windows and/or Linux?
>
> Thanks! Hopefully these answers are helpful.

they were, thanks!

Timmy Douglas

unread,
Jun 1, 2009, 5:44:05 PM6/1/09
to slate-language
Thanks for checking out slate!

On Jun 1, 4:11 pm, pocho <elpochodelage...@gmail.com> wrote:
> On 1 jun, 16:01, "Brian T. Rice" <briantr...@gmail.com> wrote:
>
>
>
> > On Jun 1, 2009, at 10:23 AM, pocho wrote:
> > > 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
>
> > Okay, I can incorporate this for you.
>
> Thanks
>
>
>
>
>
> > >    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.
>
> > I hope we don't have to do that forever, but I'll see about some kind  
> > of fix for that.


how about defining SLATE_INLINE to nothing on windows so we don't have
to worry about that?
You probably won't notice any difference performance wise.

> ./slate -i <image>
>
> This starts slate using <image>.
>
> maybe it could also say
>
> This starts slate using <image>. If you already didn't, download a
> clean image fromhttp://code.google.com/p/slate-language/downloads/list
> .
>

sounds good to me


> > > 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.

I think you might have been the first to try gtk on windows. It's
fairly new code

> The problem was, not that I didn't specify an image file at all, but
> that I did that without the -i, like this:
>
> ./slate slate2.image
>
> I think it is an invalid argument, should have been
>
> ./slate -i slate2.image
>
> But what I would expect in the first case is an error message because
> of the incorrect argument...


tell me if you get output and an error like this:

timmy@timmy-desktop:~/src/slate/cslatevm$ ./slate slate.image
Debugging: DescriptiveError traitsWindow
Backtrace (method @ source):
frame: 0 * [invokeDebugger] @ src/core/debugger.slate:67
frame: 1 [defaultHandler] @ src/core/condition.slate:294
frame: 2 [tryHandlers] @ src/core/condition.slate:79
frame: 3 [signal] @ src/core/condition.slate:31
frame: 4 [error:] @ src/core/condition.slate:317
frame: 5 [load: &in: &verbose: &showLoadMessage:] @ src/lib/
module.slate:232
frame: 6 [(arity: 0)] @ src/lib/image.slate:138
frame: 7 [do] @ src/core/method.slate:2
frame: 8 [(arity: 0)] @ src/core/method.slate:267
frame: 9 [ifCompletes:ifFails:] @ src/core/method.slate:261
frame: 10 [unlessCompletes:] @ src/core/method.slate:271
frame: 11 [(arity: 1)] @ src/lib/image.slate:138
frame: 12 [applyWith:] @ src/core/method.slate:6
frame: 13 [(arity: 1)] @ src/lib/image.slate:158
frame: 14 [applyWith:] @ src/core/method.slate:6
frame: 15 [ifNotNilDo:] @ src/core/nil.slate:8
frame: 16 [(arity: 2)] @ src/lib/image.slate:156
frame: 17 [applyWith:with:] @ src/core/method.slate:10
frame: 18 [(arity: 1)] @ src/core/sequence.slate:832
frame: 19 [applyWith:] @ src/core/method.slate:6
frame: 20 [below:do:] @ src/core/method.slate:180
frame: 21 [doWithIndex:] @ src/core/sequence.slate:827
frame: 22 [handleStandardCommandOptions] @ src/lib/image.slate:
141
frame: 23 [(arity: 0)] @ src/lib/image.slate:118
frame: 24 [on:do:] @ src/core/condition.slate:43
frame: 25 [(arity: 1)] @ src/lib/image.slate:72
frame: 26 [applyWith:] @ src/core/method.slate:6
frame: 27 [(arity: 0)] @ src/core/dictionary.slate:197
frame: 28 [do] @ src/core/method.slate:2
frame: 29 [ifNotNil:] @ src/core/nil.slate:20
frame: 30 [(arity: 2)] @ src/core/dictionary.slate:197
frame: 31 [doWithIndex:] @ Nil
frame: 32 [valuesDo:] @ src/core/dictionary.slate:193
frame: 33 [do:] @ src/core/dictionary.slate:244
frame: 34 [handleStartup] @ src/lib/image.slate:68
frame: 35 [save &name: &startupREPL:] @ src/lib/image.slate:5
frame: 36 [saveNamed:] @ src/lib/image.slate:26
frame: 37 [evaluateIn: &optionals:] @ src/mobius/syntax.slate:
180
frame: 38 [(arity: 0)] @ src/lib/repl.slate:155
frame: 39 [on:do:] @ src/core/condition.slate:43
frame: 40 [(arity: 0)] @ src/lib/repl.slate:147
frame: 41 [handlingCases:] @ src/core/condition.slate:64
frame: 42 [interpretHook:] @ src/lib/repl.slate:42
frame: 43 [(arity: 0)] @ src/lib/repl.slate:139
frame: 44 [enter] @ src/lib/repl.slate:135
frame: 45 [start &resource:] @ src/lib/repl.slate:185
frame: 46 [start] @ src/mobius/prelude.slate:38
The following condition was signaled:
Error: Image filename specified where Slate source expected.

Available Restarts:
restart: 0 Abort evaluation of expression
restart: 1 Abort evaluation of expression
restart: 2 Quit Slate

Enter 'help.' for instructions.
slate-debug[0..2][frame: 0]> : 2.


The error is pretty clear to me but maybe you missed it or didn't get
that error.


> [snip gtk saving image]

Yeah that's on the TODO list. We have discussed ways of getting it to
work but no one has taken it on yet.

pocho

unread,
Jun 1, 2009, 11:35:05 PM6/1/09
to slate-language
It worked, and in contrast to the other fix, didn't require the inline
functions be moved to slate.h

>
> > ./slate -i <image>
>
> > This starts slate using <image>.
>
> > maybe it could also say
>
> > This starts slate using <image>. If you already didn't, download a
> > clean image fromhttp://code.google.com/p/slate-language/downloads/list
> > .
>
> sounds good to me
>
> > > > 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.
>
> 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.
Yeah, it was that error.

> > [snip gtk saving image]
>
> Yeah that's on the TODO list. We have discussed ways of getting it to
> work but no one has taken it on yet.

Well, that would be a really nice feature. I liked the idea of the
language, but I think I'll wait it to be a bit more mature.. maybe
when Gtk support gets better so I could work directly in the IDE
inspecting objects and modifying code.

Bye!
Reply all
Reply to author
Forward
0 new messages