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: yo
> 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 to go by.
In PHP
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 guess
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 encapsulates a memory buffer.
I assu
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.
> a var doesn't protect yo
> 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
It’s difficult to work w
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
browser and didn't look back. Same for webaudio:(
I’m
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
// Create a new buffer object
verte
> 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
> vertex_buffer = gl.createBuff
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" declarations.
There it is. A parse
> 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" declarations.
There it is. A parser needs to be made I guess. You c
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;
end;
type
TVec2b = recor
On Tue, 1 May 2018, Ryan Joseph wrote:
The above would be
Type
WebGLActiveInfo = class external name 'WebGLActiveInfo'
Private
fSize : GLint; external name 'size';
ftype: GLEnum; external name 'type';
fName : DOMString ; external name 'name';
Public
Property size : GLInt Read
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;
> end;
>
> type
> TVec2b = record
> x, y: GLubyte;
> en
On Tue, 1 May 2018, Ryan Joseph wrote:
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 war
> 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
that’s a real const if that
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 do this map to JS, or do I e
> 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 warnings.
what do we do for
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 : integer
> end;
>
> Will emit MyClass.MyConst. The compi
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 without expression can only
> 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 only exist in an external cl
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 MyClass.MyConst. The compiler needs to know the type.
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 class is named WebGLRende
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 GLfloat though (I doubt it’s a
> double in OpenGLES/WebGL
> 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) translate
for the parser?
Re
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 - fpc-pascal@lists.freepascal.
> 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 WebGLRenderingContext in JS (I think
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? I’m reading the wiki and i
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 com
> 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
like it wraps JavaScript cl
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 for webaudio :(
The API of WebGL is actually mostly
> 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 I’ve been using OpenGL
oft
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 yo
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 developm
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 JS references.
For example
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 - fpc-pascal@lists.
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 tim
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
http://lists.freepascal.o
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 not on the forum, so you
40 matches
Mail list logo