🌉 bridged from ⁂ https://wandering.shop/@xgranade, follow @ap.brid.gy to interact
@Chip_Unicorn No worries! And to be sure, you can absolutely work around that limitation by making users call `haskey` or something first, or by doing what C# does and also returning a bool that indicates whether the value is valid or not. But the dict API example is the […]
@Chip_Unicorn No worries! And to be sure, you can absolutely work around that limitation by making users call `haskey` or something first, or by doing what C# does and also returning a bool that indicates whether the value is valid or not. But the dict API example is the […]
@atax1a Oh, yeah. Anything that learned from how OCaml handles nullability (in particular, that nullability is a consequence of good ADT design and not something to be special cased) is going to come out a lot better for it.
@atax1a Oh, yeah. Anything that learned from how OCaml handles nullability (in particular, that nullability is a consequence of good ADT design and not something to be special cased) is going to come out a lot better for it.
@Chip_Unicorn The example I always give is an API for fetching values from a dictionary. So if you have a data type like `[K, V]dict`, using that syntax, then you might have a function like `[K, V] get(d: [K, V]dict, k: K) -> V?` and that returns `null`, `nil`, `None` or […]
@Chip_Unicorn The example I always give is an API for fetching values from a dictionary. So if you have a data type like `[K, V]dict`, using that syntax, then you might have a function like `[K, V] get(d: [K, V]dict, k: K) -> V?` and that returns `null`, `nil`, `None` or […]
But I don't […]
But I don't […]
Nullability should not be idempotent. That is, T? and T?? should be distinct types, otherwise you wind up with problems the moment you try and design an API that is generic over types that can include both T and T? for any concrete type T.
All of those problems can be worked […]
Nullability should not be idempotent. That is, T? and T?? should be distinct types, otherwise you wind up with problems the moment you try and design an API that is generic over types that can include both T and T? for any concrete type T.
All of those problems can be worked […]
Like, backporting memory safety onto C and C++ were never going to be easy, but writing whitepaper after whitepaper about how memory safety was useless? […]
Like, backporting memory safety onto C and C++ were never going to be easy, but writing whitepaper after whitepaper about how memory safety was useless? […]
Just please, I'm begging software engineers to come to terms with that C and C++ […]
Just please, I'm begging software engineers to come to terms with that C and C++ […]
But they are bad. And it's an absolute shame […]
But they are bad. And it's an absolute shame […]
But yeah, distro hacks are always frustrating.
But yeah, distro hacks are always frustrating.
```
uvx --with pip --managed-python platformio run
```
That lets me use esp-idf without having to install either platformio or idf.py!
```
uvx --with pip --managed-python platformio run
```
That lets me use esp-idf without having to install either platformio or idf.py!
```
$ uv run --with pip python
>>> import sys
>>> sys.path
['', '/home/cgranade/.local/share/uv/python/cpython-3.11.10-linux-x86_64-gnu/lib/python311.zip', '/home/cgranade/.local/share/uv/python/cpython-3.11.10-linux-x86_64-gnu/lib/python3.11' […]
```
$ uv run --with pip python
>>> import sys
>>> sys.path
['', '/home/cgranade/.local/share/uv/python/cpython-3.11.10-linux-x86_64-gnu/lib/python311.zip', '/home/cgranade/.local/share/uv/python/cpython-3.11.10-linux-x86_64-gnu/lib/python3.11' […]
```
$ ~/.local/share/uv/tools/platformio/bin/python
Python 3.12.3 (main, Aug 14 2025, 17:47:21) [GCC 13.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/usr/lib/python312.zip', '/usr/lib/python3.12' […]
```
$ ~/.local/share/uv/tools/platformio/bin/python
Python 3.12.3 (main, Aug 14 2025, 17:47:21) [GCC 13.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/usr/lib/python312.zip', '/usr/lib/python3.12' […]
```
$ uv run --with pip python
Python 3.12.3 on linux
>>> import venv
>>> venv
<module 'venv' from '/usr/lib/python3.12/venv/__init__.py'>
>>> import json
>>> json
<module 'json' from '/usr/lib/python3.12/json/__init__.py'>
>>> import sys
>>> sys.executable
'/home/cgranade/ […]
```
$ uv run --with pip python
Python 3.12.3 on linux
>>> import venv
>>> venv
<module 'venv' from '/usr/lib/python3.12/venv/__init__.py'>
>>> import json
>>> json
<module 'json' from '/usr/lib/python3.12/json/__init__.py'>
>>> import sys
>>> sys.executable
'/home/cgranade/ […]