Please create an account to participate in the Slashdot moderation system


Forgot your password?

Slashdot videos: Now with more Slashdot!

  • View

  • Discuss

  • Share

We've improved Slashdot's video section; now you can view our video interviews, product close-ups and site visits with all the usual Slashdot options to comment, share, etc. No more walled garden! It's a work in progress -- we hope you'll check it out (Learn more about the recent updates).


Comment: Re:Write-only code. (Score 1) 757

by LoneTech (#49229801) Attached to: Was Linus Torvalds Right About C++ Being So Wrong?
Neither. The first calls compute() only once per orn, and the second makes the list population clearer (and less error prone). So go for

borbs = [b for b in map(compute, orns) if b > 12]

The map can be replaced with another comprehension or generator expression, but at that point I'd place the filter condition on a separate line to call attention to it. This particular combination is a weakness in the comprehension syntax because the output expression can't be named for use in a condition, so we must nest. Breaking it up in two stages may also be viable.

Comment: We took your name, now give us your code too! (Score 1) 33

by LoneTech (#48439235) Attached to: Startup Assembly Banks On Paid, Open-Source Style Development
Nothing breeds trust better, right? Assembly is almost as well known as assembly in programmer circles; and the first one is also an assembly in the dictionary sense. I think this slashvertisement might not end up as well received as the advertiser wished.

Comment: Re:Assignement in Python (Score 1) 729

No, these are not different operations; you just altered references in different places (first in your locals, second in a list that you held two references to). I see people getting similarly confused about vector or elementwise operations in Matlab, frequently resorting to blindly slapping on a period.

Comment: Re:Powershell (Score 3, Informative) 729

- sizeof(string) (I may have got the name of the function wrong) returns the length of a single byte rather than the length of the entire string.

A number of things misleading here, which do stem from C's archaic background: Firstly, sizeof is not a function (those parenthesis are not needed and only make it confusingly resemble a function call), it is a rather special operator both in that it looks like a name and operates on types instead of values. There is no string type at all. There are two types frequently used as strings, char arrays and char pointers; only in the case of the array would sizeof return the storage size (which is larger than the string length, unless you've already encountered a buffer overflow). Otherwise you get the size of a pointer, notably also since arrays cannot be passed around but get translated into pointers. In neither case do you get the size of a character.

Of course, the more you explain about C the less sensible it appears. ;)

Comment: Re:People say they want them, but no one buys them (Score 1) 544

I imagine part of that is from targeting them as some sort of budget phones. I tried the Blackberry Q10 because it was the only decent (i.e. not an obvious downgrade) keyboard phone even made in recent years, only to find they cut corners, particularly for the keyboard (it has markings they never implemented in software, and mechanical issues, and the bright idea to not allow answering a call with a button - the capacitive screen is unreliable when a raindrop comes near). My previous phone was an HTC Desire Z, which was decent besides a subpar screen, but is now severely outdated with no successor. I really wanted to get a Nokia N950, but Nokia decided they didn't want to sell it, and then I wanted a Jolla, but they decided both on a subpar screen and to not make the keyboard accessory (75 of them were made, so it's hardly because none was designed). I'm a little tired of meeting "there's no demand" when I am asking for things. It's a bit like the old Unix error message "go away, you don't exist", only more oblivious to the irony.

Comment: As a Q10 owner... (Score 1) 139

