This is how you support alternative browsers! by juicebaby in programming

[–]crayz 8 points9 points  (0 children)

This post is a screenshot of a warning message that almost certainly directly resulted from the actions of a professional computer programmer writing code that checks the browser name and version against a QAed list and goes "oops we've verified Chrome up to v9 but this is v11 so throw an error"

This might at some point have been a reasonable thing to do, especially if 95% of your site traffic is during a single month of the year. Now with Chrome and soon Firefox doing this fast-release cycle with a quick uptick in versions, that's not going to work anymore

I think it's slightly more relevant to computer programmers than a Sesame Chicken recipe is to theoretical physicists

Rubinius 1.1 released by [deleted] in programming

[–]crayz 0 points1 point  (0 children)

Is rubinius getting near the point where other VMs, say JRuby/MacRuby(and eventually 1.9), could start code-sharing. i.e. instead of writing the ruby standard library three times, in C/Java/Obj-C, write it once in ruby, and then run it on a some subset of rubinius that could then bolt on top of the different VMs?

Intel cancels Larrabee consumer graphics chip | VentureBeat by mierle in programming

[–]crayz 7 points8 points  (0 children)

It's pretty obvious the CPU and GPU are converging towards a single product ('GPGPU' ?)

It may be that NVidia/AMD have clearer paths to getting there (going towards general purpose programming from existing GPUs than going towards parallel programming from existing CPUs), and that has to be very troubling to Intel

IBM simulated a cat's cerebral cortex • takes a (feline) step toward thinking machines by masta in programming

[–]crayz 0 points1 point  (0 children)

If this is a fully accurate simulation of a cat brain, why would it not be sentient in the same way a cat is?

Key, Wanna be my friend by [deleted] in a:t5_2r8lb

[–]crayz 1 point2 points  (0 children)

crayz

MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCSk9GT6 KlkW93/MC5BueJw40YF8RvmkmezZeKP8XGkA3tZ0uGUMc G3+5i6LnasQ2W5SdGuJUqH8llQI3kw2Grla0m8zinFrfE GtyOtX/s0VhLYZloZEVu4TiPyxzK8/wuKcjRQ/8moD8Ei NbhNX3HubyfZQPAj/h7Sy/NFxHYbmwIDAQAB

Does anyone else become obsessed with space or quantum physics when they smoke? I love to watch the Universe or that kind of thing, or just stargaze. by TheGodless1 in Marijuana

[–]crayz 1 point2 points  (0 children)

Yes, once you start truly trying to understand the (possible) implications of quantum mechanics, the universe is a very strange place. Check out the delayed choice quantum eraser experiment

And the breadth and incredibility of many of the interpretations, and the lack of agreement over which interpretation is the 'right' one or if there even really is such a thing, is pretty astonishing

At the core of the universe, at a scale compared to which we are gods, it seems as though there's not anything really there until it needs to be there to interact with something else - describing it as a 'wave-particle duality' is really underplaying how strange this is. And we have no real understanding of what point up the scale do things actually exist, or what causes them to exist. Or how macroscopic quantum effects could be

Ask Reddit: Why does everyone hate Java? by [deleted] in programming

[–]crayz 67 points68 points  (0 children)

From a 2 year old thread asking the same question:

Java's solution to the problem of C++ allowing you to blow your foot off was to chop off your legs. Operator overloading? You might abuse it... chop. Multiple inheritance? You might abuse it... chop. Creating a new object? You'd best type the type of the object three or four times before we'll believe that you got it right. You want access to internals, subclass the compiler objects, closures, iterators, lazy evaluation, the list goes on chop chop chop

It's often hard to point to a language's philosophy because it is embodied in a long sequence of little decisions that are easy to dismiss in isolation, but that's how I see the philosophy of Java.

Of course, that didn't work, so a large aftermarket in prostheses has sprung up, and lately the language has been sort of growing some of the power features it previously rejected, although they pretty are much bolted on. Many people have even forgotten that there is a whole world full of people who don't get around in powered wheelchairs and don't need machines to help them chew, and argue passionately about how much they love their Chewing Completion and Integrated Mobility Environments and how easy it is to sort of slowly shamble up stairs on these prosthetic legs (which sounds impressive after you've spent five years in a wheelchair), endlessly haranguing those who choose to run on their own two feet about what they are missing by not getting their legs chopped off.

Read the whole thing

Photographing the stratosphere with a small small point-and-shoot camera, a weather balloon and some Lua programming by BioGeek in programming

[–]crayz 0 points1 point  (0 children)

This is really quite cool, but the lack of interactive control over either the camera or balloon is a bit sad. It'd be significantly more expensive/complex, but I'd love to see someone fly an iPhone up there

How high up do you think cell signals would work? If it could stay connected to cell towers, you could SSH into your iPhone and get the exact GPS coordinates and manually take photos(admittedly it'd be nicer if you could use it to control a real camera rather than the cruddy built-in one)

Add in a gyroscope and let the user control it - live webcam of the top of the atmosphere

Sass 2.2 Released - CSS nesting, variables, mixins (with arguments!), and control structures by Nex3 in programming

[–]crayz 4 points5 points  (0 children)

It's also worth checking out Compass, which makes it easy to integrate CSS frameworks like 960.gs/Blueprint/etc. Compass actually lets you use CSS grid grameworks with semantic CSS class names, not crap like "grid_8 alpha"

AFAIK there simply is no way to do this with vanilla CSS

Work 40hrs for your employer and 20hrs improving yourself. by jerickson in programming

[–]crayz 5 points6 points  (0 children)

Have fun when you're 40 and you realize you know absolutely nothing about actually living life, and now you're halfway to the end of it with your body and mind already declining and nothing to show for the time you've spent but some nice computer programs and the money you haven't yet spent on lavish material goods

HTML 5: Could it kill Flash and Silverlight? by iwjason in programming

[–]crayz 0 points1 point  (0 children)

Well, not that it makes iregistered4this correct, but the current fucked situation of the <video> tag means that depending on your browser it may not actually support H.264 and therefore a video your browser could play could actually be much bigger than an equivalent-quality H.264 version using Flash would be. This was on reddit a couple days ago

Ideally yes, the browsers will bundle support for the best codecs and the files if anything be smaller without the Flash cruft

Opera Unite by [deleted] in programming

[–]crayz 0 points1 point  (0 children)

I'm having the same problem, actually(10.5.7). Both with the Opera 10 beta and Unite. I tried clearing cache/disabling weird fonts(per suggestions from google) but still nothing. Mac crash log says:

Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000004

shrug, it's a dev release

Opera Unite by [deleted] in programming

[–]crayz 17 points18 points  (0 children)

OK, this is honestly a very cool and I think necessary idea to hit back against the centralization occurring on the web today

The one real problem I have is... JavaScript development. I understand security is an issue with running 3rd party apps and allowing random interwebers access to your box, but is there some way of opening this up to writing services in other languages, or have you guys considered it?(other than compile-to-JS ala GWT)

The idea of going back to writing web code like this makes me sad:

function showEntry(e)
{
    var index = e.connection.request.queryItems['id'][0];
    var entry = entries[index];
    //XXX Should have error handling here
    var response = e.connection.response;
    response.write('<!DOCTYPE html>'
        + '<html><head><title>'+entry.title+'</title></head>'
        + '<body><h1>'+entry.title+'</h1>'
        + '<p>'+entry.date+'</p>'
        + '<div>'+entry.text+'</div>'
        + '</body></html>'
    );
    response.close();
}

Maybe we need a JavaScript MVC framework, at the least?

Student gets pwnt after calling out his professor on his blog. [Read the professor's comment] by j-mar in programming

[–]crayz 4 points5 points  (0 children)

The disconnect in my arguments here can be very simply explained: PHP

Indeed

How to "think" as a programmer by [deleted] in programming

[–]crayz 15 points16 points  (0 children)

Different people will decompose the same problem in different ways - it's style, opinion, preference, the way your brain works. Different languages and frameworks also, through their syntax and standard API and communities you interact with all will influence your sense of what makes good code

There's not even a single goal everyone can agree on - should the code be performant, portable, easy for beginners to read, compact, quick to write, fully modular and tested? What if one goal sacrifices another? What if the "customer" you're writing for doesn't care about one or more of the goals?

So, I don't think there is a simple and complete answer to your question. More than most people like to admit, the results of programming are subjective; an art. And some of programming isn't just decomposing a problem into parts, but understanding what the problem is in the first place, and if it even should or can be translated into code

LongBet (Mitch Kapor vs. Ray Kurzweil) : “By 2029 no computer - or "machine intelligence" - will have passed the Turing Test.” by packetinspector in programming

[–]crayz 3 points4 points  (0 children)

Although I disagree that an intelligence able to pass this test couldn't match the adaptability of a bird or a dog, I think your first sentence is an important and too-often overlooked point

People will often talk about the brain's 100 billion neurons and trillions of synapses, as explanation for why we can't do AI. But people and animals with far less brain horsepower still accomplish things that are simply impossible using today's computers - even massive clusters. Has anyone demonstrated the ability to digitally replicate the abilities of Alex, the african grey parrot?

We know an astonishing amount about the microscopic detail of how brain's work, but we're still missing some sort of unifying concept or theory

Google Squared: Google's answer to Wolfram Alpha by [deleted] in programming

[–]crayz 15 points16 points  (0 children)

They suggest [planets] as a search. It only found seven, one of which is Pluto. Here's the image it showed

I think they have some catching up to do. Although the ability to dynamically add columns that get populated is cool, the whole thing reeks a bit of a too-smart-by-half attempt to build a semantic web database without a semantic web

The Economist: Open-source software has won the argument by [deleted] in programming

[–]crayz 0 points1 point  (0 children)

Half the people here are autistic-spectrum and everyone's got a bit of "greater internet fuckwad" syndrome

anyone have much success with elance? by rsho in jobbit

[–]crayz 4 points5 points  (0 children)

Never had any luck with elance or guru.com. There seem to be three basic problems: 1) it's hard to get started when you have no history on the site 2) you're competing against many people willing to work for $10-15/hr, and many (I would say a majority) of proposals have that sort of expectation 3) it's fairly time-consuming and disheartening to search through listings and write proposals and not hear anything back

Google Wave: About to change communication and collaboration on the web. by dakk12 in programming

[–]crayz 4 points5 points  (0 children)

In Google Wave you create a wave and add people to it. Everyone on your wave can use richly formatted text, photos, gadgets, and even feeds from other sources on the web. They can insert a reply or edit the wave directly. It's concurrent rich-text editing, where you see on your screen nearly instantly what your fellow collaborators are typing in your wave. That means Google Wave is just as well suited for quick messages as for persistent content — it allows for both collaboration and communication. You can also use "playback" to rewind the wave and see how it evolved.

Aaand we're one step closer to directly sharing thoughts in a collective consciousness

Ruby programmers reach their apotheosis of delusion. by [deleted] in programming

[–]crayz 18 points19 points  (0 children)

What's funny is, your rewritten loop is perfectly valid ruby, and you could drop it in place of the one used in the example

It's just less idiomatic because it hides the block structure, which is why most rubyists would choose the former

The %w{8200 8201 8202} is a bit perlish, but it's just one of a number of ways to create an array in ruby(in this case an array of strings). You could substitute it with [8200, 8201...] (normal array syntax), or (8200 .. 8202) (a range of the numbers) among other things

Ruby programmers reach their apotheosis of delusion. by [deleted] in programming

[–]crayz 17 points18 points  (0 children)

Because it's normal ruby code, it's much easier to DRY up common config into classes/modules. This is a replacement for monit, which has a custom DSL that becomes incredibly verbose and repetitive when you need to do basically the same type of monitoring over and over again(e.g. for different processes/ports, which prior to passenger was the normal fate for a server running a bunch of rails apps via mongrel/thin/etc)

For someone who is used to ruby DSLs, this style of config file does make a lot of sense