HN user

mfontani

1,491 karma

Marco Fontani is a camel & penguin whisperer - https://marcofontani.it/cv

You can contact me at MFONTANI@cpan.org

old gpg key revocation: https://darkpan.com/mfontani-changing-keys-20151210.txt

[ my public key: https://keybase.io/mfontani; my proof: https://keybase.io/mfontani/sigs/S_IUeD_qpq4JRMtNG4BiCj97N8LbcQClGT_niI_a9ms ]

meet.hn/city/45.41807,9.27165/San-Donato-Milanese

Socials: - github.com/mfontani - linkedin.com/in/marcofontani - reddit.com/user/mfontani

Interests: Cybersecurity, DevOps, Gaming, Hacking, Open Source, Programming, Remote Work, Technology, Web Development

---

Posts21
Comments306
View on HN
github.com 2y ago

Show HN: C-Based Ansi2html

mfontani
1pts1
github.blog 4y ago

Write Better Commits, Build Better Projects

mfontani
20pts3
github.com 4y ago

Mojolicious/mojo.js: The Mojolicious real-time web framework for Node.js

mfontani
2pts0
www.theregister.com 4y ago

GitHub tackles leaks by scanning for secrets in pushed code

mfontani
1pts0
blogs.perl.org 4y ago

Cloud Provider Performance Comparison – Perl and More

mfontani
70pts22
www.tabnine.com 5y ago

Code Faster with AI Completions

mfontani
2pts0
www.theregister.com 5y ago

ElReg debate results: don't use word 'hacker' when you mean 'criminal'

mfontani
3pts2
medicalxpress.com 5y ago

Spacing Singapore to improve social distancing

mfontani
1pts0
k9mail.app 6y ago

What's up with K-9 Mail?

mfontani
3pts0
www.theregister.com 6y ago

Sophos puts 100 at risk of redundancy

mfontani
1pts0
christine.website 6y ago

Gitea-Release Tool Announcement

mfontani
1pts0
docs.google.com 6y ago

Fixing a long-standing bug in satellite-based nuclear weapon detectors

mfontani
6pts0
marc.info 6y ago

Why does OpenBSD still include Perl in its base installation?

mfontani
100pts157
www.theregister.co.uk 6y ago

Get ready for a waiting list for European IPv4 addresses. No jumping the line

mfontani
1pts1
www.scaleway.com 7y ago

Object Storage – Scaleway

mfontani
2pts0
webperl.zero-g.net 7y ago

Run Perl in the browser with WebPerl

mfontani
148pts58
raw.githubusercontent.com 8y ago

Tmux 2.6 is out

mfontani
3pts1
molily.de 9y ago

What Google AMP Means for the JavaScript Community

mfontani
2pts0
dev.modern.ie 10y ago

Test versions of IE from 6 through 11 and Microsoft Edge using virtual machines

mfontani
212pts121
nerds-central.blogspot.com 15y ago

Perl vs PHP and others in the job market: surprised?

mfontani
5pts0
github.com 15y ago

FUSE interface to a Git repository, in Perl

mfontani
4pts0
Zed 1.0 3 months ago

Why does signing up through Github require the "act on behalf" permission?

That seems risky.

Unfortunately many older mud servers (diku? Rom?) started with the wrong \\n\\r and codebases spawned from them just continued. Very few send the proper \\r\\n

I started "real" programming with MUDs, and after a hiatus I'm still helping run a C-based MUD, and it's awesome.

Much water has passed under bridges, yet there are dozens of us even creating new ones and doing all sorts of weird things with this great hobby.

The Multi User Dungeon discord is nowadays the place to meet like-minded people who like, or code, or balance, or design, or write or use clients for, MUDs. Join us at https://discord.gg/multi-user-dungeon-279748146316312576

IAC WILL MUD

No, kinda by (OSD) definition. See point number 6 here: https://opensource.org/osd

6. No Discrimination Against Fields of Endeavor The license must not restrict anyone from making use of the program in a specific field of endeavor. For example, it may not restrict the program from being used in a business, or from being used for genetic research.

So if you wish to restrict the use of the Software "in a business" (or in other endeavours), it won't be considered "open source".

The CC licenses aren't great for software, either, IMO. They're great for things like assets, basically... and that's about it.

That said, there's plenty "code available" licenses you may use. You just can't then call them "open source" since they're not.

Another way to put it: say I provide a patch to that software for you. I release it under the same terms as you provided. If you use it, well... you can't use it in your commercial product... as the license forbids it? ;-)

Why do I, some random person installing this module, care if the tests pass now?

Because running those tests in your environment ensures that... that module can run in your environment.

By way of example, if a module requires a specific library installed to actually run, running its tests will ensure you catch the problem, and install it, so it can then actually run. Else you'd only find out at runtime that something's missing.

Note also that not all tests are the same, and (unfortunately!) not all modules' tests are the same, either: there's tests that ensure the module works "generally", and there's some author/development tests that on a _properly written_ module are only ran by the author/developer, and skip running when the modules are instead installed by mere users, for whom instead the "standard" "will this module work in this environment?" tests are the only one that get ran.

I have horrible memories of the DBD::MySQL package failing to install because it ran tests that assumed localhost was running a MySQL server

I believe that got fixed, IIRC, as I've had no trouble installing that module (and running its tests at install time, natch). I said "fixed" as that seems like the sort of test that makes sense for the module's authors/developers to run, and not mere users of it.

That depends on "which version" of "Perl 7" you're saying, as IIRC there were various "factions" that had varying ideas about what ought to happen when "perl7" runs programs that didn't specify a "use v..." or that specified a specific "5.something" version.

I'm personally of the idea that enough backwards compatibility _should_ be preserved, but not _so_ much as to inhibit new/better syntax constructs and the like.

But honestly it's the sort of thing that is more like "I'll know it when I see it" more than anything.

Re "long term maintenance mode", there's the not so small matter of how many people can, in fact, actually develop perl. The codebase is large and full of many traps. It's a difficult, but not impossible, codebase to contribute to.

My sincere hope is that enough things will get out of "experimental", including quite a bit more of the "class" feature, for the end result to be enough to be called "7" and we'll go from there.

Basically... mostly a marketing thing, as today's 5.40 is way, way different (and better in so many respects) than 5.8 or 5.20 or even 5.32... but the (minor) version number doesn't show that.

A "perl 7" would.

And still no native object/class system.

There's https://metacpan.org/dist/perl/view/pod/perlclass.pod, which (granted) is experimental, but it's actively being worked on.

Still no working exception handling!

There's https://metacpan.org/dist/perl/view/pod/perlsyn.pod#Try-Catc... which is now (5.40) no longer an experiment, _aside from_ the use of `finally`, which warns.

trying to guarantee backwards compat for all the legacy code

Not "all", as there are indeed deprecations added over time, but _most_. I really, really like that I can, more often than not, take a program I wrote decades ago and it will still run properly.

I tried the first line and in some situations (specifically with some remotes, i.e. kitty -> ssh -> tmux with that 1st line) it still won't fix it.

You likely need all of them ;-)

IIRC it "fixes" terminfo stuff "within tmux" for kitty regardless of what $TERM is set. Mind you, I was using the latest tmux at that time. tmux 3.2?

Here's the issue I had: https://github.com/kovidgoyal/kitty/issues/3018

Looks like it should be fixed on a very recent tmux; otherwise this MIGHT help:

    set-option -as terminal-features ',xterm-kitty:RGB'
... or not.

What's your reason to migrate from kitty to wezterm?

My reason to no longer using kitty is simple: I don't like having to copy kitty's terminfo data to every single system I connect to in order to have my terminal work.

It's fine for those few systems I very often connect to, of course.

But I also connect to ephemeral systems, sometimes for a short session, and the toil and friction inherent in having to do that just isn't worth it.

Sure, "kitty +kitten ssh ..." can work in most people's scenarios. Didn't quite work in mine, due to various intricacies about my ssh setup - multiple ssh keys, handled mostly by ssh-ident.

wezterm Just Worked for me. As I got "back" to also using other systems like Windows and MacOS, it Just Worked there, too. No fiddling with terminfo, no fiddling with $TERM, either.

Happy days.

I had a long battle with making kitty work with tmux. I settled on the following in ~/.tmux.conf, before moving to wezterm for good. Maybe it fixes things for you, too:

    set -g default-terminal xterm-256color
    set-option -sa terminal-overrides ',xterm-kitty:RGB'
    set-option -ga terminal-overrides ",xterm*:Tc:smcup@:rmcup@"
    set-option -ga terminal-overrides ",screen*:Tc:smcup@:rmcup@"
    set-option -ga terminal-overrides ",tmux*:Tc:smcup@:rmcup@"
