About Me

Michael Zucchi

 B.E. (Comp. Sys. Eng.)

  also known as Zed
  to his mates & enemies!

notzed at gmail >
fosstodon.org/@notzed >

Tags

android (44)
beagle (63)
biographical (104)
blogz (9)
business (1)
code (77)
compilerz (1)
cooking (31)
dez (7)
dusk (31)
esp32 (4)
extensionz (1)
ffts (3)
forth (3)
free software (4)
games (32)
gloat (2)
globalisation (1)
gnu (4)
graphics (16)
gsoc (4)
hacking (459)
haiku (2)
horticulture (10)
house (23)
hsa (6)
humour (7)
imagez (28)
java (231)
java ee (3)
javafx (49)
jjmpeg (81)
junk (3)
kobo (15)
libeze (7)
linux (5)
mediaz (27)
ml (15)
nativez (10)
opencl (120)
os (17)
panamaz (5)
parallella (97)
pdfz (8)
philosophy (26)
picfx (2)
players (1)
playerz (2)
politics (7)
ps3 (12)
puppybits (17)
rants (137)
readerz (8)
rez (1)
socles (36)
termz (3)
videoz (6)
vulkan (3)
wanki (3)
workshop (3)
zcl (4)
zedzone (26)
Tuesday, 12 March 2024, 00:22

Domain Change

I got the .space domain because it was cheap but now it's jumped significantly in price ... so i'm going to attempt to move to zedzone.au.

This might upset things for a little while but so be it, it's not like this is a heavily trafficked site.

Tagged zedzone.
Thursday, 26 October 2023, 00:12

More Legs

Tomorrow will be 7 weeks since I had the hip operation. It's been one of those "I can't believe it's been 7 weeks, but shit a lot has happened" periods.

They told me not to put more than 10kg weight on the operated leg for 6 weeks - but after 3 weeks of bloody crutches I gave that idea the flick. A couple of days I walked all the way into/out of the city - about 10km round trip - entirely on crutches but it just seemed absurd. About a week using a walking stick but then my hand started going numb so I mostly just hobbled around after that. After 5 weeks I got on the bicycle. At the 6 week mark I had a review and the surgeon was very pleased with my progress but I was miserable with the ongoing pain and news of lifelong movement restrictions. I'm seeing a physio on Monday so hopefully I can get a better idea of what they are, plus maybe some exercises and guidance on "overdoing it". So far the directions have been vague and pretty useless although the surgeon did say I could get on the bike again (which I had already obviously).

Mostly i'm just frustrated as fuck at this point. The pain is taking a long time to recede, it hurts to sit, it hurts to lie on my back or operated side - and well even the non-operated one. This is intefering with my sleep which was already shithouse. It hurts to sit playing playstation or drinking beer, it hurts afterwards if i ride too much, walk too much, stand too much. It's difficult and painful to tie my shoelaces or cut my nails. OTC painkillers don't really do much - hell even when I was in the hospital it took 20mg of oxycodone to do anything and they thought I was a junkie or something. As far as I know i'll never be able to sit cross-legged on the floor ever again - maybe that seems trivial but what am I suppose to do, carry a fucking chair everywhere I go? How do I do my go-to hamstring stretch when my back gets too stiff?

So i've been walking a lot anyway - it seems to help with the pain to some extent. At the 6 week mark I started back on situps and pushups - at least I can do those. Riding a bit when the weather is good.

But mostly i'm drinking way too much and with the lack of sleep being moody and sulky and feeling lonely and depressed - so pretty much like every other spring.

One of my main haunts closed down - arsehole landlord in dispute with his daughter even though the business was keeping things in the black. With 4 weeks notice for everyone it was pretty shit. I managed to make it to the closing even on crutches but it's left quite a hole in the community and a hole in my heart every time I walk past.

And one of my nephews was recently in an absolutely horrific car accident - ute rolled end on end and he was thrown 15 metres from the vehicle. By all measures he should be dead but somehow he's still physically alive but his brain ... well things are bad. His eyes open but nobody's home, he can't breathe or eat without tubes. I just hope his needless suffering isn't extended by his idiot father and stempother (they're "preppers") who think he needs to be kept alive at all costs and it turns into another Terri Schiavo indicdent. That's if the pneumonia doesn't do him in soon.

Tagged biographical.
Sunday, 03 September 2023, 09:24

THR coming up

For various reasons it's been a fairly involved few months but now life is back to anhedonia, insufficient sleep, and excess alcohol. But in 5 days that all changes again as i'm finally going under the knife for a total hip replacement on my left leg.

I'm resigned to it but still anxious as fuck and well just super-pissed off that I need to have it done all from a nothing accident 3.5 years ago. It'll be a couple of months before I can even think of getting on a bicycle again which is somewhat limiting as that is my main mode of transport apart from walking.

By pretty much pure chance a niece wants to move to Adelaide so is coming to stay with me for a bit - she can help with the basic day to day stuff that I might not be able to do for a few weeks. There aren't any real insights on how long it might take to recover enough to get around, cook, and clean so I will just have to see how it pans out for me.

I didn't drink for July (moral support for a friend at the time) and lost a bit of weight and spent a bit more effort on getting as fit and strong as possible before the operation so physically i'm about as prepared as i'm likely to be.

Mentally and emotionally i'm a bit of a wreck but oh well, one day at a time.

Tagged biographical.
Tuesday, 09 May 2023, 03:21

Life and Legs ...

So life has been bumbling along. I spent too much of our piss-weak summer blowing money on booze, had a few fun times I guess but i'm getting pretty over it. Summer was too cold and windy for the most part so I only went for a few longish rides, and I think only went for a dip at the beach a couple of times.

Despite all the booze and lack of cycling I did a lot of walking and got fairly fit and trim. But my broken hip is causing a lot of pain now, the joint has gone necrotic and walking irritates it. I just keep pushing through the pain as I'm trying to ensure it's as strong as possible by the time I have a total hip replacement - I don't have an exact time but it should be within a few months. I had to get an infected tooth ripped out in preparation last week and that's still bothering me but I suppose it should heal up soon. One expensive hole in my mouth after a root canal cracked plus I got it taken out under anaesthetic.

Turned 50.

YaY.

Still not working.

I feel pretty burnt-out even after 2.5 years of non-work. But it is becoming pretty boring having a whole day to fill day after day. I spent a lot of time in the garden this year but there's only so much time that can sink.

I'm a bit sick of going to the pub. Plus I gotta cut down the grog before my hip op.

But it's my only regular social contact, so it's either that or nothing. Fuck. I have too much anxiety to interact in online communities very much, hell sometimes I can't even read SMS's from friends.

So I've been somewhat depressed lately. A lot of that is no doubt the impending hip operation and dealing with the infected tooth, but really i'm so fucking lonely and see no way out of it. I find it incredibly difficult getting close to people although i yearn for it deeply. I get hit on by women at the pub occasionally and at best just feel puzzled (or annoyed) and at worst panic and freeze up.

I'm forever sleeping miserably and usally wake up abougt 4 hours after going to sleep and then stay awake many hours before perhaps nodding off here and there. The pain from my hip (and now tooth) is partly to blame now. Nothing interests me at the moment, I do a bit of hacking or play some games or lurk on reddit but it just feels like i'm going through the motions burning up time until I can have another shitty sleep and repeat it all again. I have the odd enjoyable get together with mates (typically at pub) but small things can set me off and get me down for days particularly if I over-do it on the booze. Finding it harder to get into conversations and often feel I don't belong.

I've been reading a lot, mostly fantasy and some sci-fi. It's an escape, although sometimes even that upsets me.

Tagged biographical.
Tuesday, 09 May 2023, 03:05

Compilering

So a few months ago Xyhpoid contacted me about the work I did on Dusk some time ago to see if I still had the source. Indeed I did, but I hadn't touched it for 10 years, left it in a half-arsed state, and can't remember much of where it was at or what I wanted to do with it.

Still, at the moment i've got a lot of time on my hands and not much to do with it so I started poking around again. Amongst some minor phaffing about I decided to look at writing a compiler for the dusk script language that compiles directly to the JVM.

It's been a somewhat interesting exercise, from parser for a custom language to generator for class files. A probably goal is to create a new dusk script - it will be something like a relaxed java but with more security by limiting access to classes and functions via white-lists.

Apart from something interesting to play another motiviator is the dropping of nashorn from the OpenJDK. I did a quick survey of extant JVM languages looking for something sutiable but despite a proliferation in the earlier days of Java most have been abandonded, and even those that haven't haven't updated to handle the java modules system or the deprecation for removal of SecurityManager. Another problem is that most give unfettered access to the whole JDK in one way or another which isn't acceptable for my use case.

Anyway some of the exploratory work is going on in the compilerz project. There is also some work going on in duskz but i haven't pushed it stream yet.

Tagged compilerz, dusk, hacking.
Tuesday, 09 May 2023, 03:00

JDK 20, foreign-abi

Finally updated the foreign-abi branch of nativez, zcl, and jjmpeg to the OpenJDK 20 API for foreign native access. It's very much untested and probably buggy but it compiles and a few things run so it should be on the right track at least.

Most of the changes were pretty straightforward and some of the API changes simplified a few things.

It was mostly a learning exercise to find out what has changed in the API but I thought I may as well do them all at the same time. I'm sort-of more interested in vulkanz but it's been so long since I worked on it I've forgotten where I was at. So maybe i'm not that much interested in it!

Tagged jjmpeg, nativez, zcl.
Saturday, 11 February 2023, 06:28

Cancelled FSF membership

So after 15 years of financial support I decided to end my Free Software Foundation membership this year, I think it expired officially yesterday.

There are a few reasons but none are any reflection on the FSF as an organisation.

Primarily it's because i'm not working at the moment as mentioned in previous posts. I'm not struggling financially or anything but need to consider my budget. I more or less got the membership as a birthday present to myself one year and i'm about to turn 50 in a few days so it seems like a good time to consider the future a bit more closely.

A lesser part is that it's an organisation based in the USA and their political action is necessarily focused there - given i'm in Australia it has a fairly weak impact locally.

I also feel (rightly or wrongly) that when I joined the focus of the FSF was primarily on the GNU project - i.e. the software required to achieve their political goals, and now the focus is more on the political side of software freedom in general. I acknowledge this is reflecting a change in the software and political atmosphere over the last few decades; and further something that needed to happen. However I think my time and resources would be better spent elsewhere.

I guess I also think $US 3500+ was a pretty significant amount of money and I think i've more than done my part as a lowly pleb of a private citizen given there are multi-billion dollar corporations who owe their existance to what the GNU project has wrought.

Tagged biographical.
Monday, 05 December 2022, 03:27

Formatting menus

Update 1/20/2023: So the bar manager decided to try to use it, but in the end gave up. Chrome has a rendering bug in print media that pushed the gin list to the next page immediately after the title. Given the css and html is so simple there isn't anything I could do to fix it. Even without that the process of generating HTML, then printing to PDF, then running it through a bootklet generator before finally sending it to the printer is just too much hassle.

I was at the pub a few weeks ago and saw the bar manager updating the drinks list. The process seemed tedious and error prone, he seemed to be positioning page elements by hand, so that alterations required more work. I don't even know what software he was using - he later mentioned google docs but it would have to have been the slideshow program because none of the others work like that. Looking closer at the menu there were multiple formatting issues - inconsistent margins, indenting, even a few typos ("Rosè" being the most onerous).

Seemed there should have been a better way ...

But after working on the problem quite a bit over the last few weeks i'm not sure there really is. I have some solutions but they require different skills to use.

Latex2ε

My first thought was using latex to generate the menu. I've played with it over the years but never used it much so it took a bit of trial and error but eventually I came up with something that worked pretty well. It could read the price lists from tab-separated-values files, I had some macros to control layout of individual items, I used the options package to allow fine-tuning on individual sections and so on. I even wrote a minimal table editor in Java to simplify its use and worked out how to get it all running in windows.

Latex can be frustrating as fuck, there's some weird environments that don't nest, arithmetic is messy, it's hard to read. But you can also do some cool shit, e.g. I created a brand logo that will properly typeset in any font because it can work with the glyph metrics directly.

I had to disable or work around many of latex's typesetting facilities such as hyphenation and paragraph layout but it produced high quality output and could create an A4 booklet print directly.

But to be honest, it's just not a good enough user-experience. It demands far too much knowledge to modify anything but the list of prices and even though it's simple to adjust things like font sizes the absolutely useless error reporting from latex just doesn't make it practical. And I also found out they don't really have the setup anyway (although i'm not sure if that's just a miscommunication since I seem him using laptops with windows all the time).

HTML5?

So I went back to the drawing board. I tried using HTML+CSS but Firefox didn't seem to support enough fine control on formatting for the task - and always added unacceptable headers and footers at print time.

I discovered that texlive has an online formatting service so started working toward a solution that would utilise that. I installed a local copy of the server software (seems unmaintained and insecure but it works well enough) and worked out how to invoke it.

Then I basically went on an epic side-quest to catch up on about 20 years of web development that i'd thankfully missed during my software engineering career. What a weird collection of technology, bizarre toolkits, and shitty jargon (e.g. pollyfills = fills cracks in walls vs pollyfilla fills cracks in a browser's javascript implementation).

Along the way I learnt about a bunch of technlogy:

Although I still skipped some of the more prominent stuff like node.js or jQuery.

In the end I chose to use PetiteVue and modules came up with all the parts I'd need to make an application of it:

But then I ran into a mess trying to combine these parts into a single scope with petite vue and the lack of documentation became a real problem. I did manage to solve the problems but it became tedious and boring and I simply lost interest. Another issue is it still requires hosting somewhere.

Google Apps Script

So I looked into various was of using google apps. I'd rather just use Free Software but it would be interesting to contrast with something proprietary anyway. This was still frustrating as fuck as there are two apis for everything (e.g. Spreadsheets vs SheetsApp) and trying to navigate the documentation just sends you around in circles. Worse is that the documentation page renders wrong in firefox and with the fonts I use so it's hard to even read.

I spent about a week creating an apps script project that could talk to a collection of files - a spreadsheet with data, a doc with templates for items and a doc with the overall layout - only to find that it's simply impossible to insert a column break in a document programatically. This is a total deal-breaker as there is no other way to control the layout so it would break the formatting - e.g. splitting a pair of rows that should be presented together like the drink name and a description.

A workaround would be to have put both columns into a table and then use the javascript to distribute the values across both tables but I was trying to avoid having to special case template handling in the code. And I was so pissed off with finding out the limitations I basically turned it off and went for a walk and haven't revisited it.

One thing I found is that the google docs api isn't really geared to this type of thing - it's solving the very different problem of a distributed multi-user editing environment. This impedence mismatch made it a pain to work with.

The other pain is the abysmal fucking editor you're forced to use in Apps Script projects. It fucking pops shit up over your text almost every time you press a key, and even if you learn to ignore that incredibly irritating obstruction you have to hit escape all the time anyway as otherwise the cursor keys aren't moving the cursor but sliding down a menu - so you're CONSTANTLY hitting escape to close that shit out of the way. And then when you try to use it the Javascript autocompletion is also a complete joke and the popup documentation is either missing or hard to read. The formatting tools are miserable. It doesn't seem to know what the fuck a tab character is. It doesn't handle primary selection at all.

And anything apart from editing is so slow and takes too many clicks.

And I still I was wasn't sure how to turn it into a standalone app, hosting, and the authentication stuff is weird.

Google Sheets and Apps Script and HTML5

I decided to revisit HTML and see if i could get enough control to generate a good printed output via CSS. And it turned out you could - well mostly could anyway. It fucking also has issues with column breaks but they could be worked around. And you need to edit about:config to stop Firefox adding headers and footers - but hardly anone uses Firefox these days anyway.

I first implemented it as a web-app associated with the spreadsheet. I ran into all sort of issues because the apps are run inside a sandboxed iframe. Made it hard to debug and completely breaks printing.

But I suppose the long story short is I got it to work. In the current version the apps script pops up a dialogue box which inserts a html file. The HTML file does all the processing to insert the data into the page template which is a html template. A button opens a new window with a printable version or lets you save it a a standalone pre-formatted html file.

It's pretty slow - it takes longer to retrieve the data than it did to run latex - but the output is acceptable.

The Result



Summary

Latex is still king for generating printed output, but the user experience just isn't there for anyone not prepared to spend a lot of time learning how to use it which is an unreasonable expecation for the general public outside of authoring books.

Web development still sucks donkey dicks. It's slow and frustrating. The debugging experience is crummy. The online tools are a pain to use. Everything is too blindingly white - or if they have an alternative theme it's both too black and psychedelic. Javascript is a weird language - you can certainly do some pretty interesting stuff with it but it's so easy to abuse. CSS is very powerful but still let down by implementation issues no doubt due to it's complexity.

I'm mostly astounded at the amount of human effort that has been put into 'Web 2.0' then 'HTML5', and this is what they came up with? But that's what I think about C++ too.

Having said that, it had it's moments of fun like any coding exercise - through exploration, implementation, and finally refining the implementation and details.

Tagged hacking.
Newer Posts | Older Posts
Copyright (C) 2019 Michael Zucchi, All Rights Reserved. Powered by gcc & me!