Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!



New Evidence For Oceans of Water Deep In the Earth

subreality Re:Ingredients for water? (190 comments)

By RTFA I discovered that "This water is not in a form familiar to us—it is not liquid, ice or vapor. This fourth form is water trapped inside the molecular structure of the minerals in the mantle rock. The weight of 250 miles of solid rock creates such high pressure, along with temperatures above 2,000 degrees Fahrenheit, that a water molecule splits to form a hydroxyl radical (OH), which can be bound into a mineral's crystal structure."

about 3 months ago

After a Long wait, GNU Screen Gets Refreshed

subreality Re:most useful? (77 comments)

More compact: tmux at -d || tmux

about 5 months ago

SpaceX Launches Load to ISS, Successfully Tests Falcon 9 Over Water

subreality Re:Test and launch are the same, it is GREAT! (125 comments)

RTLS, TAL and AOA all relied on the main engines. If all three SSMEs failed they would have ditched it in the Atlantic. The scenarios aren't really comparable - they had a lot more fuel to work with but also a much heavier vehicle to return.

RTLS is easier for the Falon 9. After separation the stage 1 assembly is quite light: it has shed the payload, second stage, and most importantly, most of its own fuel; the remainder is about 5% of the original mass. It can therefore make a pretty quick burn to reverse its course.

They have some real numbers over here: http://forum.nasaspaceflight.c... .

about 5 months ago

Google Tries To Defuse Glass "Myths"

subreality Re:Yea, because glassholes will have learned (363 comments)

What do you think a Glass user can do that a phone user can't?

They can walk around maybe recording at any time. Someone who points a phone at me for a moment probably took a photo. Someone who points it at me continuously is probably taking a video. Either action is conspicuous which means that I can choose to leave, or I can confront them if they're doing it inappropriately.

Camera etiquette has been refined for a hundred years. Glass upsets the balance because it doesn't provide those visual cues. People who don't want to be recorded therefore presume it's not recording but feel uneasy because they're not sure, or they assume the worst and confront the wearer.

I'm actually quite enthusiastic about it as a technology, but the couple times I've encountered them in the wild I've fallen into the "uneasy because I don't know if I'm being recorded" group. I'd like to have one, but I'd cover the lens with a piece of tape most of the time.

about 5 months ago

Docker Turns 1: What's the Future For Open Source Container Tech?

subreality Re:Subjects suck. (65 comments)

It's a high-level interface to LXC (similar to Solaris Containers, or FreeBSD Jails). If you're not familiar with those, think of it as a combination of:
  chroot (virtualized filesystem root)
  git (version control where a hash-id guarantees an exact environment)
  virtual machines (virtualized networking, process tables)
  make (you make a config file describing an image to start from, then all the things to do to set up your application / build environment / whatever)

If you are building a complex product you can write a short Dockerfile which will:
  Start with 8dbd9e392a96 - a bare-bones Ubuntu 12.04 image
  apt-get install git gcc make libc6-dev

You now have a completely reproducible build machine - Docker builds it and gives you back a hashref. You run it with the right arguments (basically: a path to where your source code is, plus a command to run) and it builds your project reliably (you always have a clean container exactly the way it was when you built it) and quickly (unlike a snapshotted VM there's no need to boot it - in a split second the container comes up and it's running your makefile). More importantly, everyone else working on your project can clone that tag and get /exactly/ your environment, and two years from now people won't be scratching their heads trying to reproduce the build server.

Now let's say you're shipping your product - you're a web company, so you have to package it up for the operations guys to deploy. It used to be you would give a long list of dependencies (unreliable, and kind of a pain for the user); more recently you'd ship a VM image (big, resource-heavy, but at least it escapes dependency hell); with Docker you build an image, publish it on an internal server and give the hashref to the ops guys. They clone it (moderate-sized, resource-friendly) and they get your app with everything required to run it correctly exactly the way QA was running it.

As it's being run they can periodically checkpoint the filesystem state, much like snapshotting a VM. If something goes wrong it's easy to roll back and start up the previous version.

It's a young project and there are still some rough edges, but the benefits are significant. I think in a few years doing builds without a container will be looked at the same way as coding without source control.

about 6 months ago

Crowdsourcing Confirms: Websites Inaccessible on Comcast

subreality Re:Stop (349 comments)

It's OpenDNS's fault. They return a bogus A record instead of NXDOMAIN:

$ dig +noall +comments +answer @
-- Got answer:
-- -HEADER- opcode: QUERY, status: NXDOMAIN, id: 48729
-- flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

$ dig +noall +comments +answer @
-- Got answer:
-- -HEADER- opcode: QUERY, status: NOERROR, id: 31301
-- flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0


about 6 months ago

First LSD Test In 40 Years Reveal Drug Helps Terminal Patients Prepare For Death

subreality Re:bad trip to the power of infinity? (221 comments)

I've had very few bad "trips" but I can't imagine how bad it could be if you know you are dying.

Knowing you're dying can be a bad trip, no drugs required. Someone who's looped their fear until their soul is crushed isn't in much danger - they've already hit bottom.

Knowing you're going to die is a terrible burden, but it presents you the opportunity to choose the last memories your friends and family will have of you. They can remember you living your last weeks in fear and dying terrified, or you spending some time recalling the good times, and perhaps forgiving some of the bad ones. That's all the control you have left of your legacy, and you don't have much time to take advantage of it.

LSD, especially low* doses with someone to help guide can sometimes give people a new perspective. If they can relax their fixation on the fact that their time is up they may see the bigger picture - that we're all mortal, that life is a cycle, and that this is just a part of it. It may give you the opportunity to make your peace with the world. And if not, you're dead anyway. So why not?

* There's adequate margin between free-association, preconception-questioning levels and moon-howling-naked.

about 7 months ago

Naming All Lifeforms On Earth With Hash Functions

subreality Re:Names are for communication (97 comments)

["dog\n", "deer\n", "wife\n", "animals\n"] ... People would find these names easier to understand if you used "echo -n".

about 7 months ago

Amazon Coins and How the Definition of 'Crypto-Currency' Is Getting Too Loose

subreality Re:BitCoin has complete record of transactions. (115 comments)

You're close. There's no difficulty decoding the blockchain. The transactions are a public ledger. Have a look:

It's not anonymous - it's pseudonymous. Your address is your pseudonym. It can be linked to you in many ways:

When you buy something the seller knows who you are (they have your mailing address, your IP address, etc), and they know your Bitcoin address (the transaction is public information). Anyone watching your address will also see the transaction. If the address you sent coins to is a known address the investigator can then go to that seller and request your identity (via subpoena, violence, bribery, etc).

When you transmit the transaction it's first received by a few network nodes. If the investigator is running one of those nodes they see your IP. They won't know for certain it's you (perhaps you were just relaying a transaction), but it's still a short list to check. If it's the NSA or anyone else who can monitor your internet connection directly, they can easily discover that the transaction originated from you because no one sent it to you first.

People use mixing services to help obscure the origin of their coins. It makes it harder, but it's still possible to perform statistical analysis. For a simple example: . The investigator can find some addresses which correlate with yours. Even if they don't find YOU they might find someone you do business with, then coerce them into giving up your identity.

It's a lot like cash. You can pass it around freely, but every dollar bill has a serial number. You can spend it with relative anonymity, but it will be scanned whenever it passes through a bank. If someone is looking for certain serial numbers then they can easily find the bank your merchant uses; then stake out the merchant; then find you.

about 7 months ago

New England Burns Jet Fuel To Keep Lights On

subreality Re:[OT] mmBtu? (230 comments)

You're correct - apparently I'm the one demonstrating the problem. :)

about 8 months ago

New England Burns Jet Fuel To Keep Lights On

subreality Re:[OT] mmBtu? (230 comments)

so working in megaBTU makes perfect sense.

You just demonstrated the problem: mmBTU == kiloBTU, not megaBTU.

about 8 months ago

Office Space: TV Documentary Looks At the Dreadful Open Office

subreality Re:Anecdotal Experience (314 comments)

you can't make a phone call without annoying everyone, so now nobody uses the phone unless in a conference room; phone communication in general has dropped precipitously and now takes a back-seat to e-mail

How is that a con?

about 8 months ago

Does Anyone Make a Photo De-Duplicator For Linux? Something That Reads EXIF?

subreality Re:Geeqie (243 comments)

+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.

about 8 months ago

How To Create Your Own Cryptocurrency

subreality Re:Errors in Paper (203 comments)

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.

about 8 months ago

Ask Slashdot: Best Way To Implement Wave Protocol Self Hosted?

subreality Re:JSON (112 comments)

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".

about 9 months ago

Ask Slashdot: Best Way To Implement Wave Protocol Self Hosted?

subreality Re:JSON (112 comments)

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 =
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'}"

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.

about 9 months ago

A Big Step Forward In Air Display and Interface Tech

subreality Re:The thousand words I saw (65 comments)

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.

about 9 months ago

Ruby 2.1.0 Released

subreality Re:Trendy no more? (65 comments)

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> { |i| i.to_i }
=> [1, 2, 3]
=> 6

Here's the same thing in Python:

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

In [2]: dir(arr)
[(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 similar so far, but then we want to join the array. OO came late to Python, so while some things are implemented as methods on the array, a lot of things are functions which operate on an array. As such, they don't appear on the list above. Bizarrely, it's a method on string acting as a function on an array:

In [4]: "".join(arr)
Out[4]: '123'

Perhaps that's intuitive to someone, but to me, they took join which is a natural thing to do to an array and put it somewhere else so I had to look it up in the docs.

The list comprehension handles the simple mapping okay:

In [5]: [int(i) for i in arr]
Out[5]: [1, 2, 3]

But the map-reduce example gets messy:

In [6]: reduce(lambda x, y: x+y, map(int, arr), 0)
Out[6]: 6

Speaking of lambdas, Ruby makes this convenient:

irb(main):001:0> def retry_loop(tries)
irb(main):002:1> yield
irb(main):003:1> rescue
irb(main):004:1> retry if (tries -= 1) > 0
irb(main):005:1> end
=> nil
irb(main):006:0> retry_loop(3) { puts "failing"; raise }
=> nil
irb(main):007:0> retry_loop(3) { puts "succeeding" }
=> nil

Doing this in Python is miserable:

Another difference is namespacing. Ruby imports libraries as classes or extensions to classes. Python imports them selectively into the global namespace. Python's finer grained control helps mitigate the collisions this causes, but it means that every Python script has to start with a long list of imports. Ruby can include a lot by default because all the additions are neatly contained in a class.

Python's docs are verbose and comprehensive, like a full manual. Ruby's docs tend to be concise and somewhat incomplete, like a reference guide. Take a read through these and see how long it takes you to figure out how to simply start a thread in each language:

Both styles have their place, but I like that I can get the reference guide by just googling a feature. Python doesn't really have the short form. On the other hand, the full manual for Ruby will set you back $28:

Python has a thing: "There should be one -- and preferably only one -- obvious way to do it". This is a good philosophy to keep the language clean, but sometimes it means they don't provide some functionality since it's supposed to be obvious how to do it yourself. And thus, it's self-defeating: . In Ruby, it's simple:

irb(main):007:0> arr.grep(/[12]/)
=> ["1", "2"]
irb(main):008:0> arr.grep(/[12]/).first
=> "1"

And having simple things BE simple makes it really easy to go exploring. Hey look, here are all the methods on an array which return a boolean, or which cast it to another class:

irb(main):014:0> arr.methods.grep(/\?/)
=> [:frozen?, :eql?, :empty?, :include?, :all?, :any?, :one?, :none?, :member?, :nil?, :tainted?, :untrusted?, :instance_variable_defined?, :instance_of?, :kind_of?, :is_a?, :respond_to?, :equal?]
irb(main):015:0> arr.methods.grep(/to_/)
=> [:to_s, :to_a, :to_ary, :psych_to_yaml, :to_yaml, :to_yaml_properties, :to_enum]

I could go on, but perhaps this gives you some idea. I'm focusing a lot on where I think Ruby has things right (since you asked), but they're both well designed languages with many similarities. Ruby is a carefully self-consistent language which encourages concise but semantic style. Python is an evolved and quite complete language which encourages verbose but readable style.

I personally find Ruby cleaner, easier to navigate, and more intuitive, and the docs are easier to read. For me that makes it faster, more fun, and less frustrating. YMMV.

about 9 months ago

Ask Slashdot: How Long Will the Internet Remember Us?

subreality Re:Monument (126 comments)

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.

about 9 months ago


subreality hasn't submitted any stories.


subreality has no journal entries.

Slashdot Login

Need an Account?

Forgot your password?

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>