@geraldew@fosstodon.org avatar

geraldew

@geraldew@fosstodon.org

Data analyst and programmer

This profile is from a federated server and may be incomplete. Browse more on the original instance.

popey, to linux
@popey@ubuntu.social avatar

🚨 FRIDAY QUIZ TIME 🚨
I have just provisioned a new dedicated server. It's been deployed running 22.04.3. I SSH'ed in as root, given the provided credentials. 🤓
QUESTION: What's the very first command I typed after logging in? 🤔

geraldew,
@geraldew@fosstodon.org avatar

@popey well, I don't know you, but I do know of people who barely draw breath before installing emacs on any system.

And it makes me feel old that I could have given this same guess for quite some decades.

array, to python
@array@fosstodon.org avatar

I like . It was the first programming language I tried, it had a reputation of being easy to learn and yeah, it was. What I don't really understand is how it has become so popular (# 1 in the TIOBE index...) and pervasive (you find it in areas where it seems like logic for a scripting language, but in others where you wouldn't bet for it too). It shines where it shines, but aren't really there better options in some of the niches it is being used for?

geraldew,
@geraldew@fosstodon.org avatar

@array @clacke all the more reason to see its position as a very good prototyping language. Perfect for demonstrating what the final program should do, much of how it can work and good enough to use until the "production" replacement is completed.

geraldew, to random
@geraldew@fosstodon.org avatar

Last night's program-not-working situation has this morning been resolved by finding it was silently crashing with a file I/O error.

I have coded a fix for handling that but now I'm loathe to remove that bad file as its presence is clearly a useful thing to test every part of my program.

This seems to beg a question of how I could deliberately create (and re-replicate) a test file that would give an I/O error.

Not sure if I'm ready for that rabbit hole on a Sunday morning.

campuscodi, (edited ) to random
@campuscodi@mastodon.social avatar

A Halycon report outs Cloudzy as an Iranian web hosting company that supports APT, ransomware, and spyware operations

https://www.halcyon.ai/blog/report-ransomware-command-and-control-providers-unmasked-by-halcyon-researchers

geraldew,
@geraldew@fosstodon.org avatar

@campuscodi or maybe "outs" them?

geraldew,
@geraldew@fosstodon.org avatar

@campuscodi ah mate, at the speed you must plough information I'm amazed your words are always in the right order.

Besides, at my age every second word I type has letters reversed so I'm more about helpful typo spotting than throwing stones in glass houses.

Quokka, to infosec

Just got the bus home. The guy in front of me got his laptop out. Odd for this route. Long story short, he's an Accenture contractor working in Rio Tinto and really didn't seem to mind me seeing spreadsheets with details of much of their networking equipment, PuTTY sessions, usernames, emails, project names etc. Might dob him in

geraldew,
@geraldew@fosstodon.org avatar

@Quokka I'd forgotten that aspect of Perth life. Used to have similar experiences on my commute buses there.

Would also get pairs of St George's Tce suits discussing wheels and deals.

In Melbourne, with two universities in the CBD it's always students instead, so I just see their assignments in progress. Or books, very much a city of readers here.

jamescooke, (edited ) to python
@jamescooke@fosstodon.org avatar

🧠 A new tool where I:

1. pick my Python version 👈 Edit: Don't need this actually (thanks @orsinium)

  1. type in what I want

... And it tells me if I should be using an Enum, Dataclass or NamedTuple 😬 or even installing attrs and using that.

geraldew,
@geraldew@fosstodon.org avatar

@jamescooke next you'll be wanting an index that separates the PEP numbers between those that are really useful and/or improve the language and it's use versus those that just jump this "simple language" further over the shark.

geraldew,
@geraldew@fosstodon.org avatar

@jamescooke actually I find in practice there are really only two versions of Python

  • whatever version is on the setup that you're forced to use but which is managed by someone else so it can't be upgraded
  • where you can upgrade it in which case it's whatever version you could quite be bothered putting in place and/or virtualenving.

Sure, the actual version numbers involved vary a bit, but those seem to be the two situations I encounter.

geraldew,
@geraldew@fosstodon.org avatar

@jamescooke at this point I'd just be happy to have a definitive way to annotate exactly what combinations of structures I've imagined for my code to use.

Quite literally from last night's coding notes:

  • a dictionary keyed by pathfilename string with values being a named tuple
  • a dictionary keyed by a tuple of 1, 2 or 3 parts with values being lists of pathfilename strings
  • a dictionary keyed by a tuple of 1,2,3 or 4 parts with values being lists of pathfilename
simon, to random
@simon@simonwillison.net avatar

I finally spent some time figuring out a minimal way of developing and packaging a Python library using a pyproject.toml file

It turns out you can do it with just a pyproject.toml file - no setup.py, no setup.cfg - and the only tools you need are pip and build, with no need to use Poetry/Hatch/Flit/etc for the simplest case

https://til.simonwillison.net/python/pyproject

geraldew,
@geraldew@fosstodon.org avatar

@simon my open question is how dependent that method is on all usages - both building and importing - being for having quite current versions of Python running.

Every time I read about changes to the packaging approaches, the "depends on Python X.YZ" seems to be left unsaid.

Maybe there's no such dependency but with nothing said I don't feel I can trust to that.

liztai, to escribiendo
@liztai@hachyderm.io avatar

Hello
Apparently has changed their privacy policy and now says that they'll scrape everything you post online to train their AI tools.
I even post my online on & my blog and now wonder if this is a bad idea.
They say paywalls could deter the scraping.
What do you think writers can do to protect their content? Or should we just roll over and accept that this is the way things will be from now on?

https://gizmodo.com/google-says-itll-scrape-everything-you-post-online-for-1850601486

geraldew,
@geraldew@fosstodon.org avatar

@liztai that question gets my nerd side looking to the Bruce Schneier tome on my bookshelf and wondering if there's a encryption protocol that would do that.

Or, another way is that each reader supplies their public key and then gets to pull down a personally encrypted copy that only they can decrypt. That lets all your subscribers read your work but only them. For text, the load should be light.

(Of course, each reader could then on-forward so it's not about stopping that.)

Sounds doable.

jbzfn, (edited ) to programming
@jbzfn@mastodon.social avatar

deleted_by_author

  • Loading...
  • geraldew,
    @geraldew@fosstodon.org avatar

    @jbzfn I tend to write in every language as though it's Pascal so I do that too with Python. So in spirit I nod my head to your comments there.

    But, so far, I'm not seeing the point of type hinting in Python as the language itself just ignores them and any dynamic run-time value type change will not be detected by a linter.

    Ironically as an SQL coder I've been contrarily avoiding dataclasses to force myself to learn and use vanilla Python. Maybe it's time I revert that.

    geraldew, to random
    @geraldew@fosstodon.org avatar

    One of the things I learnt many years ago is that you usually can't fight battles about how people "should" use words/terms.

    By the time you feel a need to argue, with "should", the majority have already adopted a usage that you simply won't shift. Wishing I'm wrong about that won't change the fact.

    Instead you can write clearly about concepts, as those are what's important anyway. You can adapt the words you use as language changes - and in the tech domain, language certainly evolves.

    geraldew, to opensource
    @geraldew@fosstodon.org avatar

    FOSS licenses come in two approaches. The distinction is who is granted the most freedom:

    • in "copyleft" licenses the emphasis is on the end-user, ensuring that they are always passed the four freedoms;

    • in "permissive" licenses, the emphasis is on other developers/programmers, including allowing them to not pass on the four freedoms.

    Is disappointing people still mistake this as being a difference between and because each has always supported both types.

    walkerb, to programming

    I'm not a python guy, but I spent half an hour tonight as I waited for my dishwasher to finish, playing with the tkinter library.

    The old windows forms guy in me liked it. And it seamlessly handled a task thats a pain in the C# Linux combo.

    Fun stuff.

    geraldew,
    @geraldew@fosstodon.org avatar

    @walkerb I'm still calling myself a new-to-Python person and just used Tkinter because it comes "with" Python.

    From what I'd read about it I expected to soon move onto something else but haven't seen any need yet. Of course my needs are probably still simple.

    The oddity is that it gets criticised for the default style being old fashioned yet seems to be simple to re-skin.

    I like the logic of the .pack system and am not seeing similar in other libraries.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • tacticalgear
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • Durango
  • cubers
  • Youngstown
  • mdbf
  • slotface
  • rosin
  • ngwrru68w68
  • kavyap
  • GTA5RPClips
  • provamag3
  • ethstaker
  • InstantRegret
  • Leos
  • normalnudes
  • everett
  • khanakhh
  • osvaldo12
  • cisconetworking
  • modclub
  • anitta
  • tester
  • megavids
  • lostlight
  • All magazines