Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #9620 > unrolled thread

colorForth on Linux

Started byDavid Kuehling <dvdkhlng@gmx.de>
First post2012-02-19 00:02 +0100
Last post2012-02-26 10:13 -0800
Articles 5 — 2 participants

Back to article view | Back to comp.lang.forth


Contents

  colorForth on Linux David Kuehling <dvdkhlng@gmx.de> - 2012-02-19 00:02 +0100
    Re: colorForth on Linux David Kuehling <dvdkhlng@gmx.de> - 2012-02-20 00:16 +0100
    Re: colorForth on Linux Mark <mark.slicker@gmail.com> - 2012-02-24 21:39 -0800
      Re: colorForth on Linux David Kuehling <dvdkhlng@gmx.de> - 2012-02-26 02:00 +0100
        Re: colorForth on Linux Mark <mark.slicker@gmail.com> - 2012-02-26 10:13 -0800

#9620 — colorForth on Linux

FromDavid Kuehling <dvdkhlng@gmx.de>
Date2012-02-19 00:02 +0100
SubjectcolorForth on Linux
Message-ID<87d39b21a4.fsf@snail.Pool>
Hi,

the Linux ports of colorForth don't seem to be actively maintained
currently, so I thought I'd post about my experience here.  The
XcolorForth/GLcolorForth ports were done by Mark Slicker, whose website
seems to have fallen victim to bit-rot.  The only copies I can find are
those hosted by Tim Neitz [1] or by the ForthFreak wiki [2].

These distributions come with a shell script 'compile' for compilation.
To build on 64-bit Linux systems (amd64), that script needs some fixes.
You also need to install the required 32-bit libraries and GCC multilib
support (on debian try '
sudo apt-get install ia32-libs-dev ia32-libs-gtk gcc-multilib')

Here's the fixed GLcolorForth/compile script:

--8<--
#!/bin/bash
gcc -m32 -g -o glcf main.c mem.s -L /usr/X11R6/lib -lGL -lX11
gcc -m32 -c -o color.o color.s
if test -a color.o; then
cp color.com blocks
ld -m elf_i386  --oformat binary -Ttext `nm glcf | awk '/ xcf$/ {print "0x" $1}'` -o color.com color.o
dd if=blocks of=color.com bs=1024 seek=12 skip=12
rm blocks color.o
fi
--8<--

the resulting 'glcf' executable looks like running properly, but I
didn't yet find out how to operate it.

The same changes applied to XcolorForth's compile script make it
compile; however execution fails after printing 'init kbd.' twice,
without any windows opened.  Probably the video mode is just not
supported here?

cheers,

David

[1] http://www.dnd.utwente.nl/~tim/colorforth/mslicker/GLcolorForth/
[2] http://forthfreak.net/index.cgi?colorForth
-- 
GnuPG public key: http://dvdkhlng.users.sourceforge.net/dk.gpg
Fingerprint: B17A DC95 D293 657B 4205  D016 7DEF 5323 C174 7D40

[toc] | [next] | [standalone]


#9629

FromDavid Kuehling <dvdkhlng@gmx.de>
Date2012-02-20 00:16 +0100
Message-ID<87haymo1mv.fsf@snail.Pool>
In reply to#9620
>>>>> "David" == David Kuehling <dvdkhlng@gmx.de> writes:

> Hi, the Linux ports of colorForth don't seem to be actively maintained
> currently, so I thought I'd post about my experience here.  The
> XcolorForth/GLcolorForth ports were done by Mark Slicker, whose
> website seems to have fallen victim to bit-rot.  The only copies I can
> find are those hosted by Tim Neitz [1] or by the ForthFreak wiki [2].

> [1] http://www.dnd.utwente.nl/~tim/colorforth/mslicker/GLcolorForth/
> [2] http://forthfreak.net/index.cgi?colorForth

Short addition: not only does the 'compile' script of GLcolorForth need
some fixing; also the keyboard input handling code does not work
properly on my Debian Squeeze system: keyboard events take many seconds
to be delivered.  This short patch to 'main.c' fixes the problem here:

--8<--
Index: /trunk/forth/glcolorforth/main.c
===================================================================
--- /trunk/forth/glcolorforth/main.c	(revision 450)
+++ /trunk/forth/glcolorforth/main.c	(revision 452)
@@ -59,6 +59,10 @@
 int key () {
     XEvent event;
-    if (XPending(display) > 0) {
-	XNextEvent (display, &event);
+    
+    /* 2011-02-19/david : added Xsync, made it loop below */
+    XSync(display, False);
+    
+    while (XPending(display) > 0) {
+        XNextEvent (display, &event);
 	switch (event.type) {
 	case KeyPress:
--8<--

For now I've put a fixed version on my SVN server:
http://mosquito.dyndns.tv/freesvn/trunk/forth/glcolorforth/ , but might
eventually move everything to sourceforge.

cheers,

David
-- 
GnuPG public key: http://dvdkhlng.users.sourceforge.net/dk.gpg
Fingerprint: B17A DC95 D293 657B 4205  D016 7DEF 5323 C174 7D40

[toc] | [prev] | [next] | [standalone]


#9706

FromMark <mark.slicker@gmail.com>
Date2012-02-24 21:39 -0800
Message-ID<752f77c1-4c82-4ab2-ba88-f39970608d47@n12g2000yqb.googlegroups.com>
In reply to#9620
Hello,

Your right that this code is no longer maintained, I don't use it
anymore and I just check this group now and then to see there are any
new developments in Forth. I wasn't really an expert with this
Xwindows stuff so maybe it wasn't done properly, it was just a quick
hack to get colorForth running under Linux/Xwindows and allow more
people to try it. Hope you found it useful and feel free to improve
it.

Best,
Mark

On Feb 18, 6:02 pm, David Kuehling <dvdkh...@gmx.de> wrote:
> Hi,
>
> the Linux ports of colorForth don't seem to be actively maintained
> currently, so I thought I'd post about my experience here.  The
> XcolorForth/GLcolorForth ports were done by Mark Slicker, whose website
> seems to have fallen victim to bit-rot.  The only copies I can find are
> those hosted by Tim Neitz [1] or by the ForthFreak wiki [2].
>
> These distributions come with a shell script 'compile' for compilation.
> To build on 64-bit Linux systems (amd64), that script needs some fixes.
> You also need to install the required 32-bit libraries and GCC multilib
> support (on debian try '
> sudo apt-get install ia32-libs-dev ia32-libs-gtk gcc-multilib')
>
> Here's the fixed GLcolorForth/compile script:
>
> --8<--
> #!/bin/bash
> gcc -m32 -g -o glcf main.c mem.s -L /usr/X11R6/lib -lGL -lX11
> gcc -m32 -c -o color.o color.s
> if test -a color.o; then
> cp color.com blocks
> ld -m elf_i386  --oformat binary -Ttext `nm glcf | awk '/ xcf$/ {print "0x" $1}'` -o color.com color.o
> dd if=blocks of=color.com bs=1024 seek=12 skip=12
> rm blocks color.o
> fi
> --8<--
>
> the resulting 'glcf' executable looks like running properly, but I
> didn't yet find out how to operate it.
>
> The same changes applied to XcolorForth's compile script make it
> compile; however execution fails after printing 'init kbd.' twice,
> without any windows opened.  Probably the video mode is just not
> supported here?
>
> cheers,
>
> David
>
> [1]http://www.dnd.utwente.nl/~tim/colorforth/mslicker/GLcolorForth/
> [2]http://forthfreak.net/index.cgi?colorForth
> --
> GnuPG public key:http://dvdkhlng.users.sourceforge.net/dk.gpg
> Fingerprint: B17A DC95 D293 657B 4205  D016 7DEF 5323 C174 7D40

[toc] | [prev] | [next] | [standalone]


#9712

FromDavid Kuehling <dvdkhlng@gmx.de>
Date2012-02-26 02:00 +0100
Message-ID<87hayexvc8.fsf@snail.Pool>
In reply to#9706
>>>>> "Mark" == Mark  <mark.slicker@gmail.com> writes:

> Hello, Your right that this code is no longer maintained, I don't use
> it anymore and I just check this group now and then to see there are
> any new developments in Forth. I wasn't really an expert with this
> Xwindows stuff so maybe it wasn't done properly, it was just a quick
> hack to get colorForth running under Linux/Xwindows and allow more
> people to try it. Hope you found it useful and feel free to improve
> it.

Hi Mark,

nice that you stopped by here.  Didn't have much time yet to play around
with colorForth, and reading through the (mostly assembler) sources
wasn't very motivating :) (what a mess).  Quite remarkable how you got
it run on Linux (must have been fun patching those x86 hex-code macros
in the first colorForth blocks, that cannot even be read and edited with
any standard editor :)

While you're around, could you please clarify the copyright on the files
you added?  colorForth itself is public domain; but as it stands the
GLcolorForth is currently not (at least not legally) re-distributable.
A statement that your changes are (L)GPLv2/3, BSD public-domain
etc. would just do, I guess.  For now my copy is hosted on a private SVN
server [1], but I plan to move it to sourceforge/github/whatever.

cheers,

David

[1] http://mosquito.dyndns.tv/opensvn/free/trunk/forth/glcolorforth/
-- 
GnuPG public key: http://dvdkhlng.users.sourceforge.net/dk.gpg
Fingerprint: B17A DC95 D293 657B 4205  D016 7DEF 5323 C174 7D40

[toc] | [prev] | [next] | [standalone]


#9719

FromMark <mark.slicker@gmail.com>
Date2012-02-26 10:13 -0800
Message-ID<8c7b2205-47c4-4cf5-9b3a-3237da8f52cb@k29g2000yqc.googlegroups.com>
In reply to#9712
Looking at the code again, it is somewhat remarkable, maybe that I had
the patience for that :) I also had wrote some code to translate the
assembler code from MS assembly to GNU assembly.

Normally I would place my public code under GPL, but since colorForth
is public domain and there nothing too original in the GL/Xwindows
boilerplate I place all this additional code in the public domain.

Best,
Mark

On Feb 25, 8:00 pm, David Kuehling <dvdkh...@gmx.de> wrote:

> Hi Mark,
>
> nice that you stopped by here.  Didn't have much time yet to play around
> with colorForth, and reading through the (mostly assembler) sources
> wasn't very motivating :) (what a mess).  Quite remarkable how you got
> it run on Linux (must have been fun patching those x86 hex-code macros
> in the first colorForth blocks, that cannot even be read and edited with
> any standard editor :)
>
> While you're around, could you please clarify the copyright on the files
> you added?  colorForth itself is public domain; but as it stands the
> GLcolorForth is currently not (at least not legally) re-distributable.
> A statement that your changes are (L)GPLv2/3, BSD public-domain
> etc. would just do, I guess.  For now my copy is hosted on a private SVN
> server [1], but I plan to move it to sourceforge/github/whatever.
>
> cheers,
>
> David
>
> [1]http://mosquito.dyndns.tv/opensvn/free/trunk/forth/glcolorforth/
> --
> GnuPG public key:http://dvdkhlng.users.sourceforge.net/dk.gpg
> Fingerprint: B17A DC95 D293 657B 4205  D016 7DEF 5323 C174 7D40

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.forth


csiph-web