home.social

#chumsky — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #chumsky, aggregated by home.social.

  1. To the #Rust #rustlang community: I once started to write a #compiler / #parser with #nom #crate. However I had some struggles with it of how to provide **multiple** errors with line+column indicators for a parsed context.
    Now I read a tiny bit about #syn and #chumsky 👀
    Are they the right crates for me? Are there others?
    I do not parse rust-code, but a completely custom language (similar to pugjs)

    (Boost for reach 🙏)

  2. To the #Rust #rustlang community: I once started to write a #compiler / #parser with #nom #crate. However I had some struggles with it of how to provide **multiple** errors with line+column indicators for a parsed context.
    Now I read a tiny bit about #syn and #chumsky 👀
    Are they the right crates for me? Are there others?
    I do not parse rust-code, but a completely custom language (similar to pugjs)

    (Boost for reach 🙏)

  3. To the #Rust #rustlang community: I once started to write a #compiler / #parser with #nom #crate. However I had some struggles with it of how to provide **multiple** errors with line+column indicators for a parsed context.
    Now I read a tiny bit about #syn and #chumsky 👀
    Are they the right crates for me? Are there others?
    I do not parse rust-code, but a completely custom language (similar to pugjs)

    (Boost for reach 🙏)

  4. To the community: I once started to write a / with . However I had some struggles with it of how to provide **multiple** errors with line+column indicators for a parsed context.
    Now I read a tiny bit about and 👀
    Are they the right crates for me? Are there others?
    I do not parse rust-code, but a completely custom language (similar to pugjs)

    (Boost for reach 🙏)

  5. To the #Rust #rustlang community: I once started to write a #compiler / #parser with #nom #crate. However I had some struggles with it of how to provide **multiple** errors with line+column indicators for a parsed context.
    Now I read a tiny bit about #syn and #chumsky 👀
    Are they the right crates for me? Are there others?
    I do not parse rust-code, but a completely custom language (similar to pugjs)

    (Boost for reach 🙏)

  6. Sometimes, when programming in #Rust, I'm wondering whether there is a little Ferris in my computer whispering to all those 0's and 1's to behave correctly. :ferris:

    Otherwise I can't describe the following experience:
    1. Rewrite parts of #parsing a programming language from #nom to #chumsky (the parts that are most interleaved with each other => indirect recursion over multiple non-terminals!).
    2. Run all affected tests
    3. See all of them pass _on the first try!_

    1/2

    #RustLang #Magic

  7. Sometimes, when programming in #Rust, I'm wondering whether there is a little Ferris in my computer whispering to all those 0's and 1's to behave correctly. :ferris:

    Otherwise I can't describe the following experience:
    1. Rewrite parts of #parsing a programming language from #nom to #chumsky (the parts that are most interleaved with each other => indirect recursion over multiple non-terminals!).
    2. Run all affected tests
    3. See all of them pass _on the first try!_

    1/2

    #RustLang #Magic

  8. Sometimes, when programming in #Rust, I'm wondering whether there is a little Ferris in my computer whispering to all those 0's and 1's to behave correctly. :ferris:

    Otherwise I can't describe the following experience:
    1. Rewrite parts of #parsing a programming language from #nom to #chumsky (the parts that are most interleaved with each other => indirect recursion over multiple non-terminals!).
    2. Run all affected tests
    3. See all of them pass _on the first try!_

    1/2

    #RustLang #Magic

  9. Sometimes, when programming in #Rust, I'm wondering whether there is a little Ferris in my computer whispering to all those 0's and 1's to behave correctly. :ferris:

    Otherwise I can't describe the following experience:
    1. Rewrite parts of #parsing a programming language from #nom to #chumsky (the parts that are most interleaved with each other => indirect recursion over multiple non-terminals!).
    2. Run all affected tests
    3. See all of them pass _on the first try!_

    1/2

    #RustLang #Magic

  10. Sometimes, when programming in #Rust, I'm wondering whether there is a little Ferris in my computer whispering to all those 0's and 1's to behave correctly. :ferris:

    Otherwise I can't describe the following experience:
    1. Rewrite parts of #parsing a programming language from #nom to #chumsky (the parts that are most interleaved with each other => indirect recursion over multiple non-terminals!).
    2. Run all affected tests
    3. See all of them pass _on the first try!_

    1/2

    #RustLang #Magic

  11. So what should this all tell you? It should tell you that:
    - #Rust enables fearless prototyping, refactoring and maintenance of software
    - you shouldn't be afraid of stepping into the unknown
    - despite seeming very scary at first, #chumsky is more approachable than you might think - thank you to chumsky contributors for such an amazing crate!

    10/11

    #RustLang

  12. So what should this all tell you? It should tell you that:
    - #Rust enables fearless prototyping, refactoring and maintenance of software
    - you shouldn't be afraid of stepping into the unknown
    - despite seeming very scary at first, #chumsky is more approachable than you might think - thank you to chumsky contributors for such an amazing crate!

    10/11

    #RustLang

  13. So what should this all tell you? It should tell you that:
    - #Rust enables fearless prototyping, refactoring and maintenance of software
    - you shouldn't be afraid of stepping into the unknown
    - despite seeming very scary at first, #chumsky is more approachable than you might think - thank you to chumsky contributors for such an amazing crate!

    10/11

    #RustLang

  14. So what should this all tell you? It should tell you that:
    - #Rust enables fearless prototyping, refactoring and maintenance of software
    - you shouldn't be afraid of stepping into the unknown
    - despite seeming very scary at first, #chumsky is more approachable than you might think - thank you to chumsky contributors for such an amazing crate!

    10/11

    #RustLang

  15. So what should this all tell you? It should tell you that:
    - #Rust enables fearless prototyping, refactoring and maintenance of software
    - you shouldn't be afraid of stepping into the unknown
    - despite seeming very scary at first, #chumsky is more approachable than you might think - thank you to chumsky contributors for such an amazing crate!

    10/11

    #RustLang

  16. Many people say that #Rust is very hard to #prototype with or to #refactor. This couldn't be further from the truth! It is the exact opposite!

    Let me share with you one of the most profound experiences I had with #RustLang on a casual sunday - a thread 🧵

    I'm currently rewriting my #transpiler from #nom to #chumsky and until now everything has turned out great so far, until I've hit the following road block:
    Implementing parsers by using #parser functions that have indirect #recursion.

    1/11

  17. Many people say that #Rust is very hard to #prototype with or to #refactor. This couldn't be further from the truth! It is the exact opposite!

    Let me share with you one of the most profound experiences I had with #RustLang on a casual sunday - a thread 🧵

    I'm currently rewriting my #transpiler from #nom to #chumsky and until now everything has turned out great so far, until I've hit the following road block:
    Implementing parsers by using #parser functions that have indirect #recursion.

    1/11

  18. Many people say that #Rust is very hard to #prototype with or to #refactor. This couldn't be further from the truth! It is the exact opposite!

    Let me share with you one of the most profound experiences I had with #RustLang on a casual sunday - a thread 🧵

    I'm currently rewriting my #transpiler from #nom to #chumsky and until now everything has turned out great so far, until I've hit the following road block:
    Implementing parsers by using #parser functions that have indirect #recursion.

    1/11

  19. Many people say that #Rust is very hard to #prototype with or to #refactor. This couldn't be further from the truth! It is the exact opposite!

    Let me share with you one of the most profound experiences I had with #RustLang on a casual sunday - a thread 🧵

    I'm currently rewriting my #transpiler from #nom to #chumsky and until now everything has turned out great so far, until I've hit the following road block:
    Implementing parsers by using #parser functions that have indirect #recursion.

    1/11

  20. Many people say that #Rust is very hard to #prototype with or to #refactor. This couldn't be further from the truth! It is the exact opposite!

    Let me share with you one of the most profound experiences I had with #RustLang on a casual sunday - a thread 🧵

    I'm currently rewriting my #transpiler from #nom to #chumsky and until now everything has turned out great so far, until I've hit the following road block:
    Implementing parsers by using #parser functions that have indirect #recursion.

    1/11

  21. While I'm rewriting my #transpiler from #nom to #chumsky, I'm actually thinking about writing a nom-to-chumsky transpiler...

    ➰ 🙃

    #Compiler

  22. While I'm rewriting my #transpiler from #nom to #chumsky, I'm actually thinking about writing a nom-to-chumsky transpiler...

    ➰ 🙃

    #Compiler

  23. While I'm rewriting my #transpiler from #nom to #chumsky, I'm actually thinking about writing a nom-to-chumsky transpiler...

    ➰ 🙃

    #Compiler

  24. While I'm rewriting my #transpiler from #nom to #chumsky, I'm actually thinking about writing a nom-to-chumsky transpiler...

    ➰ 🙃

    #Compiler

  25. While I'm rewriting my #transpiler from #nom to #chumsky, I'm actually thinking about writing a nom-to-chumsky transpiler...

    ➰ 🙃

    #Compiler

  26. The #Rust #parser combinator experience:

    1. Writing multiple parser combinator functions ✅
    2. The most "higher up" parser fails ❌
    3. Investigate reason 🔍
    4. Find out it's a _whitespace_ char that has been parsed too eagerly 💡
    5. Fix eagerly parsed whitespace 🔧
    6. All tests pass ✅
    7. Rinse and repeat ➰

    In all seriousness: 95% of errors I have are due to me parsing whitespace too eagerly (this is good!).

    I'm using #chumsky, btw (beautifully designed parser combinator crate!).

    #RustLang

  27. The #Rust #parser combinator experience:

    1. Writing multiple parser combinator functions ✅
    2. The most "higher up" parser fails ❌
    3. Investigate reason 🔍
    4. Find out it's a _whitespace_ char that has been parsed too eagerly 💡
    5. Fix eagerly parsed whitespace 🔧
    6. All tests pass ✅
    7. Rinse and repeat ➰

    In all seriousness: 95% of errors I have are due to me parsing whitespace too eagerly (this is good!).

    I'm using #chumsky, btw (beautifully designed parser combinator crate!).

    #RustLang

  28. The #Rust #parser combinator experience:

    1. Writing multiple parser combinator functions ✅
    2. The most "higher up" parser fails ❌
    3. Investigate reason 🔍
    4. Find out it's a _whitespace_ char that has been parsed too eagerly 💡
    5. Fix eagerly parsed whitespace 🔧
    6. All tests pass ✅
    7. Rinse and repeat ➰

    In all seriousness: 95% of errors I have are due to me parsing whitespace too eagerly (this is good!).

    I'm using #chumsky, btw (beautifully designed parser combinator crate!).

    #RustLang

  29. The #Rust #parser combinator experience:

    1. Writing multiple parser combinator functions ✅
    2. The most "higher up" parser fails ❌
    3. Investigate reason 🔍
    4. Find out it's a _whitespace_ char that has been parsed too eagerly 💡
    5. Fix eagerly parsed whitespace 🔧
    6. All tests pass ✅
    7. Rinse and repeat ➰

    In all seriousness: 95% of errors I have are due to me parsing whitespace too eagerly (this is good!).

    I'm using #chumsky, btw (beautifully designed parser combinator crate!).

    #RustLang

  30. The #Rust #parser combinator experience:

    1. Writing multiple parser combinator functions ✅
    2. The most "higher up" parser fails ❌
    3. Investigate reason 🔍
    4. Find out it's a _whitespace_ char that has been parsed too eagerly 💡
    5. Fix eagerly parsed whitespace 🔧
    6. All tests pass ✅
    7. Rinse and repeat ➰

    In all seriousness: 95% of errors I have are due to me parsing whitespace too eagerly (this is good!).

    I'm using #chumsky, btw (beautifully designed parser combinator crate!).

    #RustLang

  31. Sometimes, in order to stay flexible and fit, you need to do some (type) gymnastics 🤸

    Slowly getting the hang of #chumsky #parser combinator #crate 🤓

    One concept (among others!) I haven't learned yet, but _will_ run into, is #recursion in chumsky. I know, there are good docs on it - it's just something I haven't gotten to yet.

    All in all, I'm very happy with chumsky so far. Kudos to its maintainers! 🙂 🎩

    #Rust #RustLang

  32. Sometimes, in order to stay flexible and fit, you need to do some (type) gymnastics 🤸

    Slowly getting the hang of #chumsky #parser combinator #crate 🤓

    One concept (among others!) I haven't learned yet, but _will_ run into, is #recursion in chumsky. I know, there are good docs on it - it's just something I haven't gotten to yet.

    All in all, I'm very happy with chumsky so far. Kudos to its maintainers! 🙂 🎩

    #Rust #RustLang

  33. Sometimes, in order to stay flexible and fit, you need to do some (type) gymnastics 🤸

    Slowly getting the hang of #chumsky #parser combinator #crate 🤓

    One concept (among others!) I haven't learned yet, but _will_ run into, is #recursion in chumsky. I know, there are good docs on it - it's just something I haven't gotten to yet.

    All in all, I'm very happy with chumsky so far. Kudos to its maintainers! 🙂 🎩

    #Rust #RustLang

  34. Sometimes, in order to stay flexible and fit, you need to do some (type) gymnastics 🤸

    Slowly getting the hang of #chumsky #parser combinator #crate 🤓

    One concept (among others!) I haven't learned yet, but _will_ run into, is #recursion in chumsky. I know, there are good docs on it - it's just something I haven't gotten to yet.

    All in all, I'm very happy with chumsky so far. Kudos to its maintainers! 🙂 🎩

    #Rust #RustLang

  35. Sometimes, in order to stay flexible and fit, you need to do some (type) gymnastics 🤸

    Slowly getting the hang of #chumsky #parser combinator #crate 🤓

    One concept (among others!) I haven't learned yet, but _will_ run into, is #recursion in chumsky. I know, there are good docs on it - it's just something I haven't gotten to yet.

    All in all, I'm very happy with chumsky so far. Kudos to its maintainers! 🙂 🎩

    #Rust #RustLang

  36. Currently in the process of rewriting my #transpiler from #nom v4.2 to #chumsky v1.0.0-alpha.6 🤓

    It is a lot of fun so far, but I have to say these type signatures are _wild_!😄

    I'm still struggling with it far more than I'd like, but I guess it is just a matter of time until intuition kicks in and it will become more and more natural.

    Exciting project ahead!🙂

    I'm even able to parse string literals _with escape sequences_ - something I haven't even achieved with nom!

    #Rust #RustLang

  37. Currently in the process of rewriting my #transpiler from #nom v4.2 to #chumsky v1.0.0-alpha.6 🤓

    It is a lot of fun so far, but I have to say these type signatures are _wild_!😄

    I'm still struggling with it far more than I'd like, but I guess it is just a matter of time until intuition kicks in and it will become more and more natural.

    Exciting project ahead!🙂

    I'm even able to parse string literals _with escape sequences_ - something I haven't even achieved with nom!

    #Rust #RustLang

  38. Currently in the process of rewriting my #transpiler from #nom v4.2 to #chumsky v1.0.0-alpha.6 🤓

    It is a lot of fun so far, but I have to say these type signatures are _wild_!😄

    I'm still struggling with it far more than I'd like, but I guess it is just a matter of time until intuition kicks in and it will become more and more natural.

    Exciting project ahead!🙂

    I'm even able to parse string literals _with escape sequences_ - something I haven't even achieved with nom!

    #Rust #RustLang

  39. Currently in the process of rewriting my #transpiler from #nom v4.2 to #chumsky v1.0.0-alpha.6 🤓

    It is a lot of fun so far, but I have to say these type signatures are _wild_!😄

    I'm still struggling with it far more than I'd like, but I guess it is just a matter of time until intuition kicks in and it will become more and more natural.

    Exciting project ahead!🙂

    I'm even able to parse string literals _with escape sequences_ - something I haven't even achieved with nom!

    #Rust #RustLang

  40. Currently in the process of rewriting my #transpiler from #nom v4.2 to #chumsky v1.0.0-alpha.6 🤓

    It is a lot of fun so far, but I have to say these type signatures are _wild_!😄

    I'm still struggling with it far more than I'd like, but I guess it is just a matter of time until intuition kicks in and it will become more and more natural.

    Exciting project ahead!🙂

    I'm even able to parse string literals _with escape sequences_ - something I haven't even achieved with nom!

    #Rust #RustLang

  41. Uh, ohhh... I think it's time for me to migrate away from #nom v4.2 😮

    Yeah, I know, I've procrastinated on this a lot. This will probably be a lot of work and "slow me down" for a bit. 😪 On the upside, though: I can correct all my mistakes along the way (like having spans).

    I'll probably migrate to #chumsky, but #winnow also looks really nice. 🙂

    chumsky:
    github.com/zesterer/chumsky

    winnow:
    github.com/winnow-rs/winnow

    #Rust #RustLang #selecuery #Migration #OpenSource #Refactoring #Parser #Compiler

  42. Uh, ohhh... I think it's time for me to migrate away from #nom v4.2 😮

    Yeah, I know, I've procrastinated on this a lot. This will probably be a lot of work and "slow me down" for a bit. 😪 On the upside, though: I can correct all my mistakes along the way (like having spans).

    I'll probably migrate to #chumsky, but #winnow also looks really nice. 🙂

    chumsky:
    github.com/zesterer/chumsky

    winnow:
    github.com/winnow-rs/winnow

    #Rust #RustLang #selecuery #Migration #OpenSource #Refactoring #Parser #Compiler

  43. Uh, ohhh... I think it's time for me to migrate away from #nom v4.2 😮

    Yeah, I know, I've procrastinated on this a lot. This will probably be a lot of work and "slow me down" for a bit. 😪 On the upside, though: I can correct all my mistakes along the way (like having spans).

    I'll probably migrate to #chumsky, but #winnow also looks really nice. 🙂

    chumsky:
    github.com/zesterer/chumsky

    winnow:
    github.com/winnow-rs/winnow

    #Rust #RustLang #selecuery #Migration #OpenSource #Refactoring #Parser #Compiler

  44. Uh, ohhh... I think it's time for me to migrate away from #nom v4.2 😮

    Yeah, I know, I've procrastinated on this a lot. This will probably be a lot of work and "slow me down" for a bit. 😪 On the upside, though: I can correct all my mistakes along the way (like having spans).

    I'll probably migrate to #chumsky, but #winnow also looks really nice. 🙂

    chumsky:
    github.com/zesterer/chumsky

    winnow:
    github.com/winnow-rs/winnow

    #Rust #RustLang #selecuery #Migration #OpenSource #Refactoring #Parser #Compiler

  45. Uh, ohhh... I think it's time for me to migrate away from #nom v4.2 😮

    Yeah, I know, I've procrastinated on this a lot. This will probably be a lot of work and "slow me down" for a bit. 😪 On the upside, though: I can correct all my mistakes along the way (like having spans).

    I'll probably migrate to #chumsky, but #winnow also looks really nice. 🙂

    chumsky:
    github.com/zesterer/chumsky

    winnow:
    github.com/winnow-rs/winnow

    #Rust #RustLang #selecuery #Migration #OpenSource #Refactoring #Parser #Compiler