I honestly don't know whether all are needed, or only some. But with these, it worked well for me.

Nope, it doesn't. It reduces it greatly, but it's still there. To disable it "fully" one has to disable SIP, and that's not a great idea.

Rather than "reduced" motion, I'd really look forward to "no" motion.

Like I had with i3wm... practically _instantaneous_ switch between spaces/virtual desktops.

From https://stripe.com/legal/restricted-businesses

Looks like there's a bunch of stuff that might opinably fit, depending on who those 10 clients were or what your company does.

- Regulated industries such as: Financial products and services / Investment and brokerage services - Money transmitters, currency exchange services and other money services businesses - Neobanks / challenger banks - Other financial institutions - Credit card and identity theft protection services - Other age restricted goods or services - Virtual and cryptocurrencies, non-fungible tokens (NFTs), and mining services - Sale of stored value or credits maintained, accepted and issued by anyone other than the seller - Businesses where sellers get their revenue both from selling items and from signing up new sellers - When you sign up for Stripe Issuing, you share with Stripe the location of your business, the physical address of your beneficial owners, and the jurisdiction in which your business is registered. Stripe requires that the physical location of your business, its jurisdiction of registration, and the physical address of at least one of your beneficial owners all match. Furthermore, you must use Issuing cards primarily in the same jurisdiction - Use of Stripe's services for any dealings, engagement, or sale of goods/services linked directly or indirectly with jurisdictions Stripe has deemed high risk, such as Cuba, Iran, North Korea, Syria, and the Crimea, Donetsk, and Luhansk Regions, or persons Stripe has deemed high risk, such as those individuals or entities named to a restricted person or party list of the U.S., United Kingdom, European Union or United Nations, including the sanctions lists maintained by the U.S. Office of Foreign Assets Control or the Denied Persons List or Entity List maintained by the U.S. Department of Commerce, is prohibited. Additionally, it is prohibited to use Stripe's products and services to directly or indirectly export, reexport, sell, or supply accounting, trust and corporate formation, management consulting services, architecture services or engineering services to any person located in Russia. Further, it is prohibited to use Stripe’s products and services directly or indirectly related to any goods prohibited by law (e.g. luxury goods) from Russia.

From a cursory search of email, name, company... I find it plausible that something above might've matched. Or maybe it's a matter of who those 10 clients were, and where they're located. Iran? Cuba? Crimea? Russia? That might do it.

Maybe your competitor also matches, which might be ground for -- if Stripe doesn't want that kind of business on their platform -- for shooting them off, too.

Or maybe it's not a matter of the business type, but of where the clients reside.

Unfortunately only Stripe could help here. :/

Perl 5.38 3 years ago

Since about 2008-01 or so, using Moose, we've been able to do something like:

    { package Point;
      use Moose;
      has 'x' => (is => 'ro', isa => 'Int', required => 1);
      has 'y' => (is => 'ro', isa => 'Int', required => 1);
      sub as_string {
        my $self = shift;
        return sprintf '(%d,%d)', $self->x, $self->y;
      }
    }
    my $origin = Point->new(0, 0);
    say $origin->as_string;
Perl 5.38 3 years ago

Which "two" authors?

Perl continues to flourish into its fourth decade thanks to a vibrant community of users and developers. The following people are known to have contributed the improvements that became Perl 5.38.0:

Alex, Alexander Nikolov, Alex Davies, Andreas König, Andrew Fresh, Andrew Ruthven, Andy Lester, Aristotle Pagaltzis, Arne Johannessen, A. Sinan Unur, Bartosz Jarzyna, Bart Van Assche, Benjamin Smith, Bram, Branislav Zahradník, Brian Greenfield, Bruce Gray, Chad Granum, Chris 'BinGOs' Williams, chromatic, Clemens Wasser, Craig A. Berry, Dagfinn Ilmari Mannsåker, Dan Book, danielnachun, Dan Jacobson, Dan Kogai, David Cantrell, David Golden, David Mitchell, E. Choroba, Ed J, Ed Sabol, Elvin Aslanov, Eric Herman, Felipe Gasper, Ferenc Erki, Firas Khalil Khana, Florian Weimer, Graham Knop, Håkon Hægland, Harald Jörg, H.Merijn Brand, Hugo van der Sanden, James E Keenan, James Raspass, jkahrman, Joe McMahon, Johan Vromans, Jonathan Stowe, Jon Gentle, Karen Etheridge, Karl Williamson, Kenichi Ishigaki, Kenneth Ölwing, Kurt Fitzner, Leon Timmermans, Li Linjie, Loren Merritt, Lukas Mai, Marcel Telka, Mark Jason Dominus, Mark Shelor, Matthew Horsfall, Matthew O. Persico, Mattia Barbon, Max Maischein, Mohammad S Anwar, Nathan Mills, Neil Bowers, Nicholas Clark, Nicolas Mendoza, Nicolas R, Paul Evans, Paul Marquess, Peter John Acklam, Peter Levine, Philippe Bruhat (BooK), Reini Urban, Renee Baecker, Ricardo Signes, Richard Leach, Russ Allbery, Scott Baker, Sevan Janiyan, Sidney Markowitz, Sisyphus, Steve Hay, TAKAI Kousuke, Todd Rinaldo, Tomasz Konojacki, Tom Stellard, Tony Cook, Tsuyoshi Watanabe, Unicode Consortium, vsfos, Yves Orton, Zakariyya Mughal, Zefram, 小鸡.

I use wezterm and love it, too - BUT, it doesn't yet support SSH agent forwarding, which are an integral part of my workflow for some machines.

So it's great -- for me -- for local connections, or remote ones where I don't need to pass an SSH agent, but it's not yet there "fully" for me the way KiTTY is.

How to Yubikey 3 years ago

You can add 32 of these secrets to a Yubikey device.

I have 45 of those currently in my Authy account, which syncs on two phones for redundancy...

I'd love to use a Yubikey for this, but I'd have to split those accounts across multiple yubikeys, which would be quite a headache to maintain, especially if one wants redundancy...

Look for "sidetone", which is the feature I have on my G533, too.

Great for hearing yourself, and possibly lowering your voice.. except in my case, it's turned all the way up to 11, and I still "shout" on calls.

Git Notes 4 years ago

I've tried to use git notes over the years but unfortunately notes are tied to a specific commit hash. It's a blessing and a curse.

Works great for some types of review system, or for "tagging" things related to deploy. Notes on commits on the master/main branch, which doesn't get rebased? Awesome thing, they work.

But you can't as easily use them on branches: the moment a branch whose commits had notes is rebased, and SHAs change, good-bye notes associated with the "previous" SHAs :/

Don't forget there's also "state $var" and "local $var", which declare other types of variables. They're there because they.. are useful.

Same as why there's "var", "let" or "const" in JS. Different scoping / types of variable slots for the interpreter.

A "my" variable declares a variable valid in the current scope; an "our" variable will be available at the package level; a "state" variable is initialised only once, but has the same scope as a "my" variable; a "local" variable "locally overrides" for the current block (and any code called by the current block) the value of said variable.

They all have their uses, and that's why they exist.

Using neovim + https://github.com/kassio/neoterm I have a similar, possibly simpler, workflow that doesn't require any other program (especially listening willy nilly with no authentication/authorization whatsoever) other than your normal SQL client running:

- I open a :Term window, in which I run the sql client (i.e. ":Texec sqlite\ foo.sqlite" or ":Texec mysql\ foo", etc)

- From there, I can run whatever SQL command normally.

If I'm then in another buffer, and assuming there's only one :Term open, I can:

- visually select something, and :TREPLSendSelection to have it sent to the terminal along with a newline, thus executed (i.e. type ".schema" on one line, V then :TREPLSendSelection, ENTER, done - it gets executed in the terminal and the output shown) or "vap" to select a full paragraph and :TREPLSendSelection to send it all, for multi-line queries

- alternatively, :TREPLSendLine to send the current line

- alternatively, :TREPLSendFile to send the whole file (useful when the whole file both undoes and does things, to easily recreate a database structure)

I've found those simple things ("just have a terminal", "send stuff to it") to be very powerful, without having additional tools which, moreover, listen willy nilly on the network.