Reddit Programming – Telegram
Reddit Programming
212 subscribers
1.22K photos
125K links
I will send you newest post from subreddit /r/programming
Download Telegram
Error handling with linear types and automatic concurrency? Par’s new syntax sugar
https://www.reddit.com/r/programming/comments/1n6m0iz/error_handling_with_linear_types_and_automatic/

<!-- SC_OFF -->What’s the story of error handling if resources aren’t automatically droppable and expressions evaluate concurrently with their consumers? Does explicit cleanup and no call-stacks allow for convenient error handling syntax? Par is my programming language (https://github.com/faiface/par-lang) with linear types, automatic concurrency, and all-in-all is based on classical linear logic. Recently I’ve added more I/O functionality, which made me realize that manually case-ing on all Results leads to losing passion for programming. So, with all these new usecases in front of my eyes, I came up with a convenient error handling syntax that fits the unique constraints of Par: linear types and automatic concurrency. It is similar to Rust’s way in some aspects, but also quite different. Check it out: https://faiface.github.io/par-lang/error_handling.html What do you think? Would you be happy using this syntax? A small example: def Main: ! = chan exit { let console = Console.Open catch e => { console.print(e) console.close exit! } let path = Os.PathFromString("logs.txt") let try writer = path.createOrAppendToFile writer.writeString("[INFO] First new log\n").try writer.writeString("[INFO] Second new log\n").try writer.close(.ok!).try console.close exit! } <!-- SC_ON --> submitted by /u/faiface (https://www.reddit.com/user/faiface)
[link] (https://faiface.github.io/par-lang/error_handling.html) [comments] (https://www.reddit.com/r/programming/comments/1n6m0iz/error_handling_with_linear_types_and_automatic/)
Zero Downtime Major Version PostgreSQL Upgrades
https://www.reddit.com/r/programming/comments/1n74kfo/zero_downtime_major_version_postgresql_upgrades/

<!-- SC_OFF -->A blog from Shaun Thomas on how to achieve zero-downtime upgrades of your Postgres instances with native tooling. Friendly reminder: PG18 is just about here, which means it's about time to upgrade to PG17 on your production instances if you haven't already :-) <!-- SC_ON --> submitted by /u/pgEdge_Postgres (https://www.reddit.com/user/pgEdge_Postgres)
[link] (https://www.pgedge.com/blog/always-online-or-bust-zero-downtime-major-version-postgres-upgrades) [comments] (https://www.reddit.com/r/programming/comments/1n74kfo/zero_downtime_major_version_postgresql_upgrades/)