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 2,730 other followers

Archive for the ‘Turbo Pascal’ Category

On Windows, keep the lifetime of relative pathnames as short as possible because of thread-safety issues

Posted by jpluimers on 2022/05/18

Subtitle:

GetFullPathName thread-unsafety because of SetCurrentDirectory isn’t, so derived functions (like Delphi GetDir/ChDir/TPath.GetFullPath, or .NET System.IO.Path.GetFullPath) are not thread-safe either (via The Old New Thing)

A while ago I got a big reminder because of [Wayback] What are these dire multithreading consequences that the GetFullPathName documentation is trying to warn me about? | The Old New Thing

The documentation for the Get­Full­Path­Name function contains this dire warning:

Multithreaded applications and shared library code should not use the GetFullPathName function and should avoid using relative path names. The current directory state written by the SetCurrentDirectory function is stored as a global variable in each process, therefore multithreaded applications cannot reliably use this value without possible data corruption from other threads that may also be reading or setting this value. This limitation also applies to the SetCurrentDirectory and GetCurrentDirectory functions. The exception being when the application is guaranteed to be running in a single thread, for example parsing file names from the command line argument string in the main thread prior to creating any additional threads. Using relative path names in multithreaded applications or shared library code can yield unpredictable results and is not supported.

Boy, this was a trip down memory lane, as subconsciously I was aware of this, but not consciously, so it was great seeing it all written down.

Since most of your Windows applications and services are multi-threaded by now (even if you don’t realise this, a cmd.exe instance already has multiple threads running).

It means that the current directory global process variable can be changed by any thread. Since GetFullPathName relies on this converting relative pathnames to absolute pathnames, it means that over time the conversion might give you different absolute pathnames.

Which means these all are not thread-safe:

Related: Much Turbo Pascal history (via What is a Delphi DCU file? – Stack Overflow)

–jeroen

Posted in Delphi, Development, Pascal, Software Development, Turbo Pascal, Windows Development | Leave a Comment »

Happy 20th Anniversary, .NET!

Posted by jpluimers on 2022/02/13

I almost missed this: [Wayback/Archive] Happy 20th Anniversary, .NET! – .NET Blog.

Given I am still recovering from the long period of cancer treatments, I am glad that Beth Massi reminded me (a “thank you” is below the signature):

https://twitter.com/BethMassi/status/1492893829535514634

To keep the story about myself short: currently I am cancer free, long term (i.e. 10 years) looks dim, but my mental focus has recovered and I am getting joy again doing technical stuff. I am still working on the increasing my mental and physical endurance, so real work is not yet possible but unlike half a year ago, I am confident I will be able to eventually.

Back to the .NET story (as I have learned when to conserve energy): I kept track of Anders Hejlsberg ever since Turbo Pascal 1.0 on CP/M (see The calculators that got me into programming (via: calculators : Algorithms for the masses – julian m bucknall)) and when after the Visual J++ lawsuits things a first got a bit too silent to my liking.

Read the rest of this entry »

Posted in .NET, .NET 1.x, About, Conferences, DevDays09, Development, Event, History, Pascal, Personal, Software Development, Turbo Pascal, Visual J++ | Leave a Comment »

The Charlie Calvert “Here’s to Good Friends and New Adventures” article

Posted by jpluimers on 2021/10/14

Since this contains a list of contains from back then (20+ years ago!), I save it for future reference: [WayBack] Here’s to Good Friends and New Adventures

I would like to make a very short list of the other people at Borland who I have had the privilage of working with very closely. These people are Jason Sprenger, Xavier Pacheco, Steve Teixeira, John Kaster, Lar Mader and Rich Jones. Each of these people I worked with every day over a period of years, and they never showed me anything but the very best and most admirable human traits. I hope I am so lucky as to work with such fine people again in my life.

As for all the others, there is no way even to begin to thank them. A few of these people are Karen Giles, Lino Tadros, Steve Trefethen, Christine Ellis, Paolo Ciccone, Yolanda Davis, Blake Stone, Bruneau Babet, Dave Marancik, Anders Ohlsson, Dave Powell, Claudio Briceno, Joe Manzone, Terri Bartos, Dave Wilhelm, Andrea Ginsberg, Jason Vokes, Ludo Neveu, Martin Pamdeth, Martin Raim, Ernesto Franchini, Edwin Desouza, Zack Urlocker, Rosemary Abell, Robert Warren, Scott Bussinger, Richard Morris, Paul Beach, Jeremy McGee, Nimish Vora, Michael Swindell, Lorie Hull, Kendyll Upstrom, Kari Gallant, Allen Bauer, Josh Dahlby, Jose Rubens, John Thomas, John Williams, J.D. Hildebrand, Hizo Jozsef, Goran Kallmark, Ben Riga, George Cross, Gary Benner, Fred Felman, Erik Jakowitz, Danny Thorpe, Craig Farrell, Claudia Currie, Bill Weber, Lance Devon, Robert West, Amber Hein, Richard Kubat, Jeff Peters, Ellie Peters, Krystyna Niedzwiedzka, Kathy Berkland, Kelly Welty, Tom Lam, Nester Miranda (and Carlos!), Dana Kaufman, Pawal Ksiezyk, Jim Wright, Lori and Ellen from travel, Sergey Orlik and many others who I just don’t happen to recall right now, or who I liked very much but only met a few times.

I’m also indebted to Ray Kanopka, Mark Miller, Dick Malley, Dan Horn, Taco Oosterkamp, Bob Swart, Ann Lynnworth, Marco Cantu, Jeroen Pluimers, and many more who worked in the Borland community and brought me great joy. It’s amazing to consider how many talented and remarkable people have been drawn to this company.

jeroenhttps://www.facebook.com/groups/137012246341854/permalink/2895795467130171/

Posted in Borland C++, C++, C++ Builder, Delphi, Development, Pascal, Software Development, Turbo Pascal | Leave a Comment »

BEHIND THE CODE: The one who created languages – YouTube

Posted by jpluimers on 2021/10/13

Anders Hejlsberg: software legend.

–jeroen

Posted in .NET, C#, Development, Pascal, Software Development, Turbo Pascal, TypeScript | Leave a Comment »

Much Turbo Pascal history (via What is a Delphi DCU file? – Stack Overflow)

Posted by jpluimers on 2021/05/19

Editing [WayBack] What is a Delphi DCU file? – Stack Overflow for more historic correctness and adding links prompted me to archive some older material and search for some more, basically because while historically very relevant, link rot makes a lot of that stuff harder and harder to find.

The legendary full page colour advert published in the 12th 1983 issue of Byte Magazine on page 456 is at the bottom of this post (Many BYTE magaine issues have been archived at https://archive.org/details/byte-magazine).

The smaller version below is from WayBack: Sip from the Firehose : November 2008 marks the 25th anniversary of Turbo Pascal v1.0! (this article is not available on the Embarcadero or Idera site any more).

I also included more adverts in reverse chronological order at the end:

The last two via [WayBack] saundby.com: Software for the Ampro Little Board.

–jeroen

Read the rest of this entry »

Posted in Conference Topics, Conferences, CP/M, Delphi, Development, Event, History, MS-DOS, Pascal, Power User, Software Development, Turbo Pascal, UCSD Pascal, Z80 | Leave a Comment »

 
%d bloggers like this: