Re: [fpc-pascal] Re: Converting code from C++ to FP....

2011-03-20 Thread Micha Nelissen
Jorge Aldo G. de F. Junior wrote: const has the same effect as fpc const before a parameter, This is not true. double* SX0 is the same as double *SX0 or double * SX0 so this becomes const SX0 : pdouble (ugly pointer as array Cishism) No! 'const double * X' in C makes the pointed-to data c

Re: [fpc-pascal] GetTempFileName in Linux

2010-10-07 Thread Micha Nelissen
Michael Van Canneyt wrote: I haven't seen any yet. The main problem is that the update isn't 'optional' or 'to be scheduled at X every night'. It must be done when the server application says it is time to do so. apt-proxy ... push to the proxy when it's time to update stuff ;) Micha

Re: [fpc-pascal] GetTempFileName in Linux

2010-10-07 Thread Micha Nelissen
Michael Van Canneyt wrote: Yes, but if the administrator must update 20 PCs manually every 2 weeks, he quickly complains that he has better things to do, so it must be done when the 'ordinary' user uses the application. Aren't there automation systems for this? Just like debian's 'apt-get upda

Re: [fpc-pascal] FPC static linking of zlib

2010-04-14 Thread Micha Nelissen
Michael Van Canneyt wrote: libz.so.1 => /lib/libz.so.1 (0x7f6de2801000) As you can see, it uses libz (or zlib) but dynamically, probably through some library dependency. I think this dynamic library dependency is caused by e.g. gtk, not directly by application or lcl or fcl direc

Re: [fpc-pascal] FPC static linking of zlib

2010-04-13 Thread Micha Nelissen
Matthias Klumpp wrote: If you build the package using lazbuild, lintian (the Debian policy checker tool) throws an error described here: http://lintian.debian.org/tags/embedded-zlib.html paszlib is a pascal implementation of compression. How is that check performed? Maybe it triggers on some

Re: [fpc-pascal] Pointers

2010-02-11 Thread Micha Nelissen
Rainer Stratmann wrote: Ok, that makes some sense, but I did not know it before. In the past with the turbopascal compiler and other always sizeof byte was added. The behavior is dependent on the {$T+} (typed pointers) mode. Micha ___ fpc-pascal mai

Re: [fpc-pascal] readonly variables

2009-11-29 Thread Micha Nelissen
Anthony Walter wrote: Having said all that, Jonas, what is the actual implemented behaviour of FPC? Does it 0 initialize heap memory at startup or not? If not, what is the justification for not doing so when this has been a long established behaviour of Delphi? It's not the compiler or RTL that

Re: [fpc-pascal] Generic type declaration example versus manual.

2009-11-21 Thread Micha Nelissen
Jonas Maebe wrote: tgeneric16.pp is not an example, it's a test. Moreover, it doesn't compile yet, not even with FPC 2.5.1. So documenting that syntax is not really a good idea. His comment doesn't really apply to tgeneric16 specifically, but more to generic syntax in general. Micha __

Re: [fpc-pascal] bzip2

2009-10-31 Thread Micha Nelissen
Juha Manninen wrote: Oops, sorry. I will do that. Where does the thread information come from? It looks good in my email client and I don't see any extra data. Try to enable 'Threaded view'; usually somewhere in the View menu, Sort menu, etc. Depends on client used. Micha __

Re: [fpc-pascal] memory mapped file

2009-10-31 Thread Micha Nelissen
Alexey Voytsehovich wrote: All the good days. You can not tell what I need to read and/or study for solving cross-platform (linux/windows) implementation of the memory mapped file? On unix, it would be fpmmap. On windows, it would be CreateFileMapping/MapViewOfFile if I'm not mistaken. Mic

Re: [fpc-pascal] (no subject)

2009-10-17 Thread Micha Nelissen
ak za wrote: i want to don't send mail to me from you but idn't know how do it. please guide me Do you mean unsubscribe, see link at bottom of this email: http://lists.freepascal.org/mailman/listinfo/fpc-pascal Then look at bottom of page, unsubscribe. Micha _

Re: [fpc-pascal] Illogical automatic dereferencing

2009-10-10 Thread Micha Nelissen
Henry Vermaak wrote: One thing I think you don't understand is that an array _is_ a pointer. Look at this table to visualise: In Pascal, an array is not a pointer; at least not at the language level. For a static array X (array[1..n] of T), you *can* write: Move(Ptr^, X, sizeof(X)); becaus

Re: [fpc-pascal] FIONREAD FPC FpIOCtl for Cross platform Sockets

2009-10-09 Thread Micha Nelissen
Andrew Brunner wrote: Sockets programming often requires a poll for how much data is available on a particular socket descriptor. AFAIK, it doesn't? If data is available, but less than you request, a 'read' on the socket does not block, but returns the number of bytes read, which is less than

Re: [fpc-pascal] multiple inheritence

2009-10-03 Thread Micha Nelissen
David Emerson wrote: lists containing the same elements: one sorted, one unsorted. The reason to have both: sorted -> fast search; unsorted -> sequential navigation through the list while elements are being added. It's not as if combining those gives you the best of both worlds ... if the sor

Re: [fpc-pascal] getting started with threads

2009-09-19 Thread Micha Nelissen
Jonas Maebe wrote: on x86 too). Atomic operations are not memory barriers by themselves, and the fact that you perform an atomic operation does not mean that afterwards all cpu's will immediately see this new value. Explain? Isn't the point of an atomic update that it doesn't matter whether t

Re: [fpc-pascal] Re: getting started with threads

2009-09-19 Thread Micha Nelissen
Graeme Geldenhuys wrote: So far I have single interface for create/destroy/lock/unlock of semaphores for Windows, Linux, *BSD. The latter two is actually for all A semaphore is not "locked" and "unlocked", it is posted and waited for. Micha ___ fpc-p

Re: [fpc-pascal] Lazarus settings and roaming profiles in Windows

2009-07-16 Thread Micha Nelissen
Florian Klaempfl wrote: Micha Nelissen schrieb: Florian Klaempfl wrote: And applications can implement a configuration file lock much easier if they want to detect multiple activity. Do they :)? Does lazarus? IIRC OpenOffice (3.0) does detect it already and warn me. Well, then you need

Re: [fpc-pascal] Lazarus settings and roaming profiles in Windows

2009-07-16 Thread Micha Nelissen
Vincent Snijders wrote: I am not sure having a 100 MB lazarus *roaming* profile by default would be a good idea. Probably the choice to compile lazarus itself to its "configuration" directory is not such a good idea ;-). Micha ___ fpc-pascal mailli

Re: [fpc-pascal] Lazarus settings and roaming profiles in Windows

2009-07-16 Thread Micha Nelissen
Florian Klaempfl wrote: My conclusion: I agree with Jonas, you can use network shares for development machines.. Consider 10-50 people working and accessing a server this way :) Using roaming profiles and local source checkouts, this can be handled easily by a 1k Eur server which even doesn't r

Re: [fpc-pascal] Lazarus settings and roaming profiles in Windows

2009-07-16 Thread Micha Nelissen
Florian Klaempfl wrote: Then you must be the only one since everybody I know despises it. We use multiple times login sometimes and then the settings are always messed up. Well, this causes a headache with fully networked home drives as well ;) If configuration files are per application it's

Re: [fpc-pascal] Lazarus settings and roaming profiles in Windows

2009-07-16 Thread Micha Nelissen
Florian Klaempfl wrote: Roaming profiles using auto copy/delete are not the best choice for that. For me it works fine for years ;) Then you must be the only one since everybody I know despises it. We use multiple times login sometimes and then the settings are always messed up. If the prof

Re: [fpc-pascal] DirectFB for FPC beta tarball

2009-05-31 Thread Micha Nelissen
Michael Van Canneyt wrote: The known major bugs of previous SVN versions have beeen fixed. We're now starting to actually use DFB in our project. Reports (bugs or anything) are thus highly appreciated. Do you think it would be feasible to use this as a basis for a Lazarus widgetset ? Lazarus

Re: [fpc-pascal] Class procedure assigned to object's event

2009-05-27 Thread Micha Nelissen
Antonio Sanguigni wrote: For the second one: main.pas(261,19) Error: Incompatible types: got "" expected "" Remove the 'class' keyword from your function. A class method is a different beast (with different signature) from a regular method. Micha _

Re: [fpc-pascal] re: thanks for major signal handling fix

2009-05-20 Thread Micha Nelissen
Jonas Maebe wrote: On 20 May 2009, at 22:01, Jonas Maebe wrote: The problem you have right now is that the program and each of your libraries each contain their own copy of the exception class, and therefore do not recognise (Pascal) exceptions raised by any of the others. Well, that and the

Re: [fpc-pascal] heap size growing

2009-05-11 Thread Micha Nelissen
Luca Olivetti wrote: Seeing this thread, I used GetFPCHeapStatus and, effectively, CurrHeapSize is growing but CurrHeapUsed isn't, so apparently TJpegImage.LoadFromStream (that's what I'm using) causes heap fragmentation. Can you reproduce this in a small test program? Perhaps there is a sim

Re: [fpc-pascal] Dependencies of FPC_HAS_FEATURE_XXX

2009-05-05 Thread Micha Nelissen
Sven Barth wrote: Hmm... if this speeds things up: shall I enclose the problematic places with ifdefs and send a patch along with the bug report? Got response yet? If not then yes, please send patches per topic to ifdef the optional code away. Micha __

Re: [fpc-pascal] REQ: official FPC's FCGI framework

2009-02-12 Thread Micha Nelissen
Bee wrote: Hi all, FPC has pretty usable support for web based development. Currently FPC supports it through CGI and Apache module. IMO, there's one more support that should be added officially: FastCGI. The initial work has been done lNet has fastcgi support. Maybe it's interesting for yo

Re: [fpc-pascal] Using FPC MM in a C program

2009-01-06 Thread Micha Nelissen
leledumbo wrote: Since it's possible to use libc's MM via cmem unit, would the opposite be possible? I have a "crtl.pas" which defines a few functions (malloc, calloc, free, memmove, memcpy) to help in using libraries written in C with fpc programs without needing external dependencies (msvcr

Re: [fpc-pascal] fstat usage

2008-12-06 Thread Micha Nelissen
Francisco Reyes wrote: Trying the fstat function and don't seem to be getting the right values for ctime, mtime and atime. What OS and CPU ? Micha ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinf

Re: [fpc-pascal] Lazarus: graphical interface using code only?

2008-12-04 Thread Micha Nelissen
Graeme Geldenhuys wrote: I'm curious... How do you manage to create a GUI or use a GUI program if you are blind? Sorry, I don't know how screen readers work? Try http://en.wikipedia.org/wiki/Screen_reader for a start? Micha ___ fpc-pascal maillist

Re: [fpc-pascal] Make FPC closer to hardware

2008-11-15 Thread Micha Nelissen
leledumbo wrote: Would it be a good idea to lower down (again) FPC so that it can be used easier for systems programming? example? Micha ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-

Re: [fpc-pascal] Speed difference between intel/ppc on intel Mac

2008-09-07 Thread Micha Nelissen
Jonas Maebe wrote: You can use -vd to have the compiler print out all compiler options it interprets (both from configuration files and from the command line). In general, to get the best code for an Intel Core family processor, use something like -O3ppentium4 -Cppentium4 -Cfsse2 i doubt it'

Re: [fpc-pascal] Translate C to Pascal

2008-07-30 Thread Micha Nelissen
Mattias Gärtner wrote: > How to translate this: > > struct a; Isn't this a forward declaration? So sometime later it needs to declare 'struct a { ... };' ? Micha ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/ma

Re: [fpc-pascal] Enabling FPC_HAS_FEATURE_CONSOLEIO

2008-07-29 Thread Micha Nelissen
leledumbo wrote: > This is very inconvenient. Moreover, assertions needs it. My first attempt, > is to comment out {$undef FPC_HAS_FEATURE_CONSOLEIO} in my system.pas. But > then, FPC argues about Unknown compilerproc "fpc_write_text_shortstr". I > found it in text.inc, but it's only included if FP

Re: [fpc-pascal] Generics

2008-03-31 Thread Micha Nelissen
Damien Gerard wrote: >> I tried to use an Interface but I had a nice Segementation fault :) >> >> Should I report it as a bug in the mantis ? >> >> > > Actually there is the same error with an intermediate class :( Segmentation faults in the compiler itself can/should always be reported. Thanks.

Re: [fpc-pascal] Generics

2008-03-31 Thread Micha Nelissen
Damien Gerard wrote: > Oki I understand. > I tried to use an Interface but I had a nice Segementation fault :) I'm not sure how FParent.ItemByDefault is going to work? Micha ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepa

Re: [fpc-pascal] AnsiDequotedStr not return empty for ""

2008-03-02 Thread Micha Nelissen
Peter Vreman wrote: >> In case always check Delphi documentation to see wether the behaviour >> you see is intentional. > > In case of "" it is also ambigious what you want. Because "" in the > middle of the string is translated to a single ". So you might also > expect that it returns a single "

Re: [fpc-pascal] AnsiDequotedStr not return empty for ""

2008-03-02 Thread Micha Nelissen
Peter Vreman wrote: >> That also in Delphi, but it is for me wrong. >> In fact that make my program working wrong when send UserName="Admin" >> and Password="", it check password as '""' not empty. > > The behaviour is compatible with Delphi and will not be changed. Might as well remove it then,

Re: [fpc-pascal] syscalls and fpc

2008-02-15 Thread Micha Nelissen
ik wrote: > Actually the assembler is not that hard to understand :) > My point is, that I don't like the idea of 7 or 20 or 100 amount of > parameters to give answer to every need. I think we should find a > better way to implement it, like var args in C or open array in > pascal... The linux ker

Re: [fpc-pascal] syscalls and fpc

2008-02-14 Thread Micha Nelissen
ik wrote: > Hi, > > I found that the Do_Syscalls are written in assembly and have only > limited number of parameters (up to 6). Is there a way to write it > using array of TSysParam instead of having 7 different functions ? Maybe but it wouldn't make the assembler easier to read :-). > Another

Re: [fpc-pascal] static class methods

2008-02-06 Thread Micha Nelissen
Jonathan Benedicto wrote: > Jonas Maebe wrote: >> I'm not sure how Delphi could handle this without passing the VMT as >> invisible parameter (and from a cursory look at the code generated by >> Kylix, it does appear to pass the VMT). > > Delphi doesn't allow static class methods to be virtual.

Re: [fpc-pascal] Problems with generics

2007-12-30 Thread Micha Nelissen
bartek wrote: > I am not quite sure whether my synatx is correct. IMHO explictly defining the > type feels more pascalish. Having more time at hand i have written a much > shorter example code which shows in what way such a type should be defined. I think that it is the same type in a different

Re: [fpc-pascal] Problems with generics

2007-12-29 Thread Micha Nelissen
bartek wrote: > function HashOf(const Key: ShortString): DWord; > > function BucketNodeOf(const Hash: DWord): TBucket.PNode; > DataContainers.pp(104,66) Fatal: Syntax error, ";" expected but "." found I'd say this is a bug, and your syntax is correct. Update the ex

Re: [fpc-pascal] Heaptrace and generics

2007-11-15 Thread Micha Nelissen
bartek wrote: > Could be FPC at fault? Both files are attached, "DataContainers.pp" being the > two lists and "DataContainers_Test.pp" the test program. > > FPC 2.2.0 on Linux 2.6.23 > valgrind-3.2.3 Can you retest with fpc 2.3.1 ? There have been some heaptrace fixes. Otherwise, please post a b

Re: [fpc-pascal] CSV via PCRE

2007-11-10 Thread Micha Nelissen
Graeme Geldenhuys wrote: > OK, while we are busy with show-and-tell... Then have a look at my > token library implementation. You've implemented some kind of 'cut'. But grep is also very useful (and more often used in a shell, at least by me). Micha ___

Re: [fpc-pascal] fpnanosleep (again)

2007-11-08 Thread Micha Nelissen
John Coppens wrote: > Just an extra note: delay(1) seems to delay 4.1 ms, so it _does_ seem to > be possible to do less than 8.3? You wait till the next tick that is after the requested delay. So it's never a HZ multiple or so. Micha ___ fpc-pascal mail

Re: [fpc-pascal] memory aligning

2007-11-05 Thread Micha Nelissen
David Pethes wrote: > pointer. So I mixed the two codes and come with something like this: > > function evk_malloc (size: longword): pointer; > const > ALIGNMENT = 16; > var > ptr: pointer; > begin > ptr := getmem(size + ALIGNMENT); > result := Align (ptr, ALIGNMENT); > if result = ptr t

Re: [fpc-pascal] Re: Why this evaluates on "if" wrong ?

2007-10-29 Thread Micha Nelissen
Stephen Dickason wrote: > In binary that is 0001 + 0.0110011001100 - 0.0110011001100 because > we hit recurring decimals a lot more in binary than decimal. I wonder why we > don't have a standard format (maybe we do?) that factors in the remainder as > part of the number also? It's po

Re: [fpc-pascal] FPC and JAVA

2007-10-27 Thread Micha Nelissen
Jonas Maebe wrote: > go for any Lazarus/Delphi app ported to the Mac, for that matter (unless > Lazarus can do automatic button layouting, and if the current layout > mismatch is simply due to some wrong default setting for the Carbon > target). Actually, we have a TButtonPanel exactly for this pu

Re: [fpc-pascal] random "Disk Full" exceptions

2007-10-20 Thread Micha Nelissen
Marc Santhoff wrote: >> writeln(stderr, '--> hit found: '+inttostr(fcnt) + ' - ' + >> inttostr(PInteger(longint(adr)-longint(fx))^) + ' - ' + >> floattostr(PSingle(adr)^)); > > Very nasty thing: > > The output channel is temporarily blocked and gives back "EAGAIN". This means the output channel

Re: [fpc-pascal] Audio development and /dev/dsp

2007-09-28 Thread Micha Nelissen
ik wrote: > lsof does not give me any open access to the device. > > I'm using Kubunto 7.04 amd64. Buggy audio driver ? Does it work properly when using ALSA, aplay etc. ? Micha ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.f

