[WayBack] dutchdelphidude on Twitter: “ik doe nu dit ermee nefertiti-tradebot.com … “
–jeroen
Posted by jpluimers on 2021/05/12
Posted in Development, Go (golang), Software Development | Leave a Comment »
Posted by jpluimers on 2021/05/12
Quite a while back, @NS_Online (Dutch railroads) did not accept plus signs in email addresses. I verified a few times over the years and not much progress.
This is a reminder to myself to re-check.
Edit 20230418: it has started working, see further below.
Below the fold the Twitter thread that started with [WayBack] Jeroen Pluimers on Twitter: “Toch jammer dat @NS_online valide email adressen met een plus-teken erin weigert.… “
Hopefully by now they retraced themselves from the bad company of many other parties failing to adhere to clear and long existing internet standards: [WayBack] User:Me at work/plushaters | Mozilla Community | FANDOM powered by Wikia.
Their web care team and their developers made some very inexcusable assumptions there:
Some links on email addresses and their validity:
Posted in Development, Power User, Software Development, Web Development | Leave a Comment »
Posted by jpluimers on 2021/05/12
(Tagged FastMM4 as that’s the first code I saw these warnings to be turned off)
Delphi 7 introduced introduced warnings for unsafe constructs like W1047 and W1048 so you could prepare your code for the first Delphi .NET compilers .
The oldest online documentation on this is in Delphi 2007:
Type Switch Syntax{$UNSAFECODE ON}or
{$UNSAFECODE OFF} Default{$UNSAFECODE OFF} Scope Local
You have used a data type or operation for which static code analysis cannot prove that it does not overwrite memory. In a secured execution environment such as .NET, such code is assumed to be unsafe and a potential security risk.
You have used a data type or operation for which static code analysis cannot prove that it does not overwrite memory. In a secured execution environment such as .NET, such code is assumed to be unsafe and a potential security risk.
You have used a data type or operation for which static code analysis cannot prove that it does not overwrite memory. In a secured execution environment such as .NET, such code is assumed to be unsafe and a potential security risk.
After Delphi 2007, the .NET compiler got shelved, but the errors and warning stayed as they serve a good purpose for native code as well.
Delphi 2007 did not document any of the other directives.
Unlike the D2007 documentation, however, the UNSAFECODE should be written UNSAFE_CODE as with using {$WARN UNSAFECODE ON}, you will get this error:
E1030 Invalid compiler directive: 'UNSAFECODE'
Looking at the library code and example code that ships with Delphi, these are the valid $WARN compiler directives having to do with UNSAFE:
UNSAFE_CAST (since Delphi 7, but only used in Vcl.WinXPanels.pas introduced in Delphi 10.2 Tokyo and up)UNSAFE_CODE (since Delphi 7, but still documented as UNSAFECODE)UNSAFE_TYPE (since Delphi 7)UNSAFE_VOID_POINTER (since Delphi XE3, as precursor to the NEXTGEN compilers)The ultimate source for these is the file DCCStrs.pas that has shipped since Delphi 2009: [WayBack] warnings – Identifiers for Delphi’s $WARN compiler directive – Stack Overflow.
A problem is that current documentation still lists the wrong name in many places:
- UNSAFE_TYPE
- UNSAFE_CODE
- UNSAFE_CAST
This one finally got it right: [WayBack] Warning messages (Delphi) – RAD Studio
UNSAFE_TYPEW1046 UNSAFE_CODEW1047 UNSAFE_CASTW1048
Note it also documented UNSAFE_VOID_POINTER:
UNSAFE_VOID_POINTERW1070 [WayBack] W1070 Use of untype pointer can disrupt instance reference counts (Delphi) – RAD Studio
And these warning messages still do not contain the directives, but do explain the underlying code construct better:
You have used a data type or operation for which static code analysis cannot prove that it does not overwrite memory. For example, you might receive this warning if you declare something as absolute. Such code can be considered a security risk.
You have used a data type or operation for which static code analysis cannot prove that it does not overwrite memory. Such code can be considered a security risk.For example, using GetMem can elicit this warning because a block of memory has no associated type.
You have used a data type or operation for which static code analysis cannot prove that it does not overwrite memory. For example, you might have cased one record to another or one instance to another.
You have to use these directives:
// Get rid of "W1047 Unsafe code 'ASM'", "W1047 Unsafe code '^ operator'", "W1047 Unsafe code '@ operator'" and similar {$WARN UNSAFE_CODE OFF} // Get rid of "W1048 Unsafe typecast of 'TFreedObject' to 'PByte'" and similar {$WARN UNSAFE_CAST OFF}
Back in the days, some people were not amused and disabled the warnings, for instance in [Archive.is] Re: How can I eliminate these warnings in Delphi 7 which did not appear in Delphi 5. – Google Groups:
Dennis Passmore:I have one include file that I usually include in all projects as follows—– WarningsOff.inc —————-
{$IFDEF CONDITIONALEXPRESSIONS}
{$IF CompilerVersion >= 14}
{$WARN SYMBOL_PLATFORM OFF}
{$WARN SYMBOL_DEPRECATED OFF}
{$WARN SYMBOL_LIBRARY OFF}
{$WARN UNIT_DEPRECATED OFF}
{$WARN UNIT_LIBRARY OFF}
{$WARN UNIT_PLATFORM OFF}{$WARN UNSAFE_TYPE OFF}
{$WARN UNSAFE_CODE OFF}
{$WARN UNSAFE_CAST OFF}
{$IFEND}
{$ENDIF}
———————and it gets ride of all unwanted warnings in the IDE or even DCC32.exe when compiling the project
from the command line.I just add the following line to the project .dpr file and do not worry about the rest.
{$I WarningsOff.inc}
Dennis Passmore
“If you cannot conceive the idea you
will never achieve the desired results”
I disagree with such an approach, as those warnings have their purpose.
Knowing how to selectively disable/enable them however, is important.
–jeroen
Posted in Conference Topics, Conferences, Delphi, Development, Event, Software Development | Leave a Comment »
Posted by jpluimers on 2021/05/11
Via [WayBack] Building a lab with ESXI and Vagrant – DarthSidious while researching the possibility of running Vagrant (software) – Wikipedia on VMware ESXi – Wikipedia for building and distributing development environments:
[WayBack] Solved: Very slow speed on SSD |VMware Communities “solution” that seems to work for ESXi 6.5 and 6.7:
ESXi 6.5 includes a new native driver (
vmw_ahci) for SATA AHCI controllers, but that introduces performance problems with a lot of controllers and/or disks.Try to disable the native driver and revert to the older
sata-ahcidriver by runningesxcli system module set --enabled=false --module=vmw_ahciin an ESXi shell.
Reboot the host to make the change effective.
which solves it for some who now get much faster results:
Your suggestion worked for me, now i am getting avg speed 250Mbps from SATA III SSD .
Hope will get the full I/Ops from SSD.
However:
One issue I still have is that my 4 port Syba PCIe controller card now vanishes after disabling vmw_ahci and I am restricted to using the SATA ports on the motherboard.
and you need backups:
WARNING: Doing this at least for me erases all the VMs on the aforementioned drive. Migrate as needed.
There was no response for a more permanent fix:
What is the permanent fix for this issue, should we expect a corrected native driver from VMware, or will this require a firmware upgrade on the part of the drive vendors?
and there seem to be other bottle-necks:
tried the command on a 6.7.
Deploying an OVA and I am getting 22.82….
I have a Samsung 860 EVO mSATA 1Tb SSD.
i re-enabled it, I got max 11.81.
Kind of crappy either way. Not SSD speeds IMO.
–jeroen
Posted in Development, ESXi6.5, ESXi6.7, Power User, Software Development, Testing, Virtualization, VMware, VMware ESXi | Leave a Comment »
Posted by jpluimers on 2021/05/11
I wonder how you can programmatically open a Hangouts link from Chrome?
These dit not help:
So did some more digging.
TL;DR: did not find a solution; so any help is appreciated.
I found the IDs of then in [WayBack] extensions/common/constants.cc – chromium/src.git – Git at Google
namespace extension_misc { const char kPdfExtensionId[] = "mhjfbmdgcfjbbpaeojofohoefgiehjai"; const char kQuickOfficeComponentExtensionId[] = "bpmcpldpdmajfigpchkicefoigmkfalc"; const char kQuickOfficeInternalExtensionId[] = "ehibbfinohgbchlgdbfpikodjaojhccn"; const char kQuickOfficeExtensionId[] = "gbkeegbaiigmenfmjfclcdgdpimamgkj"; const char kMimeHandlerPrivateTestExtensionId[] = "oickdpebdnfbgkcaoklfcdhjniefkcji"; const char kProdHangoutsExtensionId[] = "nckgahadagoaajjgafhacjanaoiihapd"; const char* const kHangoutsExtensionIds[6] = { kProdHangoutsExtensionId, "ljclpkphhpbpinifbeabbhlfddcpfdde", // Debug. "ppleadejekpmccmnpjdimmlfljlkdfej", // Alpha. "eggnbpckecmjlblplehfpjjdhhidfdoj", // Beta. "jfjjdfefebklmdbmenmlehlopoocnoeh", // Packaged App Debug. "knipolnnllmklapflnccelgolnpehhpl" // Packaged App Prod. // Keep in sync with _api_features.json and _manifest_features.json. }; // Error returned when scripting of a page is denied due to enterprise policy. const char kPolicyBlockedScripting[] = "This page cannot be scripted due to an ExtensionsSettings policy."; } // namespace extension_misc
The odd thing is that the source does not match the Chrome web store designation:
Hangouts ExtensionId Source name Web store name nckgahadagoaajjgafhacjanaoiihapdkProdHangoutsExtensionIdGoogle Hangouts ljclpkphhpbpinifbeabbhlfddcpfddeDebugGoogle Hangouts (Extension, Beta); GOOGLE CONFIDENTIAL – FOR INTERNAL USE ONLY ppleadejekpmccmnpjdimmlfljlkdfejAlphaGoogle Hangouts (Extension, Debug) eggnbpckecmjlblplehfpjjdhhidfdojBetaGoogle Hangouts (Extension, Alpha) jfjjdfefebklmdbmenmlehlopoocnoehPackaged App Debug404 error knipolnnllmklapflnccelgolnpehhplPackaged App ProdGoogle Hangouts; Hangouts Chrome App is deprecated. Please switch to the Hangouts Chrome Extension.
You can not start the extensions in a tab; they need to start their view through the extension.
So these links do not work:
chrome-extension://nckgahadagoaajjgafhacjanaoiihapd/mainapp.html?uv_main_windowchrome-extension://ljclpkphhpbpinifbeabbhlfddcpfdde/mainapp.html?uv_main_windowchrome-extension://ppleadejekpmccmnpjdimmlfljlkdfej/mainapp.html?uv_main_windowchrome-extension://eggnbpckecmjlblplehfpjjdhhidfdoj/mainapp.html?uv_main_windowchrome-extension://jfjjdfefebklmdbmenmlehlopoocnoeh/mainapp.html?uv_main_windowchrome-extension://knipolnnllmklapflnccelgolnpehhpl/mainapp.html?uv_main_window–jeroen
Posted in Chrome, Development, Google, GoogleHangouts, Power User, Software Development, Web Development | Leave a Comment »
Posted by jpluimers on 2021/05/11
Cool Format feature from [WayBack] file – String format procedure similar to writeln – Stack Overflow:
The cool thing about using
Formatis that you use for Format Strings not only to parameterize things likewidthandprecisioninside thatFormat String, but also as parameters like you normally would provide values.You can get very close to using a
widthof 8 and aprecisionof 2, like the example in your question.For instance, to quote the documentation:
Format ('%*.*f', [8, 2, 123.456]);is equivalent to:
Format ('%8.2f', [123.456]);That is a much overlooked feature of
FormatandFormat Strings.
Edit 20250910:
This was part of my answer¹ there to mimic WriteLn formatting behaviour which was not even documented at the now deleted [Wayback/Archive] Standard Routines and I/O.
Normally deleted information like above results in worse information at their current documentation site.
This time however was an exception: the current documentation is better².
¹ the start of my answer:
Posted in Conference Topics, Conferences, Delphi, Development, Event, Software Development, Undocumented Delphi | Leave a Comment »
Posted by jpluimers on 2021/05/06
A while ago I found out that choco upgrade will install a package when it is not installed, and that choco upgrade all will upgrade all installed packages.
So I looked up the documentation of both choco install and choco upgrade (and choco update which will be deprecated) where I bolded parts of the upgrade command:
Installs a package or a list of packages (sometimes specified as a packages.config). Some may prefer to use
cinstas a shortcut forchoco install.
Upgrades a package or a list of packages. Some may prefer to use
cupas a shortcut forchoco upgrade. If you do not have a package installed, upgrade will install it.
NOTE Update has been deprecated and will be removed/replaced in version 1.0.0 with something that performs the functions of updating package indexes. Please use
choco upgradeinstead.
Given that upgrade can do both an upgrade and an install, I have switched all my install scripts to use upgrade in steaf of install.
Not all of the above commands accept the same set of [Wayback] Chocolatey Software Docs | Commands: Default Options and Switches
-?, --help, -h Prints out the help menu. -d, --debug Debug - Show debug messaging. -v, --verbose Verbose - Show verbose messaging. Very verbose messaging, avoid using under normal circumstances. --trace Trace - Show trace messaging. Very, very verbose trace messaging. Avoid except when needing super low-level .NET Framework debugging. Available in 0.10.4+. --nocolor, --no-color No Color - Do not show colorization in logging output. This overrides the feature 'logWithoutColor', set to 'False'. Available in 0.10.9+. --acceptlicense, --accept-license AcceptLicense - Accept license dialogs automatically. Reserved for future use. -y, --yes, --confirm Confirm all prompts - Chooses affirmative answer instead of prompting. Implies --accept-license -f, --force Force - force the behavior. Do not use force during normal operation - it subverts some of the smart behavior for commands. --noop, --whatif, --what-if NoOp / WhatIf - Don't actually do anything. -r, --limitoutput, --limit-output LimitOutput - Limit the output to essential information --timeout, --execution-timeout=VALUE CommandExecutionTimeout (in seconds) - The time to allow a command to finish before timing out. Overrides the default execution timeout in the configuration of 2700 seconds. '0' for infinite starting in 0.10.4. -c, --cache, --cachelocation, --cache-location=VALUE CacheLocation - Location for download cache, defaults to %TEMP% or value in chocolatey.config file. --allowunofficial, --allow-unofficial, --allowunofficialbuild, --allow-unofficial-build AllowUnofficialBuild - When not using the official build you must set this flag for choco to continue. --failstderr, --failonstderr, --fail-on-stderr, --fail-on-standard-error, --fail-on-error-output FailOnStandardError - Fail on standard error output (stderr), typically received when running external commands during install providers. This overrides the feature failOnStandardError. --use-system-powershell UseSystemPowerShell - Execute PowerShell using an external process instead of the built-in PowerShell host. Should only be used when internal host is failing. Available in 0.9.10+. --no-progress Do Not Show Progress - Do not show download progress percentages. Available in 0.10.4+. --proxy=VALUE Proxy Location - Explicit proxy location. Overrides the default proxy location of ''. Available for config settings in 0.9.9.9+, this CLI option available in 0.10.4+. --proxy-user=VALUE Proxy User Name - Explicit proxy user (optional). Requires explicit proxy (`--proxy` or config setting). Overrides the default proxy user of ''. Available for config settings in 0.9.9.9+, this CLI option available in 0.10.4+. --proxy-password=VALUE Proxy Password - Explicit proxy password (optional) to be used with username. Requires explicit proxy (`--proxy` or config setting) and user name. Overrides the default proxy password (encrypted in settings if set). Available for config settings in 0.9.9.9+, this CLI option available in 0.10.4+. --proxy-bypass-list=VALUE ProxyBypassList - Comma separated list of regex locations to bypass on proxy. Requires explicit proxy (`--proxy` or config setting). Overrides the default proxy bypass list of ''. Available in 0.10.4+. --proxy-bypass-on-local Proxy Bypass On Local - Bypass proxy for local connections. Requires explicit proxy (`--proxy` or config setting). Overrides the default proxy bypass on local setting of 'True'. Available in 0.10.4+. --log-file=VALUE Log File to output to in addition to regular loggers. Available in 0.1- 0.8+.
–jeroen
Posted in Batch-Files, Chocolatey, Development, Power User, Scripting, Software Development, Windows | Leave a Comment »
Posted by jpluimers on 2021/05/06
Deprecating all types in a unit besides deprecating the unit itself will cause a hint and warning storm. Especially in projects having a lot of hints and warnings (taking over maintenance of a legacy project comes to mind) this can be very helpful to spot these locations inside many files where some obscure unmaintained unit like GIFImage.pas is still used.
[WayBack] TGIFImage for Delphi | MelanderBlog got donated to (then CodeGear, now Embarcadero) for inclusion in Delphi 2007. It was, as GifImg unit, but only documented since the [WayBack] Delphi 2009 GIFImg Namespace). For more information: delphi 2007 gifimg unit – Google Search
Delphi allows you to deprecate a lot of types, but you cannot deprecate these forms:
array [...] of TSomeType^TSomeTypeclass of TSomeTypeprocedure(...) ...function(...): TSomeType ...reference to procedure(...) ...reference to function(...): TSomeType ...Putting a deprecated 'use SomeUnit.TSomeOtherType' will fail with:
E2029 ';' expected but identifier 'deprecated' found“.E2029 '=' expected but string constant found“E1030 Invalid compiler directive: 'DEPRECATED'You can enumerate these kinds of types:
TMyClass = classTMyException = class(Exception), this has to be the full TMyException = class(Exception) end deprecated 'reason';; of the method (so the virtual form is like procedure Name(...); virtual; deprecated 'use another method';)The last few are not technically types, but included for completeness.
–jeroen
Posted in Conference Topics, Conferences, Delphi, Development, Event, Software Development | Leave a Comment »
Posted by jpluimers on 2021/05/05
A summary of the full gist at [Wayback/Archive.is] ESXi-where-are-my-log-files-stored.txt:
# ls -al / /var/ /var/log/ /var/run/ /scratch/ /scratch/log/ | grep "/\|log\|-\>" /: ... lrwxrwxrwx 1 root root 57 Apr 4 18:16 scratch -> /vmfs/volumes/5ce2d440-72311161-75c5-0025907d9d5c/.locker ... /scratch/: drwxr-xr-x 1 root root 106496 Apr 10 08:40 log /scratch/log/: -rw------- 1 root root 411 Apr 4 18:20 Xorg.log ... -rw------- 1 root root 78835 Apr 4 10:30 syslog.0.gz -rw------- 1 root root 61136 Mar 18 15:05 syslog.1.gz -rw------- 1 root root 60589 Feb 24 00:30 syslog.2.gz -rw------- 1 root root 60373 Feb 1 08:01 syslog.3.gz -rw------- 1 root root 60203 Jan 9 15:50 syslog.4.gz -rw------- 1 root root 59889 Dec 17 23:20 syslog.5.gz -rw------- 1 root root 60398 Nov 25 06:50 syslog.6.gz -rw------- 1 root root 60563 Nov 2 14:25 syslog.7.gz -rw------- 1 root root 531794 Apr 10 09:35 syslog.log ... -rw------- 1 root root 157255 Apr 4 18:17 vvold.log /var/: ... drwxr-xr-x 1 root root 512 Apr 5 19:19 log ... /var/log/: -rw-r--r-- 1 root root 416 Apr 4 18:16 .vmsyslogd.err ... -rw-r--r-- 1 root root 38069 Apr 4 18:20 configRP.log -rw-r--r-- 1 root root 0 Apr 4 18:16 cryptoloader.log ... -rw-r--r-- 1 root root 87 Apr 5 21:57 esxcli.log ... -rw------- 1 root root 3350 Apr 4 18:16 init.log -rw-r--r-- 1 root root 966 Apr 4 18:16 iofilter-init.log ... -rw-r--r-- 1 root root 21769 Apr 4 18:16 jumpstart-esxcli-stdout.log -rw-r--r-- 1 root root 18857 Apr 4 18:16 jumpstart-native-stdout.log -rw-r--r-- 1 root root 10837 Apr 4 18:16 jumpstart-stdout.log -rw-r--r-- 1 root root 0 Apr 4 18:16 kickstart.log ... -rw------- 1 root root 10916 Apr 4 18:16 sysboot.log ... -rw------- 1 root root 64 Apr 10 09:13 tallylog ... /var/run/: lrwxrwxrwx 1 root root 12 Apr 4 18:16 log -> /scratch/log
/var/log and all from /var/run/log) are actually persistently stored in /scratch/log and survive reboots. Just a few are non-persistent./var/log/syslog is being archived as .gz files (compressed by gzip).syslog is special: the location can be configured, and even be external: [Wayback] Configuring syslog on ESXi (2003322)VMware vSphere ESXi 5.0 and higher hosts run a Syslog service (
vmsyslogd) that provides a standard mechanism for logging messages from the VMkernel and other system components. By default in ESXi, these logs are placed on a local scratch volume or a ramdisk. To preserve the logs further, ESXi can be configured to place these logs to an alternate storage location on disk and to send the logs across the network to a Syslog server.
–jeroen
Posted in *nix, *nix-tools, ash/dash, ash/dash development, BusyBox, Development, ESXi6, ESXi6.5, ESXi6.7, ESXi7, gzip, Power User, Scripting, Software Development, Virtualization, VMware, VMware ESXi | Leave a Comment »
Posted by jpluimers on 2021/05/05
A cool feature introduced in Delphi 10.2 Tokyo: often [RSP-17326] with statements generate W1048 unsafe typecast warning – Embarcadero Technologies.
Only 2 upvotes, so I assume the “anti with camp” people are finally winning (:
Notes:
W1048 warning. It looks like the ones using local variables don’t, but parameters, properties and fields to.W1048 Unsafe typecast of '%s' to 'Pointer'Quoted from the bug-report (as they cannot be archived in the wayback machine)
with statements generate W1048 unsafe typecast warning
Details
Type:Bug
Status:Reported
Priority:Major
Resolution:Unresolved Affects Version/s:10.2 Tokyo Fix Version/s:None Component/s:Delphi Compiler Labels: None
Build No: 25.0.25948.9960 Platform: All Language Version: English Edition: Enterprise InternalID: RS-82298 InternalStatus: ValidationDescription
All with statements generate this warning. I am on board with the theory that all with statements are inherently somewhat unsafe, but with 1.5 million lines of legacy code (and over 500 new warnings), I would significantly prefer to have a separate warning for with statements.
As it happens I would like to go through and do this work, especially if we can have refactoring to restore non-with code – see RSP-13978. BUT, Godzilla is generating new extra warnings (including unsafe typecasts) in this legacy code and I would prefer to be able to attack these first and attend to with statements later.Activity
Comments
–jeroen
Posted in Delphi, Delphi 10.2 Tokyo (Godzilla), Development, Software Development | 1 Comment »
Jason Sprenger requested more info in order to validate the issue and commented: Not any code involving “with” statements produces an unsafe typecast warning.
For instance,
What sort of source involving “with” statements is generating these warnings for you?
With this information our development team can consider addressing your particular circumstance.