Re: [Lazarus] Lazarus, Jedi etc.

2013-07-15 Thread Flávio Etrusco
On Mon, Jul 15, 2013 at 1:40 PM, Ludo Brands  wrote:
>
> Need other default (mis)behaviors for MySQL?
> -insert "123test" in an integer field: no error, it inserts 123
> -insert "123test" in a datetime field: no error, it inserts -00-00
> 00:00:00
> -insert 123 in a datetime field: no error, it inserts 2000-01-23
> 00:00:00 . Yes you got that right, inserting integer 11231 translates in
> 2001-12-31 00:00:00. 11232 gives -00-00 00:00:00 again. Insert
> 11231.133 and you get 2001-12-31 00:00:00 again
> -now that you understand the integer to datatime mapping do an UPDATE
> table SET date=date+4, you get 2001-12-31 00:00:04. UPDATE table SET
> date=date+400 and you obtain 2001-12-31 00:04:04.
> -UPDATE table SET date=date*2 results in -00-00 00:00:00. No error.
> -more MySQL arithmetic: insert "2001-1+10+3" into a date field: You get
> 2001-01-10 03:00:00. "2001-1*10/4^2" results in 2001-01-10 04:02:00
>
> Throw anything at it and MySQL will swallow. Your data are in good hands ;)
>
> Ludo
>
> --

- Decimals with greater precision than the column don't trigger error,
but are rounded instead;
- Check constraints are parsed but ignored;
- Char columns are not padded in the default configuration;
- Char and varchar values that are longer than the column size don't
trigger errors in the default configuration;
- Varchar values used to be always trimmed before save, not long ago.
- Changing a column to "not null" doesn't check existing values.

"Toy DB" is almost an overstatement :-/

-Flávio

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Rx: rxdbgrid.pas: compile error: Internal error 200501152

2013-07-15 Thread Marcos Douglas
On Mon, Jul 15, 2013 at 8:07 PM, Maxim Ganetsky  wrote:
> 16.07.2013 2:31, Marcos Douglas пишет:
>
>> Hi,
>>
>> I updated my CCR sources and now I found an error, on RX Lib, when I
>> try to compile my Lazarus:
>> Lazarus 1.1 r42095 FPC 2.6.2 i386-win32-win32/win64
>>
>> The problem bellow was introduced in revision 2763:
>>
>> 43  {$if ((lcl_major = 1) and (lcl_minor = 1))}
>> 44{$DEFINE RX_USE_LCL_DEVEL}
>> 45  {$ENDIF}
>>
>> ERROR:
>> Fatal: Internal error 200501152
>
>
> It is compiler bug. Probably this one or related to it:
>
> http://bugs.freepascal.org/view.php?id=8611

Hmm... so, compiles only with 2.7.1 version.
Is it acceptable make a patch to compile using 2.6.2?

Thanks,
Marcos Douglas

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Firefox OS

2013-07-15 Thread Jy V
> I do agree with Sven,
>> the way to go is http://goldparser.org/
>> the same technique has been used for project llvm_pascal
>> http://code.google.com/p/llvm-**pascal/
>>
>
> Why would I want to use a parser generator if we have a fully working
> multi-backend compiler available?!


this is fair :-) and I get your answer as a confirmation that there is a
chance one day to discover with pleasure a target for asm.js
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Rx: rxdbgrid.pas: compile error: Internal error 200501152

2013-07-15 Thread Marcos Douglas
Hi,

I updated my CCR sources and now I found an error, on RX Lib, when I
try to compile my Lazarus:
Lazarus 1.1 r42095 FPC 2.6.2 i386-win32-win32/win64

The problem bellow was introduced in revision 2763:

43  {$if ((lcl_major = 1) and (lcl_minor = 1))}
44{$DEFINE RX_USE_LCL_DEVEL}
45  {$ENDIF}

ERROR:
Fatal: Internal error 200501152


The rev 2739 works fine.

Regards,
Marcos Douglas

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus, Jedi etc.

2013-07-15 Thread Graeme Geldenhuys
On 2013-07-15 17:40, Ludo Brands wrote:
> Throw anything at it and MySQL will swallow. Your data are in good hands ;)


OK, I changed my mind about MySQL I'll not touch it with a 50 foot pole!

That "database server" (I cringed calling it that) is an absolute joke.
Please do all developers a favour and spread the word.

Regards,
  - Graeme -



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Rx: rxdbgrid.pas: compile error: Internal error 200501152

2013-07-15 Thread Maxim Ganetsky

16.07.2013 2:31, Marcos Douglas пишет:

Hi,

I updated my CCR sources and now I found an error, on RX Lib, when I
try to compile my Lazarus:
Lazarus 1.1 r42095 FPC 2.6.2 i386-win32-win32/win64

The problem bellow was introduced in revision 2763:

43  {$if ((lcl_major = 1) and (lcl_minor = 1))}
44{$DEFINE RX_USE_LCL_DEVEL}
45  {$ENDIF}

ERROR:
Fatal: Internal error 200501152


It is compiler bug. Probably this one or related to it:

http://bugs.freepascal.org/view.php?id=8611

--
Best regards,
 Maxim Ganetsky  mailto:gan...@narod.ru

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus, Jedi etc.

2013-07-15 Thread Luca Olivetti
Al 15/07/13 15:12, En/na Mark Morgan Lloyd ha escrit:

> There was also a requirement to interface to PLCs etc. (using, I'm told,
> the nodave library)

For the record, libnodave works wonderfully with fpc.

Bye
-- 
Luca Olivetti
Wetron Automation Technology http://www.wetron.es
Tel. +34 935883004  Fax +34 935883007

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Losing data when saving Database fileds with "Size" defined and UTF8 chars

2013-07-15 Thread Hans-Peter Diettrich

Reinier Olislagers schrieb:

On 14-7-2013 8:00, Daniel Simoes de Ameida wrote:

When the FieldDefs.Size properties is defined and we are trying to save
UTF8 characters with accented words, the Data is Truncated.

Could be because UTF8 with accented characters may result in multiple
bytes per character.
If the size is too small, the number of bytes passed to the db won't fit.

The difference between specifying size in bytes and in characters still
needs to be addressed.
AFAIR, there's already a bug open for this.

Workaround: make your field size as large as the maximum number of UTF8
bytes you expect.


Another workaround: use the appropriate codepage for storing strings in 
the database, so that all characters are single bytes. With the new 
(encoded) AnsiStrings this should be quite easy (automatic conversion).


DoDi


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Firefox OS

2013-07-15 Thread Mark Morgan Lloyd

Sven Barth wrote:

On 15.07.2013 11:41, Mark Morgan Lloyd wrote:

OTOH, Michael's Pascal-to-Javascript translator project comes handy in
that case.


But do we really want to go there? The FPC and Lazarus projects are
stretched enough as it is, without having to get involved in Javascript
language issues.



A JS backend would be something that some developers would indeed like 
(me included).


asm.js does seem to have a lot going for it. So I suppose a fair 
question is to what extent custom-drawn LCLs for Android and Firefox OS 
could share code, and whether this abstraction could be useful for other 
targets e.g. framebuffer or "naked" X.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Firefox OS

2013-07-15 Thread Sven Barth

On 15.07.2013 21:42, Jy V wrote:


I would keep out LLVM and emscripten and just directly generate
asm.js code which is then simply compatible to the libraries
provided by the emscripten project.


I do agree with Sven,
the way to go is http://goldparser.org/
the same technique has been used for project llvm_pascal
http://code.google.com/p/llvm-pascal/


Why would I want to use a parser generator if we have a fully working 
multi-backend compiler available?!


Regards,
Sven


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Firefox OS

2013-07-15 Thread Jy V
> I would keep out LLVM and emscripten and just directly generate asm.js
> code which is then simply compatible to the libraries provided by the
> emscripten project.
>

I do agree with Sven,
the way to go is http://goldparser.org/
the same technique has been used for project llvm_pascal
http://code.google.com/p/llvm-pascal/
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Firefox OS

2013-07-15 Thread Sven Barth

On 15.07.2013 13:01, Reinier Olislagers wrote:

On 15-7-2013 12:49, Kostas Michalopoulos wrote:

Since Firefox (and i assume Firefox OS) uses the new "asm.js" subset of
javascript (a js subset that looks like assembly which can be converted
to native code, something like a js-based portable LLVM bitcode),
couldn't FPC generate asm.js code instead of x86 assembly/machine code?

Obviously that wouldn't solve the GUI issue (one will still need to
implement a HTML-based (or whatever) LCL backend, but i think with
canvas nowadays that is possible).


Or perhaps even FPC=>LLVM backend=>emscripten=>javascript but perhaps
that's a couple of conversions too many...


I would keep out LLVM and emscripten and just directly generate asm.js 
code which is then simply compatible to the libraries provided by the 
emscripten project.


Regards,
Sven


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Firefox OS

2013-07-15 Thread Sven Barth

On 15.07.2013 11:41, Mark Morgan Lloyd wrote:

OTOH, Michael's Pascal-to-Javascript translator project comes handy in
that case.


But do we really want to go there? The FPC and Lazarus projects are
stretched enough as it is, without having to get involved in Javascript
language issues.



A JS backend would be something that some developers would indeed like 
(me included).


Regards,
Sven

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Should TObject or TComponent have a Comment property?

2013-07-15 Thread Sven Barth

On 15.07.2013 15:33, Michael Van Canneyt wrote:



On Mon, 15 Jul 2013, leledumbo wrote:


Well, then they need to be added for Delphi compatiblity :o


I can't say anything anymore when the reason is this :)


They have been added. It's just not yet in trunk.


Hoo... a hidden branch?


It's not hidden. I suspect it is called "joost"


branches/joost/classattributes to be precise.

Regards,
Sven


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Firefox OS

2013-07-15 Thread Marco van de Voort
On Mon, Jul 15, 2013 at 10:02:54AM +0200, Michael Schnell wrote:
> 
> While Android support seems to be a hot topic here, 

If that is *hot*, I think the level for firefox OS is proportionately
already.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus, Jedi etc.

2013-07-15 Thread Mark Morgan Lloyd

Graeme Geldenhuys wrote:


Then depending on which filesystem your MySQL database is, it affectsthe case 
sensitivity


Definitely a problem. However even on something like PostgreSQL there 
can be case-sensitivity issues with e.g. usernames/roles.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus, Jedi etc.

2013-07-15 Thread Henry Vermaak
On Mon, Jul 15, 2013 at 04:37:35PM +0200, Michael Van Canneyt wrote:
> On Mon, 15 Jul 2013, Henry Vermaak wrote:
> >Could you explain why the above is bad for those of us that aren't DB
> >experts?  To my untrained eye it looks fairly plausible, so I'm
> >obviously missing something.
> 
> Simple. The statement
> 
> create table a (b int not null, c int not null);
> 
> creates a table called 'a', in which the fields b and c are required.
> that is, they cannot be NULL.
> 
>  mysql> insert into a (b) values (1);
> 
> Attempts to insert a record with value NULL for C, which is
> explicitly forbidden by the definition of the table.

0 != NULL, it's inserting the default value for the field, which seems
to be 0 for an integer field.

Does e.g. postgres error on an insert statement like this?

Henry

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus, Jedi etc.

2013-07-15 Thread Henry Vermaak
On Mon, Jul 15, 2013 at 03:44:42PM +0100, Graeme Geldenhuys wrote:
> On 2013-07-15 15:06, Henry Vermaak wrote:
> > Could you explain why the above is bad for those of us that aren't DB
> > experts?  To my untrained eye it looks fairly plausible, so I'm
> > obviously missing something.
> 
> I never inserted data into column C, so MySQL decided on its own that it
> should magically contain the value 0 — inventing data! Last time I
> checked 0 <> null in SQL terms either.

I seem to remember something about table columns having default values
in the definition, so perhaps column C defaults to 0?  0 != NULL, so it
didn't break your definition?

Henry

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus, Jedi etc.

2013-07-15 Thread Ludo Brands
On 07/15/2013 05:53 PM, Graeme Geldenhuys wrote:
> On 2013-07-15 16:40, Henry Vermaak wrote:
>> If you want an INSERT statement to generate an error unless you
>> explicitly specify values for all columns that do not have a default
>> value, you should use strict mode."
> 
> 
> And G*d only knows why they have such modes in the first place! You
> would think that if they do value data (what you put in is what you get
> out), there would only be 'strict mode', or at least make that the more
> sane and default mode. Like I said, I installed MySQL on FreeBSD from
> source code and didn't customise any settings.
> 
> The case sensitivity in the table names is also crazy, especially if the
> database gets moved. I had to modify quite a lot of SQL statements
> because of that. For MySQL support I had to look up the table name (as
> MySQL has it), then modify lots and lots of SQL in my application to
> match that case exactly. Crazy stuff!
> 
> Regards,
>   G.
> 

Need other default (mis)behaviors for MySQL?
-insert "123test" in an integer field: no error, it inserts 123
-insert "123test" in a datetime field: no error, it inserts -00-00
00:00:00
-insert 123 in a datetime field: no error, it inserts 2000-01-23
00:00:00 . Yes you got that right, inserting integer 11231 translates in
2001-12-31 00:00:00. 11232 gives -00-00 00:00:00 again. Insert
11231.133 and you get 2001-12-31 00:00:00 again
-now that you understand the integer to datatime mapping do an UPDATE
table SET date=date+4, you get 2001-12-31 00:00:04. UPDATE table SET
date=date+400 and you obtain 2001-12-31 00:04:04.
-UPDATE table SET date=date*2 results in -00-00 00:00:00. No error.
-more MySQL arithmetic: insert "2001-1+10+3" into a date field: You get
2001-01-10 03:00:00. "2001-1*10/4^2" results in 2001-01-10 04:02:00

Throw anything at it and MySQL will swallow. Your data are in good hands ;)

Ludo

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus, Jedi etc.

