DWScript now compatible with Delphi 11

Just pushed a few changes to the DWScript repository for compatibility with the just released Delphi 11 Alexandria.

The only change required was related to a fix of the Delphi compiler, which now properly has integer overflow checks controlled by $OVERFLOWCHECKS while they were previously controlled by $RANGECHECKS.

I also added support for the Delphi 11 dialect for binary literals (starting with %). DWScript already supported binary literals with the “0b” prefix since 2012 (as in C), I had been hoping the % symbol would not be sacrificed for this purpose, but oh well. (more…)

Nested types in DWScript

Just a word of warning about a recent commit that added support for nested types in DWScript.

This support is at the moment only enabled in class declarations, and very minimally tested, a lot more testing is required – and welcome 🙂 – before it can be considered safe to use, and extended to other type declarations.

The related code should only kickoff if a “type” keyword is encountered in a class declaration (which would previously be reported as an error), so the change should be innocuous to existing code.

SQLite as a no-SQL database

SQLite offers through its JSON1 extension a lot of capability. Generating JSON outputs from SQL, even complex structured, multi-level JSON is very straightforward.

But what about the opposite use case ? When you have store data as JSON in an SQLite database, and you want to search or filter it ? This is a short exploration of what to expect.

(more…)

Boosting Intel laptop battery life

We all need more battery life, and for quad-core i7 & i5, a simple way to gain more battery is to simply turn off extra cores.

This little setting for Windows 10 made a whole world of difference in my experience, with battery life literally doubled on my core i7, and almost 50% gains on another i5 laptop.

Disclaimer: instructions that follow are for advanced users: if you do not understand the instructions, best give up than mess your machine. For all I know, if you misstep, you may end up blowing up a hole in reality and destroy the universe. You’ve been warned.

(more…)