Re: [fpc-pascal] Problem with interfaces

2007-08-20 Thread Micha Nelissen
Joao Morais wrote: > The first call that I make to DefaultObj from *another* unit recreate > the object, because, I don't know why, the _holder var points again to nil. Try to use a data watchpoint to watch when the variable is being changed. Hopefully that will point to the root cause. Did you al

Re: [fpc-pascal] msedb and fcl-db benchmarks

2007-07-17 Thread Micha Nelissen
Michael Van Canneyt wrote: >> Maybe you can poll /proc/$PID/status > > Why not simply use heaptrc ? It prints a summary ? Or even GetFPCHeapStatus.MaxHeapUsed. Micha ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.or

Re: [fpc-pascal] Linux Kernel and FPC

2007-07-07 Thread Micha Nelissen
Michael Van Canneyt wrote: >> And I was thinking in implementing it using FPC. >> My question is, how hard can it be ? > > Relatively hard: you must write a complete RTL for it. > Once that is done, the rest should be easy. I don't think you would want to use a regular pascal RTL in a kernel modu

Re: [fpc-pascal] PowerPC crosscompiler on i386 Mac OS X looks for, wrong assembler and linker

2007-07-03 Thread Micha Nelissen
Adriaan van Os wrote: > build and then the Makefile takes cares of the rest. If a configuration > is not supported or if there is a problem, you get a clear error message. You *must* be joking, right ? Usually it involves digging through a messy config.log, where you sometimes can't really find th

Re: [fpc-pascal] Starting new threads

2007-06-21 Thread Micha Nelissen
Tom York wrote: > By the way is NNTP forbidden? I would much rather use NNTP over a > mailing list. IIRC, these lists are mirrored in gmane, so perhaps you can use gmane ? Have the mailing list subscription, but configure it to not send email. Micha __

Re: [fpc-pascal] Re: put data to stdout (fpc vs. gcc)

2007-06-15 Thread Micha Nelissen
Michael Van Canneyt wrote: > You would have to test the speed of each of them separately to be able > to say anything definitive. Like it is now, there is no indication > that it is the float-to-text routine which is to blame. So use sprintf in C, and the equivalent in fpc; and rerun the test. Mi

Re: [fpc-pascal] PASCAL programming for Novice

2007-06-10 Thread Micha Nelissen
Francisco Reyes wrote: > Pete Cervasio writes: > >> Contents of $HOME/.vim/filetype.vim: > > Thanks. Found that it also works with .pas > Changed the programs to that since that is one of the extensiosn the > compiler also checks for. ___ If you google

Re: [fpc-pascal] Linux Linking Error solved

2007-06-04 Thread Micha Nelissen
Rick Seiden wrote: > I emailed yesterday about an error when compiling in Linux. The error I > received was "Error while linking." > > I figured out that the permissions on /usr/bin/ld is set to root, and > I'm logged in as a different user. When I sudo fp to start Free Pascal, > I am able to co

Re: [fpc-pascal] TThread.Suspend under Linux

2007-06-02 Thread Micha Nelissen
Graeme Geldenhuys wrote: > I got most of my Thread Manager demo written. While trying out a few > features I noticed that every time as Suspend a thread, my app is > killed. Running it through gdb I get the following output. I don't see it being killed from your output, or am I missing something

Re: [fpc-pascal] problem with threads and backgrounding, fpc 2.1.3 arm native

2007-04-05 Thread Micha Nelissen
Luca Olivetti wrote: > This is another test program that shows my problem with fork: as soon as > I start the thread, the main program stops working (the thread *is* > running, you can put a writeln in its loop to show it). Note that in > this short example I don't close stdin,stdout,stderr, I don'

Re: [fpc-pascal] problem with threads and backgrounding, fpc 2.1.3 arm native

2007-04-03 Thread Micha Nelissen
Luca Olivetti wrote: >> Backgrounding is not the same as forking. > > I (vaguely) understand the difference, but I think (probably mistakenly) > that the problems are related. I'm not saying the problems are not related; they may be. It's just important to know there is a difference. > the exam

Re: [fpc-pascal] problem with threads and backgrounding, fpc 2.1.3 arm native

2007-04-03 Thread Micha Nelissen
Luca Olivetti wrote: > [EMAIL PROTECTED]:~$ uname -a > Linux lspro 2.6.12.6-arm1 #77 Tue Dec 5 22:23:46 CST 2006 armv5tejl > GNU/Linux I've gotten access to an arm-linux system, where I cannot reproduce the crash. That system is using 2.6.18 kernel. Can you try a newer kernel as well ? Micha

Re: [fpc-pascal] problem with threads and backgrounding, fpc 2.1.3 arm native

2007-04-03 Thread Micha Nelissen
Luca Olivetti wrote: > synchronize and critical sections, c library with callbacks to pascal, > etc.) is working flawlessly in the foreground, but it segfaults if I try > to background it (or try to use fpFork), and this is a problem since I > want to write a daemon (i can use screen though if that

Re: [fpc-pascal] Wikies

2007-02-24 Thread Micha Nelissen
Florian Klaempfl wrote: >> I am finished. It can be improved, but I'm out of ideas =) >> > > I'am not ;) The wiki is definitively not the FPC documentation. I've changed it to 'documentation for developers'. Covers the content better ? Micha ___ fpc-pa

Re: [fpc-pascal] fpc have problem with dynarray in ARM

2007-02-23 Thread Micha Nelissen
Jose Pascual wrote: > Could it be resolved in 2.1.1? > > I'm compiling ppcrossarm 2.1.1 in order to be it's corrected in this > version, Open a (descriptive) bug report (in case there is none about this issue yet) and attach a test case. Micha ___ fpc-

Re: [fpc-pascal] Wikies

2007-02-11 Thread Micha Nelissen
Felipe Monteiro de Carvalho wrote: > Hello, > > Are the wikis being merged? Is it my impression, or is there a main > page for compiler things missing? The pages are there. > When I go to fpc page and click on Wiki it shows lazarus-ccr wiki, and > I can´t find what was the old free pascal main w

Re: [fpc-pascal] Question on how to avoid memory trouble

2007-02-06 Thread Micha Nelissen
Wayne Sherman wrote: > Getting a better containers unit is nice, but the root of the problem > seems to be the memory manager. Delphi's old memory manager had No. > fragmentation issues also. That is why NexusMM, BucketMM and FastMM we The memory manager cannot fix fragmentation in TStringList

Re: [fpc-pascal] GetEpochTime not found

2006-12-09 Thread Micha Nelissen
Marco van de Voort wrote: >>> fpc 2.0.2. >>> >>> CommonTypes.pp(207,21) Error: Identifier not found "GetEpochTime" >> http://www.freepascal.org/docs-html/rtl/oldlinux/getepochtime.html > > He uses FreeBSD. Ah right, this was apparent from the unit path. Micha

Re: [fpc-pascal] GetEpochTime not found

2006-12-09 Thread Micha Nelissen
Marc Santhoff wrote: > Hi, > > I've got some funny problem here. The program compiled well with fpc up > to version 1.9.4. I haven't touched it for a while and now it fails with > fpc 2.0.2. > > CommonTypes.pp(207,21) Error: Identifier not found "GetEpochTime" http://www.freepascal.org/docs-html

Re: [fpc-pascal] Implementing a true Singleton - Can we decrease the visibility of a method?

2006-12-08 Thread Micha Nelissen
Daniël Mantione wrote: > > Op Fri, 8 Dec 2006, schreef Micha Nelissen: > >> Btw, I think singletons are nonsense too. Why is a global variable evil, >> and a singleton class not ? > > Well, a singleton can hide and/or protect its private data. Not more than a global

Re: [fpc-pascal] Implementing a true Singleton - Can we decrease the visibility of a method?

2006-12-08 Thread Micha Nelissen
Michael Van Canneyt wrote: >> Try this. >> http://bdn.borland.com/article/22576 NewInstance/FreeInstance is what I would have recommended as well. > Maybe we should include an implementation in FPC by default ? How ? The article works as-is AFAIK. Btw, I think singletons are nonsense too. Why i

Re: [fpc-pascal] even linus torvalds prefer pascal over c

2006-12-02 Thread Micha Nelissen
John Coppens wrote: > Mind, I don't want to remove gotos. I'm all for free choice. But I'm > still very much a proponent to discourage its use for fledgling > programmers. Well, in fpc, you have to use a compiler option to be able to use them. A good trade-off IMHO. Micha

Re: [fpc-pascal] sparse files

2006-12-02 Thread Micha Nelissen
David Mears wrote: > is there a generic multiplatform way to detect sparse files besides > looking for run-ons of #0s? Is this not good enough ? It's at least cross-platform ;-). Also the only one AFAIK, but not sure. Micha ___ fpc-pascal maillist - f

Re: [fpc-pascal] even linus torvalds prefer pascal over c

2006-12-02 Thread Micha Nelissen
Daniël Mantione wrote: > > Op Sat, 2 Dec 2006, schreef Micha Nelissen: > >> Daniël Mantione wrote: >>> (1) I'm using the in English not so common "informatics" instead of >>> "computer science", because Dijkstra greatly disliked t

Re: [fpc-pascal] even linus torvalds prefer pascal over c

2006-12-02 Thread Micha Nelissen
Daniël Mantione wrote: > (1) I'm using the in English not so common "informatics" instead of > "computer science", because Dijkstra greatly disliked the term). How about "computing science", or is that too "Eindhovens" ? ;-) Micha ___ fpc-pascal ma

Re: [fpc-pascal] even linus torvalds prefer pascal over c

2006-12-02 Thread Micha Nelissen
Daniël Mantione wrote: > Alas, he doesn't. Linus Torvalds stronly disapproves of Pascal and this > statement should be viewed in that context: he wants a language that does > allow him to do anything wrong. Actually: he wants a language to allows him to do things which are perceived by some to b

Re: [fpc-pascal] even linus torvalds prefer pascal over c

2006-12-02 Thread Micha Nelissen
Bisma Jayadi wrote: > Linus concluded, "the C language has scoping rules for a reason. *If I > wanted a language that didn't allow me to do anything wrong, I'd be > using Pascal.* As it is, it turns out that things that 'look' wrong on a > local level are often not wrong after all." Well, Linus is

Re: [fpc-pascal] Nov. 30th Build of 2.1.1 for Sparc

2006-11-30 Thread Micha Nelissen
Wolfe, Robert wrote: > I would like to port FPC over to FreeBSD for Sparc as well if at all > possible, however, with a lack of an existing FPC compiler for that > platform, I was not sure how I would go about doing that. The compiler is only per architecture, so you only need to build a freebsd r

Re: [fpc-pascal] Compiling problems

2006-11-03 Thread Micha Nelissen
Jonas Maebe wrote: > >> If it's later fixed people might think, it's still not fixed. > > That should only be changed after it's fixed I think, because if you > write "5091 to 5114" and it's still not fixed in 5115, people may also > be confused :) It just says those revisions are unusable, not

Re: [fpc-pascal] Progress Bar in different widget sets

2006-11-02 Thread Micha Nelissen
Graeme Geldenhuys wrote: > GTK's progress bar has a feature where the progress bar moves left and > right repeatedly, instead of the normal from Min to Max. > > What do you call that feature and what do you actually use it for? It's used when the Max isn't known. Micha __

Re: [fpc-pascal] Linux Install: Is it me or the documentation? ;-)

2006-11-01 Thread Micha Nelissen
Lev Lafayette wrote: > and like the TurboPascal critter from all those years ago, verdade? If Yes. > this is so, where does it live in the filesystem? Not that coding in > vi(m)/emacs/pico etc is a problem as such... /usr/bin/fp ? It's named 'fp' in any case. Micha _

Re: [fpc-pascal] ROPS and latest FPC compiler (svn)

2006-10-31 Thread Micha Nelissen
Alexandre Leclerc wrote: >> That are 1300+ revisions. Try doing a binary search. That will take 11 >> tests. > > How do a do such a thing? You know binary search right ? Use svn diff -r X, with X varying between working and newest revision, until you found X-1 working, X not. Micha _

Re: [fpc-pascal] typed constants...

2006-10-23 Thread Micha Nelissen
Michael Van Canneyt wrote: > Initialized constants are deprecated, and should be replaced by initialized > variables, as in Delphi: They are? Why? They have the practical advantage of being able to share them with other instances of this process. At least, if compiler+linker cooperate to put them

Re: [fpc-pascal] RE: Get Local IP using glib (eth0,eth1)

2006-10-05 Thread Micha Nelissen
Jeff Pohlmeyer wrote: >> > function to read the local IP eth0/eth1 using glibc library. > > This one is a little cleaner... > > program ip_addr; > {$MODE OBJFPC} > > uses libc; It doesn't seem like you're using libc specific functions ? You can also write a fpc 'native' one using fpsocket and f

Re: [fpc-pascal] .NET FAQ

2006-10-03 Thread Micha Nelissen
Marco van de Voort wrote: > IMHO it would be better to start over legacy free for .NET and really target > the .NET/JVM/LLVM platform 100%. Refer them to Chrome ? ;-) Micha ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepa

Re: [fpc-pascal] Threads executing in sequence instead of parallel

2006-09-30 Thread Micha Nelissen
Marco van de Voort wrote: >> Ok, maybe Sleep(0) in sysutils has to use the sched_yield syscall for >> linux. This may be a feature request to be reported in bug tracker IMHO. > > Ugly. Better define a procedure TryYieldTimeSlice() or so. No need to follow > Windowisms with archaic reasons. Yes ag

Re: [fpc-pascal] Threads executing in sequence instead of parallel

