Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Fr0sT.Brutal last won the day on September 28

Fr0sT.Brutal had the most liked content!

Community Reputation

247 Excellent

1 Follower

Technical Information

  • Delphi-Version
    Delphi XE2

Recent Profile Visitors

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

  1. Fr0sT.Brutal

    Accessing the memory of a Python List

    I've no idea about numpy and how it organizes its arrays but making array object point to a buffer coming from Delphi is exactly what I meant
  2. Fr0sT.Brutal

    Interlocked API and memory-mapped files

    Why not just use pipes or sockets instead?
  3. Fr0sT.Brutal

    Accessing the memory of a Python List

    You of course can feed Python with the pointer to your Delphi array but what you can do with it depends on what you want Python to do with it. Iа Python has raw arrays, you're lucky.
  4. Fr0sT.Brutal

    Reading fields with different lenghts

    f1 := ReadField; f2 := ReadField; f3 := ReadField; f4 := ReadField;
  5. Fr0sT.Brutal

    Find UDP Server

    What's so terrible in IPv6?
  6. Fr0sT.Brutal

    Find UDP Server

    Too complex IMHO. Bonjour even requires DLL. But some concepts could be borrowed indeed
  7. Fr0sT.Brutal

    Find UDP Server

    Send broadcast message with specific payload and address/port of sender
  8. Fr0sT.Brutal

    Having fun with Delphi

    It will produce implicit finally section for strings anyway so not a big problem I suppose.
  9. Fr0sT.Brutal

    Delphi's code formatter vs. GExperts' code formatter

    There's quite simple logic behind - block comments of one possible style inside comments of another possible style.
  10. +1 for comparing to browser. Moreover, you don't even need Wireshark, just the browser's Dev tools with which you even can modify requests before sending.
  11. Fr0sT.Brutal

    Having fun with Delphi

    My variant: Url := TPath.CreateX('example.com') / 'sub' / 'sub1' / 'onemoresub' / 'index.html'; 'X' means 'Posix' path delimiters. Initially I used only platform-defined one but I needed both simultaneously (Posix-style for network addresses and Windows-style for local paths)
  12. Fr0sT.Brutal

    Delphi's code formatter vs. GExperts' code formatter

    Good old patch (aka diff) files ))
  13. Fr0sT.Brutal

    Detecting update versions in defines

    Wow, at least in 10.3 it works even with class members {$if not declared(TObject.Create)} BOO! // will be ignored {$endif} upd But not this way: {$if not declared(TObject.Foo)} BOO! // will be ignored {$endif} Seems this check only works for members that actually exist
  14. No. I'm scaling a 8-bit float value in the approx range 0.0..1.0 to the range 0..2^64-1 Actually parameterless Random generates such value already (I wasn't aware of that overload). Even though Random doesn't include the high boundary of specified range, rounding will produce this value
  15. Fr0sT.Brutal

    Common callback functions, or not?

    Event handlers and callbacks are more or less the same, I mean event handlers are callbacks (which is more general term). Usually event handlers in follow some additional traditions: - they're procedures not functions and if they return a value, they do it as 'out' parameter - they're optional, that is, an app won't crash if no handler is assigned (though it might do nothing useful then) - most of the time they're called as a reaction to an input or event; often the call chain provides mechanism of cancelling of further process (either by setting a flag of raising EAbort) I use explicit naming as callback when I have an obligatory method that must be assigned and return a value. TGetNameCb = function : string of object; TGreeter = class GetNameCb: TGetNameCb; procedure SayHi; end; procedure TGreeter.SayHi; begin WriteLn('Hi, ', GetNameCb); end; Of course it's just a matter of taste TGetNameEvent = procedure(out aName: string) of object; TGreeter = class GetNameEvent: TGetNameEvent; procedure SayHi; end; procedure TGreeter.SayHi; var Name: string; begin if not Assigned(GetNameEvent) then raise ..; GetNameEvent(Name); WriteLn('Hi, ', Name); end;