Discussion:
New Flashforth board (Udamonic Scamp) available
(too old to reply)
Paul Rubin
2023-01-19 03:27:00 UTC
Permalink
Just saw this: https://udamonic.com/what-is-a-scamp.html

It is based on a 16 bit PIC MCU with 64K of flash and 20K of ram, made
by a guy in Australia, and being sold on Tindie. I don't know if
Mikael Nordman is aware of it, is involved, or anything like that.

Apparently it has been around for a couple of years(?), but I just came
across it a minute ago.

Hackaday article from 2021:
https://hackaday.com/2021/04/25/forth-module-the-size-of-a-stick-of-gum/

It's interesting to see a fairly new commercial Forth hardware product,
and it looks like the pre-installed Forth environment is is nicely set
up. But, the hardware itself is IMHO a fairly unremarkable yet
relatively expensive MCU board. It would great to have a similar
software environment on a more widely used board like an RPI Pico.
dxforth
2023-01-19 11:10:36 UTC
Permalink
Post by Paul Rubin
Just saw this: https://udamonic.com/what-is-a-scamp.html
It is based on a 16 bit PIC MCU with 64K of flash and 20K of ram, made
by a guy in Australia, and being sold on Tindie. I don't know if
Mikael Nordman is aware of it, is involved, or anything like that.
Seems to be PIC24 FlashForth configured to a particular board. Link
to the source code sends you to the FlashForth site. OTOH the doc
lists additional words of which it says:

"source code for the Board Support Package (BSP) is commercial software
and is not available"

I couldn't see a hex file so it's not clear to me whether users can
reflash should it be needed.
Paul Rubin
2023-01-19 20:12:33 UTC
Permalink
Post by dxforth
"source code for the Board Support Package (BSP) is commercial
software and is not available" ... I couldn't see a hex file so it's
not clear to me whether users can reflash should it be needed.
Ugh, that is annoying. I wonder what the BSP code actually does, where
it came from, and whether Mikael is ok with its unavailability given
that Flashforth is GPL3.
dxforth
2023-01-20 02:00:54 UTC
Permalink
Post by Paul Rubin
Post by dxforth
"source code for the Board Support Package (BSP) is commercial
software and is not available" ... I couldn't see a hex file so it's
not clear to me whether users can reflash should it be needed.
Ugh, that is annoying. I wonder what the BSP code actually does, where
it came from, and whether Mikael is ok with its unavailability given
that Flashforth is GPL3.
The extra words/what they do are listed in the latter part of this doc:

https://udamonic.com/uploads/1/2/1/3/121343112/scamp2-ff-udamonic-words.pdf

Are creations made using a GPL-based product subject to GPL? I wouldn't
have thought so. But yeah - it doesn't help the product's appeal if
aimed at hobbyists and parts of it are under lock and key.
Paul Rubin
2023-01-20 02:08:10 UTC
Permalink
Post by dxforth
Are creations made using a GPL-based product subject to GPL?
If the creation is software, then yes, that's the whole idea of the GPL.
You're not allowed to take a GPL program, "improve" it, and make the
"improved" version proprietary.

Building GPL code into a hardware product is fine though, as long as the
software inside (including any improvements) is available to the
customer under the GPL terms.
Paul Rubin
2023-01-20 02:18:01 UTC
Permalink
Post by dxforth
https://udamonic.com/uploads/1/2/1/3/121343112/scamp2-ff-udamonic-words.pdf
Are creations made using a GPL-based product subject to GPL?
Oh, I see, those extra words aren't part of Flashforth itself, they are
more like code that is loaded into Flashforth. I was going to say the
GPL wouldn't apply, but it might be a little bit tricky. It is annoying
of the vendor to not release the code since at first glance, the extra
words don't do anything amazing. They just twiddle various hardware
control lines and stuff like that.

Re the GPL, by analogy: if you modify the Gnu C compiler to include some
new optimization or keyword, the result is a modified GCC that must be
GPL'd like the original. But if you write a C program and use GCC to
compile it, the resulting output is not a modified GCC so it doesn't
have to be GPL. (There is some special licensing for the GCC runtime
library to ensure this).

Certainly in human terms, regardless of the exact license terms, it's
best if the board vendor (Udamonic) and the Flashforth author (Mikael)
have been in communication and are both ok with the product.
Zbig
2023-01-20 08:14:55 UTC
Permalink
FlashForth (and AmForth) can be used with ordinary
Arduino Uno, so if some maker prefers to keep his
solution in a secret, well… he's free to keep it, no problem.

