kirit.com

Created 26th April, 2005 13:12 (UTC), last edited 22nd December, 2016 03:24 (UTC)

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

Fost 5 release 5.20.03.45095 now out

Posted 22nd March, 2020 06:24 (UTC), last edited 23rd March, 2020 03:41 (UTC)

There is a new library now, Makham, which is at the moment a basic coroutines library offering asynchronous task execution with ties through futures to non-coroutine code. This sits on top of the coroutines TS and is currently only usable from Clang.

There has also been more progress towards being able to move to immutable shared strings and away from the old fostlib::string interface, with more changes coming. A small change to the JSON parser has been shipped that gives a considerable performance boost (up to 30%) in some circumstances.

There is a new HTTP client library that supports testing through setting expectations which is part of the fost-internet library. Client code in the rest of the libraries will be migrated to it, which will improve testing capabilities for Fostgres and Odin.

Building on Linux & Mac

You should install Boost development packages using your package manager or brew to safe you from having to build them.

git clone --branch=5.20.03.45095 --recursive git@github.com:hotkit/fost-hello.git
cd fost-hello
mkdir build.tmp
cd build.tmp
cmake -G Ninja .. -DCMAKE_INSTALL_PREFIX=../dist
ninja install/strip
export LD_LIBRARY_PATH=../dist/lib
../dist/bin/hello

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

export DYLD_LIBRARY_PATH=../dist/lib
../dist/bin/hello

Download locations

Applications

  • fost-hello — Sample seed project — git@github.com:hotkit/fost-hello.git
  • fost-meta — All libraries and applications in one wrapper — git@github.com:hotkit/fost-meta.git
  • mengmon — Stand alone web server — git@github.com:hotkit/mengmom.git
  • test-android — Android application that runs Fost unit tests — git@github.com:hotkit/test-android.git
  • test-ios — iOS application that runs Fost unit tests — git@github.com:hotkit/test-ios.git
  • wright — Experimental build system — git@github.com:hotkit/wright.git

Libraries

  • cord — First version of a new string library with compile time string and Unicode support — git@github.com:hotkit/cord.git
  • fost-aws — Amazon AWS and OpenStack — git@github.com:hotkit/fost-aws.git
  • fost-android-ndk — The native code for Android. Includes required parts of Boost configured to use the standard Android build system.
  • fost-beanbag — Transactional JSON database — git@github.com:hotkit/fost-beanbag.git
  • fost-base — Build system and core libraries — git@github.com:hotkit/fost-base.git
  • fost-internet — Internet protocols, servers & clients — git@github.com:hotkit/fost-internet.git
  • fost-postgres — PostgreSQL — git@github.com:hotkit/fost-postgres.git
  • fost-web — Web server libraries — git@github.com:hotkit/fost-web.git
  • fost-wright — Experiment in a build system — git@github.com:hotkit/fost-wright.git
  • json-schema — JSON Schema validation — git@github.com:hotkit/json-schema.git
  • makham — Coroutines — git@github.com:hotkit/makham.git
  • threading — Preview of the first Fost 5 library which includes help for threading — git@github.com:hotkit/threading.git

Detailed change log

fost-base

  • json can now be constructed from u16 literals.
  • Coercion should now always work if the to type is constructible from the from type.
  • Add conversions between std and boost shared_ptrs.
  • Improve the digester interface to take more string types.
  • Have json store the string directly rather than as a shared_ptr. This is a breaking change on json visitors.
  • Add source file and line/column numbers to parse_error.
  • Improve the jcursor API so it can mutate json more efficiently.
  • Remove -e (print arguments/environment) support from command line.

fost-internet

  • Can now set exceptions as expected outcomes from the HTTP cache.
  • Add high level user agent with test expectation support.

fost-web

  • Add middleware that can replace response text with fixed strings or setting values.
  • Deprecate use of view instances.
  • Add a reverse proxy view that allows for changes in request and response.

fostgres

  • Improve the display of test failures from fostgres-test.
  • Add sending of cookie values from testserver.cookies to fostgres-test.
  • Add rm-path to test scripts so we can remove JSON from variable values.
  • Test scripts can now have the view JSON directly in the GET, PUT etc. calls.

odin

  • allow link between two app user in odin.link.account
  • Facebook and Google user with same email will merged as same user when register, and can login by both method
  • Add support changing non app jwt to app jwt when renewing.

threading

  • tsmap::alter added so a found member can be changed in-situ.
  • tsmap::add_if_not_found miss lambda can now mutate the found item.

Categories:

Fost 5 release 5.19.12.45093 now out

Posted 28th December, 2019 02:34 (UTC), last edited 28th December, 2019 09:06 (UTC)

A very small release this time that just adds server verification to TLS/SSL connections. This is now enabled by default on the HTTP user agent.

Next time though there will be some libraries. Watch this space!

Building on Linux & Mac

You should install Boost development packages using your package manager or brew to safe you from having to build them.

git clone --branch=5.19.12.45093 --recursive git@github.com:hotkit/fost-hello.git
cd fost-hello
mkdir build.tmp
cd build.tmp
cmake -G Ninja .. -DCMAKE_INSTALL_PREFIX=../dist
ninja install/strip
export LD_LIBRARY_PATH=../dist/lib
../dist/bin/hello

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

export DYLD_LIBRARY_PATH=../dist/lib
../dist/bin/hello

Download locations

Applications

  • fost-hello — Sample seed project — git@github.com:hotkit/fost-hello.git
  • fost-meta — All libraries and applications in one wrapper — git@github.com:hotkit/fost-meta.git
  • mengmon — Stand alone web server — git@github.com:hotkit/mengmom.git
  • test-android — Android application that runs Fost unit tests — git@github.com:hotkit/test-android.git
  • test-ios — iOS application that runs Fost unit tests — git@github.com:hotkit/test-ios.git
  • wright — Experimental build system — git@github.com:hotkit/wright.git

Libraries

  • cord — First version of a new string library with compile time string and Unicode support — git@github.com:hotkit/cord.git
  • fost-aws — Amazon AWS and OpenStack — git@github.com:hotkit/fost-aws.git
  • fost-android-ndk — The native code for Android. Includes required parts of Boost configured to use the standard Android build system.
  • fost-beanbag — Transactional JSON database — git@github.com:hotkit/fost-beanbag.git
  • fost-base — Build system and core libraries — git@github.com:hotkit/fost-base.git
  • fost-internet — Internet protocols, servers & clients — git@github.com:hotkit/fost-internet.git
  • fost-postgres — PostgreSQL — git@github.com:hotkit/fost-postgres.git
  • fost-web — Web server libraries — git@github.com:hotkit/fost-web.git
  • fost-wright — Experiment in a build system — git@github.com:hotkit/fost-wright.git
  • json-schema — JSON Schema validation — git@github.com:hotkit/json-schema.git
  • threading — Preview of the first Fost 5 library which includes help for threading — git@github.com:hotkit/threading.git

Detailed change log

cord

  • Remove the vstring header.

fost-internet

  • Added a number of configuration options for server certificate checking.
  • Add option to verify server certificates on the network connection and force UA to use it

Categories:

Fost 5 release 5.19.09.45082 now out

Posted 23rd September, 2019 03:05 (UTC), last edited 23rd September, 2019 03:42 (UTC)

All of the code has now been moved to a new home on GitHub and a couple of the libraries have had their names tweaked. Because of the way GitHub works this should be a completely transparent change.

Applications have for a while been able to use JSON as the configuration format. The problem with JSON for this is that it has very strict format requirements. Now the configuration files use a new “sloppy” JSON parser that allows commas anywhere that whitespace is allowed and also supports C/C++ style comments.

Fostgres will now always trim whitespace from strings before trying to insert them into the database. This should help with some consistency problems. If you don't want to trim the data then put "trim": false into the column configuration.

Building on Linux & Mac

You should install Boost development packages using your package manager or brew to safe you from having to build them.

git clone --branch=5.19.09.45082 --recursive git@github.com:hotkit/fost-hello.git
cd fost-hello
mkdir build.tmp
cd build.tmp
cmake -G Ninja .. -DCMAKE_INSTALL_PREFIX=../dist
ninja install/strip
export LD_LIBRARY_PATH=../dist/lib
../dist/bin/hello

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

export DYLD_LIBRARY_PATH=../dist/lib
../dist/bin/hello

Download locations

Applications

  • fost-hello — Sample seed project — git@github.com:hotkit/fost-hello.git
  • fost-meta — All libraries and applications in one wrapper — git@github.com:hotkit/fost-meta.git
  • mengmon — Stand alone web server — git@github.com:hotkit/mengmom.git
  • test-android — Android application that runs Fost unit tests — git@github.com:hotkit/test-android.git
  • test-ios — iOS application that runs Fost unit tests — git@github.com:hotkit/test-ios.git
  • wright — Experimental build system — git@github.com:hotkit/wright.git

Libraries

  • cord — First version of a new string library with compile time string and Unicode support — git@github.com:hotkit/cord.git
  • fost-aws — Amazon AWS and OpenStack — git@github.com:hotkit/fost-aws.git
  • fost-android-ndk — The native code for Android. Includes required parts of Boost configured to use the standard Android build system.
  • fost-beanbag — Transactional JSON database — git@github.com:hotkit/fost-beanbag.git
  • fost-base — Build system and core libraries — git@github.com:hotkit/fost-base.git
  • fost-internet — Internet protocols, servers & clients — git@github.com:hotkit/fost-internet.git
  • fost-postgres — PostgreSQL — git@github.com:hotkit/fost-postgres.git
  • fost-web — Web server libraries — git@github.com:hotkit/fost-web.git
  • fost-wright — Experiment in a build system — git@github.com:hotkit/fost-wright.git
  • json-schema — JSON Schema validation — git@github.com:hotkit/json-schema.git
  • threading — Preview of the first Fost 5 library which includes help for threading — git@github.com:hotkit/threading.git

Detailed change log

cord

  • Fix a bug in the string slice operations that could cause undefined behaviour when used with nullptr buffers.

fost-base

  • Add sloppy json parser.
  • Add trim function for f5::u8view.
  • minit will now always try to execute, even if it is not needed.

fost-internet

  • Add a way to stop a web server instance.
  • Joining an empty fragment does not give the same result as joining a missing fragment.

fost-postgres

  • Add array insert support.

fost-web

  • Add Fost-Request-ID in every request and response
  • Add a return for status condition control when an if condition fails without else condition

fost-wright

  • Made implementation compatible with future changes to string APIs.

fostgres

  • Add schema check before insert/update into database and refactor datum for consistent trim
  • GET requests that don't check the body content now return the response body.

odin

  • JWTs may be placed in cookies and decoded from there.
  • Add support for password hashing process in an array

Categories:

Fost 5 release 5.19.06.45081 now out

Posted 23rd June, 2019 04:17 (UTC), last edited 24th June, 2019 04:22 (UTC)

The biggest change this time around is that a large number of APIs have been marked for deprecation. These will be removed after the next tagged release (September), so please take special care with the deprecation notices and update any code.

We are currently working on full UTF-16 and UTF-32 support in f5-cord. Once this lands then we will deprecate a slew more of old string APIs. Our target is still to replace fostlib::string with f5::u8string. It will of course take a while.

Good progress is being with iOS support now. There is a new unit test runner, test-ios, that passes all unit tests and is available to download and build.

We've removed a couple of the applications that were never being updated, beanbag and beanbag-seed.

We will also cut down the scope of the open source part of Odin to remove the application handling aspects. These just cause a complication and we believe that the only use cases are particular to us. Please get in touch if this is not the case.

Building on Linux & Mac

You should install Boost development packages using your package manager or brew to safe you from having to build them.

git clone --branch=5.18.09.45065 --recursive git@github.com:KayEss/fost-hello.git
cd fost-hello
mkdir build.tmp
cd build.tmp
cmake -G Ninja .. -DCMAKE_INSTALL_PREFIX=../dist
ninja install/strip
export LD_LIBRARY_PATH=../dist/lib
../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

Download locations

Applications

  • fost-hello — Sample seed project — git@github.com:KayEss/fost-hello.git
  • mengmon — Stand alone web server — git@github.com:KayEss/mengmom.git
  • test-android — Android application that runs Fost unit tests — git@github.com:KayEss/test-android.git
  • test-ios — iOS application that runs Fost unit tests — git@github.com:KayEss/test-ios.git
  • wright — Experimental build system — git@github.com:KayEss/wright.git

Libraries

  • f5-cord — First version of a new string library with compile time string and Unicode support — git@github.com:KayEss/f5-cord.git
  • f5-json-schema — JSON Schema validation — git@github.com:KayEss/json-schema.git
  • f5-threading — Preview of the first Fost 5 library which includes help for threading — git@github.com:KayEss/f5-threading.git
  • fost-aws — Amazon AWS and OpenStack — git@github.com:KayEss/fost-aws.git
  • fost-android-ndk — The native code for Android. Includes required parts of Boost configured to use the standard Android build system.
  • fost-beanbag — Transactional JSON database — git@github.com:KayEss/fost-beanbag.git
  • fost-base — Build system and core libraries — git@github.com:KayEss/fost-base.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-postgres — PostgreSQL — git@github.com:KayEss/fost-postgres.git
  • fost-web — Web server libraries — git@github.com:KayEss/fost-web.git
  • fost-wright — Experiment in a build system — git@github.com:KayEss/fost-wright.git

Detailed change log

f5-cord

  • Deprecated two argument substr as the second argument handling doesn't match std::string::substr.

f5-threading

  • Replace std::experimental::optional with std::optional

fost-base

  • Implement string conversion (ISO Zulu time) for std::chrono::system_clock
  • Add new nonce functions that return base64url formatted random data in ordered and un-ordered variants.
  • Force conversion of the underlying string type from a tagged string to std::string be explicitly invoked.
  • Deprecate length members of tagged_string and string.
  • Add some APIs to tagged_string that are currently on string.
  • Add bin/minit back into project.
  • Deprecate string::length and tagged_string<>::length
  • Add a setting, fostlib::test::c_files_folder, describing the root folder tests should use if they need access to the file system.
  • Use of define FSL_FORCE_STD_FILESYSTEM switches from boost::filesystem to std::filesystem with names in fostlib::fs.
  • Start to process the string deprecations that we want to have:
    • Deprecate fostlib::tagged_string<T, I>::underlying().
    • Deprecate fostlib::string::c_str().
    • Add API for turning a fostlib::string into an f5::u8string (u8string_transition).

fost-internet

  • Add methods for fetching out string version and JSON version of mime bodies.

fost-postgres

  • Add RETURNING support to connection's update method.

fost-web

  • Add JSON directory listing view and ability to choose directory listing view for the static file server.
  • The web server takes a -C option which changes its current directory
  • Text files (text/ Content-Type) are served as UTF8.

fostgres

  • Object APIs can now process JSON arrays into a separate table.
  • Add a new view to retry Postgres serialisation errors.
  • Add a request logging middleware that stores the per-request log to the database.

odin

  • Support multiple facebook apps
  • Fix view odin.password.me
  • Add executable for timing password hashing rounds and configuration item for round count.


Categories:

Fost 5 release 5.19.03.45077 now out

Posted 31st March, 2019 03:51 (UTC), last edited 24th June, 2019 04:21 (UTC)

We've now finally started the process of porting the fostlib::string implementation to use f5::u8string. A short write up about the design can be found in the repository. There are going to be a lot of new deprecations in the next release and we'll then start to remove the deprecated code after that.

Building on Linux & Mac

You should install Boost development packages using your package manager or brew to safe you from having to build them.

git clone --branch=5.18.09.45065 --recursive git@github.com:KayEss/fost-hello.git
cd fost-hello
mkdir build.tmp
cd build.tmp
cmake -G Ninja .. -DCMAKE_INSTALL_PREFIX=../dist
ninja install/strip
export LD_LIBRARY_PATH=../dist/lib
../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

Download locations

Applications

  • beanbag — Stand alone transactional JSON database server — git@github.com:KayEss/beanbag.git
  • beanbag-seed — Seed project for giving you a starting point to develop web applications using Beanbag — git@github.com:KayEss/beanbag-seed.git
  • fost-hello — Sample seed project — git@github.com:KayEss/fost-hello.git
  • mengmon — Stand alone web server — git@github.com:KayEss/mengmom.git
  • test-android — Android application that runs Fost unit tests — git@github.com:KayEss/test-android.git
  • wright — Experimental build system — git@github.com:KayEss/wright.git

Libraries

  • f5-cord — First version of a new string library with compile time string and Unicode support — git@github.com:KayEss/f5-cord.git
  • f5-json-schema — JSON Schema validation — git@github.com:KayEss/json-schema.git
  • f5-threading — Preview of the first Fost 5 library which includes help for threading — git@github.com:KayEss/f5-threading.git
  • fost-aws — Amazon AWS and OpenStack — git@github.com:KayEss/fost-aws.git
  • fost-android-ndk — The native code for Android. Includes required parts of Boost configured to use the standard Android build system.
  • fost-beanbag — Transactional JSON database — git@github.com:KayEss/fost-beanbag.git
  • fost-base — Build system and core libraries — git@github.com:KayEss/fost-base.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-postgres — PostgreSQL — git@github.com:KayEss/fost-postgres.git
  • fost-web — Web server libraries — git@github.com:KayEss/fost-web.git
  • fost-wright — Experiment in a build system — git@github.com:KayEss/fost-wright.git

Detailed change log

cord

  • Add ends_with on the u8view and u8string.

json-schema

  • Add debug logging for the HTTP schema loader.

fost-base

  • Split the CMake configuration into smaller parts.
  • Changes to string handling to support wider adoption of f5::u8string
  • Further changes needed for new f5-cord string implementation.

fost-web

  • Add test.throw view to help with testing and control.exception.catch for running alternative views when exceptions are thrown.
  • Fix fost.proxy.transparent. Pass the correct path.
  • Add fost.control.status-condition view

fost-wright

  • Made implementation compatible with future changes to string APIs.

fostgres

  • fostgres.sql supporting precondition
  • Fixed a bug in the HTTP tests not doing name look ups correctly.
  • Add debug logging of the database JSON schema loader.
  • Add fostgres.control.pg-error view
  • Add fostgres-tests
  • POST support configuration as an array

odin

  • Implement app logins for Facebook and Google.
  • Abandon unregister user when merge failed
  • Fix merge_record failed when user has app installation record
  • Trigger merge account when user token and login mismatch
  • Add merge identities
  • Remove usage of app token
  • Fix AuthN login schema
  • Add odin.middleware.reference view

Categories: