AltME groups: search
Help · search scripts · search articles · search mailing listresults summary
world | hits |
r4wp | 1023 |
r3wp | 10555 |
total: | 11578 |
results window for this page: [start: 1701 end: 1800]
world-name: r3wp
Group: !Readmail ... a Rebol mail client [web-public] | ||
PhilB: 31-Dec-2004 | For the next release I will be changing the way in which the locale works. (For security reasons) The locale.r file will no longer be evaluated ... i.e. the program will no longer do %locale.r. The program will expect a pipe seperated file something like ; menu items gm_about|About gm_Accounts|"Accounts" gm_Contacts|"Contacts" gm_Folders|"Folders" gm_Help|"Help" gm_New|"New" gm_Preferences|"Preferences" gm_Send|"Send" gm_Unread|"Unread" gm_Layout|"Layout" ; gui items gt_Add|"Add" gt_Add-to-cont|"Add to Contacts" gt_Attach|"Attach" | |
Graham: 31-Dec-2004 | makes it hard to encap anything if you 'do an untrusted file ... better to read it in, and parse it. | |
PhilB: 7-Feb-2005 | rebmail 4.8.0 & associated helptext has been released (07/02/2005) ... Changes Since 4.7.14 4.7.15 - Enhancement - Add name & email to substituion in reply text 4.7.16 - Bug Fix - Dont include name from Contacts list 4.7.17 - Bug Fix - Use From email address in Reply substitution 4.7.18 - Bug Fix - If no account is selected then display Alert when getting mail 4.7.19 - Enhancement - Process all picked acounts in Account Maintenance 4.7.20 - Enhancement - Request confirmation before deleting an account 4.7.21 - Bug Fix - If no Contacts exists program as failing on taking Contact menu item 4.7.22 - Enhancement - Process all picked acounts in Account Maintenance 4.7.23 - Enhancement - Make Contact Details a Dialog Box 4.7.24 - Enhancement - make new mail window title 'New Mail' 4.7.25 - Enhancement - Add no of days in search window 4.7.26 - Bug Fix - If password is blank then do not decrypt 4.8.0 - Enhancement - Update Version Number rebmail.r can be found at .... http://www.upnaway.com/~philb/philip/pbmail/readmail.r reabmail is also the following formats rip format at .... http://www.upnaway.com/~philb/philip/pbmail/readmail.rip zip format at .... http://www.upnaway.com/~philb/philip/pbmail/readmail.zip the archive containing rebmail.r & rebamail.html (rip = compressed self extracting rebol archive) Any problems let me know. | |
PhilB: 21-Apr-2005 | If you update your rules script the updates will be in effect the next time you fetch your mail (i.e. you do not have to restart the program) | |
Graham: 17-May-2005 | From Didier ; decode ISO-8859-1 / ASCII-US encoded text decode-iso8859: func [str /local ascii non-ascii char text emit quoted-printable encoded-word res b e] [ emit: func [v][append res v] ascii: charset [#" " - #"^(7f)"] non-ascii: complement ascii text: exclude union ascii non-ascii charset ["="] char: exclude ascii charset ["?_=^-"] encoded-word: [ "=?" ["ISO-8859-1" | "us-ascii"] [ "?q?" some quoted-printable | "?b?" b: to "?" e: (emit to-string debase copy/part b e) ] "?=" ] quoted-printable: [ "_" (emit #" ") | b: some char e: (emit copy/part b e) | b: "=" (emit do rejoin [ {#"^^(} second b third b {)"} ]) 2 skip ] res: make string! length? str parse/all str [any [encoded-word | "=" (emit #"=") | "^/ " | b: some text e: (emit copy/part b e)] to end] res ] | |
PhilB: 22-May-2005 | Fabrice ... 1. do you mean who the email is addressed to? 2. In theory you could add a rule to to store the incoming messages into different folders for each To address. 3. Do you mean the popup window that tells you the folders where the emails have been stored? If so we could add a preferences variable to not show the window when fatching multiple accounts? I will be busy for the next week ... but then I have a weeks holiday, I shoud have time to do some updates then, let me know what is most urgent for you and I will draw up a list of priorities here. | |
Fabrice: 23-May-2005 | The most urgent : apply rules for mails already fetched. Because this is really useful to organise your mails quickly and test some "incoming" rules (I'm not a parse professional ;-) But it's not so urgent for me ; so stay concentrate on what you have to do outside Rebol :-) | |
PhilB: 17-Jun-2005 | rebmail 4.10.11 & associated helptext has been released (18/06/2005) ... Changes Since 4.9.6 4.9.7 - Enhancement - Import emails" "Phil Bevan" 21/02/2005] 4.9.8 - Enhancement - Apply rules to a folder" "Phil Bevan" 30/05/2005] 4.9.9 - Bug Fix - Correct backdrop on getmail progress window" "Phil Bevan" 31/05/2005] 4.9.10 - Enhancement - decode ISO-8859-1 / ASCII-US encoded text" "Phil Bevan" 31/05/2005] 4.9.11 - Enhancement - allow Shift select to select multiple emails" "Phil Bevan" 01/06/2005] 4.9.12 - Bug Fix - Ensure download time is updated correcly" "Phil Bevan" 01/06/2005] 4.10.1 - Enhancement - Add options window 4.10.2 - Enhancement - Add rules maintenance 4.10.3 - Bug Fix - Remove Debugging info 4.10.4 - Bug Fix - Make Select Folder in Rules work 4.10.5 - Bug Fix - Apply send patch under View 1.3 4.10.6 - Bug Fix - Better Error trapping when applying fixes 4.10.7 - Bug Fix - Fix folder returned from unknown folder name 4.10.8 - Bug Fix - Do not try to copy email to itself when applying rules 4.10.9 - Enhancement - Add default inbox for incoming mail 4.10.10 - Bug Fix - Make Select Folder in Rules datila work for View 1.2 4.10.11 - Bug Fix - Ensure preferences work on new install rebmail.r can be found at .... http://www.upnaway.com/~philb/philip/pbmail/readmail.r reabmail is also the following formats rip format at .... http://www.upnaway.com/~philb/philip/pbmail/readmail.rip zip format at .... http://www.upnaway.com/~philb/philip/pbmail/readmail.zip the archive containing rebmail.r & rebamail.html (rip = compressed self extracting rebol archive) Any problems let me know. | |
Pekr: 30-Oct-2006 | what? Mozilla mailer, for ages, just by pressing save saves your email as an concept, to your HD of course. I can't believe any product would not do so. Maybe you just got corrupt indexes? I would delete them, and let Eudora to rebuild it (of course I know nothing about Eudora, so maybe it does not use indexes at all) | |
Louis: 30-Oct-2006 | Ok, my email is there. BUT I'm using a version of Eudora that won't let me reindex my files. I have to pay to be able to do that, I think. I'm downloading the latest version of Eudora now. Hopefully, it won't make me pay. | |
Pekr: 30-Oct-2006 | uf, what is Eudora good for? Do you work on windows? I never wanted to work with anything else than Netscape and leter mozilla mail. You can try Thunderbird, you might be surprised by its functionality - and what is more - your folder is plain text file, readable | |
Graham: 30-Oct-2006 | if you turn off the computer while writing to disk and corrupting the indices .. well, nothing to do with Eudora. | |
Louis: 30-Oct-2006 | According to their web site, the only way to avoid losing data in such a case is to compact the files daily. No one is going to do that, | |
PhilB: 16-Nov-2006 | As I am moving ISP's readmail.r will no longer be available at http://www.upnaway.com/~philb/philip/pbmail/ from the end of decemver onwards. So where would the best place to put readmail.r on a permenant basis? Any suggestions? Not many people use it so I dont think its worth trying to register a domain name. I do have some web space, but if I move ISP's again I will run into the same problem. | |
Group: !RebGUI ... A lightweight alternative to VID [web-public] | ||
Louis: 3-Mar-2005 | Ashley, how long do you think it will take you to get this ready for production use? | |
Ammon: 3-Mar-2005 | Yeah, the accessors... Not sure I really got the complete concept of accessors. IMHO, it is just extra work and the developer not the end user who puts the widget in an application generally has to build those unless the end user starts digging deeply into the style. This IMHO, is a MAJOR problem. If you make the sub-faces a facet of the style then the end user can always access the sub-faces of the style and do as they like with them AND DO IT EASILY. And the developer gets the benefit of not having to guess at all the ways that the end user may want to access the sub-faces! That in and of itself is a goldmine, to me. | |
Ashley: 5-Mar-2005 | First stab at a list of required base widgets area bar box button check droplist - text display + drop-down list editlist - edit box + drop-down list field groupbox - encloses a group of gadgets in a titled border icon image list – single column listview – multi-column progress radio scrollbar spliter – a “spliter window” which affects the width / height and position of other gadgets tab - arranges multiple gadgets into logical groups text slider treeview updown – scrollbar minus the bar (used with a field to increment / decrement numbers, etc) menu popup-menu - context menu status – status bar with one or more “segments” toolbar The aim is to have as few widgets as neccessary to build the majority of required GUI's. Take a look at the applications you use on a day to day basis, what widgets do they use? Are they in the list above? How are they named? Are there any widgets in the above list we can do without? (not that *someone* won't need it, just that it isn't common enough to be part of the base widget set). | |
Ashley: 6-Mar-2005 | Latest release, incorporating all the above changes, available at: http://www.dobeash.com/files/RebGUI-012.zip Documentation also significantly expanded to include: - Latest REBOL/View facet observations - Glossary of terms - Licencing section - RebGUI Display User's Guide - RebGUI Widget Designer's Guide Get it here: http://www.dobeash.com/it/rebgui/ My intention with RebGUI is to foster a community project that can deliver a credible alternative to VID, with my role being one of project leader / sponsor. The licence stuff is just to clarify my legal position and the rights of contributors and users. I'm looking at how to enable co-operative development (using IOS) but this can wait until the base design has stabilized. It's just too easy to fork efforts at this stage. All of this is still Alpha so if there is anything you disagree with (technical, documentation or legal) then please raise it here and I'll do my best to accommodate your concerns. I want this whole process to be as open as possible, but without the pitfalls of "design by committee" where nothing gets done! ;) | |
shadwolf: 6-Mar-2005 | I have monitored the memory consumtion of test.r script and I have seen that every second betwin 4 to 8 ko are allocated maybe there is something to do to avoid this | |
Ashley: 6-Mar-2005 | I'm keen to see your findings / conclusion on this one. Nailing "memory leaks" early in the design is a high priority. If the "problem" is with 'show then we can always do something simple like: show*: :show show: func [face [object! block!]][show* face recycle] Not sure about the performance hit though ... | |
Graham: 8-Mar-2005 | A suggestion .. don't quit after closing an example window please .. halt will do just fine. Otherwise have to reload rebol each time :( | |
Ashley: 8-Mar-2005 | Windows keeps track of all the programs used to open a particular file extension. Just right click the script then choose: Open With | Choose Program and browse select the file you want to open it with (checking the "Always use ..." option if you want to permanently associate it). Thereafter, this file is displayed whenever you right-click and bring up the "Open with" menu. On my system I have multiple REBOL versions and editors available so I can easily choose how I want to open a script. Anton: if your .R scripts are associated with your editor, how do you run them? Console session and do? | |
shadwolf: 11-Mar-2005 | Pekr and every one have to understand that starting a sutch project from scratch (white page) is a true challenge.In french scene we have an example of a heavy skinnable widgets library that became deprecated because several reason in witch there is no one to take in charge the continuity of the lib and that's pretty difficult to make a relevent work while we don't know what could be the VID futures. This library is interdependent of VID so while we don't know how Carl plan to extend it in futur it's hard to make up plans to maintain it. The name of this lib is libskins v3 witch was made by Etienne Alaurent.. What I want for RebGUI is that every one can participate on it apporting he's hown ideas to it but conserving the main project lines. I think Ashley is totally in this mood and try yet to make documentation around RebGUI concepts. In futur one posible idea to simplify the documentation elaboration could be to use the rebol french scene douwiki.Every people that creates a modification significant to RebGUI would write the related documentation directly to the dokuwiki this way the documentation task that had to make Ashley would be lighter. Ithink as Ashley have the "code vision" he must take in charge the code merging and releasing (that's yet what he do actually ;) ). If we want RebGUI to be maintained and constently adapted we must work as a team. This allow us to have more knowlege and more inovent ideas in the topic ;) | |
shadwolf: 21-Mar-2005 | I'm collecting ideas on this topic once it will do the job conveniently I will adapt it to rebgui standard ;) | |
shadwolf: 21-Mar-2005 | Asley I know that it. But that's not beacause RT is working on it too that we can't work on it right now with yet existent technologies and try to figure out how to do it with the limited capabilities (bacause we don't have aaccess to entire VM source code) we have. In futur once we yet trully have a working solution and VM will have officiallly the new technology AGG we could help Carl on TDM by apporting our RTE/IR (ritch text editor input renderer) code to him. it's a base of search for us but it means to be one implicitly for Carl If we want to save his time and focus it on the important things we have maybe to take in charge some od research work ;) | |
Ammon: 25-Mar-2005 | I built the styles kind of as examples of how to do things. | |
Ashley: 26-Mar-2005 | Vincent: 'list behavior & features - less is more at this stage, once we have something to look at we can refine it. shadwolf: 'text+ removal. While a useful widget for certain domains (like WYSIWYG editors / browsers) it's not a basic building block widget. There were also some unresolved implementation issues with it at this stage - I'll add it back in at a later date as an optional or advanced widget. shadwolf: multi-column list. An implementation model I liked was that adopted by Gui4Cli ( http://users.hol.gr/~dck/g4c/) which allows simple "table" representations (including column type and alignment definitions). Can't say I've come across that many UI's that use anything other than text / numbers in a standard list (thumbnails and scrolling check-box options are usually implemented in an app specific manner). Ammon: 'display/popup. If it's sufficiently different from 'display/layout then I'm all for it. Ammon: Wizard style. A wizard widget, if simple enough, would be a good addition. Like 'group-box and 'tab-panel it is a meta-widget that groups / uses other widgets. I'll make this distinction clearer in the next version of the docs. On a side note, my install example has convinced me of the need for an 'indent option (and the fact that use of 'offset should reset the line-height calculation). Ammon: "Unless otherwise specified, text size reverts to 200x9999 if the string contains a newline." I probably need to rephrase this, but what I was trying to say was that by default 'text is 9999x20 which let's you write a string without having to know it's width in advance (9999 will auto-size it), *but* if the string contains a newline then it is the height that is the more important variable so it'll use 200x9999 instead. Of course it'll only do this if you don't provide an explicit size yourself (the "unless otherwise specified" bit). Hope that makes a bit more sense. | |
Ashley: 27-Mar-2005 | Pekr: the edit feel is pretty basic at the moment (doesn't support highlighting or cut / paste). The Ctrl+BackSpace and Ctrl+Del are "delete to end" and "delete to beginning" respectively, which almost all editors support without the need for highlighting ... now the key mappings are another issue. ;) Graham: You need to add the following to %tour.r: #include %gfx-colors.r #include %request-file.r #include %gui.r #include %widgets.r #include %display.r and comment out the "do %gui.r" in %tour.r and the "do %widgets.r" and "do %display.r" lines in %gui.r. I'll make this less painful in the next release. Brian: See Sunanda's response or just comment out the redefine of 'show in %gui.r | |
shadwolf: 27-Mar-2005 | but first thing the adaptation of the Ctx-menu as all your actual widgets in it arre trully piece of art work I intent to do the same way with cyphre"s ctx-menu port to REBGUI :) | |
shadwolf: 29-Mar-2005 | the ask is do we need to specify in hard coded way the resize of every image ... | |
Group: !RebDB ... REBOL Pseudo-Relational Database [web-public] | ||
Ashley: 8-Feb-2006 | JOIN differs from SUB-SELECT where you want to aggregate the columns of more than one table, so: select a.col, b.col from a, b cannot be refactored as a sub-select. There are two reasons why I have not implemented JOINs in RebDB [yet]: 1) Dramatic increase in code complexity 2) You can almost always do it more efficiently in REBOL as you *know* the data structures and desired result set *in advance*. About the only time this does not work well [in RebDB] is where you have to pull the contents of more than one table across a network to derive a small subset as the result set. So while this SQL would not suffer: select a.col, b.col from a, b this might: select a.key, b.val from a, b where a.key = b.key depending on the size of b. | |
Ashley: 8-Feb-2006 | It's called a "Pseudo-Relational Database" for a good reason. ;) But in answer to Pekr's previous point; *you* can work out *how* to do that aggregation more efficiently than the limited AI of most RDBMS systems. I've worked at DB2 and Oracle shops where it was mandated that all JOINs be performed inline! SQL optimizers are not trivial to write, and the meta-data overhead (indexes, statistics, hints, etc) required to get them to make the "right" choices are often a false economy. | |
Ashley: 8-Feb-2006 | An example based on what you are trying to do with Orders, Items and Companies might be better to start with. | |
Sunanda: 8-Feb-2006 | Not sure if I'm off topic here.....But you can do pretty much everything in SQL without using JOIN. Though you may need UNION, subselects and WHERE. Which makes for more portable SQL as JOIN syntax often used vendor-specific extensions to the SQL-92 standard. | |
Coccinelle: 9-Feb-2006 | Ashley, sql-protocol generates the code used to extract and join the data is grouped in 2 functions : - make-do-select - make-do-loop They receive the column list, the table list (a block of table/alias pair), the where code to apply and the database (the port). If you provide these parameters and change the code to invoke RebDB fuction to get the data, you will have a basic join implementation for RebDB. You can use it and extend it for RebDB, if you want, I will be happy if you do so. | |
Gabriele: 9-Feb-2006 | ashley: in your example you are doing a query for each record returned in the first query, depending on the overhead of doing a query this might be a lot slower than a support for ioins in the dbms itself, even without any optimization (my code does not do any optimization, the programmer has to do optimization manually) | |
Pekr: 12-Feb-2006 | Ashley - why 'replace? Do you want to really replace id with looked-up value? I can imagine having some usage for 'id, especially in the case where 'id is of some meaning. I know it should not be, but e.g. some ppl might use, for companies db, companie's registration number, which is not anonymous id, and could be further used in the resultset ... | |
Maxim: 7-Apr-2006 | but you do need to do two queries beforehand... which is not exactly a join.. but anyhow you do end up with a block containing interleaved data from two tables ... and its pretty quick. | |
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? | |
Normand: 22-Jun-2006 | I also tried: >> db-update/where bottinDB (get fieldsnames) (get fvalues) compose ['rowid = (to-id)] ** Script Error: db-update expected columns argument of type: word block >> do [ db-update/where bottinDB (get fieldsnames) (get fvalues) compose ['rowid = (to-id)] ] ** Script Error: db-update expected columns argument of type: word block >> reduce [ db-update/where exDB ( get exColumns) (get exValues) compose [rowid = to-id] ] ** Script Error: db-update expected columns argument of type: word block I am getting short of inspiration. | |
Normand: 22-Jun-2006 | Well. Is there any way to obtain the rowid (physical row order number) of a selected entry, or deleted or updated entry? I am trying to devise a way to navigate into the database, from the initial point of a query or of an update. But with delete operations, the first column, id, is not allways in sequence. >> db-select id bottinDB == [1 2 3 4 7 8 9 10] >> db-select rowid bottinDB == [1 2 3 4 5 6 7 8]. And, as much as I can, I want to keep the historical order of entry, as it gives me information. It may be usefull to know that I did read a book or meet a person before another. The rowid gives a hint to that. All and all, parametrizing the update and obtaining the rowid are stoping me to complete my small everyday application. By the way, I do not see any example of 'demo' applications with RebDB and RebGui. A little help with mine could give birth to one. I should say that, design wise, RebGui is a great decision, to favor simplicity. You adress there some needs never covered by other systems: the myriads of simple applets everybody needs but were unable to ask. After a couple of weekends, I have got 400 lines of codes and am almost done. And I am not a programmer. So I figure out how efficient it is for you guys. Thanks. | |
xavier: 14-Nov-2006 | hello, i d like to know if its possible to call db.r script from an encaped program. It says that core 2.6 is needed and if i try to remove the security it fails. what i try to do is the following : rebol [] #include %/C/Documents and Settings/xavier/rebApps/spikes/mezz.r; #include %/C/Documents and Settings/xavier/rebApps/spikes/prot.r #include %/C/Documents and Settings/xavier/rebApps/spikes/view.r test: request-file write %test/param.par test do to-rebol-file read %test/param.par probe db-select * patients ask "" in this example the file u are supposed to point is db.r. When it s not encaped it work, not when it is. if someone has an idea ... | |
xavier: 15-Nov-2006 | it works ashley , thanks for everything , u found the solution. thanks to that i normally could be able to access to rebdb from my encaped program. I ll do trial to see if i can access to the db.r script from the network but normally this could be THE solution to my problem. Thanks for your very good job and for the information :)). | |
Ammon: 12-Apr-2007 | Ashley, I noticed some strange behavior with db-select. If you do NOT supply the /where argument then blocks are inserted into the result correctly but if do they are inserted inline. Example: >> db-describe tags == [id integer! tag string! files block!] >> db-select [id files] tags == [1 [3]] >> db-select/where [id files] tags [tag = "t"] == [1 3] I've spent about an hour trying to find where to fix this in db.r but I'm not seeing it. Any ideas? | |
Ashley: 14-Mar-2008 | If RebDB supported this then it would be no more efficient than doing it in your own code (i.e. RebDB would have to retrieve the column data required to sort on and then go through another process to discard it from the result set). Doing this in your own code is usually rather simple, as in: foreach [col-i-want col-to-discard] RebDB-query [ do something with col-i-want ] or just using 'extract in simpler cases. | |
PeterWood: 6-Sep-2008 | I find that the db/base-dir is getting set to the directory from which the db.r is loaded. Is this behaviour intentional? >> what-dir == %/Users/peter/Desktop/RebDBTest / >> do %~/Code/Library/Rebol/RebDB-202/db.r Script: "RebDB server" (14-Jan-2006 ) == none >> what-di r == %/Users/peter/Desktop/RebDBTest / >> db/base-di r == %/Users/peter/Code/Library/Rebol/RebDB-202/ | |
Louis: 7-Sep-2008 | Ashley, which is easiest to use with RebGUI? RebDB or your sqlite.r? Also, how do you decide which one you will use for a particular project? | |
Kai: 18-Jan-2009 | Ashley - how do I overcome this problem: I need to reduce the record block prior to db-inserting it because it contains sub-blocks. I would like to use 'next inside for autoincs, however..... | |
Group: SQLite ... C library embeddable DB [web-public]. | ||
Ashley: 13-Feb-2006 | sqlite3-protocol.r has a minor bug whereby locals/cols are not cleared. Fix is to add a "clear cols" at the beginning of the ' sqlite-exec func. Two other changes I made to this function were: 1) Changing “SQLITE_TEXT [any [attempt [load val: sqlite3/column_text stmt j] val]]” so as REBOL values are returned, and 2) Removing the /only clause from "system/words/insert/only tail result col" for those that prefer flat data structures (i.e. non-blocked records) Finally, a simple wrapper makes the whole thing more usable: context [ db: none set 'open-db func [name [file!]] [ db: open join sqlite://localhost/ name ] set 'close-db does [ close db ] set 'describe func ['table [word!]] [ insert db rejoin ["select type, name, sql from sqlite_master where upper(tbl_name) = '" uppercase form table "' order by rootpage"] db/locals/sqlresult ] set 'sql function [arg [string! block!]] [statement] [ case [ string? arg [insert db arg] string? first arg [ statement: copy first arg repeat i -1 + length? arg [ replace/all statement join ":" i pick arg i + 1 ] insert db statement ] ] db/locals/sqlresult ] ] which lets you do stuff like: >> open-db %test.db >> sql "create table t1 (col1 INTEGER, col2 TEXT)" == [] >> describe t1 == [table t1 "CREATE TABLE t1 (col1 INTEGER, col2 TEXT)"] >> sql reduce ["insert into t1 values (1,':1')" now/date] == [] >> sql "select * from t1" == [1 13-Feb-2006] >> close-db | |
Ashley: 13-Feb-2006 | A short-term workaround is to do something like: old-dir: what-dir change-dir new-dir open-db %my-db.db change-dir old-dir ;) | |
Anton: 15-Feb-2006 | Actually, I do know why - I just read it today. The reason is that url paths don't necessarily map directly to the filesystem. | |
Anton: 15-Feb-2006 | They can, and often they do, but doesn't have to be. | |
Pekr: 15-Feb-2006 | anyway - that's all I can do about it - to dislike it :-) I expect they went with one file because of locking issues in FS .... | |
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 | can we have opened only one db at a time? And if we want to open other, do we have to attach, no other chance? | |
sqlab: 17-Feb-2006 | It seems you want cursors. Then you can separate preparing of an sql statement and fetching from the cursor. This would allow to reset an already compiled statement and to redo do it without a new compilation. Or even to cache compiled statements as Caché does it. | |
Ashley: 1-Mar-2006 | REBOL supports a maximum of 16 callbacks; so to avoid this error don't do %sqlite.r more than once within a script (and there is no sensible reason to do so anyway). As for strings, remember that the driver mold's them; so they are actually stored as "string" (inclusive of quotes). You can reference them in one of two ways: sql {select * from table where col = '"string"'} or sql ["select * from table where col = ?" "string"] The second form is preferred as the binding is handled for you by the driver. I'm in the process of writing a SQLite Driver Guide (that covers this and other tricks) but it's a week or two away at the moment. | |
Ashley: 9-Mar-2006 | 0.1.5 available at: http://www.dobeash.com/SQLite/sqlite.r Changes of note include: - New /format refinement of CONNECT that formats output like MySQL (can be turned on/off via SQLIte/format?: true|false) - Widths block (SQLite/widths) added to supporrt above - DESCRIBE, TABLES and INDEXES functions rewritten (and simplified) - Added an EXPLAIN function - CONNECT rewritten (note that the attach refinement has been replaced by the function accepting a block! of file names instead) - DATABASE function added - Experimental IMPORT function added (but not exported to global context - see example for how it is used) - Error trapping / reporting more informative (especially if a library call error occurs) - Example block updated (do example) Documentation will be updated as time permits. | |
Ashley: 9-Mar-2006 | /no-copy is a reasonable compromise, and fits with the /flat refinement in that the driver defaults to the expected "safe" behaviour. I'll add that to the next build. XML output: I'm adding HTML output to the next build; is XML needed in addition to that? And if so, what does a "standard" table definition look like under XML (please provide a short example). SQL refinements: the idea is that in most cases you specify all the refinements you need with CONNECT and just use SQL without any; except in the following two special cases: 1. SQL/direct: where you used CONNECT (without the /direct refinement), but need to access a *specific* table that does not need its TEXT column values MOLDed (e.g. sqlite_master) 2. SQL/raw: as above but flattens data. Used primary to access system tables / data, this ensures that values are always returned in a consistent format; lets you write code like: to file! third DATABASE without having to worry about the format of the returned block(s). Grammatical question. Do folks prefer I use the word INDEXES or INDICES to refer to more than one INDEX? | |
Gabriele: 11-Mar-2006 | btw, do you know if it's possible to separate sqlite's engine from the rest of the code? (sql, etc) we'd need only the low level stuff, file format, indexind etc. | |
Ashley: 12-Mar-2006 | do you know if it's possible to separate sqlite's engine from the rest of the code? ... I don't believe so, but I haven't personally checked the C source code; although there are numerous compilation options that could be turned off to reduce the size of the 254KB DLL (or *nix .so) even further. | |
Ashley: 15-Mar-2006 | One strange bug remains. Occasionally %demo.r will fail (typically selecting rows from Items) due to garbage characters that somehow get inserted. I have reduced the problem down to this script: REBOL [] unless value? 'SQLite [do %sqlite.r] repeat cnt 10 [ prin ["^/Run" cnt "..."] ; Clean up from previous runs error? try [delete %test.db] error? try [delete %test.db-journal] ; Create Items (1000 rows) records prin " create ..." CONNECT/flat/create %test.db SQL "create table t (c1,c2,c3,c4,c5)" prin " insert ..." SQL "begin" ; loop 1000 [ repeat z 10000 [ ; SQL reduce ["insert into t values (?,?,?,?,?)" 1 "A 1" $1 1 $1 * 1] SQL reduce ["insert into t values (?,?,?,?,?)" 1 reform ["A" 1] $1 1 $1 * 1] ] SQL "commit" prin " select ..." SQL "select * from t" DISCONNECT ] quit Running the script should cause a failure like the following within the first couple of runs: Run 1 ... create ... insert ... select ...** Syntax Error: Invalid tag -- <C ** Near: (line 1) À<C" >> sqlite/direct?: true == true >> sql "select * from t where c2 like '%<%'" == [1 {À<C^B"} "$1.00" 1 "$1.00"] Changing the repeat to a loop seems to shift the error, often (but not always) making it take more runs to materialize. Replacing the reform with a string will often (but not always) allow all runs to complete successfully. Changing the number or order of INSERTed values also seems to shift the error. I'm not sure whether this is a REBOL or SQLite library error, but any help in tracking it down would be greatly appreciated. | |
Oldes: 15-Mar-2006 | I copied the cycle to clipboard and then did [ do read clipboard:// ] first run it was fine, the second one I got ** Syntax Error: Invalid string -- " | |
Pekr: 16-Mar-2006 | connect/create %test.db sql "create table test (id, name, last_name)" sql {insert into test values (1, "Petr", "Krenzelok")} sql {select * from test} ; returns [[1 Petr Krenzelok]] ... sqlite3 does not do that according to Bobik's info ... I am not sure I like it - it convert apparent string to word, I don't want that and I am not sure I want to use /direct for that, that seem like a reverse logic to me ... | |
Pekr: 18-Mar-2006 | ok, not sure now and I will retest, but the problem also is, that the string form allows you to use "text here" in quotes instead of 'text here' ...but - once you query your db, driver returns it as two separate words because of space - it simply ruins the block, because you get two elements instead of one. Bobik told me, that sqlite3 does not do that, so I assume it is a difference of how returned data is being processed. But I will do some tests using both drivers, because he defined his dbs using some external tool (sqlite admin or so ...) | |
JaimeVargas: 21-Mar-2006 | Indeed, However I think the timezone files can be used to do the adjustment if desired, and this may happen in the future. | |
Ashley: 21-Mar-2006 | Pekr, "the question is, if there should be any delimiter in DB". There has to be, otherwise LOAD will treat "20060101" as an integer not a date. Remember that SQLite has no concept of "column types" so the MOLDed values themselves have to carry / represent the REBOL type when LOADed. What we are trying to do with date is to use an alternate representation that REBOL will still recognize as a date but that also happens to sort correctly; YYYY-MM-DD achieves both those objectives, it's just a cosmetic question as to what delimiter "looks" better if someone looks at the raw data (prior to being LOADed into REBOL values) or uses the format directly in their statements (e.g. "select * from t where date = '2006-01-01'"). Graham, "If they are stored as numbers, then just as easy to sort!" Yes, but as per above we lose the fact that they are dates. If they are stored as integer then we'll get them back as integers. Graham, "what about time?" REBOL time values (in HH:MM:SS format) are already supported, and nothing prevents you from using now / now/precise except that these values will not be sorted correctly [with an "order by" clause that is]. | |
Ashley: 25-Mar-2006 | 0.1.9 posted with improved concatenation handling logic. In addition to handling strings you can now also do: SQL "select name||100 from customers" and SQL {select id||'"-'"||name from customers} Most REBOL types are supported (in concatenation type operations) although blocks may cause problems. | |
Robert: 3-Apr-2006 | IMO it would be very handy, because those statements can be prepared and assigned to rebol words, for simple access in an application. It the SQL statement changes, I only have to do it at one place. | |
Group: Postscript ... Emitting Postscript from REBOL [web-public] | ||
Henrik: 5-Apr-2006 | PDF is also only a subset of postscript, created so you don't need to compile your docs everytime they need to be displayed. PDFs are static. You still need postscript to do the actual printing AFAIK. The trick would be not necesarily to generate a PS file, but the data that could be fed to the printer through LP. | |
james_nak: 5-Apr-2006 | A couple of thoughts: 1. ".doc" is probably more prevalent. I see a lot and I do work in the corporate world. In fact, most of my document correspondence with IBM is with either Word files or Excel spreadsheets. (Not that I am suggesting doing any one of teh two, though being able to create .doc and .xls files natively would be incredible). 2. I use PS only to later translate them with Distiller to pdf. But then again, I have the regular version of Acrobat so I can. It's not that I want to but Pekr has a point about the usefullness and popularity of pdf. 3. For professional printing use, I suppose PS is still very useful. But I think that is the high-end side. | |
james_nak: 5-Apr-2006 | I guess what I am saying is, is there anything that a pdf doc can't do or support that you want to have? | |
james_nak: 5-Apr-2006 | BTW, can you imagine being able to create pdf forms, populate them, and save the data? That would be cool. You have to have the non-free version of acrobat to do that. | |
Henrik: 5-Apr-2006 | Gabriele mentioned that a postscript emitter wouldn't be very hard to do, compared to PDF. | |
james_nak: 5-Apr-2006 | My concern is that once you have the PS file, you do have to find a way to print it. | |
james_nak: 5-Apr-2006 | The reason I have anything more to do with PS is that I use Pagestream for all my DTP and it has some quirks with its "save as pdf" So I've had to print to a PS driver, then convert it with Distiller. | |
james_nak: 5-Apr-2006 | Well, it something to weigh out for sure. A couple thoughts. That link references 98 and NT so back in those days, yeah, we had PS on Mac and for me, the Amiga. Today, however, wouldn't pdf's be the bomb? And other, less technical, people don't have to do much to print them. They also don't have to worry about sending them to others. | |
Graham: 5-Apr-2006 | As I said in the pdf maker group ... postscript is a much easier thing to do than pdf. I could then do high resolution graphs in postscript, and then use ghostscript or other utilities view and print. Conversion to pdf is another possibility. | |
Pekr: 6-Apr-2006 | Graham - either give me native rebol post script viewer, or forget it. I will not install ghost script - being there, done that. Because - today, in corporate sphere, there are two output interfaces - browser, or PDF Reader - noone will install anything else. I do agree that to get things right using html/css in cross browser manner may be pretty difficult task, but imo that postscript should be somehow - hidden? | |
Graham: 6-Apr-2006 | I have no wish to defend my desire to see a postscript emitter. I only wish to see it done by people who have a mutual interest. If you don't think it is of interest, please do not post negative comments. | |
Pekr: 6-Apr-2006 | why negative. It is because you read is as a negative. My reaction translates to - if PS is good thing to have, then let's have it, but then it would be good to have native rebol ps viewer (in AGG) or there will be a trouble, if such a thing is dependant upon external viewer. And that is my experience here and I can guarantee you, that in terms of our big corp it would be a problem. But enough, do what you think is best ... | |
james_nak: 6-Apr-2006 | I thought about this subject yesterday night and yeah, it would be nice to be able to do "anything and everything" in Rebol and PS does offer that. Besides the kind of charts that Graham showed, things like wrapping/flowing text around graphic images would be useful. Of course at some point I would most likely convert it to pdf through Distiller. I totally agree that good clean output is essential. My last programming foray in PS was some 16 years ago. At that time it was the only way to go for me. I suppose that alone shows the staying power of PS. | |
Geomol: 7-Apr-2006 | It's one way of doing it, and maybe not so bad. I don't know enough about PS to see, if DRAW is too limited. Maybe PS has a lot other stuff, you wanna do, that is difficult to do in DRAW. | |
Geomol: 7-Apr-2006 | PostScript dialect test ready. Try this: do http://home.tiscali.dk/postscript/postscript.r s: postscript [font ["Times-Roman" 20] ["Hello World!"]] s is now the PostScript output, that can be saved to a PS-file or sent to a printer. | |
Graham: 7-Apr-2006 | >> do http://home.tiscali.dk/john.niclasen/postscript/postscript.r connecting to: home.tiscali.dk ** User Error: Error. Target url: http://home.tiscali.dk/john.niclasen/postscript/postscript.r could not be retr ieved. Server respons... ** Near: do http://home.tiscali.dk/john.niclasen/postscript/postscript.r >> | |
Graham: 7-Apr-2006 | Do you have to specify the pen colour or not ? | |
Graham: 7-Apr-2006 | Is the main aim to do text, or translate draw images? | |
Geomol: 7-Apr-2006 | I would aim for an implementation of PS functionality as a REBOL dialect. Nothing to do with draw yet. | |
Geomol: 7-Apr-2006 | PostScript has a lot of operators (commands). For this REBOL dialect to be usefull, we should keep the number of features at a minimum. It's always hard to learn something new, and if the number of commands is too big, less will use it. I would like feedback on, what features should be supported in the dialect for a first version. This dialect can then be used in REBOL programs, that would like to do PostScript output. And I could make a PostScript output from my NicomDoc format. And then we could also have a DRAW -> PS converter. | |
Pekr: 7-Apr-2006 | I don't want to interrupt your concrete talk here, but I think I was a bit misunderstood. By "or forget it" I did not mean forget bringing PS to rebol, but "it" was pointing to ghostviewer. I am the last, who would not want to do everything in Rebol. So Henrik actually contradicts himself a bit stating that he wants to limit number of external apps = bring PS to rebol, but then how to do a preview? | |
Pekr: 7-Apr-2006 | In fact - my question could be just simplified - how do we do print preview without GhostView or other PS viewer tools? If that is "somehow" possible, then it is only good. That is why I referred to the need of AGG based preview, to actually save third app usage - a PS viewer. | |
Geomol: 7-Apr-2006 | I think, what Henrik is thinking about is, that if he already has something on his screen produced in REBOL, e.g. something from DRAW, then he just want to print it easily. But you're right, if we get all different PS-files in REBOL, how do we preview them then? I don't want to, I want to easily print a NicomDoc document, I alread see on my monitor. | |
Maxim: 7-Apr-2006 | I used to do it on amiga... | |
Maxim: 7-Apr-2006 | If I knew how PCL wraps images I'd do it on PC too... I've just not needed to do printing with rebol, for which html didn't solve my needs... yet... | |
Graham: 7-Apr-2006 | Like you, I'm primarily interested in text, and lines ( my application uses LaTeX at present to do text ). | |
Graham: 7-Apr-2006 | that should be very easy to do with a postscript dialect. | |
Geomol: 7-Apr-2006 | PS has setlinewidth, and setting it to 0 will make is as thin, as the device can do. | |
Group: !GLayout ... ask questions and now get answers about GLayout. [web-public] | ||
Maxim: 1-Nov-2006 | I think I misunderstood your question. Its possible some methods could be extracted from GLayout, but I have no time to do that kind of task. | |
Maxim: 3-Jan-2007 | By default its easy to add VID styles if you use the static-sizing extension by default. This means you do not expect your face to resize, and is very easy to accomodate (obviously) | |
Maxim: 3-Jan-2007 | all you really have to supply (if one of the current sizing extensions does not do what you need) is implement two methods. |
1701 / 11578 | 1 | 2 | 3 | 4 | 5 | ... | 16 | 17 | [18] | 19 | 20 | ... | 112 | 113 | 114 | 115 | 116 |