Archive for the ‘COBOL’ Category
Posted by jpluimers on 2025/07/16
I originally missed this as back then I was in the midst of managing trouble in my parental family, unaware I was already having rectum cancer. Then things went fast, not even including the Covid-19 years, so I was glad last year I got reminded of this mid-2019 article:
[Wayback/Archive] Alan Turing Wrote Object-Oriented Code In C And Ran It On BEAM – De Programmatica Ipsum writes a lot of interesting things on programming paradigms, starting with
In his rare 1994 book “Object-Oriented Programming In C” Axel Tobias Schreiner explains how to do inheritance, class methods, class hierarchies, and even how to raise exceptions using nothing else than pure, simple, pointer arithmetic-filled, ANSI C.
then arguing basically most of not all modern languages share the majority of programming paradigms and all these paradigms are repeats of the past:
But none of this is new. Smalltalk, arguably the precursor of object orientation, had collect and select methods which were the grandparents of our more common map and filter functional friends.
What sets modern languages apart is that they the majority covers all the paradigms you might need, just differing in how well they support the paradigm-du-jour.
It means programming language wars should have been a thing of the past for about two decades now.
Please let that sink in.
Oh: if you look for that ANSI C book, here it is: [Wayback/Archive] https://www.cs.rit.edu/~ats/books/ooc.pdf [Wayback PDF View/PDF View]
Via: [Wayback/Archive] De Programmatica Ipsum: “”In his rare 1994 book “Object…” – mas.to
--jeroen
Posted in .NET, C, C#, C++, Cloud, COBOL, Containers, Design Patterns, Development, Docker, Erlang, F#, Go (golang), Haskell, Infrastructure, Java, Java Platform, Kotlin, Kubernetes (k8n), ObjectiveC, OOP (Object Oriented Programming), Perl, Scala, Scripting, Software Development, Swift, VB.NET | Leave a Comment »
Posted by jpluimers on 2021/09/09
When you do a choco upgrade all --yes on a system that – during upgrade – becomes low on disk space, you can end up with a lot of empty .nupkg files.
For those package, Chocolatey will not recognise they are installed any more.
The fix is this:
- increase disk space so at least 5 gigabytes is free
- split the choco upgrade process so it checks before each upgrade that this diskspace is indeed free
- list all choco .nupkg files of length zero ordered from oldest to newest
- for each package, delete the .nupkg file if it exists, then force install it with the
--force parameter before the --yes parameter like in
choco install --force --yes chocolatey
- when all packages have been done, then
choco upgrade --all --yes
I wrote a few PowerShell scripts assisting me in cleaning up the mess.
choco-list-installed.bat
:: https://superuser.com/questions/890251/how-to-list-chocolatey-packages-already-installed-and-newer-version-available-fr
choco list --localonly %*
choco-show-installed-package-names.bat
:: `--limit-output` does not show Chocolatey version header and count footer.
:: `--id-oonly` omits the version number, so you only get the package name
choco list --local-only --limit-output --id-only
choco-show-installed-package-names-and-versions.bat
:: `--limit-output` does not show Chocolatey version header and count footer.
choco list --local-only --limit-output %*
choco-reinstall-empty-nupkg-by-names.ps1
- [WayBack] Powershell – Finding 0-byte Files | Another computer blog
- [WayBack] windows – Where is the Chocolatey installation path? – Stack Overflow:
There is an environment variable set on installation, ChocolateyInstall, which is set to C:\Chocolatey by default in versions of Chocolatey less than 0.9.8.27. After that, this defaults to C:\ProgramData\Chocolatey.
NOTE: By default, the C:\ProgramData folder on Windows is hidden. You will either need to enable hidden files and folders through Folder Options | View or you can navigate directly to the path shown above by copy/pasting directly into the Windows Explorer address bar.
In version 0.9.9 of Chocolatey, it actively moves from the old folder location to the new one.
- [WayBack] string – Powershell concatenate an Environment variable with path – Stack Overflow
A convenient way to obtain the string value rather than the dictionary entry (which is technically what Get-ChildItem is accessing) is to just use the variable syntax: $Env:USERPROFILE rather than Get-ChildItem Env:USERPROFILE.
$localpath = "$env:USERPROFILE\some\path"
…
Also, the Join-Path cmdlet is a good way to combine two parts of a path.
$localpath = Join-Path $env:USERPROFILE 'some\path'
<#
https://learningpcs.blogspot.com/2009/12/powershell-finding-0-byte-files.html
Zero length .nupkg files sorted by oldest first.
These are packages that choco will not show and likekly need a forced reinstall.
Choco does remember the version that was installed (so not all the choco config is hosed).
- https://stackoverflow.com/questions/28235388/where-is-the-chocolatey-installation-path/28239451#28239451
- https://stackoverflow.com/questions/41047123/powershell-concatenate-an-environment-variable-with-path/41047343#41047343
/#>
$LibPath = Join-Path $env:ChocolateyInstall 'lib'
$NuPkgExtension = 'nupkg'
$NupkgFilter = "*.$NuPkgExtension"
## Remove the empty .nupkg files for each argument
$args | ForEach-Object {
$PackageName = $_
Write-Output "Deleting any empty $PackageName.$NuPkgExtension under $LibPath :"
Get-ChildItem -Path $LibPath -Recurse -Filter $NupkgFilter | Where-Object {
($_.Length -eq 0) -and ($_.BaseName -eq $PackageName)
} | Sort-Object LastWriteTime | ForEach-Object {
$PackageFullName = $_.FullName
Write-Output "Deleting $PackageFullName"
Remove-Item $PackageFullName
}
}
## Force install the chocolatey package for each argument
$args | ForEach-Object {
$PackageName = $_
Write-Output "Installing $PackageName with Chocolatey:"
choco install --force --yes $PackageName
}
Link lists
Some more links that helped me solve this:
Some links on errors I encountered while recovering from this:
- Checksum errors like[WayBack] (sysinternals) checksum error · Issue #756 · chocolatey-community/chocolatey-coreteampackages · GitHub are often caused by the chocolatey package downloading the most recent installer despite the package version. Two solutions:
- Pass
--ignorechecksum to choco --install (see [WayBack] CommandsInstall · chocolatey/choco Wiki · GitHub)
- First uninstall using the
--force parameter
[Archive.is] Chocolatey Software | Sysinternals 2019.6.29
Sysinternals Suite is going to be installed in ‘C:\ProgramData\chocolatey\lib\sysinternals\tools’
File appears to be downloaded already. Verifying with package checksum to determine if it needs to be redownloaded.
Error – hashes do not match. Actual value was ‘A510C31C2CC591A16F342E7CBA5DC8409EAF08C9B56729CF132C95C69E196787’.
Downloading sysinternals
from ‘https://download.sysinternals.com/files/SysinternalsSuite.zip’
Progress: 100% – Completed download of C:\Users\devCrPhoneDebug\AppData\Local\Temp\2\chocolatey\sysinternals\2018.12.27\SysinternalsSuite.zip (23.51 MB).
Download of SysinternalsSuite.zip (23.51 MB) completed.
Error – hashes do not match. Actual value was ‘A510C31C2CC591A16F342E7CBA5DC8409EAF08C9B56729CF132C95C69E196787’.
ERROR: Checksum for ‘C:\Users\devCrPhoneDebug\AppData\Local\Temp\2\chocolatey\sysinternals\2018.12.27\SysinternalsSuite.zip’ did not meet ‘b14466c6bf3be216ea71610a3f455030e791cd5ad1b42a283886194205d176b0’ for checksum type ‘sha256’. Consider passing the actual checksums through with –checksum –checksum64 once you validate the checksums are appropriate. A less secure option is to pass –ignore-checksums if necessary.
The install of sysinternals was NOT successful.
Error while running ‘C:\ProgramData\chocolatey\lib\sysinternals\tools\chocolateyInstall.ps1’.
See log for details.
Chocolatey installed 0/1 packages. 1 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
- Packages that cannot be found at all:[WayBack] “imagemagick not installed. The package was not found with the source(s) listed” – Google Search
- This means that Chocolatey cannot find a dependency, but will not tell you which one. It also happens during package testing:[WayBack] imagemagick v7.0.9.7 – Failed – Package Tests Results · GitHub
- Solve this by fixing all other empty
.nupkg files first, which will give you an idea on the potential missing dependencies. Retry by forcing reinstall each dependency.
- Dependencies that cannot be found, which can be caused by more empty
.nupkg files. Example: [WayBack] Unable to resolve dependency · Issue #206 · chocolatey/choco · GitHub
- Solve this by each time a dependency is not found, include on the
choco-reinstall-empty-nupkg-by-names.ps1command, then retry.
–jeroen
Posted in Chocolatey, COBOL, Development, Power User, PowerShell, PowerShell, Scripting, Software Development, Windows, Windows 10 | Leave a Comment »
Posted by jpluimers on 2017/12/07
Ah, C. The best lingua franca we have… because we have no other lingua francas. Linguae franca. Surgeons general? C is fairly old — 44 years, now! — and comes from a time when there were possibly more architectures than programming languages. It works well for what it is, and what it is is a relatively simple layer of indirection atop assembly. Alas, the popularity of C has led to a number of programming languages’ taking significant cues from its design, and parts of its design are… slightly questionable. I’ve gone through some common features that probably should’ve stayed in C and my justification for saying so. The features are listed in rough order from (I hope) least to most controversial. The idea is that C fans will give up when I call it “weakly typed” and not even get to the part where I rag on braces. Wait, crap, I gave it away.
Great re-read towards the end of the year: [WayBack] Let’s stop copying C / fuzzy notepad
Via: [WayBack] Old and busted: emacs vs vi. New and hot: Language war, everybody against everybody else. – Kristian Köhntopp – Google+
–jeroen
Posted in .NET, APL, Awk, bash, BASIC, C, C#, C++, COBOL, CoffeeScript, CommandLine, D, Delphi, Development, F#, Fortran, Go (golang), Java, Java Platform, JavaScript/ECMAScript, Pascal, Perl, PHP, PowerShell, PowerShell, Python, Ruby, Scala, Scripting, Software Development, TypeScript, VB.NET, VBScript | 3 Comments »
Posted by jpluimers on 2017/11/03
Via [WayBack] Graph of programming languages influence poster – nice gift idea for programmers… – This is why I Code – Google+:
A network graph with more than a thousand programming languages connected by influence relations. Highly influential languages like Lisp, Smalltalk, C, Java, Pascal, C++, Haskel or Python are shown as larger circles as compared to languages with little influence on others like PHP or Argh!. / The influence relation data was retrieved from Freebase in 2013. This design available on posters and other products. An awesome gift for programmers who are into digital art. • Also buy this artwork on wall prints, apparel, kids clothes, and more.
[WayBack] “Network Graph of Programming Language Influence – White Background” Posters by ramiro | Redbubble
I wonder how they drew the relations and why certain languages are in certain places.
--jeroen
Read the rest of this entry »
Posted in C, C++, COBOL, Development, Haskell, Java, Java Platform, JavaScript/ECMAScript, LISP, Pascal, Perl, PHP, Python, Ruby, Scripting, Smalltalk, Software Development, Turbo Prolog | Leave a Comment »
Posted by jpluimers on 2017/11/02
Quoted in full because even 2.5 years later, it’s just too funny:
- Python: What if everything was a dict?
- Java: What if everything was an object?
- JavaScript: What if everything was a dict *and* an object?
- C: What if everything was a pointer?
- APL: What if everything was an array?
- Tcl: What if everything was a string?
- Prolog: What if everything was a term?
- LISP: What if everything was a pair?
- Scheme: What if everything was a function?
- Haskell: What if everything was a monad?
- Assembly: What if everything was a register?
- Coq: What if everything was a type/proposition?
- COBOL: WHAT IF EVERYTHING WAS UPPERCASE?
- C#: What if everything was like Java, but different?
- Ruby: What if everything was monkey patched?
- Pascal: BEGIN What if everything was structured? END
- C++: What if we added everything to the language?
- C++11: What if we forgot to stop adding stuff?
- Rust: What if garbage collection didn’t exist?
- Go: What if we tried designing C a second time?
- Perl: What if shell, sed, and awk were one language?
- Perl6: What if we took the joke too far?
- PHP: What if we wanted to make SQL injection easier?
- VB: What if we wanted to allow anyone to program?
- VB.NET: What if we wanted to stop them again?
- Forth: What if everything was a stack?
- ColorForth: What if the stack was green?
- PostScript: What if everything was printed at 600dpi?
- XSLT: What if everything was an XML element?
- Make: What if everything was a dependency?
- m4: What if everything was incomprehensibly quoted?
- Scala: What if Haskell ran on the JVM?
- Clojure: What if LISP ran on the JVM?
- Lua: What if game developers got tired of C++?
- Mathematica: What if Stephen Wolfram invented everything?
- Malbolge: What if there is no god?
–jeroen
Read the rest of this entry »
Posted in .NET, APL, Assembly Language, BASIC, C, C#, C++, COBOL, Development, EPS/PostScript, Fun, Go (golang), Java, Java Platform, JavaScript/ECMAScript, LISP, Makefile, Pascal, Perl, PHP, Python, Quotes, Ruby, Rust, Scala, Scripting, Smalltalk, Software Development, T-Shirt quotes, TCL, Turbo Prolog, VB.NET, Visual BASIC, XML/XSD, XSLT | Leave a Comment »
Posted by jpluimers on 2015/01/22
Wow: I feel like having lived under a stone for 8 years, as RosettaCode has been alive since it was founded in 2007 by Mike Mol.
The idea is that you solve a task and learn from that, or learn by seeing how others have solved tasks or draft tasks.
So in a sense it is similar to the Rosetta stone: it has different languages phrasing the same tasks.
There are already a whole bunch of languages on RosettaCode (of which a few are in the categories below), and you can even suggest or add your own languages.
When you want to solve tasks, be sure to look at the list unimplemented tasks by language that leads to automatic reports by language (for instance two of the languages I use most often: C# and Delphi).
I’m sure there are lots of programming chrestomathy sites, even beyond the ones, and it feels very similar to programming kata sites.
–jeroen
Posted in .NET, APL, Awk, bash, Batch-Files, C, C#, C++, COBOL, CommandLine, Delphi, Development, Fortran, FreePascal, Java, JavaScript/ECMAScript, Lazarus, Object Pascal, Office VBA, Pascal, Perl, PHP, PowerShell, PowerShell, Prism, Scripting, sed script, Sh Shell, Software Development, Turbo Prolog, VB.NET, VBS, VBScript, Visual Studio and tools, Web Development | Leave a Comment »
Posted by jpluimers on 2013/10/29
Toon Krijthe posted an interesting question to SO.
Though 5 years old, I think it stilll is very valid one:
At my work, we have decided to stay with the ANSI characters for identifiers. Is there anybody out there using unicode identifiers and what are the experiences?
For all projects I work on (in various Languages like English, German, Dutch or other), I stick to ASCII characters (not even ANSI) for:
I also try to abstract the non-ASCII strings into places where I am sure that the encoding is preserved (for text files, I prefer UTF-8), or where these characters are properly escaped.
What is your take on this?
–jeroen
via: uniqueidentifier – What are the experiences with using unicode in identifiers – Stack Overflow.
Posted in .NET, Agile, AS/400 / iSeries / System i, C, C#, C++, COBOL, Continuous Integration, Delphi, Development, F#, Prism, Scripting, Software Development, VB.NET, Visual Studio and tools | 4 Comments »
Posted by jpluimers on 2013/05/09
Posted in .NET, C++, Cloud Development, COBOL, CommandLine, Delphi, Development, Fortran, iSeries, Java, Pascal, RegEx, Scripting, Software Development, Web Development, xCode/Mac/iPad/iPhone/iOS/cocoa | 3 Comments »
Posted by jpluimers on 2013/03/14
Variant Records are a feature that has been in the Pascal language since Standard Pascal.
A cool page for historic perspective is R3R: Pascal Features in Popular Compilers, hopefully someone will update it to more modern versions of the mentioned compilers.
There is not much official documentation on the Delphi side on this, so below some parts of a case I used for a project that started in 1997 and is still in use to day. Read the rest of this entry »
Posted in APPC, AS/400 / iSeries / System i, ASCII, COBOL, Communications Development, Conference Topics, Conferences, CPI-C, Delphi, Delphi 1, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi 8, Delphi XE, Delphi XE2, Delphi XE3, Development, Encoding, Event, HIS Host Integration Services, Internet protocol suite, MQ Message Queueing/Queuing, SNA, Software Development, TCP, Unicode, UTF-8, WebSphere MQ | 9 Comments »
Posted by jpluimers on 2012/08/15
A few weeks ago, Bill Karwin did a must watch webinar on the prevention SQL Injection titled “SQL Injection Myths and Fallacies“.
Bill Karwin (twitter, new blog, old blog, Amazon) is famous for much work in the SQL database community, including InterBase/Firebird, mySQL, Oracle and many more.
He also:
Anyway, his webinar is awesome. Be sure to get the slides, watch the replay, and read the questions follow up.
Watching it you’ll get a better understanding of defending against SQL injection.
A few very valuable points he made: Read the rest of this entry »
Posted in .NET, .NET 3.5, .NET 4.5, .NET ORM, ASP.NET, Batch-Files, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, C# 5.0, C++, Cloud Development, COBOL, CommandLine, Database Development, Delphi, Delphi for PHP, Delphi x64, Delphi XE2, Development, EF Entity Framework, F#, Firebird, FireMonkey, History, InterBase, iSeries, Java, JavaScript/ECMAScript, Jet OLE DB, LINQ, LLBLGen, MEF, Microsoft Surface, Mobile Development, PHP, PowerShell, Prism, Scripting, SharePoint, SilverLight, Software Development, SQL, SQL Server, SQL Server 2000, SQL Server 2005, SQL Server 2008, SQL Server 2008 R2, SQL Server 2012, SQL Server 7, VB.NET, VBS, Visual Studio 11, Visual Studio 2002, Visual Studio 2003, Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, Visual Studio and tools, Web Development, Windows Azure, WinForms, WPF, XAML, xCode/Mac/iPad/iPhone/iOS/cocoa | 1 Comment »