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

 



Forgot your password?
typodupeerror
×
User Journal

Journal Journal: Emacs

Like thousands of geeks before me, I'm learning to use emacs. It is an extremely powerful editor. I've been using other, easier editors previously. There are a couple I like, notably notepad++ on windows, and kate on linux.
Though I am impressed by all that emacs can do and its custumizability, there is one thing I hate: it's user interface.

Emacs was first created by a bunch of geeks (some long-forgotten dudes like a certain Richard M. Stallman), working on powerful mainframes (not exactly, but stay with me here). This was before I was even born.

There computers were quite different in usage from what we have today. There were no user interface guidelines set in stone.

Since then, there has been stuff like IBM's CUA (Common User Access), or Apple's HIG (Human Interface Guidelines).

Emacs does not follow them.

Emacs calls "windows" what we now call "frames". And vice-versa. A "selection" in text is a "region". "cutting" is called "killing". "paste"? "Yank". There's this notion of "buffers", where everybody now has "open files" (What is it? "buffers" aren't necessarily "files"? Well it's close enough!).
Wanna close a file? Woops, ctrl-w just "killed" (cut) your selection. Wanna ctrl-x a piece of text? Woops, that's the all-important primary shortcut.

Honestly, Emacs has all the features a modern editor provides, and enough extra to cure cancer. However, it could use a much-needed update to it's UI terms and shortcuts. It's not impossible, most of its features map cleanly to what exists elsewhere, under another name (as mentioned previously).

It would open emacs up to a million young motivated geeks. Let the old geezers die off.

</rant>

User Journal

Journal Journal: Moral evolution of our reaction to violence 1

There are three stages in the reaction to violence:
1) "Strike your enemy seven times as hard as he strikes you." The basic idea is to discourage violence by warning you that the revenge will be much worse. It has the huge flaw of encouraging violence escalation, and turning a percieved slight into a full-scale war (as illustrated in this text).
2) "An eye for an eye" (Code of Hammurabi, Law of Talion) This tries to fix the escalation of violence. Problem is, we humans are imperfect, and will perceive intent where there was none, and easily fall back to the vendetta stage.
3) "Turn the other cheek" (Jesus, Gandhi) This tries to completely defuse the cycle of violence. Some people perceive it as a sign of "weakness".

Culturally, I think we still haven't learnt our lesson from that guy who got nailed (literally) for suggesting we be nice to each other, for a change. We morally remain at the second stage.

User Journal

Journal Journal: LED Rubik's Cube 1

I've been wanting to get back into hobby electronics for a while. I particularly wanted to make something with multicolored leds, mainly because of the "Ooh Shiny!" factor, and my love for smooth ambient lighting.
A slashdot comment recently gave me the idea of making a LED Rubik's Cube: a cube where each facet on a face is illuminated from the inside by a LED giving that facet its color.
It's immediately obvious that I couldn't build myself a functional Rubik's Cube: getting the wiring to work while the pieces move around is a problem that might not even be solvable. So the next idea is to have multi-colored LEDs for each facet, which change color to emulate the movement of the faces.
But that's just the ideal goal. I would already be very happy if I managed to make a not-too-large cube where each face is an array of 3x3 RGB LEDs, all independantly controlled.
Note that the center facet of each face does not change color.
The number of RGB leds necessary to make this is 3x3x6 = 54 leds. As we have three control wires for each LED, that gives us 162 wires to control!!
That's unimplementable if we want to be able to drive each LED directly, but through Charlieplexing, we can use a controller with 14 pins to control all that. (actually, you can control 182 leds with 14 pins).
The problem with Charliplexing is that one can only turn on a single LED at a time. To give the illusion of multiple leds, we exploit human persistence of vision and turn each LED rapidly in sequence. Problem is, the more LEDs we have, the less time each spends turned on, and thus seems dimmer. To complicate things, we already have to play with the RGB LED's duty cycle to manage the color!
An alternative to Charlieplexing the entire cube from one controller is to 'plex each face separately, under control of a minimal microntroller connected to a master through a serial port such as I2C. (how about cellular automata reacting automatically to their neighbours!? OK I'll stop). In this case, each face only has to 'plex 27 leds (9 RGB leds), which is manageable with 6 free pins, plus 2 for I2C, plus two for power => 10 pins. However, the PIC and (AFAICS) AVRTiny come in either 8 or 14 pin variants, so 14 pins will have to do...

Another possible trade would be to remove the bottom face from the cube.

It looks like some people like to play around as well:
James Clar

User Journal

Journal Journal: C Annoyances

I love C. It's my favorite language. Of course, as I work in the embedded systems field, I'd be very unhappy indeed if it were otherwise.

I love how it is a simple language (it's been said that it is a language that you can "hold in your head in its entirety", unlike C++). I love how the original reference book is the ultimate example of a well-made and concise manual. I love how it is universally supported. Most of all, I love how it maps to assembly in a pretty straightforward manner*.

But I'm still young, and I guess it's a sign of maturity that I start to realize its shortcomings and quirks.

- the difference between putting an include between or between "" ends up being arbitrary. Between carets, it is supposed to be a system include, and between quotes, it should be a user include. But with all the add-on user-libraries we install system-wide nowadays, the difference ends up being arbitrary and useless.

- multiple inclusions. A.c includes B.h and C.h, but B.h also includes C.h. Thus the compiler will complain that stuff defined in C.h is redefined. Hence the wonderful protections against multiple inclusions (#ifndef FOO\ #define FOO\ \ #endif FOO) that exist in header files around the world. Why this isn't yet handled automatically at CPP's level is beyond me.

- Actually, the whole include system is pretty broken. It stems from a technical problem, of course, but having to run around trying to find the include file that defines the function you need is unnecessary, nowadays. We've got powerful source-navigating engines, why aren't they included in the compilers?

- No multiple comment levels. When debugging, it is really useful to comment out a section of code, often increasingly larger. Or to comment out a section that includes comment. Nope, comments end at the first */, so not possible.

- why do people insist on hiding structs and enums inside opaque type names such as ts_thingie instead of a nice struct thingie? I find the latter so much clearer when going over code.

- portable code is a bloody mess full of #ifdef. Good luck trying to follow the flow of your code in that.

- TODO: put more stuff here.

Conclusion: this is just a rant that I needed to breathe out. Each problem I raised exists for a good reason and hasn't been universally solved for other good reasons, which I'm too lazy to research and give here (besides, that's not the point of a rant).
However, it's good spirit to know the limitations of the tools you're using.

I've got to do some Java some day.

*depends on the optimization level, of course, but that I can find the correspondence pretty easily most of the time never ceases to satisfy me.

User Journal

Journal Journal: writing vs publishing 1

I realize that this is the third post in a couple of days. I know that nobody reads this, but at this point it doesn't matter.

Why?

Because what's important to me is the need to express myself. That this doesn't reach anybody, that I get no feedback, is not important to the psychological mechanisms that make me write this. The only act of writing it down is enough to satisfy the urge. Anything else is bonus.

In fact, I believe that the important aspect of writing this is just to articulate my thoughts. As long as they stay in my mind, they are a confused mess. Only by writing it down can I see whether they make any sense.

Maybe I'm just fooling myself. Of course, if it gets to the point that I have to write it down, the thoughts are already articulate enough.

User Journal

Journal Journal: GPL vs BSD

Still today, in mid-2007, more than 18 years after the publication of the original GPL, and about the same time for the BSD license, people are still arguing about whether the GPL or BSD is the most free (as in speech) license.
Let's make is simple: BSD allows you to do much more with the code, at the expense of the freedom provided with subsequent modifications of the code. GPL restricts the way you can use the code, so that subsequent versions can enjoy the same freedom. GPL really is as free as can be, provided that freedom stays intact.
So there is more freedom with version N of BSD code than there is with GPL code, but you have no guarantee for modification N+1 of BSD code, whereas GPL code stays just as free.
Ask HP-UX users if they enjoy the same liberty with their system's code as HP did. Then ask GNU/Linux users if they enjoy the same liberty as the kernel hackers.

This has an impact on the quality evolution of software released under those licenses. With a BSD license, you can never insure that the original code will enjoy improvements made by licensees. You can always, technically, bring those improvements back to the original GPL code.

BSD code will be used far and wide. You'll get nice warm feelings to know that your code was used in the PS3, for example, though you'll never get to try it yourself, as the modifications will never come back to you. If you'd rather have that nice warm feeling, knowing that you helped out other people out of pure altruism (even if it enabled them to make billions of dollars[1] and they didn't give a cent back to you. Yeah, I'm flaming), then go BSD.
GPL ensures that everyone continues to enjoy the same liberty. As such, all changes are public, and can make their way back to the original source. So if you want your code to continue to improve from other's contributions, go GPL. Of course, this'll be at the expense of how far your code will spread, but otherwise that further spread won't benefit you (or your code). That warm feeling won't be as strong, but your code, your baby, will be better off.

If you really believe in freedom, what's the use of a freedom you can't ensure will last?

And by the way, downloading that pirated version of Spiderman 3 is the same copyright violation as using GPLed code in a proprietary application.

[1] at one point Windows' TCP/IP stack behaved identically to a BSD's, implying identical code.

[edit] About libraries: Not all GPL code is stand-alone. Some of it is part of libraries, and in this case, the GPL does strongly limit the use of the library in more ways than for stand-alone software. Libraries are components of larger software, and they are worthless by themselves. The GPL restricts the use of a library in that you cannot use it in non-GPL software. It is viral in the way that to use a GPL library, the whole software has to become GPL. The LGPL license exists so that you can still have a library under a GPL-like license, but it doesn't extend to the application using it.

User Journal

Journal Journal: Right back atchya Slashdot 10

Sorry about this, but Slashdot was crushing our server. We would very much appreciate it if you could select a random day next week and come back and check out Indy. Feel free to ask questions below or in the main slashdot comments, we will try to answer them as best we can. In the meantime here is the text of the front page on the site -

Indy is a music discovery program that learns what you like, and plays more of it. And it's free.

Indy makes it easy for you to find great new independent music. Just download Indy and double-click: as it plays songs, you rate what you hear. Indy quickly learns what you like and gets really smart about sending you more music you'll like. Let Indy help you find your place in the collective conciousness as you help other people find theirs.

DOWNLOAD NOW - Windows 98/2000/XP

Latest News
19th April, 2005, Build 3 Released - Read more...

Why Indy Rocks
You aren't just a target market - Indy can help you find your own path to the music you like. There are tons of great bands out there that don't have big labels promoting them; Indy helps you find them. And once Indy downloads a track, you can add it to your music collection, listen to it whenever and wherever you want. For musicians, Indy gives you a chance to reach a whole new audience that's excited about what you're playing. Best of all, it's free for everyone!

How Indy Works
Indy uses an advanced collaborative filtering system to predict what kind of music you'll enjoy hearing. As you rate songs, Indy finds out what you do and don't like. It compares your preferences with the ratings of all the other Indy users. For example, if you rate a song highly, and another user also likes the same song, Indy guesses that you'd probably like other music that they enjoyed. As you rate more songs, Indy will gets better and better at picking songs that you'll really enjoy.

Indy contains no adware or spyware.

User Journal

Journal Journal: Email notification for new blog

Some people pointed out that one of the nice things about /. is that they could immediately see when my blog had been updated.

To address this problem, my new blog can now send email notifications of updates. To receive these notifications, please sign up to this mailing list, or follow the link in the sidebar of my new blog.

User Journal

Journal Journal: Blog has moved 4

After many months of using Slashdot as my primary blog, I eventually decided that I could no longer put up with its various limitations. As a result, I have moved back to running my own blog software. You can find my new blog here, complete with various RSS feeds so that people can keep up.
User Journal

Journal Journal: Karma at work 4

I read this essay by Jonathan Schwartz, President of Sun Microsystems, and was rather disappointed by his slavish support for the existence of software patents. In it he repeats the thoroughly discredited and naive argument that more IP is better because IP means innovation, and thus we need software patents. Not in my wildest dreams could this have been followed, just a few days later, by this, Kodak winning a suit against Sun in which it alleges that Java infringes on some of their patents (all of them classic examples of what is wrong with patent law), and now they want half of Sun's operating profit from 1998 to 2001!

Hey Jonathan, why did Sun need to steal Kodak's precious intellectual property - and if you didn't, perhaps, having experienced the wrong end of US patent law, you can reconsider your position on software patents?

User Journal

Journal Journal: Letter to Home Secretary 2

Just wrote a letter to the UK's Home Secretary (who is responsible for immigration):

Dear Home Secretary,

It is well known that the United Kingdom is keen to attract skilled workers to the UK, particularly those involved in the software industry.

The United States is poised to pass legislation, known as the "Induce Act", which will dramatically increase the risk of innovation in the software industry in the United States. If passed, this legislation is likely to prompt a large number of the United States' most talented software engineers to consider relocation to another country.

The United Kingdom is well suited to provide an alternate base for these displaced software engineers, where their innovations may benefit the UK's economy, not to mention the economy of the European Union.

My question is whether the UK government has made sufficient provision for displaced American innovators to migrate here given the hostile environment they may soon face in their own country. It is my belief that the United Kingdom can only benefit from the influx of talented software engineers from the United States, and should minimise any barriers to their migration here.

I await your response with much anticipation,

Kind regards,

Ian Clarke
Cematics Ltd.

User Journal

Journal Journal: Induce II : Revenge of the Copyright Office 1

A new version of the Induce Act has been prepared by the Copyright Office. Judging by early reports, it sounds like it is an improvement on the previous version, in much the same way that getting shot in the stomach is an improvement on getting shot in the head.

The new text still places the burden of protecting Hollywood's outdated business model on the creators of new technologies. Worse, it leaves open massive legal uncertainties that will inevitably lead to a storm of litigation that could stifle new technology development for years to come.

The Media

Journal Journal: What might a viable Induce Act look like? 3

More and more people are accepting that it is unlikely that the ill-conceived Induce Act will survive in its present form, however a number of well-informed people have told me that a revamped version which more specifically targets P2P networks probably will make it through Congress.

But, this begs the question: Will it ever be possible to target the makers of Kazaa and Morpheus, without the supposedly unintended consequences that everyone worries about?

Now, obviously the law can't simply name the companies it wants to get rid of, so there has to be some kind of test to identify these "bad actors". The fundamental problem (for the Induce Act) is that there may not exist an objective test that can effectively isolate those they wish to isolate, meaning that the Induce Act will inevitably require a subjective test. Subjective tests must be clarified by litigation, but it only requires the threat of litigation to torpedo many potentially valuable new technologies before they even get out of the angel investor's office.

It is therefore my suspicion that it will be impossible to rewrite the Induce Act such that it addresses the concerns of the IEEE, CEA, EFF, and others, while still achieving its stated goal. This probably means that the current effort to come up with a compromise is unlikely to bear fruit. I doubt the situation is improved by the fact that the person charged with achieving this compromise is the Register of Copyrights, Mary Beth Peters, who has a more anti-technology view than even the RIAA will comfortably admit to.

Whatever happens, I am sure that history will regard the Induce Act as the most violent death throe yet of a powerful and influential industry. Lets hope they don't take too many useful technologies down with them.

User Journal

Journal Journal: Listen to the Induce Act hearing 2

Yesterday there was a hearing in Congress on the absolutely insane anti-technology pro-entertainment industry Induce Act which you can listen to here. More-or-less predictable, Gary Shapiro, President and CEO of the Consumer Electronics Association probably most clearly articulates the problems with this law.

Interestingly, the Business Software Alliance, who rarely see an extension of intellectual property law they don't like, and who initially endorsed the Induce Act, are now far more skeptical.

User Journal

Journal Journal: Censored by Slashdot for criticising Apple! 8

This is so rediculous I can scarcely believe it. A few days ago /. posted a story about iTunes which seemed a little sycophantic for my tastes, so I posted a comment pointing out (but not even endorsing) some opposing opinions. My comment was rapidly moderated up to +5, and then down it went again as some moderators decided that it was their job to shield innocent eyes from any criticism of Apple. How nice of them.

Meahwhile another user, "hanssprudel", posted a much smarter and wittier comment highlightling the hypocrisy of the Slashdot groupthink who claim to hate DRM, except when it happens to be Apple's DRM. Quite correctly it was moderated up to +4 before, like mine, the fanboys spotted this crime against their beloved Apple and down it went.

All was not lost, it turns out that some moderators actually read the moderator guidelines and decided to try to counteract the handiwork of their fellow moderators. Up and down the comments went, until then - something really surprising happened - I tried to post again and got the following message:

Due to excessive bad posting from this IP or Subnet, comment posting has temporarily been disabled. If it's you, consider this a chance to sit in the timeout corner . If it's someone else, this is a chance to hunt them down. If you think this is unfair, please email moderation@slashdot.org with your MD5'd IPID and SubnetID, which are "09b3980f7f6a2eef8e166300c0c88a54" and "7bc76bb089f2d469d9d92e2d28d45ba5" and (optionally, but preferably) your IP number "81.178.66.53" and your username "Sanity"

Well that's just great, I have been banned for excessive negative moderation, which wouldn't actually have been possible had it not been for all the positive moderation! Really clever precaution they have there. What is even better is that hanssprudel met the exact same fate (it turned out that I knew him IRL), presumably for the exact same reason!

He and I both emailed the slashdot editors, confident that they would quickly see the flaw in this silly system, unblock us, and apologise for the inconvenience. Not so, instead hans was told by CmdrTaco himself that he "deserved it" - why? Because apparently his "comment was dripping with sarcasm". Great! Glad that is clarified, you can rant about gay n*ggers all you want, but anybody that is sarcastic on Slashdot gets banned from posting for several days!

Two days later I am still banned, not sure about hans. It seems pretty clear from our correspondence with the /. editors that they aren't going to admit how stupid this mechanism is . That is their right, but you can rest assured that I won't be renewing my /. subscription, and I hope this prompts others to rethink theirs.

Slashdot Top Deals

Always draw your curves, then plot your reading.

Working...