profile
viewpoint
Wesley Moore wezm @yeslogic Melbourne, Australia https://www.wezm.net/ Developer with an interest in systems ranging from microcontrollers to web applications. Fan of Rust, Linux, and FreeBSD.

schickling/beanstalkd-cli 60

Simple to use commandline tool for Beanstalkd

schickling/rust-beanstalkd 39

Easy-to-use beanstalkd client for Rust (IronMQ compatible)

didoesdigital/typey-type 35

Typey Type for Stenographers is a free typing app designed specifically to help steno students practise and rapidly master stenography.

wezm/bar 3

A bar that lives in the awesome window manager wibar

wezm/advent-of-code 2

My advent of code solutions

wezm/allocator 2

Tool to calculate budget allocations for MoneyWell

wezm/aur 2

My PKGBUILDs

wezm/bluez-api-parser 1

Gem and tool for generating D-Bus introspection XML from the BlueZ API documentation

wezm/bluez-introspection-xml 1

D-Bus introspection XML generated from the BlueZ API documentation

startedocaml-ppx/ocamlformat

started time in 5 hours

Pull request review commentyeslogic/fathom

Allow dependent fields in struct formats and types

 impl Default for Globals {         Globals::new(entries)     } }++/// A [de Bruijn index][de-bruijn-index] in the local environment.+///+/// De bruijn indices describe an occurrence of a variable in terms of the+/// number of binders between the occurrence and its associated binder.+/// For example:+///+/// | Representation    | Example (S combinator)  |+/// | ----------------- | ----------------------- |+/// | Named             | `λx. λy. λz. x z (y z)` |+/// | De Bruijn indices | `λ_. λ_. λ_. 2 0 (1 0)` |+///+/// This is a helpful representation because it allows us to easily compare+/// terms for equivalence based on their binding structure without maintaining a+/// list of name substitutions. For example we want `λx. x` to be the same as+/// `λy. y`. With de Bruijn indices these would both be described as `λ 0`.+///+/// [de-bruijn-index]: https://en.wikipedia.org/wiki/De_Bruijn_index+#[derive(Copy, Clone, Debug, PartialEq, Eq)]+pub struct LocalIndex(pub u32);++impl LocalIndex {+    /// Convert a local index to a local level in the current environment.+    ///+    /// `None` is returned if the local environment is not large enough to+    /// contain the local variable.+    pub fn to_level(self, size: LocalSize) -> Option<LocalLevel> {+        Some(LocalLevel(u32::checked_sub(size.0, self.0 + 1)?))+    }+}++/// A de Bruijn level in the local environment.+///+/// This describes an occurrence of a variable by counting the binders from+/// the top of the term towards until the occurrence is reached.+/// For example:+///+/// | Representation    | Example (S combinator)  |+/// | ----------------- | ----------------------- |+/// | Named             | `λx. λy. λz. x z (y z)` |+/// | De Bruijn levels  | `λ_. λ_. λ_. 0 2 (1 2)` |+///+/// Levels are used in [values][semantics::Value] because they are not context-

Good catch! Rewording this to:

This describes an occurrence of a variable by counting the binders inwards from the top of the term until the occurrence is reached.

toothbrush

comment created time in 15 hours

issue openednot-yet-awesome-rust/not-yet-awesome-rust

BinHex 4 (.hqx) decoder that checks CRCs when decoding

Currently, there appears to be no BinHex 4 decoder crate available.

This is a problem for me because I want to rewrite my batch file-corruption detection tool in Rust before releasing it and I'm relying on the binhex module from the Python standard library because the other apt-installable binhex decoders I could invoke as subprocesses are unsuitable.

(uudeview says right in its manpage that it ignores BinHex CRCs. I can't remember what's wrong with hexbin, but I know I checked it and found it wanting.)

created time in 15 hours

Pull request review commentyeslogic/fathom

Allow dependent fields in struct formats and types

 impl Default for Globals {         Globals::new(entries)     } }++/// A [de Bruijn index][de-bruijn-index] in the local environment.+///+/// De bruijn indices describe an occurrence of a variable in terms of the+/// number of binders between the occurrence and its associated binder.+/// For example:+///+/// | Representation    | Example (S combinator)  |+/// | ----------------- | ----------------------- |+/// | Named             | `λx. λy. λz. x z (y z)` |+/// | De Bruijn indices | `λ_. λ_. λ_. 2 0 (1 0)` |+///+/// This is a helpful representation because it allows us to easily compare+/// terms for equivalence based on their binding structure without maintaining a+/// list of name substitutions. For example we want `λx. x` to be the same as+/// `λy. y`. With de Bruijn indices these would both be described as `λ 0`.+///+/// [de-bruijn-index]: https://en.wikipedia.org/wiki/De_Bruijn_index+#[derive(Copy, Clone, Debug, PartialEq, Eq)]+pub struct LocalIndex(pub u32);++impl LocalIndex {+    /// Convert a local index to a local level in the current environment.+    ///+    /// `None` is returned if the local environment is not large enough to+    /// contain the local variable.+    pub fn to_level(self, size: LocalSize) -> Option<LocalLevel> {+        Some(LocalLevel(u32::checked_sub(size.0, self.0 + 1)?))+    }+}++/// A de Bruijn level in the local environment.+///+/// This describes an occurrence of a variable by counting the binders from+/// the top of the term towards until the occurrence is reached.+/// For example:+///+/// | Representation    | Example (S combinator)  |+/// | ----------------- | ----------------------- |+/// | Named             | `λx. λy. λz. x z (y z)` |+/// | De Bruijn levels  | `λ_. λ_. λ_. 0 2 (1 2)` |+///+/// Levels are used in [values][semantics::Value] because they are not context-

Yeah it's a super nifty way of doing dependent type checking

toothbrush

comment created time in 16 hours

Pull request review commentyeslogic/fathom

Allow dependent fields in struct formats and types

 impl Default for Globals {         Globals::new(entries)     } }++/// A [de Bruijn index][de-bruijn-index] in the local environment.+///+/// De bruijn indices describe an occurrence of a variable in terms of the

Oooh thanks!

toothbrush

comment created time in 16 hours

pull request commentyeslogic/fathom

Allow dependent fields in struct formats and types

So far i've mainly digested the test case fixtures, but that looks really good!

toothbrush

comment created time in 16 hours

Pull request review commentyeslogic/fathom

Allow dependent fields in struct formats and types

 impl Default for Globals {         Globals::new(entries)     } }++/// A [de Bruijn index][de-bruijn-index] in the local environment.+///+/// De bruijn indices describe an occurrence of a variable in terms of the+/// number of binders between the occurrence and its associated binder.+/// For example:+///+/// | Representation    | Example (S combinator)  |+/// | ----------------- | ----------------------- |+/// | Named             | `λx. λy. λz. x z (y z)` |+/// | De Bruijn indices | `λ_. λ_. λ_. 2 0 (1 0)` |+///+/// This is a helpful representation because it allows us to easily compare+/// terms for equivalence based on their binding structure without maintaining a+/// list of name substitutions. For example we want `λx. x` to be the same as+/// `λy. y`. With de Bruijn indices these would both be described as `λ 0`.+///+/// [de-bruijn-index]: https://en.wikipedia.org/wiki/De_Bruijn_index+#[derive(Copy, Clone, Debug, PartialEq, Eq)]+pub struct LocalIndex(pub u32);++impl LocalIndex {+    /// Convert a local index to a local level in the current environment.+    ///+    /// `None` is returned if the local environment is not large enough to+    /// contain the local variable.+    pub fn to_level(self, size: LocalSize) -> Option<LocalLevel> {+        Some(LocalLevel(u32::checked_sub(size.0, self.0 + 1)?))+    }+}++/// A de Bruijn level in the local environment.+///+/// This describes an occurrence of a variable by counting the binders from+/// the top of the term towards until the occurrence is reached.+/// For example:+///+/// | Representation    | Example (S combinator)  |+/// | ----------------- | ----------------------- |+/// | Named             | `λx. λy. λz. x z (y z)` |+/// | De Bruijn levels  | `λ_. λ_. λ_. 0 2 (1 2)` |+///+/// Levels are used in [values][semantics::Value] because they are not context-

Interesting! I was unaware of this technique :bulb:

toothbrush

comment created time in 16 hours

Pull request review commentyeslogic/fathom

Allow dependent fields in struct formats and types

 impl Default for Globals {         Globals::new(entries)     } }++/// A [de Bruijn index][de-bruijn-index] in the local environment.+///+/// De bruijn indices describe an occurrence of a variable in terms of the
/// De Bruijn indices describe an occurrence of a variable in terms of the

Nitpick!

toothbrush

comment created time in 16 hours

Pull request review commentyeslogic/fathom

Allow dependent fields in struct formats and types

 name: ci on:   push:     branches:-      - master+      - main

Oops, totally missed that! :facepalm:

toothbrush

comment created time in 16 hours

startedkoto-lang/koto

started time in 20 hours

created repositoryBrainiumLLC/celerity

Buttery smooth animation toolkit

created time in 21 hours

startedleops/rasen

started time in a day

startedremacs/remacs

started time in a day

startedpasscod/tomo

started time in a day

startedsimnalamburt/vim-mundo

started time in a day

startedOSSystems/compress-tools-rs

started time in a day

startedlunatic-lang/lunatic

started time in a day

startednot-a-seagull/breadx

started time in a day

startedkneasle/sapling

started time in 2 days

startedRayTracing/raytracing.github.io

started time in 2 days

startedandresavic/AmongKey

started time in 2 days

startedigor84/summus

started time in 2 days

PR closed wezm/profont

Update to more recent font-kit

Update to latest font-kit. Make the PNG generator more generic so it can be used for other fonts. Does not seem to work correctly with original ProFontIIx TTF file, but works as expected with other TTF.

+123 -47

3 comments

3 changed files

dkm

pr closed time in 2 days

pull request commentwezm/profont

Update to more recent font-kit

Ok :) I guess I'll wait for your new generator and see how to reuse it then. At least I did learn a bit how to handle font from rust :)

dkm

comment created time in 2 days

pull request commentwezm/profont

Update to more recent font-kit

I was trying to reuse your code to generate another font... and ended up trying to update font_kit. It's not working with your TTF, but it works with other (including ProFont from other sources), I'm not sure why. Maybe this has something to do with the metric/offset you were using ? I've used the font_kit example to adapt this generator. I thought this could be helpful. If you think this is worth merging, feel free to ask for modifications, I'll do what I can to help.

dkm

comment created time in 2 days

PR opened wezm/profont

Update to more recent font-kit

Update to latest font-kit. Make the PNG generator more generic so it can be used for other fonts. Does not seem to work correctly with original ProFontIIx TTF file, but works as expected with other TTF.

+123 -47

0 comment

3 changed files

pr created time in 2 days

startedmhx/dwarfs

started time in 2 days

startedMetabolix/HackBGRT

started time in 2 days

startedQuinnWilton/gleam_logic

started time in 2 days

startedaevyrie/bevy_mod_picking

started time in 2 days

more