r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[!REBOL3]

Maxim
20-Oct-2010
[5599]
dataset browsing example : 

>>my-ctx: context [ a: 22 c: context [ b: 33]]
>>using my-ctx
>>current-words
== [a c]

>> using c
>> current-words
== [c]

>> using none
>> current-words
== [... list of current user context words ...]
Andreas
20-Oct-2010
[5600]
Pekr, we can write an R2-style console app with the hostkit. It's 
just that someone needs to actually do it :)
Pekr
20-Oct-2010
[5601]
But you said - "it's probably easiest to just install a "proper" 
shell, maybe along with rlwrap." , which I think is not possible.
Maxim
20-Oct-2010
[5602]
yeah, the command-line is a program like any other.. its just the 
I/O from the shell which is really complex in MS... 


the actual text user interactive session is totally controlable... 
just look at python's IDLE which is basically an example of R2's 
console but in DOS console.
Pekr
20-Oct-2010
[5603x2]
Well, it will be possible, once R3 is not going to be a GUI app.
IDLE is not a DOS console.
Andreas
20-Oct-2010
[5605x2]
Pekr, by that I meant something like rxvt from Cygwin. Or powercmd 
or console2 or ...
Combine this with rlwrap, and you should have a usable environment.
Maxim
20-Oct-2010
[5607x2]
pekr, its a console application, just like our current R3 CLI.   
a console is simply a place which accepts lines of input interactively 
and spawns processing upon hitting a complete command.
a shell is a different thing entirely.  though the shell usually 
has access to the same input stream which is re-directed to/from 
the console.
Andreas
20-Oct-2010
[5609]
But you'll probably need some hostkit hacking in any case.
Pekr
20-Oct-2010
[5610x3]
http://www.rebol.net/cgi-bin/r3blog.r?view=0282#comments
Andreas - power console can't work. I tried Console2. The outcome 
is, you can't have both the true console mode and the GUI app. Look 
at the above link. Or simply Carl was not able to achieve that. Some 
ppl said, that is the reason why Python has two executables - one 
for plain console mode, and the other for GUI mode. But I might not 
interpret it correctly ...
Max - sorry for mispelling console for shell ...
Andreas
20-Oct-2010
[5613x3]
Fortunately, with the hostkit you have the power to compile either 
as console or windows app.
IIRC, R3 is currently compiled as console app per default.
So currently "installing a proper shell" should work.
Maxim
20-Oct-2010
[5616]
coundn't we just use their better console handling code and use it 
within R3's input loop?  or is that part of what you really meant?
Pekr
20-Oct-2010
[5617x2]
yes? then we should take car to make it work with real console. I 
don't need power-shell. Shell2 is nice and sufficient. Simply - anything 
better than MS default console, is a win ...
http://sourceforge.net/projects/console/
Andreas
20-Oct-2010
[5619]
What I mean is, two options:

- Short term: use a third-party shell replacement (like rxvt, console2, 
...)
- Long term: let someone write a nice R2-style console
Pekr
20-Oct-2010
[5620]
recently even the short-term is not done ...
Andreas
20-Oct-2010
[5621x2]
short term == now!
Damn, do I really have to fire up a Windows VM just to test if this 
is really possible right now :) ?
Pekr
20-Oct-2010
[5623x2]
how should I test? launch cmd.exe, and type R3? :-)
hmm, it launches new console, instead of using existing one ...
Andreas
20-Oct-2010
[5625x2]
Bad :)
A108?
Pekr
20-Oct-2010
[5627x2]
nooo, A107 ... and btw - what about that security dialog? Still no 
answer why it happens ...
tried A108 from console, and got:

** Script error: clean-path word is not bound to a context
** Where: if -applier-

** Near: if slash <> first boot [boot: clean-path boot] home: file: 
f...

Andreas
20-Oct-2010
[5629x4]
Wow, that must be the error Brian mentioned.
I assume you tried the RT binary A107?
Would you be so kind and try http://bolka.at/2010/rebol3/r3-a107-20100913.exe
instead?
RT binaries are built as GUI apps, the above is built as Console 
app.
BrianH
20-Oct-2010
[5633]
Pekr, we found that error too and fixed it for the next release.
Andreas
20-Oct-2010
[5634]
A109 for Win32 released:
http://www.rebol.com/r3/downloads/r3-a109-3-1.exe
Pekr
21-Oct-2010
[5635]
launch from cmd.exe is fixed. Although I would like to see R3 to 
reuse cmd console, if it does not include GUI ...
Andreas
21-Oct-2010
[5636]
Pekr, did you try the custom-built A107 binary I linked to above?
Pekr
21-Oct-2010
[5637x3]
not yet, let me try ...
:-) http://xidys.com/rebol/r3-console2.jpg
I can even start view scripts ;-) I suspect it being so, because 
view is not externalised? So could we now conclude, that from now 
on, R3 could be built as a console app?
Andreas
21-Oct-2010
[5640x5]
Yes, it is a "View" build.
And yes as well, until R3 gets an R2-style REBOL console, building 
it as Win32 console executable might be worth it.
However, ChristianE hat some problems with Unicode in combination 
with console builds, IIRC.
had*
Not sure what that was about though. Maybe Christian remembers, otherwise 
I'll have to recover the lost !REBOL3 Hostkit from backup.
Pekr
21-Oct-2010
[5645]
yes, you can see in the screenshot, that czech locale is not correct 
...
Cyphre
21-Oct-2010
[5646]
from my experience, if I build R3 as 'console app' the win console 
(the way it is handled now)  doesn't render characters in unicode. 
So far I haven't found a way how to fix that (and after brief googling 
the net it looks this is known issue)
Pekr
21-Oct-2010
[5647]
that's bad :-(
ChristianE
21-Oct-2010
[5648]
Cyphre, Andreas, that's what I was seeing, too. Build as console 
app --> no unicode chars displayed, build as gui app --> unicode 
chars are fine, but you can't run in a console window. I don't know 
what other languages are doing or if there is a way to fix this at 
all. From the information I gathered back then, I'd say, probably 
there isn't.