HAC: Web site
Enjoy!
C:\Ada\hac\exm>..\hax -v2 maze_gen.adb
*******[ HAX ]******* Compiler version: 0.061 dated 28-May-2020.
*******[ HAX ]******* Caution: HAC is not a real Ada compiler. Type "hax" for license.
. . . .[ HAX ]. . . . Compiling from file: maze_gen.adb
. . . .[ HAX ]. . . . Compilation finished in 0.000414700 seconds.
. . . .[ HAX ]. . . . Starting p-code VM interpreter...
Height: 15, Width: 24
Starting generation at 7, 12
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
| | | | | |
+ +---+ +---+---+ + +---+ +---+ +---+---+ + + + + +---+---+---+---+---+ +
| | | | | | | | | | | | | | |
+---+ +---+ +---+ + +---+---+ + + +---+---+---+ + +---+---+ + +---+ +---+
| | | | | | | | | | | |
+ +---+ +---+---+---+ +---+ + + +---+---+---+ + +---+ +---+ + +---+---+ +
| | | | | | | | | | | | | | |
+ +---+ + + + + + + +---+---+ + + + +---+ +---+ +---+ +---+---+ +
| | | | | | | | | | | | | | | | | | |
+---+ + + + +---+ + + + + + + + +---+ +---+ + + + + +---+ +
| | | | | | | | | | | | | | | | |
+ +---+ +---+---+ + + +---+ + +---+ + + +---+ +---+---+ +---+ + +---+
| | | | | | X | | | | | | | | |
+ + +---+---+ +---+---+ + +---+---+ + + + + + +---+ +---+ +---+ + +
| | | | | | | | | | | | | | | | |
+ +---+ + +---+---+ +---+---+---+ +---+---+ +---+ +---+ +---+---+ + + + +
| | | | | | | | | |
+ + +---+ + +---+---+ +---+---+---+ + +---+ + +---+---+ +---+---+---+---+ +
| | | | | | | | | | | | | | |
+ + + + + + + + + + +---+ + + +---+---+---+ +---+---+---+---+ +---+
| | | | | | | | | | | | | |
+---+ + + +---+---+---+---+ +---+ +---+ + + + + +---+---+---+---+ +---+ +
| | | | | | | | | | | | |
+ +---+---+---+ +---+---+ +---+ + + +---+ +---+ +---+---+---+ +---+---+ + +
| | | | | | | | | | |
+ + +---+---+---+---+ +---+---+---+ +---+---+---+ + +---+---+---+---+ +---+---+ +
| | | | | | | | | | | | |
+ + + + + + + +---+ + +---+---+---+ + +---+---+---+ +---+ + +---+ +
| | | | | | | |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
-------[ HAX ]------- VM interpreter done after 0.080759500 seconds.
C:\Ada\hac\exm>
HAC VM: raised Constraint_Error
Out of range
Trace-back locations:
exception_04.adb: Exception_04.Nest.NTF.Add_n_shift.Shift_n_add at line 18
exception_04.adb: Exception_04.Nest.NTF.Add_n_shift at line 23
exception_04.adb: Exception_04.Nest.NTF.Add_n_shift.Shift_n_add at line 16
exception_04.adb: Exception_04.Nest.NTF.Add_n_shift at line 23
exception_04.adb: Exception_04.Nest.NTF.Add_n_shift.Shift_n_add at line 16
exception_04.adb: Exception_04.Nest.NTF.Add_n_shift at line 23
exception_04.adb: Exception_04.Nest.NTF.Add_n_shift.Shift_n_add at line 16
exception_04.adb: Exception_04.Nest.NTF.Add_n_shift at line 23
exception_04.adb: Exception_04.Nest.NTF.Add_n_shift.Shift_n_add at line 16
exception_04.adb: Exception_04.Nest.NTF.Add_n_shift at line 23
exception_04.adb: Exception_04.Nest.NTF at line 27
exception_04.adb: Exception_04.Nest at line 34
exception_04.adb: Exception_04 at line 42
GNAT's output on the same program is: raised CONSTRAINT_ERROR : exception_04.adb:18 range check failed
[C:\Ada\hac\test\exception_04.exe]
Exception_04.Nest.Ntf.Add_N_Shift.Shift_N_Add at exception_04.adb:18
Exception_04.Nest.Ntf.Add_N_Shift at exception_04.adb:23
Exception_04.Nest.Ntf.Add_N_Shift.Shift_N_Add at exception_04.adb:16
Exception_04.Nest.Ntf.Add_N_Shift at exception_04.adb:23
Exception_04.Nest.Ntf.Add_N_Shift.Shift_N_Add at exception_04.adb:16
Exception_04.Nest.Ntf.Add_N_Shift at exception_04.adb:23
Exception_04.Nest.Ntf.Add_N_Shift.Shift_N_Add at exception_04.adb:16
Exception_04.Nest.Ntf.Add_N_Shift at exception_04.adb:23
Exception_04.Nest.Ntf.Add_N_Shift.Shift_N_Add at exception_04.adb:16
Exception_04.Nest.Ntf.Add_N_Shift at exception_04.adb:23
Exception_04.Nest.Ntf at exception_04.adb:27
Exception_04.Nest at exception_04.adb:34
Exception_04 at exception_04.adb:42
Main at b__exception_04.adb:294
procedure SD3 is
begin
for I in 1 .. 3 loop
declare
type T1 is new Integer range 1 .. I * 5; -- I is dynamic
subtype T2 is T1 range 1 .. T1 (I);
type T3 is array (1 .. 2 * I) of T2;
type T4 is array (1 .. 3 * I) of T3;
B: T4;
begin
null;
end;
end loop;
end;
x : array (False .. True) of Integer;
x : array (Boolean) of Integer;
for b in Boolean loopAs an illustration, here is an excerpt of the before/after comparison on one of the HAC examples:
x (b) := ...
end loop;
Click to enlarge |
New menu entry: Code sample (click to enlarge image) |
Sample selector (click to enlarge image) |
Enron didn't rely on huge "bet-the-company" gambles to create growth. Each step was a manageable investment that built on established capabilities and offered the potential to add new ones.
A company need not possess strengths in all areas of a business—just in the areas important to making money. Growers distinguish between attributes that garner value and those that are simply necessary to play the game. Enron became a world leader in international private power generation because it saw that profit did not depend on construction and operation skills, but on deal structuring and risk allocation.Anyway. Here are some new key additions to the CBSG, put in practice:
One thing about talent retention is clear: reputation and resiliency turbocharge a values-based market practice.Probably, if we search for "wirecard double-digit growth" we'll find some fresh stuff for the CBSG...
One thing about data practices is clear: delivery framework, competitive differentiator and solution boost architectures.
The Digital Marketers create strategic options and opportunities across geographies.
The pioneers create strategic options and opportunities going forward.
Opting out of reorganizations is not a choice, while the team players create new business options.
A profit-maximizing portfolio shaping 24/7 reenergizes a motivational onboarding solution. As a result, the team players create new business options.
Trending your numbers should carve a competitive position.
The point is not merely to carve a competitive position. The point is to reinvest in a high-grade footprint.
The team players preempt competitors by thinking outside of the box.
High-performance benchmarkings challenge us to preempt competitors.
The group facilitates our value-chain without pre-empting or constraining future flexibility.
The key representatives improve top-line talents without pre-empting or constraining future flexibility.
The challengers co-specify cross-platform, bifocal, evolutions.
The resources formulate a non-linear, bifocal and hyper-hybrid business equation.
Fully networked, company-first, industry market shifts challenge us to front-face bifocal value propositions.
Cross-pollinations deepen a manageable brand value.
The white-collar workforce potentiates manageable efficient frontiers.
Manageable portals motivate the market thinker.
The tolerably expensive, innovative, digital acceleration interacts with our distinctive workflows.
The decision makers strengthen distinctive swim lanes.
The enablers take control of structured, distinctive, organizational and high-level visibilities.
Click to enlarge |
Latest commit to the Corporate Bullshit Generator (live web app - source site 1 - source site 2): only one addition, but which one!
[prompt] produce_corporate_bullshit -h
Options:
-1, --one, --sig single sentence
-b, --bulk EXPR infinite loop; shows only sentences with EXPR
-h, --help this help
-w, --workshop workshop format
[prompt] produce_corporate_bullshit -b "together, we"
Together, we synergize a workforce-focused, deterministic, global touch-base.
Together, we prioritize well-implemented accelerators.
Together, we solutionize profiles.
Together, we execute on priorities.
Together, we enhance game-changing strategic staircases.
Together, we identify known unknowns.
Together, we facilitate our competitive success.
Together, we whiteboard outward-looking challenges.
Together, we create momentum.
The latest addition to Zip-Ada (commits #792 to 794) is the possibility of writing contents to a Zip file (or more generally, a Zip stream) as an output stream. You (the programmer) don't need to store contents into some buffer and design an input stream in the Zip_Streams.Root_Zipstream_Type'Class type class to read that buffer, as it is the case for Add_Stream in the Zip_Create package.
How does new output stream work in practice? The best way is to show an example. Here is a reduced version of Test_Zip_Entry_Stream (you can find the full version in the test directory of the Zip-Ada project's sources):
with Zip.Create;Enjoy!
with Ada.Command_Line, Ada.Text_IO;
procedure Test_Zip_Entry_Stream is
use Zip.Create;
use Ada.Command_Line, Ada.Text_IO;
Archive_Info : Zip_Create_Info;
Archive_File : aliased Zip_File_Stream;
Archive_Entry : aliased Zip_Entry_Stream_Type;
Text : File_Type;
begin
Create_Archive (Archive_Info, Archive_File'Unchecked_Access, "test_zes.zip");
for I in 1 .. Argument_Count loop
Open (Archive_Entry);
Open (Text, In_File, Argument (I));
while not End_Of_File (Text) loop
String'Write (Archive_Entry'Access, Get_Line (Text));
Character'Write (Archive_Entry'Access, ASCII.LF); -- UNIX end-of-line
end loop;
Close (Text);
Close (Archive_Entry, "zes_" & Argument (I), use_clock, Archive_Info);
end loop;
Finish (Archive_Info);
end Test_Zip_Entry_Stream;
You want to copy your Thunderbird profile from machine A to machine B (with all mail accounts, passwords, settings, feeds, newgroups, ...) ? Actually it is very easy. From the user storage (on Windows, %appdata% (you get there with Windows key+R and typing %appdata%)), you copy the entire Thunderbird folder of machine A to the equivalent location on machine B, and that's it. The new active profile will be automatically selected since the file profiles.ini will be overwritten on the way.
Now, if you want or need to use a cloud drive or a USB stick for the operation, it's better to wrap everything in a Zip file (a single file instead of hundreds) to save time. Plus, you can store the Zip file in case of an emergency (losing data on both A and B machines).
With AZip, it's pretty easy:
That's it!
Here a few screenshots:
Folder tree view - click to enlarge |
After recompression - click to enlarge |
Audacity is a free, open source, audio editor, available here.
If you want to backup you Audacity project, you can manually do it with "Save Lossless Copy of Project..." with the name, say, X, which will create X.aup (project file), a folder X_data, and, in there, a file called "Audio Track.wav".
Some drawbacks:
A solution: Zip-Ada.
The latest commit (rev. 796) adds to the Preselection method a specific configuration for detecting Audacity files, so they are compressed better than with default settings.
Funny detail: that configuration makes, in most cases, the compression better than the best available compression with 7-Zip (v.19.00, "ultra" mode, .7z archive).
The compressing process is also around twice as fast as 7-Zip in "ultra" mode. This is no magic, since the "LZ" part of the LZMA compression scheme spends less time finding matches, in the chosen configuration for Zip-Ada.
A backup script could look like this (here for Windows' cmd):
rem --------------------------
rem Nice date YYYY-MM-DD_HH.MM
rem --------------------------
set year=%date:~-4,4%
set month=%date:~-7,2%
if "%month:~0,1%" equ " " set month=0%month:~1,1%
set day=%date:~-10,2%
if "%day:~0,1%" equ " " set day=0%day:~1,1%
set hour=%time:~0,2%
if "%hour:~0,1%" equ " " set hour=0%hour:~1,1%
set min=%time:~3,2%
set nice_date=%year%-%month%-%day%_%hour%.%min%
rem --------------------------
set audacity_project=The Cure - A Forest
zipada -ep2 "%audacity_project%_%nice_date%" "%audacity_project%.aup" "%audacity_project%_data\e08\d08\*.au"
Just in time to celebrate the 25th anniversary of Windows as we know it (ouch!), here is a gadget-ish contribution to the GWindows library, the open-source Ada library for MS Windows, available here and here.
In there gwindows/contrib directory, there is gwin_util.ads (spec.) and gwin_util.adb (body), and in gwindows/contrib/test, there are demos. All that is available comfortably through the gwindows_contrib.gpr project file in the gwindows directory.
New release (2.40) of AZip.
The long-awaited Windows Explorer integration is there:
| |||
Context menu for a file |
Context menu for a folder |
This integration is activated upon installation or on demand via the Manage button:
Configuration |
This new version is based on the Zip-Ada library v.57 and includes its recent developments.
Enjoy!
After Ada.Calendar-like subprograms, here are now Ada.Directories-like subprograms which facilitate shell scripting with HAC in a portable way.
As usual, the easiest way to see the full set of additions is to look into HAC_Pack's specification, hac_pack.ads:
function Current_Directory return VString;HAC is free and open-source, you can find it here and here.
procedure Set_Directory (Directory : String) renames Ada.Directories.Set_Directory;
procedure Set_Directory (Directory : VString);
procedure Copy_File (Source_Name : String; Target_Name : String);
procedure Copy_File (Source_Name : VString; Target_Name : String);
procedure Copy_File (Source_Name : String; Target_Name : VString);
procedure Copy_File (Source_Name : VString; Target_Name : VString);
procedure Delete_File (Name : String) renames Ada.Directories.Delete_File;
procedure Delete_File (Name : VString);
function Exists (Name : String) return Boolean renames Ada.Directories.Exists;
function Exists (Name : VString) return Boolean;
procedure Rename (Old_Name : String; New_Name : String) renames Ada.Directories.Rename;
procedure Rename (Old_Name : VString; New_Name : String);
procedure Rename (Old_Name : String; New_Name : VString);
procedure Rename (Old_Name : VString; New_Name : VString);