In case „something stronger” would be needed, there's
also a Pinguino, that can be bought for a few bucks
( https://www.olimex.com/Products/Duino/PIC32/PIC32-PINGUINO/open-source-hardware
they also allow to download all schematics and PCB files
needed to recreate the board)
or it can be built by oneself:
https://www.instructables.com/Pinguino-Pic18F4550/
Paul Rubin
2023-01-21 02:58:14 UTC
Permalink
FlashForth (and AmForth) can be used with ordinary Arduino Uno, so if
some maker prefers to keep his solution in a secret, well… he's free
to keep it, no problem.
If the solution incorporates code written by someone other than the
maker, then the code author also has a say in it. I'm now of the view
that the Scamp as delivered infringes the GPL, though IANAL and it gets
into some fine points. Obviously though, if Mikael (Flashforth's
author) is ok with the Scamp being sold that way, then it is fine.

Either way though, I wouldn't buy one myself, even if the board price
was more competitive with other comparable boards. As it is though,
boards like the Raspberry Pi Pico seem a lot more attractive.
Brian Fox
2023-01-20 15:18:17 UTC
Permalink
Post by Paul Rubin
Re the GPL, by analogy: if you modify the Gnu C compiler to include some
new optimization or keyword, the result is a modified GCC that must be
GPL'd like the original. But if you write a C program and use GCC to
compile it, the resulting output is not a modified GCC so it doesn't
have to be GPL. (There is some special licensing for the GCC runtime
library to ensure this).
I didn't understand that before now. Thanks
Do you think the same rule applies if I use a GPL Forth to write a
cross-compiler than generates a new Forth system?
Marcel Hendrix
2023-01-20 16:19:39 UTC
Permalink
Post by Brian Fox
Post by Paul Rubin
Re the GPL, by analogy: if you modify the Gnu C compiler to include some
new optimization or keyword, the result is a modified GCC that must be
GPL'd like the original. But if you write a C program and use GCC to
compile it, the resulting output is not a modified GCC so it doesn't
have to be GPL. (There is some special licensing for the GCC runtime
library to ensure this).
I didn't understand that before now. Thanks
Do you think the same rule applies if I use a GPL Forth to write a
cross-compiler than generates a new Forth system?
Interesting question. I would think that such an attempt at confuscation
does not get you off the hook: you will have to provide the sources
of the cross-compiler + source of your extension (because AFAIR
the idea of GPL is that users can freely inspect and recompile the end
product).

Legally it is probably more interesting when you use (your own)
*copyrighted*, public domain, or 'free as beer' tool to write the
new Forth system. Are these systems suddenly GPL when you
make a commercial product with the new Forth?

-marcel
Brian Fox
2023-01-20 16:44:19 UTC
Permalink
Post by Marcel Hendrix
Interesting question. I would think that such an attempt at confuscation
does not get you off the hook: you will have to provide the sources
of the cross-compiler + source of your extension (because AFAIR
the idea of GPL is that users can freely inspect and recompile the end
product).
Legally it is probably more interesting when you use (your own)
*copyrighted*, public domain, or 'free as beer' tool to write the
new Forth system. Are these systems suddenly GPL when you
make a commercial product with the new Forth?
-marcel
I am on board with providing sources for the cross-compiler
but why is my application not the same as a GCC application?

