AltME groups: search
Help · search scripts · search articles · search mailing listresults summary
world | hits |
r4wp | 119 |
r3wp | 1313 |
total: | 1432 |
results window for this page: [start: 201 end: 300]
world-name: r3wp
Group: !AltME ... Discussion about AltME [web-public] | ||
[unknown: 9]: 16-May-2005 | Yeah, I'm REALLY anti FTP. It took us writing our own FTP Client to realize, FTP is simply not worth supporting, the people who originated it were kids, that did not know what they were doing. We waste too much time, as has everyone that has written FTP client or Server software. Basically, the standard should be rewritten such that every command that a normal DOS would use are available, even the simple stuff like getting the size of the volume the data is being stored on, and remaining space. But also there needs to be systems in place for check-summing files in usable chunks, and also for doing metrics from both sides so that better predictions can be made about the time it will take to synch. It goes on and on, just throw FTP away Build an x-internet interface to something new, and build it correctly to be global not local. For example, every block (some unit of bytes) of a given file should be able to exist in multiple places (on the web, not just on a server), etc. Let's solve everything in one place once and for all. | |
Group: RAMBO ... The REBOL bug and enhancement database [web-public] | ||
[unknown: 10]: 16-May-2005 | rebview1210242 does not kill child processes when executed like $ ./rebview1210242 & [1] 9203 $ [1]+ Stopped ./rebview1210242 $ ps a PID TTY STAT TIME COMMAND 9203 pts/2 T 0:00 ./rebview1210242 9204 pts/2 T 0:00 ./rebview1210242 9205 pts/2 T 0:00 ./rebview1210242 $ kill -9 9203 9204 9205 | |
Gabriele: 20-May-2005 | CRAM-MD5, if it fails it tries PLAIN. i hope we can make it smarter in the future by looking into what the server actually supports (EHLO command) | |
Vincent: 25-May-2005 | request : to really test new AGG/draw, we needs a command list. The examples helps, but there is now way to tell the presence and purpose of optional parameters. Not a full doc, just a simple one line per command list, ie : 'line 1st-point [pair!] 2nd-point [pair!] ... n-point [pair!] | |
Gabriele: 25-May-2005 | vincent: command list should be available soon | |
Cyphre: 25-May-2005 | We will be finalizing the DRAW syntax very soon. After that step we release updated command list so your test scripts won't break in later releases. | |
Vincent: 27-May-2005 | thanks for the draw command list - (time to experiment and crash-test draw/agg :-) | |
Ammon: 2-Jun-2005 | Cal found a fun little bug with Select/Skip when using it on a string. Here's the shortest code snippet that we've come up with to reproduce the problem. Only copy and paste this into a console session that you don't mind killing cause it is going to lock up... Tested on Win2K with the latest stable release, Command and recent betas... select/skip {"<a><mm></mmmmf>"} "foo" 2 | |
Romano: 27-Jun-2005 | in split-path is missing an "head" command | |
Group: Core ... Discuss core issues [web-public] | ||
Louis: 22-Feb-2005 | Is there a command to give the path to the presently used user.r file? | |
DideC: 16-Mar-2005 | (Script is in %inp.r) I have tried this command line (I'm on Win2k, Core 2.5.6) : C:\> echo this is a test | rebol.exe inp.r C:\> rebol.exe inp.r < test.txt C:\> type test.txt | rebol.exe inp.r | |
Gabriele: 16-Mar-2005 | if you PROBE it, to see it on the command window you need a | more or something like that. | |
Group: Parse ... Discussion of PARSE dialect [web-public] | ||
Graham: 12-Mar-2005 | I'm using these rules in my server side implemention to the top command one-line-rule: [copy line thru {^/} ( if line = ".^/" [ line: join "." line ] write-client line)] header-rule: [copy header thru {^/^/} (write-client header write-client )] msg is the email message including header and body lines is the number of lines requested by the TOP command parse msg compose [ header-rule (lines) one-line-rule ] Now, I can't check the parse syntax as rebol.com is down, but I seem to always get the whole email with my header-rule and not just the header. | |
Graham: 7-Jun-2005 | what you could do, is extract Didier's implementation of the TOP command, and then get the first line of each header in your mailbox. If it has the return-path set to <>, then note it in a list. When finished, go thru and issue deletes on all of those. | |
Group: MySQL ... [web-public] | ||
DideC: 25-Feb-2005 | I have a table with some Products. I need to copy each line from the Products table in a Command table (with a different structure, but same key) IF THEY ARE NOT ALREADY THERE, and add a quantity value. | |
Dockimbel: 3-May-2005 | You can try to disengage the auto-reconnect feature and test if the connection is still active by yourself (send a ping command for example). | |
François: 7-Aug-2005 | Hello, is there anyone working with Rebol Command and Mysql 4.1.x ? It appears that the authentication protocol has changed and Rebol/Command can not connect to MySQL 4.1.x. But it works fine with MySql 4.0.x. | |
François: 7-Aug-2005 | I have heard that the driver from DocKimbel has the seem issue... But my point is that Rebol/Command should be updated to work with version 4.1 which is currently the recommended version for peoduction environment! | |
sqlab: 9-Jan-2006 | Only the /pro, /command and sdk versions have this functions exposed | |
Anton: 9-Jan-2006 | Doc probably wanted his script to work independently of Pro and Command. (or, that method wasn't implemented at that time). | |
Pekr: 13-Jan-2006 | Doc, what would be needed for the driver to work like Command driver? I mean the ability to db-conn: first db, and have multiple connections/channels to have available? | |
Dockimbel: 13-Jan-2006 | You already can have several connections opened at the same time with the current driver. I don't see the benefits of the /Command way. If you really need to have exactly the same behaviour, I guess that you have to overload the 'first function in my code and return a new port! using the connection port as 'sub-port. | |
Maarten: 13-Jan-2006 | Actually, I used to install Docs driver in Command anyway because it was much faster :-) | |
Gabriele: 14-Jan-2006 | yep, our detective portals use Doc's driver even though we run on command. | |
Dockimbel: 8-May-2006 | james: use the 'ping command: insert db [ping] (see driver documentation for more info on this command). | |
Dockimbel: 6-Jun-2006 | Henrik: Can yo give me the mysqladmin command line you're using to create a new user ? | |
Dockimbel: 6-Jun-2006 | Ok, so you mean MySQL Administrator (and not the mysqladmin.exe command line tool). | |
Dockimbel: 11-Jun-2006 | 1) Load the REBOL mysql console : do %mysql.r 2) Connect to the server 3) Command: show tables 4) result ok 5) Stop/Start the server 6) Command: show tables 7) result ok (the driver has reconnected transparently) | |
Group: Linux ... [web-public] group for linux REBOL users | ||
Gabriele: 8-Aug-2006 | write access means you can add files to the dir, but to write on them you need to be able to access files in the dir which is the execute bit. i think you can probably use the touch command to create new files on dirs with rw- (not sure though) but for complete access to a dir you need rwx. | |
Pekr: 14-Nov-2006 | Ammon - the thing might be, that maybe Linux version of Command does not support ODBC at all? | |
Ammon: 14-Nov-2006 | I was using a Linux version of Command to set it up. | |
Graham: 14-Nov-2006 | since Command on Linux does not support ODBC, I think that must have been the case! | |
Ingo: 18-Nov-2006 | Well, you don't ... rebol does not support sending email using sendmail, but if you have a version with command-shell support ( call ) you can probably create the command line to call sendmail yourself ... I don't know how to do this, though. | |
Kaj: 19-Nov-2006 | I think interfacing with sendmail via the command line would be through the standard "mail" command, if sendmail is properly configured as standard MTA | |
Graham: 8-Dec-2006 | In windows, it starts up another instance with the values passed as command line arguments eg, launch "test" where test is a command line argument In Linux, it appears to treat "test" as a script which it can't find. | |
Gabriele: 11-Dec-2006 | best way is call the lpr command | |
Gabriele: 11-Dec-2006 | don't know if gnome has a print command. lpr should work almost anywhere though. | |
Anton: 2-Feb-2007 | symbolic link, see the LN command | |
btiffin: 5-Apr-2007 | Pekr; On my Debian system, I had to do an apt-get install libstdc++5 to get an older sdk version running. I don't know Fedora's package manager but under Debian you would apt-get install libstdc++6 to get the shared libraries required. Under GNU/Linux, having various shared libraries around isn't great, but it rarely hurts things. the ldd command will show what shared libraries are required. | |
Alan: 9-Apr-2007 | not right now,am doing some updates and hopefully that command will be there tried several commands I found on the net with no luck | |
btiffin: 9-Apr-2007 | Alan; the sensible-browser seems to be a Debain branch feature. It's GPL so we can work that out. The hint I left for the RAMBO folk is to internally call sensible-browser. This won't work for us until RT does a build. Once/if that is done, we can talk/plan more, about documenting getting browse native functioning. In the meantime, try the browse: [url /only] call reform ["path to browser command" rejoin [{"} url {"}]] redef. If you know the switches for your browser, you can even code this to support /only. | |
Graham: 13-Apr-2007 | Sunanda, there are command line options to not install aren't there? | |
Pekr: 13-Apr-2007 | yes, there are. But IIRC, in cgi-mode, you would be able to use some basic face command functionality, but I am not sure now .... | |
Gabriele: 13-Apr-2007 | view functionality for cgi = Command. | |
btiffin: 16-Apr-2007 | I tried Ladislav; I've never purchased a Command license, so have zero experience... What are the defintions of seconds and null-struct and I'll try it here under Debian and 2.7.5.4.2 | |
TimW: 2-Jul-2007 | I hae altme in a directory in my user home directory /home/user/altme and if I click on it there it puts all files in that altme directory which is what I want, but if I try to link to /home/user/altme/altme or start it from the command line it always tries to install again and put the files in my user directory /home/user. Does anyone know how to symlink it so it opens in the sub directory? | |
Kaj: 2-Jul-2007 | Unfortunately, this indeed seems to be how it behaves from the command line. So you can't do that, or start it automatically, unless you never start it from the graphical desktop | |
Robert: 20-Aug-2007 | Seems like I can use the MAIL command on the server... | |
Henrik: 9-Sep-2007 | I usually don't launch script from nautilus, but you can make a shebang line in the first line of the script to launch it. This way, it should work no matter what desktop or command line you use in Linux. | |
btiffin: 19-Feb-2008 | If you start from a terminal session and use $ rebol ( or whatever command) and then hit the console, does the REBOL banner show up in the terminal? That's where it should be. No seperate "windows" console required for GNU/Linux. If there is no banner, then puppylinux may be pooched. | |
Group: !Readmail ... a Rebol mail client [web-public] | ||
[unknown: 9]: 28-Apr-2006 | Is Rebmail (er, I mean readmail) a command line thing, or a full GUI thing? | |
Group: SDK ... [web-public] | ||
Chris: 8-Apr-2005 | If you're into Amiga emulation, I can recommend PPaint (it's what I use for exactly this purpose) to reduce 24-bit pngs. PNGQuant is another command line utility that I use to convert 32-bit to 8-bit rgba (for small IOS icons :o) though 8-bit windows icons are strictly rgb. | |
MichaelB: 17-May-2005 | Should most probably be more a question to RT directly, but I'd like to know the same. Actually if in the future everything is to be based on LNS, Rebol/Platform and so on, will people with the SDK, Command have to buy new versions, as it sounded that everything will change more or less, so the productline isn't the same anymore ?! | |
BrianH: 21-Jun-2005 | /Pro and /Command too. Base and Pro are part of the SDK. | |
Graham: 1-Jul-2005 | Anyone seen this error before which has been reported to me * Script Error: External process failed: %1 is not a valid Win32 applic ation. ** Near: launch "webserver" view center-face loginlo ** Press enter to quit... where "webserver" is just the argument for the 'launch command. | |
Gabriele: 1-Nov-2005 | i.e. if you allow anyone to encap anything for $5, you get /Command for $5. | |
Henrik: 1-Nov-2005 | if it were possible to encap stuff with /command abilites, you'd already own /command to test your source prior to encapping... | |
Gabriele: 1-Nov-2005 | also, it's not true that you would need to have command already. | |
Gabriele: 1-Nov-2005 | and you got /Command for $5. | |
Henrik: 1-Nov-2005 | well, that's not really what I would want... all I would need would be proper encapping of my small Rebol/View scripts so that friends can run them with a single click, which is one of the major gripes I have when I need to distribute hobby scripts. They don't want to mess with the console or the viewtop (believe me, I tried). If I were to use functions in my scripts that are /command only, the service should not allow encapping of source that contains /command functions. This way you'd need to own /command and/or the SDK to make /command capable exe's. | |
Pekr: 1-Nov-2005 | Henrik - there are two versions of SDK - /Command and "normal" (without command features, just pro ones available), which is cheaper ... | |
Henrik: 1-Nov-2005 | pekr, I thought the difference was /Command and /Pro functions... | |
Henrik: 1-Nov-2005 | but you don't get /Command functions for free. that would be the trick to get you to buy the SDK as opposed to using an encapping service | |
Pekr: 1-Nov-2005 | do you need /Command functions? | |
Graham: 5-Dec-2005 | Well.. a new sdk has been finally released! And that includes Command. Thank you RT!!!! | |
Graham: 5-Dec-2005 | If you have an up-to-date SDK license, you can download the new distribution from: www.rebol.net/builds/sdk If you do not have an SDK or command license, we encourage you to buy one and help support REBOL development. | |
Graham: 5-Dec-2005 | Anyway, it's very good news to finally get a new sdk - and for command - before Xmas. | |
Pekr: 5-Dec-2005 | I just wonder, if Command got some fixes. Some openssl vulnerabities appeared in last few years, yet Command showed components of 2002 year. mySQL, from 4.x, requires new authentication method .... I don't trust SDK here ;-) | |
Geomol: 6-Dec-2005 | I found out, why the icons in Canvas look different with the new rebview.exe coming with the new SDK. Before the SCALE command in DRAW didn't influence LINE-WIDTH, it does now. | |
Group: !Uniserve ... Creating Uniserve processes [web-public] | ||
Graham: 5-Mar-2005 | REBOL [ Title: "SMTP daemon" Author: "Graham Chiu" Version: 0.0.1 Date: 5/3/2005 ] install-service [ name: 'smtp port-id: 25 multi-line-end: rejoin [crlf #"." crlf] stop-at: crlf server: make object! [ user-data: none ] maildir: %mail/ ; store mail here save-mail: func [ data /local mailbox ][ if not dir? mailbox: rejoin [ maildir server/user-data/email "/" ] [ if not exists? join maildir %misc/ [ mailbox: make-dir join maildir %misc/ ] ] if not exists? join mailbox "mail.txt" [ write join mailbox "mail.txt" "" ] write/append join mailbox "mail.txt" join crlf to-string data print dehex data ] on-new-client: has [su] [ su: server/user-data: context [ state: copy "command" email: none ] stop-at: crlf write-client join "220 mail.compkarori.co.nz SMTP" crlf ] smtp-rule: [ "HELO" thru newline ( write-client join "250 mail.compkarori.co.nz SMTP" crlf ) | "EHLO" thru newline ( write-client join "500 not implemented" crlf ) | "MAIL" thru newline ( write-client join "250 OK MAIL FROM" crlf) | "QUIT" thru newline ( write-client join "221 Good Bye" crlf close-client) | "RSET" thru newline ( write-client join "250 OK RESET" crlf server/user-data/state: copy "command" ) | "NOOP" thru newline ( write-client join "250 OK NOOP" crlf ) | "VRFY" thru newline ( write-client join "252 send some mail, i'll try my best" crlf ) | "EXPN" thru newline ( write-client join "500 not implemented" crlf ) | "RCPT" [ thru "<" | thru ": " ] copy name to "@" thru newline ( server/user-data/email: form name write-client join "250 OK RCPT TO" crlf ) | "DATA" thru newline ( stop-at: multi-line-end server/user-data/state: copy "body" ) ] on-received: func [data /local su] [ su: server/user-data print join "Data: " data switch su/state [ "command" [ if not parse data smtp-rule [ write-client join "500 command not understood" crlf ] ] "body" [ ; reject if we don't have a RCPT command first if none? su/email [ write-client join "500 no email address received" crlf stop-at: crlf su/state: copy "command" return ] ; write the body of the message somewhere save-mail rejoin [ "Received: from somewhere at " to-idate now newline dehex data newline newline ] stop-at: crlf write-client join "250 OK MAIL received" crlf su/state: "command" su/email: none ] ] ] ] | |
Graham: 5-Mar-2005 | time to fire up ethereal and make sure I understand what the terminating sequence is for the smtp DATA command. | |
Graham: 5-Mar-2005 | REBOL [ Title: "SMTP daemon" Author: "Graham Chiu" Version: 0.0.2 Date: 5/3/2005 ] install-service [ name: 'smtp port-id: 25 multi-line-end: rejoin [crlf #"." crlf] stop-at: crlf server: make object! [ user-data: none ] clear-server: server/user-data [ state: "command" email: computer: none ] maildir: %mail/ ; store mail here domains: [ "@compkarori.co.nz" ] ; list of accepted domains save-mail: func [ data /local mailbox ][ if not dir? mailbox: rejoin [ maildir server/user-data/email "/" ] [ if not exists? mailbox: join maildir %misc/ [ mailbox: make-dir join maildir %misc/ ] ] if not exists? join mailbox "mail.txt" [ write join mailbox "mail.txt" "" ] write/append join mailbox "mail.txt" join crlf to-string data ; print dehex data ] on-new-client: has [su] [ su: server/user-data: context [ state: copy "command" email: computer: none ] stop-at: crlf write-client join "220 mail.compkarori.co.nz SMTP" crlf ] smtp-rule: [ "HELO" copy name thru newline ( write-client join "250 mail.compkarori.co.nz SMTP" crlf if not none? name [ trim/head/tail name ] server/user-data/computer: form name ) | "EHLO" thru newline ( write-client join "500 not implemented" crlf ) | "MAIL" thru newline ( write-client join "250 OK MAIL FROM" crlf) | "QUIT" thru newline ( write-client join "221 Good Bye" crlf close-client) | "RSET" thru newline ( write-client join "250 OK RESET" crlf clear-server ) | "NOOP" thru newline ( write-client join "250 OK NOOP" crlf ) | "VRFY" thru newline ( write-client join "252 send some mail, i'll try my best" crlf ) | "EXPN" thru newline ( write-client join "500 not implemented" crlf ) | "RCPT" [ thru "<" | thru ": " ] copy name to "@" copy domain to ">" thru newline ( either find domains domain [ server/user-data/email: form name write-client join "250 OK RCPT TO" crlf ][ write-client join "553 sorry, that domain is not in my list of allowed rcpthosts" crlf server/user-data/email: none ] ) | "DATA" thru newline ( stop-at: multi-line-end server/user-data/state: copy "body" write-client join "354 start mail input" crlf ) ] on-received: func [data /local su] [ su: server/user-data ; print join "Data: " data switch su/state [ "command" [ if not parse data smtp-rule [ write-client join "500 command not understood" crlf ] ] "body" [ ; reject if we don't have a RCPT command first if none? su/email [ write-client join "500 no email address received" crlf stop-at: crlf su/state: copy "command" return ] ; write the body of the message somewhere save-mail rejoin [ "Received: from " su/computer " ( " su/computer " [ " client/remote-ip " ]) " to-idate now newline dehex data newline newline ] stop-at: crlf write-client join "250 OK MAIL received" crlf su/state: "command" su/email: none ] ] ] ] | |
Graham: 5-Mar-2005 | hmm clear-server: does [ server/user-data/state: "command" server/user-data/email: server/user-data/computer: none ] | |
Graham: 5-Mar-2005 | fix was to send an error code on receiving EHLO command | |
Graham: 9-Mar-2005 | I want to add database storage for my smtp service, and since I use odbc, I have to encap to distribute ...otherwise users have to purchase command | |
Graham: 16-Mar-2005 | Got DideC.. who used Rebol to send it. We should really have a message-id generator as part of the send command. | |
Anton: 18-Mar-2005 | Reporting-MTA: dns; sv7.prth.eftel.com X-Postfix-Queue-ID: E836A143ADA X-Postfix-Sender: rfc822; <anton's email address> Arrival-Date: Thu, 17 Mar 2005 21:00:45 +0800 (WST) Final-Recipient: rfc822; [gchiu-:-compkarori-:-com] Action: failed Status: 5.0.0 Diagnostic-Code: X-Postfix; host pop.compkarori.com[203.79.110.37] said: 552 write failure (in reply to end of DATA command) | |
Group: XML ... xml related conversations [web-public] | ||
BrianH: 3-Jan-2010 | The semantic model of REBOL protocol schemes, implemented with the port! type, would fix well with the semantic model of SAX pull. SAX pull generates the same SAX events, except they are not propagated through callbacks - instead they are returned from function calls. SAX pull is sort of like an generator (in the Icon or Python sense) of SAX events. That is very similar in model to the behavior of command ports (like database ports). | |
Group: Hardware ... Computer Hardware Issues [web-public] | ||
DideC: 23-May-2006 | If you can, I recommand to ghost your disk to another one (as an image), then, use the SYSPREP command to prepare your Windows system to be ghost, then, ghost it to your Laptop HD. | |
Group: SVG Renderer ... SVG rendering in Draw AGG [web-public] | ||
shadwolf: 23-Jun-2005 | REBOL [ Title: "SVG Demo" Owner: "Ashley G. Trüter" Version: 0.0.1 Date: 21-Jun-2005 Purpose: "Loads and displays a resizeable SVG file." History: { 0.0.1 Initial release } Notes: { Tested on very simple SVG icons Only a few basic styles / attributes / commands supported Does not handle sizes in units other than pixels (e.g. pt, in, cm, mm, etc) SVG path has an optional close command, "z" ... AGG shape equivalent auto-closes load-svg function needs to be totally refactored / optimized ... *sample only* } ] ; The following commands are available for path data: ; ; M = moveto ; L = lineto ; H = horizontal lineto ; V = vertical lineto ; C = curveto ; S = smooth curveto ; Q = quadratic Belzier curve ; T = smooth quadratic Belzier curveto ; A = elliptical Arc ; Z = closepath ;print: none ; comment out this line to enable debug messages load-svg: function [svg-file [file! string!] size [pair!]] [ id defs x y to-color to-byte draw-blk append-style svg-size scale-x scale-y ][ xml: either string? svg-file [parse-xml svg-file] [ unless %.svg = suffix? svg-file [to error! "File has an invalid suffix!"] parse-xml read svg-file ] unless xml/3/1/1 = "svg" [to error! "Could not find SVG header!"] ;unless find ["id" "xmlns"] xml/3/1/2/1 [to error! "Could not find ID header!"] ;unless xml/3/1/3/1/1 = "defs" [to error! "Could not find DEFS header!"] id: xml/3/1/2 defs: xml/3/1/3 ; ; --- Parse SVG id ; svg-size: either find ["32pt" "48pt" "72pt"] select id "width" [ switch select id "width" [ "72pt" [120x120] "48pt" [80x80] "32pt" [60x60] ] ][ as-pair to integer! any [select id "width" "100"] to integer! any [select id "height" "100"] ] x: to integer! any [select id "x" "0"] y: to integer! any [select id "y" "0"] scale-x: size/x / svg-size/x scale-y: size/y / svg-size/y ; ; --- Helper functions ; to-color: func [s [string!]] [ ; converts a string in the form "#FFFFFF" to a 4-byte tuple to tuple! load rejoin ["#{" next s "00}"] ] to-byte: func [s [string!]] [ ; converts a string with a value 0-1 to an inverted byte 255 - to integer! 255 * to decimal! s ] ; ; --- Parse SVG defs ; draw-blk: copy [] append-style: function [ command [string!] blk [block!] ][ x xy pen-color fill-color line-width mode size radius shape closed? matrix transf-command ][ xy: 0x0 size: 0x0 line-width: 1 matrice: make block! [] radius: none transf-command: none foreach [attr val] blk [ switch attr [ "transform" [print "tranform have been found" ;probe val halt val: parse val "()," transf-command: first val probe transf-command switch transf-command [ "matrix" [ foreach word val [ if not find word "matrix" [ insert tail matrice to-decimal word ] ] ] ] ] "style" [ foreach [attr val] parse val ":;" [ switch/default attr [ "font-size" [ ] "stroke" [ switch/default first val [ #"#" [pen-color: to-color val] #"n" [pen-color: none] ][ print ["Unknown stroke:" val] ] ] "stroke-width" [line-width: to decimal! val] "fill" [ fill-color: switch/default first val [ #"#" [to-color val] #"n" [none] ][ print ["Unknown fill value:" val] none ] ] "fill-rule" [ mode: switch/default val [ "evenodd" ['even-odd] ][ print ["Unknown fill-rule value:" val] none ] ] "stroke-opacity" [pen-color: any [pen-color 0.0.0.0] pen-color/4: to-byte val] "fill-opacity" [fill-color: any [fill-color 0.0.0.0] fill-color/4: to-byte val] "stroke-linejoin" [ insert tail draw-blk switch/default val [ "miter" [compose [line-join miter]] "round" [compose [line-join round]] "bevel" [compose [line-join bevel]] ][ print ["Unknown stroke-linejoin value:" val] none ] ] "stroke-linecap" [ insert tail draw-blk 'line-cap insert tail draw-blk to word! val ] ][ print ["Unknown style:" attr] ] ] ] "x" [xy/x: scale-x * val] "y" [xy/y: scale-y * val] "width" [size/x: scale-x * val] "height" [size/y: scale-y * val] "rx" [print "rx"] "ry" [radius: to decimal! val] "d" [ shape: copy [] x: none closed?: false foreach token load val [ switch/default token [ M [insert tail shape 'move] C [insert tail shape 'curve] L [insert tail shape 'line] z [closed?: true] ][ unless number? token [print ["Unknown path command:" token]] either x [insert tail shape as-pair x scale-y * token x: none] [x: scale-x * token] ] ] ] ] ] insert tail draw-blk compose [ pen (pen-color) fill-pen (fill-color) fill-rule (mode) line-width (line-width * min scale-x scale-y) ] switch command [ "rect" [ insert tail draw-blk compose [box (xy) (xy + size)] if radius [insert tail draw-blk radius] ] "path" [ unless closed? [print "Path closed"] either transf-command <> none [ switch transf-command [ "matrix" [insert tail draw-blk compose/only [ (to-word transf-command) (matrice) shape (shape) reset-matrix]] ] ][ insert tail draw-blk compose/only [shape (shape)] ] ] "g" [ print "Write here how to handle G insertion to Draw block" insert tail draw-blk probe compose/only [reset-matrix (to-word transf-command) (matrice)] ] ] ] probe defs foreach blk defs [ switch first blk [ "rect" [append-style first blk second blk] "path" [append-style first blk second blk] "g" [ print "key word" probe first blk print "matrix and style in G" probe second blk append-style first blk second blk ;print "what to draw in G" probe third blk foreach blk2 third blk [ probe blk2 switch first blk2[ "path" [append-style first blk2 second blk2] ] ] ] ] ] probe draw-blk draw-blk ] view make face [ offset: 100x100 size: 200x200 action: request-file/filter/only "*.svg" text: rejoin ["SVG Demo [" last split-path action "]"] data: read action color: white effect: compose/only [draw (load-svg data size)] edge: font: para: none feel: make feel [ detect: func [face event] [ if event/type = 'resize [ insert clear face/effect/draw load-svg face/data face/size show face ] if event/type = 'close [quit] ] ] options: [resize] ] | |
shadwolf: 23-Jun-2005 | REBOL [ Title: "SVG Demo" Owner: "Ashley G. Trüter" Version: 0.0.1 Date: 21-Jun-2005 Purpose: "Loads and displays a resizeable SVG file." History: { 0.0.1 Initial release } Notes: { Tested on very simple SVG icons Only a few basic styles / attributes / commands supported Does not handle sizes in units other than pixels (e.g. pt, in, cm, mm, etc) SVG path has an optional close command, "z" ... AGG shape equivalent auto-closes load-svg function needs to be totally refactored / optimized ... *sample only* } ] ; The following commands are available for path data: ; ; M = moveto ; L = lineto ; H = horizontal lineto ; V = vertical lineto ; C = curveto ; S = smooth curveto ; Q = quadratic Belzier curve ; T = smooth quadratic Belzier curveto ; A = elliptical Arc ; Z = closepath ;print: none ; comment out this line to enable debug messages load-svg: function [svg-file [file! string!] size [pair!]] [ id defs x y to-color to-byte draw-blk append-style svg-size scale-x scale-y ][ xml: either string? svg-file [parse-xml svg-file] [ unless %.svg = suffix? svg-file [to error! "File has an invalid suffix!"] parse-xml read svg-file ] unless xml/3/1/1 = "svg" [to error! "Could not find SVG header!"] ;unless find ["id" "xmlns"] xml/3/1/2/1 [to error! "Could not find ID header!"] ;unless xml/3/1/3/1/1 = "defs" [to error! "Could not find DEFS header!"] id: xml/3/1/2 defs: xml/3/1/3 ; ; --- Parse SVG id ; svg-size: either find ["32pt" "48pt" "72pt"] select id "width" [ switch select id "width" [ "72pt" [120x120] "48pt" [80x80] "32pt" [60x60] ] ][ as-pair to integer! any [select id "width" "100"] to integer! any [select id "height" "100"] ] x: to integer! any [select id "x" "0"] y: to integer! any [select id "y" "0"] scale-x: size/x / svg-size/x scale-y: size/y / svg-size/y ; ; --- Helper functions ; to-color: func [s [string!]] [ ; converts a string in the form "#FFFFFF" to a 4-byte tuple to tuple! load rejoin ["#{" next s "00}"] ] to-byte: func [s [string!]] [ ; converts a string with a value 0-1 to an inverted byte 255 - to integer! 255 * to decimal! s ] ; ; --- Parse SVG defs ; draw-blk: copy [] append-style: function [ command [string!] blk [block!] ][ x xy pen-color fill-color line-width mode size radius shape closed? matrix transf-command ][ xy: 0x0 size: 0x0 line-width: 1 matrice: make block! [] radius: none transf-command: none foreach [attr val] blk [ switch attr [ "transform" [print "tranform have been found" ;probe val halt val: parse val "()," transf-command: first val probe transf-command switch transf-command [ "matrix" [ foreach word val [ if not find word "matrix" [ insert tail matrice to-decimal word ] ] ] ] ] "style" [ foreach [attr val] parse val ":;" [ switch/default attr [ "font-size" [ ] "stroke" [ switch/default first val [ #"#" [pen-color: to-color val] #"n" [pen-color: none] ][ print ["Unknown stroke:" val] ] ] "stroke-width" [line-width: to decimal! val] "fill" [ fill-color: switch/default first val [ #"#" [to-color val] #"n" [none] ][ print ["Unknown fill value:" val] none ] ] "fill-rule" [ mode: switch/default val [ "evenodd" ['even-odd] ][ print ["Unknown fill-rule value:" val] none ] ] "stroke-opacity" [pen-color: any [pen-color 0.0.0.0] pen-color/4: to-byte val] "fill-opacity" [fill-color: any [fill-color 0.0.0.0] fill-color/4: to-byte val] "stroke-linejoin" [ insert tail draw-blk switch/default val [ "miter" [compose [line-join miter]] "round" [compose [line-join round]] "bevel" [compose [line-join bevel]] ][ print ["Unknown stroke-linejoin value:" val] none ] ] "stroke-linecap" [ insert tail draw-blk 'line-cap insert tail draw-blk to word! val ] ][ print ["Unknown style:" attr] ] ] ] "x" [xy/x: scale-x * val] "y" [xy/y: scale-y * val] "width" [size/x: scale-x * val] "height" [size/y: scale-y * val] "rx" [print "rx"] "ry" [radius: to decimal! val] "d" [ shape: copy [] x: none closed?: false foreach token load val [ switch/default token [ M [insert tail shape 'move] C [insert tail shape 'curve] S [insert tail shape 'curv] L [insert tail shape 'line] Q [insert tail shape 'qcurve] T [insert tail shape 'qcurv] z [closed?: true] H [insert tail shape 'hline] V [insert tail shape 'vline] A [insert tail shape 'arc] ][ unless number? token [print ["Unknown path command:" token]] either x [insert tail shape as-pair x scale-y * token x: none] [x: scale-x * token] ] ] ] ] ] insert tail draw-blk compose [ pen (pen-color) fill-pen (fill-color) fill-rule (mode) line-width (line-width * min scale-x scale-y) ] switch command [ "rect" [ insert tail draw-blk compose [box (xy) (xy + size)] if radius [insert tail draw-blk radius] ] "path" [ unless closed? [print "Path closed"] either transf-command <> none [ switch transf-command [ "matrix" [insert tail draw-blk compose/only [ (to-word transf-command) (matrice) shape (shape) reset-matrix]] ] ][ insert tail draw-blk compose/only [shape (shape)] ] ] "g" [ print "Write here how to handle G insertion to Draw block" insert tail draw-blk probe compose/only [reset-matrix (to-word transf-command) (matrice)] ] ] ] probe defs foreach blk defs [ switch first blk [ "rect" [append-style first blk second blk] "path" [append-style first blk second blk] "g" [ print "key word" probe first blk print "matrix and style in G" probe second blk append-style first blk second blk ;print "what to draw in G" probe third blk foreach blk2 third blk [ probe blk2 switch first blk2[ "path" [append-style first blk2 second blk2] ] ] ] ] ] probe draw-blk draw-blk ] view make face [ offset: 100x100 size: 200x200 action: request-file/filter/only "*.svg" text: rejoin ["SVG Demo [" last split-path action "]"] data: read action color: white effect: compose/only [draw (load-svg data size)] edge: font: para: none feel: make feel [ detect: func [face event] [ if event/type = 'resize [ insert clear face/effect/draw load-svg face/data face/size show face ] if event/type = 'close [quit] ] ] options: [resize] ] | |
Vincent: 23-Jun-2005 | Oops too fast: commands Q S T -> OK commands H &t V -> need to add (just before "foreach token load val [") : if all [x not number? token] [ insert tail shape x * either token = 'V [scale-y][scale-x] x: none ] command A -> not yet solved sign issues | |
shadwolf: 23-Jun-2005 | REBOL [ Title: "SVG Demo" Owner: "Ashley G. Trüter" Version: 0.0.1 Date: 21-Jun-2005 Purpose: "Loads and displays a resizeable SVG file." History: { 0.0.1 Initial release } Notes: { Tested on very simple SVG icons Only a few basic styles / attributes / commands supported Does not handle sizes in units other than pixels (e.g. pt, in, cm, mm, etc) SVG path has an optional close command, "z" ... AGG shape equivalent auto-closes load-svg function needs to be totally refactored / optimized ... *sample only* } ] ; The following commands are available for path data: ; ; M = moveto ; L = lineto ; H = horizontal lineto ; V = vertical lineto ; C = curveto ; S = smooth curveto ; Q = quadratic Belzier curve ; T = smooth quadratic Belzier curveto ; A = elliptical Arc ; Z = closepath ;print: none ; comment out this line to enable debug messages load-svg: function [svg-file [file! string!] size [pair!]] [ id defs x y to-color to-byte draw-blk append-style svg-size scale-x scale-y ][ xml: either string? svg-file [parse-xml svg-file] [ unless %.svg = suffix? svg-file [to error! "File has an invalid suffix!"] parse-xml read svg-file ] unless xml/3/1/1 = "svg" [to error! "Could not find SVG header!"] ;unless find ["id" "xmlns"] xml/3/1/2/1 [to error! "Could not find ID header!"] ;unless xml/3/1/3/1/1 = "defs" [to error! "Could not find DEFS header!"] id: xml/3/1/2 defs: xml/3/1/3 ; ; --- Parse SVG id ; svg-size: either find ["32pt" "48pt" "72pt"] select id "width" [ switch select id "width" [ "72pt" [120x120] "48pt" [80x80] "32pt" [60x60] ] ][ as-pair to integer! any [select id "width" "100"] to integer! any [select id "height" "100"] ] x: to integer! any [select id "x" "0"] y: to integer! any [select id "y" "0"] scale-x: size/x / svg-size/x scale-y: size/y / svg-size/y ; ; --- Helper functions ; to-color: func [s [string!]] [ ; converts a string in the form "#FFFFFF" to a 4-byte tuple to tuple! load rejoin ["#{" next s "00}"] ] to-byte: func [s [string!]] [ ; converts a string with a value 0-1 to an inverted byte 255 - to integer! 255 * to decimal! s ] ; ; --- Parse SVG defs ; draw-blk: copy [] append-style: function [ command [string!] blk [block!] ][ x xy pen-color fill-color line-width mode size radius shape closed? matrix transf-command ][ xy: 0x0 size: 0x0 line-width: 1 matrice: make block! [] radius: none transf-command: none foreach [attr val] blk [ switch attr [ "transform" [print "tranform have been found" ;probe val halt val: parse val "()," transf-command: first val probe transf-command switch transf-command [ "matrix" [ foreach word val [ if not find word "matrix" [ insert tail matrice to-decimal word ] ] ] ] ] "style" [ foreach [attr val] parse val ":;" [ switch/default attr [ "font-size" [ ] "stroke" [ switch/default first val [ #"#" [pen-color: to-color val] #"n" [pen-color: none] ][ print ["Unknown stroke:" val] ] ] "stroke-width" [line-width: to decimal! val] "fill" [ fill-color: switch/default first val [ #"#" [to-color val] #"n" [none] ][ print ["Unknown fill value:" val] none ] ] "fill-rule" [ mode: switch/default val [ "evenodd" ['even-odd] ][ print ["Unknown fill-rule value:" val] none ] ] "stroke-opacity" [pen-color: any [pen-color 0.0.0.0] pen-color/4: to-byte val] "fill-opacity" [fill-color: any [fill-color 0.0.0.0] fill-color/4: to-byte val] "stroke-linejoin" [ insert tail draw-blk switch/default val [ "miter" [compose [line-join miter]] "round" [compose [line-join round]] "bevel" [compose [line-join bevel]] ][ print ["Unknown stroke-linejoin value:" val] none ] ] "stroke-linecap" [ insert tail draw-blk 'line-cap insert tail draw-blk to word! val ] ][ print ["Unknown style:" attr] ] ] ] "x" [xy/x: scale-x * val] "y" [xy/y: scale-y * val] "width" [size/x: scale-x * val] "height" [size/y: scale-y * val] "rx" [print "rx"] "ry" [radius: to decimal! val] "d" [ shape: copy [] x: none closed?: false if all [x not number? token] [ insert tail shape x * either token = 'V [scale-y][scale-x] x: none ] foreach token load val [ switch/default token [ M [insert tail shape 'move] C [insert tail shape 'curve] S [insert tail shape 'curv] L [insert tail shape 'line] Q [insert tail shape 'qcurve] T [insert tail shape 'qcurv] z [closed?: true] H [insert tail shape 'hline] V [insert tail shape 'vline] A [insert tail shape 'arc] ][ unless number? token [print ["Unknown path command:" token]] either x [insert tail shape as-pair x scale-y * token x: none] [x: scale-x * token] ] ] ] ] ] insert tail draw-blk compose [ pen (pen-color) fill-pen (fill-color) fill-rule (mode) line-width (line-width * min scale-x scale-y) ] switch command [ "rect" [ insert tail draw-blk compose [box (xy) (xy + size)] if radius [insert tail draw-blk radius] ] "path" [ unless closed? [print "Path closed"] either transf-command <> none [ switch transf-command [ "matrix" [insert tail draw-blk compose/only [ (to-word transf-command) (matrice) shape (shape) reset-matrix]] ] ][ insert tail draw-blk compose/only [shape (shape)] ] ] "g" [ print "Write here how to handle G insertion to Draw block" insert tail draw-blk probe compose/only [reset-matrix (to-word transf-command) (matrice)] ] ] ] probe defs foreach blk defs [ switch first blk [ "rect" [append-style first blk second blk] "path" [append-style first blk second blk] "g" [ print "key word" probe first blk print "matrix and style in G" probe second blk append-style first blk second blk ;print "what to draw in G" probe third blk foreach blk2 third blk [ probe blk2 switch first blk2[ "path" [append-style first blk2 second blk2] ] ] ] ] ] probe draw-blk draw-blk ] view make face [ offset: 100x100 size: 200x200 action: request-file/filter/only "*.svg" text: rejoin ["SVG Demo [" last split-path action "]"] data: read action color: white effect: compose/only [draw (load-svg data size)] edge: font: para: none feel: make feel [ detect: func [face event] [ if event/type = 'resize [ insert clear face/effect/draw load-svg face/data face/size show face ] if event/type = 'close [quit] ] ] options: [resize] ] | |
Ashley: 2-Jul-2005 | I've spent quite a bit of time looking at Inkscape (http://www.inkscape.org/) and it seems to be the only / best SVG game in town (their command-line driven SVG to PNG conversion seems to be particularly well regarded). Looking forward to their 0.42 release as it supports OS/X as well. The Clip Art site that they link to (http://www.openclipart.org/) is also a treasure trove of Public Domain files (which solves the GPL concerns I had with many of the dedicated KDE / Gnome icon sets). I'm also looking forward to their release 15 which seems to be just around the corner. Lots of good news in the SVG world, I wonder how long before mainstream browsers start supporting it? (without plugins). | |
Group: Syncing ... Syncing technologies [web-public] | ||
Pekr: 4-Jan-2006 | no, absolutly not ... the thing is, we need e-signatures, required by our law :-( ... maybe some command line util could be used? openssl? dunno :-( | |
Group: !RebDB ... REBOL Pseudo-Relational Database [web-public] | ||
Normand: 4-Apr-2006 | Thanks that works. Can someone provide the syntax in db.r of the following command in sql.r. I am looking for the function to update all or some 20 fields, loading only db.r in my interface. The manual is sparse, so I tried it in sql.r but it does not give the equivalent function. Is there an echo to toggle to have such translation? It would be helpfull to later to discover db.r. The function I tried is : | |
Normand: 22-Jun-2006 | I am trying to update my RebDB database with a level of indirection, as I am using a block of 39 colunms names and the corresponding 39 entry-fields from ReBGui. Shortening those blocks for the example's sake, I do try to update the DB with the following command: Let's say that exColumns: [name surname dob phone] and exValues: ["Doe" "Jane" "1990-01-01" "418-840-4040"]. Then >> db-update/where exDB (exColumns) (exValues) compose ['rowid = (to-id)] do not work, nor variants I know. Proof: >> db-create exDB exColumns == true >> db-insert exDB ["Foe" "Joe" "1991-01-01" "514-480-8080"] == true >> db-commit exDB == true Then what is a working update, as those do not work with indirection in column & values spec and rowid? to-id: 1 Variant1 >> db-update/where exDB exColumns exValues compose [rowid = to-id] == ** User Error: Invalid or duplicate column Variant2 >> db-update/where exDB (exColumns) (exValues) compose [rowid = to-id] == ** Script Error: db-update expected columns argument of type: word block Variant3 >> do [ db-update/where exDB exColumns exValues compose [rowid = to-id] ] == ** User Error: Invalid or duplicate column Variant4 >> reduce [ db-update/where exDB exColumns exValues compose [rowid = to-id] ] == ** User Error: Invalid or duplicate column Variant5 >> reduce [ db-update/where exDB (exColumns) (exValues) compose [rowid = to-id] ] == ** Script Error: db-update expected columns argument of type: word block The more I go, the more I am frustrated into the word/value distinction. What is the resiliently simple answer to my show stopper? | |
Group: SQLite ... C library embeddable DB [web-public]. | ||
Pekr: 13-Feb-2006 | dunno of sqlite3 protocol, will try. I also found out, there is btn-sqlite.r or something like that (where btn = better than nothing), and it uses command line sqlite.exe to get the result :-) | |
Ashley: 13-Feb-2006 | 1) how to influence where it stores/creates database? Don't know, I've only been looking at all this for a day and havn't worked that out yet either. 2) if I would use separate file for some tables, if it would be able to join them Yes. The ATTACH command lets you "hook up" to multiple databases, and you can prefix references with database name. 3) noticed there is brand new version of techfell protocol Of the *four* sqlite scripts on REBOL.org %sqlite3-protocol.r is the one to use if you have a Pro licence. 4) those guys are really screwing with GPL license ... Who? SQLite is PD as is %sqlite3-protocol.r | |
Ashley: 13-Feb-2006 | The "create if not exists" is a feature of sqlite not the protcol. Think command line: sqlite3 new.db The pathing thing is just an RTFM issue. | |
Ashley: 16-Feb-2006 | I've given up on the one table per database idea as the default attachment limit is 10 files. On the positive side, the ATTACH command seems to work properly under 3.0+ and table names unique to an attached database do not have to be prefixed in queries. ;) My 'connect function: >> help connect USAGE: CONNECT database /create /attach databases /blocked /direct DESCRIPTION: Open a SQLite database. CONNECT is a function value. ARGUMENTS: database -- (Type: file url) REFINEMENTS: /create -- Create database if non-existent /attach -- Attach up to 10 databases (of type file!) to this connection databases -- Database files (Type: block) /blocked -- Return each row as a block /direct -- Do not mold/load REBOL values lets you do this: connect/attach %/c/app/data/system.db [%/c/app/data/users.db %/c/app/data/reports.db] sql "select * from a-system-table" sql "select * from a-user-table" sql "select * from a-report-table" which could be quite useful in many situations. The default, however, is now one database. BTW, my rewrite (even after adding a lot more functionality) is about twice as fast as the original protocol version. | |
Pekr: 17-Feb-2006 | ad 1) I was referring to the context of foreign script reader understanding - you used db-open even for rebDB - as I said, it is a detail, but makes sometimes things more clearer ... ad 2) I was imagining simply kind of server product, which can open multiple unrelated databases .... ad 3) kind of disadvantage here to not refer by pointer. We are used to it, no? Look at /Command or other schemes - db: open some-db://..... conn1: first db conn2: first db ... db2: open some-db://..../other-db ad 4) OK ad 5) db- or sqlite- prefix or let it the way it is, I will assign it to sqlite: context [] directly in %sqlite.r | |
Graham: 7-Apr-2006 | Does sqlite have a "like" command for searching within text fields ? | |
Robert: 22-Apr-2006 | The SQLite docs say: If the optional IF NOT EXISTS clause is present and another table with the same name aleady exists, then this command becomes a no-op. | |
Robert: 23-Apr-2006 | And if I use the TABLES command I get: >> print tables material CREATE TABLE material (_id INTEGER PRIMARY KEY AUTOINCREMENT,_version,_benchmark,_prev,_next,_product_id,name,price,pcdl,pudl,netto,nudl,scrap,loss,process_loss,scrap_re cycle_rate,scrap_recycle,srcdl,srudl,process_loss_recycle_rate,process_loss_recycle,plrcdl,plurdl) sqlite_sequence CREATE TABLE sqlite_sequence(name,seq) | |
Ashley: 23-Apr-2006 | anybody tested to open sqlite.r generated databases with a database manger? Not sure what you mean here. The following works fine for me: c:\> sqlite3.exe my-db.db docs state that I get back the number of columns and rows ... no longer the case (docs need to be updated) Most efficient way to get number of rows is sql "select count(*) from my-table" Number of columns can be found by: (length? describe "my-table") / 6 I can't get back the columns name ... use the DESCRIBE command, or CONNECT/info (which then populates sqlite/columns and sqlite/widths for every query; or alternatly, set sqlite/col-info? true / false for a particular query). | |
Group: Postscript ... Emitting Postscript from REBOL [web-public] | ||
Graham: 7-Apr-2006 | as far as I recall, it has quite a limited command set. | |
Group: !Liquid ... any questions about liquid dataflow core. [web-public] | ||
BrianH: 24-May-2007 | Sorry if that was confusing. Most of my code has no user interface at all. It runs without intervention. Any monitoring or command interface is seperate. Most of my data points correspond to physical objects in the real world, and the code mostly tracks and directs these objects. | |
Group: Printing ... [web-public] | ||
Dockimbel: 4-Sep-2008 | I also need to add extend Draw dialect with a new command: text-box. It's an improved version of 'text that allow you to define a bouding box, align the text horizontally and vertically and auto-wrap text. | |
Group: reblets ... working reblets (50-100 lines or less) [web-public] | ||
Maxim: 19-Mar-2009 | hi all, I thought we'd build a small group, where we can just dump small working (fun or usefull) reblets. rules are simple: * ~ 50 -100 lines or less... * complete script with header * no external libs a part from urls on rebol.org * no use of write or save command * runs as-is in view 2.7.6 * we discuss scripts in reblets-discussion |
201 / 1432 | 1 | 2 | [3] | 4 | 5 | ... | 11 | 12 | 13 | 14 | 15 |