Re: Serial port communications

73 views
Skip to first unread message

Michal Wallace

unread,
Feb 6, 2013, 4:44:19 PM2/6/13
to retr...@googlegroups.com


On Friday, 1 February 2013 17:44:26 UTC-6, John Porubek wrote:
I have been using Forth since the late 70's and have more recently been trying to grok Factor. Retro seems like a nice intermediate step in that continuum.

I'd like to use Retro to communicate with a small micro using a serial port (or serial over USB). I've looked through the documentation and searched this group and the web in general and I don't find anything useful pertaining to this topic. Has anyone used Retro for something like this or could someone point me in the right direction?

Hi John,

I don't know of such a thing having been implemented aready, but one nice thing about retro is the ability to hook it up to whatever you want through the virtual ports. Basically, if you can find a serial communication library for c, python, ruby, c#, pascal, go, etc, then you can wrap it up as a virtual ngaro device in whichever VM implementation is the most convenient, and then retro can use it.

-Michal

John Porubek

unread,
Feb 22, 2013, 3:40:44 PM2/22/13
to retr...@googlegroups.com
Hi Michal,

Sorry for not responding sooner. Somehow I overlooked your response from over two weeks ago.

Thanks for.pointing me towards the idea of hooking up a virtual ngaro device through the virtual ports. This is definitely something new for me. Is there an example anywhere of doing anything remotely like this?

Another alternative I've thought about would be a sockets-based approach using "socat" (see http://www.rfc1149.net/blog/2011/12/01/accessing-serial-ports-the-easy-way/). I searched my retro-11.4 directory for the text "socket" and got several hits that look interesting.

-John

Michal Wallace

unread,
Feb 25, 2013, 9:57:31 PM2/25/13
to retr...@googlegroups.com

> Thanks for.pointing me towards the idea of hooking up a virtual ngaro device through the virtual ports.
> This is definitely something new for me.
> Is there an example anywhere of doing anything remotely like this?

Everything retro does outside of the stacks and its own RAM works this way.

  - reading the keyboard
  - putting text on the screen
  - figuring out the depth of the stack for the .s command
  - reading and writing files

Look at the source of any of the VM implementations for examples.

I actually don't know of anyone else using devices besides the standard ones, but the interface is very simple.


--
--
--
You received this message because you are RETRO 10 discussion group.
To post to this group, send email to retr...@googlegroups.com
To unsubscribe from this group, send email to retro-10-u...@googlegroups.com
 
---
You received this message because you are subscribed to the Google Groups "retro-language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to retro-10+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

John Porubek

unread,
Feb 26, 2013, 3:25:34 PM2/26/13
to retr...@googlegroups.com
> Everything retro does outside of the stacks and its own RAM works this way.
>
>   - reading the keyboard
>   - putting text on the screen
>   - figuring out the depth of the stack for the .s command
>   - reading and writing files

I find this approach fascinating, and, I imagine, quite powerful.


> Look at the source of any of the VM implementations for examples.

I'll do that! Thanks again.

Reply all
Reply to author
Forward
0 new messages