Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×

Comment Re:Powershell? (Score 1) 383

PowerShell: Get-NetAdapter | select macaddress
Bash: /sbin/ifconfig | grep -Eo ..\(\:..\){5}

Which is shorter?
Which is more readable?
Which is more robust against changes (like new properties/columns)?
Which is more consistent across related commands?
Which is more discoverable?
Which is more extensible?

Note how the PowerShell version does *not* need to engage in string parsing, and how it does *not* need to rely on specific file content formats. The advantages of objects in the pipeline.

Btw, if you want PowerShell to output in the same metadata-stripped format as from bash/ifconfig, you can make the PowerShell command even shorter, without sacrificing readability:
PowerShell: (Get-NetAdapter).macaddress

Comment Re:Visual Basic for Applications??? (Score 3, Insightful) 383

Powershell was designed to market Windows server, providing something that looks familiar to Unix/Linux admins. It's by no means a replacement for VBScript. (Which is *not* the same thing as VBA.) VBScript, being COM-centric, is uniquely suited to accomplishing all sorts of tasks on Windows. It just happens to be getting "deprecated" as part of Microsoft's overall strategy: They want to attract people to Windows server while converting "civilian" Windows into virtually a kiosk OS.

Sorry, BS. PowerShell is a foundation technology in Windows, unlike VBScript. Since Windows 7, the troubleshooting packs are actually written in PowerShell! The troubleshooting utilities are automatically launched by the system when e.g. network problems occur.

PowerShell is every bit as COM capable as VBScript. PS uses a "unified" type system where multiple object models (COM, .NET, WMI etc) are surfaced as common PS objects.

VBScript is definitively legacy (and deprecated). I will actually wager a bet that there is not a single meaningful VBScript that could not be written shorter and more elegant with PowerShell.

Comment Re:PowerShell (Score 5, Informative) 383

It is object oriented so the data transfer between processes is more robust. Also all the commands' manual pages come with extensive documentation and lots of great examples. UNIX man pages usually lack examples.

Most bashers (no pun intended) miss several aspects of PowerShell simply because they view it as just another shell.

One such aspect is the fact that PowerShell is designed to operate directly with an application's core logic (the object model) whether that application was designed using COM or .NET. Virtually *all* of Window's features and even 3rd party applications for Windows are designed using one of those models. So the barrier to exposing the functionality to the CLI (PowerShell) is really, really low, and even older applications that predates PowerShell or that were never designed for PowerShell (like iTunes) lend themselves to CLI manipulation. Forget about needing to craft a suite of external CLI tools - your app is inherently exposed to command line manipulation.

Another often overlooked aspect is how PowerShell is designed to run in-process within an application. The CLI is just *one* possible host for PowerShell. Alas, you can add the PowerShell engine to your app and immediately leverage existing commands to manipulate the in-process memory objects of your application. So not only is it *easy* to expose your application to automation, you can actually take advantage of the PowerShell engine to save work for your own in-application automation. With workflow engine integration in PowerShell 3.0 (it is now at 4.0) this is a great way to orchestrate workflows activities in an easy-to-manage way.

Comment Re:Daniel Stone core X.o dev on what's wrong with (Score 1) 340

app-based network transparency is a feature of RDP. It hasn't been implemented in Windows as far as I know of but I'm optimistic that Wayland's proposed reliance on RDP for network applications will implement it per-app rather than full desktop.

It has been available for several years now. It is used in App-V to access applications running on a server but displaying it'a GUI in windows on the local machine. I don't think you can use app-based RDP in a client Windows to client Windows configuration, though.

Comment Apologize (Score 1) 165

I sincerely apologize for the harsh tone. That was uncalled for, and I shot off without reading what I wrote and how it comes across. Again, I apologize.

Like you I have some "triggers". One of my triggers is blanket dismissal. I think what I perceived as your blanket dismissal was what triggered. You are correct about Ruby-on-Rails. It turned out that it was not up to the job. But at the same time it *did* popularize the "web-MVC" pattern in a way that Java frameworks (e.g. Struts) never achieved.

When someone praises a new technology as the new "best thing since sliced bread", we should approach it with a healthy portion of skepticism. However, we must also keep our minds open to new advances.

Reactive Programming is not an alternative to OO or FP. It complements both, and at the same time it promises to make certain aspects much more manageable, like e.g. asynchronous and parallel processing.

Comment Re:Cheaper (Score 1) 44

As for Pwn2Own, the results really are meaningless - if you break OS X, you win a MacBook. If you break Windows, you get a Sony laptop. If you break Linux, you get a Dell. And they aren't necessarily the nicest machines on the lineup, either.

You get the machine *and* a $10000 for the first machine/browser to fall. While Apple machines are nice, $10000 will buy you a few *very* nice Apple kits, even if you exploit Windows first. Given $10000 for 1st price, $5000 for second, you'd expect the contestants to go for the easy one first. They knocked OS X over in a matter of minutes.

