Home
Neomorphic's Journal
 
[Most Recent Entries] [Calendar View] [Friends]

Below are the 20 most recent journal entries recorded in Neomorphic's LiveJournal:

    [ << Previous 20 ]
    Friday, January 28th, 2005
    4:25 pm
    Can anyone think of a kick-self reason why using SSE instructions would be ten times slower than the equivalent 387 instructions, relating to build environment or hardware problems. I'm interpolating vectors using functions from
    [Error: Irreparable invalid markup ('<xmmintrin.h>') in entry. Owner must fix manually. Raw contents below.]

    Can anyone think of a kick-self reason why using SSE instructions would be ten times slower than the equivalent 387 instructions, relating to build environment or hardware problems. I'm interpolating vectors using functions from <xmmintrin.h>. I've looked at the assembly output, which is fine - six SSE instructions as opposed to eighteen 387 instructions, which is precisely what you'd expect. gcc-3.3.5, glibc-2.3.4.20040808-r1 linux-2.6.10-gentoo-r6. -march=athlon-xp -O3 (-ffast-math)

    I am most perplexed - last year almost-identical code ran fine...
    Saturday, December 18th, 2004
    1:16 am
    Efficiency of OO lookup tables
    I have accidentally started writing a simple 3D graphics engine.

    Currently I am writing in C. However my heritage is OO, so I have many files that look like this:
    typedef struct {
       ...
    } Object;
    
    Object *objectAllocate();
    void objectFree( Object * );
    
    void objectDoShit( Object *const, ... );
    

    Now I have several of my "objects" containing variable sized arrays of pointers to other "objects". So, to render all the Objects in a Model, I am saying something like:
    for( i = 0; i < model->nObjects; i++ )
       objectRender( model->objects[ i ] );
    

    where objects[ i ] is a pointer to an Object, so I am dereferencing twice. Since I am rendering using call lists this doesn't really matter here, but if I increase the complexity of the engine using the same approach dereferencing is going to be happening quite a lot. I can possibly reduce the amount of dereferencing at the expense of memory and code modularity by replacing arrays of pointers to objects with arrays of objects, but for this to have any benefit I have embed all my child functions in to their parents, otherwise I'd have to reference and dereference anyway.

    So my question is this: How efficient are the virtual lookup tables generated from C++ code when compared against the sort of approach I am using in C? If I continue writing in C then I am obviously making more work for myself, which I am loath to do unless there is some benefit. Does writing in C make one hardcore or just masochistic?

    It seems clear that the more modular code becomes, the more overhead is going to be generated, but is this really significant when weighed against everything else that is going on? If I render a spinning model in a 1600x1200 window, the framerate drops below my monitor's refresh rate, but the CPU is still not even being touched, so it would seem the GPU is what is going to be under strain.
    Tuesday, April 13th, 2004
    10:46 pm
    Whee! this is a post!

    Current Mood: accomplished
    Current Music: London After Midnight - Sacrifice [Live]
    Saturday, November 8th, 2003
    8:53 pm
    Argh, I can't believe I was that fucking stupid!!!

    I got my DNS restored from A&A, and Alex kindly agreed to host my server by sticking the disks in an old box on a phAt pipe. A server is basically just what's on the file system, after all, right? So I rebuilt the kernel to work with the hardware, and this week I dropped the disks off, along with a script I'd written to reconfigure absolutely everything network-related. Up myriad did not come. After rebooting it seemed to work, but none of the services came up. I had root SSH though, and spent some time tinkering before the BLINDINGLY FUCKING OBVIOUS hit me: Every single bit of software on that system is built using the march=athlon-xp optimisation! No wonder it doesn't do anything - it's a miracle it even boots at all!

    Back to the drawing board on that idea, I think. And it means even *longer* before I can get chronosfear.org.uk back up again. Grrrr, damnit. I feel so fucking retarded.
    Friday, September 26th, 2003
    4:23 am
    Has MDI gone out of fashion?
    I reopened the KLapJack code a few days ago. After removing a few trivial bugs, I decided on trying to do something I've been thinking about doing with it for a while, which is to implement a kind of light-weight MDI. It doesn't really need it, but it should get rid of all the messy hacks currently involved in communicating between and syncing the various components. Mainly I just thought it would be fun to play MDI.

    So I went to get out the instant MDI creator (yeah, I know), only to find there wasn't one! What there was instead created an app with multiple instances of an SDI communicating over DCOP. All well and good but useless for my purposes. I've managed to dig out some reference MDI stuff, which I can use as an example to build what I want for KLapJack, but thinking about it, MDI seems to be going out of fashion in general. MS Office & OpenOffice both use multiple SDI. I can think of quite a few apps in which the "document" windows are actually detachable, and can be swapped freely between running instances of the application. Is there some general principal behind this, is it something people do because they can, or is it just a function of the fact that it is now fashionable to have applications grouped by type on the task bar?
    Thursday, September 18th, 2003
    11:20 pm
    TLD wildcard listing
    for dom in `curl -s ftp://ftp.internic.net/domain/root.zone.gz \
     | gunzip -c | grep NS | awk '{print $1}' \
     | uniq | egrep "^[^\.]*\.$"`; do
       Y=`dig *.$dom | egrep ^[*]\.$dom*A | awk '{print $5}'`
       if [ "$Y" ]; then echo $dom $Y; fi
    done
    
    dig: '*..' is not a legal name (empty label)
    MUSEUM. 195.7.77.20
    AC. 194.205.62.122
    BZ. 216.220.34.101
    CN. 159.226.7.162
    COM. 64.94.110.11
    CX. 219.88.106.80
    MP. 202.128.12.163
    NET. 64.94.110.11
    NU. 64.55.105.9 212.181.91.6
    PH. 203.119.4.6
    SH. 194.205.62.62
    TD. www.nic.TD.
    TK. 195.20.32.86 195.20.32.83
    TM. 194.205.62.42
    TW. 203.73.24.11
    WS. 216.35.187.246
    CC. 206.253.214.102
    

    tee hee :-)
    Wednesday, September 17th, 2003
    4:27 am
    OpenNIC
    after the Verisign outcry earlier on, I did some reading and am now using OpenNIC for DNS services. rar rar rar. Anyone with left-wing and geeky tendancies should have a look *g*. This not only gives me access to the OpenNIC namespace and regular InterNic namespace, but also to various other lesser-known namespaces (where, it turns out, .porn was registered a *long* time ago). This doesn't actually stop null .com and .net addresses resolving to verisigns ad site, mind, but it's a lot of fun - I may well put up some OpenNIC only stuff at some point. Let the uber-geekery commence :-)

    Also had a look at my own DNS in the process - chronosfear.org.uk had been failing zone-transfers :-(. Fixed this now, and the result was instant replication of beta.chronosfear.org.uk, as well as the previously-problematic http://chronosfear.org.uk/, which is now working. myriad, www, beta, mail, and chronosfear.org.uk itself now all point to the same IP, taking the number of IPs consumed by myriad down to 2 (the other being for 'users').

    Finally got round to publishing my root CA crt file online as well. I may well update the host-level crts soon now that I've done this *g*

    So all in all, a productive night, from a geeky standpoint. None of this is going to help me get up in the morning, though...
    Monday, September 15th, 2003
    6:44 pm
    Kopete 0.7.2
    Ha ha, Kopete 0.7.2 supports the new MSN messanger protocol! yippee! Ya-boo-sucks to MS and their idea of trying to get formal agreements out of client developers ( s/formal agreements/blood money/ ). It is my considered opinion that Kopete rules so I tend to advocate it lots *g*
    Saturday, September 6th, 2003
    4:28 am
    this evening I have written a windows front end to some quake3 map compilation utilities in C++, at the behest of Rob. First MFC stuff I've done in ages, not *so* bad once I got in to it. I've got it parsing a .ini file - I'll do the quoting tomorrow maybe. I have called the program BigleMap :-)
    Thursday, August 21st, 2003
    3:46 am
    bridging problem (or "because I won't rtfm")
    <--network1--\
                  \       -----------
                   -----A-|         |       --------------
                          | citadel |-C---D-| adsl_modem |-E--->> ISP
                   -----B-|         |       --------------
                  /       -----------
    <--network2--/


    A & B are IPs on two seperate real /29 networks. C & D are addresses in the reserved network 192.168.1.0/24 (in order to telnet adsl_modem from citadel)

    Currently, my external address is assigned to E, and packets are routed. To set up bridging my external address should be assigned to C instead, leaving E unassigned then adsl_modem acts as a bridge between D and E.

    routing on citadel would be as follows:

    network1 - A
    network2 - B
    192.168.1.0/24 - C
    default - C

    is it OK just to route packets out via device C without specifying a gateway IP? what is the difference between llc bridging and vcmux bridging? is there anything else I should be aware of? assuming I have all this correct, there is still the nasty matter of the ill-documented adsl_modem's CLI...
    Thursday, August 14th, 2003
    2:58 am
    out of interest, I checked my firewall logs to see how many times this RPC worm had been intercepted:
    citadel / # cat /var/log/kernel/log-2003-08-13-16\:19\:59 | grep "chr-in>" | grep "DPT=135" | wc -l
        285
    citadel / # cat /var/log/kernel/log-2003-08-13-16\:19\:59 | grep "chr-in>" | grep -v "DPT=135" | wc -l
        272
    

    over 50% of all blocked incoming connections! (ok other things attack that port but there is a massive rise in rate of connection attempts)
    Tuesday, August 5th, 2003
    4:25 am
    Rar, Kopete 0.7 is out!!! No more having to use shitty ymessenger :-) Also handles IRC much more nicely than the old version did. a few bugs, but nothing to worry about in normal operation. *bounce* *perk*
    1:46 am
    Haskell
    Having now spent a good few Sundays listening to Andrew's ideas about functional programming, I decided to finally have a look myself, in the hope of displaying better understanding next time arround. So this afternoon I took a look at Haskell. I've got some tutorials and reference material, and I've managed to write an ascii/binary (and vice versa) translator, so I must be doing something right :-) Compared to the ascii/binary translators a few of us wrote in C a few months back for this little joke, the simplicity is amazing. A *very* mathematical language indeed. Also worthy of note, any invalid definition results in a value of (_|_), known as "bottom".
    Thursday, July 17th, 2003
    12:48 am
    KLapJack 0.6.2
    bugfix and minor feature update since 0.6 (& 0.6.1, which I won't go in to *g*). klapjack.sourceforge.net to grab the latest version.

    0.7 shouldn't be too long off, which will include all the features I want for 1.0. Once this proves stable, I shall have a big 1.0 celebration party :-) (or at least, a rest *g*)
    Tuesday, July 8th, 2003
    4:44 pm
    KLapJack 0.6.1
    bugfix on 0.6, + cancel facility added everywhere network communication occurs. source available from klapjack.sourceforge.net.

    KLapJack now includes history browsing/editting, friends editting (with partial group editting support), LjConsole, XMMS music detection, multiple tabbed login (this feature is invisible if it is not used), unicode, custom posts.
    Sunday, July 6th, 2003
    12:12 am
    rar. following the advice of a friend, I reworked the exchange mechanism using an http class rather than using a socket and doing it myself. much simplification there. also removed most of the type-specific code from the data stuff by making pure virtual cast functions in the base class, which means I can now do value = *data[ key ] without worrying about datatype or memory allocation problems. I have added a static counter to the abstract base class and, despite my reservations about unhiding pointers, none of the objects are getting lost.

    none of this is really needed to make the thing work, but it is still satisfying to do something properly.

    now, time for slimelight...

    Current Mood: pleased
    Friday, July 4th, 2003
    11:09 pm
    KLapJack 0.6 released
    and not before time. 0.6 includes a friends editor and the LiveJournal console. The friends editor allows you to set friend groups for your friends, and also allows you to update the colours for all your friends simultaneously, a feature notably lacking from many clients.

    I would like comments about useability - since the beginning I have gone for simple, minimal design, without any "helpful" embelishments, as this is what I personally prefer. I am wondering whether such embelishments may be useful in certain places, particularly when aiming for a wider audience. Things such as "this is probably stupid, are you sure?" notices might not go amis.

    KLapJack is now 1 release away from 1.0, which will include full group editting capabilities.

    Current Mood: pleased
    Saturday, June 21st, 2003
    7:41 pm
    rar, finally some success with the new backend on KLapJack. free of the constraints imposed by the old system, I have got lj-console working nicely. The new system is, in fact, vastly more efficient than the old one ever was (though to be fair, the old data structure was *hideously* inefficient) - not that it matters for the ammount of processing involved, but still it is more satisfying to write something vaguely decent.

    I have also taken out the signal/slot stuff from the various dialogs, and put it in an abstract base class. Apart from being a good idea anyway, this has the result that the Qt Meta Object Compiler only needs to run on one class, instead of a half dozen or so, which should cut the compile time down considerably :-)

    Current Mood: pleased
    Tuesday, June 17th, 2003
    6:31 pm
    arse bollocks wank 2 - return of the butt-plug
    I have been fearing this might happen for some time now. As a short cut in writing the data structure, I seperated the various data types out and dealt with them each individually. Now I find that the particular command I am working with returns data that is nested in a way that my class does not cope with, and so the required data ends up missing. I am going to have to rewrite it.

    I am getting annoyed with the length of time KLapJack is taking me. It should be finished by now. It would certainly have taken only half as long had I not had to redo several things. Grr.
    Thursday, June 12th, 2003
    6:57 pm
    hm, I have samba/ldap working. wasn't actually too hard, but documentation is sparse. However, still disatisfied I am going to see if I can make samba 3 work now, otherwise I'll have to change everything later which would be annoying.
[ << Previous 20 ]
About LiveJournal.com