Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.c    |    Meh, in C you gotta define EVERYTHING    |    243,242 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 242,583 of 243,242    |
|    Michael Sanders to Janis Papanagnou    |
|    Re: srand(0)    |
|    24 Dec 25 17:27:32    |
   
   From: porkchop@invalid.foo   
      
   On Wed, 24 Dec 2025 17:53:54 +0100, Janis Papanagnou wrote:   
      
   > On 2025-12-24 17:17, Michael Sanders wrote:   
   >>   
   >> Unix:   
   >> $ head -c 8 /dev/urandom | od -An | tr -d ' '   
   >> 4fa2c3d17b9a8f12   
   >>   
   >> Windows:   
   >> PS C:\Users\Bob>   
   >> $bytes = New-Object byte[] 8   
   >> [System.Security.Cryptography.RandomNumberGenerator]::Create(   
   .GetBytes($bytes)   
   >> [Console]::Write($bytes | ForEach-Object { "{0:x2}" -f $_ })   
   >   
   > Amazing! 8-o   
   >   
   > Or rather; frightening! ("The little Shop of Horrors")   
   > A mixture (best/worst) of all; OO, Functional, and Shell?   
   >   
   > What is that; "Powershell", or something else?   
   > (I've mostly ignored Windows during the past 20+ years.)   
   >   
   > Janis   
      
   Yes its Powershell. You nailed it spot on IMO its terrible Janis.   
   *Speaking only for myself* it's: thick/crufty/oop/functional/shell   
   all mashed together like sludge. Awful stuff.   
      
   And plain old 'cmd.exe' (more or less the Windows equivalent   
   of /bin/sh) has evolved oddly too with all its 'syntactical sugar'...   
      
   witness: echo hello world? | | tr 'A-Za-z' 'N-ZA-Mn-za-m'   
      
   vs.:
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca