Re: [fpc-pascal] USB Human Interface Devices

2019-08-14 Thread José Mejuto
El 14/08/2019 a las 1:41, James Richters escribió: I wonder if HID devices will work at all on Windows the same as they do on Linux. I have not been able to get the HID part of the python code to work on windows yet either because the instructions given to install the packages needed Hello,

Re: [fpc-pascal] *** SPAM *** Re: USB Human Interface Devices

2019-08-14 Thread Jean SUZINEAU
Le 14/08/2019 à 01:41, James Richters a écrit : Anyone have any thoughts on all this? I'm busy for now, but I'll have a look as soon as possible. Did you try to change your driver with Zadig (https://zadig.akeo.ie/) for your device 10CE:EB93 ?

[fpc-pascal] PPCJVM Android JVM target speed of compiled classes measurement

2019-08-14 Thread Mgr. Janusz Chmiel
Please, does somebod of us know, if it would be possible to create some scientific measurement of The speed of compiled classes which have been produced by PPCJCM Android JVM target mode? Or it is rather impossible to create valid test, since there are too many different devices? I would like

Re: [fpc-pascal] += property bug?

2019-08-14 Thread Jean SUZINEAU
Le 14/08/2019 à 23:18, Martin a écrit : inc(CALL_LVL [ LOCAL_CALL ],1) Yes, "inc" does not work for properties. But neither does +=. I agree and in the case of a property I think it would be cleaner to code an Inc method directly in the class, or eventually in a class helper, to write

Re: [fpc-pascal] += property bug?

2019-08-14 Thread Martin
On 14/08/2019 23:05, Bernd Oppolzer wrote: 4 characters in your case, but if you have for example: CALL_LVL [ LOCAL_CALL ] := CALL_LVL [ LOCAL_CALL ] + 1 ;   inc(CALL_LVL [ LOCAL_CALL ],1) "inc(,)"  vs "+=" 6 vs 2 chars 4 more. Yes, "inc" does not work for properties. But neither does +=.

Re: [fpc-pascal] += property bug?

2019-08-14 Thread Bernd Oppolzer
Am 14.08.2019 um 17:41 schrieb wkitt...@windstream.net: On 8/14/19 10:54 AM, Ryan Joseph wrote: Seriously? why is i := i + 1 better than i += 1 ? just more typing for such a simple operation. All languages I use have adopted this syntax and for good reason. good reason?? because someone is

Re: [fpc-pascal] += property bug?

2019-08-14 Thread James Richters
I agree, I hate the self. And this. I really don't even understand them... I'll keep Freepascal too, which I've been able to do more with than I ever imagined possible. James >I also think to the worse case, in Java, when you need to type something like >a.SetX( a.GetX()+1) ... >And to

Re: [fpc-pascal] += property bug?

2019-08-14 Thread James Richters
We're talking apples and oranges here.. sorry my mistake. I was referring to the defaults in the Text IDE, fp.cfg, not fpc.cfg.If you delete fp.cfg or run the Text IDE (fp.exe) from a directory you never ran it in before, it creates new fp.cfg, and fp.ini and the default for those new

Re: [fpc-pascal] Challenge accepted

2019-08-14 Thread Joost van der Sluis
Op 11-08-19 om 12:28 schreef Michael Van Canneyt: What additions are you talking about ? Can we incorporate it ? Improvements are always welcome. Maybe the ability to handle read- or write-only properties. And a flag to allow that properties which are not available in the JSON, are simply

Re: [fpc-pascal] += property bug?

2019-08-14 Thread Bart
On Wed, Aug 14, 2019 at 9:03 PM James Richters wrote: > No, the default is for ”C-Like operators” to be disabled in FPC. No, Sven is right. This is in the default fpc.cfg # Allow goto, inline, C-operators, C-vars -Sgic Of course if you delete that file, then all these are off. -- Bart

[fpc-pascal] where to find materials about MP3 file format

2019-08-14 Thread Mgr. Janusz Chmiel
I have A very big and non easy dream. Making similar MP3 editor like MP3 direct cut for Windows is. But sure! I would like to develop it for Android. And I want to support keyboard letter commands such as inside MP3 directcut for Windows. Sure. I Am not so expert like MR Martin Pesh is. So I

Re: [fpc-pascal] += property bug?

2019-08-14 Thread wkitty42
On 8/14/19 10:54 AM, Ryan Joseph wrote: Seriously? why is i := i + 1 better than i += 1 ? just more typing for such a simple operation. All languages I use have adopted this syntax and for good reason. good reason?? because someone is too lazy to type 4 more characters? yes, i'm counting the

Re: [fpc-pascal] += property bug?

2019-08-14 Thread Ryan Joseph
> On Aug 14, 2019, at 11:41 AM, wkitt...@windstream.net wrote: > > good reason?? because someone is too lazy to type 4 more characters? yes, i'm > counting the readability spaces which could easily be left out... yes, that’s exactly why. Programers got sick of wasting time typing redundant

Re: [fpc-pascal] += property bug?

2019-08-14 Thread Joost van der Sluis
Op 14-08-19 om 17:45 schreef Ryan Joseph: On Aug 14, 2019, at 11:41 AM, wkitt...@windstream.net wrote: good reason?? because someone is too lazy to type 4 more characters? yes, i'm counting the readability spaces which could easily be left out... yes, that’s exactly why. Programers got sick

Re: [fpc-pascal] += property bug?

2019-08-14 Thread Ryan Joseph
> On Aug 14, 2019, at 11:52 AM, Joost van der Sluis wrote: > > Roflol... yeah... people do not use Pascal because they have to type: > i := i + 1; > > Sure. I’m once again shocked that anyone would be against such syntaxes as += so maybe the compiler needs to put them behind a modeswitch.

Re: [fpc-pascal] += property bug?

2019-08-14 Thread Rainer Stratmann
On Mittwoch, 14. August 2019 11:45:20 CEST Ryan Joseph wrote: > > On Aug 14, 2019, at 11:41 AM, wkitt...@windstream.net wrote: > > > > good reason?? because someone is too lazy to type 4 more characters? yes, > > i'm counting the readability spaces which could easily be left out... > yes, that’s

Re: [fpc-pascal] += property bug?

2019-08-14 Thread Ryan Joseph
> On Aug 14, 2019, at 12:04 PM, Rainer Stratmann > wrote: > >> It’s so >> intuitive that basically all languages have adopted the syntax. > > That is not true All languages I use have them: Pascal, C, PHP, C#, Swift, Python, JavaScript. These are some of the most popular languages in the

Re: [fpc-pascal] += property bug?

2019-08-14 Thread Michael Van Canneyt
On Wed, 14 Aug 2019, Ryan Joseph wrote: On Aug 14, 2019, at 12:04 PM, Rainer Stratmann wrote: It’s so intuitive that basically all languages have adopted the syntax. That is not true All languages I use have them: Pascal, C, PHP, C#, Swift, Python, JavaScript. These are some of

Re: [fpc-pascal] += property bug?

2019-08-14 Thread Ryan Joseph
> On Aug 14, 2019, at 2:53 PM, James Richters > wrote: > > I have only used += once; I normally would not use I:=I+1; or I+=1; I > would use Inc(I); Here’s an example of why we like c-style operators, i.e. it reduces redundancy of the variable name. It’s no surprise that programmesr

Re: [fpc-pascal] += property bug?

2019-08-14 Thread James Richters
>They already are, but not a modeswitch, but a directive: {$COperators On/Off}. >Probably from a time before modeswitches were introduced. >It's even per default off. The default fpc.cfg however enables them... No, the default is for ”C-Like operators” to be disabled in FPC. I just

Re: [fpc-pascal] += property bug?

2019-08-14 Thread James Richters
I find viewTransform := TMat4.Identity; viewTransform := viewTransform * TMat4.Translate(x, y, 1); viewTransform := viewTransform * TMat4.Scale(scale, scale, 1); much more readable. But I would just do: viewTransform := TMat4.Identity * TMat4.Translate(x, y, 1) *

Re: [fpc-pascal] += property bug?

2019-08-14 Thread Ryan Joseph
> On Aug 14, 2019, at 3:15 PM, James Richters > wrote: > > I find > viewTransform := TMat4.Identity; > viewTransform := viewTransform * TMat4.Translate(x, y, 1); > viewTransform := viewTransform * TMat4.Scale(scale, scale, 1); > > much more readable. then by having both we all win.

Re: [fpc-pascal] *** SPAM *** Re: USB Human Interface Devices

2019-08-14 Thread James Richters
> Did you try to change your driver with Zadig (https://zadig.akeo.ie/) for > your device 10CE:EB93 ? No, I didn't try that.. but I'm trying it now I downloaded Zadig, and used the pulldown and selected devices until I got the one with the USB ID I want. It filled in as follows: "USB

Re: [fpc-pascal] USB Human Interface Devices

2019-08-14 Thread James Richters
>My code to manage HID USB relays uses hid.dll (32 & 64 bits) or >libusb-1.0 (32 bits only tested) on Windows, and libusb-1.0 or >libusb-0.1 in Linux. I'll have a look at your project.. maybe it will give me some clues. Can you tell me how to get hid.dll? I find it all very confusing, can I

Re: [fpc-pascal] += property bug?

2019-08-14 Thread Ryan Joseph
> On Aug 13, 2019, at 11:09 AM, Sven Barth via fpc-pascal > wrote: > > In general the C operators are not desired. They where added way in the past > in a weak moment and I don't think they'd be added today if FPC wouldn't have > them already. > Seriously? why is i := i + 1 better than i

Re: [fpc-pascal] += property bug?

2019-08-14 Thread Sven Barth via fpc-pascal
Michael Van Canneyt schrieb am Mi., 14. Aug. 2019, 18:24: > Basically any operation that requires an address is not allowed. > That += is using an address is an implementation detail of the compiler. > Same as Inc() or In/Exclude(). I don't know the exact reason for this > limitation, > but it's

Re: [fpc-pascal] += property bug?

2019-08-14 Thread Ryan Joseph
> On Aug 14, 2019, at 12:33 PM, Rainer Stratmann > wrote: > > Didn't you know that Ryan? Yes, of course, I use them all the time and it’s why I was defending them from their critics (which I still find hard to believe even exist). Anyways, they exist and can be disabled using the directive

Re: [fpc-pascal] += property bug?

2019-08-14 Thread James Richters
I have only used += once; I normally would not use I:=I+1; or I+=1; I would use Inc(I); FPC does not compile I+=1; by default, you have to go into compiler options and turn on C-Like operators.. I'm sure Lazarus turns this on by default, but it's not the normal default for just FPC. I

Re: [fpc-pascal] += property bug?

2019-08-14 Thread Ryan Joseph
> On Aug 14, 2019, at 12:24 PM, Michael Van Canneyt > wrote: > > I don't see what the issue is ? > > You do have += and the like. They exist, since about as long as I can > remember. I’m just responding to the fact Sven he regretted added them for some reason (and others now I’m

Re: [fpc-pascal] += property bug?

2019-08-14 Thread Rainer Stratmann
On Mittwoch, 14. August 2019 18:24:40 CEST Michael Van Canneyt wrote: > On Wed, 14 Aug 2019, Ryan Joseph wrote: > >> On Aug 14, 2019, at 12:04 PM, Rainer Stratmann wrote: > >>> It’s so > >>> intuitive that basically all languages have adopted the syntax. > >> > >> That is not true > > > > All