Re: [fpc-pascal] Can class function used in specialized class use intristic functions Low, High with generic type ?

2017-04-20 Thread Sven Barth via fpc-pascal
Am 20.04.2017 13:02 schrieb "LacaK" : > > Hi *, > > I have some generic class: > > generic T2DNumericArray = object(specialize T2DArray) > public > class function Truncate(Value: double): T; inline; > ... > > In class function Truncate I want check if supplied

Re: [fpc-pascal] fpc code for Java class and Android.

2017-04-20 Thread Paul Breneman
On 04/19/2017 10:49 PM, Paul Breneman wrote: I'm using a Nexus 7 tablet with Android 6.0.1. GNURoot provides a chroot with Debian? It has been *three* years since I did this before and things worked then so I don't know what might have changed so ppcarm doesn't even run now. Android? GNURoot?

[fpc-pascal] Can class function used in specialized class use intristic functions Low, High with generic type ?

2017-04-20 Thread LacaK
Hi *, I have some generic class: generic T2DNumericArray = object(specialize T2DArray) public class function Truncate(Value: double): T; inline; ... In class function Truncate I want check if supplied Value is in range of T. T will be always ordinal type (byte, integer) ... (I

Re: [fpc-pascal] Coroutines and VirtualAlloc

2017-04-20 Thread Mark Morgan Lloyd
On 20/04/17 09:00, Marco van de Voort wrote: In our previous episode, Mark Morgan Lloyd said:> > I don't know. Such effort should chiefly come from the people interested init I guess.> > Turning it around a little: are there still FPC targets that don't have > threads? Having coroutines would

Re: [fpc-pascal] *** GMX Spamverdacht *** Re: WebAssembly Target

2017-04-20 Thread Graeme Geldenhuys
On 2017-04-14 12:53, Michael Van Canneyt wrote: >> Why is it scripting needed to display a calendar? > > To display a popup menu, for example. But apparently you don’t need JavaScript for that either. Here is a blog post (dated 5 years ago) where the person proved just that - you can use HTML and

Re: [fpc-pascal] WebAssembly Target

2017-04-20 Thread Graeme Geldenhuys
On 2017-04-14 18:56, Jürgen Hestermann wrote: > Therefor I use NoScript to prevent me from such code. > 90% of these web pages using scripting are crap anyway. It's also nice to see how fast web pages load if no JavaScript is enabled (magnitudes faster). Also most web Ads stop working too. A nice

Re: [fpc-pascal] WebAssembly Target

2017-04-20 Thread Jürgen Hestermann
Am 2017-04-20 um 10:25 schrieb Graeme Geldenhuys: > On 2017-04-14 09:41, Jürgen Hestermann wrote: >> I hate Java Script and use NoScript to block it. > You don't need a browser add-on for that. Simply go to (Firefox) > about:config and search for JavaScript. Double click the >

Re: [fpc-pascal] Threading vs Parallelism ?

2017-04-20 Thread Mark Morgan Lloyd
On 20/04/17 07:00, Michael Schnell wrote: Again (AFAIK) NPTL had not been introduce to make threads "lighter" but to allow for threads behaving in a decently POSIX compatible way (e.g. the threads of a process getting only a common share of time slices). In any event, processes on unix are

Re: [fpc-pascal] Coroutines and VirtualAlloc

2017-04-20 Thread Ryan Joseph
> On Apr 20, 2017, at 3:01 PM, Bernd Mueller wrote: > > it would be really nice to have coroutines for the embedded targets like AVR > and ARM. What are people using this for btw? Personally I wanted them to solve some problems in game programming where I lots of nested

Re: [fpc-pascal] Coroutines and VirtualAlloc

2017-04-20 Thread Mark Morgan Lloyd
On 20/04/17 08:30, Bernd Mueller wrote: On 04/20/2017 09:40 AM, Mark Morgan Lloyd wrote:>> Turning it around a little: are there still FPC targets that don't have> threads? Having coroutines would allow a native thread mechanism to be> implemented, without relying on the underlying OS. it would

Re: [fpc-pascal] *** GMX Spamverdacht *** Re: WebAssembly Target

2017-04-20 Thread Graeme Geldenhuys
On 2017-04-20 09:40, Michael Van Canneyt wrote: > The people fighting javascript in the browser are fighting a reargard battle. > It will only get worse. Indeed, I was simply pointing out that _some_ functionality is possible without JavaScript, but the majority of what we consider "the standard

Re: [fpc-pascal] Threading vs Parallelism ?

2017-04-20 Thread Mark Morgan Lloyd
On 20/04/17 09:00, Marco van de Voort wrote: In our previous episode, Mark Morgan Lloyd said:> > In any event, processes on unix are *defined* as owning resources- > memory, handles and so on- while threads only manage control flow. I > believe that MS also have "fibers" which are

Re: [fpc-pascal] Use a procedural type for declare a procedure\function

2017-04-20 Thread Sven Barth via fpc-pascal
Am 20.04.2017 08:44 schrieb "Andrey M, Zubarev" : > > Hi All, > > Why can't use procedural type for declare a procedure\function? > Why ever allow the exact same signature? It's uncomfortable > Maybe it makes sense to introduce into the language such a possibility? No, that

Re: [fpc-pascal] *** GMX Spamverdacht *** Re: WebAssembly Target

2017-04-20 Thread Michael Van Canneyt
On Thu, 20 Apr 2017, Graeme Geldenhuys wrote: On 2017-04-14 12:53, Michael Van Canneyt wrote: Why is it scripting needed to display a calendar? To display a popup menu, for example. But apparently you don’t need JavaScript for that either. Here is a blog post (dated 5 years ago) where

Re: [fpc-pascal] Coroutines and VirtualAlloc

2017-04-20 Thread Ryan Joseph
> On Apr 20, 2017, at 4:06 PM, denisgolovan wrote: > > Another example is network-related code (both client and server code). > Break your huge finite state machines into pipeline stages via coroutines and > it gets pretty modular, extensive and simple to reason about.

Re: [fpc-pascal] Coroutines and VirtualAlloc

2017-04-20 Thread Bernd Mueller
On 04/20/2017 09:40 AM, Mark Morgan Lloyd wrote: Turning it around a little: are there still FPC targets that don't have threads? Having coroutines would allow a native thread mechanism to be implemented, without relying on the underlying OS. it would be really nice to have coroutines for the

Re: [fpc-pascal] Coroutines and VirtualAlloc

2017-04-20 Thread Mattias Gaertner
On Thu, 20 Apr 2017 07:40:44 + Mark Morgan Lloyd wrote: > Turning it around a little: are there still FPC targets that don't have > threads? Last month Karoly added one: WASM. Mattias ___ fpc-pascal maillist

Re: [fpc-pascal] Threading vs Parallelism ?

2017-04-20 Thread Mark Morgan Lloyd
On 20/04/17 10:22, Marco van de Voort wrote: In our previous episode, Mark Morgan Lloyd said:> > They are not really threads. They must be scheduled within threads.> > https://msdn.microsoft.com/en-us/library/windows/desktop/ms682661(v=vs.85).aspx> > from the article they don't seem to have

Re: [fpc-pascal] Coroutines and VirtualAlloc

2017-04-20 Thread Marco van de Voort
In our previous episode, Mark Morgan Lloyd said: > > I don't know. Such effort should chiefly come from the people interested > > init I guess. > > Turning it around a little: are there still FPC targets that don't have > threads? Having coroutines would allow a native thread mechanism to be >

Re: [fpc-pascal] WebAssembly Target

2017-04-20 Thread Graeme Geldenhuys
On 2017-04-14 09:41, Jürgen Hestermann wrote: > I hate Java Script and use NoScript to block it. You don't need a browser add-on for that. Simply go to (Firefox) about:config and search for JavaScript. Double click the "javascript.enabled" preference and it will toggle between enabled true/false.

Re: [fpc-pascal] Threading vs Parallelism ?

2017-04-20 Thread Marco van de Voort
In our previous episode, Mark Morgan Lloyd said: > > In any event, processes on unix are *defined* as owning resources- > memory, handles and so on- while threads only manage control flow. I > believe that MS also have "fibers" which are non-preemptive threads. They are not really threads.

Re: [fpc-pascal] fpc code for Java class and Android.

2017-04-20 Thread Jon Foster
On 04/20/2017 05:17 AM, Paul Breneman wrote: On 04/19/2017 10:49 PM, Paul Breneman wrote: I'm using a Nexus 7 tablet with Android 6.0.1. GNURoot provides a chroot with Debian? It has been *three* years since I did this before and things worked then so I don't know what might have changed so

Re: [fpc-pascal] Coroutines and VirtualAlloc

2017-04-20 Thread denisgolovan
20.04.2017, 11:43, "Ryan Joseph" : >>  On Apr 20, 2017, at 3:01 PM, Bernd Mueller wrote: >> >>  it would be really nice to have coroutines for the embedded targets like >> AVR and ARM. > > What are people using this for btw? Personally I wanted them

Re: [fpc-pascal] Use a procedural type for declare a procedure\function

2017-04-20 Thread Michael Van Canneyt
On Wed, 19 Apr 2017, Andrey M, Zubarev wrote: Hi All, Why can't use procedural type for declare a procedure\function? Why ever allow the exact same signature? It's uncomfortable Maybe it makes sense to introduce into the language such a possibility? For example such code: [code] type

Re: [fpc-pascal] Threading vs Parallelism ?

2017-04-20 Thread Marco van de Voort
In our previous episode, Mark Morgan Lloyd said: > > They are not really threads. They must be scheduled within threads. > > https://msdn.microsoft.com/en-us/library/windows/desktop/ms682661(v=vs.85).aspx > > from the article they don't seem to have that many advantages, except > > toconvert

Re: [fpc-pascal] Threading vs Parallelism ?

2017-04-20 Thread Michael Schnell
On 14.04.2017 09:36, Sven Barth via fpc-pascal wrote: A process definitely is less "light" than threads even on Unix systems: a process has its own address space Not really true (see below). Why do you think the concept of threads was introduced in Unix? Early Unix systems only had

Re: [fpc-pascal] WebAssembly Target

2017-04-20 Thread Michael Schnell
On 14.04.2017 10:41, Jürgen Hestermann wrote: I can't understand why scripting is needed for a web page. Regarding the discussion here, the term is "Rich Internet Application" ("RIA") -> https://en.wikipedia.org/wiki/Rich_Internet_application Here, a server based application (e.g. done in

Re: [fpc-pascal] *** GMX Spamverdacht *** Re: WebAssembly Target

2017-04-20 Thread Michael Schnell
On 14.04.2017 12:56, Jürgen Hestermann wrote: Why is it scripting needed to display a calendar? Most obviously: (OK. I do know that there is a timed reload instruction in HTML, that I malevolently ignore in this post, but it would be a PITA to use same in a more complex example, as it would

[fpc-pascal] Use a procedural type for declare a procedure\function

2017-04-20 Thread Andrey M, Zubarev
Hi All, Why can't use procedural type for declare a procedure\function? Why ever allow the exact same signature? It's uncomfortable Maybe it makes sense to introduce into the language such a possibility? For example such code: [code] type TMyCommand=function(arg1:TMyArg):TMyCommandResult begin

Re: [fpc-pascal] Coroutines and VirtualAlloc

2017-04-20 Thread Mark Morgan Lloyd
On 19/04/17 20:00, Marco van de Voort wrote: In our previous episode, Daniel Gaspary said:> So..> > Any chance of an Official implementation ? I don't know. Such effort should chiefly come from the people interested init I guess. Turning it around a little: are there still FPC targets that