HNHacker News
TopNewBestAskShowJobs

tom-lord

125 karma · joined January 9, 2015

London software developer
submissionscomments
tom-lord··on Introducing Darkleaks
Without even going into the technical side of things, what I really don't understand about these sorts of projects is: What are you trying to achieve, exactly?

Some of material that DarkLeaks is being advertised as "the best tool to trade" seems like it would be great to have publicly available, e.g.

> Proof of tax evasion, corruption

But most of these things, in my opinion, should NOT be publicly distributed! They are private/confidential for good reason - either for personal privacy, or even for national security reasons! E.g.

> (Recent) military intelligence, sex pictures, trade secrets, ...

I don't understand how anyone can wholeheartedly support a system that could help do so much damage to the world.

tom-lord··on Missy Elliot encryption algorithm
Yeah, I guess so... At least the gem does use the methods "encode" and "decode".
tom-lord··on I Hate the News (2006)
That looks really cool - I haven't seen it before, thanks!

The "offending system" I mentioned, however, is our old PHP application that I don't really work on. (I mainly develop much more modern Rails stuff!)

Like I said, the primary concern of the company is simply to keep pen testers happy - and their criteria for a "secure" website is, in my opinion, often misleading or even downright wrong. But if I ever get the chance to genuinely improve the system, I'll definitely look into using this.

tom-lord··on I Hate the News (2006)
My company considers one of its systems "more secure" because they enforce a policy that all passwords must contain 8+ non-space characters. The implementation? "Must be 8+ characters; must not contain spaces."

I've expressed my view on this (and similar password-related policies) many times, but apparently it's all simply a box ticking exercise for pen testers...

tom-lord··on Twitter Will Crack Down on Serial Trolls by Tracking Their Phone Number
> It’s not a perfect solution — the troll could abandon the banned account and open a new one without supplying a number

Yeah, that's a slight flaw in this plan, isn't it?...

I guess the only real benefit of this new system is that admins can be more trigger-happy on (temporarily) banning accounts.

tom-lord··on Email Regex that works 99.99%
As others have suggested, the best "standardised regex" solution would just be something like:

    /.*@.*/
Some people aren't happy with this because it allows invalid emails to be entered. But the alternative - such as what's being attempted here - is a nightmare!

Even if there was a standardised regex for all emails, which would not break when new TLDs are released, or new unicode characters are supported, or whatever, there would still be no guarantee that someemailaddress@domain.com is actually valid!

Your best bet is to simply allow users to enter anything (with perhaps some minor regex check like I did above), perhaps ask them to enter it twice, and perhaps send an account validation email.

tom-lord··on Email Regex that works 99.99%
I believe this falls under the category of "things that may be fun to play around with but should never be used in a real system".

Unfortunately, I bet there are thousands of "real systems" employing regexes like this... How many problems does this solve? Probably zero. How many does (/will) it cause? Probably much more than zero.

tom-lord··on Magic
This seems like another one of this startup ideas that will blow up, sell for $X,000,000 in a few weeks/months, then die as the fad wears off.

Congrats on being so successful so far, but my advice would be to sell out before the investors loose interest!

tom-lord··on A regular expression to check for prime numbers
Thanks :)

It's still "under development", while I add a few missing features, but as you can see from the README these are only for fairly obscure parts of the regex language! - E.g. POSIX groups, named properties, character set intersection, ...

tom-lord··on A regular expression to check for prime numbers
The point is that if there is a prime factor greater than sqrt(n), then your will have already found its co-factor by then.
tom-lord··on A regular expression to check for prime numbers
I'm currently working on a ruby gem to generate examples of given regular expression. For example:

    /this|is|awesome/.examples # => ["this", "is", "awesome"]
So, I tried it out on this "prime number validator" regex:

    /1?|(11+?)\1+/.examples
      #=> ["", "1", "1111", "111111", "11111111"]
    /1?|(11+?)\1+/.examples(max_repeater_variance: 50, max_group_results: 100).uniq.sort.map(&:length).first(10)
      #=> [0, 1, 4, 6, 8, 9, 10, 12, 14, 15]

    require 'prime'
    Array(1..100) - /1?|(11+?)\1+/.examples(max_repeater_variance: 50, max_group_results: 3000).uniq.sort.map(&:length) == Prime.first(25)
      #=> true
Horribly inefficient, but pretty cool! Here's my gem if case anyone's interested: https://github.com/tom-lord/regexp-examples
tom-lord··on How I [arguably] defeated Medium's #WordSearchWednesday
Nice, although I'd hardly call this a complex challenge to solve with a bit of code! The only really challenging part of this was what you briefly touched on towards the end:

> If I were more clever, I would have updated the script to not include words that fit certain criteria, or I would have done something more absurd like using natural language processing to see if the word pertains to writing. (that sounds possible, right?) Rather, I went through the 501 words manually and picked out the 49 that seemed arguably relevant to writing

In other words, you've solved the simple case perfectly well, but your solution is not yet scalable: How would you deal with a 100x100 grid? You'd probably need to optimise your search code (e.g. abandon looking for stupidly long words, or better yet once there are no possible longer words in the dictionary), and you'd definitely need to do some sort of dictionary definition search to help decide which answers are correct!

This almost looks like the sort of question Google would ask job applicants to answer, but they'd almost certainly extend the challenge to something like this 100x100 scenario!

tom-lord··on GitHut – Programming Languages on GitHub
I wonder what the graph would look like if "Javascript" was broken down by framework, though...
tom-lord··on Reddit has shut down its nascent cryptocurrency project
I've already seen plenty of discussion about it on r/bitcoin et al. I'm pretty sure most people "in the loop" have already heard about this.
tom-lord··on How Uber’s Autonomous Cars Will Reshape the Economy by 2025
> Thats how insurance works in the state that I live in.

> ...

> I can't basically gift my old car to my teen cousin while paying "safe old man rates"

I don't think you understood what I meant by "insuring the vehicle, not the person". If cars are autonomous, then the car owner ("driver") becomes completely irrelevant to the insurance price calculation. There is now no such thing as "crazy teen boy" prices.

So in other words, to contradict your final paragraph, at NO POINT will it be cheaper to insure a human driver. And given how empty roads will become once cars are autonomous, it seems crazy to build a whole new transportation infrastructure.

tom-lord··on WhatSim, a SIM Card for WhatsApp
Nor in The Bahamas, Brunei, Burkina Faso, Burma, Burundi, Cameroon, Central African Republic, Comoros, Cote d'Ivoire, ... (that's just the letters 'B' and 'C' - I gave up after that!)
tom-lord··on WhatSim, a SIM Card for WhatsApp
Metadata doesn't get encrypted.

That question is, at least, fairly easy to answer.

tom-lord··on WhatSim, a SIM Card for WhatsApp
With just €10 you can chat for free and without limits anywhere in the world for a year. And you can do it for always for just €10 a year. WhatSim has neither fixed costs nor monthly payments and it never expires.

To be able to send photos, videos, and voice messages and to share your location and contacts, all you need to do is buy a recharge. With a €5 recharge you receive 1,000 credits that allow you to exchange 50 photos, 10 videos or 200 voice messages in most countries. Plus sharing your position and contacts is unlimited.

Wow, so many contradictions!

There are no monthly payments, but it's €10/year.

It never expires, but you have to renew it every year.

You can chat for free and without limits, but multimedia messages cost extra.

To share our contacts and location you must buy a "recharge", but sharing your position and contacts is unlimited.

I don't trust this service one bit, I suspect it will be full of sneaky charges and misleading smallprint.

tom-lord··on Someone stole naked pictures of me. This is what I did about it [video] [NSFW]
I keep hearing about Islamic terrorists, but I haven't seen any.

Doesn't mean they don't exist, or aren't causing problems in the world!

tom-lord··on How Uber’s Autonomous Cars Will Reshape the Economy by 2025
I don't think the culpability problem is that hard to solve... Surely all that would really change is when buying a new car, you are purely insuring the vehicle and not the person! The whole notion of "no claims discount", or sexist/ageist insurance rules would become obsolete.

And the vehicle manufacture would only be considered "at fault" if the vehicle fails safety regulations.

The only time the consumer (driver) would be at fault is if they tampered with the vehicle, or entered it knowing it was damaged.

tom-lord··on Web scraping with Ruby

    f << JSON.dump(showings)
avoids adding any new lines (not that it really matters in the case of JSON)
tom-lord··on Parity, a numbers puzzle game
Nice find! For anyone else wondering, you can see the main game source in scripts/modules/Story.js - which includes the line:

    $.getJSON('story.json', function(data) {
tom-lord··on How to Recreate a Sloppy Ancient Greek Drinking Game
It's funny how, even without any other context, you know this article must be written about an American college.
← PreviousPage 2 of 2