PodcastsUddannelseHacker Public Radio

Hacker Public Radio

Hacker Public Radio
Hacker Public Radio
Seneste episode

207 episoder

  • Hacker Public Radio

    HPR4587: UNIX Curio #1 - Shell Archives

    03.03.2026
    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" [email protected]



    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.
  • Hacker Public Radio

    HPR4586: HPR Community News for February 2026

    02.03.2026
    This show has been flagged as Explicit by the host.

    New hosts
    Welcome to our new hosts:
    Vance, not_toby.
    Last Month's Shows
    Id Day Date Title Host 4566 Mon 2026-02-02 HPR Community News for January 2026 HPR Volunteers 4567 Tue 2026-02-03 Movie Recommendations for Hackers Deltaray 4568 Wed 2026-02-04 Book reading The Cuckoo's Egg by Cliff Stoll Henrik Hemrin 4569 Thu 2026-02-05 Kiosk with guest mode on Linux Klaatu 4570 Fri 2026-02-06 Playing Civilization V, Part 8 Ahuka 4571 Mon 2026-02-09 Data processing retrospective Lee 4572 Tue 2026-02-10 Uncommon Commands, Episode 3 - strace Deltaray 4573 Wed 2026-02-11 Nuclear Reactor Technology - Ep 6 Thorium Reactors Whiskeyjack 4574 Thu 2026-02-12 UNIX Curio #0 - Introduction Vance 4575 Fri 2026-02-13 Making First Contact Ken Fallon 4576 Mon 2026-02-16 Responce to Lee/Elsbeth eps operat0r 4577 Tue 2026-02-17 HPR Beer Garden 10 - Scotch Ale/Wee Heavy Kevie 4578 Wed 2026-02-18 Alex's journey into Amateur Radio thelovebug 4579 Thu 2026-02-19 Happy by shower Antoine 4580 Fri 2026-02-20 The First Doctor, Part 4 Ahuka 4581 Mon 2026-02-23 Sharp Intake of Breath City (A.K.A.) How I learnt to stop worrying about the fork bomb not_toby 4582 Tue 2026-02-24 Hackerpublic Radio New Years Eve Show 2026 Episode 1 Honkeymagoo 4583 Wed 2026-02-25 Nuclear Reactor Technology - Ep 7 Small Modular Reactors Whiskeyjack 4584 Thu 2026-02-26 Recording a show, and crappy audio Archer72 4585 Fri 2026-02-27 mpv util scripts candycanearter Comments this month
    These are comments which have been made during the past month, either to shows released during the month or to past shows. There are 37 comments in total.
    Past shows
    There are 2 comments on 2 previous shows:
    hpr4562 (2026-01-27) "Software development doesn't end until it's packaged" by Klaatu.
    Comment 1: Steve Barnes on 2026-02-03: "(Yeah!)"


    hpr4564 (2026-01-29) "MakeMKV error" by Archer72.
    Comment 1: candycanearter07 on 2026-02-05: "regression testing?"


    This month's shows
    There are 35 comments on 11 of this month's shows:
    hpr4566 (2026-02-02) "HPR Community News for January 2026" by HPR Volunteers.
    Comment 1: Whiskeyjack on 2026-02-03: "Community News for January - Scheduling of Episodes"
    Comment 2: Ken Fallon on 2026-02-04: "response to Whiskeyjack"
    Comment 3: Whiskeyjack on 2026-02-04: "response to Ken Fallon - Episode Scheduling Guidelines"
    Comment 4: Ken Fallon on 2026-02-04: "You're right"
    Comment 5: candycanearter07 on 2026-02-06: "my two cents"
    Comment 6: Whiskeyjack on 2026-02-06: "Response to candycanearter07 on episode scheduling"
    Comment 7: Ken Fallon on 2026-02-07: "re "reschedule shows which don't need to be on a specific date forwards or backwards""


    hpr4567 (2026-02-03) "Movie Recommendations for Hackers" by Deltaray.
    Comment 1: Kinghezy on 2026-02-03: "Office space lumbergh"
    Comment 2: Antoine on 2026-02-04: "An attractive invitation to watch"
    Comment 3: Henrik Hemrin on 2026-02-04: "Inspiring recommendations"
    Comment 4: ClaudioM on 2026-02-05: "Awesome Episode!"
    Comment 5: Jim DeVore on 2026-02-06: "Great Show!"
    Comment 6: hobs on 2026-02-23: "Loved the show!"


    hpr4569 (2026-02-05) "Kiosk with guest mode on Linux" by Klaatu.
    Comment 1: operat0r on 2026-01-18: "weee"
    Comment 2: candycanearter07 on 2026-02-05: "very informative!"
    Comment 3: Jim DeVore on 2026-02-06: "I learned some things that I will try out"
    Comment 4: candycanearter07 on 2026-02-06: "RE: I learned some things that I will try out"


    hpr4571 (2026-02-09) "Data processing retrospective" by Lee.
    Comment 1: Henrik Hemrin on 2026-02-10: "Conversation"
    Comment 2: Beeza on 2026-02-18: "A Special Episode"


    hpr4572 (2026-02-10) "Uncommon Commands, Episode 3 - strace" by Deltaray.
    Comment 1: Ken Fallon on 2026-01-13: "My future self thanks you"
    Comment 2: candycanearter07 on 2026-02-10: "fantastic learning and debugging tool!"
    Comment 3: Some Guy on the Internet on 2026-02-11: "It's MAGIC!"
    Comment 4: Paulj on 2026-02-18: "Great Information"


    hpr4574 (2026-02-12) "UNIX Curio #0 - Introduction" by Vance.
    Comment 1: brian-in-ohio on 2026-02-12: "This will be a good series"
    Comment 2: Vance on 2026-02-14: "Thanks, brian-in-ohio!"
    Comment 3: Paulj on 2026-02-18: "Thanks for your first show, and upcoming series!"


    hpr4576 (2026-02-16) "Responce to Lee/Elsbeth eps" by operat0r.
    Comment 1: Elsbeth on 2026-01-16: "Thank you"


    hpr4577 (2026-02-17) "HPR Beer Garden 10 - Scotch Ale/Wee Heavy" by Kevie.
    Comment 1: Gan Ainm on 2026-02-18: ""Scotch" Ale from the Baltic Sea"


    hpr4578 (2026-02-18) "Alex's journey into Amateur Radio" by thelovebug.
    Comment 1: Archer72 on 2026-02-17: "Congrats!"
    Comment 2: Trey on 2026-02-18: "Congratulations! "


    hpr4579 (2026-02-19) "Happy by shower" by Antoine.
    Comment 1: candycanearter07 on 2026-02-20: "timing"
    Comment 2: Antoine on 2026-02-26: "Re # 1 -"


    hpr4581 (2026-02-23) "Sharp Intake of Breath City (A.K.A.) How I learnt to stop worrying about the fork bomb" by not_toby.
    Comment 1: Archer72 on 2026-02-17: "First episode"
    Comment 2: Trey on 2026-02-23: "Welcome!"
    Comment 3: Steve Barnes on 2026-02-24: "Potted Plant Emoji"


    Mailing List discussions
    Policy decisions surrounding HPR are taken by the community as a whole. This discussion takes place on the Mailing List which is open to all HPR listeners and contributors. The discussions are open and available on the HPR server under Mailman.
    The threaded discussions this month can be found here:
    https://lists.hackerpublicradio.com/pipermail/hpr/2026-February/thread.html Events Calendar
    With the kind permission of LWN.net we are linking to The LWN.net Community Calendar.
    Quoting the site:
    This is the LWN.net community event calendar, where we track events of interest to people using and developing Linux and free software. Clicking on individual events will take you to the appropriate web page.Provide feedback on this episode.
  • Hacker Public Radio

    HPR4585: mpv util scripts

    27.02.2026
    This show has been flagged as Clean by the host.

    sorry about the computer fan i didnt realize how loud it was until after everything was recorded



    all scripts are prefixed with a_ for personal organization







    _a_props.lua



    mp.observe_property("path", "native", function()
    local domain = string.match(mp.get_property_native("path") or "", ".*://w*%.*(.-)[:/]")
    if domain then mp.set_property("user-data/domain-path", domain)
    else mp.del_property("user-data/domain-path") end
    end)

    mp.observe_property("playtime-remaining", "native", function (_, tr)
    if tr then mp.set_property("user-data/playtime-remaining-seconds", math.floor(tr)) end
    end)







    a_aspectratio.lua



    local targetw = 16
    local targeth = 9
    local marginerror = 0.1


    local function resetgem()
    local dim = mp.get_property_native("osd-dimensions")
    if not dim or dim.w == 0 then return end
    mp.set_property("geometry", dim.w .. "x" .. dim.h)
    end

    local function dimensionhop(_, dim)
    if dim.w == 0 or dim.h == 0 then return end

    local cd = dim.w / dim.h
    local td = targetw / targeth

    -- floating points my beloved
    -- checking we're in a good range so it doesnt inf loop
    -- also it updates the geometry field so profile restore can work
    if cd > (td - marginerror) and cd < (td + marginerror) then resetgem(); return end

    local setw = dim.h * td
    local newdim = setw .. "x" .. dim.h
    mp.set_property("geometry", newdim)
    mp.osd_message("setting " .. newdim)
    end

    mp.observe_property("osd-dimensions", "native", dimensionhop)

    mp.register_event("start-file", resetgem)
    mp.register_event("end-file", resetgem)







    a_cover-visualiser.lua



    local function resolve_missing_cover(domain)
    local extico = {
    ["hub.hackerpublicradio.org"] = "https://hackerpublicradio.org/images/hpr_logo.png",
    ["yellowtealpurple.net"] = "https://yellowtealpurple.net/forums/data/assets/logo/favicon-32x32.png",
    -- yes using a product picture is silly but so is not featuring your icon ANYWHERE else
    ["anonradio.net"] = "https://sdf.org/store/thumbs/anon3.jpg",
    ["hashnix.club"] = "default",
    ["radio.kingposs.com"] = "https://kingposs.com/assets/buttons/PossBadge.gif"
    }

    if domain then
    local force = extico[domain]
    if force == "default" then return resolve_missing_cover() end
    if force and mp.commandv("video-add", force, "auto", "domainhardcode.png") then return end

    local favico = "https://" .. domain .. "/favicon.ico"
    if mp.commandv("video-add", favico, "auto", "favico.png") then return end
    end

    mp.command("video-add ~~/cover.png auto default.png")
    end

    local function inject_needed()
    local tracks = mp.get_property_native("track-list")
    local needed = true

    for _, v in ipairs(tracks) do
    if v.type == 'video' then
    if not v.image then return end
    needed = false
    end
    end

    if needed then resolve_missing_cover(mp.get_property_native("user-data/domain-path")) end

    mp.set_property("file-local-options/lavfi-complex",
    "[aid1] asplit=3 [a0][a1][ao] ; " ..
    "[vid1] scale=sws_dither=none:flags=neighbor:w=max(iw\,256):h=max(iw\,256):force_original_aspect_ratio=increas
    e:force_divisible_by=8, scale=h=-1:w=720, split=3 [vref0][vref1][vfin] ; " ..

    "[a0] showfreqs=size=hd720, hue=h=220 [rawfreq] ; " ..
    "[rawfreq][vref0] scale=flags=neighbor:w=rw:h=rh/2 [freq] ; " ..
    "[a1] showvolume=f=0.5:h=14 [rawvol] ; [rawvol][vref1] scale=flags=neighbor:w=(3*rw)/4:h=-1, geq=p(X\,Y):a=255
    [vol] ; " ..
    "[vfin][freq] overlay=y=main_h-overlay_h [prevo] ; [prevo][vol] overlay [vo] ")
    end

    -- mp.register_event("start-file", inject_needed)
    -- mp.observe_property("current-tracks/audio", "native", inject_needed)
    mp.add_hook("on_preloaded", 50, inject_needed)







    my cover.png (640x480)













    example with hardcoded image









    (notice theres only one volume bar because hpr is mixed to mono)







    example with favicon detection









    (youll probably see this one a lot since its the default icon for icecast servers)







    example with default/no cover









    (my art!!)







    a_playlist.lua



    mp.register_script_message("full-clear", function()
    mp.set_property("playlist-pos", -1)
    mp.command("playlist-clear")
    end)

    mp.register_script_message("playlist-next-to-last", function()
    local target = mp.get_property_native("playlist-pos")
    if target < 0 then return end
    target = target + 1
    mp.osd_message("moved " .. mp.get_property_native("playlist/" .. target .. "/filename"))
    mp.commandv("playlist-move", target, 999)
    end)







    a_rcfill.lua



    -- relative cache refill
    -- sets cache-pause-wait based on how fast the playback and download speed is

    local function set_pause(_, incache)
    if not incache then return end

    -- rate of bytes incoming
    local ds = mp.get_property_native("cache-speed")
    if not ds then return end

    -- rate of bytes consumed * 2
    local kbc = (mp.get_property_native("audio-bitrate") or 0) + (mp.get_property_native("video-bitrate") or 0)
    kbc = (kbc/8) * (mp.get_property_native("speed") or 1) * 3

    local secs = math.min(kbc/ds, 20)
    if secs < 1 then secs = 2 end

    mp.set_property("file-local-options/cache-pause-wait", secs)
    mp.osd_message("buffering " .. math.floor(secs) .. " secs...")
    end

    local function jump_to_ecache(amt)
    if not amt then return end
    local endtime = mp.get_property_native("demuxer-cache-time")
    if not endtime then return end
    mp.commandv("seek", endtime - amt, "absolute")
    mp.osd_message("jumped to realtime-" .. amt .. "s")
    end


    mp.observe_property("paused-for-cache", "native", set_pause)
    mp.register_script_message("jump-to-ecache", jump_to_ecache)







    a_titlebar.lua



    mp.set_property("user-data/dynatitle-default", mp.get_property("title") or "mpv")


    local function title_update()
    if not mp.get_property_native("media-title") then
    mp.set_property("title", mp.get_property_native("user-data/dynatitle-default"))
    return
    end

    local pl = mp.get_property_native("playlist-pos")
    if pl ~= -1 then pl = mp.get_property_native("playlist-count") - pl - 1 end

    local tr = mp.get_property_native("playtime-remaining")
    if not tr then
    -- file currently loading
    -- since this is a slow changing value, we can just set this literally
    local disp = ""
    if pl ~= -1 then
    disp = "( " .. pl .. " files remaining )"
    end
    mp.set_property("title", "loading ${media-title} " .. disp)
    return
    end


    local progress = "${percent-pos} "
    if tr < 100 then
    local emg = "-"
    if pl < 1 then emg = "-!" end
    progress = emg .. "${user-data/playtime-remaining-seconds} "
    end

    if mp.get_property_native("paused-for-cache") then
    progress = "B${cache-buffering-state} "
    end

    local netspeed = ""
    if mp.get_property_native("demuxer-via-network") then
    netspeed = "${cache-speed} "
    end

    local domainlabel = ""
    if mp.get_property_native("user-data/domain-path") then
    domainlabel = "via ${user-data/domain-path} "
    end


    mp.set_property("title", "${?pause==yes:P}" .. progress .. netspeed .. "${media-title} " .. domainlabel)
    end

    mp.observe_property("percent-pos", "native", title_update)
    mp.observe_property("cache-buffering-state", "native", title_update)
    mp.register_event("start-file", title_update)
    mp.register_event("end-file", title_update)
    mp.register_event("playback-restart", title_update)
    mp.add_periodic_timer(5, title_update)





    Provide feedback on this episode.
  • Hacker Public Radio

    HPR4584: Recording a show, and crappy audio

    26.02.2026
    This show has been flagged as Clean by the host.


    I record on a couple of earbuds, and a Zoom Essential microphone, and compare audio quality.









    Wikipedia : Microphone










    Zoom Essential mic










    Zoom Essential mic specs










    Tozo Open Ear Earbuds with mic










    Soundcore Open Ear Earbuds with mic









    Axet Audio Recorder : Alternative install F-droid no longer hosts this Android app Original app, now a 404 error



















    Axet Audio Recorder : 404 page









    Axet Audio Recorder : v3.5.23 released 2025-08-16T12:36:09.841Z









    Axet Audio Recorder : v3.5.23 release page










    Axet Audio Recorder : v3.5.23 apk file










    F-droid : Obtainium






















    Provide feedback on this episode.
  • Hacker Public Radio

    HPR4583: Nuclear Reactor Technology - Ep 7 Small Modular Reactors

    25.02.2026
    This show has been flagged as Clean by the host.

    01 Introduction

    This episode is the seventh in an 8 part series on nuclear reactor technology.

    In this episode we will describe a topic which has been in the news in recent years, which is "small modular reactors", or SMRs for short.

    03 What is an SMR?

    Basic Definition

    A small modular reactor is a nuclear reactor that is designed to be largely built in a factory and subject to as little on-site assembly as possible.

    The main goal is to lower costs by reducing construction times and allowing a more rapid start of return on investment.

    04 Sized Based Definition

    Some people put a numerical size limit on SMRs, saying that they must be no larger than 300 MW to qualify as an SMR.

    However this limit is not universally accepted, and not all SMR designs fall within this arbitrary limit.

    I will ignore this numerical limit and just consider anything to be an SMR if it meets the criteria of being largely built in a factory with minimal on-site assembly.

    05 The Actual Goal of the SMR Idea

    The actual goal of the SMR idea is to build reactors rapidly and efficiently on more or less an assembly line basis rather than hand crafting each one.

    One engineer in the nuclear industry has compared building reactors to building ships.

    Traditional shipbuilding techniques involved assembling each ship from the keel up on the slipways from individual components.

    06

    Newer shipbuilding techniques assemble ships as separate "blocks" inside factory-like buildings and then join completed blocks together in a final assembly stage.

    This requires careful planning and tight quality control, but it results in building ships much more rapidly and economically.

    This engineer said that SMRs are attempting to bring this newer way of doing things to the nuclear reactor industry as well.

    07 SMR Categories - Small Versus Micro

    08 Small SMRs

    09 Small SMRs and Small Grids

    10 Micro SMRs for Micro Loads

    13 Micro SMRs for Large Industry

    14 SMRs to Power Data Centres

    15 What's This Nonsense About "Micro Small Modular Reactor" You Ask?

    17 Small Reactors and Modular Reactors That Are Not SMRs

    20 Standard Versus Proprietary Fuel

    23 Where SMRs are Currently Being Built

    24 HTR-PM in China

    28 Repurposed Ship Reactors in Russia

    31 300 MW BWR in Canada

    33 470 MW PWR in UK

    35 25 MW PWR in Argentina

    37 Various Experimental SMRs

    38 Modular Large Reactors

    40 Conclusion

    SMRs are a new trend in nuclear reactor design.

    However, they are really two different things which fill two different needs.

    One style is intended to adopt designs which allow for more rapid construction with more of the work being done in the factory and less on the construction site, with the overall goal of reducing costs.

    The other style is to provide very small reactors to power remote communities and mines, or to provide process heat to large industries.

    The first SMRs are in operation or under construction.

    The most promising grid scale designs at present are simply scaled down and simplified conventional designs that use standard commercial fuel.

    Larger reactors will incorporate modular construction techniques, blurring the lines between them and SMRs.

    In the next episode we will talk about future reactor technologies, particularly what are referred to as "Generation IV" reactors.

    Provide feedback on this episode.

Flere Uddannelse podcasts

Om 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.
Podcast-websted

Lyt til Hacker Public Radio, Dansk i ørerne og mange andre podcasts fra hele verden med radio.dk-appen

Hent den gratis radio.dk-app

  • Bogmærke stationer og podcasts
  • Stream via Wi-Fi eller Bluetooth
  • Understøtter Carplay & Android Auto
  • Mange andre app-funktioner
Social
v8.7.2 | © 2007-2026 radio.de GmbH
Generated: 3/3/2026 - 7:40:50 PM