2013-07-15 Thread Henry Vermaak
On Mon, Jul 15, 2013 at 04:53:25PM +0100, Graeme Geldenhuys wrote:
> The case sensitivity in the table names is also crazy, especially if
> the database gets moved. I had to modify quite a lot of SQL statements
> because of that. For MySQL support I had to look up the table name (as
> MySQL has it), then modify lots and lots of SQL in my application to
> match that case exactly. Crazy stuff!

I understand the case sensitivity problem, since tables are stored in
separate files for some engines (I think).  There's a simple solution,
though, use lower_case_table_names=1, in which case tables will be
stored in lower case and lookups become case insensitive.  No need to
change SQL statements.  You may have to set this before you import the
database on the new system.  Doesn't seem like such a big deal to me,
after a little bit of RTFM.

Henry

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus, Jedi etc.

2013-07-15 Thread Graeme Geldenhuys
On 2013-07-15 16:42, Michael Van Canneyt wrote:
>>
>> I seem to remember something about table columns having default values
>> in the definition, so perhaps column C defaults to 0?
> 
> It should only do that when specifically instructed.


Exactly... SQL's data definition language has specific support for
default values. It's up to the DDL field definitions, not the database
engine/server to decide on default values.


Regards,
  G.


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus, Jedi etc.

2013-07-15 Thread Graeme Geldenhuys
On 2013-07-15 16:40, Henry Vermaak wrote:
> If you want an INSERT statement to generate an error unless you
> explicitly specify values for all columns that do not have a default
> value, you should use strict mode."


And G*d only knows why they have such modes in the first place! You
would think that if they do value data (what you put in is what you get
out), there would only be 'strict mode', or at least make that the more
sane and default mode. Like I said, I installed MySQL on FreeBSD from
source code and didn't customise any settings.

The case sensitivity in the table names is also crazy, especially if the
database gets moved. I had to modify quite a lot of SQL statements
because of that. For MySQL support I had to look up the table name (as
MySQL has it), then modify lots and lots of SQL in my application to
match that case exactly. Crazy stuff!

Regards,
  G.



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus, Jedi etc.

2013-07-15 Thread Michael Van Canneyt



On Mon, 15 Jul 2013, Henry Vermaak wrote:


On Mon, Jul 15, 2013 at 04:34:21PM +0100, Henry Vermaak wrote:

On Mon, Jul 15, 2013 at 03:44:42PM +0100, Graeme Geldenhuys wrote:
> On 2013-07-15 15:06, Henry Vermaak wrote:
> > Could you explain why the above is bad for those of us that aren't DB
> > experts?  To my untrained eye it looks fairly plausible, so I'm
> > obviously missing something.
> 
> I never inserted data into column C, so MySQL decided on its own that it

> should magically contain the value 0 — inventing data! Last time I
> checked 0 <> null in SQL terms either.

I seem to remember something about table columns having default values
in the definition, so perhaps column C defaults to 0?  0 != NULL, so it
didn't break your definition?


Just checked the docs:

"If you are not running in strict SQL mode, any column not explicitly
given a value is set to its default (explicit or implicit) value.
...
If you want an INSERT statement to generate an error unless you
explicitly specify values for all columns that do not have a default
value, you should use strict mode."

Seems fair enough to me?


That is not RDBMS compliant behaviour.

RDBMs is an established mathematical theory, not something that a bunch of 
IT-ers with their 'anything goes' attitude invented.
All RDBMSes are supposed to behave the same.

So the same statement is supposed to behave the same on all RDBMSes, 
given the same definition of the table. The statement given in the 
example is supposed to give an error, period.


You can't just say "oh well, we'll just ignore the rules for some time"

Like in: 
I just killed my neighbour, but hey, I changed the law for 5 seconds while I did it, 
so no problem !


Michael.--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus, Jedi etc.

2013-07-15 Thread Michael Van Canneyt



On Mon, 15 Jul 2013, Henry Vermaak wrote:


On Mon, Jul 15, 2013 at 04:37:35PM +0200, Michael Van Canneyt wrote:

On Mon, 15 Jul 2013, Henry Vermaak wrote:

Could you explain why the above is bad for those of us that aren't DB
experts?  To my untrained eye it looks fairly plausible, so I'm
obviously missing something.


Simple. The statement

create table a (b int not null, c int not null);

creates a table called 'a', in which the fields b and c are required.
that is, they cannot be NULL.

 mysql> insert into a (b) values (1);

Attempts to insert a record with value NULL for C, which is
explicitly forbidden by the definition of the table.


0 != NULL, it's inserting the default value for the field, which seems
to be 0 for an integer field.


There is no default value specified.

You MUST specify a default value if you want one. 
If you didn't specify one, the Database engine should not apply one on its own.



Does e.g. postgres error on an insert statement like this?


Yes. As does firebird.

Michael.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus, Jedi etc.

2013-07-15 Thread Michael Van Canneyt



On Mon, 15 Jul 2013, Henry Vermaak wrote:


On Mon, Jul 15, 2013 at 03:44:42PM +0100, Graeme Geldenhuys wrote:

On 2013-07-15 15:06, Henry Vermaak wrote:
> Could you explain why the above is bad for those of us that aren't DB
> experts?  To my untrained eye it looks fairly plausible, so I'm
> obviously missing something.

I never inserted data into column C, so MySQL decided on its own that it
should magically contain the value 0 — inventing data! Last time I
checked 0 <> null in SQL terms either.


I seem to remember something about table columns having default values
in the definition, so perhaps column C defaults to 0?


It should only do that when specifically instructed.

Michael.--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Accents in IDE and my apps

2013-07-15 Thread Juha Manninen
On Mon, Jul 15, 2013 at 6:29 PM, Éderson Cássio
 wrote:
> I don't know how I can create a patch... everything I know is that I must
> download the sources from SVN, but I'm raw about these kind of task
> (ashamed...)

http://wiki.lazarus.freepascal.org/Creating_A_Patch

Easy and fun.

Regards,
Juha

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Generation of assembler sources and keeping them

2013-07-15 Thread Mehmet Erol Sanliturk
On Mon, Jul 15, 2013 at 11:23 AM, Mattias Gaertner <
nc-gaert...@netcologne.de> wrote:

> On Mon, 15 Jul 2013 11:13:11 -0400
> Mehmet Erol Sanliturk  wrote:
>
> >[...]
> > > > During compilation of a program by Lazarus ,
> > > > how can I generate assembler sources and keep them
> > > > from deletion at the end of the compilation
> > > > in FreeBSD , Linux and Windows ,
> > > > if there are differences for parameter specifications ?
> > >
> > > See 'fpc -h'.
> > > Look at the -a options.
> [...]
> >
> > I know this but I do not know which fpc.cfg should be modified or
> > parameters will be specified in where to obtain such effect ?
>
> You can simply add -aln to Lazarus Project / Compiler Options /
> Custom options.
>
>
> > In
> >
> > FreeBSD :
> >
> >
> > Linux :
> >
> >
> > Windows :
>
>
>
> Mattias
>
> --
>


With my best wishes for you ,

Thank you very much .


Mehmet Erol sanliturk
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Accents in IDE and my apps

2013-07-15 Thread Éderson Cássio

Em 13-07-2013 02:13, Mattias Gaertner escreveu:

On Fri, 12 Jul 2013 15:36:26 -0700 (PDT)
Éderson Cássio  wrote:


[...]
It was a problem for which I could produce a solution in the LCL code, but 
Mattias Gaertner said me the problem doesn't occur on all systems. Well, I 
found one situation when the problem occurs, on my system.

It's not only a "my system" problem, it's a problem in the way the GTK2 Lazarus widgetset interacts 
with some systems (including mine). I say that because other GTK2 applications have a normal behavior, even 
Lazarus applications when my system language is "English". Maybe an "if" would solve the 
problem; I just want to keep talking to someone who can guide me in the LCL changes without causing 
disasters. Mattias gave me an advice (thanks!), and I have found a new direction.

It is possible to add the changes via an IFDEF. For example:

{$IfDef EnableGtk2AccentKeyMod2}
// new solution ...
{$Else}
// old solution ...
{$EndIf}

Then you can ask people to test this by adding a
-dEnableGtk2AccentKeyMod2 to their IDE options.

Can you create a patch for this?

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Mattias, thanks for your help.
I don't know how I can create a patch... everything I know is that I 
must download the sources from SVN, but I'm raw about these kind of task 
(ashamed...)

If I give some simple instructions, can you or somebody create it?

In _*lcl/interfaces/gtk2/gtk2proc.inc*_, line 2278, we have:

CheckDeadKey;


We just need to do the solution you gave (I created a new name for the 
directive):


{$IfDef GTK2LatinAccents}
   gtk_im_context_filter_keypress(im_context, AEvent);
{$Else}
   CheckDeadKey;
{$EndIf}


Thanks, I hope it will be useful for some people asking in the forums!

Éderson


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Generation of assembler sources and keeping them

2013-07-15 Thread Mattias Gaertner
On Mon, 15 Jul 2013 11:13:11 -0400
Mehmet Erol Sanliturk  wrote:

>[...]
> > > During compilation of a program by Lazarus ,
> > > how can I generate assembler sources and keep them
> > > from deletion at the end of the compilation
> > > in FreeBSD , Linux and Windows ,
> > > if there are differences for parameter specifications ?
> >
> > See 'fpc -h'.
> > Look at the -a options.
[...]
> 
> I know this but I do not know which fpc.cfg should be modified or
> parameters will be specified in where to obtain such effect ?

You can simply add -aln to Lazarus Project / Compiler Options /
Custom options.

 
> In
> 
> FreeBSD :
> 
> 
> Linux :
> 
> 
> Windows :



Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Generation of assembler sources and keeping them

2013-07-15 Thread Mehmet Erol Sanliturk
On Mon, Jul 15, 2013 at 11:00 AM, Mattias Gaertner <
nc-gaert...@netcologne.de> wrote:

> On Mon, 15 Jul 2013 10:16:53 -0400
> Mehmet Erol Sanliturk  wrote:
>
> > Dears All ,
> >
> >
> > During compilation of a program by Lazarus ,
> > how can I generate assembler sources and keep them
> > from deletion at the end of the compilation
> > in FreeBSD , Linux and Windows ,
> > if there are differences for parameter specifications ?
>
> See 'fpc -h'.
> Look at the -a options.
>
> Mattias
>
> --
>



I know this but I do not know which fpc.cfg should be modified or
parameters will be specified in where to obtain such effect ?


In

FreeBSD :


Linux :


Windows :



Thank you very much .


Mehmet Erol Sanliturk
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Generation of assembler sources and keeping them

2013-07-15 Thread Mattias Gaertner
On Mon, 15 Jul 2013 10:16:53 -0400
Mehmet Erol Sanliturk  wrote:

> Dears All ,
> 
> 
> During compilation of a program by Lazarus ,
> how can I generate assembler sources and keep them
> from deletion at the end of the compilation
> in FreeBSD , Linux and Windows ,
> if there are differences for parameter specifications ?

See 'fpc -h'.
Look at the -a options.

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus, Jedi etc.

2013-07-15 Thread Graeme Geldenhuys
On 2013-07-15 15:06, Henry Vermaak wrote:
> Could you explain why the above is bad for those of us that aren't DB
> experts?  To my untrained eye it looks fairly plausible, so I'm
> obviously missing something.


I never inserted data into column C, so MySQL decided on its own that it
should magically contain the value 0 — inventing data! Last time I
checked 0 <> null in SQL terms either.

Regards,
  G.





--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus, Jedi etc.

2013-07-15 Thread Michael Van Canneyt



On Mon, 15 Jul 2013, Henry Vermaak wrote:


On Mon, Jul 15, 2013 at 02:49:06PM +0100, Graeme Geldenhuys wrote:

On 2013-07-15 13:43, leledumbo wrote:


Or if they insist on using MySQL (compatible alternative): MariaDB


Nope, still not! I'll not touch MySQL, MariaDB or anything based on
those with a 10 foot pole! If you value your data, stay away from those two.

Another developer enlightened me on how bad MySQL really is, and I
confirmed what he said on two of my servers (Linux and FreeBSD).

Here is the simple test to show how bad MySQL/MariaDB is...

-[ Forwarded message ]---
This test was done on a newly setup FreeBSD server - no tweaking to
MySQL was done - just the default install.

mysql> create table a (b int not null, c int not null);
Query OK, 0 rows affected (0.17 sec)

mysql> insert into a (b) values (1);
Query OK, 1 row affected, 1 warning (0.03 sec)

As if the above was not miraculous enough, then you get:

mysql> select * from a;
+-+-+
| b | c |
+-+-+
| 1 | 0 |
+-+-+
1 row in set (0.00 sec)

Unbelievable!


Could you explain why the above is bad for those of us that aren't DB
experts?  To my untrained eye it looks fairly plausible, so I'm
obviously missing something.


Simple. The statement

create table a (b int not null, c int not null);

creates a table called 'a', in which the fields b and c are required.
that is, they cannot be NULL.

 mysql> insert into a (b) values (1);

Attempts to insert a record with value NULL for C, which is explicitly 
forbidden by the definition of the table.


The definition of a RDBMS states that it must enforce all database constraints.

The above violates that.

The last statement then shows that MySQL has silently inserted 0 as a value for 
the field C.
That's even worse. It invents data.

(I could name more examples)

sqlite has the same problem, and even worse. It does not even enforce the 
correct type.


Michael.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Generation of assembler sources and keeping them

2013-07-15 Thread Mehmet Erol Sanliturk
Dears All ,


During compilation of a program by Lazarus ,
how can I generate assembler sources and keep them
from deletion at the end of the compilation
in FreeBSD , Linux and Windows ,
if there are differences for parameter specifications ?


Thank you very much .



Mehmet Erol Sanliturk
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus, Jedi etc.

