• Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

AltME groups: search

Help · search scripts · search articles · search mailing list

results summary

worldhits
r4wp4382
r3wp44224
total:48606

results window for this page: [start: 39001 end: 39100]

world-name: r3wp

Group: !RebDB ... REBOL Pseudo-Relational Database [web-public]
Pekr:
1-Feb-2010
but honestly, Ashley ... absolutly great work. I was using RebDB 
initially, untill I needed few joins, and found out beauty of SQLite.
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 
...
Pekr:
5-Feb-2010
Cool! You can repost in Announce group .... and it could go into 
rebolweek too :-)
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.
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! 
;)
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).
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
Pavel:
15-Feb-2010
Ie I understand from documentation basic index contains offsets to 
each respective record and is coded as binary, but where are the 
indexes used for quick search on columns?
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
1) Couple of good bugs there ... fixing for 3.0.2.

2) Yes. Use all and any to group multiple conditions (e.g. [all [c1 
> 2 c2 < 7]] )
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.
Pavel:
18-Feb-2010
Great news! thanks for upgrade. What about promissed file storage, 
i.e. is ti possible to operate the DB and index binary directly to/from 
file?
Pavel:
18-Feb-2010
Really neat is you may create as many index columns as you need/want 
and then you can use only those ones what makes sence for you selection 
parameters. I.e. you can use multiple indexes/couners above one dataset 
and then use multiple selection for BETWEEN statement for example.
Pavel:
18-Feb-2010
I've got only one exception. If I need different schema for each 
row (like in DevChat for example) I have to use Binary dat ecapsulation 
and sniff in binary  in second level. But multiple index columns 
helps alot in this.
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).
Pavel:
23-Feb-2010
Ashley I think the name Index is little bit missleading the more 
appropriate would be offsets.  Anyway real indexes (ordered lists), 
are you building them on demand each new selection? Ie it is rebuilded 
on each selection or there are not used at all and each selection 
traverses thru data one of three methods?

Or maybe make the question easier is it possible to create and save 
true index on column?
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).
Pavel:
24-Feb-2010
I've tested the length? function over port after inserting the port 
and it works well now, is there other bugs in fileports?
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 ?
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
what is the advised server / client setup? where should be the source, 
the data directory and the login.sql files for the server and the 
client?
onetom:
16-Apr-2011
and the spool file... which is suggested to be called session.log 
but then it will be replayed by the commit * in login.sql if it's 
in the data 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 say set spool session.txt, then it works.. pretty confusing 
default. and i would expect the file created in the current directory, 
not where the db.r file is stored
onetom:
16-Apr-2011
and now i get
Dockimbel:
8-Jun-2011
Cheyenne is able to run RSP and CGI scripts concurrently on several 
processes at the same time. AFAIK, RebDB does not do any locking 
on write access, it would be unsafe to use in the general case with 
Cheyenne. SQLite would be more resilient, but keep in mind that as 
it is locking the whole DB on each write access, it is not scalable.
ddharing:
8-Jun-2011
The new(er) WAL (Write Ahead Logging) transaction mode reduces locking 
and increases concurrency -- http://sqlite.org/wal.html.
Group: user.r Formal ... International REBOL User Association [web-public]
btiffin:
4-Feb-2010
Accepting Gregg's response as a second, for a call to end voting; 
 I'd like to motion that we tally up the votes as per the user.r 
Chat example.  Thanks to all participants, and best of luck to our 
candidates.
btiffin:
15-Feb-2010
Brian Hawley has been voted the 2009 rebol Of The Year.  Congratulations. 
 Thanks to the other nominees and all participants.
NickA:
10-Aug-2010
All the guys working on R3 really deserve to be recognized for their 
talent and determination.
Gregg:
11-Aug-2010
We'll all pitch in and have someone geographically close to each 
key player get them a nice beverage of their choosing.
btiffin:
30-Nov-2010
I'd like to propose a round table vote of acceptance of the voting 
code and procedures posted to user.r Chat, by Sunanda. A negative 
outcome would hopefully be followed by new proposals and discussion.
nve:
3-Dec-2010
I'll nominate Dockimbel ;-) and also Nick Antonaccio
btiffin:
9-Dec-2010
I'd like to propose we accept Sunanda's user.r chat REBOL voting 
code and method.  If no one raises issue, it will be deemed official 
on Dec 15th, and instructions for participation posted.  Voting is 
scheduled to end with 2010, Greenwich Mean Time.
btiffin:
13-Dec-2010
Point of information;  Due to some confusion with Bob's fuzzy Rules 
of Order and to try and keep in the spirit, Brian Hawley will also 
be included in the list of nomincations, unless someone announces 
dissent before Dec 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.
nve:
18-Dec-2010
vote send on AltME message to Maxim and btiffin
btiffin:
12-Jan-2011
Nick Antonaccio and Nenad Rakocevic have both been voted in as the 
2010 rebol Of The Year.

Congratulations to all our nominees, and well done.
Maxim:
12-Jan-2011
Nick Antonaccio and Nenad Rakocevic have both been voted in as the 
2010 rebol Of The Year.

Congratulations to all our nominees, and well done.
Sunanda:
13-Jan-2011
Congratulations to the winners, Nerad and Nick!!

And much thanks to the organisers, Brian and Maxim!
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)
btiffin:
25-Dec-2011
Point of information.  Votes, generated using roty-vote, from 16-Dec-2010, 
to be accepted by btiffin and Maxim until the end of 2011, Greenwich 
Mean Time.
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
btiffin:
2-Jan-2012
I'll be starting that today, and when I can get synched with Maxim 
we'll go over results.  Thanks to those that participated.
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: !REBOL3 ... [web-public]
Henrik:
9-Feb-2010
I looked at Ratio's import-email function on the blog and was wondering 
if R3 is supposed to have an import-email function? He claim's R2's 
import-email function is buggy and there is really an unfixed report 
in RAMBO.
Graham:
9-Feb-2010
and a chat message .. tcp outages on rebo.net
james_nak:
10-Feb-2010
Here's a newbie question:  In general, do scripts written for R2 
run under R3 as is or are there specific changes one must go through 
first.  I read that many of you are running older projects in R3 
and wondering how you are approaching the changes that might exist. 
Thanks.
Sunanda:
10-Feb-2010
Ladislav and I have both written about our early experiences:
   http://www.rebol.org/art-display-index.r?a=R3

Note the use of the RCO object (REBOL Compatibility Object)  that 
attempts to make scripts R2 and R3 runnable.
james_nak:
10-Feb-2010
Thanks Sunanda. I've been holding off R3 as it takes "my all" just 
to write stuff in R2 and generally they are tools that "have to work." 
I feel badly though because so many of you are putting so much effort 
into it. I could definitely give a non-guru perspective. Thanks for 
all you guys do.
Claude:
10-Feb-2010
do and import are the same or not ?
Claude:
10-Feb-2010
Another method of importing modules is supported. If you use do on 
a module file, it will also be imported. This is provided as a convenience, 
because do has been used in REBOL for years as a way to load and 
initialize additional functions and values.
BrianH:
11-Feb-2010
Claude, DO and IMPORT aren't the same thing at all. Scripts (loaded 
by DO) have a different context model than modules (loaded by IMPORT, 
DO or better yet the Needs header). Your scripts above don't set 
their type to module, don't export words, and have no name - they 
basically aren't modules. You should use DO and treat them as scripts 
until you better understand the module system. Ask in the "!REBOL3 
Modules" group here for more details and help, if you like.
BrianH:
11-Feb-2010
(UN)PROTECT/lock is needed for module header security. Compressed 
modules are done and submitted (in theory), just not released yet. 
Delayed init is delayed until Carl explains a little what he means 
by that. The rest of the core design works,
BrianH:
11-Feb-2010
Docs are not yet done enough - we need docs. And there's no prebol 
yet, for app bundling.
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
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.
Pekr:
1-Feb-2010
I prefer live conference, but it there should not be one for years 
to come, virtual ones are good too. In fact - they don't contradict 
one each other. And it strengtens ppl's relationship nonetheless
Will:
1-Feb-2010
Head Geek Reichart, who carefully planned the camp using $8 million 
Department of Defense software, felt confident his double redundancy 
system would work. His plan was to be hyper prepared to balance and 
offset anxiety people may be feeling.
 HAHAHA 8-))
Will:
1-Feb-2010
Buuu, virtual.. We should try hard and meet!
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 :)
TomBon:
2-Feb-2010
reichart, maui is for holiday, new zealand for living ;-) and btw 
 kauai is beautifull as well...
GiuseppeC:
2-Feb-2010
No, Catania is in Sicily, udner the Etna Volcano and near Taormina.
Pekr:
2-Feb-2010
One day, once we rebollers become rich, we buy some nice piece of 
land ourselves. It will be renamed to Reui ... and new GUI system 
will be called the same name :-)
GiuseppeC:
2-Feb-2010
Etna erupts from time to time, it is not an explosive one and never 
much dangerous. However there are low intensity earthquakes too....
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.
james_nak:
2-Feb-2010
The point is to have different meeting places that  are  "in person" 
and then all connected for the "virtual" part. Actually we've always 
had virtual access at the Devcons but not multiple meeting places. 
I say this because that may make it easier for all to meet.
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 ...
Janko:
4-Feb-2010
this reminded me, there should be some reb/altme map where you could 
point yourself into so we can see where we all are location wise 
.. we did this in indiegamer community and it was cool.. Then you 
can see if you can meet locally.. what was that webapps name..?
Graham:
4-Feb-2010
And Chris ? did one a while ago
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 :-)
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
Janko:
2-Mar-2010
no yetis either :) the most dangerous things roaming around here 
are brown bears and some crazy cows :)
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.
Group: !REBOL3 /library ... An extension adding support for dynamic library linking (library.rx) [web-public]
Maxim:
9-Feb-2010
I just created this group, so we can focus on this specific and community 
sponsored extension.
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.
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
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
we could then use tools like the !sea source parser and simply provide 
an easier way to declare the library functions (using the actual 
C source itself), as like I hope to be able to do.
Pekr:
10-Feb-2010
maxim - what is 'sea? Please beware, that /library interface is supposed 
to NOT replace Extensions. It is supposed to allow us to link to 
libraries in very easy, R2 like way. Requiring any other tool should 
be prohibited .... just structs, routines and dtype conversions ....
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?
Oldes:
10-Feb-2010
I agree as well... mostly peope would like to use /library instead 
of extensions to do simple things like:
kernel32.dll: load/library %kernel32.dll
set 'MoveFile make routine! [
		"Moves file using OS"
    lpExistingFileName  [string!]
    lpNewFileName [string!]
] kernel32.dll "MoveFileA"

We don't want to download MS sources from MSDN to parse headers and 
integrate everything what's in kernel32.dll. Of course it may be 
cool in some cases, but we should keep it simple where possible.
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.
Oldes:
10-Feb-2010
I was recently working on Imagick dll. Firsty I have got almost all 
routines but than and I ended with routine preprocessor which makes 
only routines I really need to load/save/scale images instead including 
all of them in my script.
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...
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
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
well I don't understand all but some parts I like to see..e.g.  this 
here -> value: char*  | and of course this -> struct-array-ptr: super-simple-struct* 
[50] :-))
39001 / 4860612345...389390[391] 392393...483484485486487