kirit.com

Created 26th April, 2005 13:12 (UTC), last edited 30th December, 2013 06:38 (UTC)

Writing about C++, Programming, Fost 4, the web, Thailand and anything else that catches my attention—with some photos thrown in

Fost 4 release 4.14.03.44915 now out

Posted 4th April, 2014 11:16 (UTC), last edited 5th April, 2014 03:36 (UTC)

The new release was tagged on the new git repositories a couple of weeks ago. The transfer of everything to git turned out to be far more complex than I could ever have expected — I think it actually took longer and more work than converting from Visual Source Safe to Subversion, and I had to write my own software for that. The thing that had me confused for a long time was my expectation that git would allow me to handle the full history, but that doesn't seem to be the case — oh well, in any case a story for another time.

Anyway, with the move to git there's also a number of clean ups and small improvements outlined below, and I've also pushed out a meta-build system that I use to manage to the projects in their entirety at fost-dev.

The old Subversion repositories will remain, but they won't receive further updates.

Linux & Mac

git clone --branch=4.14.03.44915 --recursive git@github.com:KayEss/fost-hello.git
cd fost-hello
Boost/build
hello/compile
dist/bin/hello-world-d

On the Mac you will need to set DYLD_LIBRARY_PATH before running hello-world-d

export DYLD_LIBRARY_PATH=dist/lib
dist/bin/hello-world-d
Windows
git clone --branch=4.14.03.44915 --recursive git@github.com:KayEss/fost-hello.git
cd fost-hello
Boost\build
hello\compile
dist\bin\hello-world-gd

Download locations

  • fost-aws — Amazon AWS and OpenStack — git@github.com:KayEss/fost-aws.git
  • fost-base — Build system and core libraries — git@github.com:KayEss/fost-base.git
  • fost-hello — Sample project — git@github.com:KayEss/fost-hello.git
  • fost-internet — Internet protocols, servers & clients — git@github.com:KayEss/fost-internet.git
  • fost-meta — All libraries in one wrapper — git@github.com:KayEss/fost-meta.git
  • fost-orm — Object/Relational mapping — git@github.com:KayEss/fost-orm.git
  • fost-postgres — PostgreSQL — git@github.com:KayEss/fost-postgres.git
  • fost-py — Python (2.x) bindings — git@github.com:KayEss/fost-py.git
  • fost-windows — Windows support — git@github.com:KayEss/fost-windows.git

Detailed change log

fost-base

  • Extend the fostlib::timestamp and fostlib::date interfaces somewhat. Added a number of missing coercions and constructors to make things simpler and made sure that there is no loss in precision when converting to and from strings and JSON. Moved a number of timestamp and date members inline for speed.
  • Allow dates to have days added and subtracted from them.
  • Add today member to fostlib::date.
  • Fix some warnings for a couple of compilers.
  • Added a new split member to jcursor to allow one to be created by splitting up a single string.

fost-internet

  • Folding of long lines in MIME headers needs to be conditional on the protocol because most MIME protocols use it, but HTTP does not and some web servers don't handle folded lines.
  • The MIME header names and values need to be retrievable in a case-insensitive manner as not everybody agrees on the correct case.
  • The fostlib::url::query_string class can now also be used to parse the standard format query string on the server side. The HTTP server query string is also now always a url::query_string instance.
  • Hold the parser lock for a much shorter period when parsing a HTTP request to the web server.
  • Alter the testing HTTP server request class so it can take a query string and the headers/body are optional.

fost-py

  • The spider now tries more types of link including script and img elements.

fost-aws

  • Added support for Swift as well as S3.
  • The account to use can now be passed to s3put with -a.
  • Added s3get to fetch files and refactored the s3put command to move the logic of where the upload decision happens.

Categories:

Fost 4 release 4.13.12.44866 now out

Posted 30th December, 2013 04:40 (UTC), last edited 30th December, 2013 04:56 (UTC)

I'm afraid that there are no changes in this release, but that doesn't mean things aren't changing. My intention is for this to be the last release done through the Subversion repository as all the source will be moved over to Git.

The plan is to split each library into two repositories — the first being the actual library code itself, and the second being the library build environment. This is how the fost-beanbag functionality is already done, see beanbag and fost-beanbag (although the motivation is different and this will mean a slightly different naming convention for the base libraries).

Development will be done using Git flow, but I don't foresee using the release mechanism. What this means in practice is that the unstable code now in trunk will be in a develop branch and the stable version will be in master. The quarterly releases will simply be tagged versions of master. By having everything in Git it'll make this process significantly easier to manage and will mean that the libraries currently in Git will get proper tagged releases.

I've yet to sort out the details of how to do the transfer of the code and the structure of the libraries themselves, but I do hope to get most of this done during the course of the next week.

Linux & Mac
svn co http://svn.felspar.com/public/fost-hello/tags/4.13.12.44866 fost-hello
cd fost-hello
Boost/build
hello/compile
dist/bin/hello-world-d

On the Mac you will need to set DYLD_LIBRARY_PATH before running hello-world-d

export DYLD_LIBRARY_PATH=dist/lib
dist/bin/hello-world-d
Windows
svn co http://svn.felspar.com/public/fost-hello/tags/4.13.12.44866 fost-hello
cd fost-hello
Boost\build
hello\compile
dist\bin\hello-world-gd

Download locations

Everything is available through our Subversion repository. Below are the locations for the tagged releases for Fost 4.13.12.44866 components.


Categories:

GPLed TLA FAQ

Created 8th December, 2013 06:04 (UTC), last edited 14th December, 2013 09:19 (UTC)

My friend Jeroen maintains the GTF, which is the GPLed TLA FAQ, which is a database of three letter acronyms.

As a demo for the lightweight JSON databases supported by the fost-beanbag library and AngularJS I put this together one day. The original version is in the fost-beanbag source code, this is an adapted version to make it compatible with my web site.

The GTF

Select from the letters below to show the TLA definitions
  • {{definition}}

Nothing found for {{tla}} in the GTF, but Wikipedia has {{wikipedia.searchinfo.totalhits}} hits .

  1. {{find.title}}

Sorry, nothing was found for {{tla}} in the GTF, and Wikipedia isn't responding to the search request properly.


Categories:
Posted: 14th December, 2013 09:59 (UTC)
First announced on front page.

Some people just don't like declarative programming

Created 23rd December, 2007 07:51 (UTC), last edited 7th November, 2013 05:01 (UTC)

The declarative style of programming is not to everybody's taste. There are many who simply prefer the overtly operational nature of machine-oriented programs—for them, there is more psychological satisfaction to be had in exercising active control over the 'moving parts' of a computation than there is in the seemingly more passive business of declaring what the computation is to achieve. This preference may persist whatever claims are made or substantiated about the virtues of (present-day) logic programming.

I bet you thought that quote was going to be about functional programming until the last two words?

The quote is from Christopher Hogger's 1990 book Essentials of Logic Programming¹ [1This book was my university text on logic programming at Imperial College and Chris Hogger gave the lectures.]. Although the importance of logic programming has declined over the nearly twenty years since he wrote that passage the difference between declarative and imperative programming and the preference of some for one or the other is very much still with us.

He is right in talking about the fun aspects of programming—this is a big draw for many developers, but not all. I think many who prefer imperative programming simply have more trust in their solutions when they can see the moving parts and can fiddle with them. Getting to see and play with the ballistics of a program makes all sorts of things readily understandable that are hidden in declarative systems.

That doesn't mean that declarative programming isn't fun and it doesn't mean that we shouldn't trust our solutions even though we don't know how the answer is derived. Many of us are very happy to use compilers we barely comprehend, database engines which resolve problems for us that many don't even know exist and languages which abstract away not only the underlying machine but nearly all of the layers above that too.

Given the normal history of these things I think there'll be a resurgence in logic programming interest sometime in the next ten to fifteen years, as seems to be the repeated rise then decline and then rise again of programming paradigms—just look at object orientation and functional programming for two examples.

The decline of logic programming itself is certainly a shame. Logic programming has many useful things to teach us, for example, it allows us to reason about looping constructs and conditionals in a unified manner—something very important in Test Driven Development because it allows us to understand exactly what we get for our tests and how to test more of the program whilst writing fewer tests.

Posted: 7th November, 2013 04:58 (UTC)
I wrote this six years ago, but then forgot to hit the publish button so it's always been hidden.

2013-11

Created 3rd November, 2013 08:47 (UTC), last edited 3rd November, 2013 09:23 (UTC)

A day trip to have lunch at a restaurant featuring tables in one of the rivers.

I deliberately over exposed the photos of Freyja playing in the river as an experiment to see if it made them feel more summer-y.

Pictures & Photos

Posted: 3rd November, 2013 09:43 (UTC)
These are the first new pictures that I've published in a while on here. I'm partly just checking out what the process is with the new web server I'm now running.