2006-09-30 Thread Micha Nelissen
Graeme Geldenhuys wrote: > pointed out). This sounds like an interesting topic and something > work understanding. After all, it gave me enough headaches and a > false positive - thinking it is a bug. Btw, here is a quote from the interview, default length seems to be 150ms: (it also explains th

Re: [fpc-pascal] Threads executing in sequence instead of parallel

2006-09-30 Thread Micha Nelissen
Graeme Geldenhuys wrote: > Ah, finally some explanation that makes sence! Thanks Micha, your > modified demo does in fact make Linux switch between threads. I also > tried the Sleep(0) you mentiond in the Sort Demo. Sleep() didn't do > the trick, but using the BurnCPU() method from Demo1 did. O

Re: [fpc-pascal] Threads executing in sequence instead of parallel

2006-09-29 Thread Micha Nelissen
Graeme Geldenhuys wrote: > The Sort Demo, which is a port of the Threads demo included with > Delphi 7, shows this clearly. I can archive and post the source, but Try inserting some Sleep(0) to force the kernel to switch to another thread ? In real worker threads you wouldn't do this of course, b

Re: [fpc-pascal] Threads executing in sequence instead of parallel

2006-09-29 Thread Micha Nelissen
Graeme Geldenhuys wrote: > We have a problem!!! > > The test project /fcl/tests/threads.pp as well as a Sort Demo (Bubble, > Section and Quick Sort) all execute the threads in sequence, waiting > for the previous thread to complete, before the next one executes. > Kind of defeats the point of usin

Re: [fpc-pascal] Sched_Yield, TThread, Multiplexing, Sysutils, Sleep, Win32, Linux, and Thanks

2006-09-20 Thread Micha Nelissen
memsom wrote: >> it seemed to run in a serial fashion and not as a separate task. > > Well... Win32 at any rate, use one of the following: > > CreateSemaphore / CreateMutex / CreateEvent These are abstracted in the syncobjs unit IIRC. They are in general used to wait for something to become avai

Re: [fpc-pascal] Please Help - Need ONE HINT - Trying to get

2006-09-16 Thread Micha Nelissen
Jason P Sage wrote: > I was trying to avoid sysutils sleep(0) in linux platform due to the size of > sysutils. The fact I don't know how to make dynamic linking work on linux > yet - (use shared libs versus static) makes my exe's bigger than I would > like. In most of my applications, size isn't an

Re: [fpc-pascal] Please Help - Need ONE HINT - Trying to get something like sched_yield with free pascal in linux

2006-09-15 Thread Micha Nelissen
Jason Sage wrote: > Hi all – and thanks to who ever can respond in advance. > > > > I have a Server Like App – I need the equivalent of sched_yield Tried sleep(0); yet ? Micha ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.

Re: [fpc-pascal] flag or exception?

2006-09-01 Thread Micha Nelissen
Bisma Jayadi wrote: > Hi all... > > I've always been confused about this subject... flag or exception for > error handling? Can anyone share knowledges and ideas about when and > where and why a (pascal) developer should chose one over another? Depends on taste, and they have both advantages and

Re: [fpc-pascal] DLL and Shared Libs in FPC

2006-08-07 Thread Micha Nelissen
Jason P Sage wrote: > I have read some things here and there, but can anyone simply tell me if its > now possible to write DLL's and Linux Shared Libraries with FPC now? > > The last time I approached this topic, it was unsupported, and was still not > really something that was ready for prime tim

Re: [fpc-pascal] Automatic objects

2006-08-04 Thread Micha Nelissen
Marco van de Voort wrote: >> Is it right to assume they are automatically deallocated when they go >> out of scope (e.g. no need to free them manually)? > > The space of the object is cleaned. However if the object uses dyn memory, > you will have to call the destructor (destroy) to make the obje

Re: [fpc-pascal] CRT (Console Unit) Problems with Fedora 5

2006-07-26 Thread Micha Nelissen
Jason P Sage wrote: > A good example is that FreeVision and the FPC IDE do not work on my Linux > either. Elaborate on "do not work" please ? Micha ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-26 Thread Micha Nelissen
Michael Van Canneyt wrote: >> The latter. > > Which is why I think that it's better to have them as local functions, > instead of having to introduce a lot of new functions. There is no real reason to restrict 'parallel' to local functions, is there ? Micha __

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-26 Thread Micha Nelissen
Vinzent Hoefler wrote: > On Wednesday 26 July 2006 09:07, Micha Nelissen wrote: >> How many copies ? > > Omp.Get_Num_Threads(), AFAICS. Ah the number of threads is determined by the RTL, and any parallel block must be written flexible, so that it can work for any given number of t

  1   2   >