Jump to content

Sherlock

Moderators
  • Content Count

    1196
  • Joined

  • Last visited

  • Days Won

    23

Posts posted by Sherlock


  1. Well, considering Windows on ARM will be gaining momentum as soon as some of these https://www.windowscentral.com/hardware/laptops/here-are-the-9-pc-makers-supporting-qualcomms-game-changing-snapdragon-x-elite the streets, it might be a smart move to get the compiler running. But that's just my totally unprofessional opinion. On the other hand, MS themselves are increasing the pressure. Just look at the agenda for this years "Build": https://build.microsoft.com/en-US/sessions/9d806202-be61-4b5d-ba0d-59ecfcaf0482?source=sessions


  2. I think it is not filling the fields themselves, but the words used to fill them. Some "Heuristics" are really just that simple. Take Windows UAC installer detection for example. If an exes name contains Install, setup or even patch it will automatically need to be run with elevated privileges. If however you provide a manifest requesting a non elevated execution level the UAC will not elevate.


  3. OK here's what I don't get. Seeing this

    const
      FuzzFactor = 1000;
      SingleResolution   = 1E-7 * FuzzFactor;
      DoubleResolution   = 1E-15 * FuzzFactor;

    I have to ask myself, why not

     

    const
      SingleResolution   = 1E-4;
      DoubleResolution   = 1E-12;

    Sure the calculation happens only once, and FuzzFactor seems to explain a magic number but then we still have those other magic numbers... just an observation.


  4. I feel you got a typo in your code, @dummzeuch 

    	type
    	  TNullableDateTime = record
    	  private
    	    FIsValid: INullableTypesFlagInterface;
    	    FValue: TDateTime;
    	  public
    	    function Dump: string;
    	    // other methods and operators
    	  end;
    	 
    	// ...
    	implementation
    	// ...
    	 
    	function TNullableDateTime.Dump: string;
    	begin
    	  if IsValid then
    	    Result := DateTimeToStr(Value)  // <- should be FValue?
    	  else
    	    Result := '<invalid>';
    	end;

    Should the Dump function not refer to FValue?


  5. For your assets on the Releases page please, please don't use the Codenames only. I just sat in front of my Delphi with an open project and could not quickly find out if the ubiquitous number 12 represents the elusive city of Alexandria or Athens, unsure of which of your Assets to download. If you must waste space by using Codenames, then please at least waste two spaces more by adding the version you mean to address....or to satisfy my Monkness scrap the Codenames altogether.

    • Like 1

  6. I was tasked with finding a way to know if files have been altered. The possible alterations can only be caused by either system failure or a semi malicious person as the computer is not connected to a network and the gain for said person is...minimal at best. In both cases the altered files would have to be recreated instead of reused which would slow down a different process a bit. In short these are cache files. And of course the best way to know if a file has been altered without permission is a hash, since Windows permissions are sketchy at best. One of these files grows by roughly 2600 Bytes every 5 seconds, and therefore it would be necessary to rehash after each such interval. The system would be generating up to 20 of these files "simultaneously" with each of these files being about 6 hours long on average and may peak at 24 hours. So in Bytes we are talking on average 11MB peaking to 44MB.

    Here's the question: What would be the best way to do this without to much of an impact on performance. I could use Delphis built-in hashing system.Hash.TSHA1. It is pretty straight forward, but before I dive in on the shallow end of this pool and break my neck...perhaps one of you has a better suggestion.

     


  7. 16 hours ago, Brandon Staggs said:

    If you really need that kind of hand-holding, you need to move to a different language.

    There's an argument I can subscribe to: Spare us the syntactic sugar of the last 15 years and concentrate on the bug fixing.

    Digit separators, generics, inline variable declaration, multiline string literals, string-like operations support for dynamic arrays? Can them all, and burn the heretics who asked for them :classic_cool:

    • Like 1
×