by LoneTech (#47413715) Attached to: BlackBerry's Innovation: Square-Screened Smartphones

The square screen layout is not news (but it is problematic, with several websites breaking themselves out of spite or incompetence). The larger size got us a keyboard that looks simply too wide, not adding any of the keys we were missing; you could get used to that, but it has nothing to do with the primary problems. Blackberry used to sell on corporate support, working keyboards, and an integrated pointing device. As of the BB10 versions, it feels rather half-developed - that vaunted keyboard has markings that are not supported by the software, the pointing device is missing (the touchscreen basically mocks us by adding another layer with the popup ring), and the build quality is not the best (I have keys losing their clickyness, and I had to return one phone because the same issue made keys unusable). How on earth they decided on a keyboard device to make it impossible to answer a call with a button - and on top of that, make the end call function *move* on the screen - I'll never understand. It's quite possible this new model improves on things with the touch detection in the keyboard, but as it is I'd rather switch to Nokia E72 than take another chance with BB. While chasing fashion all manufacturers, even Jolla, seem to have agreed to not produce another practical PDA.

Comment: Re:No Way! (Score 1) 261

by LoneTech (#47126821) Attached to: Curved TVs Nothing But a Gimmick

I have a simple explanation for a large chunk of its popularity - cinemas take a higher price for them, and therefore only show top tier movies in 2D if forced to. I went to the cinema yesterday to see Maleficent, and had to select 3D; there was no alternative. There was a choice in what 3D glasses to get; expensive single-use ones, ridiculously expensive ones that don't fit over glasses (still cheapo plastic film ones, mind you), or suffer the consequences of double picture at double brightness. The film itself made aggressive use of stereoscopic depth coupled with depth of field blur, which is a sensory conflict that continuously bugs me, and included misrendered video where the two pictures did not match, which bugs everyone. This is why 3D gets so many complaints; it's generally badly done and forced on people (try Hugo for a better film, including better stereoscopy). Meanwhile people who like the effect, which I do, aren't getting choices either; get a Fujifilm W3 (2010), because there's nothing else. Want more than 640x720 at 24fps? Tough - oh, and note that they sacrifice horisontal resolution for horisontal parallax, reducing the benefit as well as the quality, even worse if viewed on an interlaced panel like the LG polarized TVs which cut vertical resolution in half. Curved TV screens on the other hand really is a gimmick.

Comment: Re:Security? (Score 1) 355

by LoneTech (#46996519) Attached to: Can Thunderbolt Survive USB SuperSpeed+?

DMA does not necessarily imply unrestricted access. PCs with IEEE 1394 (also known as Firewire) frequently do have this issue, because they can busmaster at will, and those PCs did not have any memory protection from busmasters. More modern systems frequently do, in the form of advanced IOMMUs; serious workstations did even when 1394 was introduced. This feature is present mostly on AMD chipsets (Intel have restricted it to some server-oriented ones). USB before version 3 did not have this issue because devices could not be true bus masters; the CPU would have to set up all transfers, including what memory they access. Similarly DMA on the ISA bus actually did not let the unit doing DMA transfers select the memory address, the DMA controller did. I have not yet read the host controller specifications for USB 3, so I'm not sure if the controller itself must offer this protection - even if it doesn't, the bus mastering would surely have to be enabled by the OS.

Comment: Re:Capable of Playing - worthless statement (Score 1) 123

by LoneTech (#45963681) Attached to: AMD's Kaveri APU Debuts With GCN-based Radeon Graphics
I tried to find some hard data on either statement. It looks like the model number in TFS is a typo, and the test I found that showed results with BF4 neglected to explain what the medium settings are. It does, however, show us an average of 28fps, which would support your definitely not 30fps by a hairsbreadth. Now if only there were some technology to make that difference from 20fps count...

Comment: Re:Seems like a bullshit article. (Score 1) 148

by LoneTech (#44881737) Attached to: Multi-Display Gaming Artifacts Shown With AMD, 4K Affected Too

I find the interesting thing is that last time I used fglrx drivers - which was quite a few years ago, maybe before AMD bought them - they exhibited this very behaviour on Xvideo. I'm rather curious what makes them decide that a simple buffer swap for the entire screen should be done by drawing it in little triangles (presumably a variant of tiled rendering, but it's a full buffer swap!) in an unsynchronised random order (well, roughly from the right to left - but why not display order, top to bottom?). Even when they did get vsync activated, it synced not to the vertical blank but about 1/9th into the screen - so you got a *guaranteed* horisontal tear in the same place instead of random jagged ones. That was all with just one monitor - when I ran two, some versions would synchronize to the wrong monitor. Meanwhile, the very new open source radeon driver support used a rock steady video overlay.

ATI proudly proclaimed their two-step release cycle back then. What we saw in reality was drivers getting released with alternating sets of bugs. Of course, support for something as plain as video playback wasn't a priority, so maybe there were improvements I didn't notice as much.

What fascinates me is not so much that they get issues when running on multiple monitors, but that the same weird artifacts keep popping up. It's not like modern graphics cards don't have the memory to use readout driven frame buffer base address swaps.

In all, I'd say the artifacts are not news worthy, but their longevity and recurrence are cause for shame.

A committee is a group that keeps the minutes and loses hours. -- Milton Berle