Re: [fpc-pascal] CloseThread needed? still unclear

2011-11-28 Thread noreply
 Am 14.11.2011 02:32, schrieb nore...@z505.com:
 First I thought I would post this to the mailing list to ask you what
 the
 proper way to program with threads is. If we must call closethread on MS
 Win machines but not unix machines, then something needs to change to
 make
 the threading in the RTL more cross platform (and all the docs would
 need
 to mention things about closethread if it is needed).

 The bug was already mentioned here
 http://mantis.freepascal.org/view.php?id=13160 and fixed for 2.2.2.
 CloseThread was implemented in a cross platform way.

 Regards,
 Sven

Hmm, but the compiler I'm using right now is a 2.4 and I think there is a
leak if I don't call closethread. CloseThread was implemented for
EndThread or how does it get called? I think the closethread has to be
called outside the thread rather than inside the thread from what I tried,
but I don't know.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] CloseThread needed? still unclear

2011-11-14 Thread noreply
While testing an updated version of nYume (aservia) I found that the
program is leaking thread handles on Ms Windows. The program uses
BeginThread and EndThread calls.

However, when I add CloseThread() right before EndThread(, the program no
longer leaks handles. So, CloseThread may be needed on Ms Win machines. I
don't think (all) the docs state to call closethread. If CloseThread
should be called on Ms windows, then this makes cross platform threading
difficult since windows requires something different than unix.

I don't know if the object oriented TThread uses CloseThread in it's
backend code and don't know if TThread leaks, I was just trying
beginthread and endthread style.

To find handle leaks, I simply use Windows Task Manager to monitor the
processes, with the Handles column visible. I am also trying some other
tools like DrMemory.

First I thought I would post this to the mailing list to ask you what the
proper way to program with threads is. If we must call closethread on MS
Win machines but not unix machines, then something needs to change to make
the threading in the RTL more cross platform (and all the docs would need
to mention things about closethread if it is needed).

The compiler is 2.4.2 and 2.4.4 that i am using.

The documentation is here:
http://www.freepascal.org/docs-html/prog/progse44.html#x217-2310.2

But there is also more documentation elsewhere, such as the RTL docs.

I guess I could look into Delphi to see how they use closethread. in their
backend somewhere.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] ioda joda fulltext search not working

2011-11-11 Thread noreply


 On Tue, 8 Nov 2011, nore...@z505.com wrote:

 Has anyone got Ioda 1.3 fulltext search project working?

 I have it working.


Good. I got 1.2 working recently and had to edit the Config file and set
fileref to 1 for it to work I think.

So you have 1.3 working? whereas only 1.2 worked for me. Hrm.


 Meanwhile Darius Blaszijk and me created an own engine, which we hope to
 release soon. It will be used for the FPC docs (amongst other things).
 If you're interested and Darius agrees, I can send you a copy.
 It definitely works, I also use it in a commercial project to implement
 full-text-search on a firebird database. And it works with any FPC
 supported
 database as storage.

Interested!

L
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] ioda joda fulltext search not working

2011-11-11 Thread noreply


 On Wed, 9 Nov 2011, Graeme Geldenhuys wrote:

 On 9 November 2011 10:40,  michael.vancanneyt@. wrote:
 It definitely works, I also use it in a commercial project to implement
 full-text-search on a firebird database.


 Now that would be pretty awesome! :)

 It is.
 When I showed it to the customers, they were very impressed :-)
 (considering their question was 'we want to do like google search but
 on the database')


I was reading recently that MySQL has fulltext on InnoDB built in.. don't
know much about it but I came across that recently while googling.
Firebird has no fulltext built in to it I guess, eh?

Also does the Ioda Joda have positions of your search words found? Or it
just weighs the results and throws away any positions of the words. I.e.
if the first instance of searchterm was found, does it record that
position, or just throwaway position info?  I was thinking of using it
like google too, but having the positions of the search terms in the
document would help to give a preview of the text like google. Or is there
some other way joda does this? You could just parse the entire document
without using Joda for that (separate utility) and use joda for the
weighting only, but I wondered if joda had something built in to memorize
where the search terms were located in the document.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] ioda joda fulltext search not working

2011-11-08 Thread noreply
Has anyone got Ioda 1.3 fulltext search project working?

Every time I try version 1.3 it doesn't seem to find any words in a file
that is indexed when I try a simple demo with it.

The project IODA is here: http://sourceforge.net/projects/ioda/files/

I make some sample files as follows:

words.txt:
test
the

file.txt:
This is a test file for joda to TEST. If the test works it should index
these test words in this file.


And then I run the command:
joda -s myarchive words.txt file.txt

And then I run a query:
joda -q myarchive test

It returns no results of the word test. Any ideas?
I compiled Ioda 1.3 it only after making some minor modifications to fix
his procedure:=procedure assignment code.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


<    1   2