# | User | Message | Date |
7480 | Terry | What we need now is a JQuery dialect for scripting the DOM.. never needed to pass back JSON, but push well formed JS | 13-Jan-10 9:42 |
7479 | Terry | Very simple, very cool. | 13-Jan-10 9:36 |
7478 | Terry | If you want to pull the value of a field for the first param.. <button onclick="ws.send('[{'+ $("#elementid).val(); +'} {} {isa} {person}]');return false;">GO</button> | 13-Jan-10 9:35 |
7477 | Terry | Here's an example piece of JS that passes the params to this ws-app <button onclick="ws.send('[{sofpandv} {} {isa} {person}]');return false;">GO</button> | 13-Jan-10 9:33 |
7476 | Terry | The "load copy data" was last nights work.. didn't care too much about anything else.. | 13-Jan-10 9:32 |
7475 | Terry | to lazy to clean it up | 13-Jan-10 9:30 |
7474 | Graham | how many copies do you need? | 13-Jan-10 9:30 |
7473 | Graham | why have you got data: copy data and then load copy data ? | 13-Jan-10 9:29 |
7472 | Terry | Here's a better version.. with basic error notification; on-message: func [client data][ ;-- escape all html tags for security concerns data: copy data replace/all data "<" "<" replace/all data ">" ">" params: load copy data do-task/on-done data func [client data][ if error? try[do load %test2.r][out: "alert('error with test2.r');"] broadcast out ] ] | 13-Jan-10 9:28 |
7471 | Terry | Now i can edit the test2.r script at will . Im guessing this is still non-blocking? | 13-Jan-10 9:16 |
7470 | Terry | test2.r looks like this; print params/1 out: "alert('ok');" | 13-Jan-10 9:15 |
7469 | Terry | This works in answer to my last questions.. on-message: func [client data][ ;-- escape all html tags for security concerns data: copy data replace/all data "<" "<" replace/all data ">" ">" params: load copy data do-task/on-done data func [client data][ n: do load %test2.r broadcast out ] ] | 13-Jan-10 9:15 |
7468 | Terry | Hey Doc, refreshing the page after every change to a ws-app is painful. Can't we just DO a script using do-task/on-done, put some error checking on the front end? So that the ws-app is just a handler of sorts as well. could then set up a timer/schduler.. and makes changes live.. that would make script development 10x faster. Refreshing to reload ws app is like a compiler. | 13-Jan-10 8:48 |
7467 | Dockimbel | Terry, there's a Javascript group for such topics. | 12-Jan-10 21:21 |
7466 | Terry | Jison: An API for creating parsers in JavaScript http://tinyurl.com/yeravlz | 12-Jan-10 20:27 |
7465 | Terry | That includes all the Atom db functions and data | 12-Jan-10 15:25 |
7464 | Terry | probably about 2/3rds :) | 12-Jan-10 15:23 |
7463 | BrianH | As opposed to RSP and Cheyenne files, I mean. | 12-Jan-10 8:31 |
7462 | BrianH | That is horrifically large by REBOL standards, but not bad by web standards. How much is images and other web stuff? | 12-Jan-10 8:27 |
7461 | Terry | I am a little concerned.. My entire cheyenne directory is rapidly approaching 2.5mb. | 12-Jan-10 8:22 |
7460 | Terry | nevermind | 12-Jan-10 6:16 |
7459 | Terry | Last issue is this.. n: [ one 'on' two 'tw'] n/one is returning on' (note the apos) What's up with that?? | 12-Jan-10 5:37 |
7458 | Terry | Ok got it.. the problem was this.. I have two fields, and to test, i only filled out one... so the string looked like so.. "[one 'on' two '']" (where the value following two is a pair of single quotes) So when i converted to a block, I got an INVALID WORD --'' error. But, using sockets, the error isn't reported... In other words, debugging is a pain. | 12-Jan-10 5:32 |
7457 | Terry | Looks like Cheyenne is my new serrogate home HA! | 12-Jan-10 5:26 |
7456 | Terry | ahh.. probe to the rescue (my rebol is so rusty.. if i add one more semi, or use ( instead of [ im going to barf. | 12-Jan-10 5:25 |
7455 | Terry | Now the problem is escaping the response? (I always send back JS for DOM scripting purposes) | 12-Jan-10 5:18 |
7454 | Terry | The block comes back as a string!
[one 'on' two 'tw'] But somehow it's getting encased in curlys or sumthin... so the best i can do is get a block like so x: [[one 'on' two 'tw']] | 12-Jan-10 5:17 |
7453 | PeterWood | r/one will only work if the data returned from ws includes the value one | 12-Jan-10 5:02 |
7452 | PeterWood | >> x/one
== 'on'
>> x/1
== one x/one is really a shortcut for select x 'one: >> select x 'one == 'on' | 12-Jan-10 5:01 |
7451 | PeterWood | Terry, are you mixing 1 and one ? | 12-Jan-10 4:59 |
7450 | Terry | I can't turn data into a block no matter what i try? | 12-Jan-10 4:53 |
7449 | Terry | Why does this work >> n: "one 'on' two 'tw'" == "one 'on' two 'tw'" >> x: to-block n == [one 'on' two 'tw'] >> x/one == 'on' but not this (data is from ws) r: to-block data r/one | 12-Jan-10 3:22 |
7448 | Terry | if you want the html... if(val== ''){val = $(this).html();} | 11-Jan-10 21:39 |
7447 | Terry | That function only deals with elements that have value attributes.. for pulling the content of, say a <p>, use this.. jQuery.each(arr, function(){ var val = $(this).val(); if(val== ''){val = $(this).text();} ...... | 11-Jan-10 21:38 |
7446 | Terry | oops.. missing / in closing script tag | 11-Jan-10 21:29 |
7445 | Terry | Here's some JS that takes an array of elements, and builds a block for passing to Rebol via WS <script> function toblock(arr){ var block = '['; jQuery.each(arr, function(){ var val = $(this).val(); var id = $(this).attr('id'); block = block+id+" '"+val+"' "; }); block = block+"]"; //remove, alert(block); }; <script> <input id="one" type="text" /> <input id="two" type="text" /> <button onclick="toblock([one, two]);">TEST</button> | 11-Jan-10 21:26 |
7444 | BrianH | Fortunately you can't create reference loops without DO, so if you stick to LOAD/all you should be fine. | 11-Jan-10 20:13 |
7443 | BrianH | It's great if the client won't primarily be a browser, as long as you stick to full dialects and never DO the code. | 11-Jan-10 20:07 |
7442 | BrianH | Not for web clients. You have to assume the client is hostile for web stuff, and screening REBOL data for malicious stuff is harder than parsing JSON data. The only way to be safe is to not transmit an executable dialect - full data dialect, reject anything bad. | 11-Jan-10 20:04 |
7441 | Terry | But, it is rebol friendly | 11-Jan-10 19:59 |
7440 | BrianH | It requires more security screening than JSON on the server side, and more work on the client side. | 11-Jan-10 19:58 |
7439 | Terry | Hmm, that could be very handy. | 11-Jan-10 19:56 |
7438 | BrianH | Not is you screen the data after loading and throw away all functions. | 11-Jan-10 19:50 |
7437 | Terry | any security issues? | 11-Jan-10 19:46 |
7436 | Terry | How about this.. passing a block via websocket as a data method? (not even sure if it would work), and loading it? ie: ws.send("[a 'one' b 'two]"); | 11-Jan-10 19:46 |
7435 | Dockimbel | Terry, sure, HTML5 opens up a new world for web applications, the gap with native apps is closing. | 11-Jan-10 18:40 |
7434 | Terry | else{golocalsql();} | 11-Jan-10 17:54 |
7433 | Terry | <script> var online = navigator.onLine if(online){var conn = new WebSocket("ws://localhost/ws.rsp")} </script> | 11-Jan-10 17:53 |
7432 | Terry | So, jump on a plane, update your Cheyenne data, store local, and sync via ws when back online :) | 11-Jan-10 17:49 |
7431 | Terry | Another handy html 5 api.. Web pages can determine if the client is online. (returns boolean) var online = navigator.onLine; alert(online); | 11-Jan-10 17:48 |
7430 | Terry | http://webkit.org/demos/sticky-notes/index.html | 11-Jan-10 17:23 |
7429 | Terry | P2P | 11-Jan-10 17:19 |
7428 | Dockimbel | WS doesn't give you access to local filesystem. | 11-Jan-10 17:18 |
7427 | Terry | Might even get away with partial file uploads, incrementals etc. | 11-Jan-10 17:18 |
7426 | Terry | Hmm, maybe not with WS? | 11-Jan-10 17:18 |
7425 | Dockimbel | Binary support / upload: these are 2 different things. Uploading files (access to local filesystem) still requires FORM with multipart/form-data encoding. | 11-Jan-10 17:17 |
7424 | Terry | BTW, the typo wasn't in the config file, but in my ws app, If one app doesn't work, should the whole server come down? | 11-Jan-10 17:17 |
7423 | Terry | Even non-form elements can be used.. <p id="myparagraph" onchange="ws.send(this.text);"> Lorem ipsum </p> | 11-Jan-10 17:15 |
7422 | Terry | There's a blur with websockets.. traditional usage takes a form, serialize and send to the server as a associative array in the url.. With sockets, that's not necessary.
Forms are becoming less relevant.. As individual fields can do their own thing.. <input type="text" onblur="ws.send(this.val());"> | 11-Jan-10 17:10 |
7421 | Terry | I guess the binary support would go hand in hand with your new upload script? | 11-Jan-10 16:52 |
7420 | Terry | JSON was my first thought.. but I think I'll build a custom "data format" using triples to keep inline with the back end.. still thinking about it. | 11-Jan-10 16:43 |
7419 | Dockimbel | SVN r61 FEAT: added request/store function to help manage uploaded files (see %changelog.txt). FIX: IE issue with upload.html (cache issue). Works ok in IE now. DOC: upload API documented in %www/upload.html. | 11-Jan-10 16:15 |
7418 | Dockimbel | IE issue fixed with upload.html. It wasn't a settimeout( ) issue, it was a IE caching all the AJAX responses. | 11-Jan-10 14:48 |
7417 | Dockimbel | Btw, keep in mind that defining a "standard" protocol above web sockets goes against its primary purpose : provide a general purpose packet-oriented communication channel. It would be like defining a "standard" protocol above TCP. For practical usage with JS clients, JSON data format is the way to go. Don't forget that the web socket implementation in Cheyenne is partial, only TEXT frames are supported currently. I could add the binary support also, but I don't have a need for that for now. If someone has a *real* need for that, let me know. | 11-Jan-10 12:00 |
7416 | Dockimbel | Typos errors in config file should be caught, what kind of typo was that? | 11-Jan-10 10:06 |
7415 | Dockimbel | take the reb-services dialecting approach and format it in JSON ;-) | 11-Jan-10 10:04 |
7414 | Dockimbel | standard protocol for sockets : JSON. | 11-Jan-10 10:02 |
7413 | Dockimbel | mod-upload: it was missing, it's in the repository now. | 11-Jan-10 10:02 |
7412 | Terry | Doc, any thoughts on a standard protcol for sockets? xml? | 11-Jan-10 6:23 |
7411 | Terry | I'm curious as to lag around the world (should add geocaching i suppose) | 11-Jan-10 5:03 |
7410 | Terry | Working on some websocket experiments..
http://shinyrockets.com/exper.html - simple canvas game... Losing the game publishes the fail , ip and port to everybody. | 11-Jan-10 5:02 |
7409 | Terry | should have some default error trapping for socket-apps in the http.cfg file, no? One typo brings the whole server down. | 11-Jan-10 4:57 |
7408 | Terry | After updating the SVN, I get a id: 'cannot-open arg1: "/c/websock2/Cheyenne/mods/mod-upload.r" and the file is not there. | 11-Jan-10 4:46 |
7407 | Dockimbel | 10 Mbps => 10MB | 10-Jan-10 20:58 |
7406 | Dockimbel | This mod-upload version is unsuitable for production yet, the upload tokens on server are not garbage-collected. | 10-Jan-10 20:51 |
7405 | Dockimbel | If you're testing the upload demo locally, be sure to pick a file big enough (at least 10 Mbps). Don't worry about uploaded files, the target script (show.rsp) doesn't save them, so the server's copy will be deleted as soon as the upload is finished. | 10-Jan-10 20:47 |
7404 | Dockimbel | Help would be appreciated to solve or workaround the setTimeout() issue with IE. | 10-Jan-10 20:43 |
7403 | Dockimbel | SVN r59 : experimental mod-upload released. This new mod adds server-side API for querying realtime progress info on uploaded files. See the demo : http://localhost/upload.html (not commented yet). Current restrictions: - works only when posting one file at a time in a given <form>. - can't make it work for IE (IE seems to have an issue with setTimeout( ) method). | 10-Jan-10 20:42 |
7402 | Terry | I used flash as an application framework for an engineering co once.. one of the biggest mistakes of my career. | 10-Jan-10 17:24 |
7401 | Terry | raisin | 10-Jan-10 17:19 |
7400 | Dockimbel | rising | 10-Jan-10 10:48 |
7399 | Dockimbel | Maybe Flash usage for sockets, animations, games and videos might start dropping soon, but as an application framework engine, its usage keeps raising. | 10-Jan-10 10:46 |
7398 | Dockimbel | ActionScript, which is Flex's programming language is now in #19 in Tiobe's index. | 10-Jan-10 10:37 |
7397 | Dockimbel | "who's interested to do real apps in Flash?" http://www.adobe.com/products/flex/buzz/customers/list.html | 10-Jan-10 10:32 |
7396 | Dockimbel | "Flash might move to RIA" : it's already done, it's called "Flex". | 10-Jan-10 10:30 |
7395 | Pekr | Flash might move to RIA (but who's interested to do real apps in Flash?) or - many mp3 etc vendors are doing their UI using flash. As for html 5, we are still talking vapor, unless it is supported by most browsers, which are used by most ppl IE still has 62% of share, and IIRC CSS3 and HTML5 are going to be supported in IE9. How long do you think will it take to replace those 60% of IEs out there by IE9? Well ... I know what you are trying to say ... it is inevitable ... but ... not yet, not yet :-) .... this probably belongs to advocacy though .... | 10-Jan-10 10:24 |
7394 | Terry | I think it's official.. Flash is dead. I was modifying some flash xmlsocket based apps to work with Cheyenne websockets, and then realized, why bother? I can do it all with HTML 5 HTML 5 has.. CANVAS AND VIDEO http://www.youtube.com/watch?v=Kdf0x8am1cg&feature=player_embedded# chroma key effect. http://www.youtube.com/watch?v=ZN_r9jxL0-A&feature=player_embedded LOCAL STORAGE Chrome has SQLite built in, accessible via JS | 10-Jan-10 9:46 |
7393 | Terry | Hmm, the last person to run the atom demo had a 6971.28.. second 'round trip' .. wonder what happened there? | 9-Jan-10 19:28 |
7392 | Terry | Doc, Flash's core strength (animation) is quickly evaporating. | 9-Jan-10 19:25 |
7391 | Terry | Flash would be the best way to interface with older browsers via sockets.
JQuery <=> Flash <=> Cheyenne Although it's not necessary, I only push Javascript back to the DOM manipulation. (Hence the need for a JS dialect.. specifically JQuery) | 9-Jan-10 19:24 |
7390 | Janko | I think not, older brosers only have xmlhttp (ajax) option, iframes and other comet like tricks but they can't do a socket .. I haven't seen what js.io does.. if you wanted to make a "pure" html chat without comet or polling you made JS that talked to invisible 1px flash and flash has XMLSocket or something like that. But I heard recently that it can be used for other things than xml .. | 9-Jan-10 15:44 |
7389 | Kaj | The only way I've heard of to do WebSocket in older browsers (almost all of them right now) is the Flash implementation | 9-Jan-10 15:43 |
7388 | Kaj | I hoped so at first, but it seems to be a different system | 9-Jan-10 15:42 |
7387 | Dockimbel | Can't older browsers use some JS layer simulating web sockets like js.io library? | 9-Jan-10 15:36 |
7386 | Kaj | Unless we need Flash to get at web sockets from older browsers | 9-Jan-10 15:25 |
7385 | Dockimbel | Terry: interesting links, so we might get rid of flash soon, no? | 9-Jan-10 12:21 |
7384 | Dockimbel | Janko: I have in my todo list a full virtual system to add to Cheyenne allowing embedding webapps in a encapped Cheyenne. It can be done by replacing every filesystem accessing functions (DO, LOAD, READ, WRITE,...) by custom ones getting files from memory. The hard part is to integrate such approach within Cheyenne preserving perfomances for normal filesystem accesses while avoiding redundant code, this needs time for designing and prototyping. I can't see an easy way to protect you webapps right now, but maybe other might have found a way to do that? | 9-Jan-10 12:19 |
7383 | Janko | I am usually for not complicating with this but this webapp is of classical competetive scene as will also still run as online service so I want to prevent that competitors could too easily study it , find any possible weaknessess etc... | 9-Jan-10 11:10 |
7382 | Janko | What woudl be the best way to do some casual source code protection of cheyenne webapp if you want to distributte it as a "download and install" option. I guess I could make some sort of code obfuscator that would change the names to something without meaning, is there anything better one could do? | 9-Jan-10 11:07 |
7381 | Terry | A couple lines of code and you could create a live chart displaying the various times folks are getting, including geo location etc | 9-Jan-10 10:07 |
7380 | Terry | Funny thing is, if your "ATOMDB Query time:" changes randomly? That means someone else is running the test, and their results are being broadcast to your browser. HOW COOL IS THAT! | 9-Jan-10 10:05 |
7379 | Terry | Font used is DroidSans.. can download for free from -> http://www.fontsquirrel.com/fonts/Droid-Sans | 9-Jan-10 9:38 |
7378 | Terry | Demo includes; - websocket roundtrip timer - ATOMDB query timer - Example of changing a graphic when socket is closed. - Font-face demo (another HTML 5 feature that allows ANY font in a webpage .. see the <style> on the page | 9-Jan-10 9:37 |
7377 | Terry | WS to AtomDB demo http://shinyrockets.com/atom.html | 9-Jan-10 7:58 |
7376 | Terry | Try it on Chrome.. much faster. | 9-Jan-10 0:42 |
7375 | Kaj | Hm, those last two work fairly well on my ancient Firefox 1.5 | 9-Jan-10 0:41 |
7374 | Terry | Now THIS is very cool use of CANVAS http://www.universaloscillation.com/chrome/popups/ | 9-Jan-10 0:37 |
7373 | Gregg | Indeed. Thanks here too. | 9-Jan-10 0:34 |
7372 | Terry | Another.. try shaking the browser http://mrdoob.com/projects/chromeexperiments/ball_pool/ | 9-Jan-10 0:33 |
7371 | Kaj | Thanks for the links, Terry. Busy bookmarking here | 9-Jan-10 0:33 |
7370 | Gregg | Isn't that Doc's old v-balls demo? ;-) | 9-Jan-10 0:31 |
7369 | Terry | This one is nice http://www.chromeexperiments.com/detail/depth-of-field/ | 9-Jan-10 0:26 |
7368 | Terry | Yeah, Doc.. was hoping for a condensed version seeing as you've done the whole learning curve. | 9-Jan-10 0:03 |
7367 | Terry | Will try some experiments using Canvas and websockets.. here's some great examples http://www.chromeexperiments.com/ | 9-Jan-10 0:01 |
7366 | Dockimbel | Web socket protocol is fully described here : http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol Quick protocol overview : http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-68#section-1.2 | 8-Jan-10 23:20 |
7365 | Terry | I haven't heard a single sheep all day? No one is trying the demo :) | 8-Jan-10 22:55 |
7364 | Terry | Doc, Im going to develop some rebol and flash apps that connect to Cheyenne via the websocket. What is the procedure for the handshaking? | 8-Jan-10 21:05 |
7363 | Dockimbel | Hit F5 several times, it should always answer ok if Cheyenne is running with -w 0. | 8-Jan-10 12:40 |
7362 | Dockimbel | Try testing with this script : <% either value? 'azerty [ print "debug mode not working" ][ print "debug mode is working ok" set 'azerty 1 ] %> | 8-Jan-10 12:39 |
7361 | Dockimbel | 0.9.19 binary works ok here in -w 0 debug mode. | 8-Jan-10 12:38 |
7360 | Janko | maybe I should better explain what I am doing so I won't steal your time here (and it's no problem basically as I will turn all global words that are only locally needed to something else) .. it's bad coding practica anyway | 8-Jan-10 12:00 |
7359 | Janko | I tried cheyenne -vv -w 0 ; and now cheyenne - w 0 .. with same result | 8-Jan-10 12:00 |
7358 | Dockimbel | It's : - w 0, -w only won't work, it expects the number of worker processes as argument. It should work ok with both source and binary version. I'll make a test right know with 0.9.19 binary... | 8-Jan-10 11:56 |
7357 | Janko | 1) I tried -w before (I remembered you hinted me the last time to use it to always reload) but it didn't make the difference in this case (as far as I can tell).. does -w only work with source discributtions? | 8-Jan-10 11:44 |
7356 | Dockimbel | Btw, since 0.9.19, the RSP engine tries to catch all words defined in RSP scripts but outside of a local context in a hidden webapp context (one per worker process). | 8-Jan-10 11:42 |
7355 | Dockimbel | 1) I use -w 0 daily, works ok here. 2) see the solution in Core group. | 8-Jan-10 11:38 |
7354 | Janko | one solution is also that I define all words local to pageload in some object that is cleared on each pageload probably | 8-Jan-10 10:55 |
7353 | Janko | I just found out about a bug I was making and could only be discovered when cheyenne was first started, because some word was undefined then so it triggered an error, if I did some other things I couldn't see it but it would return wrong information in reality .. 1. is there any way maybe that would make cheyenne "reset" each request (for debugging & testing purposes, not production) .. the -w option seems not to do this. this could probebly be solved by wrapping also those parts in functions ... another question.. 2. Is there any way I could see all globals I created so I could find wtich ones I "leaked" unintentionally .. it would be very helpfull if rebol could let you define functs that would warn you if you used or defined any global words | 8-Jan-10 10:43 |
7352 | Terry | I guess you can check out the 'console' after hitting CTRL - SHIFT - i .. check for errors | 8-Jan-10 10:20 |
7351 | amacleod | yes | 8-Jan-10 10:18 |
7350 | amacleod | thats weird | 8-Jan-10 10:18 |
7349 | Terry | volume up.. all that stuff? | 8-Jan-10 10:18 |
7348 | Terry | it's playing here when you click it | 8-Jan-10 10:18 |
7347 | amacleod | Still no sound...even when clicking the button | 8-Jan-10 10:17 |
7346 | Terry | i can hear it :) | 8-Jan-10 10:16 |
7345 | Terry | there ya go | 8-Jan-10 10:16 |
7344 | amacleod | yes | 8-Jan-10 10:16 |
7343 | Terry | Did you click the button? | 8-Jan-10 10:16 |
7342 | amacleod | yes | 8-Jan-10 10:16 |
7341 | Terry | can you get this? http://upload.wikimedia.org/wikipedia/commons/3/39/Brummdose.ogg | 8-Jan-10 10:15 |
7340 | Terry | works fine here. | 8-Jan-10 10:15 |
7339 | Terry | hmm | 8-Jan-10 10:13 |
7338 | amacleod | Not getting any sound, Terry.. using chrome4 | 8-Jan-10 10:13 |
7337 | Terry | Uses the HTML 5 <audio> tag. Non-blocking. Open up 4 or 5 tabs and you get a flock :) | 8-Jan-10 10:12 |
7336 | Terry | Demo.. pushing sound to all ports http://shinyrockets.com/echo.html | 8-Jan-10 10:11 |
7335 | Terry | Here's some code that uses flash as a websocket proxy for browsers that don't support websockets
http://github.com/gimite/web-socket-js Needs some tweaking, particularly with ports. | 8-Jan-10 7:36 |
7334 | Terry | Nope, wrong again.. workers are fine in Chrome.. that last demo only works with FF Here's some other demos on Resig's page http://ejohn.org/blog/web-workers/ | 7-Jan-10 23:35 |
7333 | Terry | Hmm, maybe Chrome 4 isn't there yet after all? | 7-Jan-10 23:07 |
7332 | Terry | Need to try an experiment where a worker thread sends an AJAX request to an RSP page, which in turns pushes back via websocket :) | 7-Jan-10 22:47 |
7331 | Maxim | that is nice! | 7-Jan-10 22:45 |
7330 | Terry | Here's a great webworker article / demo http://blog.mozbox.org/post/2009/04/10/Web-Workers-in-action | 7-Jan-10 22:45 |
7329 | Terry | Speaking of threads.. Along with Websockets, HTML 5 comes with Webworkers (supported by Chrome as well) "Workers provide a simple means for web content to run scripts in background threads. Once created, a worker can send messages to the spawning task by posting messages to an event handler specified by the creator. The worker thread can perform tasks without interfering with the user interface. In addition, they can perform I/O using XMLHttpRequest (although the responseXML and channel attributes are always null). The Worker interface spawns real OS-level threads, and concurrency can cause interesting effects in your code if you aren't careful." https://developer.mozilla.org/En/Using_web_workers | 7-Jan-10 22:44 |
7328 | Graham | Amazon allows you free db storage in multiple redundant locations | 7-Jan-10 20:57 |
7327 | TomBon | I am using both, slicehost and linode since a year now.
very good virtualisation with both of them. flash, mysql
very stable, even a big mysql-server with only 384mb ram
is running fine. linode has a better control panel,
slicehost feels a little faster. there is also another candidate for virt-hosting. gandi, located in france if somebody likes europe :-) scalable via virt-shares. https://www.gandi.net/hosting | 7-Jan-10 20:44 |
7326 | Maxim | With linode you can actually do fancy multi-host redundancy stuff or auto reboot on some conditions, etc. their control panel is also extremely well made. you can setup your server (out a good variety of POSIX OSes) in a matter of minutes. | 7-Jan-10 20:05 |
7325 | Terry | Carl, you have any thoughts on websockets? | 7-Jan-10 19:32 |
7324 | Terry | Hey, its 2010.. where's my flying car they promised back in the 60's? | 7-Jan-10 19:31 |
7323 | Carl | T: yep. Blast from the past. | 7-Jan-10 19:30 |
7322 | Graham | but costs a little more. | 7-Jan-10 19:22 |
7321 | Graham | Much more flexible I suspect than Linode or Slicehost | 7-Jan-10 19:22 |
7320 | Terry | CGI proxy? They still make that stuff ;) | 7-Jan-10 19:22 |
7319 | Graham | So, you can test for a couple of hours and then quit. Want to run a windows 2003 or 2008 server to test? Start them up and pay 12 c an h our. | 7-Jan-10 19:22 |
7318 | Graham | Amazon charge only for uptime .. at 8c an hour. | 7-Jan-10 19:21 |
7317 | Carl | (It pipes all R3 Chat connections via a CGI proxy.) | 7-Jan-10 19:20 |
7316 | Carl | I'd be quite interested in testing R3 Chat on Cheyenne. Right now, it must drive the rebol.net server crazy on CGI. | 7-Jan-10 19:20 |
7315 | Henrik | Dockimbel, yep, nice and stable. Love it. | 7-Jan-10 19:19 |
7314 | Carl | H: This AltME world runs from a different provider (via rebol.net), so is not typical. | 7-Jan-10 19:19 |
7313 | Henrik | Carl, all I can say is that I've had much fewer connection dropouts with my Linode than what I observe through AltME. It may not reflect your situation, but it just looks far more stable to me. Also you can specify where you want your server placed, and so have multiple accounts in different physical locations. | 7-Jan-10 19:17 |
7312 | Graham | I'm hosting 5 virtual sites on mine using Cheyenne ... | 7-Jan-10 19:17 |
7311 | Dockimbel | Henrik: nice! | 7-Jan-10 19:16 |
7310 | Graham | My site on EC2 is private .. http://gchiu.no-ip.biz:8000/ | 7-Jan-10 19:16 |
7309 | Carl | G: all. | 7-Jan-10 19:14 |
7308 | Carl | H: cool. Cheyenne. | 7-Jan-10 19:14 |
7307 | Graham | or IOS? | 7-Jan-10 19:14 |
7306 | Graham | Is this for altme? | 7-Jan-10 19:14 |
7305 | Carl | Frankly, the biggest problem I have is long lags/dropouts on connection times. | 7-Jan-10 19:13 |
7304 | Henrik | Carl, I already do. You can see my site at: http://97.107.135.89/www.hmkdesign.dk/project.rsp?id=vid-ext-kit&page=info | 7-Jan-10 19:13 |
7303 | Graham | moving to ~science | 7-Jan-10 19:13 |
7302 | Carl | Question: what about connect latency? | 7-Jan-10 19:13 |
7301 | Terry | Forget all that.. think WEBSOCKETS! | 7-Jan-10 19:13 |
7300 | Graham | $300 vs linode of $240 pa. | 7-Jan-10 19:13 |
7299 | Carl | P: yes, move to other group. I will respond. | 7-Jan-10 19:13 |
7298 | Pekr | maybe we should move out of this group? | 7-Jan-10 19:12 |
7297 | Graham | Amazon is Small Instance (Default) 1.7 GB of memory, 1 EC2 Compute Unit (1 virtual core with 1 EC2 Compute Unit), 160 GB of local instance storage, 32-bit platform If you commit to a 3 year term it is only $300 per year | 7-Jan-10 19:12 |
7296 | Pekr | Carl - how goes rebol.com redesign? Do you have any gfx proposals already? | 7-Jan-10 19:12 |
7295 | Carl | This is quite interesting, esp if we can run REBOL as the primary services. | 7-Jan-10 19:12 |
7294 | Henrik | well, go ahead :-) redundancy is good. | 7-Jan-10 19:12 |
7293 | Carl | If can cancel anytime, then why not try both? | 7-Jan-10 19:11 |
7292 | Henrik | I chose Linode, because they offer a bit more for the same money. But it's probably a matter of taste. | 7-Jan-10 19:11 |
7291 | Carl | This actually looks pretty good. I was leaning toward Amazon... but... | 7-Jan-10 19:10 |
7290 | Henrik | and you can cancel at any time, if you don't like it. | 7-Jan-10 19:10 |
7289 | Carl | lol, Slicehost.com: "No contracts, no setup fees." | 7-Jan-10 19:10 |
7288 | Carl | If so, 384MB is fine. chop chop | 7-Jan-10 19:09 |
7287 | Carl | Do they allow you to custom config? | 7-Jan-10 19:09 |
7286 | Henrik | The only gripe I have is not much RAM (384 MB), but still for 20 bucks/month. As a side effect, I use it now for IRC and other minor services, like makedoc and some source hosting. | 7-Jan-10 19:08 |
7285 | Graham | And yes, you can listen on what you like... you define the firewall settings | 7-Jan-10 19:07 |
7284 | Graham | You can save images of your entire site and just restart from that. | 7-Jan-10 19:07 |
7283 | Graham | I use Amazon EC2 and it's reliable to a point .. if it goes down I just start another instance ... and in 6 months, I've only had to do that once. | 7-Jan-10 19:06 |
7282 | Henrik | I had one breakdown for some hours, but their response was very detailed. I use Linode. As I understand it, Slicehost were recently purchased by Rackspace (buyouts = alarm bells). | 7-Jan-10 19:06 |
7281 | Carl | So, Do they let me listen on any ports? | 7-Jan-10 19:06 |
7280 | Carl | If truly virtual, and good performance, that's a good place to checkout. | 7-Jan-10 19:05 |
7279 | Henrik | So I can finally run Cheyenne on a high bandwidth server. | 7-Jan-10 19:05 |
7278 | Carl | G, H: really. So, are they fast and reliable? | 7-Jan-10 19:05 |
7277 | Henrik | Slicehost and Linode run virtual servers. So you don't have to setup your own box. Very nice. | 7-Jan-10 19:05 |
7276 | Graham | Linode is similar .. Amazon is more expensive ... | 7-Jan-10 19:04 |
7275 | Carl | G: well, those were different days. | 7-Jan-10 19:04 |
7274 | Graham | Choose your own distro ... and install it. | 7-Jan-10 19:04 |
7273 | Graham | C: you can do pretty much what you want apart from hosting adult content | 7-Jan-10 19:04 |
7272 | Carl | H: problem is, no provider is going to let you install it. | 7-Jan-10 19:03 |
7271 | Graham | And he's come back to tell you this?? :) | 7-Jan-10 19:03 |
7270 | Carl | G: slicehost allows running your own server?? | 7-Jan-10 19:03 |
7269 | Henrik | I assume an R3 apache mod would not be far away, possiblity wise? | 7-Jan-10 19:03 |
7268 | Carl | But, I felt it was a kludge back in 2000.... however I think Jeff K was right. | 7-Jan-10 19:03 |
7267 | Terry | Hmm, that would have been interesting. | 7-Jan-10 19:03 |
7266 | Carl | Last week, when reviewing the R2 build... I finally had a regret that we never released the apache mod for R2. | 7-Jan-10 19:02 |
7265 | Graham | slicehost is $10 or $20 a month | 7-Jan-10 19:02 |
7264 | Carl | Reason is, if you don't want to use Php, and you want economies of large hosting providers, that's your main choice. Else, Perl. <gag> | 7-Jan-10 19:01 |
7263 | Carl | H: yes, it's a bit odd. I thought CGI was dead 8 years ago.... but then, NO. | 7-Jan-10 19:01 |
7262 | Carl | G: It runs on a large hosted provider. | 7-Jan-10 18:59 |
7261 | Henrik | I call it "why didn't we have this 10 years ago". | 7-Jan-10 18:59 |
7260 | Pekr | what Terry tries to say imo is, that nowadays the web proceeded, and it is much more dynamic, so that even RSP sounds old-school ... | 7-Jan-10 18:59 |
7259 | Graham | Why aren't you using Cheyenne for rebol.com ? | 7-Jan-10 18:59 |
7258 | Carl | I would call this "design refactoring" ... a high level form of "code refactoring". | 7-Jan-10 18:58 |
7257 | Carl | As I wrap up WIP3 for the current website redo, it seems a bit odd that each time, the WIP system gets smaller and better. | 7-Jan-10 18:58 |
7256 | Carl | Hi guys. Yes, you really can divide the scripting needs into just a few primary categories. | 7-Jan-10 18:57 |
7255 | Terry | I don't like page refreshing.. should trigger an event, and all the elments fade out, and new ones fade in. You can do this kind of stuff with AJAX, and even more so now with WS | 7-Jan-10 18:56 |
7254 | Terry | RSP is fine, but I just don't like the whole 'preprocessor ' approach.. it's too 1995 | 7-Jan-10 18:55 |
7253 | Terry | So, to copy this method into Cheyenne websockets, i need to 'DO' .r scripts.. not rsp. | 7-Jan-10 18:53 |
7252 | Terry | BTW.. i use PHP as a language, not for it's "Hypertext preprocess" ... 85% of my php has no html in it at all. Mainly use PHP to receive and process AJAX form requests | 7-Jan-10 18:52 |
7251 | Dockimbel | Still needs an improved virtual filesystem to easily run RSP web apps from memory, but for custom embedded REBOL apps, it should work ok. | 7-Jan-10 18:45 |
7250 | Terry | Yeah, my stuff is all using the embedded feature.. very nice. | 7-Jan-10 18:43 |
7249 | Dockimbel | To start addressing these markets, I need a 1.0 Cheyenne (means finish some features + units tests + full docs). | 7-Jan-10 18:42 |
7248 | Terry | Write some simple docs outlining websockets, and I'll get you to 50K in a month. | 7-Jan-10 18:41 |
7247 | Dockimbel | Btw, the target market that was at the origin of Cheyenne project was home web servers, both for local and external use (serving files and apps from your home connection). The main feature was supposed to be simplicity of use through a very simple, but powerful control panel, and on-demand app loading (something like App Store, but for web apps). Another market that we've thought about was portable embedded web apps (server + apps bundled in a single exe with 0 install, 0 config). | 7-Jan-10 18:41 |
7246 | Dockimbel | That's the plan once Cheyenne reaches 100K users. ;-) | 7-Jan-10 18:36 |
7245 | Terry | Or maybe GPL and commercial | 7-Jan-10 18:35 |
7244 | Terry | One BSD, the other commercial | 7-Jan-10 18:34 |
7243 | Terry | You should probably dual license Cheyenne. | 7-Jan-10 18:33 |
7242 | Terry | Cheyenne OS | 7-Jan-10 18:31 |
7241 | Terry | There ya go.. | 7-Jan-10 18:31 |
7240 | Dockimbel | "Cheyenne Scripting Language", sounds good. ;-) | 7-Jan-10 18:31 |
7239 | Terry | The desktop is dead, unless you're building a better browser, or games.. and even that distinction is blurring. I'll bet people play more online browser based games than desktop.. Folks have moved from desktop to console. | 7-Jan-10 18:31 |
7238 | Dockimbel | From a purely marketing POV, that might make sense. ;-) | 7-Jan-10 18:30 |
7237 | Terry | In my books, Rebol should change it's name to Cheyenne. | 7-Jan-10 18:29 |
7236 | Dockimbel | It's not a matter for me to favor REBOL against PHP for builting apps (everyone is free to choose), but just that there are better tools to run PHP code than Cheyenne. OTOH, I'm not sure there's better choice currently than Cheyenne to run REBOL web apps. | 7-Jan-10 18:28 |
7235 | Terry | The other option is to build a higher level dialect of some sort. Even developers would switch if the switch was dead simple. | 7-Jan-10 18:26 |
7234 | Dockimbel | Terry, the point is that if you want to make PHP apps, you should better stick with another web server more adequate to PHP like Apache or Lightttpd. Cheyenne's PHP support has been done mainly to be able to integrate existing PHP apps in REBOL powered web sites, not build new ones. | 7-Jan-10 18:24 |
7233 | Terry | Überchat | 7-Jan-10 18:23 |
7232 | Terry | Now all you need to do is come up with the killer app :) | 7-Jan-10 18:22 |
7231 | Terry | Ruby on Rails looks interesting, but not interesting enough for me to spend more than an hour 'playing' with it. BUT.. if RoR built some killer app that let me config it, I would take the time. | 7-Jan-10 18:21 |
7230 | Terry | I plan on making my apps in Rebol, but 99.99999% of the developer world won't be so 'inspired'. You may get away with it if you can build a killer app, which may very well happen now. Otherwise, it will be a hobby, like Rebol. | 7-Jan-10 18:18 |
7229 | Dockimbel | That may be possible, but would be more complicated to support than web sockets as the server can't send data without getting a request. It will be hard to extend the web socket application framework without bloating it. Maybe a separated mod-comet would be a cleaner approach (but might duplicate a Iot of code in mod-socket). I will give it a look anyway, at least to estimate the time required to support it. | 7-Jan-10 18:18 |
7228 | Kaj | Doesn't have to be perfect, just facilitate a migration period for older browsers | 7-Jan-10 17:57 |
7227 | Kaj | To that end, any chance you could extend your WebSocket framework with a somewhat similar Comet-like functionality for older browsers, that only uses Ajax? | 7-Jan-10 17:56 |
7226 | Dockimbel | PHP connection: it should be possible with minimal modifications, but why would you want that? Is there any significant PHP socket app yet ready to use? My goal in adding web sockets early in Cheyenne is to push developers to make nice apps in REBOL, not PHP. | 7-Jan-10 17:46 |
7225 | Dockimbel | Socket apps folder automatic loading : you still need to specify the mapping between URL and socket app, no ? | 7-Jan-10 17:42 |
7224 | Terry | All in all doc, cheyenne sockets are very impressive. Couple of suggestions.. - Have a folder specifically for socket-apps that automatically get loaded into the http.conf file.. - Create a connection through PHP (if possible.. otherwise can just proxy, but adds lag) | 7-Jan-10 17:31 |
7223 | Terry | Yeah, in Chrome, hit CTRL-SHIFT- i | 7-Jan-10 17:25 |
7222 | Terry | That chat.html I made was a quick hack of yours. Need to build proper cookie mgmt functions.. deal with sessions etc. | 7-Jan-10 17:24 |
7221 | Pekr | Does Chrome have anything like FireBug or WebDeveloper extension in FF? | 7-Jan-10 17:23 |
7220 | Terry | Doc, i was referring to my modified chat.html regarding the 'signout' issue. | 7-Jan-10 17:22 |
7219 | Terry | Ahh.. shift-reload to clear cache, and nice debugging/developer tools.. Chrome is well thought out. | 7-Jan-10 17:21 |
7218 | Dockimbel | I'm not sure for Chrome, isn't F5 a simple page reload (without clearing the cache)? | 7-Jan-10 14:30 |
7217 | Pekr | Shift + Reload (I am used to it) = F5 btw .... | 7-Jan-10 14:24 |
7216 | Dockimbel | Btw, you may need to Shift+Reload in Chrome to get the latest chat code. | 7-Jan-10 14:23 |
7215 | Dockimbel | Cookies: well, it would be a nice addition to a real chat app, but the point in this demo is to show web socket usage, not to build a full-featured chat app. If you want to build a full chat app, you're free to take my demo code and extend it as far as you wish. | 7-Jan-10 13:24 |
7214 | Dockimbel | I've opened 2 Chrome windows logged in the online chat demo from both of them and I receive correctly in the first window the quit message from the second one. How can I reproduce your issue? | 7-Jan-10 13:19 |
7213 | Terry | No cookies? I like cookies. | 6-Jan-10 23:49 |
7212 | Terry | Need to fix the 'signout' updates to other ports.. it's not sending the "bob leaves" message, and it's not updating the user list <div> | 6-Jan-10 23:43 |
7211 | Dockimbel | Thanks Terry, I've upgraded the chat demo with most of your changes. I've also included an alert message for non-compliant web browsers. | 6-Jan-10 23:10 |
7210 | Terry | Updated version of Doc's chat example..
- Enter key support for login and posting chats
- Cookie mgmt for user name
- various "tweaks" to the JQuery chat2.html: http://pastebin.com/m66a38d50 | 6-Jan-10 21:31 |
7209 | Terry | Add this to the $(document).ready(function(){ ... } in chat to submit chats using the enter key; $("input").keypress(function (e) { if (e.which == 13 ) { ws.send('m' + user + ': ' + $("[name=post]").val()); $("[name=post]").val(''); $("[name=post]").focus(); } }); | 6-Jan-10 17:10 |
7208 | Terry | Chrome has a great JS debugging tool.. In the icon on the top left that looks like a page, open developer -> Javascript console | 6-Jan-10 16:34 |
7207 | Dockimbel | Turning off DNS prefetching is explained here : http://jackkonblog.blogspot.com/2009/03/turn-off-dns-pre-fetching-in-google.html | 6-Jan-10 16:00 |
7206 | Terry | You don't say that to your patients as well, i hope ;) | 6-Jan-10 15:58 |
7205 | Terry | Hmm, maybe programming isn't your forte. | 6-Jan-10 15:57 |
7204 | Graham | Terry .. I gave up | 6-Jan-10 4:05 |
7203 | Terry | Graham, did you shut off the Chrome dns prefetching? | 6-Jan-10 3:55 |
7202 | Terry | Brian, I'm comparing with Altme only.. Desktop vs client/server is a whole other argument. | 6-Jan-10 3:54 |
7201 | BrianH | Server-side web stuff is fun though. | 6-Jan-10 0:46 |
7200 | BrianH | Must be just me, I guess., | 6-Jan-10 0:45 |
7199 | BrianH | I like some of the stuff on that list, but I like doing it better without HTML/JS/CSS. | 6-Jan-10 0:45 |
7198 | BrianH | It's funny, Terry, but I keep agreeing with your sarcastic list once I filter out the stuff that I can do easier without a web browser, or that aren't necessary at all when you aren't using one. | 6-Jan-10 0:44 |
7197 | Graham | I'd ask Terry to write it for Cheyenne... but I suspect that we'll never be able to reach it because of dns issues! | 6-Jan-10 0:39 |
7196 | Terry | and some sound js lib as well | 6-Jan-10 0:37 |
7195 | Terry | I have a hotkey javascript library I'll hook up. | 6-Jan-10 0:36 |
7194 | Kaj | Web chat it will be | 6-Jan-10 0:34 |
7193 | Graham | And hacking of php ... yep | 6-Jan-10 0:24 |
7192 | Terry | ... integrating Processing... http://processingjs.org/exhibition | 6-Jan-10 0:24 |
7191 | Terry | ... CSS, database access, acting as a proxy to servers, JQuery, Google map integration, Amazon S3, OpenID, AtomAPI and other RSS integration, Delicious... man, i HATE that stuff. | 6-Jan-10 0:22 |
7190 | Graham | don't forget unintended deletion of forum channels! | 6-Jan-10 0:20 |
7189 | BrianH | Yup, I agree, at least the parts that need the web to do (which isn't much on that list). | 6-Jan-10 0:15 |
7188 | Terry | Yeah, web chats.... avatars, skins, website integration, API integration with gmail, animations, sound, video and other media integration... those things really suck | 6-Jan-10 0:14 |
7187 | BrianH | All good criticisms, except the "proprietary" one. It could be worse though - it could be a web chat. | 6-Jan-10 0:07 |
7186 | Terry | Methinks the Cheyenne world would be much better serviced using Cheyenne chat rather than this archaic, uneditable, uncustomizable, proprietary and difficult to enter thing called Altme | 6-Jan-10 0:05 |
7185 | Terry | This is helpful as well.. in the chrome address bar type; about:dns | 5-Jan-10 20:28 |
7184 | Terry | Article regarding chrome dns prefetching http://tinyurl.com/4adsdd | 5-Jan-10 20:27 |
7183 | Terry | Ok.. Chrome has a "prefetch dns" option.. so my demo was caching the ip rather than the domain
I've updated the domain to a proper dns record, rather than just forwarding.
If you still can't see the demo, turn off "prefetch dns".. temporarily http://shinyrockets.com/ws2.html | 5-Jan-10 20:25 |
7182 | Graham | cause there is a default directory for all incoming file data ... | 5-Jan-10 18:28 |
7181 | Janko | I am using 0.9.19, no problem just wanted to mention. @Graham: can I ask why are you doing this (checking for file OR data in request/content): either file? filedata/2 [ write/binary join get-user-dir filename read/binary join incomingdir filedata/2 ] [ if filedata/2 [ write/binary join savedir filename filedata/2 ] ] I imagine if file is bigger it get's saved and you copy it. But how can you then determine the incoming/pwd is this some cheyenne default? | 5-Jan-10 12:34 |