Readit News logoReadit News
AsthmaBoy commented on MonsterUI: Python library for building front end UIs quickly in FastHTML apps   answer.ai/posts/2025-01-1... · Posted by u/indigodaddy
AsthmaBoy · 3 months ago
Back in the day, around 1998/1999, Oracle had tools to develop Web-applications served directly from the database.

To produce HTML one would use a variety of PL/SQL functions, one function for each HTML tag that was available at the time.

The result was that each time I had to correct a spelling error, or change a portion of the page, I had find in the code where the change was to be applied, change the code, recompile the package, and then restart the service to have the changes come into effect.

Combine it with the fact that the code written was always much more verbose that writing straigth HTML, it got really old, really fast.

In the end, I created a micro-CMS where I put the HTML code as snippets in the database that I then combined in PL/SQL to form a page that could be served to a browser.

Changes appeared on the fly as I updated the HTML snippets, and the service had no downtime due to restarts.

Not long after, we moved to using Zope to develop more advaced solutions, but thats another story.

Now, this was a long time and 2 jobs ago :), but I am curious as to why in 2025, one would prefer to go to return these types of solutions.

AsthmaBoy commented on My Impressions of Gleam   snarky.ca/my-impressions-... · Posted by u/ingve
dartos · 7 months ago
The article is fine, but I have one serious concern.

How on earth do you prefer tabs to curly brackets?!?!

AsthmaBoy · 7 months ago
I like to structure my code as an outline.

Helps readability, quick visual hint of structure and i don't have to keep track of open-end brackets.

Though i much prefer spaces to tabs.

AsthmaBoy commented on Bug squash: An underrated interview question   blog.jez.io/bugsquash/... · Posted by u/jez
AsthmaBoy · a year ago
I like this approach. We did something similar, but for a position as support engineer, where coding ability was one of the requirements, though not the only one.

They were given a piece of code on a toy, easy to read, english-like pseudo-language, and were asked to examine it and explain what the output to a specific input would be.

They were told that we would answer any question, except what the answer was or what the code was doing, and encouraged them to explain their reasoning as they went ahead.

We wanted to asses the candidates ability to problem solve, communicate, how would they react under preassure, and how they approached the issue.

We were not necessarily looking for perfect answers, we rather rated the candidates willingness to ask for help when stuck, how well they communicated while doing the task, whether they tried different approaches, their ability to grasp what an unknown piece of code was doing and so on... all important properties for a role supporting mission critical solutions with near to zero down-time requirements.

Our reasoning was that technical knowledge is easy to acquire over time, but problem solving skills, how candidates tackle difficult and unknown challanges were more important for the role.

In my current role I try to design interview questions like that, looking both for the candidates current skills as well as their future potential.

Not easy, but IMHO more rewarding for us and them in the long run.

AsthmaBoy commented on Ludic: New framework for Python with seamless Htmx support   github.com/paveldedik/lud... · Posted by u/paveldedik
rmbyrro · a year ago
I don't know, every time I see people sneaking html into Python feels weird and wrong to me...
AsthmaBoy · a year ago
I agree and I don't fully understand the why of it.

I remember coding PL/SQL to emmit HTML in Oracle around 1999 or 2000 and using functions to code the various elements.

That got old and repetitive very quickly - for instance, everytime I had to correct a spelling error, I had to recompile the code.

To get around it I used one or two tables to hold html snippets to decouple the business/backend logic from the frontend, and stopped using the PL/SQL functions completely.

My speed of developmet skyrocketed, and separating and abstracting the frontend from the backend made so much sense.

A few years later, I was doing web developemt with Python using the Zope framework (not many people know about it tiday, I think).

It uses a specialised serverside templating language called TAL (Template Attribute Language)[1] that basically builds the front end dynamically, and then you feed it data from the backend.

Very neat and allowed me to build reusable compoments as well as collections of a schema definition (basically a dict), html template(s) and the code to validate that the input matched the schema and could be rendered.

Or something like that - its been 2 employers and almost 20 years since I worked with that :)

I did build a small extension for Wordpress using a PHP implementation[2] of TAL a few years ago, and TAL still works like a charm :)

My point is that I still believe there is value in keeping python out of the html-templating, and in keeping the front end logic apart from the backend logic.

There is something I am not understanding about the renewal of mixing HTML/GUI template with code, but I haven't fully found it yet.

[1] https://en.m.wikipedia.org/wiki/Template_Attribute_Language

[2] I believe it was this one https://phptal.org/

AsthmaBoy commented on Neal Stephenson was prescient about our AI age   theatlantic.com/technolog... · Posted by u/Rant423
batch12 · 2 years ago
I'll probably get roasted for this, but-

After reading all the love here for Stephenson here for years, I went and bought a few books (snow crash, diamond age, etc), intending to power through them. I am a pretty avid reader when I am in the mood and enjoy fiction including sci-fi, fantasy, *punk, etc. I couldn't get through Snow Crash. It didn't feel like a finished book to me. If I remember correctly it seemed like things like river names had placeholders and even saw some errors in the text. What am I missing?

AsthmaBoy · 2 years ago
One or two decades ago I read on some newsgroup on the internet (and having experienced it myself), that Neal Stephensons storylines never actually
AsthmaBoy commented on Winlator: Android app that lets you to run Windows apps with Wine   winlator.org/... · Posted by u/davikr
stefanyas · 2 years ago
Wine on Linux desktop runs an older version of Reason okish, I believe. I never tested that, just read somewhere. But if you wanna run, say, Reason 12, I don't think it works very well.
AsthmaBoy · 2 years ago
AsthmaBoy commented on Templ: A language for writing HTML user interfaces in Go   github.com/a-h/templ... · Posted by u/nalgeon
AsthmaBoy · 2 years ago
Here is an example of an old technology

TAL -Template Attribute Language

https://en.m.wikipedia.org/wiki/Template_Attribute_Language

which happens to have an (also old) implementation i Go https://github.com/owlfish/tal

I wonder what opinion HN has on this type of templating language?

AsthmaBoy commented on Relative shell script includes with realpath on FreeBSD   patmaddox.com/doc/trunk/w... · Posted by u/signa11
AsthmaBoy · 2 years ago
Wouldn't

  readlink -f $0
work to get the actual location of the script, and from there get the base for relative scripts?

AsthmaBoy commented on Contiki – OS for networked, memory-constrained systems   en.wikipedia.org/wiki/Con... · Posted by u/JNRowe
AsthmaBoy · 3 years ago
Would love to be able to run this on "junk" hardware, say, a super old, 32-bit obsolete Netgear router, etc.

Not necessarily for networking purposes, but just to be able to leverage the hw for fun.

Though a Contikibased router OS/OpenWRT clone would be awesome!

u/AsthmaBoy

KarmaCake day16December 20, 2022
About
meet.hn/city/se-Gothenburg
View Original