The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,978 other followers

Archive for June 16th, 2020

A Tale of Many Divisions – Naive Prime Factorization Across a Handful of Architectures

Posted by jpluimers on 2020/06/16

[WayBack] A Tale of Many Divisions – Naive Prime Factorization Across a Handful of Architectures

Source code: [WayBack] GitHub – blu/euclid: An extremely naive prime factorizer

Via: [WayBack] Blu looks at how a small piece of code with divisions surprisingly behave on various architecture: #Arm, #MIPS, and #x86. – Jean-Luc Aufranc – Google+

–jeroen

Posted in Assembly Language, C++, Development, Software Development | Leave a Comment »

Being efficient actually holds you back

Posted by jpluimers on 2020/06/16

A while ago, over some period of time, I found a few related posts on being efficient optimising time management, on both professional and personal levels. Fully going the “optiomal” usually isn’t that a good thing.

Basically, you need slack or idle time. Plenty of it. That improves your agility too.

–jeroen

Posted in Agile, Conference Topics, Conferences, Development, Event, LifeHacker, Power User, Software Development | Leave a Comment »

how to count the length of an array defined in bash? – Unix & Linux Stack Exchange

Posted by jpluimers on 2020/06/16

I needed to enumerate all the parameters to a function and access many of them by index in the same function, so thanks to both these:

I got at this:

  declare -a arguments=("$@")
  for index in ${!arguments[@]}; do
    echo $index/${#arguments[@]}:${arguments[$index]}
  done

These are all forms of Array handling or Shell Parameter Expansion with special cases for array variables:

  • ! does indirection, in this case from the array to the index of the array
  • # gets the lengt of the parameter (for arrays: the number of elements)
  • [] acccesse an array variable using an index

Via:

–jeroen

Posted in *nix, *nix-tools, bash, bash, Development, Power User, Scripting, Software Development | Leave a Comment »

 
%d bloggers like this: