139 Followers
461 Following
22 Posts

The Rust Programming Language with community. 🦀
Music, playing piano. 🎹
Engineering & math & geoscience!

#Rust #piano #Python #Typst

githubhttps://github.com/bluss

Learn more about top packages, a vision for Typst's bibliography management, table entry (@bluss) and what we have planned for the future tomorrow. Here's what you can expect from the community call:

#typst

Here's how you can think about state in Typst. I've been using Typst a lot lately, and the semantics around state were definitely tricky to learn!

State is a part of your document, it runs like a thread embedded in the document content. The value of a state is the result of all state updates that happened in the document up until that point.

That’s why state.update returns an invisible sliver of content that you need to return and include into the document - a state update that is not ‘placed’ in the document does not happen, and ‘when’ it happens is determined by where you place it.
Example: Only figures that are placed into the document increase the value of the figure counter.
That’s also why you need context to read state, you need to use the current document position to know where on the state’s “thread” you are.

As you can see, state does not work like a regular variable in a programming language. I hope you will come to see how this makes sense for creating documents in Typst - it’s informed both by how documents are put together, and by the aggressive caching that Typst does (as explained by previous poster).

#Typst

@adamcallison @nedbat Yes it can. Surprising feature, can't think of any good uses yet, except for creating obscure code..

This is all powered by uv by default. But other project managers are supported, too, just maybe less battle tested. Even pipenv can work!

The vision for this plugin started as soon as I saw Rye - before uv existed, and I've had the project since then. Already with Rye it was very useful, but Uv has now taken over the baton.

And - it should be mentioned - poetry-kernel explored this place before I did.

#Python #rye #uv

The **Pyproject Local (use-venv)** mode is new to this release. It's sort of a "light" version of the kernel provisioner, that just dispatches to the `.venv` virtual environment in the project close to the notebook. (The location is configurable, both per project and per user!)

pyproject-local-kernel has been getting really good now.

https://github.com/bluss/pyproject-local-kernel

It enables you - when using JupyterLab - to define your notebook dependencies in a `pyproject.toml`, for example in a uv project.

It's very powerful, especially for enabling reproducible notebook environments and keeping many different notebook projects, with separate dependencies, going.

pyproject-local-kernel has now switched over to use kernel provisioning, which is perfect for this use case, and that's why it's feeling solid now.

#Jupyter #Python #Uv

GitHub - bluss/pyproject-local-kernel: Python Jupyter kernel provisioner using pyproject environment manangers like Uv, Rye, PDM, Poetry, Hatch etc.

Python Jupyter kernel provisioner using pyproject environment manangers like Uv, Rye, PDM, Poetry, Hatch etc. - bluss/pyproject-local-kernel

GitHub
@hynek How many levels deep are you in uvx and uv run? I'm regularly doing three </weird flex>

Looking through crates.io dashboard... "my crate" ordermap had an update 15 days ago?? I thought it was dead, what the..

Turns out @cuviper is working on some stuff. This is great! Nice persistence.. it's indexmap and a whole lotta wrapper #rust

ndarray 0.16 is released: https://github.com/rust-ndarray/ndarray/releases/tag/0.16.0

A release has been needed for a long time to say the least, and it's a very big one too. I'm happy it's out.

#rust #ndarray

Release 0.16.0 · rust-ndarray/ndarray

Version 0.16.0 (2024-08-03) Featured Changes Better shape: Deprecate reshape, into_shape by @bluss #1310 .into_shape() is now deprecated. Use .into_shape_with_order() or .to_shape() instead, which...

GitHub