Fedora ponders the Python 2 end game
Fedora ponders the Python 2 end game
Posted Aug 5, 2017 21:14 UTC (Sat) by flussence (guest, #85566)In reply to: Fedora ponders the Python 2 end game by smckay
Parent article: Fedora ponders the Python 2 end game
The most programmer-abusive thing I've tried to use lately is actually perl6's binary types. There's no concept of endianness so the 16/32 bit wide variants are completely unusable for I/O… and they *only* work with I/O functions. You can't pack, unpack, recast to array or any other kind of high level operation on them. The rest of the language is (mostly) sane, but this forgotten corner has all the readability and portability of disassembled SIMD code with the performance of said asm being emulated in a high level language.
Posted Aug 7, 2017 11:12 UTC (Mon)
by niner (subscriber, #26151)
[Link] (1 responses)
That's not exactly true:
> perl6 -e '"Ödögödöckö".encode.List.say'
> perl6 -e 'use experimental :pack; pack("NNN", 1, 2, 3).say'
> perl6 -e 'use experimental :pack; pack("NNN", 1, 2, 3).unpack("NNN").say'
Posted Aug 9, 2017 20:58 UTC (Wed)
by flussence (guest, #85566)
[Link]
I'm talking about things like this:
Or, here's a basic “real world” example I just made up: Read two equal-size image files in farbfeld format, alpha composite them, and write out the result to a new file… what would idiomatic perl6 code for that look like? Probably shorter than this comment if these bits of the language worked, but they don't.
Sorry for what looks like nitpicking some obscure corner of the language, but I've seen a few too many people get burned out exploring these dark corners; they receive the silent treatment when they point out the language is getting in their way, and subsequently ragequit. There's a lot of this broken window syndrome outside of the cool-oneliner-demo APIs, and it's been like this since forever.
Fedora ponders the Python 2 end game
> perl6 -e '"Ödögödöckö".encode.say'
utf8:0x<c3 96 64 c3 b6 67 c3 b6 64 c3 b6 63 6b c3 b6>
(195 150 100 195 182 103 195 182 100 195 182 99 107 195 182)
Buf:0x<00 00 00 01 00 00 00 02 00 00 00 03>
(1 2 3)
Fedora ponders the Python 2 end game
> perl6 -e 'use experimental :pack; buf32.new(0x10203040, 1, 2, 3, 4).unpack("N").say'
4538991231697411
