> Also, unlike Go or Rust, Wuffs’ memory safety is enforced at compile time, not by inserting runtime checks that e.g. the i in a[i] is within bounds or that (x + y) doesn’t overflow a u32. Am I missing something, or is this statement simply wrong? Have not used Go, but Rust checks its stuff at compile time as far as I know.
Wuffs’ PNG image decoder
11–20 of 144 posts
Re: Wuffs’ PNG image decoder
#12My favorite part of the Wuffs github page has to be the definition it gives for Dependent Types > ...Dependent types are a way to implement compile-time bounds checking, but they're not the only way, and there's more to programming languages than their type systems. Wuffs does not use dependent types. Wuffs looks really interesting! I don't think I've ever even heard of a language that is designed to only be used in…
Embeddedable scripting languages come to mind. E.g.:
"Lua is a lightweight, high-level, multi-paradigm programming language designed primarily for embedded use in applications."
Re: Wuffs’ PNG image decoder
#13My favorite part of the Wuffs github page has to be the definition it gives for Dependent Types > ...Dependent types are a way to implement compile-time bounds checking, but they're not the only way, and there's more to programming languages than their type systems. Wuffs does not use dependent types. Wuffs looks really interesting! I don't think I've ever even heard of a language that is designed to only be used in…
Re: Wuffs’ PNG image decoder
#14> Also, unlike Go or Rust, Wuffs’ memory safety is enforced at compile time, not by inserting runtime checks that e.g. the i in a[i] is within bounds or that (x + y) doesn’t overflow a u32. Am I missing something, or is this statement simply wrong? Have not used Go, but Rust checks its stuff at compile time as far as I know.
Re: Wuffs’ PNG image decoder
#15Earlier quoted context omitted.
Looks like there isn't an encoder for PNG: https://github.com/google/wuffs/tree/main/std/png Given the project goals, I guess most encoders don't make a lot of sense: For image encoding you basically provide an "x * y * bytes_per_pixel" memory area and an encoder does its magic on that. There isn't really any complicated untrusted input in that case.
Darn, I had a handful of NumPy arrays which could use a fast encoder.
If you're encoding PNGs from NumPY arrays you don't care at all about safety.
If, for some reason I can't quite comprehend, whatever encoder you have on hand isn't fast enough, you can just disable compression optimizations -- but at that point you may as well be writing out a bitmap.
Re: Wuffs’ PNG image decoder
#16My favorite part of the Wuffs github page has to be the definition it gives for Dependent Types > ...Dependent types are a way to implement compile-time bounds checking, but they're not the only way, and there's more to programming languages than their type systems. Wuffs does not use dependent types. Wuffs looks really interesting! I don't think I've ever even heard of a language that is designed to only be used in…
> I don't think I've ever even heard of a language that is designed to only be used in an auxiliary role along side another general purpose programming language! Embeddedable scripting languages come to mind. E.g.: "Lua is a lightweight, high-level, multi-paradigm programming language designed primarily for embedded use in applications."
Lua is used at the very top level of a program, sometimes its even user accessible!
Wuffs is the exact opposite, it is designed for use in the deepest levels of a program!
Very cool idea.
Re: Wuffs’ PNG image decoder
#17Re: Wuffs’ PNG image decoder
#18My favorite part of the Wuffs github page has to be the definition it gives for Dependent Types > ...Dependent types are a way to implement compile-time bounds checking, but they're not the only way, and there's more to programming languages than their type systems. Wuffs does not use dependent types. Wuffs looks really interesting! I don't think I've ever even heard of a language that is designed to only be used in…
Re: Wuffs’ PNG image decoder
#19hmmmm.