2013-07-15 Thread Henry Vermaak
On Mon, Jul 15, 2013 at 02:49:06PM +0100, Graeme Geldenhuys wrote:
> On 2013-07-15 13:43, leledumbo wrote:
> > 
> > Or if they insist on using MySQL (compatible alternative): MariaDB
> 
> Nope, still not! I'll not touch MySQL, MariaDB or anything based on
> those with a 10 foot pole! If you value your data, stay away from those two.
> 
> Another developer enlightened me on how bad MySQL really is, and I
> confirmed what he said on two of my servers (Linux and FreeBSD).
> 
> Here is the simple test to show how bad MySQL/MariaDB is...
> 
> -[ Forwarded message ]---
> This test was done on a newly setup FreeBSD server - no tweaking to
> MySQL was done - just the default install.
> 
> mysql> create table a (b int not null, c int not null);
> Query OK, 0 rows affected (0.17 sec)
> 
> mysql> insert into a (b) values (1);
> Query OK, 1 row affected, 1 warning (0.03 sec)
> 
> As if the above was not miraculous enough, then you get:
> 
> mysql> select * from a;
> +-+-+
> | b | c |
> +-+-+
> | 1 | 0 |
> +-+-+
> 1 row in set (0.00 sec)
> 
> Unbelievable!

Could you explain why the above is bad for those of us that aren't DB
experts?  To my untrained eye it looks fairly plausible, so I'm
obviously missing something.

Henry

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus, Jedi etc.

2013-07-15 Thread Graeme Geldenhuys
On 2013-07-15 14:38, Michael Van Canneyt wrote:
> People using MySQL should have their developers license revoked :)


I like that! :)


Regards,
  G.



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus, Jedi etc.

2013-07-15 Thread Graeme Geldenhuys
On 2013-07-15 13:43, leledumbo wrote:
> 
> Or if they insist on using MySQL (compatible alternative): MariaDB

Nope, still not! I'll not touch MySQL, MariaDB or anything based on
those with a 10 foot pole! If you value your data, stay away from those two.

Another developer enlightened me on how bad MySQL really is, and I
confirmed what he said on two of my servers (Linux and FreeBSD).

Here is the simple test to show how bad MySQL/MariaDB is...

-[ Forwarded message ]---
This test was done on a newly setup FreeBSD server - no tweaking to
MySQL was done - just the default install.

mysql> create table a (b int not null, c int not null);
Query OK, 0 rows affected (0.17 sec)

mysql> insert into a (b) values (1);
Query OK, 1 row affected, 1 warning (0.03 sec)

As if the above was not miraculous enough, then you get:

mysql> select * from a;
+-+-+
| b | c |
+-+-+
| 1 | 0 |
+-+-+
1 row in set (0.00 sec)

Unbelievable!

Then depending on which filesystem your MySQL database is, it affects
the case sensitivity of the table names! Why, oh why, let a filesystem
dictate requirements in your database schema. eg: Moving a database from
Windows to Linux/FreeBSD/etc Under Windows the database schema will
not be case sensitive, and your applications work wonderful. Move that
database to a more secure Linux/FreeBSD system, and suddenly your
application is broken - because the filesystem under Linux/FreeBSD is
case sensitive and your SQL statements didn't know that. This is
apparently caused by MySQL because it uses a directory structure to
define tables - one directory per database table. Absolutely ridiculous!

Then there are cases where MySQL magically does Number-to-String and
vice-versa conversions.

MySQL is nothing but a toy database "server" (if you can call it that) -
you really must not place any value on your data. My clients value their
data a lot, hence we use a real database server...Firebird is a good fit
for most of my clients.
---[ end of message ]


Regards,
  - Graeme -


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus, Jedi etc.

2013-07-15 Thread Michael Van Canneyt



On Mon, 15 Jul 2013, Mark Morgan Lloyd wrote:


leledumbo wrote:
Indeed! More people should be introduced [and educated] to the much better 
open source database servers out there, like Firebird and
PostgreSQL. 


Or if they insist on using MySQL (compatible alternative): MariaDB


The OP's backend was half constructed.

There was also a requirement to interface to PLCs etc. (using, I'm told, the 
nodave library), the specific problem he'd got was MySQL access which- 
according to him at least- is not well-supported by Delphi. In that context I 
risked mentioning Lazarus, but I think that trying to tell him to simply use 
a different database would have been counterproductive since (a) he could 
then choose one that suited his version/variant of Delphi and (b) it was in a 
private conferencing topic dedicated to Delphi, not to Life After Delphi.


So while I use Lazarus, PostgreSQL and (tentatively) FireBird, there are 
limits to how aggressively I'm prepared to push the combination. Particularly 
when the other party is more experienced than I am and has been known to wear 
a journalist's hat.



People using MySQL should have their developers license revoked :)

MySQL is not even worthy of the name database.

Michael.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Should TObject or TComponent have a Comment property?

2013-07-15 Thread Michael Van Canneyt



On Mon, 15 Jul 2013, leledumbo wrote:


Well, then they need to be added for Delphi compatiblity :o


I can't say anything anymore when the reason is this :)


They have been added. It's just not yet in trunk.


Hoo... a hidden branch?


It's not hidden. I suspect it is called "joost"

Michael.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Firefox OS

2013-07-15 Thread Michael Schnell

On 07/15/2013 03:15 PM, Mark Morgan Lloyd wrote:


Perhaps comparable with the custom-drawn Android LCL.

That is what I was thinking of.

-Michael




--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Firefox OS

2013-07-15 Thread Mark Morgan Lloyd

Michael Schnell wrote:

On 07/15/2013 12:49 PM, Kostas Michalopoulos wrote:
Since Firefox (and i assume Firefox OS) uses the new "asm.js" subset 
of javascript (a js subset that looks like assembly which can be 
converted to native code, something like a js-based portable LLVM 
bitcode), couldn't FPC generate asm.js code instead of x86 
assembly/machine code?

Interesting stuff, indeed.


Yes, very. Perhaps comparable with the JVM backend.

Obviously that wouldn't solve the GUI issue (one will still need to 
implement a HTML-based (or whatever) LCL backend, but i think with 
canvas nowadays that is possible).

This in fact is a completely different issue.


Perhaps comparable with the custom-drawn Android LCL.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus, Jedi etc.

2013-07-15 Thread Mark Morgan Lloyd

leledumbo wrote:
Indeed! More people should be introduced [and educated] to the much 
better open source database servers out there, like Firebird and
PostgreSQL. 


Or if they insist on using MySQL (compatible alternative): MariaDB


The OP's backend was half constructed.

There was also a requirement to interface to PLCs etc. (using, I'm told, 
the nodave library), the specific problem he'd got was MySQL access 
which- according to him at least- is not well-supported by Delphi. In 
that context I risked mentioning Lazarus, but I think that trying to 
tell him to simply use a different database would have been 
counterproductive since (a) he could then choose one that suited his 
version/variant of Delphi and (b) it was in a private conferencing topic 
dedicated to Delphi, not to Life After Delphi.


So while I use Lazarus, PostgreSQL and (tentatively) FireBird, there are 
limits to how aggressively I'm prepared to push the combination. 
Particularly when the other party is more experienced than I am and has 
been known to wear a journalist's hat.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Should TObject or TComponent have a Comment property?

2013-07-15 Thread leledumbo
> Well, then they need to be added for Delphi compatiblity :o

I can't say anything anymore when the reason is this :)

> They have been added. It's just not yet in trunk.

Hoo... a hidden branch?




--
View this message in context: 
http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Should-TObject-or-TComponent-have-a-Comment-property-tp4032315p4032398.html
Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus, Jedi etc.

2013-07-15 Thread leledumbo
> Indeed! More people should be introduced [and educated] to the much 
> better open source database servers out there, like Firebird and
> PostgreSQL. 

Or if they insist on using MySQL (compatible alternative): MariaDB



--
View this message in context: 
http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Lazarus-Jedi-etc-tp4032338p4032397.html
Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Firefox OS

2013-07-15 Thread Marc Santhoff
Am Montag, den 15.07.2013, 13:23 +0200 schrieb Michael Schnell:
> On 07/15/2013 12:49 PM, Kostas Michalopoulos wrote:

> > Obviously that wouldn't solve the GUI issue (one will still need to 
> > implement a HTML-based (or whatever) LCL backend, but i think with 
> > canvas nowadays that is possible).

> This in fact is a completely different issue.
> 
> In fact, having support for a HTML5 backend (aka "Widget Type"), with 
> the normal Lazarus LCL form designer for designing the the user 
> interface, would allow for nice stuff in the non-mobile world as well.

And it would give the opportunity to test apps that will run on Firefox
OS later on ... although the non-HTML5-stuff, system apis and the like,
would have to be emulated from the outside (of the widget, in pascal).

-- 
Marc Santhoff 


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Firefox OS

2013-07-15 Thread Michael Schnell

On 07/15/2013 01:39 PM, Marc Santhoff wrote:
Regarding news about "Intelligence Agencies" around the world Firefox 
OS will for sure have it's cusomers.

Especially in Europe and even more in Germany.

(awaiting the news that the said Agency succeeded in turning down 
Mozilla org. )



-Michael

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus, Jedi etc.

2013-07-15 Thread Graeme Geldenhuys
On 2013-07-13 15:06, reinierolislag...@gmail.com wrote:
> The fact that they're connecting to
> the horror that is MySQL says enough


Indeed! More people should be introduced [and educated] to the much
better open source database servers out there, like Firebird and PostgreSQL.


Regards,
  G.



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus, Jedi etc.

2013-07-15 Thread Graeme Geldenhuys
On 2013-07-13 15:08, Mark Morgan Lloyd wrote:
> but didn't want to tell him bluntly that his 
> understanding was outdated.


Bluntly is the best way to say something. ;-)


Regards,
  G.



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Firefox OS

2013-07-15 Thread Marc Santhoff
Am Montag, den 15.07.2013, 13:18 +0200 schrieb Michael Schnell:
> On 07/15/2013 11:20 AM, Reinier Olislagers wrote:
> > Firefox OS used to run on top of Android 

> I don't think that this is the way it is meant to be installed on 
> devices by - say - Deutsche Telekom. Why would they wont to install 
> anything "on top of Android", when they have Android anyway ?

No, it's for testing beta releases only. The complete release will run
on a phone without android/Lunix underneath, of course.

> > and AFAIK they intend to have Android compatibility as well...
> 
> I don' see how an API done in Java can be compatible with an API done in 
> JavaScript. (But it was not me who suggested that Firefox OS is 
> completely JavaScript, I did not check the facts here...)

That's another testbed, running the browser as an emulator on android.
Early access, attracting programmers and user, ...

Regarding news about "Intelligence Agencies" around the world Firefox OS
will for sure have it's cusomers. It completely open source, in contrast
to Android where parts are closed and Windwos as usual.

-- 
Marc Santhoff 


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Firefox OS

2013-07-15 Thread Michael Schnell

On 07/15/2013 12:49 PM, Kostas Michalopoulos wrote:
Since Firefox (and i assume Firefox OS) uses the new "asm.js" subset 
of javascript (a js subset that looks like assembly which can be 
converted to native code, something like a js-based portable LLVM 
bitcode), couldn't FPC generate asm.js code instead of x86 
assembly/machine code?

Interesting stuff, indeed.


Obviously that wouldn't solve the GUI issue (one will still need to 
implement a HTML-based (or whatever) LCL backend, but i think with 
canvas nowadays that is possible).

This in fact is a completely different issue.

In fact, having support for a HTML5 backend (aka "Widget Type"), with 
the normal Lazarus LCL form designer for designing the the user 
interface, would allow for nice stuff in the non-mobile world as well.


-Michael


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Firefox OS

2013-07-15 Thread Michael Schnell

On 07/15/2013 11:20 AM, Reinier Olislagers wrote:
Firefox OS used to run on top of Android 
I don't think that this is the way it is meant to be installed on 
devices by - say - Deutsche Telekom. Why would they wont to install 
anything "on top of Android", when they have Android anyway ?



and AFAIK they intend to have Android compatibility as well...


I don' see how an API done in Java can be compatible with an API done in 
JavaScript. (But it was not me who suggested that Firefox OS is 
completely JavaScript, I did not check the facts here...)


-Michael

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Firefox OS

2013-07-15 Thread Reinier Olislagers
On 15-7-2013 12:49, Kostas Michalopoulos wrote:
> Since Firefox (and i assume Firefox OS) uses the new "asm.js" subset of
> javascript (a js subset that looks like assembly which can be converted
> to native code, something like a js-based portable LLVM bitcode),
> couldn't FPC generate asm.js code instead of x86 assembly/machine code?
> 
> Obviously that wouldn't solve the GUI issue (one will still need to
> implement a HTML-based (or whatever) LCL backend, but i think with
> canvas nowadays that is possible).

Or perhaps even FPC=>LLVM backend=>emscripten=>javascript but perhaps
that's a couple of conversions too many...


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Firefox OS

2013-07-15 Thread Kostas Michalopoulos
Since Firefox (and i assume Firefox OS) uses the new "asm.js" subset of
javascript (a js subset that looks like assembly which can be converted to
native code, something like a js-based portable LLVM bitcode), couldn't FPC
generate asm.js code instead of x86 assembly/machine code?

Obviously that wouldn't solve the GUI issue (one will still need to
implement a HTML-based (or whatever) LCL backend, but i think with canvas
nowadays that is possible).



On Mon, Jul 15, 2013 at 12:15 PM, Michael Schnell wrote:

> On 07/15/2013 11:58 AM, Michael Van Canneyt wrote:
>
>> Delphi XE5 - scheduled for release in september is supposed to contain
>> Android support.
>>
>
> They already delayed this several times, so I don't hold my breath.
>
> In fact this would be the first support for Linux after Kylix death. (Of
> course without VCL compatibility.) In fact, this done, they rather easily
> should be able to support PC Linux and non-mobile ARM systems.
>
> -Michael
>
>
> --
> __**_
> Lazarus mailing list
> Lazarus@lists.lazarus.**freepascal.org
> http://lists.lazarus.**freepascal.org/mailman/**listinfo/lazarus
>
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Firefox OS

2013-07-15 Thread Reinier Olislagers
On 15-7-2013 10:45, Felipe Monteiro de Carvalho wrote:
> On Mon, Jul 15, 2013 at 10:02 AM, Michael Schnell  wrote:
>> I read the Firefox OS is gaining support by cell phone manufactures and
>> distributors (e.g. "Deutsche Telekom").
> 
> There is also Bada and WebOS ... in my opinion there are too many
> mobile OS, for me personally I think it is best to simply forget that
> mobile OS's with less than 5% market share exist at all. It is not
> worth the time to study them.

And Sailfish and Tizen...
(Is Bada still alive BTW?)

Agreed.
However, a lot of these smaller players all focus on
Javascript+HTML5+OS-specific APIs/extensions.
As the first 2 parts of that stack are always the same, targeting that
part may be a bit more worthwile.

However, as long as there is overwhelming market share for iOS+Android,
supporting those does seem to be the easiest way.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Firefox OS

2013-07-15 Thread Mark Morgan Lloyd

Michael Schnell wrote:

On 07/15/2013 11:03 AM, Mark Morgan Lloyd wrote:

Michael Schnell wrote:
But can an "OS" completely done in Jacascript be a valid alternate 
foundation for cell phone and Tablet designs ?


A lot of people who should know better think that the GUI is the OS. 
That is why I put quotes around "OS". In fact iOS is BSD Unix in a 
similar disguise.


But besides the GUI API these "OS"es provide API definitions for phone 
stuff handling and other hardware/system resources.


With Android these API definitions are done by Java objects, No idea how 
this is done with iOS and Firefox OS.


I think we're all writing from a position of limited practical 
experience, but I think the major issue is whether Firefox OS allows 
arbitrary binaries "backdoor" access to GUI facilities.


If a binary app can't get to the GUI, if there's no provision for binary 
(or Java) applets, and if there's no way of injecting even a transient 
bytecode binary then it might be that translating to Javascript plus 
Android-style custom-drawn controls is the only option.


OTOH, Michael's Pascal-to-Javascript translator project comes handy in 
that case.


But do we really want to go there? The FPC and Lazarus projects are 
stretched enough as it is, without having to get involved in Javascript 
language issues.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Firefox OS

2013-07-15 Thread Michael Schnell

On 07/15/2013 11:58 AM, Michael Van Canneyt wrote:
Delphi XE5 - scheduled for release in september is supposed to contain 
Android support.


They already delayed this several times, so I don't hold my breath.

In fact this would be the first support for Linux after Kylix death. (Of 
course without VCL compatibility.) In fact, this done, they rather 
easily should be able to support PC Linux and non-mobile ARM systems.


-Michael

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Firefox OS

2013-07-15 Thread Michael Van Canneyt



On Mon, 15 Jul 2013, Michael Schnell wrote:


On 07/15/2013 11:23 AM, Reinier Olislagers wrote:
However, as long as there is overwhelming market share for iOS+Android, 
supporting those does seem to be the easiest way.


Yep, but - as always -  being prepared is not a bad thing.

In fact with Android having a market share of some 70 %, it was a bad 
decision of Embarcadero's to support only iOS in the mobile world.


Delphi XE5 - scheduled for release in september is supposed to contain Android 
support.

Michael.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Firefox OS

2013-07-15 Thread Michael Schnell

On 07/15/2013 11:23 AM, Reinier Olislagers wrote:
However, as long as there is overwhelming market share for 
iOS+Android, supporting those does seem to be the easiest way.


Yep, but - as always -  being prepared is not a bad thing.

In fact with Android having a market share of some 70 %, it was a bad 
decision of Embarcadero's to support only iOS in the mobile world.


-Michael


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Accents in IDE and my apps

2013-07-15 Thread Graeme Geldenhuys
On 2013-07-13 15:55, waldo kitty wrote:
> 
>> The reason is that the 'Reply' button copies the hidden message ID. It
>> does not matter if you change the subject. The mail is associated with
>> the old mail thread "Should TObject or TComponent have a Comment
>> property".
> 
> exactly...


It is such a pity that we can not induce an electric shock remotely, to
each person that does that. It is so annoying!  One more reason I prefer
newsgroups (NNTP). The news client automatically inserts the "To" field
when you press "New message".


Regards,
  G.


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Losing data when saving Database fileds with "Size" defined and UTF8 chars

2013-07-15 Thread Reinier Olislagers
On 14-7-2013 8:00, Daniel Simoes de Ameida wrote:
> When the FieldDefs.Size properties is defined and we are trying to save
> UTF8 characters with accented words, the Data is Truncated.
Could be because UTF8 with accented characters may result in multiple
bytes per character.
If the size is too small, the number of bytes passed to the db won't fit.

The difference between specifying size in bytes and in characters still
needs to be addressed.
AFAIR, there's already a bug open for this.

Workaround: make your field size as large as the maximum number of UTF8
bytes you expect.


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Losing data when saving Database fileds with "Size" defined and UTF8 chars

2013-07-15 Thread Graeme Geldenhuys
On 2013-07-14 19:00, Daniel Simoes de Ameida wrote:
> 
> When the FieldDefs.Size properties is defined and we are trying to
> save UTF8 characters with accented words, the Data is Truncated.


Yeah, I have experienced that too. There really should be a .Size and
.DataSize property - or something similar.

Even setting the database to use Unicode text fields doesn't solve the
problem either - in then messes with the .Size property value in SqlDB.

My work-around is to simply use VarChar(), and make sure you add some
extra space for those Unicode fields. Then hold thumbs that the client
apps don't hit that limit. eg: I might have a business object that says
a field is 100 "characters" long. This limit gets applied to the user
interface too. But the database field is actually defined as
VarChar(150). This gives me 50 bytes extra for the occasional Unicode
character. Definitely not an ideal solution though.


Regards,
  - Graeme -

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus, Jedi etc.

2013-07-15 Thread Mark Morgan Lloyd

Michael Schnell wrote:

On 07/13/2013 04:01 PM, Marco van de Voort wrote:
- VST is in Lazarus-CCR, but an older v4 version. VST porting is 
hindered by not accepting changes (like a sane IFDEF system) upstream, 
which makes every port an one off change.


As I am interested in this and did some discussions in musical software 
mailing lists:


Are there licensing problems regarding doing / publishing VST enabled 
software done with Lazarus / FPC ?


What about ASIO ?

(AFAIK, both VST and ASIO use a propriety License by Steinberg that is 
rather incompatible to open source stuff).


I think he meant either VirtualStringTree or was using the wrong acronym 
for VirtualTreeView.


There's obviously plenty of other things scattered around CCR and 
individual web/FTP servers, but in many cases they're Lazarus projects 
which also work with Delphi rather than Delphi projects which are known 
to be robust with FPC/Lazarus (which was basically the OP's question 
that I was relaying).


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Firefox OS

2013-07-15 Thread Michael Schnell

On 07/15/2013 11:03 AM, Mark Morgan Lloyd wrote:

Michael Schnell wrote:
But can an "OS" completely done in Jacascript be a valid alternate 
foundation for cell phone and Tablet designs ?


