What do you think about one of my, but very old programming language. It's a 
scripting language, but invoked by special library. I called this library kind: 
interaction library, because it's automatically detects best way to interact 
with user and handle all interaction manner. Program (for example) telling: i 
need view class /desktop/dialogs/message_dialog and I support /message and 
actions /action/ok, /action/cancel. Program also told: set message to "what 
would you do?" and my library handles everything. I telling you this, because 
one of mode of running programs use my library is shell mode, where 
user/programmer could interact with view by writing commands or text script is 
started based on parameters given to program, but my library contains builtin 
web server and can work with user in cui/gtk+2.0 or QT mode.

Description of shell language supports by my library: 
[https://www.dobreprogramy.pl/Libgreattao-i-jego-tekstowa-powloka,Blog,63527.html](https://www.dobreprogramy.pl/Libgreattao-i-jego-tekstowa-powloka,Blog,63527.html)
 (in Polish)

[https://www.dobreprogramy.pl/Libgreattao-i-jego-tekstowa-powloka,Blog,63527.html](https://www.dobreprogramy.pl/Libgreattao-i-jego-tekstowa-powloka,Blog,63527.html)
 (in English)

The language looks like an assembler, but it is very flexible. For example, you 
could define block of code, using block statement, put compare instruction at 
beginning of block, put other instruction and .false label at the end of block. 
If condition in compare instruction wasn't true, shell will jump to .false 
label. You think, so how to handle or? There's solution: you can jump to label 
in block up on stack, event it's placed in different procedure body, but that's 
not advised. How it work?

[code] function OR =text i 0 block test_first_true ifintless $i 
$.unnamed_param_count =add i $i 1 =fromdict command $.unnamed_params $i block 
test execute $command scopebyname OR return : .false endblock test continue : 
.false scopebyname OR scopelevel -1 goto .false endblock test_first_true 
endblock [/code] I known it looking bad, but I understood this code in one 
minute and I wrote it long time ago. Magic. And of course - I think core of 
language should be as small as possible. Everything else we could write in my 
language itself!

What do you think? 

Reply via email to