Is exist... ?

If you have any questions, remarks, ... if you need help... its here...

Is exist... ?

Postby Tuk9 » 19 Feb 2016 10:16

Hello!

Can i execute words in socket protocol already in framework? Is planning this in feature?
Is exist user frendly meta language in framework for create structure for using in protocol?
Can i invoke dll function?
Is planning serial port support functionality?
Can i use quan-like words?
What about userfrendly locals?
Is planning entered types in language?
What about single threaded with cooperative multitasking and pass messages between instances?

Thanks.
Tuk9
 
Posts: 5
Joined: 19 Feb 2016 09:56

Re: Is exist... ?

Postby Franck » 19 Feb 2016 19:00

Hello !

1) Yes for tcp sockects, not yet for udp.
TCPSockets are defined into lang/Resource directory.

Also, if you load tcp package, you will add 4 classes to add tcp facilities :
TcpRequest, TcpConnection, TcpRequest and TcpServer.
You can check those files to see tcp

2) Not yet : dynamic libraries (dll, so, ...) are planned for next version.

3) What is a quan-like word ?

4) Oforth has locals variables and parameters :
>: t(a, b) a b - ;

>10 4 t .
6 ok
>t(10, 4) .
6 ok

>: u | i | 10 loop: i [ i . ] ;
u
1 2 3 4 5 6 7 8 9 10 ok

Do you think to something else for "userfrendly locals" ?

5) You mean define types for locals, parameters, ... ?
If so, no : oforth is a dynamically typed language and this will probably never change (on exception is calling dll in next version).

6) Just use tasks with only one thread instanciated :
- You can run oforth with only one thread instanciated using --W1 command line option.
- When a task is waiting for a resource it will wait and the next task available will run on the thread.
- Currently, there is no "yield" to yield the current task, but it is planned.

Franck
Franck
 
Posts: 140
Joined: 29 Oct 2014 19:01

Re: Is exist... ?

Postby Tuk9 » 19 Feb 2016 21:13

QUAN variable from 80.. for sintax sugar of pain working with addresses.
I think about ideas of locals from FORTH DIMENSIONS XI/1

How i understand oforth is very far from classic as pure c-machine generator for inner engine with many targets stacks..
Tuk9
 
Posts: 5
Joined: 19 Feb 2016 09:56

Re: Is exist... ?

Postby Franck » 19 Feb 2016 23:02

Oforth is a just in time assembler code.
Immediate words generate asm as they are performed.
You can see asm.of and prelude.of files to see how code is generated.

Also, some words are native and still written in C. Objective is, for V1.0, to translate them to Oforth code (or asm if necessary).
Franck
 
Posts: 140
Joined: 29 Oct 2014 19:01

Re: Is exist... ?

Postby Tuk9 » 20 Feb 2016 07:44

OK, thanks, I will experiment later.
Tuk9
 
Posts: 5
Joined: 19 Feb 2016 09:56

Re: Is exist... ?

Postby Tuk9 » 20 Feb 2016 14:47

Is planned access in vocabulary words in foreign side of socket for executing with local output?
Tuk9
 
Posts: 5
Joined: 19 Feb 2016 09:56

Re: Is exist... ?

Postby Franck » 23 Feb 2016 20:18

You mean receive a word into a socket, execute it and return result back ?
If so, you can use Json objects : they are extended to support words (using # word).

For instance :
Code: Select all
>"{ $function : #rot, $param : [ 1, 2, 3 ] } " .s
[1] (String) { $function : #rot, $param : [ 1, 2, 3 ] }
ok
>dup perform .s
[1] (Json) {"function" : #rot, "param" : [1, 2, 3] }
[2] (String) { $function : #rot, $param : [ 1, 2, 3 ] }
ok
>dup valueAt($function) .s drop
[1] (Function) #rot
[2] (Json) {"function" : #rot, "param" : [1, 2, 3] }
[3] (String) { $function : #rot, $param : [ 1, 2, 3 ] }
>asString .s
[1] (String) {"function" : #rot, "param" : [1, 2, 3] }
[2] (String) { $function : #rot, $param : [ 1, 2, 3 ] }
ok


Franck
Franck
 
Posts: 140
Joined: 29 Oct 2014 19:01

Re: Is exist... ?

Postby Tuk9 » 23 Feb 2016 20:47

Yes, it is question about this.
Thanks for example.
Tuk9
 
Posts: 5
Joined: 19 Feb 2016 09:56


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron