Hacker Public Radio

Hacker Public Radio

Hacker Public Radio is an podcast that releases shows every weekday Monday through Friday. Our shows are produced by the community (you) and can be on any topic that are of interest to hackers and hobbyists.

Episodes

  1. 38M AGO

    HPR4596: Adding voice-over audio track created using text to speech on the movie subtitles

    This show has been flagged as Clean by the host. We’ll explain why we’re doing it, what it is, and cover some useful tools along the way. I’ve been watching movies recommended to me by my colleagues. As I work for a global company, the recommendations are often “Foreign Language”, which by definition is every movie to someone. It’s often difficult to read the subtitles, or they are distracting from the acting. So I thought of converting the subtitles to speech for inclusion as an audio track, to produce a Voice Over or Lectoring audio track. Lectoring aka Voice Over Translations First used is soviet countries to read the news and propaganda from a lectors - the first podcasts ? In Polish, lektor is also used to mean “off-screen reader” or “voice-over artist”. A lektor is a (usually male) reader who provides the Polish voice-over on foreign-language programmes and films where the voice-over translation technique is used. This is the standard localization technique on Polish television and (as an option) on many DVDs; full dubbing is generally reserved for children’s material. https://en.wikipedia.org/wiki/Lector#Television Example: Night of the Living Dead To give you an idea of what this sounds like I’m going to play you an example of the out of copyright movie, Night of the Living Dead . In the United States, Night of the Living Dead was mistakenly released into the public domain because the original distributor failed to replace the copyright notice when changing the film’s name Original First the original sound track, then the same clip with the voice over track. Voice Over Proof of Concept As a native English speaker I find it difficult to follow those Voice Over tracks as I am trying to focus on the underlying audio. In discussions with Polish friends, it seems that this is not a problem when Polish is your native language. To put that to the test I wanted to try it out on a movie to see if that were indeed the case. I asked on Mastodon for a non English movie that was Creative Commons but did have English Subtitles, and HPR host Windigo had the answer. 2009 Nasty Old People is a 2009 Swedish film directed by Hanna Sköld, Tangram Film. It premiered on 10 October 2009 at Kontrapunkt in Malmö, and on file sharing site The Pirate Bay. The film is available as an authorized and legal download under the Creative Commons license CC BY-NC-SA. So my idea was to take each bit of subtitle text, convert it to audio, then have the generated audio play at the same time the subtitle appears on the screen. We use piper to process shows here on HPR, and we also generate srt, or SubRip subtitle files for each show. SRT or SubRip files are the easiest subtitle file to work with. From https://en.wikipedia.org/wiki/SubRip The SubRip file format is described on the Matroska multimedia container format website as “perhaps the most basic of all subtitle formats.” SubRip (SubRip Text) files are named with the extension .srt , and contain formatted lines of plain text in groups separated by a blank line. Subtitles are numbered sequentially, starting at 1. The timecode format used is hours:minutes:seconds,milliseconds with time units fixed to two zero-padded digits and fractions fixed to three zero-padded digits (00:00:00,000). The comma (,) is used for fractional separator . A numeric counter identifying each sequential subtitle The time that the subtitle should appear on the screen, followed by –> and the time it should disappear Subtitle text itself on one or more lines A blank line containing no text, indicating the end of this subtitle I downloaded the movie from the Internet Archive , and then used Piper voice to convert a minutes worth of subtitles. piper_voice: A fast and local neural text-to-speech engine that embeds espeak-ng for phonemization. GPL-3.0 license Once I had the audio prepared for a sample of the subtitles, it was over to audacity to create a new subtitle audio track. Audacity is the world’s most popular audio editing and recording app GPL v2 or later, Timing the segments would be a problem, if it were not for the fact that Audacity supports srt files as Labels. File > Import > Lables. Then select the srt file The subtitle track with the text of the audio will be displayed. I could then Import each Audio segment and line them up with the subtitle track for to get the correct timing. Each subtitles segment created a new separate audio file which I then exported. I then used Kdenlive to open the video and import the audio and subtitle tracks. Kdenlive: is the acronym for KDE Non-Linear Video Editor. It works on Linux, Windows, macOS, and BSD. GPL-3.0-or-later There is a good article on adding by Jean-Marc on How to Add Subtitles Easily in Kdenlive Project > Subtitles > Add Subtitle Track Select the Subtitle file Align the subtitle and audio track. After rendering the segment out I was satisfied that this was something worth doing. The script The script can be found on the episode page for this show on the HPR site, and I put it together as a proof of concept. It creates a new audio track for the subtitles, and merges this with the original sound track to create a new selectable sound track. It begins by creating a length of silent audio that is as long as up to the first subtitle time segment begin timestamp. The first subtitle segment is converted from text to speech using Piper voice That segment of audio is added to the initial silence track. We check the total length so far, and then see if there is supposed to be silence between the last and next subtitle segment begin timestamp. If there is, then a filler piece of silence is added until the next subtitle should appear. If not then the audio for both subtitles play immediately after one another. I was worried that the subtitle audio would then lag behind the on screen dialogue but it works surprisingly well. Even long series of dialogue sort themselves out after a bit. We do this over and over again for each subtitle, right up to the very end of the movie. This new subtitle to speech audio track is then merged back into the media file as a new audio track. 96 00:15:06,240 --> 00:15:10,640 It will be two years before it's this big 97 00:15:12,840 --> 00:15:17,840 But don't you bother. By then I'll be long gone 98 00:15:19,840 --> 00:15:22,400 It was just a question 99 00:15:22,880 --> 00:15:25,480 Porridge? Original First the original sound track, then the same clip with the voice over track. Voice Over Lessons learned Now that I have done this for a lot of movies, there a few tips for getting the best output. The creation of the audio track usually goes well, but you can run into issues with the merging of the new track back into the movie. Preparation The first thing you need is a subtitle file which will be the basis of the voice you will be listening to. It should be good quality so that it matches when the actors speak. It’s important to clean up this before you use it, fixing spelling mistakes and removing html that will get rendered. Listening to three hours of “I L Zero ve y Zero u”, or “less than forward slash I, greater than”, or “L am from Lndia” can get a bit tedious. You should also try and get versions that translate the songs as well. Getting a SRT file from the media. As many Subtitles are taken from a DVDs they can often be poor Optical character recognition versions of the bitmap-based streams. So a picture of string “Hello World” rather than the letters. ffmpeg By far the easiest and best way to get the subtitles is to extract it from the movie itself, provided it’s a separate track. ffmpeg is a complete, cross-platform solution to record, convert and stream audio and video. LGPL-2.1-or-later, GPL-2.0-or-later https://ffmpeg.org/ ffmpeg -y -hide_banner -loglevel error -txt_format text -i "${this_movie_file}" "${this_srt_file}" Getting a SRT file from the web. If that fails you can try to get the subtitle files from the Internet. https://www.opensubtitles.org Select your language with the highest subtitle rating. You can check the media using the mpv media player. mpv is a media player based on MPlayer and mplayer2. It supports a wide variety of video file formats, audio and video codecs, and subtitle types. GPLv2+, parts under LGPLv2.1+, some optional parts under GPLv3 https://mpv.io/manual/master/ Name the srt file with the same prefix as the movie and mpv will play it. You can also use the --sub-files= option as well. mpv "${this_movie_file}" --sub-files="${this_srt_file}" Scrub through the file to see if the timing is correct. The subtitles can be toggled using the j key. Fixing Timing issues It’s very important to get the subtitles to align, otherwise the voices will be out of sync. When the subtitles don’t match up, it’s usually that they need to have the start offset corrected. ffsubsync will automatically try and adjust the offset of the first subtitle to the first use of speech in a movie. ffsubsync: Language-agnostic automatic synchronization of subtitles with video, so that subtitles are aligned to the correct starting point within the video. MIT license https://github.com/smacke/ffsubsync pip install ffsubsync ffs video.mp4 -i unsynchronized.srt -o synchronized.srt LosslessCut will allow you to quickly remove additional trailers, or ads, at the beginning, so that ffsubsync will have a better chance of working if they are trimmed away. LosslessCut: aims to be the ultimate cross platform FFmpeg GUI for extremely fast and lossless operations on video, audio, subtitle and other related media files. GPL-2.0 license https://github.com/mifi/lossless-cut If that fails

  2. 4D AGO

    HPR4594: Hackerpublic Radio New Years Eve Show 2026 Episode 2

    This show has been flagged as Explicit by the host. ### Eps 02 Start ### Amazon Alexa https://en.wikipedia.org/wiki/Amazon_Alexa https://developer.amazon.com/en-US/alexa Home Assistant https://en.wikipedia.org/wiki/Home_Assistant https://www.home-assistant.io/ Steelseries: Arctis 9X https://steelseries.com/gaming-headsets/arctis-9x https://headphonereview.com/over-ear/steelseries-arctis-9x-gaming-headset-review/ Razer: Nari series https://www.razer.com/pc/gaming-headsets-and-audio/nari-family https://mysupport.razer.com/app/answers/detail/a_id/3636/~/razer-nari-ultimate-%7C-rz04-02670-support-%26-faqs Skullcandy: crusher https://www.skullcandy.com/collections/skullcandy-crusher-bass Audio-Technica ATH-M50x https://www.audio-technica.com/en-us/ath-m50x HyperX: cloud https://hyperx.com/collections/gaming-headsets Plantronics Headset https://plantronicsstore.com/ Skullcandy: Hesh 3® Wireless https://support.skullcandy.com/hc/en-us/articles/360008277374-Hesh-3-Wireless Centauri Carbon https://www.elegoo.com/pages/elegoo-centauri-carbon https://us.elegoo.com/products/centauri-carbon?srsltid=AfmBOooFOZ2ms1EDtl2TiIAajyqMjkLFTkPb0hMFzis2PZs8sbdgpfRn Ender-3 https://www.creality.com/products/ender-3-3d-printer https://www.creality3dofficial.com/products/official-creality-ender-3-3d-printer Monoprice Maker Select V2 https://monopricesupport.kayako.com/article/278-maker-select-v2-manual-quick-start-guide-part-13860 https://www.treatstock.com/machines/item/237-maker-select baha GmbH https://www.baha.com/?culture=en-US&ts=1768855891246 HP Elite Mini 600 https://www.hp.com/us-en/shop/mdp/desktops-and-workstations/hp-elite-mini-600-3074457345617692179--1 HP 9000 https://en.wikipedia.org/wiki/HP_9000 Full Circle Magazine https://fullcirclemagazine.org/ Mintcast https://mintcast.org/ Podcatcher https://en.wikipedia.org/wiki/List_of_podcast_clients Podcast addict https://podcastaddict.com/ Antenna pod https://antennapod.org/ Robinhood: Trading & Investing https://robinhood.com/us/en/ E-Trade is an investment brokerage and electronic trading platform https://us.etrade.com/home Distrohoppers' Digest Podcast https://distrohoppersdigest.org/ Spotify https://open.spotify.com/ Software-defined radio https://en.wikipedia.org/wiki/Software-defined_radio Filk music https://en.wikipedia.org/wiki/Filk_music OggCamp 2026 https://www.oggcamp.org/ Moss music https://mordewis.bandcamp.com/ Discord https://discord.com/ https://support.discord.com/hc/en-us/articles/360030853132-Server-Folders-101 The Hitchhiker's Guide to the Galaxy https://en.wikipedia.org/wiki/The_Hitchhiker%27s_Guide_to_the_Galaxy https://hitchhikers.fandom.com/wiki/The_Hitchhiker%27s_Guide_to_the_Galaxy Baofeng BF-50 https://www.baofengradio.com/products/5r-mini https://www.youtube.com/watch?v=DWtbDtMyqMA Baofeng UV-5R Mini Dual-band Radio https://www.radioddity.com/products/baofeng-uv-5r-mini Pi Day https://en.wikipedia.org/wiki/Pi_Day GNU World Order https://gnuworldorder.info/ SDF Public Access UNIX System https://sdf.org/ NetBSD https://www.netbsd.org/ https://en.wikipedia.org/wiki/NetBSD Raspberry Pi 1 Model B+ https://www.raspberrypi.com/products/raspberry-pi-1-model-b-plus/ OpenBSD https://www.openbsd.org/ https://en.wikipedia.org/wiki/OpenBSD FreeBSD https://www.freebsd.org/ https://en.wikipedia.org/wiki/FreeBSD Something about "ports"? https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/4/html/security_guide/ch-ports Chapter 4. Installing Applications: Packages and Ports https://docs.freebsd.org/en/books/handbook/ports/ https://freebsdfoundation.org/resource/installing-a-port-on-freebsd/ OpenBSD Ports - Working with Ports [Handbook Index] https://www.openbsd.org/faq/ports/ports.html SerenityOS https://serenityos.org/ https://en.wikipedia.org/wiki/SerenityOS Ladybird is a brand-new browser & web engine. https://ladybird.org/ Unix https://en.wikipedia.org/wiki/Unix https://en.wikipedia.org/wiki/List_of_Unix_systems UNIX System V https://en.wikipedia.org/wiki/UNIX_System_V UNIX V4 tape successfully recovered. https://www.tomshardware.com/software/linux/recovered-unix-v4-tape-quickly-yields-a-usable-operating-system-nostalgia-addicts-can-now-boot-up-unix-v4-in-a-browser-window https://www.theregister.com/2025/12/23/unix_v4_tape_successfully_recovered/ Newsboat is an RSS/Atom feed reader for the text console. https://newsboat.org/index.html Podboat https://man.archlinux.org/man/extra/newsboat/podboat.1.en EPR: Terminal/CLI Epub reader written in Python 3.6. https://github.com/wustho/epr Ruby Programming Language https://www.ruby-lang.org/en/ https://en.wikipedia.org/wiki/Ruby_(programming_language) https://rubyonrails.org/ Crystal is a general-purpose, object-oriented programming language. https://crystal-lang.org/ https://en.wikipedia.org/wiki/Crystal_(programming_language) Plasma is a Desktop https://kde.org/plasma-desktop/ Vim is a highly configurable text editor https://www.vim.org/ https://en.wikipedia.org/wiki/Vim_(text_editor) Sublime Text https://www.sublimetext.com/ sed, a stream editor https://www.gnu.org/software/sed/manual/sed.html https://en.wikipedia.org/wiki/Sed English punctuation https://en.wikipedia.org/wiki/English_punctuation https://en.wikipedia.org/wiki/Punctuation List of typographical symbols and punctuation marks https://en.wikipedia.org/wiki/List_of_typographical_symbols_and_punctuation_marks Pluma (text editor) https://en.wikipedia.org/wiki/Pluma_(text_editor) https://github.com/mate-desktop/pluma Kate (text editor) https://kate-editor.org/ https://en.wikipedia.org/wiki/Kate_(text_editor) Vimium https://addons.mozilla.org/en-US/firefox/addon/vimium-ff/ https://vimium.github.io/ https://github.com/philc/vimium Zen Browser https://zen-browser.app/ https://en.wikipedia.org/wiki/Zen_Browser Vivaldi https://vivaldi.com/download/ Thunderbird https://www.thunderbird.net/en-US/ https://en.wikipedia.org/wiki/Thunderbird Uniden https://uniden.com/ Arduino https://www.arduino.cc/ Raspberry Pi https://www.raspberrypi.com/ Plex https://www.plex.tv/ Qualcomm to Acquire Arduino https://www.qualcomm.com/news/releases/2025/10/qualcomm-to-acquire-arduino-accelerating-developers--access-to-i https://www.arduino.cc/qualcomm https://www.jeffgeerling.com/blog/2025/qualcomms-buying-arduino--what-it-means-makers/ Perfboard Hackduino https://www.instructables.com/Perfboard-Hackduino-Arduino-compatible-circuit/ DIY Arduino https://www.instructables.com/DIY-Arduino-UNO-How-to-Make-Your-Own-Arduino-Uno-B/ https://docs.arduino.cc/hardware/make-your-uno-kit/ https://www.electronicshub.org/make-your-own-arduino-board/ Notacon https://en.wikipedia.org/wiki/Notacon hak5 / bashbunny-payloads https://github.com/hak5/bashbunny-payloads Provide feedback on this episode.

  3. 5D AGO

    HPR4593: Nuclear Reactor Technology - Ep 8 Generation Four Reactors

    This show has been flagged as Clean by the host. 01 Introduction This episode is the eighth and final one in an 8 part series on nuclear reactor technology.  In this episode I will talk about future reactor technologies, particularly what are referred to as "Generation IV" reactors. Some of these will be simply additional developments of reactors that have already been discussed in this series, but this will show what technologies are seen as most promising today. 03 What is Generation IV Generation IV International Forum is an international organization whose membership is composed of many of the countries that are researching advanced fission reactors. Their goal is to conduct a number of joint research projects to advance the state of the art. The members agree to participate in and share research on advanced technologies. 04 Research Subjects 05 Lead Fast Reactors (LFR) 08 Sodium Fast Reactor (SFR) 10 Gas-Cooled Fast Reactor (GFR) 13 Very High Temperature Reactor (VHTR) 16 Molten Salt Reactors (MSR) 19 Super Critical Water Reactors (SCWR) 27 Episode Conclusion In this episode we looked at the reactor types being studied under an international organization called the "Generation IV International Forum". All of these reactor types except for supercritical water reactors are not new and we have looked at them previously. Supercritical water reactors themselves represent the natural evolution of water cooled reactors. I expect that many of these research projects will not result in commercially successful results. Such is the nature of R&D. The supercritical water reactors would on the surface seem to have the most promise in terms of commercial use, as they focus on bringing two very well established technologies together, water cooled reactors and supercritical water. However, I'm not an expert in this field, so I'm just making an educated guess on that. 30 Series Conclusion This is the end of the series on nuclear reactor technology. Episode 1 covered nuclear basics, including basic terminology and civil versus military nuclear material. Episode 2 covered nuclear fuel, including the different types, recycling of spent fuel, uranium and thorium resources, and medical isotopes.  Episode 3 covered reactor basics, including slow versus fast reactors, moderators, coolants, steam generation, refuelling methods, and the three main commercial reactor types. Episode 4 covered the less common reactor types, including types which are no longer used, some historical developmental dead ends, and some types which may possibly be making a come back. Episode 5 covered fast reactors, including the different types, some of their history, why they were developed, and why they have so far only seen limited use. Episode 6 covered thorium reactors, including what is thorium and how it differs from uranium, why there is interest in thorium, what sorts of reactors can use thorium, and why thorium has not yet seen widespread use. Episode 7 covered small modular reactors or SMRs, what the reason is for developing them, what are the different ways they may be used, and where they are currently being built. Episode 8 covered "Generator IV" reactors which is a collection of future technologies.   I hope that this series has been useful and informative on how nuclear reactors work and what the different types of reactors and different types of fuel are.  I have focused on the past and present without looking very much beyond what is already developed except in this final episode. I have focused on the reactors, fuel, and medical isotopes, without much discussion of mining, refining, converting, enrichment, fuel fabrication, or disposal.  I also haven't talked much about the rest of a functioning power plant, which includes cooling, steam turbines, generators, transformers, control systems, refuelling systems, switch gear, transmission grid connections, grid coordination, and many, many other things. And of course there's the entire grid itself, a very complex thing when operated at scale.  None the less we count on the lights going on when we turn on the light switch while seldom thinking about all the things that go on behind the scenes to make that happen.  As the recent blackout in Spain shows, that is something that we can't take for granted.  With plans for "Net Zero" amounting essentially to the further electrification of everything, we need reliable sources of electrical energy to make that happen. Without reliable energy available at the touch of a switch, we don't even have a stone age civilization, let alone a modern one.  So think about that the next time you turn on the lights or listen to a podcast or do nearly anything else in your daily life.  This concludes the eighth and final episode of an 8 part series on nuclear reactor technology.  Provide feedback on this episode.

  4. 6D AGO

    HPR4592: Happy by shower # 2

    This show has been flagged as Clean by the host. I also happen to be happy when I see my dogs well. They’re both a little old and have had grave sicknesses. One, the girl, is taking medication because of a problem, maybe on the spine, that interferes with walking, but in general both her and the little white male (who almost died because of stone in the ureter at around the pandemic) are today good, and I’m grateful seeing them in this state. And I suffer when they suffer. The hot weather is also more comfortable for them, so, even though we are having too much hot weeks here in Curitiba [Brazil], it’s a soft, nice, weather. Generally I take a cup of coffee on the early morning. Sometimes I give a little run, or go cycling to my duties, without coffee and even without bread. Only then, hours later, I take the coffee and maybe eat something, hours after awake. The exercise, the bath with nothing on the stomach, and, oh, the coffee after (specially the espresso, or american, my current favourite, espresso with hot water), does good, it’s a good feeling outside of the routine. I learned to like to share things. I like to share what I judge important. As much as I appreciate doing that, they feel as a burden; an account, or a published content, are like something I’m constantly carrying, that may condemn what I come to be, or may create expectations on others that I can’t fulfil, or are “me in the world”, in a manner that I feel so unsecure. So I feel good, and safe, in erasing everything under my control some time after having created an account or published something. I feel well, and it makes me happy, to have a night of sleep in which I don’t wake up more than once. If I wake up early spontaneously, and rested, better yet, good sensation, makes me happy. To be true, when I spend the first time on the morning reading the Bible, with prayer, even when I’m not keen on doing that, man, my head and my body end up being marvellous. Martin Luther, the one of the reform, is said to having said: “I have so much to do that I will spend the first three hours praying”. A piece of opinion, unasked, if you’re constantly doing something you think it’s too easy, you may not be doing it right, or you’re not doing the right thing. Let’s see what’s wrong and do the right thing. One last thing that makes me happy is when my swimming pool is clean. It’s been for years now. As with the other facts, it’s good by itself, yeah, but has more meaning as I had many dirty problems with its water, to the point that the neighbours called sanitary authorities. I don’t want to have any more problems in this area, or in any other area of living, but I know now, and have to guide my heart to feel accordingly to what I know, that any problems that arise are to result in my good and good to other people and other living creatures too. So the difficulties, even the hardest ones, can be faced with peace, because I know the future, and being in a bad state will not help in hiking up and overcoming whatever there is here now or right ahead. Our posture, our internal condition in doing something, counts much together with the external things, visible or invisible, that we do. I thank you for listening [reading]. Bye. Provide feedback on this episode.

  5. MAR 9

    HPR4591: A Bit of Git

    This show has been flagged as Clean by the host. When attempting to push commits to a remote repository, git rejected the push with an error. The branches had diverged! git status Result: On branch main Your branch and 'origin/main' have diverged, and have 7 and 1 different commits each, respectively. The problem: * 79085bb (HEAD -> main) Improve mobile responsiveness for very narrow viewports * eec46f5 Improve responsive layout for narrow viewports * 79c71eb Fix sync dialog modal instantiation * 33fd501 Add markdown rendering to session notes in desktop app * 1a119f7 Increase hierarchy panel bottom padding to 9rem in web app * c557299 Constrain session notes width with word wrap * f2ab785 Add bottom padding to hierarchy navigation panel | * 7459345 (origin/main) fix: address bug on Desktop with Sync dialog |/ * c8cc83d Fix routing for Dashboard action after renaming from Index After resolving with git rebase there was a new problem. commit messages contained Generated with [Claude Code](https://claude.com/claude-code) ​ Co-Authored-By: Claude Sonnet 4.5 The solution was to use interactive rebase with --exec to amend each commit: git rebase -i 7459345 --exec 'git commit --amend -m "$(git log --format=%B -n1 | sed -e "/ Generated with/d" -e "/Co-Authored-By: Claude Sonnet/d" | sed -e :a -e "/^\n*$/{\$d;N;ba" -e "}")"' Still the branches differed git log --oneline --graph --all -12 * 4205e86 Improve mobile responsiveness for very narrow viewports * a5947ee Improve responsive layout for narrow viewports * 012a78f Add markdown rendering to session notes in desktop app * d5227d2 Increase hierarchy panel bottom padding to 9rem in web app * aed5405 Constrain session notes width with word wrap * bcc32e8 Add bottom padding to hierarchy navigation panel | * 64a4118 Improve mobile responsiveness for very narrow viewports | * cbf2c68 Improve responsive layout for narrow viewports | * 731eee2 Add markdown rendering to session notes in desktop app | * 197fdb8 Increase hierarchy panel bottom padding to 9rem in web app | * 09377c9 Constrain session notes width with word wrap | * 6714c35 Add bottom padding to hierarchy navigation panel |/ The solution git push --force Git Commands Reference Here are all the commands used in this adventure, in order: Check current status git status ​ Fetch latest from remote git fetch origin ​ View commit history graph git log --oneline --graph --all --decorate -15 ​ View specific commit details git show origin/main --stat git show 79c71eb WorkLog.Desktop/src/qml/main.qml ​ Rebase local commits onto remote git rebase origin/main ​ During conflict: stage resolved files and skip duplicate commit git add WorkLog.Desktop/src/qml/main.qml git rebase --skip ​ Check commit message git show --stat HEAD git log --format="%B" -1 HEAD ​ Attempt to filter commit messages (didn’t work) git filter-branch -f --msg-filter 'sed ...' 7459345..HEAD ​ Interactive rebase to amend all commits (successful) git rebase -i 7459345 --exec 'git commit --amend -m "$(git log --format=%B -n1 | sed ...)"' ​ Verify messages were cleaned git log --format="%B" -1 HEAD git log --format="%B" -1 HEAD~3 ​ Force push to update remote git push --force Provide feedback on this episode.

  6. MAR 6

    HPR4590: Playing Civilization V, Part 9

    This show has been flagged as Clean by the host. In our next look at the game mechanics for Civilization V we examine a new feature in Civilization 5, City-States. These are independent cities controlled by the computer that are also players to some degree in the game, and you can interact with them. And they are key to winning a Diplomatic Victory. Playing Civilization V, Part 9 - City States This was a newly introduced feature in Civ 5, and they play an important role in the game. They represent the small countries that are not running the world. They do not produce Settlers, so they do not expand beyond the one city, though that city can, and will expand its borders in a similar way to how your cities can grow. They do not start with a military unit, but they can produce military units and defend themselves. They can also build buildings in the city, but not Wonders. They do have a single vote each in the World Congress (or later the United Nations), making them a key to a Diplomatic victory. City States start out neutral with regards to the players, but your interactions with them can affect how they feel about you. For example, if you send units through their territory they will get hostile, but if you give them gifts they will get friendly. And if you wish you can go to war with them and take them over. This will affect your diplomatic relations with other players and other city states, but if you have decided on a war of conquest as your victory type, that won’t matter to you, right? As mentioned, if you want to go for a Diplomatic victory you want to be allied with as many of them as possible to get their votes in the World Congress or the United Nations. But even if you don’t need their votes, there are other benefits from friendly relations. There are two levels to friendly relations: Friendly, and Allied, and the benefits get better as the relations improve. City State Types With the expansions there are 5 types of City State: Militaristic, Maritime, Cultured, Mercantile, and Religious. The benefits you get are: Militaristic – If you are friends the city state will periodically gift you a unit, which will appear in your city which is closest to the city state. If you are allies the units will show up more often. Maritime – If you are friends they will add two food to your Capital city. If you are allies they will add one more food to every city you have. Cultured city states share their culture with you, at one rate if you are friends and at double the rate if you are allies. Mercantile city states give you an added 3 Happiness when you are friends. If you are allies you keep the added happiness, but in addition get access to a luxury resource that cannot be obtained any other way, and that also adds Happiness. Religious city states give you a one-time bonus of Faith when you first meet them, then provide added Faith per turn. Note that Cultured and Religious city states increase the amount of Culture or Faith they provide with each new era, so the earlier you develop your relations with them the better the benefit. Managing Relations With City States There is a mechanism in the game which keeps track of points to define your relations with city states. On this numerical scale, Neutral has a value of 0, Friendly 30 or above, and Allied 60 or above. In the other direction, once you go into negative numbers they become Angry, if if you go negative enough it becomes War. A city state can only ever have one ally. If only one player has more than 60 influence points, that player will become the patron of the city state and they will ally to that player. If two or more players have more than 60 influence points, the player with the most points gets the ally. As the game goes on, you may get a message that a city state you had as an ally has suddenly allied to someone else. This is the result of the other player gaining influence points in some way, often by gifts. You can also gain influence points by promising to protect a city state, but do this with your eyes open. If you do not follow through on your promise it will enrage the city state and you will lose a lot of influence with them. Your influence with a city state has a natural resting point at 0, or Neutral. That means that barring other factors, a positive number will fall over time, and a negative number will rise over time. So if you sent one of your units through their territory they will be angry for a period, but if nothing else happens they will return to Neutral. But on the other side, you don’t stay allied with them forever unless you find ways to keep adding influence points. One way is to eliminate barbarian camps near to the city state. In fact, this is one exception to the rule about sending units through their territory. If you are doing it to attack the barbarians, you are seen as a protector, not an invader, and there is no penalty. Another way to gain influence is by completing a quest from a city state. Each city state you are in contact with will periodically give you a quest, and if you fulfill it you will gain influence points. This can include killing a barbarian camp or killing nearby barbarian units (though you can do that at any time, you don’t need a quest). Some others include acquiring a Great Person of a certain kind, building a certain World Wonder, bullying another city state, finding a Natural Wonder, and so on. You do not need to fulfill a quest. For example, if your strategy calls for allying with other city states, you might want to pass on bullying another city state. There is no penalty for not fulfilling a quest, just a bonus when you do fulfill one. Another way to gain influence is with gifts. The most effective is Gold, and one large sum is more effective than several small ones. For a Diplomatic victory strategy, you should plan on having a large Treasury as you approach the end game so that you can buy allies in time for the crucial vote. You can also gain a small amount of influence points by gifting units. I make it a practice to do this whenever I have units that I don’t want any longer. These could be obsolete units that have no upgrade path, for instance. I don’t want to pay maintenance on them as that is a drain on my Treasury, and I could just delete them, but gifting them to a city state gives me a small amount of influence. Another way to get a big jump in your influence with a city state is to capture and then a return one of their Workers. Most often this happens when a barbarian has captured the Worker, and then you capture it. You have the option of keeping the Worker for yourself, and in the early game I would probably do that because the Worker is so valuable. But at a certain point I have enough Workers, and getting the 45 influence points for returning it starts to be more effective. Remember that you have to keep earning influence points to keep up your relations, so even if you get an ally of a city state for a few turns. it will naturally decay back to Neutral. By around the middle of the game if you playing well you can start to invest the resources needed to maintain your relationships. City States and War If you are allied with a city state and you get into a war with another player, a city state you are allied with will join you in the war. Of course, the same is true for the other player, so the war between the two players could also involve 3-4 city states dragged in as allies. You cannot make peace with a city state while it is allied to a player you are at war with. You have to first make peace with that player (or wipe them out if that suits you). However, if you can get more influence with that city state and supplant the other player you can get that city state to ally with you can turn around and attack your enemy. Generally a large cash gift can do this, once again showing the utility of a fat Treasury. Exploration You cannot have diplomatic relations with a city state you haven’t met, so this reinforces the idea that you have to explore the map as soon as possible. Of course, you have to balance this with other priorities, such as expanding your cities and defending them, but finding the right balance is what all the Civilization games are about. On most maps this means you should be giving some attention to developing your naval power and technologies. There seems to be a bias to city states being coastal, and in many cases they are on small islands. Of course there are a number of motivations for exploring the map. First of all, you need intelligence of what you are up against with the other players. And unless you are on a very large land mass, you will want to find added lands for settlement. Finding Natural Wonders adds to Happiness in your Empire, so finding them all is important. And last, the unexplored sections of the map have a strong tendency to spawn barbarian units against you. Early on you cannot traverse Ocean tiles and need to stick to Coastal tiles. The unit here is the Trireme, which you can build once you discover Sailing. I will usually build 1-2 Triremes in a coastal city to go around the coast of the land mass I am on and scout out the situation. If another land mass or island is sufficiently close I can cross to it without entering an Ocean tile and extend my exploration. But to really explore the whole map you need to get to Caravels. This Renaissance Era unit becomes available when you discover Astronomy, and is essentially a naval scouting unit. It can enter Ocean tiles. Links: https://civilization.fandom.com/wiki/City-state_(Civ5) https://civ-5-cbp.fandom.com/wiki/Detailed_Guide_to_Diplomacy https://www.palain.com/gaming/civilization-v/playing-civilization-v-part-9/ Provide feedback on this episode.

  7. MAR 3

    HPR4587: UNIX Curio #1 - Shell Archives

    This show has been flagged as Clean by the host. This is the first column in a series dedicated to exploring little-known—and occasionally useful—trinkets lurking in the dusty corners of UNIX-like operating systems. This month's column was inspired by an article on the Linux Journal web site 1 describing a custom-built script that would contain a binary tar archive and, when run, would extract the contents onto the user's system. Upon reading this, memories immediately came rushing back of the days of Usenet, before MIME-encoded e-mail made sending file attachments standard 2 , and where we walked ten miles each way to school (uphill both ways!) in three feet of snow. Yes, at that time, you had to put everything into the body of your message. But what if you needed to send a bunch of files to someone? There was tar , but the format differed between systems, and e-mail and Usenet could only reliably handle 7-bit plain-text ASCII anyhow. You could send separate e-mail messages (but what if one goes missing?) or put "CUT HERE" lines to designate where one file ends and another one begins (tedious for the recipient). The solution was a shell archive created by the shar program. This wraps all your files in a neat shell script that the recipient can just run and have the files magically pop out. All he needs is the Bourne shell and the sed utility, both standard on any UNIX-like system. Suppose you had a directory named "foo" containing the files bar.c, bar.h, and bar.txt, and wanted to send these. All you'd need to do is run the following command, and your archive is on its way. $ shar foo foo/* | mail -s "Foo 1.0 files" bob@example.com When the recipient runs the resulting script, it will create the foo directory and copy out the files onto his system. You can also pick and choose files; if you wanted to leave out bar.txt, you could do shar foo foo/bar.c foo/bar.h or, more simply, shar foo foo/bar.? . Different versions of shar have varying capabilities. For example, the BSD 3 and OS X 4 editions can only really manage plain-text files. If you had a binary object file bar.o, it'd likely get mangled somewhere along the way if you tried to include it in an archive. They also require, as in the examples above, that you name a directory before naming any files inside it (the typical way is to let the find command do the work for you; it produces a list in the right order). The GNU implementation is more flexible and can take just a directory name, automatically including everything underneath. It can also handle binary files by using uuencode—a method for encoding data as ASCII that predated the current base64 MIME standard. GNU shar rather nicely auto-detects whether the input file is text or binary and acts accordingly, and can even compress files if asked. However, unpacking encoded or compressed files from such an archive requires the recipient to have the corresponding decode/uncompress utility, and the documentation is littered with (now somewhat anachronistic) warnings about this 5 . Looking at other UNIX systems, the HP-UX version 6 also can uuencode binary files, and as a special bonus adds logic to the script that will compile and use a simple uudecode tool if the recipient doesn't already have one. It will even handle device files and put the corresponding mknod commands into the script, probably making it the most full-featured implementation of all. IBM's AIX doesn't appear to come with shar . Neither do SunOS and Solaris, which seems quite odd as original development of the program is credited to James Gosling 5 ! And so we bid farewell to shar . Next time you're considering rolling your own script for a particular purpose, consider whether such a tool might already exist, just waiting on your system for you to use it. References: Add a Binary Payload to your Shell Scripts https://www.linuxjournal.com/content/add-binary-payload-your-shell-scripts MIME (Multipurpose Internet Mail Extensions) Part One https://datatracker.ietf.org/doc/html/rfc1521 BSD shar manual page https://man.freebsd.org/cgi/man.cgi?query=shar&sektion=1&manpath=4.4BSD+Lite2 macOS 26.2 shar manual page https://man.freebsd.org/cgi/man.cgi?query=shar&sektion=1&manpath=macOS+26.2 GNU shar utilities manual https://www.gnu.org/software/sharutils/manual/sharutils.html HP-UX Reference (11i v3 07/02) - 1 User Commands N-Z (vol 2) https://support.hpe.com/hpesc/public/docDisplay?docId=c01922474&docLocale=en_US This article was originally written in May 2010. The podcast episode was recorded in February 2026. Provide feedback on this episode.

4.2
out of 5
34 Ratings

About

Hacker Public Radio is an podcast that releases shows every weekday Monday through Friday. Our shows are produced by the community (you) and can be on any topic that are of interest to hackers and hobbyists.

You Might Also Like