
| # | User | Message | Date |
| 2351 | Kaj | Sounds like a trade-off between throughput and responsiveness | 23-Dec 23:59 |
| 2350 | Maxim | it has been reported as being as much as 50% faster though all the explorer reporting becomes totally wrong... i.e. instead of wasting time trying to determine how fast and how much time it takes, it just does its copy and reporting is completely off, but its actually much faster. | 22-Dec 22:48 |
| 2349 | Maxim | funny thing is that single most effective way to increase disk I/O on windows 7 is to make all transfers non Async :-) | 22-Dec 22:45 |
| 2348 | Steeve | Not only that, Altme has lot of rooms for speed improvements :) | 29-Nov 3:09 |
| 2347 | BrianH | File I/O can be pretty slow in some cases nowadays, particularly for accessing SD cards. I get freezes with AltME pretty often because of it waiting for blocking calls. | 29-Nov 3:07 |
| 2346 | BrianH | Following the Win8 announcements, one of the interesting things is that WinRT, the new runtime, doesn't have blocking APIs. Only async. | 29-Nov 3:05 |
| 2345 | BrianH | Nice. I meant industry-wide, but it's good to hear that there's help for R3. | 29-Nov 3:04 |
| 2344 | Steeve | It increase the GC refreshing rate and makes the pauses shorter | 29-Nov 3:04 |
| 2343 | Steeve | In R3, I noticed that the GC combined with the BALLAST option can erase the pause syndrom | 29-Nov 3:02 |
| 2342 | Steeve | in R3, I noticed yh | 29-Nov 3:01 |
| 2341 | BrianH | Disk I/O pauses are becoming something that people complain about, like GC pauses. Only if it's faster or easier to use though. | 29-Nov 3:00 |
| 2340 | BrianH | It makes sense for Node.js, and would make sense for other compiled languages like Red and World. I suppose Topaz could build an R3-style port model on top of Node.js as well. | 29-Nov 2:57 |
| 2339 | Steeve | It makes sense when dealing with network connections but not with the file system IMHO | 29-Nov 2:56 |
| 2338 | Steeve | It makes sense wh | 29-Nov 2:56 |
| 2337 | Steeve | I think R3 is too slow to benefit of such non blocking API. | 29-Nov 2:55 |
| 2336 | BrianH | I'm sure Linux, Mac and such have non-blocking I/O APIs too. | 29-Nov 2:52 |
| 2335 | BrianH | It would be interesting to see if there would be a way to make an async file scheme using the async or non-blocking file APIs of various operating systems. This would be needed to support WinRT-based applications for Windows 8, for instance. | 29-Nov 2:51 |
| 2334 | Steeve | My scheme only open regular files (not a messaging pipe) | 29-Nov 2:49 |
| 2333 | BrianH | Async was pretty limited in R2 because you had to start the GUI event loop, which only the View builds had. With R3, even core has an event loop, and a lot of stuff uses it. | 29-Nov 2:49 |
| 2332 | BrianH | Your block scheme probably wouldn't have benefited from asynchronicity that much. Or would it have? That would be interesting to find out. | 29-Nov 2:45 |
| 2331 | BrianH | Not the GUI event loop, the event loop. Which is as simple as WAIT port. | 29-Nov 2:43 |
| 2330 | Steeve | the asyncrhonous stuff is doable only if one start GUI do-event loop. Quite limited | 29-Nov 2:42 |
| 2329 | BrianH | Your rejection of R3 style is what your block scheme infamous, and fun too :) | 29-Nov 2:41 |
| 2328 | BrianH | Plus, with R3-style you could write asynchronous stuff that the R2 style doesn't do. | 29-Nov 2:40 |
| 2327 | BrianH | The advantage of this is that you should be able to do really simple shortcuts for some operations. R2-style: db: open odbc://server dbc: first db insert dbc "select * from catalog.schema.object" copy dbc R3 style: read/lines odbc://server/catalog.schema.object | 29-Nov 2:39 |
| 2326 | Steeve | there's no r3-style scheme IMHO | 29-Nov 2:39 |
| 2325 | Steeve | I don't agree, you can redefine the meaning of any native which supports port! as parameter. See my v-block scheme. R3 don't constrain the semantic of your scheme | 29-Nov 2:38 |
| 2324 | BrianH | However, if you do FIRST of an R3-style dbconnection port, I was going to return a R2-style dbconnection port, or at least something that acts like one (in particular, it will act like ChristianE's odbc scheme). You should be able to use R2-style odbc code without change. | 29-Nov 2:36 |
| 2323 | BrianH | This scheme is not doing the R2-style two level db, dbconnection scheme, it's doing the one-level R3 style with the db connection being internal. COPY of a port copies the port itself, returning a new connection to the same database. COPY/part returns n new connections. The R3 style uses READ and WRITE, not COPY and INSERT. | 29-Nov 2:33 |
| 2322 | Steeve | see if you can use COPY , COPY/part , COPY/deep as an alternative for READ | 29-Nov 2:31 |
| 2321 | BrianH | Quick poll: Should READ of an odbc port return flat data, and READ/lines return nested blocks? I know it's the opposite of how it was in R2, but since we don't have READ/custom we have to make do with what we have. For WRITE/lines I've been leaning towards bulk inserts. | 29-Nov 2:22 |
| 2320 | BrianH | I'm working on an R3-style odbc scheme, but the tricky part is figuring out how to make it behave in the best R3 style. | 29-Nov 2:18 |
| 2319 | Steeve | Some frenglish comment inside. Should help | 29-Nov 2:17 |
| 2318 | BrianH | Infamous indeed :) | 29-Nov 2:16 |
| 2317 | Steeve | Don't know if it still works | 29-Nov 2:16 |
| 2316 | Steeve | my infamous "virtual block" scheme. https://sites.google.com/site/rebolish/Home/idx.r?attredirects=0&d=1 | 29-Nov 2:15 |
| 2315 | BrianH | Hopefully after /string and such were added to READ :( | 29-Nov 2:14 |
| 2314 | Steeve | I've done some years ago, let me check :) | 29-Nov 2:13 |
| 2313 | BrianH | This would help with people trying to implement the R3 port model on any of the REBOL spinoff languages, by comparing the results. | 29-Nov 2:13 |
| 2312 | BrianH | Has anyone made an R3 scheme for testing? I mean a scheme that implements every possible port action, but just logs the values passed in. I want to get a better idea about how refinements are passed in to non-native schemes, if there are any potential security holes, etc. | 29-Nov 2:12 |
| 2311 | BrianH | Just came up with a way to maintain R2 compatibility and still support the advantages of the R3 style. Just working through the details. | 9-Oct 0:31 |
| 2310 | Kaj | It did strike me as a kludge | 8-Oct 23:24 |
| 2309 | BrianH | For instance, do we really need to support the manual connection pooling that R2 does? By this I mean requiring you to open a database port and then doing a FIRST on that port to get the actual connection. Shouldn't it be possible to just open a port in one step, and have the connection pooling be internal or otherwise hidden? | 8-Oct 23:12 |
| 2308 | BrianH | I've been starting to give some thought about how you would make an ODBC dialect more powerful by using R3-style scheme tricks. Has anyone else come up with some good ideas? | 8-Oct 23:06 |
| 2307 | GrahamC | which would lead to the client timing out on a tcp port | 5-Mar-11 4:57 |
| 2306 | GrahamC | I am wondering how one would implement the IMAP4 IDLE command .. see http://tools.ietf.org/html/rfc2177 It seems that once one sends an IDLE command, the server might then send a response back any time up to the server's inactivity timeout. | 5-Mar-11 4:56 |
| 2305 | Steeve | Event handlers are basically functions, they can accept event! or object if they have the same properties. | 12-Jan-11 20:01 |
| 2304 | Steeve | slip ? | 12-Jan-11 19:50 |
| 2303 | Pavel | is it possible to slip object instead of event! ? | 12-Jan-11 19:43 |
| 2302 | Steeve | you can create objects instead of event | 12-Jan-11 17:01 |
| 2301 | Pekr | ah ... well then ... maybe Cyphre know more about custom events ... | 12-Jan-11 16:59 |
| 2300 | Pavel | minimally it is included in "official" http scheme | 12-Jan-11 16:55 |
| 2299 | Pekr | I am not sure making custom events is supported? | 12-Jan-11 16:53 |
| 2298 | Pavel | when I try to evt: make event! [type: 'custom code: 1] I got: == make event! [ type: 'custom offset: 1x0 ] ie code dissappears and the value is merged into offset curiously is it intended? | 12-Jan-11 16:46 |
| 2297 | Pekr | we can be in beta another xy months, then do few RCs, and then 3.0. | 12-Jan-11 16:40 |
| 2296 | Kaj | That's what I suggested | 12-Jan-11 16:40 |
| 2295 | Pekr | Yeah, maybe Carl should put a beta moniker on it ASAP. | 12-Jan-11 16:39 |
| 2294 | Kaj | In other words, Core is usable, extensible and published now (since a few months) | 12-Jan-11 16:39 |
| 2293 | Pekr | That is understandable, but it does not contradict my claim, that "being doing beta triage" is an still ongoing process, not something entirely new :-) | 12-Jan-11 16:39 |
| 2292 | Kaj | Further, I can see that most of the important restructurings have been done last year, and the source publication has been sorted out, so I am now able to fill in missing pieces with extensions, with a reasonable certainty that the interface is stable | 12-Jan-11 16:38 |
| 2291 | Kaj | I also believe it because, when I first ported my CMS to R3 almost two years ago, it didn't fully work, so I decided not to use it; and now that I have ported it again I expected the same, but it has turned out that I'm using the R3 version now | 12-Jan-11 16:34 |
| 2290 | Kaj | Brian is working on it, and if he says Carl is working towards a beta, I believe him | 12-Jan-11 16:31 |
| 2289 | Pekr | No, it isn't - we just add new tickets imo. Changelog does not show any changes, nor Carl's notes, etc. | 12-Jan-11 16:16 |
| 2288 | Oldes | is it? | 12-Jan-11 16:15 |
| 2287 | Kaj | I know, but the bug database is being worked on right now | 12-Jan-11 16:06 |
| 2286 | Pekr | You should not forget, that we plan to come into beta for almost 2 years :-) | 12-Jan-11 16:02 |
| 2285 | Pekr | Kaj - you misunderstood. What BrianH imo means is just general note, not any recent activity :-) Last R3 activity of Carl is almost 3 months old imo ... | 12-Jan-11 16:01 |
| 2284 | Kaj | Hope I'm not adding new ones too fast ;-) | 12-Jan-11 15:47 |
| 2283 | Kaj | Cool! | 12-Jan-11 15:47 |
| 2282 | BrianH | We have been doing beta triage on the bug list already :) | 12-Jan-11 5:42 |
| 2281 | Kaj | My current gripes are mostly with the documentation | 12-Jan-11 1:20 |
| 2280 | Kaj | As far as I'm concerned, Core should be stamped 3.0 Release after another run through the bug list. It's basically only View that is not presentable yet | 12-Jan-11 1:18 |
| 2279 | Kaj | Nevermind, I was just being sarcastic :-) | 12-Jan-11 1:15 |
| 2278 | BrianH | If you need additional schemes for your own projects, contributions are welcome. | 11-Jan-11 23:47 |
| 2277 | BrianH | Sorry, TCP, DNS, probably UDP, and files/directories are also needed for beta. | 11-Jan-11 23:46 |
| 2276 | BrianH | R3 may go beta before any additional schemes are added - "enough" is a matter of opinion, and for core functionality, HTTP is enough (only needed for CHAT and UPGRADE). HTTP should be improved before beta though. | 11-Jan-11 23:44 |
| 2275 | Kaj | Ah, and R3 goes beta when it has enough schemes... | 11-Jan-11 18:05 |
| 2274 | GrahamC | I'll look at the schemes again when R3 goes beta. | 11-Jan-11 17:00 |
| 2273 | GrahamC | Pavel, I would not be surprised. I have not looked at this stuff for over a year. Yes, wik.is is now defunct and so my site is gone. See https://github.com/gchiu/Rebol3/tree/master/protocols | 11-Jan-11 16:59 |
| 2272 | Pavel | Graham, 1. where you put the R3 schemes (if so)? wik.is is definitely down. 2. I have to say your daytime scheme doesn't work for me (functionality commented out I think). 3. you can add prot-time into your collection if you like to. | 11-Jan-11 16:07 |
| 2271 | Pavel | prot-time.r was uploaded to rebol.org, now works only synchronous way ie: read time://your.time.server, server must be RFC 868 (port 37). basically it returns number of UTC seconds from 1-Jan-1900/0:00:00. When refinement /lines it returns well formated local time (using local timezone) | 7-Jan-11 15:04 |
| 2270 | Pavel | ChristianE the idea arises from the fact the time server send only response and close immediately, so I only implemented Read actor. The problem is that you may not create a new refinement but only redefine one existing. time scheme needs a little polishing and will be posted to script library. Anyway you are right the only possibility how to controll the scheme in wider borders is to write a command block and wait for reply. Another not so generall would be write into port state context and use this as switch for read actor. | 28-Dec-10 8:47 |
| 2269 | ChristianE | Would you mind to show the interface/api or the actual implementation of your time scheme? You're probably (mis-)using the /LINES refinement of READ, but maybe you can instead use WRITE for that ... | 27-Dec-10 20:45 |
| 2268 | Pavel | Finally I've got it, so now I have a time scheme returning (RFC 868) integer number of seconds from 1-Jan-1900. I tried to define refinement /date to return well formated date!. But there is no possibility to define different refinement except of hadcoded one so I have to use /lines for that, silly. | 27-Dec-10 20:24 |
| 2267 | Steeve | Sure, they both share a cross reference in their locals, like in R2. | 24-Dec-10 8:28 |
| 2266 | Pavel | And from subport (tcp) to scheme level port? Can low level awake write directly to scheme locals? | 23-Dec-10 20:30 |
| 2265 | Steeve | An awake functions deals with events. An event has a port property. An actor takes a port as input parameter. Here the link. If the port contains locals vars, they can both (the awake and the actor) access the port's locals. | 23-Dec-10 17:05 |
| 2264 | Pavel | Interresting, when I write to global variable at awake level everything works OK. Somebody give me a hint how to send received data from awake to actor level please. | 23-Dec-10 16:24 |
| 2263 | Kaj | I think Christian Ensel's ODBC scheme is the other current example | 21-Dec-10 19:10 |
| 2262 | Pavel | There is missing the "; make something synchronous here" part :-) | 21-Dec-10 16:12 |
| 2261 | Pavel | I've tryed to make time scheme from your daytime scheme Graham, as I noted when I put print at awake level as You did for debug probably I can see the server response, but I'm not able to get response at the read time://server.site == somenumber | 21-Dec-10 16:09 |
| 2260 | GrahamC | daytime doesn't work?? | 21-Dec-10 16:03 |
| 2259 | Pavel | There is alot of doc in wiki, but the examples is to be written yet, that is why I asked. BTW all the simply schemes at Graham Chiu's site (il dottore :) simply doesn work for me, and yes I've upgraded make-scheme to sys/make-scheme for A110. Unfortunately the only scheme I know working is the http scheme, but it is too high class to I can understand the process. | 21-Dec-10 15:56 |
| 2258 | Kaj | Wow, lots of documentation on the wiki. That will be very helpful | 20-Dec-10 20:05 |
| 2257 | Steeve | And you don't need to pass data, they both share the same context via the port parameter | 20-Dec-10 16:51 |
| 2256 | Steeve | *only* | 20-Dec-10 16:49 |
| 2255 | Steeve | you just can stop it | 20-Dec-10 16:49 |
| 2254 | Steeve | you can't return data from the awake handler | 20-Dec-10 16:47 |
| 2253 | Pavel | How to pass a received data from awake handler to actor level? I can do Print port/data it works, but I need return a value from read actor | 20-Dec-10 15:13 |
| 2252 | NickA | Oops - sorry, didn't see that this was R3 Schemes group. | 4-Sep-10 17:53 |
| 2251 | NickA | Is this helpful?: print "" q: open/binary/no-wait [scheme: 'console] count: 0 forever [ count: count + 1 if not none? wait/all [q :00:00.01] [ wait q qq: to string! copy q probe qq print ["^/loop count incremented to" count "while waiting^/"] insert s: open sound:// load %/c/windows/media/tada.wav wait s close s ] ] | 4-Sep-10 17:50 |
| 2250 | Steeve | I tried to launch a task! to wait for other port inputs and to keep the console safe. But WAIT seems not working inside a task! | 28-Aug-10 9:39 |
| 2249 | Steeve | Any example how to process inputs from the console's port while processing other ports using WAIT ? I looked at the source of the input function, but it doesn't help.... | 28-Aug-10 9:34 |
| 2248 | Gregg | Done. | 14-Aug-10 16:10 |
| 2247 | Anton | I think the group name should be tweaked a bit more to remove the "Scheme" inside the bracketed part. I don't see the need to have it mentioned twice. | 14-Aug-10 14:02 |
| 2246 | Graham | basic: :rebol | 13-Aug-10 23:48 |
| 2245 | BrianH | Metaphorically, yes. Literally, that will break REBOL :) | 13-Aug-10 23:43 |
| 2244 | Graham | get: :pick put: :poke | 13-Aug-10 23:42 |
| 2243 | BrianH | Pavel, you were right the first time in trying to implement GET/PUT actors, but you got the names wrong. Try again with PICK and POKE. | 13-Aug-10 23:22 |
| 2242 | Steeve | scheme on you | 13-Aug-10 22:53 |
| 2241 | Graham | Wasn't this group orginally named "Graham's foray into scheme arcana" or something similar?? | 13-Aug-10 22:49 |
| 2240 | Andreas | Yeah. And more approriate :) | 13-Aug-10 22:31 |
| 2239 | BrianH | OK, cool. That is shorter :) | 13-Aug-10 22:30 |
| 2238 | Andreas | intended* | 13-Aug-10 22:30 |
| 2237 | Andreas | I guess you took the "!REBOL Schemes" too literally. It is "!REBOL3 Schemes" Graham intented, and in fact, already renamed this group to. (It was "!REBOL3 Network Schemes" previously.) | 13-Aug-10 22:29 |
| 2236 | BrianH | We created a bunch of spinoff groups because !REBOL3 was getting too busy. | 13-Aug-10 22:21 |
| 2235 | Andreas | We didn't have a separate !REBOL3 Schemes group. | 13-Aug-10 22:19 |
| 2234 | BrianH | We have a separate !REBOL3 Schemes group on purpose. Please don't rename it. | 13-Aug-10 21:58 |
| 2233 | BrianH | Pavel, the names for the get/put operations of key-value stores are PICK and POKE. | 13-Aug-10 21:56 |
| 2232 | Graham | Ahh.... I can rename :) | 13-Aug-10 21:45 |
| 2231 | Graham | we can use a proxy actor | 13-Aug-10 21:44 |
| 2230 | Steeve | but we"re missing a rename actor | 13-Aug-10 21:41 |
| 2229 | Graham | we should rename this group to !REBOL schemes | 13-Aug-10 21:40 |
| 2228 | Pavel | graham it is better thanks | 13-Aug-10 21:36 |
| 2227 | Graham | or if empty? port/locals [ open port ] get-rif port number | 13-Aug-10 21:36 |
| 2226 | Graham | can't you return get-rif either empty? ... | 13-Aug-10 21:35 |
| 2225 | Steeve | It should be :-) | 13-Aug-10 21:32 |
| 2224 | Pavel | And second is more speed? | 13-Aug-10 21:32 |
| 2223 | Pavel | I hope close is in garbage collector as mentioned in wiki | 13-Aug-10 21:31 |
| 2222 | Steeve | Btw Pavel, in my virtual-block scheme, the reason why I rebound the actors, is that I don't like to use nasty long path to acces my locals. | 13-Aug-10 21:31 |
| 2221 | Pavel | I made it
read: func [port [port!] /seek number [integer!] ] [ either empty? port/locals [ open port return Get-RIF port number ][ return Get-RIF port number ] and it works now | 13-Aug-10 21:30 |
| 2220 | Andreas | But I think I'll refine the example and add an open? actor as well. | 13-Aug-10 21:28 |
| 2219 | Andreas | (Refresh, if you have the page open. I just fixed the formatting.) | 13-Aug-10 21:27 |
| 2218 | Pavel | OK lets try it better, thanks guys for lesson learned! | 13-Aug-10 21:26 |
| 2217 | Andreas | Ah, all documented in the wiki :) | 13-Aug-10 21:23 |
| 2216 | Steeve | when you directly use read on a path, i'm not sure that your 'open function is called | 13-Aug-10 21:22 |
| 2215 | Steeve | try to open the port at first and then call your read function with it | 13-Aug-10 21:21 |
| 2214 | Graham | http://www.rebol.net/wiki/Schemes:Notes#Actors | 13-Aug-10 21:20 |
| 2213 | Pavel | Watson <- me here | 13-Aug-10 21:15 |
| 2212 | Pavel | It is elementary dear Watson :-) | 13-Aug-10 21:15 |
| 2211 | Andreas | This is the elementary principle to understand. | 13-Aug-10 21:12 |
| 2210 | Andreas | If you define custom schemes, you can implement how those actions behave for ports using your scheme by writing what we call "actors". | 13-Aug-10 21:11 |
| 2209 | Andreas | There are action!s in R3, which operate in port!s. | 13-Aug-10 21:11 |
| 2208 | Steeve | arghh... not here ;-) | 13-Aug-10 21:11 |
| 2207 | Pavel | Rebol [
file: %prot-rif.r
title: "RIF protocol"
author: "Pavel"
rights: 'PD
date: 13-Aug-2010
] ;; Local functions Append-RIF: func [port [port!] record [binary!] ][ write/append port/locals/2 to-binary length? head port/locals/1 ;index port the end of data file will be beginning of new record write/append port/locals/1 record ;data port new record into data file return shift length? head port/locals/2 -3 ;number of records 8 bytes per record ] Get-RIF: func [ port [port!] i [integer!] /local numentry indexpos recpos recend value ][ numentry: shift length? head port/locals/2 -3 ;number of records 8 bytes per record if any [i = 0 i > numentry] [return none] ;numbering starts at 1 ends at file end indexpos: multiply subtract i 1 8 ;compute index offset recpos: to-integer read/seek/part port/locals/2 indexpos 8 either ( (8 * i) = length? head port/locals/2 ) [ ;last record special case recend: length? head port/locals/1 ][ recend: to-integer read/seek/part port/locals/2 add indexpos 8 8 ;internal record ] return read/seek/part port/locals/1 recpos subtract recend recpos ] ;; Scheme definition make-scheme [ name: 'rif title: "RIF Protocol" spec: make system/standard/port-spec-head [] awake: none actor: [ open: func [port [port!] /local path ] [ parse port/spec/ref [thru #":" 0 2 #"/" path:] append port/spec compose [path: (to-file path)] port/locals: copy [] either (0 = length? port/locals) [ append port/locals open/seek rejoin [port/spec/path ".dat"] append port/locals open/seek rejoin [port/spec/path ".idx"] ][ port/locals/1 open/seek rejoin [port/spec/path ".dat"] port/locals/2 open/seek rejoin [port/spec/path ".idx"] ] return port ] close: func [port [port!]] [ foreach port port/locals [close port] ] read: func [port [port!] /seek number [integer!] ] [ Get-RIF port number ] write: func [port [port!] record [binary!]] [ Append-RIF port record ] ] ] | 13-Aug-10 21:10 |
| 2206 | Andreas | There is no magic. | 13-Aug-10 21:10 |
| 2205 | Pavel | This automatic open close is not clear to me after Andreas there is no such automation? where is the magic? :-O | 13-Aug-10 21:09 |
| 2204 | Steeve | can't you paste the whole code somewhere ? | 13-Aug-10 21:09 |
| 2203 | Andreas | But typically you'll also want to add code to close the port again, afterwards. | 13-Aug-10 21:08 |
| 2202 | Andreas | (Within the read actor.) | 13-Aug-10 21:07 |
| 2201 | Andreas | Maybe also a simple `if not open? port [open port]` will suffice in your case. | 13-Aug-10 21:07 |
| 2200 | Pavel | OK andreas | 13-Aug-10 21:06 |
| 2199 | Pavel | >> read/seek rif://data/file 1 ** Script error: cannot access locals in path port/locals/2 ** Where: Get-RIF read ** Near: Get-RIF port number | 13-Aug-10 21:06 |
| 2198 | Andreas | and in your read actor, you'll then simply do: either open? port [{read was invoked as `open rif:// + read`}] [{read was invoked directly as read rif://}] | 13-Aug-10 21:05 |
| 2197 | Gregg | 0 = length? port/locals can be empty? port/locals | 13-Aug-10 21:05 |
| 2196 | Pavel | OK I'll try it | 13-Aug-10 21:04 |
| 2195 | Andreas | but based on that, your open? actor would simply be: `open?: func [port [port!]] [not none? port/locals]` | 13-Aug-10 21:04 |
| 2194 | Andreas | you'll most likley want `port/locals: copy []` | 13-Aug-10 21:03 |
| 2193 | Pavel | isn't it the right way? : actor: [ open: func [port [port!] /local path ] [ parse port/spec/ref [thru #":" 0 2 #"/" path:] append port/spec compose [path: (to-file path)] port/locals: [] either (0 = length? port/locals) [ append port/locals open/seek rejoin [port/spec/path ".dat"] append port/locals open/seek rejoin [port/spec/path ".idx"] ][ port/locals/1 open/seek rejoin [port/spec/path ".dat"] port/locals/2 open/seek rejoin [port/spec/path ".idx"] ] return port | 13-Aug-10 21:02 |
| 2192 | Andreas | Assuming you store port-local state in port/state, you can simply check port/state for not being none. | 13-Aug-10 21:00 |
| 2191 | Pavel | Andreas any simple example of open? ? | 13-Aug-10 20:59 |
| 2190 | Pavel | I use locales to stor opened files (I need two files ) | 13-Aug-10 20:58 |
| 2189 | Andreas | you can easily make `read/seek rif://data/file 1` work, by creating a custom open? actor and using that in your read actor | 13-Aug-10 20:58 |
| 2188 | Andreas | locales? | 13-Aug-10 20:58 |
| 2187 | Pavel | ok i'll try to understand :-( my scheme works used port: open rif:// ... read/seek port 1 but don't work the easy way: read rif://data/file 1, cant access locales | 13-Aug-10 20:57 |
| 2186 | Graham | and if they don't take a port, you can't use them without redefining their behaviour | 13-Aug-10 20:56 |
| 2185 | Andreas | action!s, to be precise | 13-Aug-10 20:56 |
| 2184 | Steeve | the allowed actors are the function with port! as parameter | 13-Aug-10 20:55 |
| 2183 | Graham | You can use them as local functions .. just not as actors | 13-Aug-10 20:55 |
| 2182 | Graham | so they can't be used actors | 13-Aug-10 20:54 |
| 2181 | Graham | ;** MISSING !!! native FOREACH has not port! as parameter | 13-Aug-10 20:54 |
| 2180 | Pavel | the funtions defined in actor object aren't actually actors? | 13-Aug-10 20:53 |
| 2179 | Graham | which actor is that? | 13-Aug-10 20:49 |
| 2178 | Pavel | What? that is exactly what Steeve does if I understand | 13-Aug-10 20:46 |
| 2177 | Graham | Let me rephrase that .. you can't define an actor if that word is already in use | 13-Aug-10 20:46 |
| 2176 | Pavel | The functions Steeve mimick for his virtual block scheme are not originaly actors but works for him | 13-Aug-10 20:45 |
| 2175 | Graham | When you use an actor like 'open, it checks to see if the actor is defined in the network scheme and invokes that. | 13-Aug-10 20:44 |
| 2174 | Graham | You're limited to the ones defined ... | 13-Aug-10 20:43 |
| 2173 | Graham | I don't think you can define your own actors ... | 13-Aug-10 20:43 |
| 2172 | Pavel | Anyway when defined /seek refinement the sheme start to work as expected | 13-Aug-10 20:36 |
| 2171 | Pavel | Another curriosity when I defined actors put/get when used port returns error message "no put actor" | 13-Aug-10 20:36 |
| 2170 | Pavel | nothing sorry | 13-Aug-10 15:38 |
| 2169 | Pavel | OK I'll try to finish simple rif:// scheme and update rif.r in rebol.org thanks guys for hepl! Documentation should be improved in file schemes, there is almost nothink. | 13-Aug-10 15:37 |
| 2168 | Steeve | there are lot of rooms for improvement in my code, perhaps some day... | 13-Aug-10 15:35 |
| 2167 | Steeve | true | 13-Aug-10 15:34 |
| 2166 | Pavel | Steeve your virtual block is more persisten block isnt it? ;) | 13-Aug-10 15:34 |
| 2165 | Pavel | Seems the standard functions are overloaded somehow even when you writes your own, (because you want different functionality of course) aah deep lake, deep lake | 13-Aug-10 15:31 |
| 2164 | Steeve | My convention is to simulate the behavior of a standard block (I called my schemle virtual-block). So it's the main reason why I don't use read or write but copy/append instead | 13-Aug-10 15:29 |
| 2163 | Andreas | You can also use the /seek and /part refinements to pass arguments to your READ actor. | 13-Aug-10 15:28 |
| 2162 | Pavel | Anyway many thanks Steve for hints! | 13-Aug-10 15:28 |
| 2161 | Pavel | For RIF more suitable names would be PUT/GET as in basic key-value stores (memcache f.e.) I can try this convention | 13-Aug-10 15:26 |
| 2160 | Steeve | deeper reason, you can't add refinement to existing functions (overlapped as actors). I just think copy is more suited to do so (because of /part) | 13-Aug-10 15:25 |
| 2159 | Pavel | Inside is read/seek/part used of course | 13-Aug-10 15:24 |
| 2158 | Pavel | It is only different name of function or has it some deeper reason? (read malfunction?) | 13-Aug-10 15:23 |
| 2157 | Steeve | I don't use read as actor because of that | 13-Aug-10 15:22 |
| 2156 | Steeve | I use copy and copy/part to real several records | 13-Aug-10 15:21 |
| 2155 | Pavel | Anyway I'm partially succesfull with rif:// scheme, I can open multiople files from port: open rif://data/file, I can close multi files with clos port, I can write port to-binary "some record". What is difficult is to pass argument (number of wanted record) to read actor. it seems read acor accept only port. Any hint? | 13-Aug-10 15:20 |
| 2154 | Steeve | several reasons | 13-Aug-10 15:19 |
| 2153 | Pavel | thanks steve for inspiration, may I know why you use actor* and not regular actor? | 13-Aug-10 15:16 |
| 2152 | Steeve | Check this http://sites.google.com/site/rebolish/Home/idx.r | 13-Aug-10 5:55 |
| 2151 | Pavel | andreas your open wont do its job I'm sorry | 12-Aug-10 21:52 |
| 2150 | Pavel | you are right but then f cannot be unset (removed) but I can live with it | 12-Aug-10 21:38 |
| 2149 | Pavel | I'll check it | 12-Aug-10 21:35 |
| 2148 | Andreas | Pavel, not for me: >> f: open %.vimrc >> open? f == true >> close f >> open? f == false | 12-Aug-10 21:35 |
| 2147 | Pavel | my RIF needs to work with double files simoutaneously | 12-Aug-10 21:34 |
| 2146 | Pavel | only for open more files at once | 12-Aug-10 21:33 |
| 2145 | Graham | you'd write your own 'open? actor | 12-Aug-10 21:32 |
| 2144 | Pavel | exact | 12-Aug-10 21:32 |
| 2143 | Graham | we can't wait for Carl to do everything .. just have to be prepared to discard our work if he rewrites it! | 12-Aug-10 21:32 |
| 2142 | Pavel | andreas missunderstanding when f: open %file close f open? f returns true | 12-Aug-10 21:32 |
| 2141 | Pavel | graham I've commented it in DB chat , to be honest I thin Carl would do it better but I cannot wait more | 12-Aug-10 21:31 |
| 2140 | Andreas | Same for OPEN?. | 12-Aug-10 21:30 |
| 2139 | Andreas | CLOSE on a foo port will be a no-op, unless you implement a close actor. | 12-Aug-10 21:30 |
| 2138 | Graham | What's the current state of RIF? | 12-Aug-10 21:29 |
| 2137 | Pavel | ie port looks the same open or closed and open? returns true, more the port cannot be deleted/removed currious | 12-Aug-10 21:28 |
| 2136 | Pavel | OK thanks I'll try my own, anyway is there any distinction if fileport is open/closed? after close the information is still open | 12-Aug-10 21:26 |
| 2135 | Andreas | if you want to keep a file open, you can keep port-local state in port/state | 12-Aug-10 21:25 |
| 2134 | Andreas | yes. you can just use normal READ to read from a file within the read actor | 12-Aug-10 21:24 |
| 2133 | Pavel | into read actor | 12-Aug-10 21:23 |
| 2132 | Pavel | should a file to be implemented into read for real reading? (how to) | 12-Aug-10 21:22 |
| 2131 | Graham | There's a typo there .. FOO should be RIF :) | 12-Aug-10 21:22 |
| 2130 | Pavel | good andreas muchas gracias you know I'm a beginner | 12-Aug-10 21:20 |
| 2129 | Andreas | hmm, ignore the first duplicate part of the paste | 12-Aug-10 21:18 |
| 2128 | Andreas | make-scheme [
name: 'foo
title: "FOO Protocol"
spec: make system/standard/port-spec-head []
actor: [
open: func [port [port!]] [
print 'open
make-scheme [
name: 'foo
title: "FOO Protocol"
spec: make system/standard/port-spec-head []
actor: [
open: func [port [port!]] [
print 'open
]
read: func [port [port!]] [
print 'read
]
]
] f: open foo://bar.baz read f | 12-Aug-10 21:18 |
| 2127 | Pavel | Ie write number to port get record back, write record to port get number back for the very beginning | 12-Aug-10 21:17 |
| 2126 | Maxim | direct DB table access using read/write would be VERY powerfull :-) | 12-Aug-10 21:14 |
| 2125 | Pavel | Graham I like to write a scheme for my mini RIF implementation yes maxim | 12-Aug-10 21:14 |
| 2124 | Maxim | access to RIF? | 12-Aug-10 21:14 |
| 2123 | Graham | I'm missing what is the point? the network schemes are written to try and emulate file io ... | 12-Aug-10 21:13 |
| 2122 | Pavel | Has anybody tried some file related scheme? zip// or somethink like was in disscussion? | 12-Aug-10 21:10 |
| 2121 | Maxim | briging = bridging | 12-Aug-10 21:04 |
| 2120 | Maxim | I guess we'll need device extensions for briging the gap. | 12-Aug-10 21:03 |
| 2119 | Graham | I don't think so | 12-Aug-10 21:01 |
| 2118 | Pavel | Thats what I ask, may the scheme be asynchronous when low level port is synronous and we dont use tasks yet? | 12-Aug-10 21:00 |
| 2117 | Graham | the main port is just an abstraction .. to allow you to work on the real port | 12-Aug-10 20:58 |
| 2116 | Graham | why not? | 12-Aug-10 20:58 |
| 2115 | Pavel | But ok sub port cannot be unleashed from above schema right? | 12-Aug-10 20:57 |
| 2114 | Pavel | Thats what I wrote | 12-Aug-10 20:55 |
| 2113 | Graham | file io is sync isn't it? | 12-Aug-10 20:55 |
| 2112 | Henrik | Robert made an overview of how ports work a while ago. I'm not sure if it's available publicly. | 12-Aug-10 20:54 |
| 2111 | Pavel | may the sheme be asynchrnous alhough file scheme is synchronous (I presume)? | 12-Aug-10 20:54 |
| 2110 | Pavel | typo all of them | 12-Aug-10 20:52 |
| 2109 | Pavel | I've looked at your shemes already, but all of the are network related. Some easy pedagogical example would help me :) how to ommit port numbers (maybe they are not neccesary) and especially how to manage subport in 'file. Anyway impressive bunch of schemes. | 12-Aug-10 20:51 |
| 2108 | Graham | Yes, check my github site | 12-Aug-10 20:46 |
| 2107 | Pavel | Any simple protocol example available, something like the R2 one long time on rebolforces, but for R3? I'd like to implement protocol above 'file schema. Any help/hint welcome. | 12-Aug-10 20:28 |
| 2106 | Graham | pop uses crlf.crlf .. sorry | 3-Jul-10 21:34 |
| 2105 | Graham | I guess I should try that ... sending a length | 3-Jul-10 21:34 |
| 2104 | Graham | http uses a content-length ... | 3-Jul-10 21:33 |
| 2103 | Graham | pop uses .crlf ftp closes the data port | 3-Jul-10 21:32 |
| 2102 | Steeve | like for any protocol, the server must send the length of the data at first | 3-Jul-10 21:32 |
| 2101 | Graham | What's the best way to determine whether the server has completed sending data if the server does not close the port? | 3-Jul-10 21:30 |
| 2100 | Graham | Anyone tried this out? | 30-Jun-10 2:44 |
| 2099 | Graham | going to think on the syntax to get the database metadata ... as I should be able to get column names, and types | 29-Jun-10 10:41 |
| 2098 | Graham | Still don't know if I can reuse the port after the server closes it .. or, whether i need to create a new subport | 29-Jun-10 10:30 |
| 2097 | Graham | Ok, updated the protocol to remove the waits inside the handler ... and it is working now. I can now detect the close event from the server. | 29-Jun-10 10:30 |
| 2096 | Graham | Oh yeah ... don't wipe the Db ... but I've made a backup anyway. It's the demo employee.fdb that comes with firebird.
You can do this db: open jdbcbridge://www.compkarori.co.nz:8020 insert db {select first 3 * from employee} result: copy db | 29-Jun-10 9:24 |
| 2095 | Graham | you don't need any db drivers installed on your side ... it's a tcp connection to the db server. | 29-Jun-10 9:21 |
| 2094 | Graham | I've setup a server at www.compkarori.co.nz:8020 to help debug the jdbcbridge protocol. | 29-Jun-10 9:20 |
| 2093 | Graham | and then clearing the client/data | 29-Jun-10 6:45 |
| 2092 | Graham | except I'm copying the data from client/data to client/spec/data ... | 29-Jun-10 6:43 |
| 2091 | Steeve | Last but not least , there is problem in the close event. >>client/spec/data: load enline to-string client/spec/data should probably be >>client/spec/data: load enline to-string client/data | 29-Jun-10 6:37 |
| 2090 | Graham | It's so long since I looked at this R3 network stuff ... | 29-Jun-10 6:25 |
| 2089 | Steeve | There are potentially several problems in that code. First, never use wait in the event handler. it's a good way to produce a stack overflow. Second, I have to go to work, sorry... | 29-Jun-10 6:21 |
| 2088 | Steeve | I see no evidence in that test. What is the events trace ? | 29-Jun-10 6:16 |
| 2087 | Graham | http://github.com/gchiu/Rebol3/blob/master/protocols/prot-jdbcbridge.r | 29-Jun-10 5:03 |
| 2086 | Graham | db: open jdbcbridge://localhost insert db [{select * from staff where fullname = (?)} "Graham Chiu" ] >> print length? db 1 result: pick db 1 >> print length? db 0 close db db: open jdbcbridge://localhost:8000 insert db {select first 2 * from staff} >> print length? result 2 >> result: copy db >> print length? result 0 close db | 29-Jun-10 4:55 |
| 2085 | Graham | Hmm...but I get a close event if the server throws an exception | 29-Jun-10 3:45 |
| 2084 | Graham | Not sure what's happening here .. but my server closes the connection, and termintes the thread, but R3 is not getting a close event. | 29-Jun-10 3:20 |
| 2083 | NickA | I'm very happy to see this being done with R3 :) | 28-May-10 13:53 |
| 2082 | Anton | (DideC meant to thank Andreas.) | 28-May-10 7:21 |
| 2081 | DideC | Thank's Anton. Can be of some help. | 27-May-10 16:20 |
| 2080 | Anton | Ah, you just forgot the http header. | 27-May-10 14:26 |
| 2079 | Andreas | You might also want to have a look at: http://github.com/earl/rebol3/blob/master/scripts/shttpd.r | 26-May-10 17:59 |
| 2078 | NickA | great! | 26-May-10 15:19 |
| 2077 | DideC | REBOL [] print "Serving port 8080..." open-subport: func [port] [ print "=== Creating sub-port" port/awake: func [event /local port data] [ print ["=== Subport event:" event/type] port: event/port switch/default event/type [ read [ print [" " data: to-string port/data] data: replace/all data newline <br> write port to-binary rejoin ["HTTP/1.0 200 OK^/Content-type: text/html^/^/<html><head></head><body>" data "</body></html>" newline] ] wrote [ close port ] ] [false] ] read port ] server: open tcp://:8080 server/awake: func [event] [ print ["*** Server event:" event/type] if event/type = 'accept [ open-subport first event/port ] false ] wait 30 close server print "Done serving" halt | 26-May-10 14:36 |
| 2076 | DideC | Seems I have found my way to make it working : | 26-May-10 14:36 |
| 2075 | DideC | REBOL [] print "Serving port 8080..." open-subport: func [port] [ print "=== Creating sub-port" port/awake: func [event /local port] [ print ["=== Subport event:" event/type] port: event/port switch/default event/type [ read [ print [" " data: to-string port/data] write port to-binary rejoin ["<html><head></head><body>" data "</body></html>" newline] true ] wrote [read port] close [close port] ] [false] ] ] server: open tcp://:8080 server/awake: func [event] [ print ["*** Server event:" event/type] if event/type = 'accept [ open-subport first event/port ] false ] wait 30 close server print "Done serving" halt | 26-May-10 14:15 |
| 2074 | DideC | I want to build a very very very simple web server in R3.
I just want to be able to receive an HTTP request and send the response.
But me and Rebol networking are two differents people !! To begin, I just want to be able to display the full request in the response page. So far I have wrote this by peeking code in DocBase, but it does not work as I want : the browser stay awaiting the answer. Can one point me to what's wrong ? | 26-May-10 14:15 |
| 2073 | Brock | thanks for this Graham | 25-Apr-10 14:37 |
| 2072 | Graham | Updated Feb 21 http://github.com/gchiu/Rebol3/tree/master/protocols/ | 24-Apr-10 22:03 |
| 2071 | BrianH | I -> A | 21-Feb-10 20:14 |
| 2070 | BrianH | I client for R2, to be accessed through a CHAT mezzanine in R2. | 21-Feb-10 20:14 |
| 2069 | BrianH | For most people those distinctions don't matter, they can just call it chat. It matters to me because writing another DevBase client is on my immediate todo list. | 21-Feb-10 20:12 |
| 2068 | BrianH | So we have the datastore (DevBase), the server (DevBase server), a client (DevBase client) and the mezzanine wrapper (CHAT). | 21-Feb-10 20:11 |
| 2067 | BrianH | It's the only DevBase now. I just use the term to distinguish from CHAT, which is only a mezzanine that calls a DevBase client. Most people just call it chat. | 21-Feb-10 20:08 |
| 2066 | Graham | Ok, we need to be more explicit and refer to DevBase3 now | 21-Feb-10 20:06 |
| 2065 | BrianH | The first was written by Carl to do /View development, way back when, and never released (afaict). DevBase 2 was derived from that, and DevBase 3 was based on the lessons learned from 2. | 21-Feb-10 20:06 |
| 2064 | BrianH | Technically, the one accessed through CHAT is the third DevBase. The other two have been retired. | 21-Feb-10 20:03 |
| 2063 | Graham | So we now have two DevBases ? | 21-Feb-10 20:02 |
| 2062 | BrianH | Right. The http scheme is due for a major revamp. What we have is not really all that we want. | 21-Feb-10 20:02 |
| 2061 | Andreas | Ah, nevermind. Upon re-reading, I think I misunderstood your message. | 21-Feb-10 20:01 |
| 2060 | Andreas | Brian, I guess you are talking about changes that are also not yet in R3? | 21-Feb-10 20:00 |
| 2059 | BrianH | I haven't posted changes to the http protocol yet, sorry. | 21-Feb-10 19:56 |
| 2058 | BrianH | DevBase is the forum/filestore that you access withg the CHAT command in R3. | 21-Feb-10 19:55 |
| 2057 | Graham | Andreas and I did the same, doing a diff on the original prot-http and current and found no major changes. Suggest submit a bug report. | 21-Feb-10 19:01 |
| 2056 | ChristianE | Graham, all changes to the prot-http sources seems to be authored by Carl, I've seen no traces of changes to the protocol introduced by Brian. | 21-Feb-10 17:06 |
| 2055 | ChristianE | *pto-http = prot-http | 21-Feb-10 17:04 |
| 2054 | ChristianE | No luck even with older R3 versions; version 2.100.33.3.1 dating back to 2009-01-28 being the oldest I have around. | 21-Feb-10 17:04 |
| 2053 | ChristianE | I tried against Gabriele's original pto-http sources as from the *.rlp, not the *.r as touched by Carl. Only thing I changed was two replacements of THIRD with BODY-OF. | 21-Feb-10 16:59 |
| 2052 | ChristianE | That's my guess. | 21-Feb-10 16:57 |