A lot of people who should know better think that the GUI is the OS. 
That is why I put quotes around "OS". In fact iOS is BSD Unix in a 
similar disguise.


But besides the GUI API these "OS"es provide API definitions for phone 
stuff handling and other hardware/system resources.


With Android these API definitions are done by Java objects, No idea how 
this is done with iOS and Firefox OS.



As far as I know, Firefox OS is Linux

As is Android.

with all GUI interfacing done by HTML5 hence JavaScript etc., 
I recon that you are right here. I gather that HTML5 shows a rather nice 
(and ubiquitous) ways to do a GUI API for user programs. Maybe this in 
fact is an advantage over Android.


from my limited reading I don't know whether there's a native-code 
capability which might mean that as a platform it's even more 
restrictive than Android.


I read that any propriety stuff is supposed to be avoided in that 
project. So it should be rather easy to open the system for this.


OTOH, Michael's Pascal-to-Javascript translator project comes handy in 
that case.


-Michael


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Firefox OS

2013-07-15 Thread Reinier Olislagers
On 15-7-2013 10:19, Michael Schnell wrote:
> On 07/15/2013 10:12 AM, Michael Van Canneyt wrote:
>> As far as I know, it is Javascript. Not Java.
> 
> As Firefox is a very fast Javascript interpreter this does make sense.
> 
> But it supposedly makes it completely incompatible with Android from
> ground up (this might be on purpose).

Why would this make it incompatible? If you're interested, I'd suggest
doing some research before posting this kind of stuff.
Firefox OS used to run on top of Android and AFAIK they intend to have
Android compatibility as well...

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Firefox OS

2013-07-15 Thread Michael Schnell

On 07/15/2013 10:45 AM, Felipe Monteiro de Carvalho wrote:


There is also Bada and WebOS ...

and Windows 8 phone, and ...

But besides iOS and Android, I only see Firefox OS as a candidate for 
decent growth.


Lets wait and see...

-Michael

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Firefox OS

2013-07-15 Thread Mark Morgan Lloyd

Michael Schnell wrote:

On 07/15/2013 10:12 AM, Michael Van Canneyt wrote:

As far as I know, it is Javascript. Not Java.


As Firefox is a very fast Javascript interpreter this does make sense.

But it supposedly makes it completely incompatible with Android from 
ground up (this might be on purpose).


But can an "OS" completely done in Jacascript be a valid alternate 
foundation for cell phone and Tablet designs ?


A lot of people who should know better think that the GUI is the OS. As 
far as I know, Firefox OS is Linux with all GUI interfacing done by 
HTML5 hence JavaScript etc., from my limited reading I don't know 
whether there's a native-code capability which might mean that as a 
platform it's even more restrictive than Android.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Firefox OS

2013-07-15 Thread Felipe Monteiro de Carvalho
On Mon, Jul 15, 2013 at 10:02 AM, Michael Schnell  wrote:
> I read the Firefox OS is gaining support by cell phone manufactures and
> distributors (e.g. "Deutsche Telekom").

There is also Bada and WebOS ... in my opinion there are too many
mobile OS, for me personally I think it is best to simply forget that
mobile OS's with less than 5% market share exist at all. It is not
worth the time to study them.

-- 
Felipe Monteiro de Carvalho

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Firefox OS

2013-07-15 Thread Michael Schnell

On 07/15/2013 10:25 AM, Michael Van Canneyt wrote:


but needs time. As all things.

Understood;-) .

(Great project nonetheless...)

-Michael

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus, Jedi etc.

2013-07-15 Thread Michael Schnell

On 07/13/2013 04:01 PM, Marco van de Voort wrote:

- many turbopower components work.


But unfortunately this does not include AsyncPro, while a decent, 
comfortable, unified, OS-independent way to handle data streams form/to 
Serial Ports and TCP/IP sockets (i.e. using blocked I/O in hidden 
threads and firing Main asynchronous thread events when appropriate) is 
often requested by application programmers.


-Michael

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Firefox OS

2013-07-15 Thread Michael Van Canneyt



On Mon, 15 Jul 2013, Michael Schnell wrote:


On 07/15/2013 10:12 AM, Michael Van Canneyt wrote:

I really should get my Pascal-to-Javascript translator project on track :(


How far has this advanced yet ?


I have the AST trees ready, it's just a matter of writing the conversion step 
between the 2.

Nothing hard, but needs time. As all things.

Michael.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Firefox OS

2013-07-15 Thread Michael Schnell

On 07/15/2013 10:12 AM, Michael Van Canneyt wrote:

As far as I know, it is Javascript. Not Java.


As Firefox is a very fast Javascript interpreter this does make sense.

But it supposedly makes it completely incompatible with Android from 
ground up (this might be on purpose).


But can an "OS" completely done in Jacascript be a valid alternate 
foundation for cell phone and Tablet designs ?


-Michael



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Firefox OS

2013-07-15 Thread Michael Schnell

On 07/15/2013 10:12 AM, Michael Van Canneyt wrote:
I really should get my Pascal-to-Javascript translator project on 
track :(


How far has this advanced yet ?

-Michael

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Firefox OS

2013-07-15 Thread Michael Van Canneyt



On Mon, 15 Jul 2013, Michael Schnell wrote:

I read the Firefox OS is gaining support by cell phone manufactures and 
distributors (e.g. "Deutsche Telekom").


While Android support seems to be a hot topic here, what about the upcoming 
"Firefox OS".


I suppose this is Java-based in a similar way as Android, and maybe a unified 
support for both can be provided.


As far as I know, it is Javascript. Not Java.

I really should get my Pascal-to-Javascript translator project on track :(

Michael.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Firefox OS

2013-07-15 Thread Michael Schnell
I read the Firefox OS is gaining support by cell phone manufactures and 
distributors (e.g. "Deutsche Telekom").


While Android support seems to be a hot topic here, what about the 
upcoming "Firefox OS".


I suppose this is Java-based in a similar way as Android, and maybe a 
unified support for both can be provided.


-Michael

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus, Jedi etc.

2013-07-15 Thread Michael Schnell

On 07/13/2013 04:01 PM, Marco van de Voort wrote:
- VST is in Lazarus-CCR, but an older v4 version. VST porting is 
hindered by not accepting changes (like a sane IFDEF system) upstream, 
which makes every port an one off change.


As I am interested in this and did some discussions in musical software 
mailing lists:


Are there licensing problems regarding doing / publishing VST enabled 
software done with Lazarus / FPC ?


What about ASIO ?

(AFAIK, both VST and ASIO use a propriety License by Steinberg that is 
rather incompatible to open source stuff).


-Michel

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus, Jedi etc.

2013-07-15 Thread Michael Schnell

On 07/13/2013 03:52 PM, leledumbo wrote:

The whole JEDI sucks, dependencies hell everywhere and IS TIED TO WINDOWS!


...

It's at least five years ago when I was dealing with the Jedi community. 
I remember that at that time they have been tpersuing compatibility with 
FPC/Lazarus at least in some of the libraries (e.g. jclMath, which I was 
looking at).


-Michael

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus