/gallery

Gnome 3.0, finally released

07 Apr, 2011
0 Comments

So, there are lots of things to be said about Gnome 3.0. A lot of cruft was removed everywhere inthe stack, several applications gained massive UI changes, (Still not sold on the navigation arrows placement in the file manager, but that's me).
The most "in your face" change is the shell, which will polarise a lot of discussion, opinion and people. Looking forwards to it. It does rehaul something that has been static and comfortable for a long long time, in the process of changing that, several things went missing or were not reimplemented in the same way.
Both for good and for worse, I'd say.

I'm looking forwards to seeing where this goes. It's a change, and change is never all easy.

I am GNOME

Some (Software Related) reading

19 Mar, 2011
0 Comments

Some weeks ago A guy asked me about books on twitter, what followed was some hours digging through memory lanes of books I'd read, enjoyed, used in school and on libraries, and turned into a list of books that I want to restock shelves with:
These aren't the "Become a better C programmer" books out there, but deal with generic and generally applicable themes of the craft, art and science of programming.

Amazon Wishlist for these

Design





Programming

Some *nix hacking

07 Mar, 2011
0 Comments

So, Since liferea and Firefox both tend to be somewhat sluggish under high IO load, even when they shouldn't be doing much out of it, I figured I'd get it sorted.

And while doing so, I'd also toss in the fix for Adobe Flash that Linus Torvalds posted in the Fedora bugzilla (#638477) earlier.
#include <sys/types.h> void *memcpy(void *dst, const void *src, size_t size) { void *orig = dst; asm volatile("rep ; movsq" :"=D" (dst), "=S" (src) :"0" (dst), "1" (src), "c" (size >> 3) :"memory"); asm volatile("rep ; movsb" :"=D" (dst), "=S" (src) :"0" (dst), "1" (src), "c" (size & 7) :"memory"); return orig; } int fsync(int fd) { return 0; } int fdatasync(int fd) { return 0; } int msync(void *addr, size_t length, int flags) { return 0; }
License? The sync parts are trivial and not licensable. The Linus part isn't much worse.
Remember, if it eats your data, you can pet it.
gcc -O2 -c crappy.c ld -G crappy.o -o crappy.so LD_PRELOAD=`pwd`/crappy liferea & disown LD_PRELOAD=`pwd`/crappy firefox4 & disown

Some hacking blogging

15 Feb, 2011
0 Comments

So, Due to Buerocrazy, life is sorta miffly atm.

However, I need to clear my head from that. At work I've recently been reading PCI and credit-card specifications, dealing with osCommerce, Virtual items for sale, generating tickets for a PoS system and so on.

It now appears the pieces are coming together, tickets can be bought, printed, ordered and added, and disappear from the inventory when things are sold out. Yey.

Next up, design and featurism. Then it's off to the other projects in order to see what happens with them.

I'm still looking for suggestions on hardware ( x86 or Arm, 24+ Megs of RAM, 32+ Megs of flash, Ethernet, 2x USB ( and maybe a built-in 3G modem) Theres a few on my list, but I want stuff for smaller batches, (a couple of hundreds) at decent price. There's a few on the market, but maybe you know of one that I don't know. Do tell!

Tomorrow, building more firmware, doing some cabling and design-work. Yey. Still waiting for some more prototype units of various CPU-denominations. I wonder what I can do with 32Megs of RAM, 200 MHz and 4 Megs of flash .. The flash will be a pita for my usecase, I fear. :/

Hardware, mdadm, raid, recovery

01 Jan, 2011
0 Comments

Spent over 48 hours trying to recover a drive to a machine which lost power during startup, causing the head to hit platters and corrupting sectors vital to bootup. Ouch.
Then we lost power during recovery.
However, all user-data was recovered in the end, backups are now in place, and things appear to be stabilizing. I just wish there was enough cash to throw at the problem to fix it properly. New drives + UPS would be necessary it seems. And we don't like that.

As for my home systems, 1 drive is failing ( sector reassigning failed ) and going back to the store next week. Fortunately it's 1 disk of a raid mirror, so it should be fine to recover.

The other set of raid5 is currently being shrunk (filesystem) in preparation of using mdadm to transform my raid5 to a raid1, in order to remove some drives from the chassi. Takes time, but should be lossless. Only reason for doing this is really to move hardware around, No faults so far.

Good news, USB stick and GNU ddrescue is the winner. dd_rescue is to be avoided. Bad news, ntfs-3g handles _badly_ with disk images, and consumes a _ton_ of cpu. Do not even attempt to use it.

gparted will do some interesting things when resizing partitions, for example, read only moves of data. Will take 12+ hours to operate. Make sure you don't lose power.

Networking issues, A Luxury problem

06 Dec, 2010
0 Comments

Preface:
So, with the new year approaching I’m also joining the future when it comes to fiber to the home networking. Well really, my subscription with the other ISP was coming to an end, and it was time to upgrade to something that was both cheaper and faster.

With the new ISP, I’m finally getting out of the “only one IP per customer”, and into a more realistic setup. This allows me to finally get rid of the NAT box and all the problems it entails .( Instant messenger, UPnP and various protocols still do not act well with NAT. And probably never will )

However, you don’t get any amount of IP-addresses, so there has to be some limit, and for things like the wifi, I do not see a good reason to bridge anyone into the ISP network without some sanity checking.

Now, I wouldn’t be a proper geek if that was the only thing on my requirements. See, I also want to maintain good speed with my NAS storage, ( nfs + samba ) which unfortunately my router cannot manage ( only 100Mbit, while my switch is Gigabit ). However, lets be serious, this is a minor issue.

Add to this that I have, quite a number of various devices speaking ethernet ( Embedded systems galore, 10-15 ‘computers’ around here ), so we can’t really just assume that I’ll get enough public IP’s for all of them.

So, what I’d _REALLY_ want is a server on my home router (OpenWRT 10.03.1-rcX Backfire based) that would set up a private LAN for most machines, but for a few select MAC-addresses would instead of allocating a private IP, do a DHCP proxy call and allocate a public IP-address for those.

Preferrably the DHCP-proxy would then re-write certain fields like “default route” ( the router ) DNS ( Well, doh ) as well as update the DNS-entries for the internal lookup so you could use consistent for your own machines. ( MAC-based to start with )

Well. Right now, there is no such software, and for this weekend I didn’t have the urge to even try and scope it up, much less create it.

So, That leaves me with two “obvious” solutions.
*) DHCP Proxy (dhrelay from ISC and dhcp-forwarder)
*) Transparent Bridging

For these to work I had to do some magic in either way. First and foremost, set up VLAN’s on the internal switch of my WRT160nl. There I’d dedicate 1 port to be “outbound” ( and hook a switch to that) and the remaining 3 to be “local net only”.

Figuring this out took me a bit longer than I’d thought, as I managed to lock myself out by the ways of firewalling whenever I attempted it, causing quite a few reboots into safe mode while I was attempting in blind to figure out what worked and what didn’t. Below will be some documentation on how to get this just right (tm)

Also note that the default documentation on setting up VLAN on the OpenWRT page is broken, as it will create RFC-noncomformant tagged VLAN’s . VLAN 1 is not supposed to be tagged, see 802.1D standard.

So, the relevant parts of /etc/config/network :
config ‘switch’
option ‘name’ ‘eth0‘
option ‘reset’ ‘1‘
option ‘enable_vlan’ ‘1‘
option ‘enable’ ‘1‘

config ‘switch_vlan’ ‘eth0_0‘
option ‘vlan’ ‘0‘
option ‘device’ ‘eth0‘
option ‘ports’ ‘0u 1u 2u 4* 5*’

config ‘switch_vlan’ ‘eth0_10‘
option ‘vlan’ ‘10‘
option ‘device’ ‘eth0‘
option ‘ports’ ‘3u 4t 5t’

config ‘interface’ ‘vlan0‘
option ‘proto’ ‘static’
option ‘ifname’ ‘eth0.0‘
option ‘ipaddr’ ‘172.27.1.1‘
option ‘netmask’ ‘255.255.255.0‘
option ‘defaultroute’ ‘0‘
option ‘peerdns’ ‘0‘

This first turns on VLAN and the switch on eth0.

the part that reads : 0u 1u 2u 4* 5* has a magic meaning. It means that vlan 0 will be _untagged_ as it leaves ports 0 1 and 2, and _tagged_ if an untagged packet LEAVES port 4 and 5. It also makes this the _default_ vlan.

the part that reads “3u 4t 5t” is similarly magic. it means that packets leaving port 3 shall be untagged if they were tagged with vlan 10. 4t 5t also means they get tagged going out of the two internal ports. However, it’s uncertain if this actually does anything.

Next, we assign a local, static IP-address to the vlan0, and serve DHCP off that as normal. That means that physical port 3 on the switch is now magic, and assigned to vlan10 ( eth0.10 ) and free to perform experiments on.

Also note, you _NEED_ to add vlan0 to the /etc/config/firewall zone for your lan. (replace eth0 with “eth0 vlan0“ and do similar in your /etc/config/dhcp

So, My first few hours was spent digging through how to do this without bridging, so I spent many hours getting dnsmasq not to bind the external interface nor the eth0.10 interface, and attempting to get dhcp-forwarder or dhcrelay to work. Unfortunately I got neither to work with my ISP (Telia). However, this may work in the future? I wouldn’t know. I still haven’t compiled up dhcp-helper from the same guy who creates dnsmasq

So. After some time I scrapped this position, and decided that it would be simpler to create a bridged interface between eth1 (external, WAN) and eth0.10 (internal, VLAN 10, port 3 on the switch ) said and done. It was actually quite simple.

from /etc/config/network:
config ‘interface’ ‘wan’
option ‘peerdns’ ‘0'
option ‘type’ ‘bridge’
option ‘ifname’ ‘eth1 eth0.10'
option ‘proto’ ‘dhcp’
option ‘auto’ ‘1'

And that about solves it.

Now, I can hook my swtich to that port, and the machines on this side also get nice external IP addresses.
There’s just one snag. I do not get any firewall anymore. For cited performance reasons, ( I’m unable to find numbers anywhere ) the bridged filtering is disabled in the OpenWRT Backfire kernels. This does put a hinder to my plans, as I’m unable to actually perform what I wanted to do here.

Also, performance stinks right now. Why? My ISP has proxy-arp. This means, that their gateway is responding to _ALL_ arp requests for any IP-address in their range as belonging to them. This in turn is enough to make my gigabit switch scratch it’s head, and forward packets through my bridge and up into the ISP, and then back again. Effectively degrading my gigabit ethernet into 100Mbit or less.

This would ofc. be easy to stop by blocking arp-requests at the firewall. Except that the firewall isn’t enabled on bridged interfaces.

So, for the future:
a) Check out the performance of a custom kernel with bridging. Does it kill the upstream?
b) Investigate in dhcp-helper.
c) Look at creating a patch for dnsmasq that does custom proxying of DHCP based on certain mac-addresses.
d) Kill everyone, NAT and just go with ipv6 whenever it arrives?

An email I just sent,

31 Aug, 2010
0 Comments

Directed to the sales folks at Stardock Games, makers of Impulse the gaming platform.

---

I'm a bit miffed here. This weekend you announced "the Witcher,
special edition" which was one of those games that I still haven't
gotten around to playing.
As I had just finished enjoying the other other games I have at home
( Well, got annoyed with some of them, frankly fed up with Dragon Age
and its annoying sidequest that cannot be completed due to game
mechanics. Silly things that put me off a game completely) I wanted to
give it a try, and lets face it, 9.99$ was a steal for that game,
according to what I hear from friends at least.

Now, you already know when I sign up for mailings and such where I'm
based. Since I've done a purchase and have an impulse account ( Mostly
to buy Sins of a Solar empire, great fun that game.) So I go dig up my
account information, click the link for the sale on the lovely game.

Only to see:

Not available in your area.

So, it sells in North America, Russia and Eastern Europe, but not in
Western Europe?

Right, What the feck is this? Why do you even _BOTHER_ sending me the
announcement about games on sale which I then Cannot even Purchase?

Are you really hoping that I'll get stuck on your site and buy more
things cause of that? Perhaps Mass Effect2, the lovely smash hit from
Bioware? Or Dragon Age Origins ( which I seem to already have acquired)
or Divinity II, which also seemed interesting?

Right, I forget, There's not really a big chance I'd ever get around to
staying on Impulse _or_ purchasing more when you can't even offer me the
number one reason that I come there to me.

Frankly, if you can't even get around to actually selling me the things
you send me advertising about, do you really expect me to either
recommend you to others, or that I'd come back again?

I'm sad, disappointed, and annoyed, and obviously have to find another
digital download of the game if I want to play it. Perhaps the pirate
bay won't prevent me from getting it?

For a long time I've been trying to avoid pirating games, but since you
_actively_ taunt me with them and then won't even sell it, what am I to
do?

No, don't read this wrong, I do _not_ want you to stop mailing me
offers, notifications and sales.

I want you to STOP offering me games that you WILL NOT even sell to me.
"Oh, but that might require extra work? Like sorting the subscriber
databases between zones, and preparing different mailings?"

Well, rather that than disgusting your customers enough that they write
toxic rants back to you, perhaps?

It seems that the pirate bay aren't making a huge distinction whether
you are in Europe, Angola or Elsewhere if you wish to get the game.

Right, that might be.. unethical, of me. However, you can't really
complain that piracy hurts game distributors or creators, when the
distributors _WON'T SELL_ the game to people?

I'm a bit torn here, should I find a bittorrent client and see if I find
the game there, or will you fix it so I can actually get the game
officially?

Regards,

Some more thoughts re. Oracle vs. Google

13 Aug, 2010
0 Comments

So. Why?
With the java GPL licensing from SUN and the patent exception _ONLY_ for non mobile versions. The Mobile JVM still has separate licensing requirements. Claiming yourself to be JAVA means you have to fulfill a standards compatibility test by SUN.

Google released Dalvik under an Apache license, thereby not granting patent protection to sub licensees. Google did not go with JVM for android because of the Java-Mobile licensing issues.

Next up, by filing suit now against Google and prolonging the court case, they can fire against the handset developers for more licensing costs. ( Remember the 1.x bn $ cashflow that SUN got from Microsoft in the Java deal in the past? Look for numbers like that. )

If Google fold, Oracle can then aim for all handset distributors, basically fragmenting and ruining the Android market. If Google fight, Oracle can show the cash for lawsuit defense vs. the small cost of buying a license to the handset developers, and do SCO style attacks by sending invoices to the hardware manufacturers. It's the same Lawfirms and Lawyers, so that's a valid assumption to go on.

Google had the chance to buy SUN but decided not to, And now it's coming in to haunt them... Badly. So, It's a mess of patents and licensing. The copyright claims will be interesting, but it seems as if Oracle has decided to kill off Java as an open platform. Looks as if Python is the way now?

So, techincally, Google can start modifying the JVM under GPL License and push that as a Dalvik replacement, Maybe. Otherwise, write a .class => .pyc recompiler, inspired by Jython?

Other than that, I'm not too sure what to make of this. Oracle wants money to recap the purchase, the question is if this is a sane strategy for them? They will gut the Java market, however, it's been on steady decline as they failed to keep it sexy. Even symbian is moving away from it. Most probably because of compability issues, slowness and failed licensing problems. Java is no longer a prime factor on the *nix side, after Oracle killing off the SUN Solaris customers by attempting to gut them for cash.

Dalvik can always be modified some more, push out some updates and make it even more unlike the JVM, thereby going around the patents. No doubt, this has already been done in some cases.

Google countersuing Oracle is another interesting concept.

Now, I wonder when someone will invoke the dead ghost of SCO Unix, along with the IBM lawsuits?

Some notes about the Oracle vs. Google patent lawsuit

13 Aug, 2010
0 Comments

So, Oracle brought in the Big Guns. MoFo and David Boies in their lawsuit against Google for android.

Now, I don't really like patents, however, I'll take some time to read what I understand here and explain a few clarifications re. the lawsuits.

Back in 1997 Sun filed a suit against Microsoft, which they won. This is _NOT_ the same as what is going on right now. Back then, it was contract breach, about Microsoft calling their "Java" "Java 1.1" while not implementing the standard completely, thereby destroying the value of "java" and breaking their agreement.

This is a pure patent trolling from Oracles side. I see mentions about copyright inside the complaint, but no real numbers anywhere as to what, that'll have to be worked on separately, as Google _are_ shipping java development tools.

On to the development. Dalvik is a VM, it runs binary blobs in a virtual machine. However, Dalvik lacks it's own compiler, and only works by re-encoding Java classes in the Java Byte Format into the Dalvik Byte Format.
This means, to develop for Dalvik, you need to first make a normal, compileable, java-program using the official java compiler. This is then transformed into Dalvik runtime code. Please note that this is quite important in this case. The Dalvik tools do not compile or transform the source code, that is left to the _classical_ java tools to do.

So, onwards. "Method and system for performing static initialization" Claims as #1 that it "compiling the source code containing the array" .... Well, This isn't done by Dalvik at all. However, I have not read the rest of how Dalvik does it ( Does it initialize the arrays and "play execute" them as the patent claims? I don't know, but let's just leave it that google do not use their own compiler for Dalvik.

Next up, Method and apparatus for pre-processing and packaging class files

computer usable medium having computer readable program code embodied therein for pre-processing class files, said computer program product comprising:
computer readable program code configured to cause a computer to determine a plurality of duplicated elements in a plurality of class files;
computer readable program code configured to cause a computer to form a shared table comprising said plurality of duplicated elements;
computer readable program code configured to cause a computer to remove said duplicated elements from said plurality of class files to obtain a plurality of reduced class files; and
computer readable program code configured to cause a computer to form a multi-class file comprising said plurality of reduced class files and said shared table.

Basically, de-duplication in the compiling process of javac. Which, as we know from above, Goog/Android lets javac do by itself... I doubt this will be a problem. Maybe because you can combine multiple .class files into a single dalvik Executable?

Controlling access to a resource This probably requires more insight into how the Dalvik VM functions. However it requires hardware cooperation in certain ways that I cannot tell on how it would work.

Protection domains to provide security in a computer system Basically tagging sourcecode with a code to reference which domain it will be ran in. Uncertain if it will apply due to lacking a source stage for the Dalvik system.... Also, same questions as on previous one apply for me, I don't know if it creates runtime domains and how it manages the keying and sourcing of such codes. ( Mentioning source of codes and source code in the same sentence makes my head hurt)

Interpreting functions utilizing a hybrid of virtual and native machine Might be interesting. Offloading VM instructions into native to increase speed. From 2002, I wonder if this is really that unique. Maybe because it mentions specifically "wherein the virtual machine instruction are Java virtual machine instructions" Hmmm. It's basically the improved JIT-compiler, transforming JVM instructions into others, rearranging pointers, executing the new ones. Eventually replacing some JVM instructions with "real" ones.

System and method for dynamic preloading of classes through memory space cloning of a master runtime system process Cloning a process without using COW... By cloning the whole JVM in address space? or doing it with COW. Details about the JVM galore, I wonder what dalvik does.

Hmm, Overall, quite a lot of them are specific to how Java's VM works, (stack based VM) vs. Dalvik's Register Based VM.

How Google routed around SUn's IP-based licensing restrictions on Java ME" might also be interesting

Today is the Day?

17 Jun, 2008
0 Comments

Okay, Welcome to the world of software and release convergence. Today,  June 17 2008, we see two Major milestones in the world.

First off, Mozilla.org is expected to release Firefox 3.0 final, the stable version of the browser that re-changed the web after the fight was lost by Netscape so many years ago.

Second off, Wine, the Windows implementation on *nix is celebrating their 15 year anniversery, by releasing Wine 1.0,  finally!  ( Link may be to 1.0-rc5 due to winehq being... a bit loaded)

And in other news, I just spent the first day of my second week at work doing nothing but reading old documentation (that's outdated and doesn't quite apply) due to the boss mr thing not having shown up with my computer/cellphone, and the loan computer being windowsy and without a mouse ( Vista without a mouse is. not easy)

Hopefully I get the stuff tomorrow, and can actually start a test install so I can see the real documentation and not the old stuff.

 1 2 Next →