Slashdot is powered by your submissions, so send in your scoop


Forgot your password?

Comment Re:Yes and? (Score 1) 149

As long as the conventions are understood and consistent, then who cares if all strings have to be null terminated or if the strings returned as static, garbage collected or must be free'd?

That information has to be encoded somewhere. If your convention is that every char* parameter is a null-terminated C string that must be copied by the callee if it is expected to persist beyond the duration of the function call, then that's great (you'd better be really consistent about not using char* for arbitrary data though). Similarly, if every pointer that is returned needs freeing by the caller, then that's also fine, and you can machine-generate the wrappers on that assumption.

If you're going to create a metamodel with the primary goal of allowing wrappers from other languages, then you need to think about these things. EFL now has a metamodel intended for FFI, and it doesn't think about these things. Functions take char* arguments (and the metamodel describes their type solely as char*), which may be null-termianted C strings or blobs of data with the length encoded somewhere else. They may be held by the callee and freed later, or the caller may be responsible for freeing them. None of this information is encoded in anything machine readable.

Comment Re: Umm (Score 1) 363

Voter turnout, for one. Fix may be too strong a word, I would go with address.

The problem is not the number of people that vote, it's the number of informed people that vote. And, by that, I don't mean educated people who have spent a long time studying the issues, I mean people who have a basic clue as to what their candidates views are (beyond 'wears a {red,blue} ribbon'). Forcing more people to turn up doesn't fix this, it can only be addressed by having an impartial media that's willing to cover the candidates public and private opinions without fear of reprisals.

Comment Re:Who are these people? (Score 5, Insightful) 388

socialist wealth redistribution

Often they just say 'wealth redistribution', which is the phrase that annoys me more than any other in political discussions. The people who say it are always implicitly in favour of wealth redistribution in one direction and often opposed to things that slow it, not just things that might reverse it. If I have $1m, and I invest it at a return 1% above the rate of inflation (not so hard when you have $1m), then I make $10K/year just from having money. If I have $10m and I make the same investments, then I'm making $100K/year, which is more than most people who work for a living, again just from starting with capital.

The average net worth of US senators in 2011 (I couldn't find newer figures) was $14m, for senators it was $7m (before anyone jumps in with partisan claims, the average for Republicans was higher in the Senate, but lower in the House). These people are earning more from their investments than most of their constituents. They're all - on both sides of the aisle - very much in favour of wealth redistribution, as long as that wealth keeps flowing to them.

Comment Re: Simple (Score 2) 166

Because the emergency dialler requirement is not intended solely for the person who owns the phone. It's expected that any telephone that you pick up (land line or mobile) will work for emergency calls. This is also why landlines can still make emergency calls even if they are nominally disconnected by the phone company.

Comment Re:16 nm vs 14 nm (Score 4, Insightful) 262

I'm not particularly familiar with either company's process, but it's been a couple of generations since you could actually make meaningful comparisons based on the quoted nm size, because everyone has different smallest features that they measure when deciding that they are Xnm. That said, we passed the end of Dennard scaling a long time ago. You'd expect the same chip to be consuming about as much power, be slightly more able to dissipate the heat. It may also have less leakage, though that depends on a number of other factors.

Comment Re:Yes and? (Score 1) 149

His point about ownership is spot on, however. Newer EFL is starting to use an IDL so that it can integrate with other languages. I talked to the designer of it at FOSDEM. The idea that your IDL couldn't just use char* for strings (without something to indicate that these ones were null-terminated strings and these other ones were data buffers whose length is represented in this other parameter) and needed to know who was responsible for freeing pointers had not occurred to him. My interest in Enlightenment ended shortly after that: it's not just FFIs that need to know these things, it's C programmers too, and if the underlying APIs are not designed with this in mind then code using them is going to be buggy.

Comment Re:I guess they realised... (Score 3, Interesting) 149

It's not that supporting the old things slows things down, it's that it doesn't speed things up. It actually does cause some problems, because various things in the X11 protocol use 8-bit fields of which a significant space is used by legacy stuff that no one uses anymore, but that's largely worked around in newer extensions.

If you're in a world where most applications are sending commands like 'draw line from x,y to x1,y1' then X11 network transparency is really fast. At the protocol layer, anyway - if you use xlib then performance will suck unless network latency is very low because it adds a synchronous API on top of an asynchronous protocol (XCB fixes this). Modern applications don't do that, they typically render pixmaps and just have the X server composite them. X11 can still do a reasonable job here, with XDAMAGE, XFIXES, and XRENDER, allowing you to keep most of a pixmap (a Picture, in fact) on the server, update image data in selected parts, and do all of the compositing in the server. The problem is that none of the X11 toolkits actually do this very well. Wayland doesn't solve this at all - it simply says 'well, grab an OpenGL context and send drawing commands'. That works okay - the OpenGL protocol allows you to copy textures to the server (and the GPU) and composite them very fast. The problem is that this approach also works fine in X11, and with X11 you get network transparency when you do it (which works reasonably).

The main criticism I'd have of X11 is that it puts too much state on the server. There is no way, at the X protocol layer (or even in the low-level X libraries) of saying 'disconnect this window from this display, reconnect it here', or 'oh, my X server has crashed, recreate my state on this newly restarted version'. The latter worked fine in BeOS almost 20 years ago and works fine in Windows today. The former worked on NeWS 30 years ago. Both are use cases that I'd love to see addressed for modern devices. The Wayland solution to this is 'write a web app'.

Comment Re:Time to drop the prices? (Score 1) 419

The number for nuclear seems right, as the UK government has agreed to guarantee a price of £89.5/MWh for new nuclear plants, but the current wholesale price for electricity in the UK is £44/MWh (from the same source). Given that that's half the cost of all of the generation mechanisms that you describe, I wonder what most of the power is coming from and noticing that oil is conveniently absent from your list. If oil prices keep going up over the next 10 years, then it looks as if nuclear will become a lot more attractive, which is why the government is guaranteeing the price (they're betting that £90/MWh is going to seem cheap by the time the new plants are online).

Comment Re:Give me a raise (Score 5, Insightful) 327

The problem is regarding management as a position of importance that people are promoted to. Management is a specialisation, just like accounting or programming. You wouldn't say that a good manager should be promoted to being an accountant or to being a programmer, or that people who are accountants are the most important in the organisation. Manager is an administrative position and should be regarded as such, not as a leadership role that is somehow more important (and worthy of more pay) than the people that they are responsible for. HP did this (long ago) with parallel technical and management tracks. Managers were often less senior than the people that they were managing.

Comment Re:ZFS is nice... (Score 3, Insightful) 275

No. RAID isn't better handled at other layers. If you don't know about the filesystem semantics then you need NVRAM or journalling at the block level to avoid the RAID-5 write hole. RAID-Z doesn't have this problem. If you're recovering a failed block-level RAID, then you need to copy all of the data, including unused space. With ZFS RAID (all levels), you only copy the used data. There are numerous other advantages to rearranging the layers, including being a lot more flexible in the provisioning.

It's also a mistake to think of ZFS as a layer. ZFS has three layers: the lowest handles physical disks and presents a linear address space, the middle presents a transactional object store, and the top presents something that looks like a filesystem (or a block device, which is useful for things like VM disk images).

Comment Re:ZFS is nice... (Score 1) 275

2GB/TB is recommended if you're doing deduplication. That said, performance degrades quite smoothly. I've got a machine with 3x4TB drives in RAID-Z with only 8GB of RAM. Disk performance isn't great, but I mostly access it via WiFi and it's absolutely fine for that. Eventually I'll get a new motherboard for that can handle more than 8GB of RAM...

"I never let my schooling get in the way of my education." -- Mark Twain