Re: [fpc-pascal] WebAssembly Target

2017-03-17 Thread Graeme Geldenhuys
On 2017-03-17 14:57, Reimar Grabowski wrote: > Perhaps the JS side is doing so little that it hardly matters (as it > should be, when doing WebGL you want to do as much on the GPU as > possible). A very good point. It was probably all down to WebGL (ie: your GPU) doing all the work. Regards,

Re: [fpc-pascal] Threadvar member field

2017-03-17 Thread Michael Schnell
On 16.03.2017 19:38, African Wild Dog wrote: I have a class where its instances are shared between multiple threads. How can I declare one variable per instance per thread? Does this really make sense ? Accessing threadvars (in fpc) costs a lot more CPU cycles (i.e. involves an OS call) than

Re: [fpc-pascal] Thread Variables Initial Values

2017-03-17 Thread Michael Van Canneyt
On Fri, 17 Mar 2017, African Wild Dog wrote: Hello, The documentation is not clear about the initial values of thread variables: *"If threads are used then a copy is made for each thread (including the main thread). Note that the copy is made with the original value of the variable, not

Re: [fpc-pascal] Threadvar member field

2017-03-17 Thread Karoly Balogh (Charlie/SGR)
Hi, On Fri, 17 Mar 2017, Michael Schnell wrote: > Accessing threadvars (in fpc) costs a lot more CPU cycles (i.e. involves > an OS call) than accessing normal variables. This is actually entirely platform specific. The underlying implementation of threadvars is very different for each platform,

Re: [fpc-pascal] WebAssembly Target

2017-03-17 Thread Daniel Gaspary
On Fri, Mar 17, 2017 at 5:16 AM, Michael Van Canneyt wrote: > In fact, there is an alternate approach, transpiling pascal to Javascript. > > It's much farther ahead than the webassembly target, already produces > programs running in the browser and the first web-based

Re: [fpc-pascal] WebAssembly Target

2017-03-17 Thread Daniel Gaspary
On Fri, Mar 17, 2017 at 2:55 PM, Michael Van Canneyt wrote: > Forgot to say that there will of course be some classes to manipulate the > DOM at will. Thank you, Michael. ___ fpc-pascal maillist -

Re: [fpc-pascal] WebAssembly Target

2017-03-17 Thread Michael Van Canneyt
On Fri, 17 Mar 2017, Daniel Gaspary wrote: On Fri, Mar 17, 2017 at 5:16 AM, Michael Van Canneyt wrote: In fact, there is an alternate approach, transpiling pascal to Javascript. It's much farther ahead than the webassembly target, already produces programs running

Re: [fpc-pascal] Thread Variables Initial Values

2017-03-17 Thread African Wild Dog
2017-03-17 13:09 GMT-03:00 Michael Van Canneyt : > > Nil. > > What exactly is not clear about the documentation ? > The documentation says ".. Note that the copy is made with the original value of the variable ..". But, whats is the original value? I think the

Re: [fpc-pascal] Hash List

2017-03-17 Thread Giuliano Colla
Il 18/03/2017 00:29, African Wild Dog ha scritto: Ia there any hash list implementation in free Pascal? The IniFiles unit (fpc/packages/fcl-base/src/inifiles.pp) provides a THashedStringList (descendant from TstringList) which I'm using reliably since many years. Giuliano

[fpc-pascal] Hash List

2017-03-17 Thread African Wild Dog
Hello, Ia there any hash list implementation in free Pascal? Ghashmap has no documentation. Is it stable for production use? Regards ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Threadvar member field

2017-03-17 Thread African Wild Dog
2017-03-17 5:50 GMT-03:00 Michael Schnell : > On 16.03.2017 19:38, African Wild Dog wrote: > >> I have a class where its instances are shared between multiple threads. >> How can I declare one variable per instance per thread? >> > Does this really make sense ? > > Accessing

Re: [fpc-pascal] Hash List

2017-03-17 Thread silvioprog
On Fri, Mar 17, 2017 at 8:29 PM, African Wild Dog wrote: > Hello, > > Ia there any hash list implementation in free Pascal? > Hello, Please take a look at these examples: https://github.com/graemeg/freepascal/tree/master/packages/rtl-generics/examples and in this

Re: [fpc-pascal] Hash List

2017-03-17 Thread silvioprog
You're welcome. :-) Notice the first link I've passed is exactly showing the TDictionary, recently added to FPC: https://github.com/graemeg/freepascal/blob/master/packages/rtl-generics/src/inc/generics.dictionariesh.inc#L534 . You should take a look at that. :-) On Sat, Mar 18, 2017 at 12:54

Re: [fpc-pascal] Hash List

2017-03-17 Thread African Wild Dog
Thanks for your reply Giuliano, Silvio. To be more specific, i need a generic hash map similar to the Delphi's TDictionary. It seems THashmap from the ghashmap unit is the most close to TDictionary. Regards ___ fpc-pascal maillist -

Re: [fpc-pascal] WebAssembly Target

2017-03-17 Thread Reimar Grabowski
On Thu, 16 Mar 2017 11:14:17 + Graeme Geldenhuys wrote: > And I am pleasantly surprised! :) That demo worked perfectly on my > system. Sound, animation, graphics all silky smooth. Impressive indeed. If running a 3 year old iOS Demo in a browser when we have

[fpc-pascal] Thread Variables Initial Values

2017-03-17 Thread African Wild Dog
Hello, The documentation is not clear about the initial values of thread variables: *"If threads are used then a copy is made for each thread (including the main thread). Note that the copy is made with the original value of the variable, not with the value of the variable at the time the

Re: [fpc-pascal] WebAssembly Target

2017-03-17 Thread Michael Van Canneyt
On Fri, 17 Mar 2017, Daniel Gaspary wrote: On Fri, Mar 17, 2017 at 5:16 AM, Michael Van Canneyt wrote: In fact, there is an alternate approach, transpiling pascal to Javascript. It's much farther ahead than the webassembly target, already produces programs running

Re: [fpc-pascal] WebAssembly Target

2017-03-17 Thread Michael Schnell
On 16.03.2017 11:46, Graeme Geldenhuys wrote: Umm, didn't they say the exact same thing about Java Applets, No idea Flash, While it's depreciated right now it did last for a long time and was _very_ useful. Silverlight While technically it did look nice, it was a single-company thingy and

Re: [fpc-pascal] WebAssembly Target

2017-03-17 Thread Michael Schnell
On 15.03.2017 17:58, Karoly Balogh (Charlie/SGR) wrote: Well, "degree of success" is relative, ... Anyway, it's great to know that you are watching the proceedings regarding WebAssembly, and already did some effort to get started Just for enhancing your motivation :-) (of course this

Re: [fpc-pascal] WebAssembly Target

2017-03-17 Thread Michael Van Canneyt
On Thu, 16 Mar 2017, Michael Schnell wrote: On 15.03.2017 17:58, Karoly Balogh (Charlie/SGR) wrote: Well, "degree of success" is relative, ... Anyway, it's great to know that you are watching the proceedings regarding WebAssembly, and already did some effort to get started Just for

Re: [fpc-pascal] WebAssembly Target

2017-03-17 Thread Michael Van Canneyt
On Fri, 17 Mar 2017, Karoly Balogh (Charlie/SGR) wrote: Hi, On Fri, 17 Mar 2017, Michael Van Canneyt wrote: In fact, there is an alternate approach, transpiling pascal to Javascript. It's much farther ahead than the webassembly target, already produces programs running in the browser and

Re: [fpc-pascal] WebAssembly Target

2017-03-17 Thread Karoly Balogh (Charlie/SGR)
Hi, On Fri, 17 Mar 2017, Michael Van Canneyt wrote: > In fact, there is an alternate approach, transpiling pascal to Javascript. > > It's much farther ahead than the webassembly target, already produces > programs running in the browser and the first web-based components are > already being