Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×

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

IMO it's much cleaner to consider code as a series of transforms of varying kinds than a grab bag of tools.

I agree entirely - functional approaches tend to result in much more elegant code, where suitable.

I like Coffeescript's switch [coffeescript.org], but that's partly because I like having every construct being an expression, removing an element of the code/data divide.

That looks very similar to Rust's match construct, which is basically the same thing but with C-style syntax. Another useful feature I've seen (that would be incompatible with Python's preference for duck typing) is D's final switch, which ensures that cases exist for all members of an enum.

Comment Re:Do it like the homestead act (Score 1) 115

Either commit to 100 percent coverage or accept that areas you're not providing service for should be able to use frequencies there that you use in other places but not there.

There's no reason to give someone that kind of blanket lease.

Allowing others to use the same frequencies in a compatible manner would achieve the same benefits (improved coverage, since anyone can operate a tower) without the fragmentation. Not to mention that the cost of negotiating spectrum rights in each state/area would be significant, to say nothing of the fun issues that crop up along boundaries.

What is more, the fragmentation is a technological problem that is quiet easily addressed.

First, we can have catalog frequency. That is one frequency EVERYWHERE that specifies what frequencies other services are using in the area. As your device moves it will periodically listen to that frequency and update its database for that area as to what is used by what. This ensures that every device will at least be aware of what frequencies are in use and by what.

You have now added a second antenna to the device, increasing power consumption and complexity, not to mention the additional logic needed to decode the messages.

Second, the next technological problem is making your device adaptable enough that it can shift to different frequencies and possibly even different protocols. Most devices already do this especially smartphones. My smartphone has a bluetooth radio, a wifi radio, an FM receiver, a GPS receiver, a 2G radio, a 3G radio, and a 4G radio. I think it can also handle either CDMA or GSM. So that is already a very wide range of frequencies and many different protocols.

While I could be wrong, I'm pretty sure the norm is to have different antennas for most of those. Bluetooth and wifi can share one as they use the same frequency, but 2.4 GHz is so far from 900/1800/2100 MHz that it would definitely need a separate antenna. Even making an antenna with the desired characteristics at 3 discrete frequencies likely increases the cost significantly - covering a continuous range of frequencies like that without degrading reception would be even harder.

Your idea is interesting, but ultimately overcomplicated. The entire thing is basically a hack to deal with the fragmentation introduced, but it appears to me your real problem is that the current system grants a monopoly over the frequency. This would be addressed in my proposal by mandating that anyone can use the frequency, provided they were compliant with the protocol and associated regulations. (Or to put it differently, the spectrum would be allocated to protocols, rather than corporations.) It's not clear at all what advantages your approach brings over this.

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

There should be one-- and preferably only one --obvious way to do it.

The problem with this rule is that it means limiting your feature-set so that you have N features with clearly defined regions of use, instead of 2N features with overlapping use cases. Switch statements are one example of this - they've been around since C (or possibly earlier) because they're clearer than a massive if-elseif-etc. statement, but Python lacks them, and people sometimes try to hack something similar into existence using dictionaries of lambdas.

Another is Python supports both functional and imperative programming, which means there's inherently two different ways of performing many simple tasks. Obviously many other languages chose only one of these, and Python is clearly more powerful for having both, but it's a good example of how having more than one way to do things results in a more expressive language.

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

The problem with C++ is that it's way too easy to write write-only code, because the language has so many features that nobody but language experts understand all of them. So we all program in different dialects, and then scratch our heads when we read other peoples' code.

Less so than C, especially as used in the kernel. Seriously read some of the Linux kernel and compare it with any good C++ project. The kernel loses BADLY. The manually implemented virtual classes are not pretty and not type safe, and neither are all the ugly macros needed to do things that would safe, automatic and easy to read in C++.

I disagree completely - I think the issue you're dealing with is that the kernel is not written in C++, and its style reflects that. The kernel is one of the best written pieces of C I've seen, easily better than an average C++ project. IMO, the only feature that the kernel would really benefit from is templates (for added type safety) - everything else works fine.

Furthermore, your argument about things being automatic in C++ is exactly the reason why most kernel developers use C instead! When you are writing a kernel, you absolutely do not want anything happening implicitly - it needs to be explicit, otherwise it's going to cause problems because it's not going to be obvious when it's interacting with something else. To give you an example, it's possible code in the block I/O subsystem to get stuck in an infinite loop upon allocating memory, since that request can result in paging, which results in disk operations via the block I/O subsystem, etc.

Context: I have experience doing both kernel programming (in C) and application development (in C++ with Qt). I think C++ is a powerful language which can lead to some rather beautiful code when used with Qt. I also think that C makes it far too easy to write bad code (buffer overflows, null terminated strings, needing to check return codes without defining a consistent scheme for whether 0 is success or failure, etc.). For any other project, I'd go with C++ in a heartbeat (or maybe D, depending on what libraries I needed). But in the context of kernel development, C++ is definitely the wrong tool for the job.

Comment Re: Maybe in a different country (Score 1) 498

For two reasons. The first is that in the majority of cases, depression tends to be the result of environmental factors, as opposed to genetic ones. The second is that many people who struggle with depression often have a lot to contribute to society, particularly as it is known to correlate with creativity.

Comment Re:Maybe in a different country (Score 1) 498

While I agree with your general point, I'm not convinced its possible to remove all quick and easy suicide methods. For example, electrocution seems like an easily accessible one, especially if you insert some paperclips into the socket and touch your chest to them. Admittedly, it would require some creativity, but it's not something that can be easily prevented. (RCDs help, unless the person has isolated themselves from the floor.)

Comment Re:Do it like the homestead act (Score 1) 115

The leases on spectrum should be specific to the region like conventional radio stations. If I lease a bit of spectrum in Florida for a radio station, I don't own that same frequency in California. I don't even own it in all of Florida.

The big problem I see with this is the fragmentation it would cause. Quite frankly, the US already has issues due to their major mobile phone networks using different frequencies. Having different frequencies for the same network, within the same country would just exacerbate that.

I would argue that where the frequency is used for a standardized protocol, they should be required to allow others to use it, providing they are compliant with the appropriate standard. Allowing other frequencies to be allocated for competing standards would only be permitted where there were clear benefits to doing so.

Comment Re:Funny thing... (Score 1) 229

why "Windows makes it so hard to do stuff"

It's what you learn on. I learned on Windows, when I use a Mac I'm utterly lost and think "Why did Apple make it so hard to find anything?"

I think this is only part of it. I grew up using Windows (and am consequently lost on Macs), but I found Linux easier to learn than Windows. This may be partly due to my technical inclinations, but I think that variations in usability and documentation can make a real difference to how easily you can learn to use a system.

Comment Re:Google Chrome is fast moving... (Score 1) 338

The application dropped support for production kernels ... because it wants a patch that isn't yet in production kernels.

The feature is in several stable kernel branches. Your distro might just not support them, so either don't use Chrome, or don't use that distro, or figure out how to use a newer kernel on your distro. :)

Given that this is Debian we're talking about, the the right comparison is with an LTS kernel, not a stable one. 3.17 is already EOL, and it was only released in October. The most recent LTS kernel is 3.14.

That said, Jessie is currently running 3.16, so there's likely something I'm unaware of regarding Debian's kernel policy...

Comment Re:Doesn't smell right (Score 1) 338

This doesn't pass the sniff test. This 'bug' has apparently been around for months (October/November) and it's just now that people are noticing? And the fix is patching the kernel rather than regressing whatever change was in Chrome that added this?

The change is an improvement to sandboxing (i.e. security). If the kernel patch was sufficiently minor (this appears to be the case), it makes far more sense to backport it (improving the security under older kernels) than to remove it (compromising security under newer kernels). This is especially true given Debian's focus on security.

Most of the comments in the thread seem to be from people who don't care, but are happy to use it as an opportunity to bash Chrome/Chromium. I suspect if someone had actually done the work of writing a patch, it would have been merged without much drama.

Comment Re:Debian 8 was already a lost cause. (Score 1) 338

Systemd was forced upon Debian users thanks to some dirty politics, and has generally been unwanted by most of the Debian community.

While I agree that it's questionable whether systemd is suitable for Debian stable, I would hardly describe it as resulting from "dirty politics".
The reason that systemd got adopted is very simple: it means less work for distro maintainers. Systemd .service files are much easier to maintain than initscripts, systemd comes with logind (consolekit is unmaintained, and no one is interested in picking it up), and perhaps most importantly, Red Hat is pushing it (which means that they would contribute significantly to porting programs to it. The only real alternative to it was OpenRC, which doesn't fix the consolekit issue.[1] The maintainers were the ones making the decision, so they put their interests first, as opposed to that of their users.

I agree that systemd has some architectural issues (just cause you choose a binary log format, doesn't mean you need modify the start of it on each update) and management issues (it should never have assimilated udev without continuing to support its use without the rest of systemd), but its adoption was entirely due to the opportunity cost of choosing anything else, as opposed to politics.

[1] For the record, I think that OpenRC would have been a fine alternative for Debian. While it doesn't have as much upstream development, it doesn't need to as it's a mature product.

Comment Re:Now if they will sell them without MS Windows (Score 1) 161

I've been using Sabayon for a few years now - it's a nice combination of some fairly nice features (being able to mix entropy and portage, Gentoo-style config file management, fairly bleeding edge packages) and making other things just work (bumblebee, UEFI). I agree that the documentation is a bit weak (downside of a small community), but in practice the only difference from Gentoo is the package manager and default config. (The Arch wiki is also quite useful.)

SystemD works pretty well once you get the hang of it, and these days pretty much everything supports it. Most of the criticisms of are concerning its architecture and management, rather than functional problems. (I think the most significant bug I've seen with it in the last year or two is that systemd-journald needs to be manually restarted if your rootfs gets full, which is fairly minor as bugs go.)

I suggest making backups of your root file system (btrfs snapshots are perfect for this) before updates though - I've had a major regression about once a year, on average. (To be fair, one of them was due to me doing something very unsupported with glibc, and the other due to some somewhat uncommon hardware. Both were fixed within a week as well.)

Feel free to reply to this post with any questions you might have about it. It definitely doesn't get as much attention as it merits, IMO, so I'm always happy to help out people who are interested in it.

Slashdot Top Deals

"The most important thing in a man is not what he knows, but what he is." -- Narciso Yepes

Working...