Posts

My PHP Problems

, tagged: php
For the past months I’ve been keeping a list of things I encountered in PHP that I’ve found to be problematic, or in other words things that annoy me. me having problems and being annoyed This is not my definitive list and things that annoy me in PHP largely depend on the things I’m working on, and for the past month I’ve been working on: Phpactor: PHP language server PHP-TUI TUI framework and port of Rust’s Ratatui. Read more...

Running vs Depression

, tagged: running
Today my Dad sent me my certificate for running the Bristol Half Marathon on my 30th birthday in 2010, I got a time of 1h37m: So far so good, it’s a respectable time, a good time. The amazing thing is that one year previously I was overweight, possibly obese, and had never ran. At 29 I was not in a good place mentally, I was loads of junk food, knocking back large cans of energy drink and struggling to climb the stairs to the office - I couldn’t sleep on my back. Read more...

One year back from Europe

, tagged: personal
This time last year I had just moved back from Berlin to my hometown Weymouth after an absence of about 20 years. January: Temporary Accomodation ¶ When I moved back I stayed in a winter holiday-let. My plan was to buy a flat in Weymouth, but that takes time. So I was to stay for 5 months in a rented flat. I dedicated my first month to running every single day and getting to know my surroundings. Read more...

PHP Term

, tagged: phptui term
TL;DR Term is a low-level terminal manipulation library for PHP based on Crossterm. Give it a star. (professional) Term logo When I started porting Ratatui to PHP (see previous post) I didn’t fully realise what I was getting myself into. PHP-TUI is a framework which allows you to create terminal user interfaces, but it does not in itself provide the mechanism to interact with the terminal. Symfony Terminal ¶ My first idea was to use the Symfony console as a “backend” for PHP-TUI as (not) detailed in my previous post. Read more...

PHP-TUI Progress

, tagged: phptui
Update 30/11/2023: I continued to work on it and versions have been tagged and you can visit the docs and view a follow up blog post about Term). TL;DR I’ve been working on a TUI framework for PHP. It’s not finished yet. Give it a star. PHP-TUI lnogo Since being made redundant 3 weeks ago I have been using my unexpected free time to start a project that has been in my minds eye for some time: a TUI framework for PHP. Read more...

Phpactor 2023.09.24

, tagged: phpactor
I have tagged Phpactor 2023.09.24. It’s been over a month and a half since the last release. As per the last month I haven’t been very active but have managed to contribute various bug fixes and small improvements, while there have been some great contributions from bart-jaskulski and mamazu. PHPCS Extension ¶ Phpactor has been providing an integration with php-cs-fixer for over a year. It fulfils the LSP document formatting action, while also providing inline diagnostics for code-style issues. Read more...

Comparing Paths

, tagged: strava
Strava is a service that allows you to record, analyze and share your sporting activities. Strava RS is a TUI (terminal user interface) client for Strava that I’m working on. It provides an offline, keyboard driven, interface to Strava using data collected fro the Strava API. One of the feature the Strava app provides is Matched Routes. If an activity you performed closely matches the route of any previous activities, you can list and compare your previous performances. Read more...

Day 12: The End

, distance: 6km, time: 30m , tagged: spain2023
Highly Accurate Map There was a flash in the sky, followed 30 seconds later by a deep rupturing grumble from the sky and a gust of wind, but the storm didn’t start until later and the continuous cracking and booming was at least partially the reason I didn’t sleep very well. In the morning I had to decide if I was hungry or not, and I decided that I was and at 07:30 I walked out in my socks into the small dinning area of the F1 hotel and helped myself to a pretty good continental breakfast (especially for the €5 price). Read more...

Day 11: St-Malo

, distance: 42km, time: 2h48m , tagged: spain2023
Map strava So I had intended to catch the late sailing from St. Malo to portsmouth today. As I lay down in my tent the prvious evening I decided it would be a good time to reserve a ticket, I went to the Condoor Ferry website, selected France-UK and all was going well until it told me the bicycle spaces were sold out. This was an inconvenience as there were two possiblities, wake up very early and take a different ferry which sails at 10:30 or stay a night in St. Read more...

Day 10: St-Jacut-de-la-mer

, distance: 107km, time: 6.5h , tagged: spain2023
Map strava I’m now sitting in “Le Petite Creperie” in St-Jacut-de-la-mer. They don’t have 50cl beers, and only have 25cl, it’s going to be an expensive crepe. The campsite was a mistake, there are so many tents it’s rather more like a refugee camp than a campsite (to be fair I think it’s also a refugee camp). I’m installed in close proximity (very close proximity) with a cycling couple from Brighton. Read more...

Day 9: Bosmeleac

, distance: 116km, time: 6h30m , tagged: spain2023
Map strava The french guy was short and maybe around 65 and his eyes sparkled as he talked at me about his cycling trip around the highlands. I was exhausted and gave him little encouragement “ah bon!” “mais c’est pas mal” “bah ouai” “fault le faire”. Until he ran himself out. I ended up camping next to him, and he was snoring at 8:30 and he snored until 8:30 for 12 hours he snored. Read more...

Day 8: Scaér

, distance: 90km, time: 6h , tagged: spain2023
Map strava I read from The Pest, having to check at least one word per page in the dictionary on my phone, and then slept unevenly. I slept in later than I would have liked, only rising at 08:30 and making my coffee and eating some cereal with water, it was then to pack up and leave in the usual fashion. I wasn’t feeling super great in the morning, which perhaps was a sign for how I would feel towards the end of the day. Read more...

Day 7: Lesconil

, distance: 107km, time: 7h , tagged: spain2023
Map strava The weather eased up over the night and in the morning it was clear. At campsites they often ask if you’d like to reserve some bread or pastries for the monring, and for once I reserved a Pain au Chocolat and a Pain au Raisan In the morning I made a coffee but didn’t drink it, packed up my stuff and then walked over to the reception (l’accueil) to collect my breakfast and sat on the wall eating, drinking my coffee and reading the news from the internet, afterwards I just went back, got on my bike and cycled out. Read more...

Day 6: Pors Peron

, distance: 108km, time: 7h , tagged: spain2023
Map strava “C’est bon, on peu parle francais” “i like very much to talk with the English, well, the people that speak English, not the Americans, I cannot understand them” “Ouai, it’s not the Queen’s English” “Ah the Queen” “Oui, it is sad” “yes” “a shame” “he makes how the Prince?” “the King madam, he makes how the King " “yes the King” “who is next Harry or the other one” “William? Read more...

Day 5: Brest

, distance: 67km, time: 4h27m , tagged: spain2023
Map strava The beer was disappointing for €4.50, it was une “demi-pression” presented in an unimpressive half-glass. There was nobody else in the “bar” at the campsite, and the internet barely worked, but the owner was kind enough to give me an extension cable to that I could type my blog post. After doing so I looked at the Auberge de Jeunesse (Hostel) in Brest, they were fully booked, I then checked booking. Read more...

Day 4: The Corner of France

, distance: 85km, time: 7h00m , tagged: spain2023
Map (started recording late) strava Today was a better day in regards to my knee, it hasn’t fully recovered but is clearly stronger than it was yesterday. I was cautious to walk up the few steep hills that I encountered, it should be almost as good as new tomorrow. I slept well at the campsite last night, instead of squeezing myself into the slightly-too-small-to-be-comfortable sleeping bag I used instead a musty sleeping bag liner and the sleeping bag as a “duvet”. Read more...

Day 3: Brittany

, distance: 81km, time: 7h00m , tagged: spain2023
(8% battery left on the laptop, I was sure I charged it on the ferry) If I were to explain today in one word it would be “knee”. On the boat I went to my cabin after writing my blog post and drinking my beer, had a shower, and immediately fell asleep. The next thing I know I wake up in the pitch black to the ships alarm clock, which proceeded to repeat itself at 10 minute intervals before announcing that the boat would be docking in one hour. Read more...

Day 2: Plymouth

, distance: 110km, time: 8h12m , tagged: spain2023
Map (strava) I’ve checked in to the ferry terminal and am siting on a bench at the port. 3 border guards are queuing at the cafe “I was at their last concert, they both flew in on separate helicopters and wouldn’t talk to each other for the entire gig (it was great mind)”. I was physically searched before being let through. The boat hasn’t arrived yet and I can expect to wait another hour and a half. Read more...

Day 1: Weymouth-Beer

, distance: 76.67km, time: 5h26m , tagged: spain2023
Map There are kids running about outside “une, deux, trois”. I’m at a campsite, not a bad campsite, althought there is nowhere for me to plug my laptop in, or any table at which to work at, so I’m typing this in the tent. The showers are hot and don’t cost money (why should that be surprising?) and there is a copious amount of toilet roll in the toilets. It costs £13 for the night and I’ve got a reasonable hillside view when I stand up outside of my tent and can see over the fence. Read more...

Phpactor 2023.08.06

, tagged: phpactor
I have tagged Phpactor 2023.08.06. There has not been much activity in the past months, I have been spending most of my spare programming time learning Rust while working on a Strava TUI, but this release does include some signficiant improvements and bug fixes. VIM ¶ Firstly this is a sad time for a project that owes its existence to the VIM editor. My history with VIM started about 15 years ago when I was a year or so into my first job as a PHP developer. Read more...

Cycling the Pyrenees

, tagged: spain2023
This year I’ve decided to cycle across the Pyrenees, again. 2010 ¶ 13 years ago I rode from St. Malo to Santander and then crossed the Pyrenees and continued along the coast before crossing the Alpes to Lac Leman. I’ve recovered my sparse web journal from that time: This was my first time in France as an adult (I was 30 years old) and the first time I had ever been in the mountains, I remember it being extremely tough - I lost a tooth - and progress was extremely slow on some days. Read more...

Phpactor 2023.06.17

, tagged: phpactor
I have tagged Phpactor 2023.06.17. Et voila, on a fait un autre release de Phpactor le serveur de language PHP. But today is not a day to practice my bad french, but to celebrate another Phpactor release 🎉 Class generic tags ¶ We’ll show diagnostics and provide a code action to add (best effort) generic tags for generics classes: Missing implements/extends Undefined variables and typos ¶ Show diagnostics for undefined variables and provide a code action to fix typos. Read more...

Self-testing code units

, tagged: phpactor php testing
TL;DR; Phpactor documents itself In Phpactor there are lots of units of code which add a category of functionality. One such examples is a Diagnostic Provider. Diagnostic providers provide diagnostics which provide feedback about your code: a diagnostic being shown in Neovim The old process for testing a diagnostic provider involved many steps and was tediously time consuming, and there was no documentation for diagnostic providers at all. Why not tediously invest time in a tedious solution which will make future work less tedious? Read more...

Phpactor 2023.04.10

, tagged: phpactor
I have tagged Phpactor 2023.04.10. It has been almost 3 months since the last tag, part of the reason for the delay has been the implementation of some great features which required some time to settle down, and also due to me chasing some white whales. Happily this release does include performance improvements, which will be noticeable on large and complicated files. Diagnostic Outsourcing ¶ By default Phpactor will now run diagnostic analysis in a separate process. Read more...

Phpactor 2023.01.21

, tagged: phpactor
I have tagged Phpactor 2023.01.21. This release is a little bit later than normal as I completely forgot to do it last week. Features ¶ Param docblock generation ¶ If there are any complex trivial types (e.g. generic types, or arrays) Phpactor will now suggest to generate default @param docblocks. class-string template param In addition the docblock updating code has been improved allowing us to update docblocks (previosuly Phpactor would only create them). Read more...

Leaving Berlin

, tagged: berlin
My apartment is in a rare state - it’s tidy. I came to Berlin in 2017 with the following items: 1 bicycle, 2 speakers, 1 monitor, a laptop and some clothes, this week I shipped seven boxes of stuff back to the UK. After moving, 2017 How it started ¶ I am was born and grew up in the UK, when I was 22 I left home to study at University, I lived in the city Bath for 6 years, never earning enough money to break even at the end of the month, a friend put my in contact with somebody who wanted me to build some intranet web application, it took 3 months of hard work and I earned about £3,000. Read more...

Phpactor 2022.12.12

, tagged: phpactor
I have tagged Phpactor 2022.12.12. This is the 4th monthly Phpactor release, I forgot (or rather conveniently forgot) to write a blog post for the previous release 2022.11.12 so I’ll include the best changes from that too in this update. The most significant change with this “tag” is that we no longer support PHP 7.4. If this causes you issues please add a comment on this ticket. Features ¶ Replace Qualifier with Import (2022. Read more...

The Best Container

, tagged: phpactor php
There are few things that I really like about Phpactor, but its DI Container [link] is one of them. In seven years it has hardly changed at all. It’s modular, supports tags, parameters (with schemas) and the has only 233 lines of code including comments and whitespace[1] There is no YAML, XML or compilation. No auto wiring, no property injection, factory modifiers, weird ways to extend services. All services are singletons. Read more...

Phpactor 2022.10.11

, tagged: phpactor
Today I have tagged version 2022.10.11. This is the first (and hopefully not the last) monthly release, the full changelog is on the release page. I’ll run through some of the highlights in this post. Generate Decorator ¶ Thanks to the perserverance mamazu there is now a code action to generate a decorator: Generate Decorator This is an LSP only action, and must be invoked in a file with an empty class which implements one or more interfaces. Read more...

Encountering Go as a PHP developer

, tagged: php go
One morning I sat down at my laptop and looked at a Go service, written 2 months previously, that represented my first attempt with the language. When I wrote it I had been unsure about everything, questioning each line and frequently googling things like “how to do a foreach in Go”. In just two months I was now able to look at this code and immediately see several ways in which it could be improved. Read more...

Phpactor 2022.09.11

, tagged: phpactor
Phpactor 2022.09.11 Today I have tagged Phpactor 2022.09.11. The previous release was Phpactor 18 all the way back in January. It has been a significant 8 months for Phpactor: Conversion to a mono-repository. Completely refactored type system. Phpactor theme song. Numerous features and improvements (see highlights) Converting Phpactor to a monorepo has accelerated development significantly, it has been far easier to fix bugs and add features. It is imaginable to say that more progress has been made in these 8 months than in the past 3 years and it’s still awful. Read more...

Oporto 2013 Blog Restoration

, tagged: oporto2013
Today I plugged in my old X40 laptop, I purchased this laptop in Portugal after my bicycle was stolen while I was at the start of my loosely defined and ultimately failed “tour around the world”. I had prepared for the tour, I was leaving in February, and I was just going to carry on cycling, I thought about crossing Iran and going to India. It was cut short however when my bicycle was stolen in Oporto, Portugal. Read more...

Reflection

, tagged: ireland2022
I have now been in Weymouth for a few days and have had time to recover and reflect a little bit on my journey. My bum still hurts. As usual the experience was challenging and enlightening. I’ve greatly expanded my knowledge of Ireland, and notably how welcoming and friendly the Irish people are. Strangers in towns will smile, say hello and start a conversation with you. The longer you stay in Ireland the more sociable you become, as the default is to at least greet people. Read more...

Migrating this site to Hugo

, tagged: hugo blog
Today I migrated this blog from Sculpin to Hugo. I created the site originally in 2018 using the wonderful, PHP based, Sculpin static site generator. It has proved to be a good decision, previously my personal homepages used a database and anything I wrote on them is lost to history (a mournful loss to posterity), now all of my blog posts are on github, and I can author them locally in my favourite editor. Read more...

Day 28 - Weymouth (the end)

, distance: 106km, time: 7h9m , tagged: ireland2022
Most of my entire route in purple There was an alcoholic at the hostel last night. I was sitting in the reception area, reading a book and the paramedics arrived, 10 minutes later they came down the stairs and reported that the lady was “fine and just had a bit too much to drink” 10 minutes after that the lady came down the stairs and started verbally abusing the man behind the counter when he wouldn’t hold her drink for her while she made an epic quest up the stairs to fetch something, I’m not sure she knew what. Read more...

Day 27 - Bath

, distance: 100km, time: 6h40 , tagged: ireland2022
Map This is the day before last, the penultimate day, the day where I cycle to the town where went to University and got my first job, Bath. It was good to sleep in a bed. When I got in last night, before 10pm, the house was quiet and the lights were off, I crept upstairs to use the bathroom as I assumed at least 3 people were sleeping. I woke early, as could be expected when going to bed at 10am, and lazily used the internet checking in on my open-source project and briefly interacting with somebody who was developing an extension for it. Read more...

Day 26 - Pontypool

, distance: 70km, time: 4h50m , tagged: ireland2022
Map Today had different expectations and it would define when my tour would finish. Today or the day after I would visit my auntie and uncle in Pontypool, after Pontypool it is two rides (or one very long ride) back to Weymouth. I had to find accommodation and organise the meeting. Thankfully everything happened quite easily. After waking up I looked on Air B&B and found a place in Cymbran (5k from Pontypool) for a good price and I phoned my uncle and he suggested collecting me when I got there. Read more...

Day 25 - Swansea

, distance: 113km, time: 7h50m , tagged: ireland2022
Map This campsite cost £25, which is €28 euro. Phil warned me yesterday that campsites charge this much, but I didn’t expect it seeing as my most expensive campsite in the past 30 days was €17 with the best one of them all costing only €8.50. What do I get for £25? Well I don’t get anywhere where I can plug my laptop in for free. I’m sitting in a small room with a washing machine and sinks and a single power point, which is on a meter which requires 20p every 5 minutes. Read more...

Day 24 - Pembrokeshire

, distance: 93km, time: 7h15m , tagged: ireland2022
Map I didn’t sleep well, I dozed until about 9am then forced myself out of the sleeping bag and made my way to the facilities to have a morning shower, when I returned I made my coffee and cereal and read the news on my phone, packed up my stuff and wheeled the bike off the pitch. The owner was standing close by “where you going today?” “that’s the question! Read more...

Day 23 - Leaving Ireland

, distance: 83km, time: 5h18m , tagged: ireland2022
Current Position I’m sitting in the ferry terminal at Roselare, my eyes are heavy from the early start. I got here with 3 hours to spare. There is free WiFi and power sockets and I added more content to last nights short blog post and had a quick wash in the toilets. My laundry situation isn’t very good, most of my stuff is damp and nothing is clean. I’m due a rest day and I’m hoping to find a good place in Wales to stay a couple of nights. Read more...

Day 22 - Waterford Greenway

, distance: 121km, time: 6h55m , tagged: ireland2022
Map I’m now 70k or so from the Ferry terminal in Roslare, if I can wake up at 8am I should be able to make it to the ferry terminal easily for the 17:30 boarding cut-off. Until I got to the campsite last night I thought it would be at least another 3 or 4 days, but I am now in “get out of Ireland” mode. Midleton - lots of Ironman stuff here Read more...

Day 21 - Carrigtwohill

, distance: 107km, time: 7h , tagged: ireland2022
Map Today is another “sit cross legged in the tent and write a blog post” day, the last time I was sitting by the beach, today I am in a very generic campsite off the side of a dual carriageway. I’m cooking pasta, pasta which I realised I didn’t have 30 minutes ago. I had cheese, pasta sauce, but to my shock, no pasta. So I just got back from an additional cycle ride to the nearest shop 1 kilometer away. Read more...

Day 21 - Ultima Peninsular

, distance: 113km, time: 7h50m , tagged: ireland2022
Map I slept well last night and in the morning performed my usual routine of packing up my stuff and emerging from the tent. I went up to the campers kitchen for coffee and to see what I could eat for breakfast. The two French girls were already there and were discussing there plans for the day. I put the kettle on and started unloading my food bag for inspection: Penguin bars, beer snacks, yoghurt covered raisins, 3/4 of a demi-baguette. Read more...

Day 20 - Sheeps Head

, distance: 120km, time: 7h51m , tagged: ireland2022
I’m finally sending this at lunchtime having failed to send this blog post yesterday evening. I’m sitting in a tourist information office which has WiFi. I seem to be in a region with very poor mobile phone coverage. Current position (blue dot) “How long you here for?” “In Ireland?” “No” “Just one night” “No, how long you been waitin’?” “About 10 minutes” “You rang the door bell on the Tardis and all that? Read more...

Day 19 - Allihies

, distance: 109km, time: 7h23m , tagged: ireland2022
Current position (blue dot) No wild camping today. I’m sitting in a campsite, the sea is about 50m away, the sun is shining, I can hear the swoosh of the waves and I’m cooking pasta, sheletered from the wind behind my tent which is wronly positioned so the door opens into the wind. It’s very quiet, just the occasional scream from the few people dipping into the waves. Camping Read more...

Day 18 - Mordor

, distance: 82.22km, time: 5h30m , tagged: ireland2022
Map I had just done a couple of climbs and was 80k into my ride and I noticed a place called the “Climbers Inn” which, I knew, was a hostel. I also knew that it was a full hostel, I didn’t realise that it had camping however. The sign clearly said “camping”. The next campsite was about 80k, I didn’t want to do 80k but I also knew I could wild camp. Read more...

Day 17 - Rest day

, tagged: ireland2022
Today was my second rest day. I wasn’t planning on taking a rest day, but the campsite is very comfortable and it has actually been a week since my last rest day, so it’s good timing. I slept a bit better last night, and didn’t feel ill. I drank a couple of beers which may or may not have helped. In the morning I made breakfast, stealing a little bit of some unlabled milk from the fridge for my cereal and coffee. Read more...

Day 16 - Ring of Kerry

, distance: 81.7km, time: 5h18m , tagged: ireland2022
Map Last night was another tough night. There were campers who at first were annoying and then as the hours wore past 12, 1 and finally 2 became unbearable and almost caused me to lose my mind. On top of this I had the same headache and pain as the previous night, which I now suspect is something to do with the angle at which my neck is resting (I have no pillow). Read more...

Day 15 - Inch Strand

, distance: 75km, time: 5h30m , tagged: ireland2022
Current position in Ireland (blue dot) As I finished writing my blog post last night I was absolutely exhausted. I retired to my tent, there was an ambient sound of children playing and they occasional tschhhh! of a drinks can being opened, but I was soon asleep. I awoke however at around 2am feeling quite unwell, I had a headache and felt a little nauseous. I think it was probably a combination of dehydration and something I ate. Read more...

Day 14 - Tralee

, distance: 121.7km, time: 7h56m , tagged: ireland2022
Inaccurate Map It seems inevitable that I cannot hold on to nice things. I got a great wicking hoody for this trip, it was warm and everytime I put it on I thought “this is a good item of clothing”. It’s gone. In contrast, I have several pieces of clothing that I’d like to lose but which stubbornly remain with me for decades. I really have no idea what happened to it, I would have had it on this morning, maybe I left it on the back of the bike, perhaps it fell off a cliff. Read more...
1 of 5 Next Page

2491km of achievement on this page!