About Me

Michael Zucchi

 B.E. (Comp. Sys. Eng.)

  also known as Zed
  to his mates & enemies!

notzed at gmail >
fosstodon.org/@notzed >

Tags

android (44)
beagle (63)
biographical (104)
blogz (9)
business (1)
code (77)
compilerz (1)
cooking (31)
dez (7)
dusk (31)
esp32 (4)
extensionz (1)
ffts (3)
forth (3)
free software (4)
games (32)
gloat (2)
globalisation (1)
gnu (4)
graphics (16)
gsoc (4)
hacking (459)
haiku (2)
horticulture (10)
house (23)
hsa (6)
humour (7)
imagez (28)
java (231)
java ee (3)
javafx (49)
jjmpeg (81)
junk (3)
kobo (15)
libeze (7)
linux (5)
mediaz (27)
ml (15)
nativez (10)
opencl (120)
os (17)
panamaz (5)
parallella (97)
pdfz (8)
philosophy (26)
picfx (2)
players (1)
playerz (2)
politics (7)
ps3 (12)
puppybits (17)
rants (137)
readerz (8)
rez (1)
socles (36)
termz (3)
videoz (6)
vulkan (3)
wanki (3)
workshop (3)
zcl (4)
zedzone (26)
Wednesday, 24 November 2010, 07:50

OpenCLGL

I had another go at playing with GL images via OpenCL today. Although the GPU is currently the main bottleneck i'm a little concerned about moving stuff off and back onto it when it isn't necessary and i'm starting to run into some memory and performance issues.

The code was running but nothing was happening - no matter what I was doing nothing was being written by the opencl code to the texture memory. I was missing one crucial detail from the documentation - I wasn't acquiring the objects for OpenCL before using them. Stupid mistake.

But that was only step one. Absolutely no luck trying to get it to run from another thread - an definite requirement if i am to use it. But eventually the google came to the rescue and I found this question in the nvidia forums by a guy who answered it himself:

Just wanted to report that I had solved the problem. I just release the GL objects before drawing and reacquire them after rendering is complete. Since these rendering calls happen in the process rather than the thread, it doesn't throw any error. I can still run my kernel through the host thread.

I was also having a lot of stability issues and it turns out GLJPanel shouldn't be used at the moment, so I just changed to a GLCanvas and it seemed to fix those issues.

There's still the little matter of the application crashing when you close it - but as far as I can ascertain this is a nvidia driver bug. It seems to work ok on my ATI card. That's still a little untidy so I might have to see if it happens on microsoft windows too before deciding if I should try that route.

As with anything the more complex it becomes and the more of the API you're using the more likely you're to run into bugs or other problems, so there are risks with this. I really need some quality performance metrics to find out if there are benefits which make the risks worth it, but there's a lot of work just in that.

GOW III

I finally finished God of War III last night - i'd been playing a few hours here and there and giving up when I felt like throwing the controller around. Unfortunately about mid-way through after dying for the 20th time against one baddie I switched to easy mode ... which made it perhaps a bit too easy. But I guess it's better than giving up entirely.

It unlocked a really interesting bunch of videos which I also went through. Some of the technology is pretty nice. The segment about the Poseidon battle got me interested in playing it again to see how it looked. I'd forgotten how good it looked (a few beers in when I started) - very very impressed. I would guess they spent a lot more time on that than the last few bits of the game and it shows. Still either way, looking at the OpenGL api today I wondered how much effort and knowledge it took to turn it into something like that.

GT5 comes out tomorrow (25th here in Australia - as per usual one day behind the rest of the world), and if I get energetic I might wander down to a shop to grab it. Was a big fan of 3, not so much of 4 and somewhat disappointed in the 'hd' preview. Maybe I should wait for the reviews and the inevitable 'platinum'ning of it if it isn't much special. Hmm, apparently it still has screen tearing and frame-drops, most probably because of the rather idiotic idea to run at 1080p ... well that's a massive disappointment, to me that's about the most offensive mistake anyone can make with a video game. This entertaining partial review doesn't inspire confidence either ...

Tagged games, opencl.
Tuesday, 23 November 2010, 02:29

Bugs. The other kind.

My garden has been a bit under attack lately - I severely pruned some citrus so they are spouting wildly, I have a jungle of lettuce, and a few chilli and tomato plants starting to move.

None of this is particularly visible during the daylight but I've gone out a few nights (during the brilliantly bright full moon) to find out what's going to town on everything.

So here's a list of the bugs, pests and otherwise i've noticed in the garden lately.

Slugs

I've put out some snailbait so at least these aren't doing so much damage at the moment but boy there were a lot of them, some very sizable. I've had at least 15 killed in one large pot alone - no wonder the habanero seedlings kept disappearing. I might get one or two viable plants out of them, but they always grow so slowly ...

Slater Beetles

I don't know if these eat live things or just dead matter but there's some pretty big ones hiding in sheltered spots.

Earwigs

