~icefox

Just foxing about.

https://wiki.alopex.li/

Trackers

~icefox/garnetc

Last active 15 days ago

~icefox/garnet

Last active 5 months ago

~icefox/linkrot-pub

Last active 8 months ago

~icefox/oorandom

Last active 2 years ago

~icefox/scalar

Last active 3 years ago

~icefox/cf_issues

Last active 5 years ago

#57 Destructors/linear types 15 days ago

Comment by ~icefox on ~icefox/garnet

are affine types not enough?

There's rare but significant cases where you Actually Need some context to destroy a type; my personal example is Vulkan resource handles. You can't really expect the compiler to figure out that context on its own, so you need a way to call destructors with an argument and make sure that all code paths lead to a destructor being called. There's solutions to this, but few pretty ones; basically comes down to "handle it at runtime" by smuggling Rc<Context> into your objects or something.

#3 Add formatting mode to compiler 15 days ago

Comment by ~icefox on ~icefox/garnetc

Wow, this was done ages ago. Why is it still here?

REPORTED RESOLVED CLOSED

#16 Add location info to AST/HIR 15 days ago

Comment by ~icefox on ~icefox/garnetc

Done in f75091a59067 . Not actually filled out or used much though. Continue work in #2.

REPORTED RESOLVED CLOSED

#32 Make generic types have to repeat themselves a bit less 15 days ago

T-FEATURE added by ~icefox on ~icefox/garnetc

#32 Make generic types have to repeat themselves a bit less 15 days ago

Ticket created by ~icefox on ~icefox/garnetc

Basically, I am annoyed by having to write type Foo[T] = struct[T] ... Similar to how I'm annoyed at having to write impl<T> Foo<T> for Bar in Rust. Occasionally it's inevitable but like 95% of the time it can be inferred.

See #21 for the alternative.

#21 Feature: Get rid of @T generic type sigils in favor of T 15 days ago

Comment by ~icefox on ~icefox/garnetc

Regardless, this is done and work out pretty ok, though it does require us to repeat ourselves sometimes.

REPORTED RESOLVED CLOSED

#28 Sometimes we can't know the types of numbers 15 days ago

Comment by ~icefox on ~icefox/garnetc

REPORTED RESOLVED CLOSED

#28 Sometimes we can't know the types of numbers 15 days ago

Comment by ~icefox on ~icefox/garnetc

Currently we simply do not allow these cases to typecheck, which to me is the Obvious Easy Solution. See commit 058cd107ef12.

#53 Syntax bikeshed 21 days ago

Comment by ~icefox on ~icefox/garnet

Right now type parameters are written as Foo(T1, T2), which gets rather visually cluttered to me when you end up writing lots of them. Can we make them be Foo[T1, T2] without being ambiguous with []T and [3]T for arrays?

Let's see:

  • []Foo[T]
  • [3]Foo[T]
  • Foo[[]T]
  • Foo[Bar[[3]^Something[T]]]

You know... I actually think that works.

Edit: Implemented this, nothing has exploded yet. Straw poll on /r/pldev discord suggests most people like it.

#64 Pattern matching a month ago

Comment by ~icefox on ~icefox/garnet

https://perso.ens-lyon.fr/thais.baudon/icfp2023.pdf has some good references on compiling pattern matching. https://dl.acm.org/doi/10.1145/1411304.1411311 seems to be the most recent. PDF of it available here: https://www.cs.tufts.edu/~nr/cs257/archive/luc-maranget/jun08.pdf