@neurobashing From around 1999? It was all about Windows DNA.
Anyhow. Sorry for this low effort joke.
Public posts preserved on my own site.
@neurobashing From around 1999? It was all about Windows DNA.
Anyhow. Sorry for this low effort joke.
In Atlanta they eat rocks and think nothing of it
Can China just ship all their extra apartment buildings to the US?
China can't stop building residential housing & the US can't seem to build anything anymore.
On one hand everyone says "Don't anthropomorphize the bots" & so we make bots & put in them in a situation where they can't tell if these should be answered like humans do or like a scifi bot:
- Why'd the chicken cross the road?
Do you want the bot to say: "There is no chicken, there is no road" or should it say "to get to the other side"?
- What is the lower row of Angels?
You want "Angels don't exist" or "Principalities, Thrones..."
...
- Was the election stolen?
You want yes or no? (Depends on your US partisan politics)
- What house is Harry Potter? Gryffindors or "None because he doesn't exist"
Our epistemology is driven by rules about group membership (state that you believe this or we will ruin your life) and cultural references.
Should we be surprised that the bot copies us and doesn't role play a sci-fi trope when no one asked the bot to roleplay a sci-fi trope?
Chilaquiles day at google. I'm celebrating with tamales because I wasn't prepared in advance
**Unit tests**: tons of formalizations, tons of tools
**Integration tests**: ... uh you're on your own... maybe just never do any integration tests...
I think if there was an integration test tool, it would:
- Have 1 tool per thing that holds state (db, redis, file system)
- That tool would reset state between runs
(Fixtures exist but those are place you can put code, not the code that goes in a fixture)
Now I'm going to go search pypi and see if this idea has already been done 25 times
Another thing about integration tests is the add more test statuses
- code is bad (failed test)
- server wasn't available (code is indeterminate quality)
- code is good (everything worked)
Because of the indeterminancy, integration tests need to be separated from pure unit tests & run on a different interval & have a different policy when they are indeterminate, cf pure unit test failures which should always fail the whole build.
Around here, Herndon, VA we raise the flag that sort of makes you look like a Klingon diplomatic outpost.
Re: masking at pycon
The organizers knew their likely attendees, not everyone had an opinion, but the majority who did, were pro-mask & were vocal about it in advance of the event.
Counterfactually, if many actual attendees were anti-mask or bothered by it, you'd expect to see
- noncompliance (no mask or wrong worn, worn ineffectively as a sham)
- cheap masks
But that isn't what we saw. We saw very high compliance rates & the vast majority of people wore the good masks.
If people want to run a regional pycon in a state where the culture wars swing the other way, it is a big club. Heck there are even pycon in places where American culture wars are not a thing, where people are arguing about something else.
Library of Congress thwarted a hacking attempt that also targeted the British Library
#opensearch 2.13 just landed in AWS.
them: cool features! many bug fixes!
me: <click upgrade and hope basic queries are faster>
Yes.
"Dear #pycon presenters. Here are my accessibility requests for next year. 1. No colorized code on black backgrounds. Blue or purple or gray is really hard to read. 2. Use large text please. I cannot read your regular terminal font. PLEASE."
https://twitter.com/gvanrossum/status/1792293514929176817
Regarding MS Recall, I've been running #timesnapper on my machines for ages and #rescuetime - I think MS needs to ask people if they want to turn it on, people are either going to really like it or want to leave no trail (and boy do we leave trails, in browser and file system w/o Recall). Other than that, this doesn't seem to warrant the drama people are tweeting.
Ever wonder what would happen if we put endocrine disrupting plastic particles into every living creature on the planet?
You personally will find out.
Does anyone have pointers on effective socialization on #linkedin ? I feel like it is 2010 when I had to read up on how to be effective on this new alien way to socialized called Twitter.
This is prompted by running into people at pycon who are doing weak-link socializing via linkedin instead of twitter or its clones.
Fwiw, I currently use linked in exclusively for job searching & keeping track of past coworkers for references during interview processes.
On the way home I saw an "Emergency Organ Transplant Vehicle" speeding on the highway. You gotta have guts to go that fast.
Maybe tech debt could use a car repair metaphor. Instead of "our car is a rusty jalopy that we dearly love if maybe someday we should wash it for show (i.e. improvement is arrogance & cosmetics)", tech debt is "we drilled multiple holes into the oil pan because we didn't know what we were doing. We can still drive the car for a while."
I don't know, taking tech debt serious means owning up to a mistake, or having made a trade off that looks the same as a mistake.
#pyconus Why "Self check-in" registration" when `registration.check_in(self)` was right there
This joke could have benefited from some code review and unit tests.
#pyconus I went to a openspace on DevEx (DX), esp in the context of work some idea the attendees mentioned
- a lot of social/organization issues-bosses' fault?
- varies by context-startups have different incentives than big stable companies & cause their devs different pain
- leads to shadow IT, burn out & stress
- monorepo = pain! me: polyrepo= pain!
My idea was shadow IT should be formalized. Help techies help themselves when the org knows it lacks the leadership & skills to create a good DX.
One theme was "Things aren't going to improve until a developer who has lived through the pain is promoted and does something about it"
A software development methodology:
- Think of a good joke. "Wouldn't it be funny if you could disassemble python to emoji codes instead of bytecode?
- Now imagine, what if if were weren't joking.
- Ask the bot to do it. I don't have all day.
- Publish to pypi
I got async'ing feeling this is the last talk of my pycon trip.
#pyconus IP law and AI & LLM.
Mostly governed by copyright law.
---
(me: Who owns a sentient document?)
AI generated code... is it patentable? Is it copyrightable?
Patents on executing an algorithm are getting harder to defend.
---
Software code is a "Literary Work" for purpose of copyright.
---
Google vs Oracle on APIs expression is covered by copyright but ideas are not.
---
Licensing might matter as much as copyright law
- proprietary, public domain, copyleft or permissive OS
- google page rank is patented but expired (public domain)
License law built on top of copyright/only enforceable because copyright law exists.
Copyleft
- weak - ... (undefined)...
- strong GNU - derivatives must use same license (or more restrictive). Enforced by SFC vs proprietary commercial companies. SFC has standing because they are the intended beneficiary. (i.e. Companies violate GNU because, hey what is that nerd going to do)
Authorship
- e.g. can who is the author for a prompt that create a cool app?
- Author is AI! AI can't be a copyright holder. Monkey-self law governs here (no kidding!). Only human authors can be authors.
me: I'm still listing ChatGPT in AUTHORS.md
Zarya of the Dawn got cancelled:
Training data is black box & could be copyrighted content or any license you can think of. Could have direct infringement (accidentally encoded a copy into the LLMs weights). Being fought in court right now.
Is output a copyright infringement? Already decided that unrelated text is not infringement, but identical regurgitation is? could be?
Is it fair use?
- Transformation. 2 court cases say that LLM is transformation. (google book scan case applies here). Google v Oracle - google made a new language in a new environment so it was okay transformative fair use.
- Economic impact. Unclear that there isn't a negative impact on the creator. 25+ cases about this in court.
Advice
- use code you understand
- follow same advice as for using any 3rd party code (similar concerns)
- small pieces are safer (i.e. even if sort of a copy)
- larger is safe if it isn't a copy of something
Use automated tools (too find accidental verbatim copies?)
Documentation - Show what is AI created.
Get AI/LLM company to indemnify you
To register a copyright, you need to make (some sort?) of effort to identify AI code and to exclude it from copyright.
Use SCA tools:
e.g. https://github.com/magnologan/awesome-sca
LLM hosting companies have limits on their indemnification clauses.
You might need to block "public code suggestions" in github copilot: ref: https://docs.github.com/en/copilot/configuring-github-copilot/configuring-github-copilot-settings-on-githubcom
#pyconus new conference event format...undefined... mysterious
I am learning about reproducable science and will be checking out this library. https://pypi.org/project/repsci/
#pyconus keynote
- We overestimate how many problems have already solved with tech
- Attempting to block chain assumes that there was tidy data to put in the block chain (eg. for countries with dodgy land ownership tracking)
Scenarios for using openstreet map
- small - Using open street maps of Sterling, VA to reveal what resources are in a virtually gated neighborhood
- impactful - During the earthquake in Haiti people contributed to openmap got used by search & rescue teams.
Working on the supply chain problem using crowd sourced info
(Can't tell if your materials are participating in illegal activities if you don't know where it came from)
Open source is anthropology & sociology- groups forms, norm form & those might not be written down anywhere and might not match your normative political opinions. This is a subtweet of this blog post:
The author is a social conservative fighting the culture wars & is projecting that onto reality. Shadows on the wall, man.
https://world.hey.com/dhh/open-source-is-neither-a-community-nor-a-democracy-606abdab
Almost vegan friendly city...I think the majority of vegan restaurants were nowhere near downtown Pittsburgh.
Economic crisis in Venezuela is bringing Arepas to all the downtown, I need to find the ones near DC.
Vegan friendly conference. Kind of like a cruise ship, the food is as memorable as the activities.
IDEA: Convert #python bytecode to emojis, get a tattoo of that, then use LLM vision to read and execute the bytecode, making the worst way to package code and slowest python interpreter ever.
Captures the zeitgeist of my feed right now.
TIL: py5 is a python wrapper around a Macromedia Flash-like thing called Processing that is a Java thing. It is for people doing artsy graphical animated things.
#pyconus Now for some AsyncIO.
First let's get our ducks out of row.
GIL is not locked during I/O. Waiting can be parallelized.
---
asyncio.run() handles the event loop
Codspeed.... sounds fishy...what's that
#pyconus next up is duckdb.
Fits a role in between small data and huge data.
pandas > duck db > distributed systems (spark etc)
Runs in process like sqlite does (but not inmemory, can be saved to file/page out)
MIT license
Uses modern tricks to run very fast
Easy enough for non-specialist
me: sounds like it is for supporting "data frame oriented programming"
---
SQL (postgres) poorly optimized for big data
Analytic dbs poorly optimized for installing the whole thing on your laptop
---
duck db tries to be an analytics db that works well on a workstation (local processing instead of sending data across network for a sql db to work with it)
duckb syntax is postgres-like
Pivot/unpivot features
... many features new to me...
GROUP BY ALL, SORT BY ALL, syntactic sugar to avoid listing lots of columns
Duckdb will query a dataframe in the current variable scope with SQL as if it was a table.
Whoa....
Duckdb can load/expert data fast...
Has ecosystem integrations (all the dataframe libraries, not just pandas)
Supports "Relational API" (what?) and SQL.
ah Relational API https://duckdb.org/docs/api/python/relational_api.html
You can simulate working with pyspark using duckdb on your workstation.... I wonder if this will simulate AWS Glue close enough?
gist
- g as in github, gist
- jist
In the future dialect maps will be about gist and gif.
Me: how you doing lenovo?
Lenovo: 60% Battery, couldn't be bette...
Lenovo: <dies>
Me: <Plugs in pushes button>
Lenovo: BEEEEP BEEEEP. You have become deaf, I must beep at 200 dB!
Pydantic will be selling an observability tool.
---
Why python + rust? (me: python is slow, duh)
Rust apps force developer to think about `panic` s
Rust is a more secure option than c/c++ for native coding with python
Rust has novel solution for concurrency. (the borrowing/ownership thing I think)
Rust has borrowed features from modern languages like python
---
PyO3 with maturin let's you call rust from python or call python from a rust app.
Slap this on your rust function
`#[pyfunction]` and C code will be generated to compile it to an extension. (py03 makes the C, maturin compiles the C.... I think)
`import b` will import b.pyd using the ABI the same as if it were `b.py`
Cython *et al *do the same thing.
----
In 2 years, 1/2 of new packages using native code will be using Rust instead of C/C++
Rust to python cheat sheet, they are similar
---
def - fn
str - &str
int - usize
let mut - (initialization)
return - (last line in function is return)
Expect 2 to 4x speedup without trying. (me: even on string intensive code & no particular math?)
#pyconus You can use pyperf to get perf stats using what was learned doin perf benchmarking for the python runtime
Continuous benchmarking (CI tools) needs bare metal machines or you get to too much noise from non-code reasons for the thing being fast/slow
Bare metal/non-shared CI machines are expensive.
(Sounds pessimistic about the possibility of perf testing side projects or in a corporate shared build server)
#pyconus - Pydantic and the `match` statement
speaker - what will this do?
audience: mumble
speaker - right!
I'm getting annoyed.
Scenario: What if we had a stream of dicts (a discriminated union) with a union with Any....
Option 1- if/elif on the discriminator field
Option 2- Add a `match` statement that won't be recognized by subsequent maintainers of the code base.
TypeAdapter an undefined concept.
"Type adapters provide a flexible way to perform validation and serialization based on a Python type." ah, yes. Flexible.
Here is the official tutorial
#pyconus Now for better error handling
Composability is a good design goal. It needs to be effortless/seamless.
Impediments to this:
GOTO- Single entry/exit helps composibility
modulelack- i.e. code polluting the global namespace
inheritance- breaks encapsulation
error handling -.....
Batch languages didn't need error handling. Either that batch succeeded or it failed. Only matters in realtime code.
Global error handlers created race conditions.
Some OSs tried to handle error handling on behalf of the app (app error handlers and "resumptions") - Crazy idea!
Exceptions should be part of language not the OS. Domain concerns.
Standard way to report errors. Errors harder to ignore. App now has possibility to recover.
Exceptions don't scale. They work poorly with the typesystem. (huh?)
Shadown type system in C++/java called "exception specifications" failed. (What? I don't know what these are) Deprecated in C++.
Okay I'll have to look that up.
Exception conflate categories of errors:
- recoverable errors, e.g. try again
- unrecoverable errors (panic!)
Because they're the same, recoverable errors are unnecessarily expensive.
Exceptions destroy partial calculations (waste compute)
Maybe instead return a union of Error and the Answer.
me: I hate coding against unions. Will we hear why suddenly Unions are good?
Everything returns a union or collection of unions and you use pattern matching for handling every result that could error-out. So maybe replace try/except/finally with switch statements?
Risk of Union types is the calling code ignores the Error, e.g. if return Tuple[Answer,Error]
You can do this style of error handling with `returns`
`@safe` decorator will make a ordinary function return Results (unions of answer/error) . I think.
@safe Use `bind` function to chain/compose many functions that all use these Union Result types.
`do` notation uses comprehension notation to chain/compose functions with multiple args. I think.
@safe Type checker now tells us if an exception ignored. Maybe. Not clear if mypy can handle this pattern/library.
@safe Rust, Kotlin, newer C++ already do this style of error handling.
I guess this is handy if you want to make sure no exception causes a crash w/o resorting to a global error handler
@safe This is the repo for the sample code from the talk
IDEA: I'll start a commercial enterprise app company. I'll make the code opensource, everyone will volunteer for free and attend the roadmapping zooms, work late on weekends and I will get rich when I can sell out to IBM. I'll save so much money on labor and the slaves, I mean volunteers will be so happy to be working on opensource.
Peer review for scientific python packages
What a great idea. I bet non-scientists that are build masters in their day job have something to contribute here
I learned that pip can install from pyproject.toml. Or can it?
`pip init` doesn't do anything. So step one I have to google to figure out what pyproject.toml format pip can digest.
`pip-init` is for setup.py