Seem to be everywhere, in large numbers. I was wondering what was eating the lettuce leaves since i'd put the snailbaits out and went out one night with a torch to see - whole lettuce leaves covered in dozens of the things eating big holes through them. And I also found them going to town on a lemon tree - doing a lot more damage than I expected which is more of a concern than the numerous lettuce. I've put out some beer traps with which i've had much success in the past but they don't seem to be going for them so much this year. So I resorted to a little fly spray just to help the leaves while they're very young although I don't want that to become a habit.

Citrus Leaf Eating Weevil

This was a new one. I've seen similar bugs hanging around the inside of the lettuce but not on citrus. I have a barely alive 'limequat' in a large pot which just sprang to life again a couple of weeks ago and I noticed something was hoeing into the rapidly advancing new leaves. One bug it seemed was doing all the damage. I'm keeping a close eye on this one since I fear this is it's last chance before it dies completely.

Aphids

For some reason they've only gone for the lemon tree so far but they're making a mess of that. There's an ant colony in the half-barrel the lemon is growing in so maybe that's why since they seem to farm the aphids.

Elder wood bugs

I hadn't ever seen these before moving to this house and have been waging war with them ever since. They thrive on leaf litter so one control measure is to clean that up. Eventually I found out a very weak solution of detergent worked well and eventually migrated from using a hand trigger spray to a pressure pump spray to a watering can to now just big buckets of slightly soapy water to try to get them. Only needs about a tablespoon of detergent for a 10 litre bucket and it's pretty devastating to ants too. I don't think i'll ever be rid of them but at least their numbers are kept in check if I keep doing it regularly.

Bees

I have some large coriander plants which have gone to seed - covered in large flower heads. These are doing a good job attracting bees although there are usually a few around here and there. One thing I noticed in Perth was a lack of bees - so much so it was a problem getting fruit to set - and it's nice to see that given the problems in other parts of the world the bees here are still quite numerous. There was even a swarm next door a few weeks ago.

Lady bugs

Even saw a couple of ladybugs around which are not that common. One reason I don't want to spray too much ...

Praying mantis

Well I saw one a few weeks ago. Nice surprise.

Possums

