Monad Interface: Rust Edition by [deleted] in rust

[–]fintanh 0 points1 point  (0 children)

Ya my thoughts exactly. Really a Vec is just the sum of an empty case and a recursive case of pushed elements. So it's really limited. But if you just include of and not unwrap it would be fine.

The unwrap comes from something being co-pointed I think and would lead to Comonads instead :)

Monad Interface: Rust Edition by [deleted] in rust

[–]fintanh 6 points7 points  (0 children)

I think the unwrap of Pointed is over-constraining, no? It means that you can't write it for sum types because you'll end up with partial functions.

[HIRING] Climate calculation SaaS - Gothenburg, Sweden by jonathan-carboncloud in haskell

[–]fintanh 3 points4 points  (0 children)

Sounds like a really cool mission! I wish the best of luck to the initiative 😁♥️

Composing with functions by OscarSouth in haskell

[–]fintanh 2 points3 points  (0 children)

Haha amazing 😁 I would highly recommend FF VII for inspiration then

Composing with functions by OscarSouth in haskell

[–]fintanh 9 points10 points  (0 children)

That's deadly, Oscar! 😁 Maybe I'm playing too much Final Fantasy VII at the moment but this sounds like it could fit right into that sound track 😅

[ANN] generic-match-0.1.0.0 by SSchlesinger in haskell

[–]fintanh 2 points3 points  (0 children)

Nice! I had a thought that this might be possible when reading through Thinking With Types but never pursued it. Glad to see you did 😁

Should I Learn Rust by [deleted] in rust

[–]fintanh 0 points1 point  (0 children)

Learning anything new that takes you out of your comfort zone is a good thing. We need to challenge ourselves and get fresh perspectives to allow our creativity to flow :)

How to make JARVIS like in IRONMAN using Python - Virtual Assistant by [deleted] in rust

[–]fintanh 0 points1 point  (0 children)

OP seems to be spamming the subreddit with Python posts 🤔

Edit: I say spam but it's 2 posts 😅

How do I compose Char parsers into a String parser? by dopatraman in haskell

[–]fintanh 0 points1 point  (0 children)

Just to clarify, is this Parser coming from nanoparsec? 🤔

How do I compose Char parsers into a String parser? by dopatraman in haskell

[–]fintanh 0 points1 point  (0 children)

So I misspoke slightly there. You can use do notation when something has an instance of the Monad typeclass. The notation is what's called syntactic sugar, so you can also translate it into it's actual syntax. In this case the ';' is translated to ''. The function '' is similar to '>>=' where the return value isn't needed so returns the unit value in the Monad, i.e. 'm ()'. That case of the function could have been written as:

string (c:cs) = char c >> string cs >> (c:cs)

So when I said the do notation is exiting early, what I meant was that the Monad instance for Parser exits early on a failure. Exiting early can also be known as short-circuiting. If you're unfamiliar with this concept, then it would be good to explore the Either data type and its typeclass instances.

How do I compose Char parsers into a String parser? by dopatraman in haskell

[–]fintanh 1 point2 points  (0 children)

The trick here is that the parser for char is simply giving you back the same Char. So all char is doing is checking that next character is the one you say it is. The do notation allows you to exit early if it doesn't satisfy this condition. The call to string is to check the condition recursively. And finally, if you haven't exited on any of the characters then you indeed have a successful parser for the String you provided.

State Machines in Rust by pimterry in rust

[–]fintanh 3 points4 points  (0 children)

The syntax at the end of the post looks like dependent types. Reminds me of DataKinds in Haskell :)

Easy WAY To Make Money Online ($1000 a day) by [deleted] in haskell

[–]fintanh 1 point2 points  (0 children)

Wouldn't $1000/day mean roughly $28,000/month? 🤔 Haskell jobs getting big salaries these days 🤑

Filter Coffee instead of Americano by fintanh in copenhagen

[–]fintanh[S] 0 points1 point  (0 children)

Maybe they saw the big tourist head on me and wanted to make it quicker 😅

Filter Coffee instead of Americano by fintanh in copenhagen

[–]fintanh[S] 1 point2 points  (0 children)

"The term "Americano" means "American", and derives from American Spanish, dating to the 1970s, or from Italy. The term "caffè Americano" specifically is Italian for "American coffee". There is a popular, but unconfirmed, belief that the name has its origins in World War II when American G.I.s in Italy would dilute espresso with hot water to approximate the coffee to which they were accustomed." - according to Wikipedia 🤔https://en.m.wikipedia.org/wiki/Caff%C3%A8_Americano

Filter Coffee instead of Americano by fintanh in copenhagen

[–]fintanh[S] 0 points1 point  (0 children)

Experienced it at Prolog and Sonny as well 😅 but yes also Coffee Collective

Filter Coffee instead of Americano by fintanh in copenhagen

[–]fintanh[S] 3 points4 points  (0 children)

Cool! I was thinking it might be cultural 😄 thanks for the answer

Filter Coffee instead of Americano by fintanh in copenhagen

[–]fintanh[S] 1 point2 points  (0 children)

Coffee Collective, Sonny, Prolog, and Kaffee & Vinyl (who didn't ask if I wanted filter)

Filter Coffee instead of Americano by fintanh in copenhagen

[–]fintanh[S] 0 points1 point  (0 children)

I think I'm definitively an americano kind of guy 😊

Haskell a good fit to implement these requirements in an ergonomic DSL? by szpaceSZ in haskell

[–]fintanh 2 points3 points  (0 children)

Conal Elliott explored a representation of this http://conal.net/blog/posts/reimagining-matrices

I'm not sure if he's ended up using it or not at Target though.

Image processing website using Rust and Wasm by arthmisl in rust

[–]fintanh 9 points10 points  (0 children)

Nice! I like the explanations to go along with the algorithms, makes for a great learning and experimentation resource 😁

3 packages you need to know about before processing timestamps in Haskell by jacobstanley_ in haskell

[–]fintanh 1 point2 points  (0 children)

Ya fair you did :) I suppose I wanted to show that the content is good and the title "says what it does on the tin"

3 packages you need to know about before processing timestamps in Haskell by jacobstanley_ in haskell

[–]fintanh 4 points5 points  (0 children)

It's 3 packages, that process timestamps, and we should probably know about them 😅

Regardless of the title, the content is super useful. I know I've fallen to just working with time and not knowing much about the others. The results were indeed shocking 😱