-
Content Count
122 -
Joined
-
Last visited
-
Days Won
2
Posts posted by Wagner Landgraf
-
-
The same issue happens with our TMS Sparkle library. It looks like it affected WinHttp API, which is what both Sparkle and Delphi REST library use.
I'm afraid this might be even a Microsoft bug, or at least I couldn't find any valuable or updated information that clarifies better what's happening and if and how to properly use the WinHttp library to overcome this issue.
- 1
-
-
3 hours ago, Lars Fosdal said:Do they have this for their other products as well?
We considered that URL to be the "documentation site" for the GraphQL library.
It's analog, for example, to https://doc.tmssoftware.com/biz/aurelius (for TMS Aurelius) or https://doc.tmssoftware.com/flexcel/vcl (for TMS Flexcel), which are also separated "sites" from the main TMS site and the official product pages (downloads, orders, etc.). If you pay attention it's the same structure and output, we used the same tool to generate the content for the three of them.
The fact the URL is https://graphql-delphi.com instead of something like doc.tmssoftware.com/graphql is simply a matter of trying to comply with the "pattern" of other GraphQL libraries out there, like graphql-java.com, https://graphql-dotnet.github.io or https://graphene-python.org.
- 2
-
@futuron and @Lars Fosdal and everybody else using M1 and Delphi. I'm about to enter this adventure. 🙂 It's been a while since you posted, are you going through the experience without issues? I think I have 3 main questions:
1. Is Windows 11 the best option, I wonder if someone is using Windows 10 with it. I don't get positive reviews about Windows 11 at all.
2. Is Delphi working flawlessly on it? Compiling for all platforms, the IDE, specially debugging...?
3. Side question, but I wonder your opinion on Pro 16GB to Max 32GB just for software development. Is Pro 16GB being enough?
-
1 minute ago, David Heffernan said:I don't really see the value of this, if the input is contracted to be assigned. That makes it a programming error, your tests will AV and you will fix it. No need to clutter the code with if not Assigned tests.
Fair enough, it was more an example to show that relying on the parameter type is sometimes not enough. But as a library writer I don't think it's bad to give a better error message to the user of my classes (whose code I have no control of) telling him what he did wrong, instead of raising a cryptic AV and waiting him to realize what he did wrong or even blame the framework itself.
- 1
-
1 minute ago, Attila Kovacs said:I would eventually, if I'm using them in the constructor. Eventually, as I'm not sure that an exception("I'm dumb") is better than an AV.
If I'm not using them in the constructor, there is no reason to validate them.
Also, it can be still trash because it's not nil.
If the interface is required for your whole class to properly work, why you wouldn't want to check it in the constructor? Why allowing a instance to be created in an "invalid" state? You would have to check if the interface is nil everywhere in your code and for no use, since your class won't work without it.
-
9 minutes ago, Attila Kovacs said:he has no problems with memory management, he even made it clear in just a couple of replies above so I have no idea what you trying to prove here
He was not the only one posting here.
-
12 minutes ago, Attila Kovacs said:Must be a very rare occasion where the parameter type itself does not cover the validity and the validity would not change with time, as far as I can think of. In this case of course a validation is not avoidable. However, I still think, that that is not the case behind the problem because it should be such rare, that he would not brought it up. I suspect over- and early-validation. At least, my advice was, not to do them if not neccessary.
A very common case is when you inject objects and interfaces in the constructor. At the very least you would want to check if they are not nil.
- 3
-
1 hour ago, Rollo62 said:I came already to the conclusion:
Raising on purpose in Create() is fine, especially to guard against missing or faulty injected parameters.
Amen to that.
-
1 hour ago, Attila Kovacs said:Can't see a damn question about memory management. Maybe I'm reading a different thread.
I see lots of discussions about how to properly structure try..finally statements and how it behaves depending if a constructor raises an exception or not; if the object should be created inside or outside the try..finally, if the destructor should have a try..finally inside it, etc.
Maybe indeed it's a different one. This is the one I'm reading: https://en.delphipraxis.net/topic/6149-bestpractices-to-raise-or-not-to-raise-an-exception-in-a-class-constructor
-
Wow, what a long thread and discussion for something "simple". Use the 25-year old pattern for Delphi memory management:
Foo := TFoo.Create; try finally Foo.Free; end;
And let the exception raising begin. Anywhere.
- 4
-
-
Maybe you can check the source code of the AWS SDK for Delphi, more specifically the AWS Signer unit, and see how it compares to yours and spot any possible difference in algorithm?
-
30 minutes ago, Anders Melander said:Yes, it probably could be done, but should it?
It's not a bad idea, but without low level compiler support (on E: IMyError do ... ) I wouldn't do it. Personally I want my error handling to be as simple and robust as possible so it doesn't potentially make a bad situation worse.
It's an interesting approach when you have a centralize exception handler/processor mechanism - like logging systems, serializers, servers, etc.. It's a way to add metadata to the exception without having to be strict to a specific class hierarchy.
-
Just out of curiosity, I wonder if anyone implements interfaces from Exception classes? Like:
EMyException = class(Exception, IMyInterface)
Of course this would require interfaces would be non-referenced counted, but it would be a way to add arbitrary information to exceptions without having to inherit them from a specific class.
-
3 minutes ago, Wil van Antwerpen said:The problem is that Microsoft does not provide licenses for that and so far there are no indications that they ever will. Windows on Arm only works with OEM hardware suppliers and apple isn't one of them.
That was true for Windows 10, are you sure it will be the same for Windows 11? I believe ARM in Windows 11 will be a 1st class citizen like Intel.
-
53 minutes ago, Wil van Antwerpen said:Virtualisation platforms are not supported. If you run Windows in a VM then you have to run an Arm version and MS hasn't provided a license for that
Doesn't Windows 11 already provide ARM support?
-
8 minutes ago, Vincent Parrett said:they are all so different because we all have different ideas.
That's exactly the reason why none of them will ever be widely adopted. There should be one single manager that applies all the different ideas. It's not impossible.
-
1 hour ago, Fr0sT.Brutal said:imagine 10 copies of JVCL...
If I'm not wrong, @Vincent Parrett's package manager puts the packages in a global cache. So if you have multiple projects using the same version of JVCL, only one copy will be in your storage. If a couple of projects use an older version, then you will have two copies of JVCL. So it's the ideal scenario. I guess that's how it works, but he can confirm it.
-
I think the "problem" with Package Manager is that is has to be widely adopted by the community to be very useful. Because the key is that relevant libraries and 3rd parties are available in the package manager. "Unfortunately" Embarcadero is pushing GetIt so it's unlikely we will have a different one being widely adopted, I guess.
- 2
-
1 hour ago, Stefan Glienke said:The question is this: do you want to get a wide adoption rate of something you've built or do you want to get two and a half coffees paid.
As for how the console is done: Visual Studio Code simply communicates via stdin/stdout/stderr - see https://vscode.readthedocs.io/en/latest/editor/integrated-terminal/
Or if you want to find a way to do constant updates and improvements or leave it abandoned.
-
Just bumping this topic to ask: regardless of all the issues, are you guys still using some code coverage tool (if yes, which one), or just do not use it at all? I also miss a good tool for that.
-
UTCNow := TTimeZone.Local.ToUniversalTime(Now);
-
11 hours ago, SwiftExpat said:Also worth mentioning from TMS is with the FNC UI pack you get an object inspector
That is a different one. There is an object inspector control in FNC UI pack, which is cross-platform, and there is an object inspector in TMS Scripter, which is VCL-only. They have no code in common.
ANN: Open Source Event Bus NX Horizon
in Delphi Third-Party
Posted
@Dalija Prasnikar Nice framework and thanks for contribution! When developing, did you check https://github.com/spinettaro/delphi-event-bus and if yes, why it didn't serve your purpose?