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,839 other subscribers

Archive for the ‘Software Development’ Category

IMPLICITBUILDING in your .dpk files: a Delphi XE2 specific thing

Posted by jpluimers on 2016/10/18

While upgrading a truckload of Delphi stuff for a client, I came across the IMPLICITBUILDING directive in a few .dpk files that Delphi XE2 sometimes inserts but XE8 doesn’t.

This appears to be a Delphi XE2 specific thing that in younger Delphi versions has been solved properly SolarWind‘s answer on Stack Overflow:

 The compiler directives which appear between the $IFDEF IMPLICITBUILDING and $ENDIF are normally passed as parameters by the compiler when explicitly compiling a package. Because these options change based on the configuration (debug / release) and target platform (Win32, Win64, OSX32) it’s problematic to have them statically defined in the package project source. When defined in the project source they will always override the options passed by the compiler. The $IFDEF prevents these options from being used during explicit compilation.

Source: Delphi XE2: What is the purpose of IMPLICITBUILDING directive found in package – Stack Overflow

and comment by Andreas Hausladen:

That seems to be a workaround for the problem that compiling packages with the msbuild script ignored all dproj compiler options because they were read from the dpk file by the compiler.

Some more references (I’ve saved them in the WayBack machine as the forums auto-expire posts):

–jeroen

Posted in Delphi, Delphi XE2, Delphi XE8, Development, Software Development | Leave a Comment »

Multi-line comments in a bash shell script

Posted by jpluimers on 2016/10/18

I’m used to multiline comments in many languages, but since I don’t use bash very often, I only recently learned it can do that too.

So this is how to have comments span multiple lines in bash by using the : command which according to the bash man page does nothing:

: [arguments]
No effect; the command does nothing beyond expanding arguments and performing any specified redirections. A zero exit code is returned.

So the syntax is:

: '
your comments here
'

–jeroen

via: Shell Script Put Multiple Line Comment.

Posted in bash, Development, Scripting, Software Development | Leave a Comment »

Differences between SFTP and “FTP over SSH” – Stack Overflow

Posted by jpluimers on 2016/10/13

As I will likely have to secure some external FTP sessions soon and the endpoints the current FTP connects to are vague in what they support:

Here is the difference:

  • SFTP (SSH file transfer protocol) is a protocol that provides file transfer and manipulation capabilities. It can work over any reliable data stream, but is typically used with SSH
  • “FTP over SSH” uses the regular old FTP protocol, but an SSH tunnel is placed between client and server.

Source: Kristopher Johnson answering in c# – Differences between SFTP and “FTP over SSH” – Stack Overflow

–jeroen

Posted in Communications Development, Development, Internet protocol suite, Software Development, SSH, TCP, TLS | Leave a Comment »

Delphi – unmangle names in BPL’s – Stack Overflow

Posted by jpluimers on 2016/10/12

Check out $(BDS)\source\cpprtl\Source\misc\unmangle.c – it contains the source code for the unmangling mechanism used by TDUMP, the debugger and the linker. (C++Builder and Delphi use the same mangling scheme.)

This has been around as long as BCC itself. However the file was called um.c instead of unmangle.c in older versions

Source: [WayBackDelphi – unmangle names in BPL’s – Stack Overflow both by User Moritz Beutel.

It’s the same mangling used in the TD32/TDS and MAP symbols.

And neede to improve https://github.com/jpluimers/map2dbg (which is my fork of https://github.com/andremussche/map2dbg) which contrary to it’s name also supports TDS/TD32 conversions in tds2pdb. The code is C# and works in virtually any Visual Studio version of 2012 and younger.

–jeroen

 

Posted in Debugging, Delphi, Development, MAP Symbol Information, Software Development, TD32/TDS Symbol information | Leave a Comment »

A great way to interactively browse xml/xhtml/html on the console: xmllint –shell

Posted by jpluimers on 2016/10/12

A while ago, I heard about xmllint, a program that can parse and query xml from the command-line.

Later, I discovered it can also parse html, can recover from xml/html errors and has an interactive shell that has a lot of commands (see table below) to navigate through the loaded command.

The relevant command-line options:

--recover
--html
--shell

Note that --recover will output failing input to stderr. You can ignore that using 2> /dev/null

Some good examples of usage are here:

The table of shell commands:

Shell

xmllint offers an interactive shell mode invoked with the –shell command. Available commands in shell mode include:
Command Parameter Description
base display XML base of the node
bye leave shell
cat node Display node if given or current node.
cd path Change the current node to path (if given and unique) or root if no argument given.
dir path Dumps information about the node (namespace, attributes, content).
du path Show the structure of the subtree under path or the current node.
exit Leave the shell.
help Show this help.
free Display memory usage.
load name Load a new document with the given name.
ls path List contents of path (if given) or the current directory.
pwd Display the path to the current node.
quit Leave the shell.
save name Saves the current document to name if given or to the original name.
validate Check the document for error.
write name Write the current node to the given filename.

–jeroen

via xmllint.

Posted in Development, HTML, HTML5, Software Development, Web Development, XML, XML/XSD, XPath | Leave a Comment »

belluzj/fantasque-sans: A font family with a great monospaced variant for programmers.

Posted by jpluimers on 2016/10/11

On my list of mono-spaced programmer fonts to try (and see how it compares to my beloved [WaybackLucida Console):

[Wayback] fantasque-sans – A font family with a great monospaced variant for programmers (yes I know it was called Comic Sans Neue Mono, but don’t extend your Comic Sans hatred there).

Source: [WaybackFantasque Sans Mono:

Fantasque Sans Mono: A programming font, designed with functionality in mind, and with some wibbly-wobbly handwriting-like fuzziness that makes it unassumingly cool. Development hosted on Github: [Waybackhttps://github.com/belluzj/fantasque-sans OFL (SIL Open Font License). Category: Monospaced

Via: Ein Font für Ruby on Rails-Entwickler: Comic Sans Neue Mono – Kristian Köhntopp – Google+

Another font on that list is [Wayback/Archive.is] Hack where I have to do a bit work on fiddling with line spacing.

These are for my TODO:

–jeroen

Posted in Development, Fantasque Sans Mono, Font, Hack Font, Lucida Console, Power User, Programmers Font, Software Development | Leave a Comment »

Installing Python on Mac OS X — The Hitchhiker’s Guide to Python

Posted by jpluimers on 2016/10/11

Interesting, as I thought Mac OS X Yosemite and up – having Python installed – would also keep Python up-to-date, but they don’t.

Hence:

Installing Python on Mac OS X

The latest version of Mac OS X, Yosemite, comes with Python 2.7 out of the box.

The version of Python that ships with OS X is great for learning but it’s not good for development. The version shipped with OS X may be out of date from the official current Python release, which is considered the stable production version.

–jeroen

via:

Posted in Development, Python, Scripting, Software Development, xCode/Mac/iPad/iPhone/iOS/cocoa | Leave a Comment »

Continua CI v1.8.1.118 released

Posted by jpluimers on 2016/10/11

Source: Version 1.8.1 History | Continua CI – v1.8.1.118

v1.8.1.118

October 10th, 2016

Changes

  • Update: Reduced CPU usage on server when using a large number of time triggers.
  • Update: Reduced wait time between time triggers running simultaneously.
  • Update: Reduced CPU usage and throughput of stage queue.
  • Update: The >> operator is now implemented in repository rules. This is used to clean the destination folder before copying files. It is useful when a stage can run on the same agent as a previous stage as the agent workspace is not automatically cleared between stages.
    Note: We have also changed the default workspace and repository rules so that the >> operator is used for any server to agent rules in new stages. This is to ensure that the workspace is always cleared and are no surprises dependent on the agent the stage runs on. This can be changed to a single > to use the previous behaviour.
  • Update: Environment variables now expanded in all path type property collectors. This will for example allow you to use %HOME% to define the path to check when using a Path Access PlugIn property collector.
  • Update: Added descriptions and help information to property collector dialog fields.
  • Update: Queued stages are now prevented from starting in the few seconds after an agent has gone offline.
  • Fix: Issue where changes to user group membership were not picked up for several minutes unless the service was restarted.
  • Fix: Triggers were not being monitored after a disabled configuration was re-enabled.
  • Fix: Issue where agents with unlimited concurrent stages would not be selected to run stage.

–jeroen

Posted in Continua CI, Continuous Integration, Development, Software Development | Leave a Comment »

Intellectual Ventures Case: Why Software Patents Will Take a Big Hit

Posted by jpluimers on 2016/10/06

Very interesting read: Intellectual Ventures Case: Why Software Patents Will Take a Big Hit [WayBack]

Some more background information (most by or via Jan Wildeboer):

–jeroen

Posted in Development, Software Development | Leave a Comment »

Real nullable types will probably never make it to the language, but wel can still dream

Posted by jpluimers on 2016/10/06

Allen Bauer (ex Delphi R&D team) wrote the brilliant piece about a year and a half ago. We can still dream, right?

Allen Bauer, May 25, 2015

Current working theory of Nullable<T>.

Nullable<T> = record

property Value: T read FValue; default;

end;

Using the default directive to “hoist” the operators of “T“. Currently the default directive only works for array properties by “hoisting” the ‘[]‘ operator. Marking a non-array property with default will make the containing type behave as that type.

This, coupled with some intrinsic compiler knowledge of the Nullable<T> type will make Nullable<T> work without any addition of keywords or other standard functions or procedures.

Using the “default” directive on a non-array property will work for any type, except for having the null-propagation semantics.

When considering language features, I try and not only make it work for the intended purpose, but also broaden reach of any supporting feature. In the above scenario, even user-defined operators on “T” will be properly hoisted and used.

This was part of a very interesting G+discussion at Delphi’s New Feature Desired: Nullable Types and Null Propagation….

It covered topics like these:

–jeroen

Posted in Delphi, Development, Software Development | 5 Comments »