So after me nagging him for a year or more @mathsppblog has finally seen the light regarding Mastodon! (Unlikely because of me, but I’ll take the win).
He’s not tooted yet, but if #Python is your thing I highly recommend you follow my fellow ex-#Textual developer and one of the 67%.
He sometimes does some maths stuff too I believe. 🤷🏻♀️
I’ve just released v0.14.0 of Tinboard, my #Pinboard client for the #Terminal. This release adds the start of an application settings dialog, with the first couple of options letting you set the default value for the "private" and “read-later" state of new bookmarks.
Normal people using AI: look how stupid this shit is!!
Terence Tao using AI: As an experiment, I asked #ChatGPT to write #Python code to compute, for each 𝑛, the length 𝑀(𝑛) of the longest subsequence of (1,\dots,n) on which the Euler totient function ϕ is non-decreasing. For instance, 𝑀(6)=5, because ϕ is non-decreasing on 1,2,3,4,5 (or 1,2,3,4,6) but not 1,2,3,4,5,6. Interestingly, it was able to produce an extremely clever routine to compute the totient function (that I had to stare at for a few minutes to see why it actually worked), but the code to compute (M(n)) was slightly off: it only considered subsequences of consecutive integers, rather than arbitrary subsequences. Nevertheless it was close enough that I was able to manually produce the code I wanted using the initial GPT-produced code as a starting point, probably saving me about half an hour of work. (and I now have the first 10,000 values of (M)). The results were good enough that I would likely turn to GPT again to provide initial code for similar calculations in the future. https://chat.openai.com/share/a022e1d6-dddc-4817-8bbd-944a3e742d9f
Remember that #Python dicts can have tuples as keys! Consider a dict with (x,y) keys instead of nested lists for a grid. It simplifies sparse grids, "resizes" are automatic, it doesn't matter where (0,0) is, and you can use negative positions:
A few years ago, I wrote some code to post Untappd check-ins to Mastodon. I've recently updated it to also post a photo of the beer you're enjoying. First up, you'll need a file called config.py to hold all your API keys: instance = "https://mastodon.social" access_token = "…" write_access_token = "…" untappd_client_id = "…" untappd_cli…
Live music at the Brangwyn Hall tonight - mind blown by Caroline Shaw's "The Observatory"
Sunset & sea smell & birdsong
Beginning to understand #Python well enough to start wrangling some local data to "Dig Where I Stand" (any tips for styling matplotlib to only display years on the x axis? #WholeLottaTicks)
Does your laptop have a mind of its own? Robert Neuwirth shares a file that booted up on his screen and wrote itself to the hard drive in The Disambiguation.
Catch this exclusive short story and listen to Neuwirth explain why he filled it with computer code at https://fictionable.world
WTFs at LLMs being silly aside… I’ve got the core loop of the interaction code really narrowed down now. async context manager to hide all the detail FTW!
Solve a puzzle for me ( sopuli.xyz )
Source