dan

joined 2 years ago
[–] dan@lemm.ee 1 points 2 years ago

The way it works is that there's a symbol table entry for "foo" which has a slot for a hash, scalar, array, glob, etc.

That leads to some super weird behaviour like, for example, if I declare a scalar, hash and array as "x":

$x = "sy";
%x = (foo => "mb");
@x = ("ol", "s!");

You can access them all independently as you're aware:

say "x: ", $x, $x{foo}, @x; # Outputs:  x: symbols!

But what's really going to bake your noodle is I can assign the "x" symbol to something else like this:

*z = *x;

..and then the same thing works with z:

say "z: ", $z, $z{foo}, @z; # Outputs:  z: symbols!

Oneliner if you want to try it:

perl -E '$x = "sy"; %x = (foo => "mb"); @x = ("ol", "s!"); say "x: ", $x, $x{foo}, @x; *z = *x; say "z: ", $z, $z{foo}, @z;'

Congratulations! You now know more about one of Perl's really weird internals than I'd wager most Perl programmers (I have literally never used any of the above for anything actually productive!)

[–] dan@lemm.ee 5 points 2 years ago* (last edited 2 years ago)

The issue with pugs is not that they're evil or bad creatures, it's that humans have selectively bred them for their looks, but that's lead to the animals suffering because their breeding means they have massive problems with breathing, their knees, spine, eyes, etc. That's unfair on the animal.

It's like saying we want to eliminate genetic diseases like Down's syndrome or Haemophilia. Nobody's saying individuals with those conditions are bad, it's that we don't think people should be born with conditions that give them a worse life.

Now for dogs it's a bit more complicated because those conditions are afflicted upon them by us purely for aesthetics, and if dogs are banned that inevitably leads to some being killed which isn't very fair on those animals, but if we can't find a way to reverse the worst aspects of their breeding is the only way we can prevent further suffering.

[–] dan@lemm.ee 5 points 2 years ago (4 children)

Well the black market doesn't exist because it's not legal to own a pitbull - as you say, who wants a dog they can't take outside?

My point is if you ban breeding but you don't ban owning the dog then you risk creating that black market.

[–] dan@lemm.ee 1 points 2 years ago* (last edited 2 years ago) (2 children)

You mean the fact that you can have a hash called %foo, an array called @foo and a scalar called $foo all at the same time? I agree that's a weird choice and there's potential for insanity there, but it's pretty easy to just not do that...

20+ years of Perl experience and while Perl has a load of idiosyncrasies that make it harder to work with than other languages, I don't think that particular one has ever caused a significant problem.

[–] dan@lemm.ee 9 points 2 years ago (3 children)

Some of them, yes. They didn’t go hunting them but any complaints or incidents or they find one when investigating some other crime then you can be sure your pitbull would be taken away and destroyed.

I don’t think owners got prosecuted or anything as long as the dog was born before the ban, just the dog taken away. Breeders that continued selling them certainly did get prosecuted though.

[–] dan@lemm.ee 9 points 2 years ago (6 children)

The problem with “don’t ban them but don’t let them breed more” and allow people that have one to just carry on is you just create a potentially lucrative black market for these dogs (in fact you doing that might make them more sought after), which doesn’t actually fix any problems.

Not necessarily advocating killing animals because they’re inconvenient but ultimately if they’re going to be a problem (and it certainly seems like that’s the case) then the sooner they’re banned the less harm is inflicted overall.

[–] dan@lemm.ee 3 points 2 years ago

Nope. But I know a bunch of people that do or have, and have interviewed several (it’s a pretty small sector!)

[–] dan@lemm.ee 9 points 2 years ago

I tell you what, if we specifically genetically engineer people to be aggressive and powerful and they start eating toddlers faces then I’m cool with banning them too.

“Dog racism”, fuck off.

[–] dan@lemm.ee 16 points 2 years ago (4 children)

I mean it sounds like just the one, American XL bully. Seems perfectly reasonable to me given how ridiculously powerful these dogs are makes them extremely dangerous when they’re being aggressive.

[–] dan@lemm.ee 5 points 2 years ago* (last edited 2 years ago)
  • Larger, OLED screen
  • Hall effect sensor sticks
  • Better rumble
  • Support for 2242 m.2 drives
  • Second SD card reader
  • Better cooling (I’d gladly have a lump in the back middle if it allowed for a quieter/better fan)
  • Better accessory connection options (eg a standard for attaching stuff like extra batteries to the back) - I would prefer this to adding more battery (ie weight) to the unit itself.
  • Tweaks to the back buttons so they work no matter where on the button you press
  • Some sort of charging dock connection standard to avoid the manual usb connection. Maybe just a usb-c on the bottom
  • Small case design change to prevent sd cards being snapped when opening (I haven’t done it, but only by luck)
  • Replace the carry case with a plastic cover to protect screen/sticks like dbrand’s (or at least make it a lot smaller)

Better performance/more ram would be good too I guess but honestly having a unified platform with fixed specs to target has a lot of benefits.

[–] dan@lemm.ee 10 points 2 years ago (6 children)

I write Perl at work. Supporting an actively developed Perl based application.

It’s honestly not that bad as a language, the biggest downside is that the ecosystem of libraries around it are often abandoned or outdated. The language isn’t perfect and it needs a bit of discipline to avoid creating unreadable code, but honestly it’s not as bad as its reputation might have you believe.

It has quite a few tricks and unexpected bits of flexibility that make it quite a bit more expressive than other languages - you can really craft nice compact, elegant code with it if you want to.

These days I use other languages too (Python, Ruby, JS, etc) but none of them quite match Perl for expressiveness.

Oh also it’s great for oneliners. That expressiveness can be abused for brevity in some really interesting ways.

[–] dan@lemm.ee 0 points 2 years ago

Which incompatible language upgrades? Are you talking about Perl 6?

That was never really an iteration of Perl, and it was renamed Raku some years back so is no longer named like it’s an iteration of Perl.

Perl continues as Perl 5 and honestly values compatibility extremely highly, probably more than many (most?) other languages. There have been a handful of breaking changes over the years (most notable for me was the hash key ordering thing) but those are usually security related rather than anything else.

view more: ‹ prev next ›