Jump to content

hsauro

Members
  • Content Count

    96
  • Joined

  • Last visited

  • Days Won

    2

hsauro last won the day on August 2 2022

hsauro had the most liked content!

Community Reputation

35 Excellent

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. hsauro

    Scientific research

    Depends what numerical methods you want. Runge-Kutta is straightforward to write, I know there are some Delphi versions on github. Wht kind of plotting functions were you looking for? Is this the site you meant https://www.compadre.org/OSP/ ? If so this looks more like a collection of mini apps rather than a reusable library. I could be wrong.
  2. hsauro

    DelphiVCL4Python

    I’ve used and it seems to work ok. I think it’s a nice idea. I only encountered one minor edge case (can’t remember them now) but the developers quickly fixed the issue.
  3. hsauro

    CPas - C for Delphi

    But you can now link lib files with your CPas since you say “Now you can link in static C libs directly into Delphi:”?
  4. hsauro

    CPas - C for Delphi

    What’s the relationship with what you can do with to this article from rudy http://rvelthuis.de/articles/articles-cobjs.html Is it that you can now link lib files?
  5. hsauro

    Access to Dropbox/Google Drive/One Drive

    It’s hard to do this right out of the box as there is so much documentation to absorb. I’ve not tried myself but others recommend using third-party libraries such a tms cloud. I don’t know if there are any open source libraries available.
  6. hsauro

    Slow rendering with SKIA on Windows

    There is a reply to the query from skis-discuss. Not sure if it helps: On Intel machines we fairly unilaterally disable MSAA-based rendering techniques, so the intel OpenGL and Vulkan cases are quite likely rendering on the CPU and just uploading a texture. There is a chance, since this is a convex shape, that it's using an analytic convex path renderer. When MSAA is available, we prioritize some faster tessellating path renderers. It looks like on nVidia the sample locations are different between OpenGL and Vulkan for whatever reason, but both show a similar variety of grayscale values. I would guess that this is MSAA4 and is using the atlas'ing path renderer, which uses a sample count from GrContextOptions::fInternalMultisampleCount. This defaults to 4, but you can override it to 8 and get higher visual quality. You can also set it to 0 to disable the offscreen MSAA-based techniques. DirectX 11 is drawing a circle without any anti-aliasing. You can do the same in Ganesh by setting the SkPaint's antialias boolean to false, although this will be ignored if you've created a MSAA surface to render directly too
  7. hsauro

    New ChatLLM application.

    Thanks, I’ll give it a try.
  8. hsauro

    New ChatLLM application.

    This looks very interesting. One question, are tuning up the AI for Delphi specifically or are you just using the AI as provided?
  9. hsauro

    Adding docs strings to wrapped functions

    Thanks for the additional information, it would have taken me sometime to figure it out how to do it. The code works as given. One way to make it more manageable, which I might try, is to add the docs as attributes to the methods, then use rtti to pick out the attribute before wrapping, add the information to a dictionary then call the wrapper. The DocSever could then just look up the docs in the dictionary.
  10. hsauro

    Adding docs strings to wrapped functions

    I saw that interface, I wondered if that would be something relevant. I’ll look into it
  11. I'd like to add doc strings to functions (or methods) that are in a wrapped Delphi object. I can see how to do it when adding the methods manually using AddDelphiMethod but haven't been able to figure out how to do it when using RegisterDelphiWrapper. I looked at the module RegisterDelphiWrapper creates but I couldn't see the methods in my Delphi object and I could trace where the methods were added, For example, given this class: {$METHODINFO ON} ThostAPI = class (TPersistent) function getVersion() : string; end; {$METHODINFO OFF} and registering via: host := THostAPI.Create (controller); DelphiWrapper.RegisterDelphiWrapper(TPyClassWrapper<THostAPI>).Initialize; DelphiWrapper.DefineVar('host', host); I'd like to add a doc string to getVersion()
  12. I particularly like https://www.amazon.com/Delphi-XE2-Foundations-Chris-Rolliston/dp/1477550895
  13. It works! I can return a numpy array and list easily. Thank you!
  14. I updated the sources yesterday afternoon. I'll take another look at the repo. I see there are some changes from 9 hours ago. I'll update to see if that helps.
  15. Thanks for the reply. I tried a very simple example to try it out with no arguments, a method that just returns a list of NULLs but I'm getting a runtime error (I also used setitem to fill the list in case that was the problem, but same error). This is the method: function ThostAPI.NewList : PPyObject; begin Result := GetPythonEngine.PyList_New(5); end; and here is the runtime error when using this python code from app import host x = host.NewList () TypeError: Call "NewList" returned a value that could not be converted to Python Error: Unsupported conversion from TValue to Python value I couldn't resolve the issue so I started to use the more low level calls (not using the wrapping unit) and I can return lists and numpy arrays to python. But it would be interesting to know what might be the issue with the above code. The class that contains NewList is just: {$METHODINFO ON} ThostAPI = class (TPersistent) function NewList : PPyObject; end; {$METHODINFO OFF} In the FormCreate I just have: initPython; host := THostAPI.Create (); DelphiWrapper.RegisterDelphiWrapper(TPyClassWrapper<THostAPI>).Initialize; DelphiWrapper.DefineVar('host', host);
×