Another random thread, where we speak about everything and nothing , because sometimes things are hard to cataloger.

First i want to speak about programming language.

First,first programming languages i don't find interesting.
- Carbon. It's alpha
- Hare. Does not compile
- Swift. If you want UI, GUI Toolkit, you are very very limited to specific environment. No gtk, no fltk, , no qt6.
- Idriss. Only good for mathematical proof stuff. [ If you like theory it's interesting]
- Pony. Does not compile
- Ada. You even cant connect to a database... I don't know how these planes fly without a database. Or do they wright there own wrapper ?

Other,
C-like languages which are interesting. Odin,Nim,zig. Nim has garbage collection.

Between C & C++ , there is dlang, also interesting. It's a middle ground.

Something , else, I modified code from Bjorne Stroustrup, book, Programming principles and practice using cpp, it is written written for Windows & older compilers , now to work for FreeBSD and clang21.
A clone & fix can be found here,

Many of you like C & perl. But feel free to elaborate.
 
Disabling Skia and enabling HW acceleration on Windows LibreOffice was a cool trick; latest surprised me a bit by not allowing it :p

lo.PNG


Changelog covered it though: https://wiki.documentfoundation.org/ReleaseNotes/26.2#Graphics
The Skia graphics engine is now mandatory on both Windows and macOS

Skia/HW-disabled used to take longer to start-up, but it seems instant now with Skia so cool :D
 
Good to see you find some languages not interesting, Alain.
Over time i developed 3 requirements for usefull applications.
1. I must be able to connect to a database, for me my preference is postgresql.
2. I must be able to connect to a GUI toolkit, Qt6 is top art.
3. There must be a functioning language server, same version as the language. I use neovim. And want to see functions,libraries,parameter lists and types needed, as i type.
 
Over time i developed 3 requirements for usefull applications.
1. I must be able to connect to a database, for me my preference is postgresql.
2. I must be able to connect to a GUI toolkit, Qt6 is top art.
3. There must be a functioning language server, same version as the language. I use neovim. And want to see functions,libraries,parameter lists and types needed, as i type.

Well.. I mean you forgot Java :-)....

C and C++ are the obvious winners here. I use CLion and get really good results. For Java there is IntelliJ -- both on the JetBrains web site.

I am not necessarily pluging these for FreeBSD.. but I have had some success with them on FreeBSD. These products definitely perform on Linux.
 
Ok. Ada. Databases. Why in the world would an airframe need to access a database?
Inputs, outputs to controls, best 3 out of 5 guide the delta change in the flaps.

No need for a mysql query.

Garbage collection. That always makes me think "garbage in garbage out" not Memory reclaimation.

To me languages have always been a tool.
What is the problem space? Is it GUI? If yes pick a language that make the pretty stuff easy. If no, pick a language that lets you easily manipulate large datasets.

Kind of like "I need a hammer". First question should be "for what" because "framing a house" gives a different answer from "shaping metal for a motorcycle gas tank".
 
Indeed. And i worked with java, when garbage collector tells, i have no time to work for you to reclaim memory, you have a big problem. In other cases garbage collection, can be fun. No need for deconstructors, manual memory management.
 
Indeed. And i worked with java, when garbage collector tells, i have no time to work for you to reclaim memory, you have a big problem. In other cases garbage collection, can be fun. No need for deconstructors, manual memory management.
-XX:+UseSerialGC ran Runescape better than anything (Parallel, G1, ZGC, Shenandoah; I tried a lot of random stuff to try not use Serial up to Java 25 but it was like a 20 FPS difference :p)
 
Indeed, but can you make it work.
Try once ,
with ADO.Sessions
with ADO.Sessions.Factory
Factory : ADO.Sessions.Factory.Session_Factory
...
Took me hours never been able to make it work...
Not on FreeBSD, not on Linux

If anyone can i'm willing to listen ...
 
Note currently one is supposed to use alire, alr ... This doc is obsolete with current API , & incomplete & unclear.
One needs a "FULL file", and instructions how to compile, not a few snippets in a web page, stating now you are on your own ...
 
Code:
alr init --bin my_db_app
cd my_db_app
alr with ado
alr with ado_sqlite

Code:
with ADO.Sessions;
with ADO.Sessions.Factory;
with ADO.Statements;
with Ada.Text_IO;

procedure Main is
   Factory : ADO.Sessions.Factory.Session_Factory;
   Session : ADO.Sessions.Session;
   Stmt    : ADO.Statements.Query_Statement;
begin
   -- 1. Initialize connection (creates test.db if it doesn't exist)
   Factory.Create ("sqlite:///test.db");
   Session := Factory.Get_Session;

   -- 2. Create a table
   Session.Execute ("CREATE TABLE IF NOT EXISTS users (id INTEGER, name TEXT)");

   -- 3. Insert data
   Session.Execute ("INSERT INTO users (id, name) VALUES (1, 'Ada Lovelace')");

   -- 4. Query data
   Stmt := Session.Create_Statement ("SELECT name FROM users");
   Stmt.Execute;

   while Stmt.Has_Elements loop
      Ada.Text_IO.Put_Line ("User: " & Stmt.Get_String (0));
      Stmt.Next;
   end loop;
end Main;

Trust me this will not run ...

alr with gnatcoll_sqlite
Also does not run ...
 

alr​

On Linux, Alire is simply provided in an archive.
Once the archive is extracted you have to add alr in the environment PATH .This may be done for the duration of a terminal session by running the command below:
$ export PATH=PATH_TO_EXTRACTED/bin/:$PATH
Those wanting to keep this path permanently in their PATH environment may do so by pasting the above command into the .profile file of their user’s account.
Alire provides GNAT toolchains hosted on x86-64 for Linux. If those toolchains do notwork for you, or if you are on another host architecture like ARM, you have the optionto look at the GNAT toolchains from the Linux distribution.
 
AI,
As of early 2025, Alire typically pulls in
GNAT FSF (Free Software Foundation) version 13 or 14 (which supports Ada 2022) as the default compiler.

Key details regarding Alire and Ada versions:

  • Default Compiler: Alire defaults to the latest stable GNAT FSF compilers, commonly GNAt 13.2.1 or 14.x on supported platforms (Linux x86-64, Windows x86-64, macOS).
  • Ada Standards: The GNAT FSF compilers provided by Alire support Ada 2012 and Ada 2022.
  • Toolchain Updates: In early 2024, Alire updated its index to include Release 24.0 of AdaCore libraries, which are built using modern GNAT compilers.
  • Flexibility: While Alire provides default compiler binaries, it allows users to switch to different versions or use system-installed compilers if needed.
Alire 2.0 (released in 2024) is the current standard, which brought major improvements to dependency management and compiler selection
 
There is FreeBSD port,
lang/gnat14
I don't remember good, but i think it comes without alire, and that is now just what you need...
So you can compile a "fibonacci" application , but i did not managed to have any library work.

There is one library,
textproc/xmlada

There are the build tools,
devel/gprbuild
 
I think one needs an alire port for freebsd.
Then alire will build necessary bindings from ADA towards installed C & C++ libraries.

Note, i tried on Linux and came into a dependency hell, where i needed two ADA libraries to function. But these two libraries had the same functions in them and that was conflicting. I never managed to make it work, whatever i tried. I gave up in the end.
 
Back
Top