On 05/01/2018 07:09 AM, Ryan Joseph wrote:
In PHP I always just load the file into string and loop over it line by line
using regex to cut out the parts I need. I like it because it’s so easy to
write and gets the job done. What ever I would make it Pascal would be 10x
larger probably.
FWIW:
> On May 1, 2018, at 5:55 PM, Marco van de Voort wrote:
>
> I already stumbled on regex :_)
Anyone feel free to make a good example of a token parser in Pascal so I can
see how it looks. I never an actual good parser that understands syntax so I
don’t have any good examples
In our previous episode, Michael Van Canneyt said:
> >> If you have access to the underlying API spec in the form of an IDL, then
> >> we
> >> could make a tool that parses the IDL and dumps the API in the form of
> >> "external" declarations.
> >
> > There it is. A parser needs to be made I
On Tue, 1 May 2018, Ryan Joseph wrote:
On May 1, 2018, at 4:37 PM, Michael Van Canneyt wrote:
What's wrong with the above code ?
It obviously works well enough, otherwise they wouldn't have made the API so.
The float32 array is a Javascript type that
On Tue, 1 May 2018 10:52:32 +0200 (CEST)
Michael Van Canneyt wrote:
>[...]
> > Note that the 'var' is a workaround till eventually pas2js supports
> > external 'const' without expression.
>
> Well, I specially did not mention this, because I consider it a dirty hack.
>
> On May 1, 2018, at 4:37 PM, Michael Van Canneyt
> wrote:
>
> What's wrong with the above code ?
>
> It obviously works well enough, otherwise they wouldn't have made the API so.
>
> The float32 array is a Javascript type that encapsulates a memory buffer.
> I assu
On Tue, 1 May 2018, Ingemar Ragnemalm wrote:
Den 2018-05-01 kl. 09:50, Ryan Joseph wrote:
On Apr 25, 2018, at 9:43 PM, Michael Van Canneyt
wrote:
Ah, webgl...
I had a look at this some time ago, and got depressed. Quickly closed the
Den 2018-05-01 kl. 09:50, Ryan Joseph wrote:
On Apr 25, 2018, at 9:43 PM, Michael Van Canneyt wrote:
Ah, webgl...
I had a look at this some time ago, and got depressed. Quickly closed the
browser and didn't look back. Same for webaudio:(
On Tue, 1 May 2018, Ryan Joseph wrote:
On May 1, 2018, at 4:10 PM, Mattias Gaertner wrote:
In pas2js it will probably look similar to this:
var vertices: array of glfloat = (-0.5, 0.5, -0.5, -0.5, 0.0, -0.5);
var vertex_buffer: TInsertNameHere;
begin
//
> On May 1, 2018, at 4:10 PM, Mattias Gaertner
> wrote:
>
> In pas2js it will probably look similar to this:
>
> var vertices: array of glfloat = (-0.5, 0.5, -0.5, -0.5, 0.0, -0.5);
> var vertex_buffer: TInsertNameHere;
> begin
> // Create a new buffer object
>
On Tue, 1 May 2018, Ryan Joseph wrote:
On May 1, 2018, at 4:12 PM, Michael Van Canneyt wrote:
If you have access to the underlying API spec in the form of an IDL, then we
could make a tool that parses the IDL and dumps the API in the form of
"external"
On Tue, 1 May 2018, Mattias Gaertner wrote:
On Tue, 1 May 2018 15:23:25 +0700
Ryan Joseph wrote:
[...]
what do we do for records then? We often need to pass arrays of specific types
for functions such as glBufferData.
type
TVec2f = record
x, y: GLfloat;
> On May 1, 2018, at 3:50 PM, Michael Van Canneyt
> wrote:
>
>
> As far as I know, all consts in Javascript are scoped ?
>
> If this is not the case, then of course we should allow it.
I think they added const. In the past I’ve seen using “let” but I don’t think
On Tue, 1 May 2018 15:36:59 +0700
Ryan Joseph wrote:
>[...]
> > Constants without expression can only exist in an external class.
>
> Just curious but why can’t you declare a const anywhere for any reasons?
You can.
> >> Also I mistyped, GLfloat is a type so how
> On May 1, 2018, at 3:17 PM, Mattias Gaertner
> wrote:
>
> JS only knows double for numbers.
>
> At compile time you can use almost all the normal types: byte,
> word, longint, etc.
> pas2js has an alias single, but because internally it is a double this
> gives
On Tue, 1 May 2018, Mattias Gaertner wrote:
On Tue, 1 May 2018 14:20:12 +0700
Ryan Joseph wrote:
> On May 1, 2018, at 2:03 PM, Michael Van Canneyt
wrote:
>
> Of sorts.
> MyClass = Class external name 'my'
> const
>MyConst :
On Tue, 1 May 2018, Ryan Joseph wrote:
On May 1, 2018, at 3:17 PM, Michael Van Canneyt wrote:
So constants must be part of the class? In the example below
gl.COLOR_BUFFER_BIT is scoped to WebGLRenderingContext so I guess that’s the
reason.
Yes.
Constants
> On May 1, 2018, at 3:17 PM, Michael Van Canneyt
> wrote:
>
>> So constants must be part of the class? In the example below
>> gl.COLOR_BUFFER_BIT is scoped to WebGLRenderingContext so I guess that’s the
>> reason.
>
> Yes.
>
> Constants without expression can
On Tue, 1 May 2018 14:20:12 +0700
Ryan Joseph wrote:
> > On May 1, 2018, at 2:03 PM, Michael Van Canneyt
> > wrote:
> >
> > Of sorts.
> > MyClass = Class external name 'my'
> > const
> >MyConst : integer
> > end;
> >
> > Will emit
On Tue, 1 May 2018, Ryan Joseph wrote:
On May 1, 2018, at 2:03 PM, Michael Van Canneyt wrote:
Of sorts.
MyClass = Class external name 'my'
const
MyConst : integer
end;
Will emit MyClass.MyConst. The compiler needs to know the type.
I’m confused now. The
On Tue, 1 May 2018 15:03:30 +0700
Ryan Joseph wrote:
> > On May 1, 2018, at 2:55 PM, Mattias Gaertner
> > wrote:
> >
> > GLFloat is a type, not a const.
> >
> > type GLFloat = double;
>
> Yeah I mistyped. We shouldn’t be redefining
> On May 1, 2018, at 2:55 PM, Mattias Gaertner
> wrote:
>
> GLFloat is a type, not a const.
>
> type GLFloat = double;
Yeah I mistyped. We shouldn’t be redefining GLfloat though (I doubt it’s a
double in OpenGLES/WebGL either) so how does this (or other types)
On Tue, 1 May 2018 12:11:37 +0700
Ryan Joseph wrote:
>[...]
> const
> GLfloat = MAP_TO_SOMETHING; // do we have external consts?
GLFloat is a type, not a const.
type GLFloat = double;
Mattias
___
fpc-pascal maillist -
> On May 1, 2018, at 2:03 PM, Michael Van Canneyt
> wrote:
>
> Of sorts.
> MyClass = Class external name 'my'
> const
>MyConst : integer
> end;
>
> Will emit MyClass.MyConst. The compiler needs to know the type.
I’m confused now. The class is named
On Tue, 1 May 2018, Ryan Joseph wrote:
On May 1, 2018, at 11:27 AM, Michalis Kamburelis
wrote:
I suspect that we will have a unit like WebGL in pas2js that exposes
the necessary JS functions for Pascal applications.
Sure but how does the porting process look?
On Tue, 1 May 2018, Michalis Kamburelis wrote:
I had a look at this some time ago, and got depressed. Quickly closed the
browser and didn't look back. Same for webaudio :(
The API of WebGL is actually mostly a subset of OpenGLES which is a
subset of OpenGL. WebGL is quite small, if you
> On May 1, 2018, at 11:27 AM, Michalis Kamburelis
> wrote:
>
> I suspect that we will have a unit like WebGL in pas2js that exposes
> the necessary JS functions for Pascal applications.
Sure but how does the porting process look? I’m reading the wiki and it looks
2018-05-01 4:50 GMT+02:00 Ryan Joseph :
>
>
>> On Apr 25, 2018, at 9:43 PM, Michael Van Canneyt
>> wrote:
>>
>> Ah, webgl...
>>
>> I had a look at this some time ago, and got depressed. Quickly closed the
>> browser and didn't look back. Same
> On Apr 25, 2018, at 9:43 PM, Michael Van Canneyt
> wrote:
>
> Ah, webgl...
>
> I had a look at this some time ago, and got depressed. Quickly closed the
> browser and didn't look back. Same for webaudio :(
I’m actually a little curious about this myself because
On Thu, 26 Apr 2018, Michael Schnell wrote:
On 25.04.2018 15:20, Michael Van Canneyt wrote:
Now that interface support has been added to the list of implemented
language
features of pas2js, we're looking to get feedback on what best to
tackle next.
Of course rather off-topic here, but as
On 25.04.2018 15:20, Michael Van Canneyt wrote:
Now that interface support has been added to the list of implemented
language
features of pas2js, we're looking to get feedback on what best to
tackle next.
Of course rather off-topic here, but as you ask:
How usable is Lazarus for pas2js
On Thu, 26 Apr 2018 13:13:25 +0200 (CEST)
Michael Van Canneyt wrote:
> On Thu, 26 Apr 2018, Benito van der Zander wrote:
>
> >
> > Hi,
> >
> > I would like to vote for pointer support...
>
> "Pointers to records" are supported.
Basically pointers are implemented as
On Thu, 26 Apr 2018, Benito van der Zander wrote:
Hi,
I would like to vote for pointer support...
"Pointers to records" are supported.
But general purpose pointers and such are not planned.
Michael.
___
fpc-pascal maillist -
Hi,
I would like to vote for pointer support...
Cheers,
Benito
On 25.04.2018 15:20, Michael Van Canneyt wrote:
Hello,
Now that interface support has been added to the list of implemented
language
features of pas2js, we're looking to get feedback on what best to
tackle next.
This
On Wed, 25 Apr 2018, Reimar Grabowski wrote:
On Wed, 25 Apr 2018 16:43:30 +0200 (CEST)
Michael Van Canneyt wrote:
Ah, webgl...
I had a look at this some time ago, and got depressed.
Can you elaborate?
Nothing special, simply the sheer size of it :(
Michael.
On Wed, 25 Apr 2018 16:43:30 +0200 (CEST)
Michael Van Canneyt wrote:
> Ah, webgl...
>
> I had a look at this some time ago, and got depressed.
Can you elaborate?
R.
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
On Wed, 25 Apr 2018, Ingemar Ragnemalm wrote:
Michael Van Canneyt wrote:
Hello,
Now that interface support has been added to the list of implemented
language
features of pas2js, we're looking to get feedback on what best to tackle
next.
This time, the poll is
Michael Van Canneyt wrote:
Hello,
Now that interface support has been added to the list of implemented language
features of pas2js, we're looking to get feedback on what best to tackle next.
This time, the poll is not on the forum, so you do not need to have an
account
Hello,
Now that interface support has been added to the list of implemented language
features of pas2js, we're looking to get feedback on what best to tackle next.
This time, the poll is not on the forum, so you do not need to have an
account to vote.
Here is a link to the poll:
39 matches
Mail list logo