87 Followers
36 Following
53 Posts

New post on how indexing works in NumPy, PyTorch. So many ways to index into a tensor!

https://getcode.substack.com/p/from-basic-to-fancy-indexing

From Basic to Fancy Indexing

50 ways to index your tensor

Get Code

At the end of the day, I just felt like it wasn't really gaining me any time or make it any less tedious. It was, however, different and in that sense was a sort of relief from the tedium of search/replace and manual edits.

FIN

It also insists on explaining itself. I can get it to stop for a short while using prompts like "don't explain yourself, I am an expert", but it always goes back to its rather patronizing self.

Finally, it does make quite a few small and hard to notice mistakes, so I need to double check.

Gemini also keeps adding pointless comments, no matter how many times I ask not to add comments. I then have to go and delete those. More tedium!

Sometimes it does weird things, like insisting that two methods are the same when they clearly aren't, and then refuses to refactor the first method.

On one hand this is because copy-pasting between editor and web is tedious. Of course, editing by hand is also tedious, but it would be nice if I could reduce the tedium. I don't think CoPilot can do something like this - would be great if you could ask it to rewrite selected code according to prompt. I don't think CoPilot chat can do this, though I haven't tried very hard. It kept wanting to generate new code.

Using Gemini to do a large and tedious Rust refactor. It is going so-so.

I've given it the "before" method and an example "after" method, and then paste in "before" methods and asking it to translate.

On the one hand it's impressive it can do this at all - it actually provides reasonable results.

However on the whole I've gone back to making mannual edits and search and replace.

FsCheck 3.0.0-rc3 released with a few small breaking changes.

https://nuget.org/packages/FsCheck/3.0.0-rc3#releasenotes-body-tab

My time on FsCheck has been limited for a long time. If you get value from it, please consider contributing!

Shoutout to Patrick Stevens
for contributions to CI and release. πŸ™πŸ™

FsCheck 3.0.0-rc3

FsCheck is a tool for testing .NET programs automatically. You provide a specification of the program, in the form of properties which functions, methods or objects should satisfy, and FsCheck then tests that the properties hold in a large number of randomly generated cases. Such properties are actually a testable specification of your program. Properties are written in F#, C# or VB. FsCheck helps you to define properties, observe the distribution of test data, and define test data generators. Crucially, when a property fails, FsCheck automatically displays a minimal counter example.

Beyond Backpropagation - Higher Order, Forward and Reverse-mode Automatic Differentiation for Tensorken
https://open.substack.com/pub/getcode/p/beyond-backpropagation-higher-order

#Rust #rustlang #autodiff

Beyond Backpropagation - Higher Order, Forward and Reverse-mode Automatic Differentiation for Tensorken

Tensors from Scratch, Part 3

Get Code

You can imagine how the pieces might work in other types of interfaces. We started with a spatial canvas that hosted computational elements. More on this in a lab note soon

The essay is out now; it’s a thorough read discussing what we did and why. Enjoy.

https://www.inkandswitch.com/embark/

Embark: Dynamic documents for making plans

Gradually enriching a text outline with travel planning tools

Released FsCheck 3.0.0-rc1. If no major problems full 3.0 release in a couple weeks.

No further 2.x releases planned.

If you're coming from 2.x there are many backwards incompatible changes. Please read the release notes!

https://www.nuget.org/packages/FsCheck/3.0.0-rc1

FsCheck 3.0.0-rc1

FsCheck is a tool for testing .NET programs automatically. You provide a specification of the program, in the form of properties which functions, methods or objects should satisfy, and FsCheck then tests that the properties hold in a large number of randomly generated cases. Such properties are actually a testable specification of your program. Properties are written in F#, C# or VB. FsCheck helps you to define properties, observe the distribution of test data, and define test data generators. Crucially, when a property fails, FsCheck automatically displays a minimal counter example.