I am assuming here that, like the C program, no parts of the
Cross-compiler, nor the original Forth are accessible to the
application user. In other words it is a "turnkey" application
as these are sometimes called in Forth systems.
Potentially my cross-compiler generates "headless" Forth
code.
Paul Rubin
2023-01-21 03:01:48 UTC
Permalink
Post by Brian Fox
I am assuming here that, like the C program, no parts of the
Cross-compiler, nor the original Forth are accessible to the
application user.
I believe this is considered fine. In the case of GCC, when you compile
a program, the output includes some chunks of boilerplate code (plus
functions from the runtime library) that could be seen as coming from
GCC itself, rather than from your program. So absent special
arrangements, that could present a GPL issue. The special arrangement
that GCC makes is a "runtime exemption" to ensure that GCC's license
doesn't affect the boilerplate in the compiled code.
Brian Fox
2023-01-21 04:57:27 UTC
Permalink
Post by Brian Fox
I am assuming here that, like the C program, no parts of the
Cross-compiler, nor the original Forth are accessible to the
application user.
I believe this is considered fine. In the case of GCC, when you compile
a program, the output includes some chunks of boilerplate code (plus
functions from the runtime library) that could be seen as coming from
GCC itself, rather than from your program. So absent special
arrangements, that could present a GPL issue. The special arrangement
that GCC makes is a "runtime exemption" to ensure that GCC's license
doesn't affect the boilerplate in the compiled code.
Thank you Paul and everyone else who weighed in.
Nice to know that GPL doesn't have to consume the known universe.
none) (albert
2023-01-21 10:44:08 UTC
Permalink
Post by Paul Rubin
Post by Brian Fox
I am assuming here that, like the C program, no parts of the
Cross-compiler, nor the original Forth are accessible to the
application user.
I believe this is considered fine. In the case of GCC, when you compile
a program, the output includes some chunks of boilerplate code (plus
functions from the runtime library) that could be seen as coming from
GCC itself, rather than from your program. So absent special
arrangements, that could present a GPL issue. The special arrangement
that GCC makes is a "runtime exemption" to ensure that GCC's license
doesn't affect the boilerplate in the compiled code.
A compiler is worthless if you can't pull in pieces of code,
say a Forth compiler calls a word named DROP.
There is a special provision for that: the code for DROP falls
under the LPGPL (lesser gpl), and you are free to use DROP.
A program using DROP is not considered "an extension of the Forth compiler".
If you interested read chapter 3 of the ciforth documentation.

Groetjes Albert
--
Don't praise the day before the evening. One swallow doesn't make spring.
You must not say "hey" before you have crossed the bridge. Don't sell the
hide of the bear until you shot it. Better one bird in the hand than ten in
the air. First gain is a cat spinning. - the Wise from Antrim -
dxforth
2023-01-22 01:32:25 UTC
Permalink
Post by none) (albert
Post by Paul Rubin
Post by Brian Fox
I am assuming here that, like the C program, no parts of the
Cross-compiler, nor the original Forth are accessible to the
application user.
I believe this is considered fine. In the case of GCC, when you compile
a program, the output includes some chunks of boilerplate code (plus
functions from the runtime library) that could be seen as coming from
GCC itself, rather than from your program. So absent special
arrangements, that could present a GPL issue. The special arrangement
that GCC makes is a "runtime exemption" to ensure that GCC's license
doesn't affect the boilerplate in the compiled code.
A compiler is worthless if you can't pull in pieces of code,
say a Forth compiler calls a word named DROP.
There is a special provision for that: the code for DROP falls
under the LPGPL (lesser gpl), and you are free to use DROP.
A program using DROP is not considered "an extension of the Forth compiler".
If you interested read chapter 3 of the ciforth documentation.
I doubt a code fragment such as DROP would be afforded protection
under copyright law. The 'work' in this case is the compiler.
One would need to show it or substantial parts had been used
illegally. IANAL either, it's just common sense one can't copyright
everyday bits of code.
none) (albert
2023-01-22 11:29:13 UTC
Permalink
Post by dxforth
Post by none) (albert
Post by Paul Rubin
Post by Brian Fox
I am assuming here that, like the C program, no parts of the
Cross-compiler, nor the original Forth are accessible to the
application user.
I believe this is considered fine. In the case of GCC, when you compile
a program, the output includes some chunks of boilerplate code (plus
functions from the runtime library) that could be seen as coming from
GCC itself, rather than from your program. So absent special
arrangements, that could present a GPL issue. The special arrangement
that GCC makes is a "runtime exemption" to ensure that GCC's license
doesn't affect the boilerplate in the compiled code.
A compiler is worthless if you can't pull in pieces of code,
say a Forth compiler calls a word named DROP.
There is a special provision for that: the code for DROP falls
under the LPGPL (lesser gpl), and you are free to use DROP.
A program using DROP is not considered "an extension of the Forth compiler".
If you interested read chapter 3 of the ciforth documentation.
I doubt a code fragment such as DROP would be afforded protection
under copyright law. The 'work' in this case is the compiler.
One would need to show it or substantial parts had been used
illegally. IANAL either, it's just common sense one can't copyright
everyday bits of code.
Substitute my MERGE-SORT or my ALLOCATE for DROP then.
Those are not trivial by a long stretch.

GNU has argued that using readline() makes a derived work.
No program has as a goal to read lines.
A ciforth program can use ALLOCATE because it is LGPL-ed.

Groetjes Albert
--
Don't praise the day before the evening. One swallow doesn't make spring.
You must not say "hey" before you have crossed the bridge. Don't sell the
hide of the bear until you shot it. Better one bird in the hand than ten in
the air. First gain is a cat spinning. - the Wise from Antrim -
Marcel Hendrix
2023-01-22 09:49:35 UTC
Permalink
On Saturday, January 21, 2023 at 11:44:14 AM UTC+1, none albert wrote:
[..]
Post by none) (albert
A program using DROP is not considered "an extension of the Forth compiler".
What does that mean to a copyright lawyer? Who says DROP stands for, or does
*exactly* what the general accepted Forth word 'DROP' does?

-marcel
none) (albert
2023-01-21 10:38:17 UTC
Permalink
Post by Brian Fox
Post by Marcel Hendrix
Interesting question. I would think that such an attempt at confuscation
does not get you off the hook: you will have to provide the sources
of the cross-compiler + source of your extension (because AFAIR
the idea of GPL is that users can freely inspect and recompile the end
product).
Legally it is probably more interesting when you use (your own)
*copyrighted*, public domain, or 'free as beer' tool to write the
new Forth system. Are these systems suddenly GPL when you
make a commercial product with the new Forth?
-marcel
I am on board with providing sources for the cross-compiler
but why is my application not the same as a GCC application?
I am assuming here that, like the C program, no parts of the
Cross-compiler, nor the original Forth are accessible to the
application user. In other words it is a "turnkey" application
as these are sometimes called in Forth systems.
Potentially my cross-compiler generates "headless" Forth
code.
It is misleading to call it a cross-compiler. It is just a program.
What you compile using gcc is just a program. If you don't
violate other copyrights, you can keep the source secret and
publish or sell the program.

Now the problem with Forth cross compilers is that it is not a program
proper, but an extended Forth system, that can probably use as a
Forth system. That falls probably under gpl (ianl).

Groetjes Albert
--
Don't praise the day before the evening. One swallow doesn't make spring.
You must not say "hey" before you have crossed the bridge. Don't sell the
hide of the bear until you shot it. Better one bird in the hand than ten in
the air. First gain is a cat spinning. - the Wise from Antrim -
dxforth
2023-01-21 01:08:04 UTC
Permalink
Post by Marcel Hendrix
Post by Brian Fox
Post by Paul Rubin
Re the GPL, by analogy: if you modify the Gnu C compiler to include some
new optimization or keyword, the result is a modified GCC that must be
GPL'd like the original. But if you write a C program and use GCC to
compile it, the resulting output is not a modified GCC so it doesn't
have to be GPL. (There is some special licensing for the GCC runtime
library to ensure this).
I didn't understand that before now. Thanks
Do you think the same rule applies if I use a GPL Forth to write a
cross-compiler than generates a new Forth system?
Interesting question. I would think that such an attempt at confuscation
does not get you off the hook: you will have to provide the sources
of the cross-compiler + source of your extension (because AFAIR
the idea of GPL is that users can freely inspect and recompile the end
product).
The cross-compiler contains GPL code in binary form and thus falls
under GPL. If the product of the cross-compiler can't be shown to
contain GPL code or disseminate it, then the chain is broken and
GPL does not apply. That at least is reasonable. One doesn't want
to see GPL slowly consuming the world until there is nothing left.
Or does one?
a***@math.uni.wroc.pl
2023-01-20 18:41:17 UTC
Permalink
Post by Brian Fox
Post by Paul Rubin
Re the GPL, by analogy: if you modify the Gnu C compiler to include some
new optimization or keyword, the result is a modified GCC that must be
GPL'd like the original. But if you write a C program and use GCC to
compile it, the resulting output is not a modified GCC so it doesn't
have to be GPL. (There is some special licensing for the GCC runtime
library to ensure this).
I didn't understand that before now. Thanks
Do you think the same rule applies if I use a GPL Forth to write a
cross-compiler than generates a new Forth system?
I am not a lawyer, but I would point out few basic things:

- GPL differs from usual commerial licences that it does not limit
_use_ of sofware. You can do whatever you wish. GPL only comes
into play when you distribute software.
- Key legal term here is "derived work". If you mutate given work
(say translate it into different language or omit some parts) and
include it as part of your work that usually creates "derived work".
GPL user term "linking". In case of image based languages like Forth,
Lisp or Smalltalk new program nomally contain large part of
implementation so binary automatically is considerd "derived work"
and subject to GPL.
- In case when you link your code with GPL code people frequently
write that your code "has to be GPL". But in reality, GPL requires
that you give sources of your code to people who received
binaries and allow them to re-distribute sources under conditions
not more restrictive than GPL. So, for example you may say that
your code is public domain. Of course, commercial companies in many
cases want restrictive licences, and most restrictive GPL compatible
licence is GPL. And you are not required to distribute
sources to strangers, only to people whom you gave/sold binaries.
- If your cross-compiler is just a Forth program (that is does not
use tricks that effectively copy part of Forth into result), then
normal rules apply: cross-compiler binary is "linked" with GPL
Forth, so subject to GPL. But if you do not distribute the
cross-compiler it does not matter. Output of your cross-compiler
(that is "new" Forth system) is yours.
--
Waldek Hebisch
none) (albert
2023-01-21 10:32:47 UTC
Permalink
Post by Brian Fox
Post by Paul Rubin
Re the GPL, by analogy: if you modify the Gnu C compiler to include some
new optimization or keyword, the result is a modified GCC that must be
GPL'd like the original. But if you write a C program and use GCC to
compile it, the resulting output is not a modified GCC so it doesn't
have to be GPL. (There is some special licensing for the GCC runtime
library to ensure this).
I didn't understand that before now. Thanks
Do you think the same rule applies if I use a GPL Forth to write a
cross-compiler than generates a new Forth system?
In ciforth I have added an explicit stipulation that you're allowed to
do that, only a modified ciforth system is bound to GPL.

Groetjes Albert
--
Don't praise the day before the evening. One swallow doesn't make spring.
You must not say "hey" before you have crossed the bridge. Don't sell the
hide of the bear until you shot it. Better one bird in the hand than ten in
the air. First gain is a cat spinning. - the Wise from Antrim -
Anton Ertl
2023-01-22 08:40:28 UTC
Permalink
Post by Brian Fox
Do you think the same rule applies if I use a GPL Forth to write a
cross-compiler than generates a new Forth system?
IANAL.

What you use for editing the source code or testing plays no role for
the copyright, as long as you don't include significant amounts of
code from a source that was copyrighted by someone else. In the
latter case you have to comply with the license of the source code.
How much is considered "significant" depends on the jurisdiction, and
how far the copyright lobbyists have advanced there.

If you release a binary, the question is if the compiler you use puts
significant code that was not derived from your code into the binary.
E.g., the gcc run-time library libgcc is linked with code generated by
gcc, and therefore you have to comply with the license of libgcc when
distributing binaries produced by gcc. The license of libgcc is not
GPL and allows arbitrary distribution of the resulting binaries.

Programmers tend to think that they can get around the need to comply
with a library's (or Forth system in our case) license by distributing
the source code, and letting the user perform the linking (compiling
in case of a Forth system), but lawyers think differently: If your
source code is written such that it only works with a specific
library, you have to comply with that library's license conditions.
This is apparently so clear to every lawyer involved that AFAIK nobody
has tested it in court yet. Instead, what those have done who did not
want to comply with the GPL is to write alternative libraries with the
same API (in the case of libgmp) so that one could claim that the
source program was not written specifically for the GPLed library; or
they have just not used the GPLed library and have not benefitted from
its qualities (in case of libreadline).

Now, for your question: If you write a cross compiler and run it on a
GPLed Forth, whether you have to comply with the GPL when distributing
the cross-compiler depends on whether the cross-compiler only works
with that GPLed Forth system or also with others (e.g., Gforth's
cross-compiler originally ran on other systems; that may have changed
in the meantime).

Concerning the code it creates, what licenses it has to comply with
depends on the licenses of code that it uses for generating the
binary, and on whether the binary is specific to one run-time
library/system. E.g., if you have, say, a public-domain
cross-compiler that generates the standalone binary (no run-time
library/system needed) only from the source code the user provides and
from the (public-domain) code included in the cross-compiler, the user
distributing the binary only has to comply with the license of the
source the user gives to it. If the cross-compiler is not in the
public domain, and the binary includes significant code that is
derived from the code of the cross-compiler, the license of the
cross-compiler also has to be complied with.

E.g., with the Gforth cross-compiler you can provide code for all
words yourself, but for many words that are primitives in mainstream
Gforth it provides replacement definitions (in Forth) so that you
don't have to start with a full complement of primitives, but can
introduce and test them step-by-step. These replacement words are
under GPL, so if you use a significant amount of code coming from
these words, the resulting binary can only be distributed under the
terms of the GPL (plus whatever license the rest of the code is
under). But if you provide all words yourself, this does not apply.

If you use this cross-compiler to build an image to work with the
Gforth engine (which provides the primitives), distributing the image
has to comply with the GPL, because the engine is under the GPL.

- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: https://forth-standard.org/
EuroForth 2022: https://euro.theforth.net
Loading...