HN user

Daril

348 karma

I provide IT services as freelancer since 1999. My website : https://speedtech.it

Posts5
Comments85
View on HN

I used Turbo + Stimulus with a CodeIgniter PHP backend. Later, I used an HTMX bot with CodeIgniter and GoLang. Now, I have migrated my second brain web app (Brainminder) from HTMX to Unpoly.

I really liked HTMX, and I thank the authors for this marvelous library!

I switched from Turbo to HTMX because the latter is much more flexible, and I try to avoid Node.js as much as possible, only using it to compile some JavaScript code for Stimulus.

I finally moved from HTMX to Unpoly for the following reasons:

1. Layer support: Unpoly makes it easy to create layers and modal overlays, saving a lot of time and JavaScript code. You can achieve the same functionality with HTMX, but you have to write more code.

2. JavaScript code is better organized thanks to up.compile hooks.

3. HTMX and Unpoly treat fragments slightly differently. With HTMX, you have to use an out-of-band feature to update multiple fragments together. With Unpoly, you can easily add them to the response (and declare them in the front end, of course).

In my opinion, Unpoly has a better-organized approach to everything. On the other hand, apart from the official documentation, it is difficult to find examples for some edge-case features.

I have a miniPC (Minisforum) with Debian as server.

I use : - Syncthing (https://syncthing.net/) to keep the files synchronized between desktops and laptops computers

- Webdav (https://github.com/hacdias/webdav) to access the files on the server via other applications

- Cryptomator (https://cryptomator.org/) to crypt/decrypt sensible directories (that are synchronized through Syncthing) Cryptomator allow me to access also the directories via webdav

- MaterialFiles on Andrid to access the files on the server

I access my mini server from outside with a Wireguard VPN created on my Fritz!Box router.

Between home and office I created a site-to-site Wireguard VPN between the two Fritz!Box routers.

From a security point of view, I am not comfortable giving a user unlimited access to the server. I don't know what solution pgEdge is implementing, but granting full access to the server when it should only operate on PostgreSQL is a security concern for me.

I wanted to try it months ago ... but I stopped when I read in the install documentation :

To configure passwordless sudo, open the /etc/sudoers file, and add a line of the form: %username ALL = (ALL) NOPASSWD: ALL

And the same user should have a password less SSH access with private key ...

Right, but having a unique codebase and one development tool for Linux, Windows and Macos (probably), would help a lot to reduce the effort to maintain the application.

Very good news that the Freepascal version compiles and works correctly also on Windows. As you said, Delphi was a huge barrier to prevent other developers to contribute, but if we can use Lazarus, Heidi can receive a lot of help not only for Linux version but also for Windows one. Probably, thanks to Freepascal / Lazarus, it can be ported easily also to Mac OS now.

Learning C3 1 year ago

Based on this comparison :

https://c3-lang.org/faq/compare-languages/

One would argue that the best C/C++ alternative/evolution language to use would be D. D also has its own cross-platform GUI library and an IDE.

I wonder for which reasons D doesn't have a large base adoption.

HeidiSQL is free software for people who work with databases, and aims to be intuitive to use. "Heidi" lets you connect to a variety of databases, like MariaDB, MySQL, Microsoft SQL, PostgreSQL, SQLite, Interbase and Firebird.

Since some days it is finally available in a native Linux version. The code has been ported from Delphi to FreePascal / Lazarus.

Hi, I know I didn't have time to describe it properly. Currently, I am focusing more on adding features and making it more usable. In simple terms:

1. It is possible to create different types of items: books, ideas, projects, tasks, etc.

2. Every item can have its own custom fields, such as author for a book or priority for a task.

3. All items are stored in a single SQLite table, so you can search through all items and edit them if necessary.

4. Fourth, it is possible to establish relations between items: parent, child, or simple link.

5. There is a space called "Quickbox" where you can quickly register a link or a note to read later and transform it into an item.

6. Items can be part of one or more notebooks, such as Personal, Work, or Family.

I have many ideas to make it more useful, but some basic features are still missing, such as:

1. Attach images or documents to each item and access all the attachments as a separate library.

2. Multi-user support

3. Multilingual support

4. Kanban support for tasks.

The most interesting part for me is adding systems/structures that can help me analyze problems and find proper solutions.

This idea is still vague, but I'd like to implement workflows that can help me become a better thinker, improve my creativity, and enhance my ability to make rational decisions. I'd like to integrate also logic programming in the process, probabily using Prolog.

I don't want to lose the manual aspect of thinking, so I'm considering creating prefilled documents to help study problems and find solutions.

I have used Golang and SQlite on backend and PWA and HTMX on frontend.

I think an PKMS is strictly related to how each of us thinks. It's similar to project management/organizer tools. I also created my own (https://brainminder.it/) based on how I think: I prefer to organize items by type with different fields that I can add and search. Instead of simply collecting ideas and thoughts, I'm trying to build a system that can help me evaluate leveraging what I've entered.

Yes, I understand your point of view, but in my experience these ORM libraries when you create a class or a structure and then the library build the SQL code behind the scenes can suffer from some relevant issues :

1. you have no control over the generated SQL and because it has to be generic and db agnostic, might not be the best option depending on the database you are currently using

2. when something doesn't work as expected, and it happens, they are difficult to debug (too many layers) and find the issue

3. they are extremely inefficient, because they have to dynamically build every time the code is run the corresponding SQL code : I'm sure most would implement some caching mechanism to prevent this , but in any case it's a waste of resources.

This is just anecdotal, but I remember trying SQLAlchemy many years ago for a small Python program I was writing for a RaspberryPi 3 : it was extremely slow. So, I removed the library and used instead the native database binding for MariaDB instead, and the speed improved a lot.

For PHP, the situation is the worst because there is no application server (they exist, but not very widely used), but the code is regenerated every time. This is the main problem in any large PHP project, such as Nextcloud. If they would adopt FrankenPHP or RoadRunner, they could improve the performance of the applications a lot.

I'm not a fan of the complexity added by this and other similar frameworks. PHP and Go are very different languages, so trying to replicate the same concepts for one language to another I don't think it is a good idea.

One of the things I would discard would be the use of an ORM library : every library adds another level of complexity and doesn't allow to see what is happening when the SQL statements are built. In my opinion, it is better to create some simple methods for each object that implement the CRUD operations and build the SQL statements directly.

It is possible to write a web application with GO using only some libraries, for example for routing and authentication.

My favorite place to start is Autostrada : https://autostrada.dev/

It means some lawyer is concerned that Mozilla is in possession of some kind of data that is subject to other regulatory claims in some country.

Well ... they posses our data indeed ? And what ? The passwords should be encrypted and not available to them, Pocket is only a collection of links ... our bookmarks ? If they posses some other data it means they act as a middle man between the keyboard and the site we are visiting ...

"When you upload or input information through Firefox, you hereby grant us a nonexclusive, royalty-free, worldwide license to use that information to help you navigate, experience, and interact with online content as you indicate with your use of Firefox."

Why should I give them the right to read the input I type or the upload I submit through Firefox (for example to a private web application) and use it to help me to do what exactly ?

They want collect the data we insert (private and personal) and sell them to the advertisers or to AI engines.

Exactly, I agree. In fact they declare : "You give Mozilla all rights necessary to operate Firefox, including processing data as we describe in the Firefox Privacy Notice, as well as acting on your behalf to help you navigate the internet.

When you upload or input information through Firefox, you hereby grant us a nonexclusive, royalty-free, worldwide license to use that information to help you navigate, experience, and interact with online content as you indicate with your use of Firefox."

They reserve the right to use every bit of information we type into the browser, which is pretty scary. It means they read and collect every bit of information we input in the browser ... think for example the text we input in a webmail app or in a home banking app ...

Time to switch to LibreWolf and Mullvad Browser.

In my case, privacy is not the main issue because I have been self-hosting almost all my services for many years. It is about what is just, moral and right according to my own principles : honesty, respect, trust and fairness.

I don't want to continue to contribute to making richer companies that try in every possible way to steal data and wealth from their customers and other nations with unfair behavior at the edge (or beyond the edge) of the law.

And if that is not enough to also use every possible way to manipulate the people's beliefs with false claims and evil psychological tactics.

Sure, but the strategy of US companies has been the same for many years.

Take for example Gmail: I remember 10 years ago it was free even for companies up to 100 users, then 50, then 10, then 0... The same with Google Maps, before it was free and later, after reaching a large user base, they changed the terms and above a certain number of visits per month it is a paid service.

Nothing wrong with that of course, but once you are inside their services, they make it really difficult to change providers. It is possible, of course, but in some cases it requires a relevant effort and many prefer to pay after being lured with very different promises.

I recently read the story of how Google took over Yahoo! as a search engine, they used a "Troy horse" ... and when Yahoo! discovered what happened it was too late.

Back to Github and MS ... MS has a very long history of trying to boycott Linux in any way possible (and I also remember what they did to BeOS) ... I think these are very valid reasons not to trust them. They didn't buy GitHub because they're nice and want to help open source ... the first thing they did was kill the Atom IDE. VS is full of trackers,yes it is open source, but also a mean to steal data and information directly from the computer of the developer.

The main problem for me here is the lack of principles, values. The only principle they follow is to try to become overly rich in some way. The US companies have a long history of trying in every legal and almost legal way to avoid paying taxes.

Until a few years ago, Amazon was always in loss in Italy because they transferred the profits (as inflated costs) to their subsidiary in Ireland and the Italian taxpayers gave back every year millions of Euros to Amazon as tax credits. This is not capitalism ...

As someone who has been managing his own servers (and also hosting services for his clients) for many years, I can understand the issues, problems and difficulties that can arise, so I have learned to be much more patient and understanding.

I learned (the hard way) to have a plan b for everything. I'll study an emergency solution in case of a prolonged downtime.

Well, one day MS could shut everything down or charge a lot of money to continue using the services. Almost all open source projects are currently hosted on Github (and rely on their services).

Yes, the code is replicated on thousands of machines around the web, but this concentration of control by a single company is extremely dangerous in my opinion.

The way events are unfolding these days, I'm really worried about what could happen.

Take for example Starlink and Ukraine... The USA threatened to shut down the internet service if Ukraine won't sign the rare minerals deal. A deal that would make Ukraine a colony of USA.