Gerbil v0.18 #1009
vyzo
announced in
Announcements
Gerbil v0.18
#1009
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We are happy to announce the release of Gerbil v0.18, Nimzowitsch
Gerbil v0.18 is a milestone release, which sets the foundation for Gerbil v1.0 in the near future. We affectionately call it the Nimzowitsch release, after the great Chess player who formulated the basis of modern Chess theory.
Release Notes
There have been cataclysmic changes, as we have finally achieved full self hosting bootstrap (the Bootstrap Singularity) and the entirety of the language is written in itself. Gambit is now integrated as a git submodule, with the only dependency being on
libgambit
andgsc
as the compiler backend.gsi
is only needed for the bootstrap compilation, after that is out of the picture and we don't even install it.The build system has been reworked from the ground up. We start from the precompiled bootstrap sources, which we compile with a build script using gsi. The bootstrap compiler then compiles the runtime, the expander and the prelude, and after that we build the universal
gerbil
binary to build the rest of the system. All this is described in detail in The Gerbil Bootstrap.The executable compilation model has been also reworked from the ground up. Gone are the dynamic executable stubs, we don't need them any more as you can just run any dynamically compiled executable module with the
gerbil
binary. Instead all executables are proper binaries which either link tolibgerbil
andlibgambit
(as shared libraries by default, or baked into the binary if the system is configured with--disable-shared
) or compiled with full program optimization, which is akin to the old static binary compilation model. The nomenclature has also changed, as the dynamic -vs- static distinction refers to the linkage of the executable, in line with the native system toolchain.The runtime has been rewritten in pure Gerbil; gone are the
gx-gambc
gambit "modules" that provided the core runtime functionality. This has allowed us great freedom and some very important features. We have completely reworked the exception hierarchy to be class based and we define our own versions ofraise
,with-exception-handler
andwith-catch
and ensure that all exceptions have stack traces. We have also lifted all restrictions with regards to embedding the expander in binary executables. The code is there in libgerbil, and you can just load the expander environment on demand.The tooling has been greatly improved, with emphasis on build isolation so that each individual project has its own GERBIL_PATH bundling dependencies and solving once and for all the dirty
~/.gerbil
problem that plagued earlier version of Gerbil. The tooling improvements don't stop there of course, see Getting Started with Gerbil Development, The Gerbil Universal Binary and Tools, and The Gerbil Build Tool for more details. The package manager has also been greatly enhanced to support a distributed directory model and semantic versioning for dependencies; see The Gerbil Package Manager for more details.Speaking of tooling, we now have a dedicated test running tool which can run your tests in the command line and works similar to
go test
. This has allowed us to greatly increase our development velocity and bring an "always test" mentality to Gerbil development. You no longer have to stand in your head to run your tests, you just write them and run them withgerbil test
.Moving on to linguistic and standard library changes, there is a monumental shift with the introduction of interfaces, which are akin to type-classes and similar to Go's interfaces. In short, interfaces allow us to create facades to complex functionality and complete our object orientation story. See Interfaces in the guide and :std/interface module in the reference documentation.
Introducing interfaces allowed us to bring on the Standard IO Interfaces and completely redefine the way we do IO in Gerbil. This allowed us to rewrite almost everything that touches IO in the standard library, with cleaner and more performant code.
Moving on from IO, the Actor package in the standard library has been rewritten from scratch and brings a simpler and more powerful low level protocol and very important new functionality for managing actor ensembles. See Actors in the guide, the all new Working with Actor Ensembles tutorial, and the :std/actor package in the reference documentation.
Another very important change, also enabled by interfaces, is the full on embrace of openssl3 in the standard library; see TLS/SSL Sockets in the reference documentation. Everything that uses the socket interfaces can also transparently use SSL, with the added ability to upgrade existing sockets after negotiation.
Following that, the httpd can natively serve requests over SSL without needing a front end proxy like
nginx
.Naturally, the request library has been rewriten internally to utilize interfaces, and so has the protobuf package.
We also have completely rewritten WebSockets and SOCKS libraries, now with server side support.
JSON RPC has also become a first class citizen, with both client and server-side support. See JSON RPC in the reference documentation for details.
Other than that, we also have a lot of new code integrated in the standard library, graduating from its gerbil-utils incubation.
We have also refactored out libraries with foreign dependencies that were not built by default into external packages, listed in the mighty gerbils directory. This includes the
libxml
,leveldb
,lmdb
, andleveldb
libraries.And last but not least, we introduced Contracts and Type Annotations. Contracts can be attached to interfaces or enacted by the all powerful
using
macro with the meta-linguistic ability to perform dotted access for interface calls and struct and class accessors and mutators. This greatly reduces boilerplate and makes the code much more pleasant to read. See the Proxies tutorial for the natural progression culminating in theusing
macro.Of course this is just the bird's eye view of the changes; see the release notes for the full changelog pointing to every pr commited in this development cycle.
In conclusion, it is safe t say that at this point Gerbil is approaching production readiness; you should already feel comfortable to use it in production for experimental and non-mission critical projects without fear. See Developing Software with Gerbil for some resources relevant to the software development cycle.
Happy Hacking!
-- the Gerbil Development Team, aka The Mighty Gerbils
Beta Was this translation helpful? Give feedback.
All reactions