Tuesday, June 10, 2025

Arch Linux and Ubuntu/Debian build from Golf source

The issue with Golf build from AUR page (see https://golf-lang.blogspot.com/2025/02/golfs-package-page-on-aur-for-arch-linux.html) has been fixed.

File 'arch.install' was recently added, but wasn't a part of AUR git repo for Golf. This has now been fixed, and you should be able to install Golf from its AUR page (see above link).

Also, the Debian/Ubuntu package creation (see https://golf-lang.blogspot.com/2025/02/create-deb-installation-package-for-golf.html) has been re-tested and updated, since Golf has changed to a non-native package (most packages are).

Golf 601.4.58 released

 This patch fixes a few bugs introduced in 601.4.41's new features:

  • a variable name would not be recognized if it has an underscore and is a string variable with a subscript, i.e. obtaining individual bytes from a string,
  • the error message for an unknown variable would come from gcc and not Golf. It should come from Golf as it more to the point and color coded, i.e. easier to see immediately what the issue is,
  • better error handling for variable types when wrong type is used,
  • building Golf programs is faster because executables are not stripped anymore. Stripping didn't add anything in terms of performance, and the amount of debugging information is minimal (as far as the size on disk); plus the debugging info is not read in memory at run time so the run-time cost is zero.

Saturday, June 7, 2025

Golf 601.4.41 released

 Patch release with the fix for arch compilation for Debian.

Golf 601.4.37 released

This is a patch release that fixed building issues with various Linux distros caused by compilation flags introduced for a Debian build. Besides compilation, these flags also have impact on performance and some may or may not be put back in the future, though in a controlled fashion, since not all distros support them (or they do but not in the same way or with the same interactions with other flags), and their effect isn't clear yet. 

The RELRO flag isn't one of the affected flags, and it stays. Mostly flags related to other hardening options are currently reviewed. Golf is a memory safe language and places limitations on stack allocations, and some of the flags effectively duplicate the effort. Future releases will also limit the depth of stack calls, and these flags will be evaluated for utility, safety and performance.

For now, it's a transitory release until they get sorted out.

Thursday, June 5, 2025

Golf 601.4.32 released

This is a major new Golf release. Here's the summary of changes, with items that may require code changes marked with (Code) in front. There is only three of those and they aren't major code changes. Most are either new features, enhancements or bug fixes.

  • RELRO (Relocation Read Only) is now added to all Golf executables and libraries, including those produced by Golf (meaning applications you build with Golf). This increases safety and prevents certain sections of ELF binaries from being overwritten.
  • Added new number/bool arrays, in addition to string ones. To use them, simply add "type" clause in new-array statement. The arrays operate the same way regardless of the type.
  • Fixed various issues with debian packaging, including the unnecessary dependencies.
  • Added -ignore-warn to gg. Some Golf statements will produce warnings, and you can suppress them with this option. In general, it's best to take care of the potential issues though.
  • Fixed an issue when a request name is a reserved C word. A proper error is now emitted.
  • Fixed a bug in passing arrays as parameters with set-param/get-param. This would occur only with process-scoped arrays in some cases.
  • Added support in get-time statement for epoch time. You can now obtain time as "since-epoch" (meaning the number of seconds since the Epoch, including the negative values for the past), as well as produce time with "from-epoch" clause. Along with existing feature of adding time offset and formatting time output, these provide powerful time constructs.
  • Fixed a bug with mgrg program manager during startup when Golf is installed in a user directory (i.e. not installed system-wide).
  • Added "return-value" clause to call-handler and "return-handler" statement now has a return value. This enables you to pass a number as a return value from a request handler, making it easier to get the status of running a handler. 
  • New simplified print-out and print-format are now available with the same functionality as the existing of p-/pf- statements (which are still available, but their usage will generate a warning to replace them with the new ones).
  • Added boolean expressions with logical operators ! (not), && (and), || (or) and parenthesis ().
  • Added setting boolean variables directly with a "if-true" condition by using new "from-condition" clause.
  • (Code) Clauses "webencode" and "urlencode" have been replaced with more readable web-encode and url-encode.
  • (Code) Statement "handler-status" has been replaced with "exit-status" to better reflect its purpose. Similarly "handler-status" clause in run-remote statement has been replaced with "exit-status" clause for the same reason.
  • Unused variables now reported by gg utility to increase quality of the code.
  • Type checking is now more robust, with issues where type of variable is not recognized fixed.
  • Added support for all escape sequences such as \n, \f, \b etc.
  • Proper error is now emitted if {} code blocks are unbalanced.
  • (Code) The end counter is start-loop now has value of 1 over the last iterator, as it is customarily expected in such loops. This may require code change if your application depends on this value.
  • if-defined statement now has lesser-than, greater-than and other similar clauses to check the value of defineds. Names that start with underscore (_) are now valid as well.
  • Statement get-req now has "source-file" clause to obtain the current source file name.
  • Added abs-number statement to get an absolute number value.
  • Added new-string statement to create new memory. This is useful in cases where memory is manipulated byte by byte.
  • Statement set-string now has  "set-length" clause to set the length of memory created with new-string statement.
  • Statement unused-var now allows for a list of variables separated by a comma.
  • Added statement get-lifo, with an option to get the count of items in the LIFO.
  • Added statement quit-process to quit the current server process; useful when you want to do it programmatically, such as to reboot the server or for upgrades.
  • Fixed several issues with error reporting.
  • Fixed issue with tests that caused false negatives; patch 601.4.15 is effectively the same as .9 because of  it (and because version numbers always only go up).


Wednesday, June 4, 2025

Major new release of Golf coming soon

A major new release of Golf is coming soon. 

It will have lots of new functionality, enhancements in the language, better error reporting, better type coverage (including a few new complex types), better performance etc, in addition to bug fixes. 

Stay tuned.