-
Content Count
112 -
Joined
-
Last visited
-
Days Won
1
Posts posted by Ugochukwu Mmaduekwe
-
-
12 hours ago, David Schwartz said:I think the problem you're going to run into is in how the RTTI support changed massively in D2010. Legacy apps built before that aren't going to care. But most libraries since then have come to depend heavily on it for a variety of things, especially when it comes to offering services of many kinds. There's stuff that simply cannot be done in D7 or even D2007 that can be done with the new RTTI support in D2010 and fwd.
A lot of these have to do with design-time support as well. So you can sometimes find libs that have run-time support back that far, but not much design-time support.
A straightforward REST/JSON API shouldn't be terribly difficult to write, unless you want to be able to send objects over the wire and have them reconstituted at the other end. Short of that, you might find something that works for you.
@David Schwartz Thanks for this answer. Also, this project will involves transmitting quite a number of binary data over the wire.
I am also considering the fact that I will be working with Unicode data so that will impose issues of it's own especially considering the fact that Delphi 2007 RTL is not Unicode aware. -
23 minutes ago, ertank said:If you have the option to choose REST only then you might really would like to consider MARS Curiosity.
Edit: Just checked GitHub and it seems no packages exists for Delphi 2007.
Thanks but it seems like it doesn't support Delphi 2007 like you correctly figured out.
-
8 minutes ago, Kryvich said:It's unfair to compare the ancient Delphi 2007 with the relatively new VS 2017. It is not even Unicode compliant.
@Kryvich, I am not really comparing. I am just evaluating my options.
-
8 minutes ago, Mohammed Nasman said:If you can use the community edition, you should give Delphi MVC a try.
Otherwise, I will go with @Lars Fosdal suggestion.
Would have loved to look into Delphi MVC but unfortunately they don't have plans to upgrade the Delphi version they currently use.
However I will look into Delphi MVC for my own personal projects.
Thanks a lot.- 1
-
2 minutes ago, Lars Fosdal said:I'd go for the C# approach instead of fiddling with an ancient Delphi.
Thanks a lot, this has been what I have always wanted to do.
will wait for other responses though. -
Hi all, as the question stated, what is the possibility of having a rest/soap webapi written in Delphi 2007?
What challenges are we bound to face? what components do you think will be needed? what advice can you give?
lastly do you think it will be a better option to write the rest/soap webapi in C# using VS 2017 instead?
Unfortunately the version of Delphi can't be upgraded.
thanks.
-
5 minutes ago, Stefan Glienke said:Keep in mind that I have a dict<int, int> so all I do is hash an integer - so the overhead of each gethashcode call is significant for the overall result. If I would hash like some larger data the overhead shrinks - that's what I mentioned earlier about benchmarks and comparing things 🙂
so for your use case, the other leaf xxHash unit will be more suitable after some optimizations due to it's simplistic stack based approach
-
10 minutes ago, Stefan Glienke said:Still like >20times slower than using the one from your xxHash32 unit.
THash.TransformUntyped has huge overhead with that dynamic array and the implicit finally associated with it and probably way more stuff going on while the TxxHash32.CalculateHash32 only works with some variables on the stack.
BTW for the xxHash32 unit: at least the Delphi compiler will never ever inline RotateLeft32 as the body comes after the call and in such situations it never inlines (see http://docwiki.embarcadero.com/RADStudio/Rio/en/Calling_Procedures_and_Functions_(Delphi)#Using_the_inline_Directive)
>20times slower is really strange as that is not what happens on my end.
as regards the dynamic array, I am aware it has it's overhead but I added it since it gives people the ability to adjust the buffer size to one of their choice.
-
21 minutes ago, Stefan Glienke said:hash.ComputeUntyped(value, SizeOf(Integer)).GetHashCode; // hash is an IHash instance where I created a TXXHash32 for.
The above should be
hash.ComputeUntyped(value, SizeOf(Integer)).GetUInt32; // hash is an IHash instance where I created a TXXHash32 for. //or hash.ComputeUntyped(value, SizeOf(Integer)).GetInt32; // hash is an IHash instance where I created a TXXHash32 for.
Also, you could use TXXHash32 and avoid the whole slowdown associated with interface virtual calls but then you will have to manage the memory yourself.
doing what I described above then you will havehash.ComputeUntyped(value, SizeOf(Integer)).GetUInt32; // where hash is a THash instance.
Could you please try this and post your results?
-
13 minutes ago, Attila Kovacs said:Not outside, as it's strict private. You could pass TA instances to the method you are using to initialize your record.
class function DefaultB(ATA: TA): TB; static; begin Result.ClassAInstance := ATA; end;
Don't know why I didn't think of this in the first place.
Thanks a lot. -
35 minutes ago, Lars Fosdal said:Not sure that I understand the full context, but assuming you have an instance of TB in TA, overriding TA.AfterConstruction would allow you to assign self to that instance of TB?
Hmm, That looks like something that could work.
will check it out, Thanks.
- 1
-
first of all, I must intercept here.
MurmurHash is not faster than xxHash, never.
That implementation been used is naive and has never been optimized.
I suggest you use the version in HashLib4Pascal as that has been optimized over time.Results on My PC are attached below.
As you can see in the benchmark, xxHash blows MurmurHash out of the waters especially in FPC.
-
Hi,
So here is what I want to achieve.
I have a class named TA. in class TA, I have a record named TB.
is it possible to get the constructed instance of TA as a variable in TB without the use of an external variable that is assigned at the construction of TA of course?
type TA = class abstract(TObject) strict private type TB = record private var ClassAInstance: TA; // ========================> is it possible to get the constructed instance of TA in TB so I can assign it to the variable. Block: array [0 .. 7] of Byte; Offset: UInt64; BlockOffset: Int32; function Clone(): TB; procedure Read(const ADestination: TBytes; ADestinationOffset, AOutputLength: UInt64); class function DefaultB(): TB; static; end;
Thanks.
-
@Fr0sT.Brutal, @Stefan Glienke, Thanks a lot for your answers.
will give it a try.
Thanks once again. -
Hi all, is it possible to have an array of weak references in Delphi, or a container that does not affect the reference count of the object been added to it?
-
2 hours ago, Attila Kovacs said:Hi all,
Is there any existing unit/module whatever for handling In-App clipboard functionality?
App should not leak data over clipboard, but I would like to keep the feature inside the app.
It's shouldn't be too hard, I'm just curious if there is already any solution.
Handling text is sufficient.
(VCL/Windows)
@Attila Kovacs you might have to end up writing your own app specific clipboard because the Windows clipboard content is accessible to all running programs.
-
26 minutes ago, Fr0sT.Brutal said:Flutter is working on Dart, right? A language with unclear perspectives. Anyway, what about binary sizes?
@Fr0sT.Brutal can you please explain what you mean by "unclear perspectives" in relation to dart?
-
2 hours ago, Andy Vines said:My CE licence ran out on Sunday, so this morning the licence wizard appears, I tried to download the new version but I received an email saying:
'Our records show that you have previously obtained a trial license for this product and version. A trial license can be issued only once. If you would like to extend the product evaluation, please contact Embarcadero Support'
I have never downloaded a trial, only the CE version, so I have asked support for a new CE licence, if nothing comes then I guess it will be time to move to Visual Studio, I only use Delphi for personal and hobby applications so I can't afford the price of a commercial licence.
You can give Lazarus and FreePascal a try, at least that's what I do these days.
- 1
-
38 minutes ago, Darian Miller said:ISO based installer for free users is at: https://cc.embarcadero.com/item/30894
This is not the ISO based installer.
This is the web based one instead.
-
2 minutes ago, Lars Fosdal said:Was there a 10.3.1 or 10.3.2 Community Edition?
No but I assumed since this is the last major update before a new major version (10.4), they might wish to surprise the community. :wishfulthinking:
-
Does anyone know if a community edition of 10.3.3 will be released?
- 1
-
10 hours ago, Remy Lebeau said:However, you don't actually need OAuth to access GMail. You can instead go into your Google account settings and generate an Application-specific password, which works just fine with Indy.
The problem with application password is that it requires 2FA setup which in turn forces you to authenticate each login even though it's for something as trivial as sending mails from your app.
- 1
-
@Geoffrey Smith, thanks a lot for this.
I really appreciate.
Will test it once I get to my workstation.
Thanks once again.
-
Here is an attempt by someone to implement FPC awesome TProcess in Delphi.
May be someone else can work on extending it with Linux support.
Voice Audio Transfer AEC ECHO cancellation
in Windows API
Posted
you did not state your platform, Android, iOS, Windows?