AltME groups: search
Help · search scripts · search articles · search mailing listresults summary
world | hits |
r4wp | 5907 |
r3wp | 58701 |
total: | 64608 |
results window for this page: [start: 52201 end: 52300]
world-name: r3wp
Group: !RebDB ... REBOL Pseudo-Relational Database [web-public] | ||
Ashley: 1-Feb-2010 | Latest version of RebDB appears to work under R3 with only 2 minor changes: 1) Change the Umlaut u on line 3 to a normal u 2) Change the 'return on line 214 to 'exit Once I've had some time to run a few QA tests I'll upload these changes as 2.0.4 (along with a few other maintenance fixes). | |
Ashley: 1-Feb-2010 | The other big news is that I've commenced an R3 specific rewrite of RebDB focusing more on the Storage Manager (as opposed to the Database Manager). Preliminary results, pre-optimization, look very promising: Script: "RebDB server" Version: 2.0.3 Date: 13-Apr-2007 Rows ...... 10,000 * 2 RAM Used .. 1,225 Kb Insert .... 0:00:05.02291 RAM Used .. 6,497 Kb Delete1 ... 0:00:42.43421 RAM Used .. 5,346 Kb Delete2 ... 0:01:13.110128 RAM Used .. 6,100 Kb Script: "RebDB Storage Manager" Version: 3.0.0 Date: 1-Feb-2010 Rows ...... 10,000 * 2 RAM Used .. 1,029 Kb Insert .... 0:00:00.689558 RAM Used .. 4,568 Kb Delete1 ... 0:00:05.103824 RAM Used .. 1,991 Kb Delete2 ... 0:13:47.026307 RAM Used .. 1,991 Kb Delete1 is primary key-based (10,000 deletes), whilst Delete2 is query-based. Apart from the sluggish query performance, what's noticeable is the more efficient use of memory. I've opted for a mixed binary! storage design where fixed-width fields are stored in RAM in a single binary! with pointers into a disk binary. The idea is that you'll generally want fixed width records in memory to query against, with variable length records (BLOBs) accessed on disk less frequently (e.g. specific text/binary attachments). All this is then wrapped up into an object so creating a table is as easy as: test1: db-create [integer! 8 string! 12 string! 15] with all other commands (db-insert, db-update, db-delete, etc) working as under v2. Oh, I've also cut the code size from 1,300 lines to less than 400 (75% complete). The final goal is to deliver what RIF promised ... a simple storage mechanism that provides the basic building blocks required by higher-level database systems (akin to ISAM or VSAM files). | |
Ashley: 5-Feb-2010 | All new RebDB v3 released for REBOL3. To take it for a spin, try this: import http://idisk.me.com/dobeash/Public/rebdb.r help db- test: db-load http://idisk.me.com/dobeash/Public/test.bin help test sql select test Extensive documentation in the works (within a week) ... actually a large part of the doc deals with db design [from my POV] covering off on the trade-offs with fixed vs variable length records/fields, typed vs untyped columns and RAM vs speed optimization. Needless to say, I think I've got the balance about as good as is possible with pure REBOL mezz code. This has been a long time in the making ... | |
amacleod: 5-Feb-2010 | A testament to R3 code? | |
amacleod: 5-Feb-2010 | With cloud tech so big now a cool product for rebol would be some kind of server/client DB with built in syncronization methods. I do not know if RebDB can be adapted to fit that bill... | |
Janko: 5-Feb-2010 | this is very cool.. I hope I will be able to study a little what you did.. I was lately playing with creating a simple data storage. To learn more about things and because sqlite has some bad sides , and mysql is not appropriate for my particular usecase. | |
Ashley: 5-Feb-2010 | You can repost in Announce group ... Need to finish documentation first. Is it still pure ram based? ... Yes, but with two important differences: 1) Values are stored in a binary! (reducing RAM overhead by about 50%) 2) Reading/Writing a table to disk is easier/faster (as data is already in binary! ... no conversion required) Think of RebDB v3 as not so much a "database system", but a module that adds a new datatype ... table! ... which can be easily acted upon like any other REBOL datatype. old version contained transaction log ... all the higher-level stuff is gone. It's purely a Storage Manager now that enables you to create higher-level DBMS systems. A testament to R3 code? ... Definately. The new 'apply and 'assert words among others make things so much easier. I do not know if RebDB can be adapted to fit that bill ... it can. RebDB provides the building blocks for higher-level abstractions (much like ISAM files were/are the building blocks for DBMS's such as DB2 and MySQL). I hope I will be able to study a little what you did. ... I'd wait for the documentation ... the code is highly optimized and rather terse. Without the conceptual model it's rather hard to grok at first glance. | |
Gregg: 6-Feb-2010 | Running from a script I get this error: ** Script error: sql does not allow word! for its 'arg1 argument ** Where: catch either either applier do ** Near: catch/quit either var [[do/next data var]] [data]e Run it again I get this: ** Access error: cannot open: %test/rebdb/test-rebdb.r reason: -3 ** Where: read case load applier do ** Near: read source case [ binary? :content [content] string... Typing "sql select test" in the console works. Great stuff as usual Ashley. | |
Ashley: 6-Feb-2010 | Yeah, the 'sql command is just a console wrapper for the underlying functions. I got tired of typing "db-select test [] []" ... but scripts should definately use the db- functions directly. If you see some strange query results (wrong row(s) being returned or no rows returned at all) ... this is probably due to the binary equality bug I posted in !REBOL3. I'm putting some workaround code in (== instead of =) but working around < and > is a bit tricky! ;) | |
Pekr: 6-Feb-2010 | Ashley - so RebDB3 is not full fledget DB anymore? I mean - if there is no functionality for rolling a log, what happens if there is a power outage for e.g.? Or you write to disk each time, so that RebDB is not memory-only DB anymore? | |
Ashley: 6-Feb-2010 | It works like any other REBOL datatype now, except a table! has structure and defined methods for data access. It's all in-memory ... the developer/user decides when/if they save/load data to/from disk and how often (and the disk write/reads are much faster as the data is binary! already). | |
Cyphre: 11-Feb-2010 | Ashley, if you operating on binary! as a storage I think it would be possible to easily redirect the DB engine to a file! port opened in binary mode no? | |
Ashley: 12-Feb-2010 | Yes. I deliberately designed it so that the index binary (which ideally should always be memory resident) is as small as possible and that the data binary only requires seek and append operations (which are well suited to disk access). I need to do a few more benchmarks, but the next release should include a "data on disk" option. | |
Pavel: 15-Feb-2010 | Ashley would you be so nice and write a little bit about indexing in RebDB? Do it work automatically for all columns, or may the indexed columns be presetted? what in memory representation do you use (map, list, block?). Is indexing done automatically during insertion, or is it indexed by search? THX IA | |
Ashley: 15-Feb-2010 | http://www.dobeash.com/RebDB/rebdb3.html#section-4.6gives a brief but complete idea of how indexing works. The low-level implementation is quite simple: - The index is a binary! with each n bytes (n = idx-size, defaulting to 2) representing on offset into the data binary! (start of row). - The index is sorted by/with a number of columns (left to right) equal to the number of key columns (minimum of 1). - Updates and inserts that break this order set a reindex flag. - Lookup and seek both check the reindex flag prior to searching the index binary! using a binary search ( http://en.wikipedia.org/wiki/Binary_search_algorithm ). - Lookup returns a single row (where # key values = # key columns) - Seek uses Lookup to return a range of values (where # key values <> # key columns) and then does a linear match on each row I'll devote a bit more time/space in the documentation to flesh this out with examples. | |
Ashley: 18-Feb-2010 | RebDB 3.0.2 uploaded (same access instructions as before). Documentation updated ... http://www.dobeash.com/RebDB/rebdb3.html This release renames several db-* functions more in line with REBOL naming conventions (e.g. db-insert renamed to db-append as rows are in actual fact appended not inserted). Overall performance improvements (tested against a 1 million row table): - db-append 1.2x faster - db-append/nocheck option 8x faster than db-insert - sort-idx 2x faster - db-select with REBOL conditions 1.2x faster It's going to get seriously interesting once ports are working properly and I can start benchmarking (and optimizing) disk and URL based direct access. | |
Ashley: 19-Feb-2010 | Exactly. RebDB3 is optimized for "left to right" equality checks ... which in my experience is the majority access pattern. When you have more than one key you are actually imposing a grouping heirarchy upon the data (e.g. a 3 column key of Country, State/Province/Region and City for example). | |
Ashley: 24-Feb-2010 | The index [of offsets] is created by reading a number of columns (min 1) equal to key-cols and inserting both the composite row and the offset into a block which is then sorted by the composite row. For eaxmple: Say we have 2 columns of integers in the index and also assume we have two rows. Reading: 3 2 ... 2 3 .. might create an intermediate block like: #{0034} #{01030102} ; note the #{01} field length indicators} #{0056} #{01020103} which is sorted to produce an index of: #{00560034} Index is updated as rows are inserted or deleted. Some insert and update operations will set a reindex flag which is acted upon the next time a lookup or seek is performed. This index is maintained automatically by RebDB ... you cannot "create" one in the traditional sense of the word. The weakness of this scheme is it assumes that key access is by column 1 OR column 1 & column 2. It doesn't handle the situation where you need key access to column 1 OR column 2 (which in my experience is a fairly uncommon case). | |
Ashley: 24-Feb-2010 | Yes. It's fairly easy to access the dat file on disk via a port! ... as long as some port! bugs are corrected. Once ports are working correctly I'll add file support. | |
GiuseppeC: 13-Nov-2010 | Maybe it's late and my eyes are not working properly. I am starting to use REBOLDB for REBOL2.0. I have read the quickstart guide and now I know how to create a table but.. wait: How do I open the table at the next start of my script ? I cannot find a DB-OPEN function. | |
GiuseppeC: 13-Nov-2010 | Also, I need to store DATE and TIME together and select rows greater than a DATE and TIME value. Does RebolDB support this ? | |
GiuseppeC: 14-Nov-2010 | Any HELP for my problems ? I am stuck with a simple application. | |
Sunanda: 14-Nov-2010 | I'm not a rebDB expert....So take my answers as something to be tested: -- I don't think there is an explicit OPEN command. Simply access the table (with SELECT, INSERT, etc) to open it. Similarly, no CLOSE -- use DB-COMMIT to ensure caches are flushed. --rebDB supports REBOL datatypes. Have you tried creating a table row with a datetime in it? Did you have a problem? | |
jack-ort: 15-Apr-2011 | (From Ashley on 5-Feb-10:) All new RebDB v3 released for REBOL3. To take it for a spin, try this: import http://idisk.me.com/dobeash/Public/rebdb.r when I try this I get an access error - reason: "not found or not valid" Has RebDB v3 moved to a new location ? Thanks! Cannot wait to try it out. | |
Ashley: 15-Apr-2011 | I've moved from MobileMe to DropBox since then. import http://dl.dropbox.com/u/8269768/rebsm.r help db- test: db-load http://dl.dropbox.com/u/8269768/test.bin help test sql select test I'm in the process of rebuilding my Dobeash site and will be adding this (and a few other goodies) along with documentation when done. No ETA, but it can live on dropbox until then. | |
onetom: 16-Apr-2011 | if exists? login: join system/script/parent/path %login.sql [ client/run login ] this would make more sense to me in SQL.r, so any directory with a login.sql could be either a server or client directory | |
onetom: 16-Apr-2011 | it would also make more sense to call it init.sql and provide a client.sql and a server.sql as examples in the distribution | |
onetom: 16-Apr-2011 | if i do a commit *, then the replay.bak won't exist, but the server will still try to execute the session.log, which results in fractional changes: | |
nve: 7-Jun-2011 | Is there a protocol version of RedDB ? In order to use it under Cheyenne with database enhancement. | |
Ashley: 8-Jun-2011 | No, but it wouldn't be that hard to write a protocol wrapper replacement for the SQL function. | |
Group: user.r Formal ... International REBOL User Association [web-public] | ||
btiffin: 9-Dec-2010 | Point of information. Due to time constraints; the motion to vote on a rebol Of The Year counts as dead on the table, unseconded. | |
btiffin: 11-Dec-2010 | Point of Information: Gregg posted two nominations. That goes against current roty rules. One nomination per participant. But, the chair would gladly accept Henrik Kristensen as a nominee, if that is acceptable to all. Motion to include Henrik on the list of candidates. Declare dissent before December 15th. | |
btiffin: 16-Dec-2010 | Point of information. The roty 2010 vote will be held using roty-vote: func [ Candidate [string!] /local ballot-paper ][ random/seed now/precise ballot-paper: rejoin [lowercase candidate "-" random/secure 1e10] print ["your vote is:" mold ballot-paper] print ["your confirmation code is:" checksum/secure to-binary ballot-paper] ] and sending the results of roty-vote "a very hard choice" in a message on Altme REBOL3, to user btiffin and repeated to Maxim The hard choice comes from the nominee list of Robert Muench Nenad Rakocevic Nick Antonaccio Henrik Kristensen Sunanda Brian Hawley Congratulations to all in that respectable list. Vote results, one per participant, will be accepted until the roll over to 2011, Greenwich Mean Time. | |
Maxim: 16-Dec-2010 | as we tabulate votes we will post the confirmation codes here (in random order ;-) this will allow voters to confirm we've properly added their vote to our very sophisticaded vote counting system (a private group which will be made public the moment we announce the 2010 roty winner ). This is to make sure we do not miss your vote due to some possible altme bug. (like the first private post of anyone to me doesn't highlight their name in my PM list). I will be logging off/on frequently in order for my PMs to be properly synced. NB: the voter names are not included in that group, in order to keep the votes anonymous. | |
Sunanda: 18-Dec-2010 | I voted a couple of days ago. My magic code has not appeared. Do I get another go? | |
Tomc: 18-Dec-2010 | my vote is for sale to whomever can get carl to release a new build of anything on solaris. | |
Dockimbel: 13-Jan-2011 | Thanks to all people who voted for me, it's a nice way to celebrate my 10th year in the REBOL world. Congrats to Nick who deserves to be honored for his great contributions. I'm a bit disappointed that Sunanda hasn't win (I voted for him), I guess it will be his turn in 2011. | |
Sunanda: 13-Jan-2011 | (: Thanks Doc -- but I voted for a winner, so that's just as good :) Enjoy your year of ROTYness! | |
btiffin: 13-Dec-2011 | Motion to open Nominations for the 2011 user.r rebol Of The Year awards. Rules to follow same as 2010. Code posted 16-Dec-2010 in this group. Votes posted to btiffin and Maxim for verification. (As a gentle reminder, Bob's Rules requires this motion be seconded to become an open item at the table) | |
Sunanda: 28-Dec-2011 | Thanks for arranging this award for another year, Brian and Max. I've voted for who I think will be a worthy winner -- and I hope everyone else takes the time to do so too. For those who find AltME scrolling a pain, the voting protocol can be browsed here: http://www.rebol.org/aga-display-posts.r?post=r3wp558x302 | |
PeterWood: 1-Jan-2012 | Voting closed a little over six hours ago. | |
btiffin: 25-Jan-2012 | Pleased to announce that the rebol Of The Year 2011 is an honour shared between Kaj de Vos and Nenad Rakocevic. Congratulations gentlemen, your efforts ease and enrich the lives of rebols the world over. Thanks to all the participants, and to all, a great 2012. | |
Group: DevCon2010 ... this years devcon [web-public] | ||
Maxim: 1-Feb-2010 | ok let me rephrase... given choice of: -water gun fights -arguing with Carl about extensions -riding tricked 3 layer bicycle -arguing with Ammon about RIDE -igniting things so they glow and burn -arguing with brian about R3 modules -chilling on someone else's couch under the sun, offering water, while counting topless/wet-shirt females -arguing with Reichart about anything ;-) -getting a hot girl to rub suntan on me -arguing with Gab about liquid -getting a hot girl to rub suntan on me an hour later ;-) -arguing with cyphre about R3 view -tripping under some bizare / insane / gargantuous / dazzling / puzzling / lit-up / babe infested / about to be burned / open-aired - party dome I guess rebol is wayyy at the top ;-D | |
Maxim: 1-Feb-2010 | but seriously there has to be a devcon this year.. its been soo long. | |
Reichart: 1-Feb-2010 | If you search on my name on this page, you will find the newspaper printed at Burning Man. Of note, Pancake was our chef (most burners don't have chefs, we had two, the Pancake sisters). The dust storm did come, and the area around us was decimated....however, the giant camp I designed and built stood strong. http://74.125.155.132/search?q=cache:f1Mza1dKO1UJ:bitethe.com/brb/archive/2006_08_31_C_Thursday_Fear.pdf+%22burn+the+geek%22&cd=4&hl=en&ct=clnk&gl=us This guy made a pitstop in our camp, you can see my construction details behind him above the whiteboard (search on Burn the Geek)... http://marc.merlins.org/perso/bm/2006/ I used reinforced corner plywood bolted to 2x4s. No one else did this, and their designs flew away in the 70km winds... All my parts were reusable. | |
Reichart: 1-Feb-2010 | We had a huge trampoline too , if you build it, beatuiful women will come... http://www.flickr.com/photos/oliviamiao/237414254/in/photostream/ | |
Janko: 1-Feb-2010 | If there won't be any real conf I wote for virtual too.. in fact it would be good to have virtual 1 or 2 times a year anyway .. not all can come to physical, even if the materialize themselves :) | |
TomBon: 1-Feb-2010 | yes, new zealand would be nice. most beautifull country on earth, relaxed people and a nice lake for doing waterski and wakeboarding near rotroua., a very positive location for a devcon. | |
Reichart: 1-Feb-2010 | Maui looks just New Zealand...except it is warm every day... in fact I took almost no pictures when I went to NZ because it looked like my back yard. In the same day on Maui you can see snow, dessert, a dormant volcano, one of the most powerful computers in the world, swim with dolphins, tutrtles and whales, surf, shower in a waterfall, eat food all day picked directly off trees, and sleep under the stars... The second day you can do even more :) | |
Reichart: 1-Feb-2010 | I saw Avatar here in Maui, many people came out commenting that it was like seeing their backyard in a movie... | |
Henrik: 2-Feb-2010 | Aren't there dinosaurs there? I saw that in a movie once. :-) | |
WuJian: 2-Feb-2010 | Buy an island,build a small country on the island, call it the United States of Rebol, | |
james_nak: 2-Feb-2010 | How about a "virtual live" Devcon? Everyone can have a choice of several locations which will both have a physical gathering aspect as well as a connected virtual one. Else Carl can decide and we live with it - We're all used to that paradigm aren't we? :-) That being said, Reichart has been suggesting Maui for some time now. Perhaps it's time. | |
Maxim: 2-Feb-2010 | meeting in person makes it a different experience... we meet virtually every day... to me its the main point of the devcons. | |
GiuseppeC: 2-Feb-2010 | What about using YouTube for a remote delayed conference ? | |
Maxim: 2-Feb-2010 | as I said, the point IS to meet the people you can't normally meet because they are far away. ;-) thing is I know not everyone can attend for a variety of reasons... which is why its usually held in nice places, so it doubles as a vacation. we could schedule virtual conferences every few months.. but they aren't the same as devcons. | |
Janko: 2-Feb-2010 | well I sure can't go anywhere unless it's in near proximity of our country.. Praga would be that luckily :) .. I also think virtual meetings could happen every once in a while.. remote delayed conference .. I never thought of something like that but it's actually an interesting concept :) . It would also produce video "serries" about rebol | |
Janko: 2-Feb-2010 | (I mean the option of Praga is a lucky coincidence) | |
Pekr: 3-Feb-2010 | Max - why I agree that live devcon is an absolute preference, I also think that some even as once Nick A. (or who organised it?) done, could have some possitive effects too. You still have to prepare for it, find your free time to join, and I think that we might enjoy it ... | |
james_nak: 3-Feb-2010 | Perhaps we need a voting mechanism | |
Graham: 4-Feb-2010 | And Chris ? did one a while ago | |
Sunanda: 4-Feb-2010 | <Perhaps we need a voting mechanism> Or at least a way of showing preferences. An AltME checklist could be a starting point. | |
Janko: 4-Feb-2010 | aha, there is already a frappr map? :) .. the huge banner on the top of page it says something about starting to charge.. well I created the mapservices which is free.. you can add yourself on it | |
Mchean: 9-Feb-2010 | speaking of prague, Anthony Bourdain had a great episode on it | |
Mchean: 9-Feb-2010 | looks like a great city | |
PeterWood: 15-Feb-2010 | The only way that I see DevCon2010 being held is if somebody "steps up to the plate" and organises it. With some help (with web sites and payment collection), I could probably organise a DevCon in Kuala Lumpur. It's a long way from America, Australia and Europe. In that sense, it would be an equitable location - everybody would be jet lagged :-) | |
Janko: 17-Feb-2010 | if I ever get any better financially I will organise a RebolCamp here in slovenia.. the catch, it will be real camping in one nice camp in the alpine part of Slo | |
Reichart: 17-Feb-2010 | A bunch of my friends meet in the Nederlands and sort of "camp" for a hackers conference. We use generators! I'm all for in Janko. | |
Will: 18-Feb-2010 | Camping in the wild, great! In a place with crocodiles and lions, .. something to keep Reichart busy!! 8-P | |
james_nak: 4-Mar-2010 | I know there are many who want a physical DevCon but it's now March. What say you? | |
Janko: 21-Mar-2010 | I saw links to all past devcons on qtask today. too bad there are no videos available on pages any more. If someone has them and hosting is a problem I can putt them on some of my servers. | |
Sunanda: 21-Mar-2010 | Qtask does hve some of the DevCon2008 videos available for download; though it does not look like a full set. | |
Group: !REBOL3 /library ... An extension adding support for dynamic library linking (library.rx) [web-public] | ||
Maxim: 9-Feb-2010 | some ideas regarding a possible STRUCT! dialect is more than welcome. short rebol code examples welcome! This will allow me to tailor the engine to how people want to use it. | |
Maxim: 9-Feb-2010 | if you can separate them as: must have: nice to have: and provide them in the order which you can test them on their own, then I'll have a good feel for what I should try to tackle first wrt the /library API. | |
Maxim: 9-Feb-2010 | I want to mention this openly: The name of this altme group is intentionally meant to look RT official. The end goal is for this extension to become THE standard for mapping libraries dynamically to REBOL 3. I want to work WITH the whole community AND with Carl, so that it becomes part of the official "sanctified" R3 toolset. It will be an ongoing project and will probably, eventually, be maintained by several people. So its best to start with a name which implies this, if only so that the group doesn't get renamed later. Please understand that as the extension and host kit capabilities are improved and changed, this extension will try to keep up. Its even possible that noteworthy efforts in this project might ultimately alter REBOL3 itself, so please feel free to participate, even if you aren't intent on testing/using the extension right away! I resisted in giving this project any special name... its as plain and obvious as can be... so it should be obvious that ITS AS MUCH YOUR PROJECT THAN MINE. | |
Henrik: 9-Feb-2010 | Maxim for more lasting documentation, please create a wiki page for what design decisions are made and for general documentation. Thanks. | |
Maxim: 9-Feb-2010 | Henrik, Good point. Will do when a prototype is doing at least "something" . I will note, though, that if someone wishes to *officially* take up this task (especially testers which will have their hands at it), I will be more than happy. My time is sparse, and documentation is time consuming. | |
TomBon: 9-Feb-2010 | maxinm, since english is not my native language, documentation is quite hard for me. but if this project e.g. need a public server for datasharing or whatever I can provide a virtual host with slicehost or linode. just mentioned in case of... | |
Maxim: 9-Feb-2010 | Oldes, I'll admit I never liked the R2 /library API. its difficult to understand and feels more like a permanent work-around than a complete solution. I'd really like to allow access to external libraries with a lot less fuss. | |
Maxim: 9-Feb-2010 | One idea I have is to use C-like source strings as the interface to describe the functions (so we could import .h files directly, when possible). but that will be for a release down the road. | |
Maxim: 9-Feb-2010 | But first, I'd use a native rebol ANSI C90 source tree format (tokenized, pre-processed, un-wound error-free source tree data). The /library extension would then only manage declarations (funcs and structs, for now), assuming funcs to be external library declarations. | |
Maxim: 9-Feb-2010 | the source tree format could also be used by Cyphre's jit, an LLVM extension, Rebcode, or things like that, as a common target. so we can all share efforts. | |
TomBon: 10-Feb-2010 | maxim, from the userside (this is how I can talk about /library) the wiki from ladislav sounds very good. containing all solutions for the current problems (pointers, fixed length arrays, nested structs, conversions). the pointer conversion is cool too. what about taking the current solution and these ideas from ladislav as a clean base and built later additional higher abstraction layers for e.g. automated C header or calling conversion? | |
TomBon: 10-Feb-2010 | as said, for me as a 'normal user' I would like to shielded from lower level languages like using MASM or C as long as I only intend to use precompiled external libs which I guess is the most using scenario for /library. | |
shadwolf: 10-Feb-2010 | Maxim your feeling around the R2/load library is the feelling we all get that's why in R3 so much work have been done to improve it and i think it's a real good path. | |
shadwolf: 10-Feb-2010 | for example actually being lua ruby or python most of their "regular" use are to be merge as plugin into a host application that shares data with them Allowing to set up a base that will not change and an extention that will be faster to create ... This point is still in my opinion a strutural problem in rebol since in rebol data structure are hum ... special and cool. One thing you can't do in rebol and that will miss us alot is for example the hability to create a ready made structure in memory and map a file content directly to it. (For example in case of "memory dumped files" in C ...) I could provide a detailled example but i think most of you saw what was my point... | |
Cyphre: 10-Feb-2010 | Maxim, I'd suggest to look how CTYPES module for Python works. I think the have iplemented some interesting ideas which could be a good inspiration...http://starship.python.net/crew/theller/ctypes/ | |
Maxim: 10-Feb-2010 | replies in order: @ pekr, I am well aware that extensions and /library are different. R2 is not such a very easy way... I've cursed so many times trying to use it in "real life". sea would make your life importing a comple API much easier but its not required... the source tree format is the basic interface. which you can submit directly, just like in R2. | |
Maxim: 10-Feb-2010 | @ all, since there is no struct! or run-time generated datatype in R3 we basically have to start from scratch... we do now have a handle! datatype which is just like a pointer, which can be used as a reference to /library allocated RAM. to help with visualizing my ideas here is an idea of how I see the /library import process happening: maybe it will help relax apprehensions I have created earlier ;-) ;------------------------------- ; importing libs ;------------------------------- user32-lib: retrieve-library 'user32 [ GetDesktopWindow: :int32 ] OpenClipboard: :int32 [Wnd: int32] close-clipboard: :int32 "CloseClipboard" ; note: renamed! ] my-lib: retrieve-library 'myown.dll [ do-this: :char* [my-arg: complex-struct* ] "DoThis" get-that: :super-simple-struct* "GetThat" ] ;------------------------------ ; declaring structs: ;------------------------------- super-simple-struct: [ x: int32 y: int32 ] complex-struct: [ value: char* ; a C string value2: int32 int-array: int32 [50] buffer-ptr: byte* [4096] struct-vals: sub-struct [ value3: int64 value4: int32* ] sub-struct: super-simple-struct struct-ptr: super-simple-struct* struct-array-ptr: super-simple-struct* [50] ] ;--------------------------------- ; calling library stubs ;--------------------------------- window: user32-lib/GetDesktopWindow user32-lib/OpenClipboard window user32-lib/close-clipboard ;--- ; with structures ;--- ; on alloc, all members which aren't explicitely set are either set to 0, or point to 0 filled arrays and structs. my-lib/do-this alloc-struct complex-struct [ value2: 2995 ] coordinates: my-lib/get-coords ;----------------------------------------------------------------------------- that's what I mean by simple :-) This is just a plan, an idea... its not a specification nor is it set in stone in any way. | |
Maxim: 10-Feb-2010 | people have to realize that R2 has routine! and struct! types. we don't in R3. so it a clean slate, I can't just improve the R2 system... there are fundamental differences in the API which add features, but also remove some... due to this fact. | |
Maxim: 10-Feb-2010 | @ shadwolf, wrt memory dumping of structs... yes... easy. they will be flat memory chunks in RAM, managed with malloc/free so we could easily just dump the bits to a file. | |
Maxim: 10-Feb-2010 | note that the /library extension will NOT trample or play within the R3 memory/GC if I can prevent it. this is to sidestep the MANY stability issues (some incurable) which I have had to deal with when using R2 struct! types in lib calls. the fact that the /library lives outside of the core is a very welcome improvement IMHO. it does mean that we will be duplicating/copying RAM... but this happens in other languages as the default for any series manipulation... we'll see how it evolves, but it may be possible to share some memory intensive datatypes, like image!, and vector!... That will depend on the evolution of the extensions system itself. | |
TomBon: 10-Feb-2010 | --------------------------------------------------------------------- C-Header --------------------------------------------------------------------- typedef struct { double *data; long size; long datasize; long firstvalid; } Array; typedef struct { Array dt, op, hi, lo, cl, vol, oi; long size; long datasize; long reccnt; char path[256]; char name[16]; char description[48]; char symbol[16]; char cusip[12]; double begindate; double enddate; long type; long frequency; long datatype; long optiontype; double deliverydate; double strikeprice; } Bars; --------------------------------------------------------------------- maxim, here e.g. is the problem with my lib. I can allocate, read and write data to the first Array struct. One strange thing here is it works only if I pass the pointer as third array binary! to the lib, the requested double fails. the array is also part within the bars struct. in this case rebol is passing the substructures as pointer which fails too. char arrays for name desc.. and cusip fails either. my 'must have' requirement would be that /library should able to handle these standard structs without going 7 corners. so working with pointers is a pain and nested strucs and char-arrays are not existend... | |
Maxim: 10-Feb-2010 | thanks tom... that is a very nice real-world example I can work with. Do you understand the quick and dirty examples I gave above? looking at it and without any other explanation, do you think you would be able to map your example struct and would it solve all your current requirements (assuming all the types are supported, of course)? the one thing I DO NOT plan on supporting right now are unions... they just make a simple thing complex for no reasons... and they aren't that often used in the field anyways (for that very reason). | |
TomBon: 10-Feb-2010 | with a functional /library interface stuff like this will be possible in rebol, quite interesting. If you like visualisation take a look here: http://www.panopticon.com/demo_gallery/d_bats_usa_ex_demo.htm for an overview: http://www.panopticon.com/demo_gallery/index.php | |
BrianH: 10-Feb-2010 | It occurs to me that if you want to go the LOAD/library way, you could have the library spec be a parameter to the /library option. It could then return a module that wraps the library, kind-of a mezzanine extension. | |
TomBon: 10-Feb-2010 | and to complete it before I promise to stop bothering with this again, a blocking user interface in 1985 was acceptable but today? (task! please!) | |
Robert: 11-Feb-2010 | Transforming the C side from R2 to R3 is pretty simple. I have enhanced my "in-house" DLL with a R3 interface in a couple of hours. So, now it can be used from R2 and R3. Same interface, some functions. | |
Robert: 11-Feb-2010 | So a good way could be to generate a R3 C based extension wrapper around the R2 used function and use the R3 extension interface. It's much better and simpler to use. | |
BrianH: 11-Feb-2010 | Robert, we can do that already. This group is discussing a project that is taking another approach, though is built on R3 extensions. |
52201 / 64608 | 1 | 2 | 3 | 4 | 5 | ... | 521 | 522 | [523] | 524 | 525 | ... | 643 | 644 | 645 | 646 | 647 |