Tuesday, May 26, 2026

Using Emacs as editor for SBCL

Using Emacs as editor for SBCL on Windows 10

Emacs is installed in C:\emacs, using version 30.2. I run it using C:\emacs\bin\runemacs.exe.

SBCL version 2.6.4 (sbcl-2.6.4-x86-64-windows-binary.msi) is installed in C:\Program Files\Steel Bank Common Lisp
  1. Install Sly package manager in Emacs
  2. M-x package-refresh-contents
    M-x package-install RET sly RET
    
  3. Create or edit ~/.emacs.d/init.el
  4. Edit or replace contents like below
  5. Restart Emacs
  6. Load Sly
  7. M-x sly RET
    
Note: Verify that you are not using ~/.emacs, otherwise it will not load configration from ~/.emacs.d/init.el Below shows SBCL loaded.

Tuesday, January 27, 2026

Zig basic Windows application using win32 API

Zig basic Windows application using win32 API

Info:
OS: Windows 10 IoT LTSC 2021
Zig: 0.15.2

Sample application using zigwin32, Windows API to create basic window that does nothing. It calls the following win32 API functions:
- LoadCursorW
- RegisterClassW
- GetLastError
- CreateWindowExW
- ShowWindow
- GetMessageW
- TranslateMessage
- DispatchMessageW
- DefWindowProcw
And windows WindoProc function for pumping messages.

Create a Zig application, like:
PS C:\prj\> mkdir hellowindow
PS C:\prj\> cd hellowindow
PS C:\prj\hellowindow> zig init
Modify build.zig to add zigwin32. See lines 86-91 in gist below. Update src/main.zig to look like below. Checkout zigwin32 into the root of the project
PS C:\prj\hellowindow> git clone https://github.com/marlersoft/zigwin32 libs/zigwin32
Now do a build:
PS C:\prj\hellowindow> zig build
Or do a release build that produces the smallest binary:
PS C:\prj\hellowindow> zig build -Doptimize=ReleaseSmall

Demo how to use zigwin32 in your zig application

Demo how to use zigwin32 in your zig application

Create a Zig application, like:
PS C:\prj\zigwin32test> zig init
Modify build.zig to add zigwin32. See lines 68-72 in gist below. Update src/main.zig to look like below. Checkout zigwin32 into the root of the project
PS C:\prj\zigwin32test> git clone https://github.com/marlersoft/zigwin32 libs/zigwin32
Now do a build:
PS C:\prj\zigwin32test> zig build run
Reference:
https://github.com/myZig/zigwin32test

Thursday, January 01, 2026

Fedora 42 Workstation installation screen capture

Just an itch, wanted to see how Fedora 42 Workstation looks like. For other versions see here

Error opening directory '/media/sf_C_DRIVE': Permission denied

I tried to share a folder from Windows 10 host to Kali 2020.1 Linux guest using VirtualBox but I am getting the following error message:

Error opening directory '/media/sf_C_DRIVE': Permission denied

To fix, do:
$: sudo adduser $USER vboxsf
Then log-off then log back in. If this does not work, reboot the VM

Getting similar issue using Fedora 33 on VirtualBox 7.0.12 (tested up to Fedora 41 [VBox 7.2.4]) , below is the error message
This location could not be displayed You do not have the permissions necessary to view the contents of "sf_D_DRIVE"
To fix do the following and reboot the VM.
$: sudo usermod -a -G vboxsf $USER
Refs:
https://stackoverflow.com/questions/26740113/virtualbox-shared-folder-permissions

Using Emacs as editor for SBCL

Using Emacs as editor for SBCL on Windows 10 Emacs is installed in C:\emacs , using version 30.2. I run it using C:\emacs\bin\runemacs.exe ...