F.E.L.T.

Functionally Equivalent Language Translation


Hello dear readers (anybody there?). I also have a blog here: The Adventures of Emacs The Viking, which I shall be updating a little more often now as I am out of the darkness of getting FELT released which has occupied a lot of 2012. Thanks.

Java support almost done but... -- Feb 27 2013

I have been making good progress with Java but in the meantime something even shinier has come along. The Hexwax USB Expandio chip as well as the beginnings of a block-buster Lego stop motion movie I plan to make with my son. These things keep me sane (Sean, an anagram of sane, so I am indeed in-sane...). Sadly it means that I have lost some steam with completing the Java back end but I still have to finish my Scala android app too so I may be forced to come back to it soon!

Tonight I am pleased because I sorted out a nasty Haskell package problem I had and finally got USB communications going to my breadboard (thanks Roger for building it for me, I know I could have done it but it would have taken three times as long and not have worked first time.)

I shall continue with USB and Haskell because it hurts... goodnight everybody and keep hacking the good hack.

---oooOOOooo---

Java support operational! Hurrah etc. -- Jan 30 2013

Well what do you know ?! Last night I finally managed to get the type mapper class to play ball with the existing PHP code and the new Java back-end to turn this:

(#f:typemap "mtypes.ini")
(defclass HelloWorld
    (defunc+ main/v (args/s@)
      (emit "Hello World,  my first clean FELT rendition!")))

into this:

class HelloWorld {
    public static void main(String[] args)
        {System.out.println("Hello World,  my first clean FELT rendition!");}
}

Moving forwards with it I can now pipe to a Java source file and then compile and run it,

$ felt types.felt -as javacoder > HelloWorld.java
$ javac HelloWorld.java
$ java HelloWorld

Hello World,  my first clean FELT rendition!

The new instruction (#F:TYPEMAP) allows a file to be loaded containing required type information and the Javacoder does the rest, although a lot of what's in that INI file will be subsumed by it before release.

I now have to re-run my unit tests and make sure nothing broke and also re-generate all of the live web site using the new code (locally of course!) as a final test and it's one-down one to go... Objective-C here we come! Maybe 'C' first though.....

This is a huge step forwards to where I want to take FELT; being able to generate code for a type language instead of PHP and JavaScript is great news. I am hoping that once I tidy up what I have, I shall soon be able to rattle off back-end coders for Objective-C and straight 'C'. After that... well after that I am going to start creating tutorials and videos and things.

---oooOOOooo---

Java support under-way in earnest now! -- Jan 16 2013

I have reverted my efforts from the below mentioned "meta coder" to actually completing the Java language support as after having a review of it I realised that it was so close to being usable that I just needed to dig in and get it done so hopefully that will be completed in the next week or two... there's never enough time and after a hard day whacking PHP about sometimes it's hard to get into it at home when I'd rather be Haskelling!

I have created a class called TypeMapper which takes as its input the contents of a stock INI file, does some processing on it and gets stored in the instance of the coder class being used.

A new instruction (#F:TYPEMAP filename) now exists. The idea is that every file that needs it has it at the top so that all files work to a common profile when it comes to generating the code.

I think it's going to work out fine. It will probably undergo some panel beating along the way but what doesn't in this job?

---oooOOOooo---

Happy New Year yadda yadda yadda etc. -- Jan 13 2013

So... survived another Christmas, the end of the world passed without event (surprise surprise) and I have managed to tear myself away from Haskell long enough to get back into FELT... I was supposed to be completing the Java back end next but I have decided to take a little detour and write what I have called the "Meta coder" class... this will produce a representation of the FELT source as a PHP Array, JSON data or an XML file... don't ask me why I have decided to do this! It just feels like a good idea and I am going with it.

One of the things that I hope to get out of this is some useful documentation on how to write a custom coder; to that end I will document the code for the "meta coder" classes to the hilt and then make that part of the final documentation. I also plan to put the doxygen stuff online soon for those that like to read that sort of thing.

End of the world ? Not likely!

Shall I tell you my own reasons why I knew the world wasn't going to end? It's quite simple really, the expiry date on my debit card is 2015. Think about it.

---oooOOOooo---

Merry Christmas -- Dec 24th 2012

Well, if this is what the end of the world feels like then it's not that bad after all is it. Let's all wish a merry holiday time to those poor people who felt it necessary to travel all the way to France just to find out what "reality" is all about. And let's all promise next year to constantly remind each other how important it is to remember that we are all worthy of each others respect. If you think you are better than somebody else then you have issues in your life that you should really seek help to address.

A note to managers: YOU DO NOT HAVE THE RIGHT TO SHOUT AT PEOPLE. EVER That may seem obvious but there is still a lot of "office bullying" taking place the world over I think and it must stop. It leaves both sides feeling used and abused I am sure of it. It happened to me this year. That last person that shouted at me during "working hours" got thumped. End of. That helped to bring on a "mu" moment for them and I got an apology out of it too. This last incident however I didn't resort to Zen shock tactics, I just ignored it because this person had been very compassionate early in the year as my mum entered her last weeks of life and I needed a lot of time off here and there. But....

---oooOOOooo---

It's finished / started at last! -- Dec 10 2012

After a mysterious "outage" / connectivity issue I have now managed to "officially" go live with FELT. It isn't perfect (as I am a perfectionist and nothing is ever perfect is it) there are still a hundred and one things to be done.

Still, I hope people find it and have a go with it. I have not actually "publicised" it yet until I feel a little more comfortable with it being out there. Slash-dotting is not for me this month!

I am now going to spend some time creating some tutorials, I have thought about putting together a YouTube channel with screen captures but that takes more time than I have right now but it's high on the list.

The only other thing that I shall be working on with any real vigour now is the Java and Objective-C back-ends. These are interesting because until now, dealing with PHP and JavaScript, has been relatively simple as they are essentially "untyped" whereas Java and Objc require formal types to be given when you define a function and local variables etc. I already have this figured out and how it will integrate with what I have so far but I just have to do it.

I will finish with a good quote from Mr. Henry Ford:

You don't build your reputation with what you are going to do.

Good-night!

The best laid plans... -- Dec 05 2012

That'll teach me to get too excited about it all... after much deliberation and hesitation I decided that tonight would be the night I finally released FELT to the world but guess what... essential server maintenance by my ISP has meant that I have no web presence until 03:00 AM. Laugh?! I nearly cried! LOL

So... it has meant that tomorrow will be when I open it up to the world instead... plus I can always use the time to add some more examples on the REPL page. Not long now Mum, thing #1 nearly finished at last.

This definitely feels more nerve wracking than when I auditioned as a guitar player in a band for the first time ever!

---oooOOOooo---

REPL coming along nicely now -- Nov 24 2012

I originally had planned to have a floating REPL window that would pop up when you clicked on a code window but I think that it would have just gotten in the way so I abandoned that some time back. All I want from the REPL is a nice place where you can learn FELT hacking and when you select JavaScript or Node.js as the target it means that you can execute that code in the browser as well which really helps to show you how it works.

The REPL will also have two sets of files for new users to read and learn from; the first set is the actual FELT files that make the site work and the second set contains a bunch of examples that demonstrate specific topics such as array access and such like, more of a reference bucket of working code samples that you can use to get your own skills off the ground quicker I hope.

It has been twenty-two days since I updated this page but we moved again this year, and hopefully that's it now for the foreseeable future!

I really want to get FELT out before Christmas now as it has taken far too long but I have had other stuff going on in my life this year which has meant that I have not always been able to put in the time I know I needed to be, such is life.

---oooOOOooo---

Closing in on release! -- Nov 2 2012

Well, it is 19:58 Hrs UK time, another week has ended. I have spent nowhere near enough time on FELT lately what with this and that and life. It's been a helluva year Mum but I promised I would finish things and this will be thing number one... and if I get it right it'll be a birthday present to myself with your name on it. But Mum, you know I am never happy with anything I ever do so it might be a little later ;)

In Memory of My Mum

My dear Mum passed away on March 9th this year and I miss her a lot. There are no words really, just a bizarre feeling that she is out there somewhere smiling down on her "firstborn". How I would love to hear her embarrass me one more time, as only your Mum can, in the supermarket aisle asking me (way too loudly) if she needs a loaf of bread!

It's funny the things you miss.

I promised you I will finish things Mum, and this will be the start.

You brought me into this world and in your final weeks you showed me how to go out of it as well; with calm dignity, courage and acceptance and still unfathomable and unconditional love for me and my brother and two sisters, your children who will and do miss you every day, until their dying day.

I will spend the rest of my life justifying the faith and pride you had in me...