Blasted things keep running across my roof making a racket and hanging out in a large golden rain tree next to the house - generally smashing up the small stalks and making a mess. My roses this year are very spread out with long stems falling over (I didn't do a good job pruning I suspect) and one of the nicer ones broke in half. As a probably vain attempt to salvage it I put a couple of branches in some wet dirt, and the possums even ate the leaves off that while it was sitting on the ground. At least they don't do that too often.

Tagged horticulture.
Sunday, 21 November 2010, 01:52

Labels

There was a recent article in techradar suggesting that the Open source `community' doesn't exist.

Whilst I agree with the statement itself (or at least the way it is generally used), the article itself isn't much more than an ad hominem attack on 'open sauce' advocates. Basically suggesting that (unlike the rest of the IT world?) they're dumb like a flock of birds (or sheep?), and haven't grown out of the partisan arguments of the atari st vs amiga days.

Which is of course utter dingoes nuts. One just has to see the incoherent and emotional responses to any article suggesting the iphone isn't the best thing since sliced bread, or that the wii is only for kids, or that a microsoft xbox 360 is an unreliable piece of junk. This is just human nature. Apart from the sociopaths who like to provoke people for sport, anyone with an emotional and financial tie to something likes to make noise about attacks on their judgement.

Back to the issue of the `open source community'. The relevant definition of community is:

So can this be applied to advocates of open sauce software? Perhaps, but only in the broadest of senses such that is has little meaning. Like suggesting all salt-and-pepper haired men form some sort of a community. i.e. sure they exist, but that label tells you nothing particularly useful about them.

I suspect many that might accept the label of belonging to the 'open source community' might not even fully agree with the open source definition. For some it appears that somehow open sauce generates better quality software, for others it is the cheap labour, and yet others it is just a faux hat-tip to corporate social responsibility. So you effectively end up with factions or divisions, and it all quickly devolves into politics - which apparently the open saucers don't believe in.

Once you start labelling people you start dividing them and separating them from other parts society. Political parties or religions seem to almost exist as little more than a physical representation of their own labels (often utterly failing to 'practice what they preach'). With the labels themselves eventually becoming more important than the ideas they're supposed to convey - well demonstrated by the scene with the `People's Front of Judea' in the movie `The Life of Brian'. The labels don't mean much themselves but are a powerful tool for social and political division.

In the end it's only about one thing: politics.

So I agree - there is no such thing as an `open sauce community', but there are certainly plenty of `open sauce' advocates. And despite one of the founding issues behind open sauce claiming it is all about the code and not politics, once you have a group of people the politics comes along for a ride.

At least the free software movement acknowledges that the politics is there and that it does matter. I would also shy away from labelling those who advocate free software or belong to the free software movement with a general label of 'free software community' too even if they might have more of a coherent political face.

Things are always a lot more complicated than can be conveyed in a single label.


As an aside, reading through the open source definition linked to above one is left a little confused. The 10 point definition -- which doesn't stand on its own without the long-winded explanations -- seems a lot more complex than it needs to be - like some document from the UN or EU which tries to say what it means without offending anyone. Contrast this with the free software definition of 4 self-contained and concise points and the long descriptions filling out the `why' and not merely completing the `what'.

Tagged politics.
Thursday, 18 November 2010, 08:10

Reading numbers

I'm a little numerically dyslexic at times, but i'm starting to get a bit annoyed at people who can't seem to read phone numbers.

My phone number is one digit different to a local private girls school here in Adelaide, and at least a couple of times a week I get a call around 0830 intended for them. Mine has a sequence 834 and theirs has 833 in the same spot but the rest is the same. Maybe I should put a pointer in the voicemail message.

Today some guy called 3 times. Once, where he seemed to suggest the number he was calling wasn't actually my phone number, then immediately afterwards where I didn't pick up, and finally a good few hours later in the day just to say that he had the wrong number again.

Tagged rants.
Friday, 12 November 2010, 02:41

A shed of my own.

Shed's finally up. Makes me feel a bit more of a bloke to finally have my own shed. Previous houses have only had a garage at most.

Bit of a mess on the outside, just some temporary stormwater for the verandah.

Well finishing that lot should give me plenty to do this xmas, although it is yet to be seen whether I keep the momentum going or not.

Tagged house.
Wednesday, 10 November 2010, 08:59

OpenCL scheduling

I was playing around over the last couple of days with adding extra work queues to the OpenCL application i've been working on for work. Up until this point I was using a single queue referenced off a central 'context' object, which has worked ok, but I had to add some longer-running background processing steps which don't fit into the rest of the application.

I noticed one weird thing - I have two separate processes, one of which (say) takes 5 seconds to run, the other 6. If I run process 1 and 2 at the same time (on separate queues), process 1 takes about 6 seconds to run but process 2 blows out to 25 seconds. If I run two lots of process 1 then they both take about 10 seconds to execute.

I suspect it is because although they execute in about the same amount of time, process 1 is made of fewer steps and the scheduler is just alternating through the jobs in function-call sequence and so a lot more of process 1 gets run when process 2 is also active. Although it doesn't matter at this point it could be a significant problem in a 'real' application.

They are both run on a separate thread and throw out a lot of queue.finish()'s as well - mostly so it can detect user cancellation without queuing up too much work, but also because it seemed to run into resource problems if I queued up thousands of function calls at once (the over-all processing time is important but the interaction is more important at this point). So that also might be affecting the scheduling time. This is on NVidia.

I also found a bug in JOCL and filed another bug on the jogamp bugzilla - the 3rd JOCL bug there, and the 3rd i've filed myself. Hmmm.

Tagged opencl.
Saturday, 30 October 2010, 10:40

Video

Spent a few days this week ... gasp ... coding C++ on microsoft windows. Ugh. I don't really get paid enough for that pain, but I suppose it's bearable in very limited amounts (and being a professional, one just has to deal with it). I was looking at using directshow to get some images from a camera. No surprise - what a horrible shit, overcomplicated and poorly documented API. The bits I needed to use were removed from the microsoft windows 7 sdk too, and the published work around is to copy the headers from an older one ... sigh. Strangely enough the fastest way to look up functions on MSDN is to type it into the URL bar in firefox and let google find it; the bing link was slow slow.

Although it did force me to finally work out JNI. Which is fairly simple and straightforward and a bit easier than I thought it was. It is a little clumsy but not unreasonably so and in ways that seem to make sense. I think what normally makes it such a horrendous pain is 1. microsoft windows, and 2. ant.

It's a bit of a cold dreary wet weekend and I was still feeling a bit seedy from a (very) boozy Thursday night - not to mention having 2 packets of chips for dinner yesterday - so I just spent all day today hacking. I was thinking of doing some video image processing stuff but that seemed too much like work work so I played with DVB instead. Maybe I should've poked ImageZ a bit more.

Mucked about with a simple bit of code to record the transport stream and change channels, and using ffmpeg's libraries to play them. Very simple and pretty easy. Pity that's really the only easy bit - which is why i've always avoided playing with this stuff before. There's somewhat more to doing anything useful with it than just storing and playing video. Then I got sidetracked learning about the EPG they use in Australia - which is some horrid MHEG stuff, or EIT neither of which I could find much about. Along the way I tried a newer mythtv ... oh dear, that's got even more bloated. It has bits or extensions not only in everyone's favourite extension language of the month that I love to hate - python - but also perl and even more alarmingly, php.

Might need to get away from the screens and keyboards tomorrow.

Tagged hacking.
Monday, 18 October 2010, 07:08

Verandah

At last, the verandah is done.

The highest corner is 4.4m from the ground.

Next, the shed, drainage, electricity, shed floor, deck, rainwater tanks, paving, lawn ... ...

Tagged house.
Newer Posts | Older Posts
Copyright (C) 2019 Michael Zucchi, All Rights Reserved. Powered by gcc & me!