Hacker News new | past | comments | ask | show | jobs | submit | more civopsec's comments login

If you are fine with using `map` then I don’t see how this is “clever”. `zip` is basically “map2”.


What’s there to say? It works the same way as `zip` does for an iterator over a `Vec`. So if you understand `zip` as applied to an iterator over `Vec`, then you might understand `zip` applied to `Option`.

In other words:

Y is clear if you already understand X. Like how returning early is simple to understand if you understand if-blocks.

That’s the problem with replying to these kinds of questions: the response is so short and context-dependent that it can look curt.

EDIT: the first code is also inelegant in that it effectively checks if both values are `None` twice in the `Some` case: once in the if-condition and once in `unwrap()` (the check that panics if you try to unwrap a `None`).


> instead of one using e.g. .pg?

Why not just `.prolog`? In this day and age. (Maybe there’s some reason like “then I can’t put these source files on FAT filesystems”, I don’t know.)

Java seems to do fine with it’s longer-than-three-letters `.java`.


Most editors will understand .prolog, but on the other hand it's 15 years older than perl and it's not hard to teach editors to treat .pl as prolog.


.pl is used because prolog is really old and FAT used to enforce extension limits. Not relevant nowadays, but it's stuck around.


FAT is 8 + 3, so it still had space for .pro as well.


Prolog is older than Perl. Perl usurped the .pl extension. Some are trying to claim it back.


Yes, it looks like modern Prolog systems using ".pl". I checked Ciao, GNU Prolog (which recognizes ".pl" and ".pro"), SICStus Prolog (also ".pl" and .pro"), SWI-Prolog, and B-Prolog.

The documentation for SWI-Prolog 5.10 (2010) even says "Tradition calls for .pl, but conflicts with Perl force the use of another extension on systems where extensions have global meaning, such as MS-Windows. On such systems .pro is the common alternative." https://www.swi-prolog.org/download/stable/doc/SWI-Prolog-5.....

Thing is, I can't confirm that tradition predates Perl 4 - call it 1993.

Turbo Prolog used ".pro" in the late 1980s - https://archive.org/details/bitsavers_borlandturOwnersHandbo... .

So did Prolog-2, according to the 1990 book at https://archive.org/details/advancedlogicpro0000unse/page/80... .

VPI Prolog from 1991 has an '".hc" file name extension (which stands for Horn Clause, the logic upon which the PROLOG language is based).'.

I even found one Prolog system from that era using ".txt", at https://archive.org/details/programminginpro0000cloc/page/26... .


The 1978 DEC10 Prolog user guide mentions PROG.PL as an example of a Prolog file with an extension. See 3.2 in https://userweb.fct.unl.pt/~lmp/publications/online-papers/U...

Maybe the 1975 Prolog I manual has more to say...


Good work!

I think it's even more explicit on p25 where it says "A module name can have the form either file.ext or just file. In the latter case the extension 'PL' is implied."


> I interpreted the quotes as implying that the children hadn’t developed a full human language, but rather the rudimentary beginnings of one.

A language, in other words.


I looked at this thread in the morning. Then I waited the whole workday to get home and read anecdotes like yours.

This is seriously cool. I never understood why people don’t talk more about this style of programming.


Welcome to modernity.


> something that created us, is something almost all of us have.

Buddhism claims that nothing created us. Samsara is beginningless and wasn’t architected by anything. And that’s just 500 billion people or so.


> 500 billion people

* million


> Even something as simple as prepending the site name in ROT13 to a reused password greatly reduces your exposure to the sort of background infosec threat radiation that's like 99.99% of the threat model for most people

If one goes with the infosec advice that you should calculate the entropy of passwords based on the assumption that the attacker knows the password scheme, then this password scheme provides zero entropy. So if there is zero cost for the cracker to pwn you as well as all the others that don’t have this kind of leetspeak obfuscation then you’re still pwned.


> In light of this breach, can someone explain to me why it's not stupid to keep all your passwords in one place?

My passwords-in-one-place software is not on the Web/Cloud. (And I don’t understand why this point needs to be restated in every Lastpass thread.)


Why would a government have anything to do with this?

But if you insist: the best thing a government can do is to have some civic service which any kind of person can be called to do (not just the unenemployed, the retired, or other such people that the govt. wants to “keep busy”). There’s nothing that bonds more (between strangers) than reluctantly having to do some task because either Nature or Government is forcing you to. ;)

Or just facilitate the creation and running of volunteer groups.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: