Email or username:

Password:

Forgot your password?
Top-level
Devine Lu Linvega

No! Wait, I'm just dumb, the type checker was right and I couldn't understand what it was trying to tell me.

Haha, wow, it's a weird feeling when you build a thing to reflect about a problem and it starts to see things that you don't :maru:

15 comments
spooky blip 👻

@neauoire this is the kind of joy I find in languages like TypeScript and Rust when I explain to people that the biggest win is in it checking my work and *proving* I didn't make logic mistakes (insofar as the type system can do)

some day eventually, I want you to investigate (as a purely learning experiment) tagged unions and exhaustiveness checking. by far one of my most-used features in those two mentioned languages, such checks genuinely made me a better developer.

Devine Lu Linvega

@klardotsh I wrote a tiny bit of Rust and I encountered the branch permutation checker, which is very cool. I'll look into the tagged union checker, that's something I've never heard of before.

anni

@neauoire I get the same feeling from my type inferencer all the time: Why is it complaining at me about this code? Oh, yeah, that's one on me!

nf

@neauoire a central part of my debugging process in general is to build tools to cross-check my observations. The best case is when you get two different but complementary failures, clues!!

Devine Lu Linvega

I'm starting to get the hang of this now.

So, one bad-habit that I had when building my wiki(which I've managed to overcome in the projects I've made afterward) was to hard-crash on error, no matter the stack state, and this just won't fly with the type checker, I've got to keep the stack in balance during error handling.

Ricardo B�nffy

@neauoire what environment are you running your blog in? The UI seems Oberon-like, but the language looks like Forth.

spooky blip 👻

@neauoire yaaaayyyy this is a lo-fi flavour of the Result<T> concept :) it's analogous to an Option<T> for methods (words) that might return null. I (very subjectively) find having to handle things in a balanced way like this leads to more understandable code.

blog.logrocket.com/understandi

Devine Lu Linvega

@klardotsh did you ever come across anything about type-checking in regards to concatenative languages by any chance? The body of work on the topic, that I can find, is extremely thin.

spooky blip 👻

@neauoire your assessment is correct. I never found much useful. I was planning my way around doing things very DIY and kinda blue collar since there's almost no academic research or past art to refer to, especially for my plans with Gale (inference, etc)

Devine Lu Linvega

@klardotsh everything that I could find, I've collected here: wiki.xxiivv.com/site/type_syst

I'll improve as I go along.

418 I'm a Teapot

@neauoire @klardotsh looks like you are in the Maybe monad... and maybe bind is the concatenation you are looking for...

Devine Lu Linvega

@chainik @klardotsh monad? in point-free assembly? I'm having trouble understanding what that might look like. Do you have a link on monads in Joy or Factor?

Avi Bryant

@neauoire @chainik @klardotsh I can imagine a Maybe monad in joy looking something like

wordThatReturnsMaybe [doSomethingToResult] map

or

wordThatReturnsMaybe
[anotherWordThatReturnsMaybe] flatMap

418 I'm a Teapot

@neauoire @klardotsh i don't have a concrete suggestion because my head isn't in the details. abstractly, i recognise Maybe and if the rest of the computation was happening in the monad it would type check :)

Go Up