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

World: r3wp

[!REBOL3]

Janko
21-Jan-2010
[44x2]
By that I mean it was untolerable slow on some VPS where I assume 
same disc was used for streaming media, update was taking seconds 
while I could on the same system open a 1M rebol data file change 
it and save it back in almost no time. I couldn't get it why this 
is happening, and this was at neglegibly small database. I moved 
whole app that uses sqlite to some vps where it's almost alone on 
whole server because of this. And at Site Assistant where I used 
sqlite only for "mailbox" for bots (to send them work) I had to switch 
to mysql for this (it was the same server that blocked this heavily)
---
Graham
21-Jan-2010
[46]
This is a bit off topic !
Janko
21-Jan-2010
[47x2]
On a totally different note .. I don't know if this is doable or 
not, and if it makes sense, but I vould like to propose in discussion 
that at least native functions have some flag for if function is 
pure / side effects free or not ?
Graham: I was replying to discussion above about the need to move 
R3 chat to DB like SQLite or MySQL versus REBOL data files
Graham
21-Jan-2010
[49]
Yeah ... Carl was offtopic there too.
Janko
21-Jan-2010
[50x3]
My reason is this, big aspect of rebol is it's code / data duality 
and runtime interpretation of code, meaning you can send it around 
and all. But if I want to accept sent functions/code I want in many 
cases that they work as pure functions giving me some value out of 
my values (calculate something). Not modify anything / mutate my 
runtime env. without me knowing.
For example let's say there is rebol interpreter that holds some 
big data in memory and listens on some port. You send it a function 
that if will run on data items to determine if you want that item 
or not and send you the filtered items. If you could know that the 
function used for filter is pure e.g. only returns true false on 
some given item, and can't touch anything outside would be very nice 
even if you trust the source of filter function, and critical in 
cases where you cant.
(and in most cases you can't really trust anything you get over network)
Graham
21-Jan-2010
[53x2]
Typically such systems don't send functions around because they can't 
be trusted
So, Beer, Rugby and LNS don't do that....
Janko
21-Jan-2010
[55x2]
yes, but sending a function / code over is probably the most effective 
way to execute on the server side and also the most consistent, not 
that you have to invent some subdialect that you then interpret. 
If you knew function is pure or locked/prevented to touch anything 
outside it you could trust it.


And using code as data directly not reinventing some limited "code" 
for stuff like this is the whole strongpoint of rebol and lisps. 
That's why they say "Any sufficiently complicated C or Fortran program 
contains an ad hoc, informally-specified, bug-ridden, slow implementation 
of half of Common Lisp."


for example you have a database of users, you want to get all who 
are between age 20 and 30 ... you can send it  function [ user ] 
[ all [ gerater? user/age  20 lesser? user/age 30 ] ]


If you can't do this how else could you solve it so elegantly? And 
you would have to use/learn as client (and code on the server side) 
some limited and "a little different" language to do it
basically even better for this specifically would be that you could 
run a function in some sort of locked sandbox provided by runtime.
Graham
21-Jan-2010
[57x3]
If you run your own systems you can be as insecure as you like.
But most people would send the request as a dialect and let the other 
side do the query.
so, if you can cryptographically sign your function ... and then 
send it ... well.
Janko
21-Jan-2010
[60x3]
if each internal system is secure on it's own owerall security is 
better. for example if you controll the client in this story too 
you think you all is well, but you could still crash the server by 
mistake, for example owerwriting some global variable of it, and 
input data that you get from users (in case of an webapp) can then 
include various techniques for code injections (like they do now 
with SQL injections)
cryptograpically sending it wouldn't help in two examples I gave
because in both the main point is that you can't trust yourself 100%
Graham
21-Jan-2010
[63]
if you can't trust .. don't do it.
Janko
21-Jan-2010
[64]
what if runtime provided sandboxing. I know I know much too little 
about rebol but I imagine with all the good stuff  it does something 
like this would not be theoretically impossible ?
Sunanda
21-Jan-2010
[65]
A sandbox is a long-time wish of mine:
   http://www.rebol.org/ml-display-thread.r?m=rmlNVBC

REBOL3's security policies start to make it possible:
   http://www.rebol.com/r3/docs/functions/secure.html
Graham
21-Jan-2010
[66]
you would have to protect all your globals!
Janko
21-Jan-2010
[67]
yay! now it's a wish of two :)
Graham
21-Jan-2010
[68]
Let's move this to another group ...
Janko
21-Jan-2010
[69]
ok which one?
Graham
21-Jan-2010
[70]
You choose ...
Janko
21-Jan-2010
[71]
I can hardly ever find what to post where here :=)
Graham
21-Jan-2010
[72]
Try core ...
Graham
22-Jan-2010
[73]
Anyway to clear the screen in the console short of starting a new 
session?
Pekr
22-Jan-2010
[74]
you might try with con: open console://, but dunno how to proceed. 
Nor insert nor write works on that port ...
Graham
22-Jan-2010
[75x3]
>> probe system/schemes/console
make object! [
    name: 'console
    title: "Console Access"
    spec: none
    info: none
    actor: make native! [[end!]]
    awake: none
]
doesn't seem to do much ...
slightly less functional than the dns scheme

== make object! [
    name: 'dns
    title: "DNS Lookup"
    spec: make object! [
        title: none
        scheme: none
        ref: none
        path: none
        host: none
        port-id: 80
    ]
    info: none
    actor: make native! [[end!]]
    awake: make function! [[event][print event/type true]]
]
Pekr
22-Jan-2010
[78x2]
:-)
unbelievably .... how much functionality we miss even compared to 
R2. And we dare to call it  "soon"-to-be-beta product
Graham
22-Jan-2010
[80]
It does have more functionality than rebol1 beta ...
Pekr
22-Jan-2010
[81x2]
and more than 0.9x alpha ... I still have one somewhere :-)
We have to wait a bit for Carl to come-up from his cave ... hopefully 
he is cooking something here or there :-)
Graham
22-Jan-2010
[83x3]
see .. it could be worse
looks like his still doing site maintenance http://twitter.com/rebol3
oh well... time to play with the host kit.  Downloading visual studio 
8 ...
Andreas
22-Jan-2010
[86]
Just to be picky: you can't actually infer from `actor: make native! 
[[end!]]` how much a scheme does
Janko
22-Jan-2010
[87]
rebol3 is not in a process of production but design + production 
so I would not be too restrictive on carl jumping from one thing 
to another. he is also only one, so he can't just do r3 for 2 years 
straight
BrianH
24-Jan-2010
[88x2]
Implemented the http://www.rebol.net/r3blogs/0300.htmlmodule EXPORT 
keyword. See http://curecode.org/rebol3/ticket.rsp?id=1446
Next up is http://www.rebol.net/r3blogs/0274.htmlcompressed modules/scripts. 
I have some interesting tricks to make them seamless to use and make, 
but I have to get a little sleep before I can really dig in to them.
Graham
24-Jan-2010
[90]
Do we need SHA256 in checksum ?
BrianH
24-Jan-2010
[91]
Not a bad idea - what uses it?
Graham
24-Jan-2010
[92]
Amazon
BrianH
24-Jan-2010
[93]
Interesting, how do they use it?