Well geez, Apple, Sony, Dell. If you wanted a new laptop, which do you pick? Most people DO like the looks of a MacBook Pro (even the lowest end configuration is still a nice looking laptop). Then likely Sony comes next (their laptops are fairly good looking). Which leaves the Dell, for those who just want a laptop and try to avoid the massive crowds going for the more desirable units.

I'd take the $10000 rather than risking a 2nd place with $5000, thank you.

Comment Re:Spreadsheet programming (Score 5, Informative) 165

I can see this being useful for problems that are extremely linear and require extreme parallelization on large quantities of data, but that's about it.

That's the danger: Relying on your own lack of imagination to support your argument. If you cared to google a little you would realize that there are many other areas where RP could be relevant.

Erik Meijer who pioneered the RP push at Microsoft and which lead to the Reactive Extensions for C# and JavaScript (on which the current implementations in Java are based) wrote an article with a thoughtful title: "Your mouse is a database". I could as "so is your finger".

The idea is that a mouse is a series of "rows" with mouse positions and button states. Instead of viewing them as series of *events*, RP views them as streams of objects. That allows you to apply filters, actions, transformations etc.

Suddenly, the events become *composable*.

Think of a touch interface. The touch surface fires events. But if you view the events as streams of objects you can define filters and transforms which let only certain "events" through, like a stream which accepts objects starting/resetting at the "touch" but only accepts messages as long as they describe an ever longer diatance in a certain direction until the finger is lifted again. Now you have a composable stream of "flicks". You can define similar streams which will filter/generate circular moves, pinching with 2, 3 or 4 fingers.

Think of the problem of cache eviction. You can define sweeping/eviction algorithms as (simple) streams.

Think of asynchronous programming in a web browser. Parred with web sockets (or in .NET the awesome SignalR which uses web sockets but automatically falls back to other channels when web sockets are not available) you can build responsive, asynchronous interfaces where you *declare* what should happen as server messages are received.

Think of a dealer system where the dealer wants to track certain papers, positions, rates. RP enables you to build a chained, composable filter where alarms are raised (alarms being messages on streams) when a rate changes more than a certain percentage within a given time period.

I've done this 'methodology' many times using Excel.

Sure. Haven't we all?

It also uses a *lot* more ram because you are now maintaining a permanent block of memory for every single operation, for every different piece of data you are coding against.

Not neccesarily . In .NET, Reactive Extensions are integrated with LINQ. As a supplement to IObservable, Reactive Extensions also define IQbservable (a *queryable* observable). Analogous to LINQ for IQueryable, LINQ applied to a IQbservable is actually capable of combine criterias and transformations "up the chain" all the way to the source. I.e. if the "event" source is capable of filtering/transforming - like a SQL database or a RSS based web feed is - LINQ for Reactive Extensions can apply the filter very early in the chain and avoid uneccesary progression of objects which would be masked later anyway.

Is it just me, or does it seem like everyone now-a-days is trying very hard to come up with new methodologies and paradigms and web 6.5isms, so they can get their 5 minutes in the lime light?

It is not just you. There a scores of other people out there who have always done it before 20 years ago.

Grow up. Sometimes Computer Science does see advanced. Realizations. Erik Meijer did an awesome job with Reactive Programming. He found a *duality* between actively "pulling" objects from sequences and reactively receiving "pushed" objects from a source. Given the mathematical duality he even managed to find places where the LINQ pull model was not complete yet.

Reactive Programming is not new. Nor was OO when it really took off. OO actually was don back in the 1970ies with Simula (IIRC). But now RP has *matured* as is ready to go mainstream. It is an interesting approach with combines beautifully with both OO and FP.

So please spare us the "I've done that for years" chest thumping. When you at the same time demonstrate lack of imagination and lack of understanding of the topic, you just come off as an ignoramus.

Data Storage

How the LHC Is Reviving Magnetic Tape 267

sandbagger writes "The Large Hadron Collider is the world's biggest science experiment. When spinning, it reportedly generates up to six gigs of data per second. Today's six-terabyte tape cartridges fill rapidly when you're creating that amount of material. The Economist reports that despite the advances in SSDs and hard drives, tape still seems to be the way to go when you need to store massive amounts of digital assets."

Comment Re:where?! (Score 1) 537

It is very much backed by the real world: Debt Deflation

Waving your hand and saying that it's "not a problem" when it obviously is, doesn't make it magically go away. Keep in mind that the deflationary spiral talked about by most economists is for deflation on the order of a few percent per year. The deflation of Bitcoins is an order of magnitude greater than that!

The inventor of Bitcoin is a criminal genius, and should be jailed for inventing the biggest Ponzi scheme ever.

Comment Re:...and (Score 1) 182

I would have thought Intel held the standard for the best SSD in terms of quality? I absolutely only use Intel SSD in servers as they're the only enterprise grade SSD I trust. As for OCZ, I have 8 in a pile on my desk at the moment (all 60GB ones) and I know 2 of them don't work and 6 probably do - but I can't be bothered trying to figure out which is which. They have been pretty bad, I would agree.

Slashdot Top Deals

"May your future be limited only by your dreams." -- Christa McAuliffe

Working...