• 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
r4wp5907
r3wp58701
total:64608

results window for this page: [start: 17601 end: 17700]

world-name: r3wp

Group: SQLite ... C library embeddable DB [web-public].
Robert:
4-Jan-2009
Ok, I thought there was a different trick. Well, I'm not using JOINS 
nor VIEWS a lot in my app. I preferr to get back Rebol blocks and 
traverse these and collect what I need. Much simpler than hacking 
long SQL statements.
Robert:
20-Jan-2009
Do you have a use-case for this? Never had this requirement.
Pekr:
20-Jan-2009
use case? proper national sorting? IF you do some SELECT on field 
like last name, and you want some in-between results, e.g. A - D, 
then Czech alphabet has C with a hook upon it, and it is supposed 
to sort right after C, but without collation support it will sort 
after Z ....
Robert:
20-Jan-2009
Putting this into SQLite would require, that we add those country 
specific sorting rules at the C level and provide a Rebol call, so 
select the correct sorting.
Robert:
20-Jan-2009
Do you have any references to an country specific sorting implementation? 
Than I can take a look how to add it.
Robert:
20-Jan-2009
And than have those collations hard coded to a Rebol SQLite DLL.
Pekr:
20-Jan-2009
REBOL SQLite DLL? I don't want other DLL ... We need better interfacing 
to do it in REBOL as a binary, with back-pointer from C level :-)
amacleod:
27-Feb-2009
I'm getting errors when I try to insert a binary file into sqlite


I have no problem when I read/binary an image from disk and insert 
it but when I download it from a mysql db its saving as those crazy 
text characters.


I'm converting it back to binary with "to-binary" and when I probe 
it it looks right but it keeps converting back to the original mysql 
output...

Any ideas what might be going on?


I can view the outputed image  from mysql when I use to-binary so 
I know that its not currupted.
amacleod:
27-Feb-2009
Actually size of the image does not seem to be the prob as this works: 

SQL reduce [{insert into images values (?,?,?,?,?,?,?,?)} "img/1" 
"img/2" "img/3" "img/4" "img/5" pic "img/7" "img/8"]
where pic is a large 4000x3000 full color photo.
I get no error.

But if I loop 50 and insert the above data 50 times I get an error???
Robert:
27-Feb-2009
IIRC there is a bug in Rebol's GC that can show up when using big 
datasets and corrupts data. Have you tried to play around with RECYCLE
amacleod:
27-Feb-2009
I'm able to get a large set of results from mysql and use it (View 
the images in a layout) but when I try to insert this data into sqlite 
it seems to get currupted...
It sounds like a sqlite problem...
Robert:
27-Feb-2009
You have to try. The SQLite driver uses a heuristic every 100 rounds 
or so. Just play around to see if it makes a difference.
Pekr:
27-Feb-2009
Robert - what is your preferable method for "DLL interface"? Is it 
a mixture of rebol dialect (as in R2) and plug-in aproach?
Robert:
27-Feb-2009
Overall I don't care to much, which way we go. It must be simple 
and straight forward to use. And we must have a way on the Rebol 
side to privode the C side of life. Like pointers and structs etc. 
without tricks.
amacleod:
28-Feb-2009
Robert, 'recycle' worked like a charm!
Thanks a lot.

I had the same problem when reading from the DB so I used 'recycle 
again in hte query loop....

This had the added benifit of of sealing amemory leak with the images 
too.

Memory would increase evrytime a new image was displayed but now 
it tops out at an acceptable level..
BrianH:
28-Feb-2009
Right now 2.7.7 is not being worked on at all. That sonds like a 
good thing to fix when we do start working on 2.7.7.
[unknown: 5]:
28-Feb-2009
I like  2.7.6 is the last of the 2.x series.  Brian may release a 
library containing updated mezzanines and patches.
BrianH:
1-Mar-2009
We find new bugs in R2 natives all of the time - Carl just found 
one in the last week. There will likely be bugfix releases, but no 
incompatible changes will be made to R2 anymore, afaict. All of the 
new functions in R3 and incompatible improvements to existing functions 
will likely be made in a separate script that you can load or encap. 
That script will be maintained outside of the R2 update cycle. I 
think that will be the plan, at least.
Graham:
1-Mar-2009
I think it will be a long time before R3 is usable in the real world 
... so my understanding is that there will still be 2.7 releases.
Janko:
11-Mar-2009
It worked for me but now I started to get "Not a database or encripted" 
error and I couldn't figure out why.. I discovered that the sqliteadmin 
app was making v2 files now and that was the problem.
Janko:
11-Mar-2009
a view into db file as hex quickly resolved which version is which, 
it is written at the start, and so I saw what is going on, thanks 
Petr
Janko:
17-Mar-2009
aha.. I am getting somewhere .. it alows it now but I get some error 
with .so .. maybe this is the reason cheyenne can't open it either 

>> do %sqlite.r
Script: "SQLite driver" (26-Nov-2008)
REBOL - Security Check:

Script requests permission to open a port for read/write on: libsqlite3.so
Yes, allow all, no, or quit? (Y/A/N/Q) Y
** Access Error: Cannot open sqlite3_prepare_v2

** Near: *prepare: make routine! [db [integer!] dbq [string!] len 
[integer!] stmt [struct! [[integer!]]] dummy [struct! [[integer..
Janko:
17-Mar-2009
aha.. stupid me.. apt-get usually doesn't provide latest versions 
but a more "stable" ones ... yes it's  3.3.8
amacleod:
1-Apr-2009
I did not realize sqlite.r was set up to use mysql3.so (linux libs) 
Got my app running on linux witout a hitch...
Auto detects OS...great!
Janko:
11-Apr-2009
this might be usefull to users of sqlite.. I yesterday encountered 
the "db is locked" error and it got me a little worried, but with 
this (simple) aproach it seems to solve that http://itsystementwicklung.de/pipermail/list-pysqlite/2009-April/000380.html
Janko:
14-Apr-2009
I don't get this ... I started getting very long loading times with 
my webapp when I changed or inserted the and it was very fast before 
... now I saw that it's the sqlite making these delays.. this is 
not the problem of sqlite.r but the sqlite itself because I get the 
same behaviour with sqlite3 shell.


But I can't believe this , I am certain I am doing something wrong.. 
I remember sqlite can handle GB of data and is very fast, but in 
my case... I have 183 rows in a simple 5 column table (db file is 
10kb) .. if I do single update table X set y = ".." where Z = ".."; 
 it takes like 3 seconds. This updates just 1 row out of 183. Does 
anyone have any idea? I tried to do the "Vacuum" command but it's 
the same after it.
Janko:
14-Apr-2009
I also added the indexes now and it is maybe a little faster but 
on single where but on both that I need it looks more or less the 
same (select by same condition is imeddiate)
Janko:
14-Apr-2009
This is a very small VPS, but I have 300kb raw rebol data structures 
in ordinary files, and I edit and seek them without any indexes and 
it works immediatelly..  I only moved this part of data to sqlite 
because it handeles the file locking ( these are sort of mailboxes 
so that the app and bots can communicate over them )
Janko:
14-Apr-2009
Because times vary from 1s to 5s I suspect taht vps's disk or something 
might be a little owerburdened, but as I said 300kb rebol (this is 
10kb) worked im ms range according to cheyenne
Pekr:
14-Apr-2009
simply put - how db chooses, which index to use? You have them separate 
as well as mixed. I would use mixed index (domain,user) only if those 
two fields would be defined as a primary key together ...
Janko:
14-Apr-2009
(maybe I just need a better VPS)
Janko:
14-Apr-2009
aha, I will try that .. and I can use Integer for user ... because 
now each user get's folder like u<Int> ... and I could maybe put 
all 3 mailboxes into the same table so it would be only 1 insert 
/ update instead of 3 on changes ... I didn't think performance will 
be the problem here (it still seems a little funny) , because it's 
just a simple table without any relations or anything and no big 
amunt of data
Janko:
14-Apr-2009
I used sqlite here and there for more real DB work and I never seen 
any critical slownes (extept if you do a typical like inserting 100 
rows each in it's own transaction (without begin commit), in fact 
it seemed always very fast to me ... thats why I suspect all this 
wouldn't show up if I had some better VPS. Also because if fluctuates 
so much I suspect disk on computer vps is on is maybe busy doing 
other stuff so at one moment it is idle and it works faster at another 
it waits for >3 seconds
amacleod:
16-Apr-2009
Is there a way to reorder columns in SQLITE?
amacleod:
16-Apr-2009
works...thanks a lot. 

I had this fear of having to change large parts of my code if I added 
or removed columns...This solves that problem.
Janko:
21-Apr-2009
I understood the text in link that if you get a lock, you wait for 
a while and try again.. and that by this method even it scales to 
quite big number of concurr processes compared to mysql for example
sqlab:
21-Apr-2009
trying again is already implemented in sqlite.r in the function do-step.
I expanded the wait time with a random duration up to one second.
still not good enough

And now additionaly I connected and disconnected according the link 
.
Again I encountered locks
sqlab:
21-Apr-2009
a few 10k times
sqlab:
21-Apr-2009
sorry, that was the number of statements until a lockk occurs
Janko:
21-Apr-2009
He tried only 100 times (by looking at the example he gave) .. and 
I don't know what he means by 500 >>> in line with mysql 

and others- at 500+ simultaneous users you start to get about a 10% 
drop 
because of lock overhead. <<< 


Most probably not 500 processes writing all the time ...  without 
delays
sqlab:
21-Apr-2009
no difference, sooner than later I get a lock, even with 100 retries 
after less than 1000 statements
Robert:
21-Apr-2009
sqlab, use a proxy process that does the priorization. Send requests 
from client to proxy-process and this one handles 1 connection to 
the database.
sqlab:
21-Apr-2009
Maybe my test settings are different from your  requirements.

During testing I let two concurrent processes insert a record with 
three fields, one ip address, a timestamp and one text field with 
variable length from 1k to 8k., and this i do with full speed
Robert:
21-Apr-2009
I'm pretty sure a proxy process can handle 200req/s at the frontend 
and backend. So if 200req/s is the maximum you can get from one process, 
adding more processes just devides this down. But it won't scale 
up.
sqlab:
21-Apr-2009
Robert, that could be a solution.

Unfortunately I observed a crosstalk of events with many ip connections, 

means one process is awakened  without data available, if I send 
data additionaly on the same server via ip
sqlab:
21-Apr-2009
If I have some processes serving incoming events and sending their 
data to a central storage process, the central process sometimes 
seems to get an event, but not the data with that event.
When the data really arrives, I do not get the event.
Maybe he got the first event meant for an other connection
Janko:
30-Apr-2009
only that fast (at sqlite) is still a little problematic to me
Janko:
30-Apr-2009
yes, I know for that .. that would come into play if I would be doing 
10 inserts for example ,.. with begin commit it would take just 1/10 
of time as without , but I am doing a simple sql scentence here. 
and I tried begin/commit also with this.
Janko:
30-Apr-2009
I talked about this in detail a while ago.. now I optimised the problem 
so it's not a biggie any more but I am still mad that all rebol files 
can do changes in moments and when I need to update the sqlite page 
halts for noricable time
Janko:
30-Apr-2009
any query I try :) .. I talked about this to you already :) .. look 
a little up at 14-Apr
Janko:
30-Apr-2009
it's like you have your own computer that you can reinstall stuff 
or OS .. separated from others but it's running on virtualisation 
software so there are many such separate computers per one real computer 
, so it's *cheaper* than paying for having a full server
Janko:
9-May-2009
hm.. I have a question for SQL / sqlite experts : 

I have a query with two JOINS . There is parent table which has 2 
subtables ... in each subtable I need to aggregate (SUM) some value 
... 


select i.*, SUM(ib.price * ib.qty) as amount, SUM(ip.amount) as payed_amount
	from invoice_sent as i 

  left outer join invoice_sent_b as ib on i.id = ib.id_invoice_sent

  left outer join invoice_sent_p as ip on i.id = ip.id_invoice_sent
	group by i.id order by i.title;


The problem is tha because of join , the amount is correct , is the 
sum of values in invoice_sent_b , but payed_amount is multiplied 
by the number of rows invoice_sent_b has . 


I understand why this happens, but I don't know how to prevent it, 
if I want to get all data in one query.


( I know how to solve the prolem , but it's outside the DB so it's 
more of  a hack  -- I also ger COUNT of _b table rows and divide 
second SUM by it on client )
Chris:
21-May-2009
Has anyone done any benchmarks for running scripts from a DB instead 
of from the filesystem?
Chris:
21-May-2009
Say, where there are a moderate number of moderate sized scripts 
- could it be quicker just to fire up an SQLite connection and access 
the scripts/modules from records as opposed to flat file?
Chris:
21-May-2009
Perhaps particularly a CGI environment where each instance is a separate 
process?
Janko:
21-May-2009
If you had persistent connection and if sqlite does some caching 
it could be faster, but if you need to open a connection on each 
request I think it would be much slower because that is more expensive 
(I assume).. it probably also matters how many scripts do you need 
to run per request
Gregg:
21-May-2009
It shouldn't be hard to devise a small benchmark though.
jack-ort:
10-Sep-2009
I apologize if this is a repeat of an earlier message - I thought 
I submitted, but never saw it appear.


Question: With REBOL/View 2.7.6 under Windows XP, using SQLite driver 
v1.0.6, should I be able to use the concatenate operator (||) in 
a SELECT statement?  Query works under the sqlite3 command line, 
and a similar SELECT without the concatenate returns values as expected:

>> sql "select jobid, role from roles where userid = 'cda6'"
== [[1124 prgr] [1125 test]]

>> sql "select jobid || role from roles where userid = 'cda6'"
** Syntax Error: Invalid integer -- 1124prgr
** Near: (line 1) 1124prgr
>>
ManuM:
11-Sep-2009
Try this >>sql "select '' || jobid || role from roles where userid 
= 'cda6'"

I think the problem is the first column is a integer, so SQLite driver 
think the result is a integer ( invalid integer ), with '' the first 
column is a string
ManuM:
11-Sep-2009
Jack, finally I saw the problem


The return of sql isn't two blocks of string, it's two blocks of 
word. So 1124prgr isn,t a valid word and isn't a valid integer

>> a: sql "select jobid, role from roles where userid = 'cda6'"
>> type? first first a
==word


You need to add the /direct refinement to sql and it returns strings

>> sql/direct "select jobid || role from roles where userid = 'cda6'" 
==[["1124prgr"]["1125 test"]]
jack-ort:
15-Sep-2009
Is there a problem with:

http://www.dobeash.com/

seems like domain is up for sale ??
jrichards:
23-Nov-2009
Is it possible to use the sqlite driver for a file that resides on 
the internet?
Robert:
24-Nov-2009
As long as you can access it via a normal file-path, yes. Can be 
slow but should work.
Chris:
24-Nov-2009
I seem to recall a note about locking issues over a network path, 
so ymmv.
BrianH:
6-Jan-2010
The sorting problem with collations applies to Unicode, not just 
UTF-whatever, so it is a problem. Mostly a problem of size: The actual 
colation sorting code is small, but the collation data is large. 
Add more than one or two and REBOL gets huge.
BrianH:
6-Jan-2010
A solution would be to move the sorting out into the host code, where 
it can be made to use any system-specific sorting code, which should 
work for platforms with good Unicode support like Windows, OS X and 
some Linux distros. The problem with that is that the data would 
probably need to be migrated to the host format before the host routines 
could be used; string! is not UTF-8 or UTF-16 internally, it is UCS-8 
(in theory), UCS-16 or UCS-32 (in theory), all fixed-length encodings. 
That would add a lot of overhead to sorting.
joannak:
9-Jan-2010
This unifoce srting seems to be a mess.. Well, technically they do 
have some standards, but trying to even think any decent size implementation 
of that.. 
http://www.unicode.org/reports/tr10/
Group: Games ... talk about using REBOL for games [web-public]
BudzinskiC:
2-Aug-2010
Maxim: But there were two situations like that. You also have to 
decide if you want to help the doctor or help the protoss. Aren't 
these two different missions too? I haven't replayed the game yet 
so I don't know.

Graham: If you ask direct questions like that we have to tell you 
a direct lie ;) Of course it was written in REBOL! How else would 
you make a game like that? I think Carl was personally involved with 
the development of the game. He has mentioned it on his blog somewhere... 
I'm pretty sure about that. And I think he tweeted that he is afraid 
of chicken now because of the similarities to Zerg. He said something 
about "They are watching me, waiting for the right moment to charge." 
He's probably right now making little Overlords out of mashed potatoes. 
Call me a liar and I'll lie again!
Maxim:
2-Aug-2010
wrt the second choice... its the same mission, I think it only changes 
the win rules and spawning rules.   I helped the doctor.  my guess 
is that when you help the protoss,you have to destroy the settlements 
before they all leave.

in the ghost mission, its a completely different map IIRC.
Davide:
5-Aug-2010
bought ! The download is a bit slow, less than 200 K/sec
Oldes:
5-Aug-2010
It's also for wannabe pirates:) No for everybody.. it's a form of 
advertisiment.
Oldes:
10-Aug-2010
I don't know.. I've no such a data. And I do not read Slashdot.
Henrik:
10-Aug-2010
ok, I just stumbled onto an article there and several commenters 
noted they hadn't heard of the game. thought it could be a marketing 
opportunity.
Henrik:
15-Sep-2010
Oldes, a friend asked me what the prospects of an iPad version of 
Machinarium would be now that the dev-tools restrictions have been 
lifted. Is there an official response available anywhere?
Davide:
20-Sep-2010
Yes, it's very lego-ish !!

But it's epic too, have a look here: http://www.youtube.com/watch?v=FaMTedT6P0I

Minecraft web site is currently down, so everyone can try it for 
free: http://www.minecraft.net/
Ashley:
23-Sep-2010
This may be of interest to those of you who need to [quickly] create 
hexagonal game maps ... but don't want to master a complex CAD program. 
My QAD attempt at a declarative solution yields results like this:

	http://dl.dropbox.com/u/8269768/ACW.png

The prototype code can be found here:

	http://dl.dropbox.com/u/8269768/MapMaker.zip


No documentation, but the sample map file (ACW.r) shows how the PNG 
above was generated. Note you can drag the map around by click-moving 
it. Map, game and software still WIP.
Ashley:
23-Sep-2010
Thanks. ACW.r coded by hand, but helped by the fact that I used a 
real map as a background image to trace over (the compass rose method 
of indicating paths is really easy ... "start in Cairo, go 3 hexes 
north, etc"). By comparison, I spent days trying to get the same 
results with CC3 (Campaign Cartographer 3) ... but I'm only a casual 
CC3 user.
Oldes:
3-Mar-2011
Machinarium's PlayBook version mentioned on GDC:

http://unplugged.rcrwireless.com/index.php/20110302/devices/7239/we-play-with-the-playbook-at-gdc-video/


Unfortunately it requires to be in AVM2 bytecode (usingActionScript3) 
so I must rewrite the game :/  But I use REBOL to help me with the 
task and a nasty REBOL script to scale the game to the correct resolution 
1024x600.
Oldes:
4-Apr-2011
We just released one smaller project. It's Flash again, and almost 
no REBOL used this time.. only just a few file manipulations and 
find/replace while moving from AS2 to AS3 code :/
http://amanita-design.net/games/osada.html
Oldes:
8-Apr-2011
that's not a demo, it's just a small free (if you want) game. And 
we are Amanita.. we eat muchrooms;-)
GrahamC:
8-Apr-2011
I just saw a flame thing ... killed it
Maxim:
12-Apr-2011
anyone here play GT5.... I'm so pissed off by this game.


everytime I play I get aggravated.  If anyone here is a game designer 
this is the game to study about how *not* to build a game.
Maxim:
12-Apr-2011
from the stupid menu and useless extra screens (which are slow to 
load, pointless, irritate and can't be turned off), to the cosmically 
idiotic AI which repeatedly slams your car if you dare get into the 
driving line until it eventually drives you out of the road wtf?... 
funny that they don't bounce out... did the authors forget the basic 
laws of physics... the same force is applied to both objects in a 
collision.


I mean like come one.  even GT3, 15 years ago, was more fun and actually 
felt a lot more real in many things.


the braking is ridiculous and many times, cars just spin out of control 
completely randomly.  NASCAR racing is totally bullshit.
Ladislav:
12-Aug-2011
Just tried it, and it does not look like a dan level at all
Endo:
13-Aug-2011
Ladislav: Yes I thought that it is not dan level. I'm not good on 
Go but I mostly win until 2-4 kyu on IGoWin.

Gabriele: Many Go player says that you should not play with a computer, 
instead, play a human. Or start with a higher handicap.
Its AI is much more difficult than Chess.
Reichart:
14-Aug-2011
Endo, that was perfect.! Thank you, it is good enough to "play with" 
to teach a person the basic play.


I was hoping for online version of EXACTLY this.   The two online 
versions appear to be free of A.I. unless I'm missing something. 
 They are lobbies where you can jump into a game with someone.

good A.I.

 is not important to me, just good enough to confirm basic rules, 
 attempt to win, etc.  You know, something that could replace any 
 president of any country, that type of thing ~
Ladislav:
14-Aug-2011
If you want to try more alternatives, Reichart, then there is the 
gnugo program, which may be worth a try as well.
Endo:
14-Aug-2011
Not free?? I played it for a long time :)
Reichart:
14-Aug-2011
Kaj, nothing like a big cup full of hot http://en.wikipedia.org/wiki/Equivocation
in the morning, eh?  You might cut Endo a little slack (and the rest 
of us) since "free software" can mean several things.  No?


Endo, So I can beat the game in a few seoncds now, so I assume I'm 
doing something wrong LOL.

As it stands, when you start the game is gives black 5, and white 
1.  And it is not a 19x19 board.
Perhaps this is part of being the "free" version (as in $ LOL)?


To win al lone needs to do is draw a single line across the board 
with the most territory on your side.  Done, you won.
Reichart:
14-Aug-2011
... yup, now that I have won a few games, it is offering to sell 
me the upgrade :)
Endo:
15-Aug-2011
Reichart: computer level stars at 25. kyu, so in first a few games 
it is so easy to win. after several games when your rank is under 
10 it is getting a bit difficult. But if you are a good Go player 
it may not be difficult for you (as I'm not a good one, I stuck at 
2. kyu :) )
But it never offered me an upgrade??

Oh and yes, it is mosly for beginners as its dimension is not 19x19.
Ladislav:
15-Aug-2011
I'm not a good one, I stuck at 2. kyu

 - I don't think the sentence makes sense. 2 kyu is quite solid strength. 
 On the other hand, the strength estimates of the program are highly 
 unreliable.
Kaj:
15-Aug-2011
Gabriele, we were discussing a GNU program, which set the context, 
and I specifically capitalised the term to avoid ambiguity
Reichart:
15-Aug-2011
Kaj, .... Gab pretty much nailed it.


Endo, .... Indeed, so are you saying you can't beat this go program 
every single time in just a few moves?  I seem to be able to beat 
it every single time almost instantly, which I think was Ladislav's 
point.


I'm just confirming I did not simply find a way to beat it as a sort 
of trick.  I used to design AI for games, so I tend to get around 
it pretty quickly.


If you would like I will send you a video of me plaything this game 
several times.
Reichart:
15-Aug-2011
Of note, I still thank you for this program, it  was exactly what 
I was looking for.  Of course it would be nice if it was a little 
smarter, but it is a great program to give to begginers simply to 
understand the "rules" of the game.
Endo:
16-Aug-2011
Reichart: I really want to see to trick :) You can find my email 
address on Altme.

I mostly can guess next moves of the computer, but couldn't find 
a trick to win every game (Well actually I know one, after a game 
finished you can still continue to play, like 2 two players game. 
By that way you can increase your rank.. But this is nothing about 
AI ofcourse.

At the first a few games I can win immediately, but after several 
games (say 10-15 games) then I cannot win easily. After computer 
rank is 2-3 kyu I cannot win at all (as I'm a beginner Go player.)
By the way its help files are also very well to teach the rules.
Ladislav:
22-Sep-2011
I suggest you to try the GNU Go instead, on a bigger board. It is 
more fun, in my opinion.
Reichart:
10-Jan-2012
I don't normally post games, but this is really well done, lives 
in a browser, and does not use Flash http://www.cuttherope.ie/

And it is a cute idea.
Pekr:
10-Jan-2012
I play it on my Sensation for several months. Did not know it is 
a JS implementation ...
Reichart:
10-Jan-2012
I think the Archangel uses a bastardized version of koptic greek 
or aramaic, which both don't really even have vowels...
17601 / 6460812345...175176[177] 178179...643644645646647