Slashdot Mirror


User: subreality

subreality's activity in the archive.

Stories
0
Comments
1,197
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 1,197

  1. +1. The reason: it has a fuzzy-matching dedupe feature. It'll crawl all your images, then show them grouped by similarity and let you choose which ones to delete. It seems to do a pretty good job with recompressed or slightly cropped images.

    Open it up, right click a directory, Find Duplicates Recursive.

    fdupes is also good to weed out the bit-for-bit identical files first.

  2. Re:Errors in Paper on How To Create Your Own Cryptocurrency · · Score: 4, Informative

    The correct date is approximately 2140 AD. The reward per block started at 50 BTC and is cut in half every 210,000 blocks, which nominally takes about 4 years. After ~130 years you have done 33 halvings, so the reward is 50 / (2^33) = 0.58 Satoshi, where 100 million Satoshi = 1 bitcoin. Since the smallest unit in the bitcoin transaction system is 1 Satoshi, the reward becomes too small to measure, and thus mining for new coins stops.

    This is closer but still incorrect. All accounting in Bitcoin is performed with integer arithmetic. The reward per block started at 5,000,000,000 satoshis and is right shifted by one bit every 210,000 blocks. The reward does not become too small to measure - it becomes precisely zero.

  3. Re:JSON on Ask Slashdot: Best Way To Implement Wave Protocol Self Hosted? · · Score: 1

    It doesn't require all those extras brackets and braces and quotes.

    My point is all those extra brackets, braces, and quotes (and field labels) don't cost you much. They compress efficiently.

    JSON is like any hammer. Sometimes you gotta know when it's time to put it down and pick up the screwdriver instead.

    No argument there - JSON isn't my only tool. :) I just disagree that it "fails hard when you want to send 1,000s of records".

  4. Re:JSON on Ask Slashdot: Best Way To Implement Wave Protocol Self Hosted? · · Score: 1

    Sending 1,000 copies of that is going to take a lot more packets than a fixed binary format where you can pack the entire thing down to 9 bytes e.g. 8 bytes for the Id, and both bools into a bitset on the last byte.

    That's why you compress the stream. HTTP supports Content-Encoding: gzip, or you can wrap it around your file format on disk. Here's what happens with your example:

    user@host:~$ ruby <<EOF | gzip | wc -c
    prng = Random.new
    1000.times do |i|
        puts <<EOR
    {
                CustomerId: "#{prng.bytes(8).unpack('H*').first}",
                AllowExtendedConfiguation: "#{prng.rand(2).zero? ? 'true' : 'false'}",
                IsMaximumLengthRequired: "#{prng.rand(2).zero? ? 'true' : 'false'}"
    },
    EOR
    end
    EOF
    12550

    12550 bytes... 12.5 bytes per record, instead of your hand-optimized 9 bytes per record. I'm only paying a 28% premium with 100% random data. When it contains text strings (and we're talking about Wave here - it's mostly text) it's quite common for gzipped JSON to be smaller than an optimized but uncompressed binary format.

    This frequently happens even with raw numbers. You won't have 4 billion customers for a while, so let's make the first four bytes of the CustomerId all zeroes:

    CustomerId: "00000000#{prng.bytes(4).unpack('H*').first}",

    I now have 7.5 bytes per record. I'm already doing better than your binary format, unless you plan to do variable length encoding on the customer ID. That'd be even more code you have to write and debug.

    There are certainly cases where shaving off the last few bytes might be worthwhile, but for the general internet, and for the kind of uses that Wave is meant for... no. The simpler code (not inventing a new serialization format) and debugging advantages of human-readable streams outweigh the marginal bandwidth savings of a binary protocol.

  5. Re:The thousand words I saw on A Big Step Forward In Air Display and Interface Tech · · Score: 1

    I was not being sarcastic. I meant what I said literally: Please continue bashing the gizmo for being inadequate. Despite the hype they have not solved the problems which make these displays useful only as novelties.

  6. Re:Trendy no more? on Ruby 2.1.0 Released · · Score: 4, Informative

    I've used both a fair bit. They are similar in many ways so it's mostly a matter of preference.

    I've found Ruby makes it easy to explore objects and see what can be done with them. The consistent OO model makes it easy to perform concise data manipulation. Here's a quick example:


    irb(main):001:0> arr = ["1", "2", "3", "4"]
    => ["1", "2", "3", "4"]
    irb(main):002:0> arr.methods - Object.methods
    => [:to_a, :to_ary, :[], :[]=, :at, :fetch, :first, :last, :concat, :>>, :push, :pop, :shift, :unshift, :insert, :each, :each_index, :reverse_each, :length, :size, :empty?, :find_index, :index, :rindex, :join, :reverse, :reverse!, :rotate, :rotate!, :sort, :sort!, :sort_by!, :collect, :collect!, :map, :map!, :select, :select!, :keep_if, :values_at, :delete, :delete_at, :delete_if, :reject, :reject!, :zip, :transpose, :replace, :clear, :fill, :slice, :slice!, :assoc, :rassoc, :+, :*, :-, :&, :|, :uniq, :uniq!, :compact, :compact!, :flatten, :flatten!, :count, :shuffle!, :shuffle, :sample, :cycle, :permutation, :combination, :repeated_permutation, :repeated_combination, :product, :take, :take_while, :drop, :drop_while, :bsearch, :pack, :entries, :sort_by, :grep, :find, :detect, :find_all, :flat_map, :collect_concat, :inject, :reduce, :partition, :group_by, :all?, :any?, :one?, :none?, :min, :max, :minmax, :min_by, :max_by, :minmax_by, :member?, :each_with_index, :each_entry, :each_slice, :each_cons, :each_with_object, :chunk, :slice_before, :lazy]
    irb(main):003:0> arr.pop
    => "4"
    irb(main):004:0> arr.join
    => "123"
    irb(main):005:0> arr.map { |i| i.to_i }
    => [1, 2, 3]
    irb(main):006:0> arr.map(&:to_i).reduce(&:+)
    => 6

    Here's the same thing in Python:


    In [1]: arr = ["1", "2", "3", "4"]

    In [2]: dir(arr)
    Out[2]:
    [(stuff removed, fucking lameness filter) 'append', 'count', 'extend', 'index', 'insert', 'pop', 'remove', 'reverse', 'sort']

    In [3]: arr.pop()
    Out[3]: '4'

    OK, it's pretty sim

  7. Re:Monument on Ask Slashdot: How Long Will the Internet Remember Us? · · Score: 2

    100 miles * 50 miles =~ 1.00 * 10**13 square inches

    340 million tweets per day * 100 years =~ 1.24 * 10**13 tweets

    ~0.81 square inches per tweet

    You could make it work with a small font, but I don't think all of facebook is going to fit on the other side.

  8. Re:The thousand words I saw on A Big Step Forward In Air Display and Interface Tech · · Score: 4, Informative

    TFA describes it in a way that makes sense even if it's technically inaccurate:

    The water drops are so tiny they don't have any moisture in them; you can test it on paper or your glasses -- your piece of paper will remain dry and your glasses won't steam up.

    More accurately: The water drops are so tiny they won't moisten things they contact.

    ... let's call a recess and re-convene when that statement makes sense, shall we?

    You may now resume bashing the gizmo for being inadequate instead of the submitter for being incomprehensible or the editors for being incompetent.

  9. Re:Watch out on SpaceX Wins Use of NASA's Launch Pad 39A · · Score: 1

    That's pretty slick. I didn't know they were working on that capability. It's too bad the link is dead - I'm curious to know more.

  10. Re:Watch out on SpaceX Wins Use of NASA's Launch Pad 39A · · Score: 2

    That's less than 5x the distance.

    It's much closer than that: the moon is only another 70% delta-v from LEO. http://en.wikipedia.org/wiki/Delta-v_budget

    Unfortunately it's not just a linear extrapolation. The Merlin engine burns kerosene with liquid oxygen. That's a good setup to get to LEO, but upper stages have more engineering constraints (starting after coasting for several days in vacuum; cryogenic fuels boil off; trying to squeeze more specific impulse where it really pays off), so they tend to run on hydrazine. It requires a whole new design, whereas the Falcon has simply been scaled up.

    I don't know that much about the business, but generally there's a lot of money in getting to LEO, and not a lot of commercial interest in the moon. I don't foresee SpaceX dumping the money into such a design any time soon. If someone does want to get to the moon it's more likely they'd build a specialized spacecraft and then pay SpaceX for a ride to LEO.

  11. Re:House of Cards on North Korea Erases Executed Official From the Internet · · Score: 1

    not killing dictators is actually important because if killing them is the only way to get rid of them they will hold on more tightly. The means of bribing them by letting them keep some ill-gotten gains is justified by the ends

    Putting aside the moral argument, I disagree with the practical effect. Providing a way out might encourage the current tyrant to retire peacefully, but it also makes the position more appealing to the next ten guys who want to take his place.

  12. Re:What are they really saying? on Ford Self-Driving R&D Car Tells Small Animal From Paper Bag At 200 Ft. · · Score: 1

    3. Can it tell if the animal is on a leash and not going to be an issue?

    3.a. Can it tell if the animal is on a leash and is still going to be an issue?

  13. Re:Brilliant investigative journalism on Amazon Uses Robots To Speed Up Human 'Pickers' In Fulfillment Centers · · Score: 1

    I'll grant that you have a point there. I'm sure Amazon themselves have been through a number of failures before getting this system working.

  14. Brilliant investigative journalism on Amazon Uses Robots To Speed Up Human 'Pickers' In Fulfillment Centers · · Score: 5, Insightful

    Yes, it's incredible how Amazon is using something exactly as intended after they bought it.

  15. Re:missing the point on How China Will Get To the Moon Before a Google Lunar XPrize Winner · · Score: 5, Informative

    its widely recognized that US beat the Soviets in the early space race

    By whom?

    First artificial satellite: Sputnik
    First human in space: Yuri Gagarin
    First human in orbit: Yuri Gagarin (He gets mentioned twice because he achieved this before the US managed even a suborbital flight)
    First lunar flyby: Luna 1
    First impact on the moon: Luna 2
    First spacewalk: Aleksei Leonov
    First soft landing on the moon: Luna 9

    The commitment to boots on the moon led to Gemini turning things around in the mid '60s, but before that the Soviets did quite well, especially with Earth-orbit tech.

  16. Re:That's why on Why Scott Adams Wished Death On His Dad · · Score: 1

    Coke is a poor choice. You'll die of a heart attack or stroke, and you'll be agitated and panicking the whole way down. It will be painful for both you and the family member who gives it to you.

    Opiates (heroin or morphine) or barbiturates (anything ending in -barbital) are better. You will be instantly comfortable, unconscious shortly thereafter, and you'll die of respiratory depression in your sleep which is peaceful and much less traumatic for anyone who's with you.

  17. Re:Don't really see the market on Not All USB Power Is Created Equal · · Score: 1

    This doesn't add up. The Nexus 7 has a 16Wh battery. The worst USB port possible (100mA) provides half a watt. Either a) your N7, rated for 10h active / 300h standby, is guzzling so fast that it would deplete a full battery in 32h of all-standby, or b) the USB port is defective.

  18. Re:What the fuck? on Ubuntu Wants To Enable SSD TRIM By Default · · Score: 4, Informative

    Those blocks will never be used, therefore the drive always have plenty of free space, so there is no need for trim.

    It's not quite that simple either.

    SSDs write in pages, but erase in blocks of pages. When a page is changed it gets rewritten to another block. The original page is marked as free, but it can't be erased until the whole block is free. Therefore the SSD performs garbage collection of free pages, re-packing them into complete blocks.

    On its own the SSD only knows which pages it freed during rewrites - it doesn't know about pages that COULD be freed because they're deleted. Overprovisioning prevents blocking when there are no free pages (that's a huge win), but the drive still wastes lots of time and wear-life moving deleted data around during GC. TRIM provides the necessary hint to prevent that waste.

  19. Re:Cost of Minting -- Fascinating on Bitcoin Hits $400 Ahead of Senate Hearing On Virtual Currency · · Score: 1

    There isn't really one last coin, because the fixed reward is halved periodically.

    There really IS a last coin. The generation quantity is a fixed-point number of "satoshis" with 8-decimal precision; 1 satoshi == 10 nano-BTC. The reward is not halved - it is right-shifted by one bit. Generation will abruptly end at 20,999,999.9769 BTC.

  20. Re:Blue bottle sting on Scientists Says Jellyfish Are Taking Over the Oceans · · Score: 1

    The blue bottle is this one: http://en.wikipedia.org/wiki/Portuguese_Man_o'_War . "Stings usually cause severe pain to humans, leaving whip-like, red welts on the skin that normally last 2 or 3 days after the initial sting, though the pain should subside after about an hour. However, the venom can travel to the lymph nodes and may cause, depending on the amount of venom, a more intense pain.[citation needed] A sting may lead to an allergic reaction. There can also be serious effects, including fever, shock, and interference with heart and lung function."

    That doesn't sound benign. You tangled with a genuine screamer.

  21. And let's not forget... on North Korea Developing Electromagnetic Pulse Weapons · · Score: 5, Insightful

    Let's not forget that North Korea has also achieved nuclear fusion, developed a super drink that can cure aging and disease, and found a "unicorn lair" last year.

    And let's not forget that the US has achieved democracy, developed a universal healthcare plan to cure aging and disease, and found WMDs in Iraq.

    Our bullshit is more refined but equally pervasive.

  22. Your sources and the GP's don't actually conflict. They're just measuring different things.

    The XKCD image is comparing Sieverts - absorbed dose - at a specific location. If you were staring into the core of Chernobyl, you received a massive dose. That effect is very localized.

    The Scientific American article is comparing the regional effects: typical releases divided over a few hundred square miles.

    The "coal far outweighs nuke" argument is based on global effects: While Chernobyl was intensely bad locally, the average effect over the whole surface of the Earth was very small - much smaller than the net emissions of coal.

    These are all based on Sieverts/Rems. They measure instantaneous levels. The thing with coal is it's a gift that keeps on giving: the nuke shine of Chernobyl was intensely bad if you were there; a large number of becquerels (decays per second) of iodine-131 were released from Fukushima but it had an 8 day half-life. With coal it's a much longer half life and much more widespread. While there are no spatial and temporal hotspots like you have with nuke disasters, it keeps on going, so the everyone on the surface of the Earth will keep getting hit not just today, but for their entire lives.

    The average human will absorb far more radiation from coal than from all nuke disasters. The numbers either way are small enough that you have other things to worry about as an individual, but coal is definitely going to cause a higher net number of cancers globally.

  23. Re:Root cause depends how deep you dig on HealthCare.gov: What Went Wrong? · · Score: 1

    I also don't advocate saving everyone. $100,000 cancer treatments aren't going to be for everyone. However, setting broken bones or covering antibiotics for an infection are simply so cheap that we're better off just paying for it. It's cheaper than paying for the massive bureaucracy we have now.

    Yes, with taxes. I'm in a high bracket so I'm subsidizing others. I'm okay with that.

    I have an opinion; I accept that other people have their opinion; and I think a compromise might be possible. How is that batshit crazy?

  24. Re:Root cause depends how deep you dig on HealthCare.gov: What Went Wrong? · · Score: 1

    I agree - I prefer the static HTML option. In my opinion baseline healthcare is a human right, not just a citizen's right. Show up at the hospital or doctor, get treated, go home.

    We waste more money on insurance bureaucracy than it'd cost to simply provide basic care to "the freeloaders" (by whichever definition)... but if limiting the system to citizens / legal residents / taxpayers / whatever will get people to quit worrying about "cheaters" then I think it's certainly better than the mess we have now.

  25. Root cause depends how deep you dig on HealthCare.gov: What Went Wrong? · · Score: 2

    What went wrong is we created a system which requires extensive paperwork for insurance. It should have been a web form that asks "Are you a US citizen?" and if you answer yes, it says "OK, you're covered."

    You can make the system (not just the web site) even more efficient by eliminating that question and simply serving static HTML.