Jump to content

David Heffernan

Members
  • Content Count

    3516
  • Joined

  • Last visited

  • Days Won

    175

Posts posted by David Heffernan


  1. 8 hours ago, Remy Lebeau said:

    I'm sure either one will be fast enough for your needs.  Chess isn't very computationally heavy.

    I'm baffled. Both of these statements are wrong. 

     

    Delphi is known to be produce very poor and inefficient code. Although I'm not qualified to comment on FPC's code gen. 

    • Thanks 1

  2. 42 minutes ago, Sherlock said:

    Considering the simple fact that a VPN access point would be exposed to the entire Internet with its sh*tload of malevolent entities out there just waiting to pounce on just another self made "secure" server I would not touch this project with a ten foot pole and oven mits...and a hazmat suit. Just introduce your pal to WireGuard and be done with it.

    Exactly. Why reinvent the wheel? And if you absolutely had to implement VPN in Delphi code, then hire an expert that has implemented VPN before.


  3. 49 minutes ago, Remy Lebeau said:

    Only a return of -1 (error)

    I didn't see that condition documented. I also hadn't realised that some streams can read fewer than the requested bytes but there still could be more left. 

     

    That does seem a strange design choice. If you can wait for at least one byte then surely you can wait for all requested. 


  4. Floating point can be tested for exactness too. 

     

    Your idea of doing floating point calcs and then rounding to 4dp before equality testing is still subject to issues. If there are differences after the floating point calc, then the round to 4dp could fall on different sides of the rounding boundary. 

     

    Always in these discussions there needs to be more specifics of the calcs involved. 


  5. 2 hours ago, A.M. Hoornweg said:

    One would only do this if one wants to convert floating point numbers to fixed point numbers. Fixed point numbers can be compared with exactness and there are use cases for that. 

     

     

     

     

     

    Why would you be calling power and then truncating to 4dp and comparing for exactness? 


  6. 10 minutes ago, Sherlock said:

    This is a highly specialized subject and neither my job nor my personal interests got me all to involved in this area of computer science. So as a layman, if I understand this correctly, he'll have to go back to the drawing board, as soon as he discovers characters are now UTF8, UTF16 or even UTF32, because his finely tuned algorithm is designed for single byte characters. Or is it as easy as switching data types?

    He's probably using UTF-8 

×