Discussion:
Starting Jedi on Windows 7, what are the relevant environment variables?
Antti Karttunen
2013-04-25 08:07:43 UTC
Permalink
Cheers,

I downloaded the ZIP from https://github.com/jazzscheme/jedi-windows-mingw
(the "Clone in Windows" button), and eventually unzipped it and moved to a
directory named:

C:\Users\karttu\jedi\2.8\

When I start jedi.exe in the same directory (or when going into another
directory, after having added
/c/Users/karttu/jedi/2.8 to PATH).
it says: "Welcome to Jedi, Please enter the profile that will be used for
this session.", but after clicking Login, says:

"The following error occurred while loading the profile:
Unable to find unit: jazz
Press Continue (to bypass this problem using a generic profile class), Exit
to exit immediately".

I see the problem is that it cannot find the stuff
under C:\Users\karttu\jedi\2.8\lib\jazz\
(because I can reproduce the same error under the Linux version, by moving
the corresponding directory temporarily somewhere else).

So, how I can tell jedi.exe where to find that unit? I tried setting
environment variable LIBRARY_PATH, but to no avail.

(This probably should be in the FAQ?)


Yours,

Antti Karttunen
--
You received this message because you are subscribed to the Google Groups "Jazz Scheme" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jazzscheme+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To post to this group, send email to jazzscheme-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
Visit this group at http://groups.google.com/group/jazzscheme?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Guillaume Cartier
2013-05-21 16:47:58 UTC
Permalink
Hi Antti,

I just pushed a new version to
https://github.com/jazzscheme/jedi-windows-mingw.git.

It includes all the latest Jazz / Jedi improvements and bug fixes and
should fix the problem you encountered.

PS: Don't hesitate to report any problems or improvement ideas. Improving
Jedi is a very high priority!

PPS: Adding the directory containing jedi.exe to PATH should not be
necessary.

Guillaume

On Thu, Apr 25, 2013 at 4:07 AM, Antti Karttunen
Post by Antti Karttunen
Cheers,
I downloaded the ZIP from https://github.com/jazzscheme/jedi-windows-mingw
(the "Clone in Windows" button), and eventually unzipped it and moved to a
C:\Users\karttu\jedi\2.8\
When I start jedi.exe in the same directory (or when going into another
directory, after having added
/c/Users/karttu/jedi/2.8 to PATH).
it says: "Welcome to Jedi, Please enter the profile that will be used for
Unable to find unit: jazz
Press Continue (to bypass this problem using a generic profile class),
Exit to exit immediately".
I see the problem is that it cannot find the stuff
under C:\Users\karttu\jedi\2.8\lib\jazz\
(because I can reproduce the same error under the Linux version, by moving
the corresponding directory temporarily somewhere else).
So, how I can tell jedi.exe where to find that unit? I tried setting
environment variable LIBRARY_PATH, but to no avail.
(This probably should be in the FAQ?)
Yours,
Antti Karttunen
--
You received this message because you are subscribed to the Google Groups
"Jazz Scheme" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at http://groups.google.com/group/jazzscheme?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "Jazz Scheme" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jazzscheme+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To post to this group, send email to jazzscheme-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
Visit this group at http://groups.google.com/group/jazzscheme?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
Antti Karttunen
2013-05-25 20:04:11 UTC
Permalink
On Tue, May 21, 2013 at 7:47 PM, Guillaume Cartier
Post by Guillaume Cartier
Hi Antti,
I just pushed a new version to
https://github.com/jazzscheme/jedi-windows-mingw.git.
It includes all the latest Jazz / Jedi improvements and bug fixes and should
fix the problem you encountered.
PS: Don't hesitate to report any problems or improvement ideas. Improving
Jedi is a very high priority!
PPS: Adding the directory containing jedi.exe to PATH should not be
necessary.
Thanks, it works better now. Merci beacoup!

Now, I would like to do some drawing with cairo-routines, directly to
some "canvas-window" on my screen. (Later also to a PNG/SVG-file).
What I should give as an argument to cairo_win32_surface_create ?
(or its platform-independent wrapper create-cairo-image-surface ?)
What it expects as that argument called "compatibility", and how do I
obtain one?

Especially if I don't want to use class Memory-Surface, but instead
write as standard Scheme as possible. Or if I have to, then I have to,
but please tell me how...


Yours,

Antti Karttunen
--
You received this message because you are subscribed to the Google Groups "Jazz Scheme" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jazzscheme+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To post to this group, send email to jazzscheme-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
Visit this group at http://groups.google.com/group/jazzscheme?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
Guillaume Cartier
2013-05-26 20:58:47 UTC
Permalink
Here's an example drawing a red line from 0,0 to 100,100 using 2 savors of
cairo: Jazzish and Schemish.

First, create an application project :

File / New Project...
Select "Application" on the left
Give it a Name: lets say "app"
Click OK

Open app / src/ app / application.jazz

Add the following code after the (import ...) form :


;; extra imports
(import (jazz.graphic)
(jazz.platform.cairo)
(jazz.ui.view))


;;;
;;;; Jazzish
;;;


(class Jazzish-View extends View


(method override (draw surface context)
(set-color~ surface {Color Red})
(set-line-width~ surface 1)
(move-to~ surface 0 0)
(line-to~ surface 100 100)))


;;;
;;;; Schemish
;;;


(class Schemish-View extends View


(method override (draw surface context)
(let ((context (get-context~ surface)))
(cairo_set_source_rgba context 255. 0. 0. 1.)
(cairo_set_line_width context 1.)
(cairo_move_to context 0. 0.)
(cairo_line_to context 100. 100.)
(cairo_stroke context))))


Now add the following method inside the App-Application class. It will
create the view and make it cover the whole window :


(method override (finish-process)
(nextmethod)
(maximize~ (current-stage))
@comment
(new-frame Jazzish-View)
(new-frame Schemish-View))


To run the code under the debugger, simply press F5 (Project / Debug). You
should have a standalone application with a red line from 0,0 to 100,100.


Guillaume


On Sat, May 25, 2013 at 4:04 PM, Antti Karttunen
Post by Antti Karttunen
On Tue, May 21, 2013 at 7:47 PM, Guillaume Cartier
Post by Guillaume Cartier
Hi Antti,
I just pushed a new version to
https://github.com/jazzscheme/jedi-windows-mingw.git.
It includes all the latest Jazz / Jedi improvements and bug fixes and
should
Post by Guillaume Cartier
fix the problem you encountered.
PS: Don't hesitate to report any problems or improvement ideas. Improving
Jedi is a very high priority!
PPS: Adding the directory containing jedi.exe to PATH should not be
necessary.
Thanks, it works better now. Merci beacoup!
Now, I would like to do some drawing with cairo-routines, directly to
some "canvas-window" on my screen. (Later also to a PNG/SVG-file).
What I should give as an argument to cairo_win32_surface_create ?
(or its platform-independent wrapper create-cairo-image-surface ?)
What it expects as that argument called "compatibility", and how do I
obtain one?
Especially if I don't want to use class Memory-Surface, but instead
write as standard Scheme as possible. Or if I have to, then I have to,
but please tell me how...
Yours,
Antti Karttunen
--
You received this message because you are subscribed to the Google Groups
"Jazz Scheme" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at http://groups.google.com/group/jazzscheme?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "Jazz Scheme" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jazzscheme+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To post to this group, send email to jazzscheme-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
Visit this group at http://groups.google.com/group/jazzscheme?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
Antti Karttunen
2013-05-31 02:20:33 UTC
Permalink
On Sun, May 26, 2013 at 11:58 PM, Guillaume Cartier
Post by Guillaume Cartier
Here's an example drawing a red line from 0,0 to 100,100 using 2 savors of
cairo: Jazzish and Schemish.
File / New Project...
Select "Application" on the left
Give it a Name: lets say "app"
Click OK
Open app / src/ app / application.jazz
;; extra imports
(import (jazz.graphic)
(jazz.platform.cairo)
(jazz.ui.view))
;;;
;;;; Jazzish
;;;
(class Jazzish-View extends View
(method override (draw surface context)
(set-color~ surface {Color Red})
(set-line-width~ surface 1)
(move-to~ surface 0 0)
(line-to~ surface 100 100)))
;;;
;;;; Schemish
;;;
(class Schemish-View extends View
(method override (draw surface context)
(let ((context (get-context~ surface)))
(cairo_set_source_rgba context 255. 0. 0. 1.)
(cairo_set_line_width context 1.)
(cairo_move_to context 0. 0.)
(cairo_line_to context 100. 100.)
(cairo_stroke context))))
Now add the following method inside the App-Application class. It will
(method override (finish-process)
(nextmethod)
(maximize~ (current-stage))
@comment
(new-frame Jazzish-View)
(new-frame Schemish-View))
To run the code under the debugger, simply press F5 (Project / Debug). You
should have a standalone application with a red line from 0,0 to 100,100.
Merci. It did just that, and it works fine like you say.

Next, I would like to do some animation with Cairo-routines, so I wrote a little
loop inside (class Schemish-View extends View
(method override (draw surface context)
... etc.
It works as long as I call (cairo_stroke context) after each line-drawing,
and then get a new context with (get-context~ surface)
and as long the _loop eventually terminates_
However, if I write it as never-ending loop, which keeps on drawing
(and taking care that the coordinates stay inside the window), nothing
is drawn
to the opened frame, and it goes "Not responding" when trying to move
focus into it. I tried also to call cairo_surface_flush, but it
doesn't help.
Any suggestions? Is there some post-processing in method finish-process
that I am missing?

Antti
Post by Guillaume Cartier
Guillaume
Post by Antti Karttunen
On Tue, May 21, 2013 at 7:47 PM, Guillaume Cartier
Post by Guillaume Cartier
Hi Antti,
I just pushed a new version to
https://github.com/jazzscheme/jedi-windows-mingw.git.
It includes all the latest Jazz / Jedi improvements and bug fixes and should
fix the problem you encountered.
PS: Don't hesitate to report any problems or improvement ideas. Improving
Jedi is a very high priority!
PPS: Adding the directory containing jedi.exe to PATH should not be
necessary.
Thanks, it works better now. Merci beacoup!
Now, I would like to do some drawing with cairo-routines, directly to
some "canvas-window" on my screen. (Later also to a PNG/SVG-file).
What I should give as an argument to cairo_win32_surface_create ?
(or its platform-independent wrapper create-cairo-image-surface ?)
What it expects as that argument called "compatibility", and how do I
obtain one?
Especially if I don't want to use class Memory-Surface, but instead
write as standard Scheme as possible. Or if I have to, then I have to,
but please tell me how...
Yours,
Antti Karttunen
--
You received this message because you are subscribed to the Google Groups
"Jazz Scheme" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at http://groups.google.com/group/jazzscheme?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "Jazz Scheme" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jazzscheme+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To post to this group, send email to jazzscheme-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
Visit this group at http://groups.google.com/group/jazzscheme?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
Guillaume Cartier
2013-05-31 16:55:40 UTC
Permalink
As Jazz implements the Windows message loop in the primordial thread, your
infinite loop is stopping message processing.

The best solution is to run the animation in a thread and communicate with
the primordial thread with execute-event for the actual drawing (calling
execute-event will execute the lambda it is passed in the primordial
thread).

For a simple example, replace your application code with the attached file.
Note that the attached code assumes you called your project "app" so that
your application class is "App-Application", else simply change the
application class name.

PS: As you are using Jazz on Windows you could also try OpenGL which is
really nice for animations. And when you're ready you can also move on to
3d animations :-)

Guillaume
Post by Antti Karttunen
On Sun, May 26, 2013 at 11:58 PM, Guillaume Cartier
Post by Guillaume Cartier
Here's an example drawing a red line from 0,0 to 100,100 using 2 savors
of
Post by Guillaume Cartier
cairo: Jazzish and Schemish.
File / New Project...
Select "Application" on the left
Give it a Name: lets say "app"
Click OK
Open app / src/ app / application.jazz
;; extra imports
(import (jazz.graphic)
(jazz.platform.cairo)
(jazz.ui.view))
;;;
;;;; Jazzish
;;;
(class Jazzish-View extends View
(method override (draw surface context)
(set-color~ surface {Color Red})
(set-line-width~ surface 1)
(move-to~ surface 0 0)
(line-to~ surface 100 100)))
;;;
;;;; Schemish
;;;
(class Schemish-View extends View
(method override (draw surface context)
(let ((context (get-context~ surface)))
(cairo_set_source_rgba context 255. 0. 0. 1.)
(cairo_set_line_width context 1.)
(cairo_move_to context 0. 0.)
(cairo_line_to context 100. 100.)
(cairo_stroke context))))
Now add the following method inside the App-Application class. It will
(method override (finish-process)
(nextmethod)
(maximize~ (current-stage))
@comment
(new-frame Jazzish-View)
(new-frame Schemish-View))
To run the code under the debugger, simply press F5 (Project / Debug).
You
Post by Guillaume Cartier
should have a standalone application with a red line from 0,0 to 100,100.
Merci. It did just that, and it works fine like you say.
Next, I would like to do some animation with Cairo-routines, so I wrote a little
loop inside (class Schemish-View extends View
(method override (draw surface context)
... etc.
It works as long as I call (cairo_stroke context) after each line-drawing,
and then get a new context with (get-context~ surface)
and as long the _loop eventually terminates_
However, if I write it as never-ending loop, which keeps on drawing
(and taking care that the coordinates stay inside the window), nothing
is drawn
to the opened frame, and it goes "Not responding" when trying to move
focus into it. I tried also to call cairo_surface_flush, but it
doesn't help.
Any suggestions? Is there some post-processing in method finish-process
that I am missing?
Antti
Post by Guillaume Cartier
Guillaume
On Sat, May 25, 2013 at 4:04 PM, Antti Karttunen <
Post by Antti Karttunen
On Tue, May 21, 2013 at 7:47 PM, Guillaume Cartier
Post by Guillaume Cartier
Hi Antti,
I just pushed a new version to
https://github.com/jazzscheme/jedi-windows-mingw.git.
It includes all the latest Jazz / Jedi improvements and bug fixes and should
fix the problem you encountered.
PS: Don't hesitate to report any problems or improvement ideas. Improving
Jedi is a very high priority!
PPS: Adding the directory containing jedi.exe to PATH should not be
necessary.
Thanks, it works better now. Merci beacoup!
Now, I would like to do some drawing with cairo-routines, directly to
some "canvas-window" on my screen. (Later also to a PNG/SVG-file).
What I should give as an argument to cairo_win32_surface_create ?
(or its platform-independent wrapper create-cairo-image-surface ?)
What it expects as that argument called "compatibility", and how do I
obtain one?
Especially if I don't want to use class Memory-Surface, but instead
write as standard Scheme as possible. Or if I have to, then I have to,
but please tell me how...
Yours,
Antti Karttunen
--
You received this message because you are subscribed to the Google
Groups
Post by Guillaume Cartier
Post by Antti Karttunen
"Jazz Scheme" group.
To unsubscribe from this group and stop receiving emails from it, send
an
Post by Guillaume Cartier
Post by Antti Karttunen
Visit this group at http://groups.google.com/group/jazzscheme?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "Jazz Scheme" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jazzscheme+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To post to this group, send email to jazzscheme-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
Visit this group at http://groups.google.com/group/jazzscheme?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
Loading...