# Porting yet another programming language to FreeBSD



## Arnold (May 6, 2017)

Hi there,

I know, it is a boring topic, sorry having posted it, because it will trigger the usual responses anyway. If you feel like that perhaps better skip the rest and save your precious time to have a look around in the real world outside.

Are we alone now? Then the interesting bits can start here.

Why yet another language for FreeBSD? There is Java, Python, Perl, C C++, you name it, already.
Right. Very true. 
But are those languages fun to use? Do they come in a total package that weighs in under 100MB? Under 10MB? Even under 1MB? Without the usual dependencies that need further downloads of often several GB? What can you do with these languages, scripting or desktop applications development, can you create drivers?
Can you crosscompile the programs you create for other platforms? Would it be nice to be able to use FreeBSD to do your development and than effortlessly create executables that also work on your works computer, you know what they will use, or for your friend that chose the slick side? All under 1MB? Yes. This starts to look like a bad infomercial. Hang in!

Why do you want it, Arnold?
I got acquainted with the language Rebol in 2011, and because I was able to create a program playing checkers I got hooked and what happens after that is that it spoils you rotten.
Though Rebol development stalled, a new ambitious project was started around 2012 to recreate it open sourced and with the ability to compile. This is the Red Programming language project you can find all about on http://www.red-lang.org (Mind that this is a personal appeal and the Red project and me are not affiliated in any way other than me being an interested follower)

Why don't you do it yourself?
To be honest I can't do it myself. I can help as much as I can, and I will for sure. You do not have to start from scratch either. A FreeBSD community member has already contributed a FreeBSD port when the project was in a much earlier stage. Nowadays a lot of functionality has been added and that code probably can do with a little brush-up and possible additions to facillitate the new View engine to create GUI's.

But why do you want to use Red on FreeBSD?
Well my current laptop is aging and I need to replace it soon. The slick ones are now too expensive, the other OS that all laptops are running.. still too many issues. So I am considering to buy a suitable laptop that can run TrueOS, which in turn is based on FreeBSD. Now running under Wine may work, but native use beats that for sure. 

So what is in it for me?
Nothing. Sorry. No money, reward. Perhaps some eternal honour, satisfaction for contributing to something different. And in the worst case you get a lot more knowledge about FreeBSD itself. Red is really a different beast than other languages you encounter in the wild. Most other languages depend on C or C++ compile toolchains. Red has its own toolchain, compiling directly for the platform of choice. Yes that is very different indeed.
An dif you get hooked by this language too, you can at least use it on your favorite operating system. Wouldn't that be something?

Why are you asking, not the official project?
Because I want to be able to use Red on FreeBSD, the official projact has so many other tasks that this is simply no priority for them. There is simply not enough capacity to support own development at this time. Even coming over here and doing what I do here, is not realistic because the FreeBSD port will be several releases away. Unless skilled programmers want to join and test if Red will be making programming real fun again.

That is it for now, sorry for the long mail.

Best regards

Arnold


----------



## ShelLuser (May 6, 2017)

Well, this is not for me obviously. But just because I'm not fully interested in actually working on this doesn't mean that I can't support the effort. In my opinion it's always a good thing to see more software find it's way into the Ports collection.

A few things which puzzle me though....



Arnold said:


> I got acquainted with the language Rebol in 2011, and because I was able to create a program playing checkers I got hooked and what happens after that is that it spoils you rotten.


So what's stopping you from grabbing that? I just checked and they have a native FreeBSD version available on their download page.



Arnold said:


> I can help as much as I can, and I will for sure. You do not have to start from scratch either. A FreeBSD community member has already contributed a FreeBSD port when the project was in a much earlier stage.


Do you got a name? I tried searching the ports collection but nothing turned up.



Arnold said:


> So I am considering to buy a suitable laptop that can run TrueOS, which in turn is based on FreeBSD. Now running under Wine may work, but native use beats that for sure.


Fair warning: keep in mind that this forum is specifically focused around FreeBSD. There are usually notable differences between FreeBSD and derivatives so the latter are not supported here. It's not an issue right now, but I still figured I'd better mention it.



Arnold said:


> Red is really a different beast than other languages you encounter in the wild. Most other languages depend on C or C++ compile toolchains. Red has its own toolchain, compiling directly for the platform of choice. Yes that is very different indeed.


Actually that doesn't seem to be the case.

So I grabbed the source code just to look what this was all about and came across build/README.md which clearly states:

```
_Prerequisite_

_You need a [Rebol SDK](http://www.rebol.com/sdk.html) copy with a valid license
 file in order to rebuild the Red binary, this is a constraint from using Rebol2
 for the bootstrapping. Once selfhosted, Red will not have such constraint._
```
I then checked that URL and what do you know...  You actually need to pay for a license before you can use their SDK. No offense but that does shed your request in a whole different perspective, because now the question immediately pops up: _Who is going to pay for the required license?_ 

Of course this could become tricky. If you click the "Buy REBOL SDK" link found on that same page you'll run across an internal server error. So that option seems to be unavailable. Yet that also makes your request a little more problematic I think.


----------



## Arnold (May 7, 2017)

Hi ShelLuser,,

Thanks for your reply. I'll try to answer all your questions.



ShelLuser said:


> So what's stopping you from grabbing that? I just checked and they have a native FreeBSD version available on their download page.


True, but all development on R2 has effectively stopped and R3 got open sourced and then development stalled too. Rebol is interpreted where Red will be compiled, so much faster. Red will be the way to go.



ShelLuser said:


> Do you got a name? I tried searching the ports collection but nothing turned up.


The contributions were made by Richard Nyberg. I do not think they are in the Ports collection, they were made on the Red repository (http://www.github.com/red ). 



ShelLuser said:


> Fair warning: keep in mind that this forum is specifically focused around FreeBSD. There are usually notable differences between FreeBSD and derivatives so the latter are not supported here. It's not an issue right now, but I still figured I'd better mention it.


I am aware of the difference between FreeBSD and in this case TrueOS. 



ShelLuser said:


> Actually that doesn't seem to be the case.
> 
> So I grabbed the source code just to look what this was all about and came across build/README.md which clearly states:
> 
> ...


Thanks for finding that. This needs some explanation, I'll do that after the next quote.



ShelLuser said:


> I then checked that URL and what do you know... You actually need to pay for a license before you can use their SDK. No offense but that does shed your request in a whole different perspective, because now the question immediately pops up: _Who is going to pay for the required license?_
> 
> Of course this could become tricky. If you click the "Buy REBOL SDK" link found on that same page you'll run across an internal server error. So that option seems to be unavailable. Yet that also makes your request a little more problematic I think.



Nobody is going to pay for the license. The license is only needed if you need to encap the Rebol executable into your red.exe program, but this is only necessary for the Red team offering the Red executables on their site. They do have a license. In practise, and I do this all the time I compile my scripts/programs from the sources using the R2 executable I got from the rebol.com site for free. This just works and I do not need an SDK for it. In the case of FreeBSD, FreeBSD users are in luck there is a Rebol 2 version available for free for FreeBSD. 
Also it is stated that the license is only needed while Red is not selfhosted and depending on Rebol for bootstrapping. Many in the Red community have made remarks about the way this is mentioned fearing this would make people think that they would need a license they have to pay for. But as for the mentioned use the remark there is correct and for making you own Red binary the statement is correct and that is why it is still there. But again that is the only use for a license, you will never need to do that and you can do everything else without a license. I hope I have cleared this point with this explanation.

If you have more questions, please ask.

Best regards,

Arnold


----------

