[os@livejournal:/home/os]$ finger orangesquid
Login: os Name: orangesquid
Directory: /home/os Shell: /usr/bin/lj
Last login on ttyLJ from arpa
Project: orangesquid.net
Please see the disclaimer.
[ tail ] [ ls ~os/ ] [ ls /home/ ]

Viewing 0:-25 recorded in orangesquid's LiveJournal:

    [ << item -= 25 ]
    (Thursday) 13 November 2014
    (write )
    (Thursday) 6 March 2014
    pseudo-base-prime as a field schema
    If we take the additive identity as {}, the multiplicative identity as {1}, define addition as vector addition, and define multiplication via the squid operator (see previous posts), we can define a field (actually, a schema that accomodates a countably infinite number number of fields):
    First, addition is associative and commutative, as it is just vector addition.
    If we allow the exponents of the base-P number to be integers instead of just 0 or a natural number, we can have negative exponents,
    such that {a,b,c,...} has a unique additive inverse {-a,-b,-c,...}. This also gives closure under addition.
    For a multiplicative inverse, we have to allow at least one exponent to be a real number. In order to have unique multiplicative inverses, we must set some restrictions: only one specific exponents can be a real (the rest must be integers)---so, we could have a field using {R,Z,Z,Z,...}, a field using {Z,R,Z,Z,...}, a field using {Z,Z,R,Z,...}, etc. Thus, we have a schema and can definite a countably infinite number of possible fields from this.
    It's probably also possible to set other restrictions, such as allowing only one (but any one exponent) to be a real, so that for {a,b,c,d,...}, only one of a,b,c,d,... is a real, and the remaining are integers. Another thought would be to define a restrictive relationship such that more than one exponent could be non-integral but still maintain unique multiplicative inverses. I haven't explored this, but it may be possible to construct an uncountably infinite number of possible restrictive relationships (since I suspect the relationships would have to be equalities or inequalities of a form such that one of the constants in the relationship is a real number, giving an uncountable infinite number of possible equalities/inequalities).
    So, if we define our field to have {R,Z,Z,Z,...}, the multiplicative inverse {b,0,0,0,...} for A={a1,a2,a3,a4,a5,...} would be (I believe -- I tested it for a few simple cases, namely {1}, {0,1}, and {1,1}, but I think it could be proved to be a general case) {log(2)/(a1*log(2)+a2*log(3)+a3(log(5)+a4*log(7)+a5(log(11)+...),0,0,0,...}.
    The only thing remaining is distributivity:
    Recall what squid(a,b), our multipicative operation, produces for {a1,a2,a3,...} and {b1,b2,b3,...}:
    It is (I think) {a1*b1,a2*b1+a1*b2,a3*b1+a2*b2+a3*b1,...}.
    If we want to test (c+d)*b = c*b+d*b, let a={c1+d1,c2+d2,c3+d3,...}.
    Then the left-hand side would be {c1*b1+d1*b1,c2*b1+d2*b1+d1*b2+c1*b2,c3*b1+d3*b1+c2*b2+d2*b2+c3*b1+d3*b1,...}
    The right hand side is {c1*b1,c2*b1+c1*b2,c3*b1+c2*b2+c3*b1,...}+{d1*b1,d2*b1+d1*b2,d3*b1+d2*b2+d3*b1,...}, which we see to be identical
    once the two lists undergo the additive operation.
    (Saturday) 1 March 2014
    baseprime tarball available
    This will probably just be easier.
    Tarball available of all code at udel and funkykitty.net. (well, funkykitty is giving me a 403.. I'll have to fix that) --
    Also at vaxpower which is a working link.
    seeing a base-prime binary tree
    I know this requires python2 or higher as well as bash3 or higher. Not sure about the other requirements, but my system has python-2.6.6, sage-4.6.1, graphviz-2.26.3, and bash-4.1.7(2)-release.
    code snippetCollapse )

    Here's the output from ./baseprime-bintree 6 -Tpng -obinarytree.png

    binary tree(view full size)

    (write )
    (Tuesday) 25 February 2014
    (write )
    (Monday) 24 February 2014
    (Sunday) 23 February 2014
    pseudo-base-prime part...5?
    More base-prime stuff.  I extended the bc code; there are function names matching the HP User-RPL programs, and the size of the array is stored as element 0
    (Excluding a row/column pair; then it's the row in element 0 and the column in element 1)
    code for bcCollapse )
    Some new developments, too... run-length encoding, and converting a base-prime number to a binary string (which can in turn be evaluated as a normal number, for further pattern-finding)
    code for hp49g+Collapse )
    (Saturday) 5 October 2013
    October 7 th is the first international trigeminal neuralgia awareness day. Please visit www.tnnme.com to learn more.
    (Friday) 31 May 2013
    (write )
    (Tuesday) 30 October 2012
    Things I'd rather experience than have to keep feeling trapped in this disgusting male body
    1. Pancreatitis for the rest of my life
    2. Watching loved ones suffer and die 
    3. Losing the ability to communicate with the world
    4. Be in car accident after car accident after car accident
    5. Not be able to breathe
    6. Being friendless
    7. Constant nausea and vomiting
    8. Being cold all the time and sleeping in a park
    9. Severe akithisia
    10. Being confined to a psych ward for the rest of my life
    (Friday) 17 February 2012
    (write )
    (Monday) 27 December 2010
    web-scraping script for cacti (or anything, really) modified for motorola surfboard 5120 (since comcast "helpfully" disables snmp)...
    surfboard5120.plCollapse )
    (Saturday) 27 November 2010
    So I have this bottle of Kraft Original Barbecue Sauce. A label on the neck says "Better Tasting!" Better tasting than what? It doesn't say "other brands", "other sauces", nor anything at all, for that matter. When "better" is used without an explicit referent, it typically implies something is better than before; e.g., if you've been sick, afterward you'd say, "I'm better." So, if this is Kraft's *ORIGINAL* barbecue sauce, but it's "Better Tasting," . . . I guess before an "original" of some sort, there is nothing of that sort. I guess they mean that it tastes better than when Kraft didn't sell barbecue sauce, so people squirted out absolutely nothing all over their steaks?
    (write )
    (Monday) 8 November 2010
    pseudobase-prime and the squid operator, revisited
    required reading
    gnu-bc implementation for the squid() operator follows:

    Read more...Collapse )

    Yes, it really does construct a sieve of eratosthenes each time, and you do have to manually have to track the upper bound of how many primes to use in the table (returned from num2p, passed into p2num). It's just a quick hack, but I think it's still faster than the shell script version (see "required reading" link).
    (write )
    (Wednesday) 20 October 2010
    wireless status display in pork aim client
    pork (a console AIM client) has no built-in support for displaying whether a user is on a mobile device or not. This can get rather frustrating.
    I wrote a patch against pork 0.99.6 (the version I was using.. I don't have a patch that works against, the latest version, yet) that will display a "flags:" line in the /whois (which shows the symbol []' to represent a box with an antenna) and will convert the first asterisk found in the TEXT_BUDDY_{ACTIVE,AWAY,IDLE} strings (used in displaying the buddy list) to a dash. It's crude and needs improvement, but it's very useful. (It was a quick hack!) Unified diff follows...
    sed 's/&/&amp;/g;s/</\&lt;/g;s/>/\&gt;/g;s/"/\&quot;/g' < /usr/src/pork-wireless.patchCollapse )
    (Saturday) 2 October 2010
    it's handy to have a slackware rc.d file to fsck+mount xfs and jfs partitions referred to by LABEL= in fstab, esp. loopback.
    rc.fsck2Collapse )
    (write )
    (Saturday) 4 September 2010
    need gnome-panel on slackware13.1?
    since slackware is now kde-centered, if you need the basic gnome libs, you'll have to know which ones are roughly the latest that can be compiled with the included libgobject etc. well, here's the list!

    for slackware64, unless otherwise noted, everything is built with: LDFLAGS="-L/usr/local/lib64 -L/usr/lib64" ./configure --libdir=/usr/local/lib64 && make

    not strictly necessary, but i needed it: imlib2 1.4.4
    you also probably won't need this: ORBit 0.5.17

    ORBit 2.14.18
    GConf 2.31.1
    probably wasn't needed: gnome-mime-data 2.18.0
    gnome-mime-data 2.0.1
    gnome-vfs 2.24.3
    libbonobo 2.24.3
    libcanberra 0.25 additional ./configure option: --with-builtin=alsa
    libgnome 2.31.0
    libtasn1 2.7
    maybe not needed: gnome-keyring 2.29.92
    libgnomecanvas 2.30.1
    libbonoboui 2.24.3
    almost surely unneeded: gnome-keyring 2.30.0
    gnome-keyring 0.8.1 additional configure options: CPPFLAGS=-D_GNU_SOURCE
    libgnomeui 2.24.3
    scrollkeeper 0.3.9 (a later version of this is needed, actually; see below)
    gnome-desktop 2.31
    gnome-menus 2.30.2
    libproxy 0.4.6 build on slackware64-13.1 with: cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DLIB_SUFFIX=64 -DCMAKE_EXE_LINKER_FLAGS:STRING=-L/usr/lib64/firefox-3.6.3 -DCMAKE_C_FLAGS=-L/usr/lib64/firefox-3.6.3 -DCMAKE_CXX_FLAGS=-L/usr/lib64/firefox-3.6.3 && make
    build on slackware-13.0 with (probably): cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_EXE_LINKER_FLAGS:STRING=-L/usr/lib/firefox-3.5.2 -DCMAKE_C_FLAGS=-L/usr/lib/firefox-3.5.2 -DCMAKE_CXX_FLAGS=-L/usr/lib/firefox-3.5.2 && make
    libsoup 2.31.6
    libgweather 2.30.2
    scrollkeeper 0.3.14
    gnome-panel 2.28.0 additional configure flags: CPPFLAGS=-I/usr/local/gnome-desktop-2.0

    The acid test for this was building xnee-3.06, which has a gnome-panel--based component, gnee, that built and ran successfully, on slackware64-13.1.
    (Thursday) 2 September 2010
    the joys of x2x
    I now have x2x extending the desktop on anisotropy to sheripc (key+mouse now off of the desk, saving space!). It's really neat. x2x compiled cleanly with xmkmf -a && make. I have a few helper scripts... stuff on anisotropyCollapse )
    (write )
    (Monday) 19 July 2010
    xa_primary, xa_clipboard, and xa_cut_buffer0
    If you haven't read about selections and cut-buffers, at least take a look at the overview on wikipedia.

    I've been wondering why some apps do the things they do for quite some time, and I think I'm beginning to understand a little better why now, after a few observations:
    gtk+1 hilite    primary+clipboard                 
    gtk+1 getclip   removed from primary,clipboard
    gtk+1 getprim   still on primary+clipboard
    gtk+1 unsel     still on primary+clipboard
    gtk+1 midclk    paste from primary
    gtk+2 hilite    primary+clipboard                 
    gtk+2 getclip   removed from primary,clipboard
    gtk+2 getprim   still on primary+clipboard
    gtk+2 unsel     removed from primary+clipboard
    gtk+2 midclk    paste from primary  
    xterm hilite    primary+clipbard+cb0             
    xterm getclip   removed from primary,clipboard, auto-unsel
    xterm getprim   still on primary+clipboard+cb0
    xterm unsel     removed from primary+clipboard
    xterm midclk    paste from primary
    motif hilite    primary+clipboard+cbrotate+cb0
    motif getprim   still on primary+clipboard+cb0
    motif getclip   removed from primary+clipboard, auto-unsel
    motif unsel     removed from primary+clipboard
    motif midclk    paste from primary if avail, else cb0

    More observations to come... fltk, Qt, etc, whenever I get the time. For now, this is all I need to cut+paste code snippets without headaches...
    You'll need xsel to read XA_{PRIMARY,SECONDARY,CLIPBOARD} and xcb to read XA_CUT_BUFFER[0-7].
    Be careful when reading XA_CLIPBOARD!
    If you want to write to XA_{PRIMARY,SECONDARY,CLIPBOARD,CUT_BUFFER0}, get xclip.
    Don't forget three useful tools are xcutsel, xclipboard, and xcb (in GUI mode). The first two are in about every distro (or at least easy to find).
    (write )
    (Sunday) 11 July 2010
    Some of doxygen's integration with graphviz [dot] requires the epstopdf package from CTAN. I made a quick little script to install it:
    Read more...Collapse )
    (write )
    500gb drive on ali15x3
    I have a 500gb drive on an old machine (BIOS doesn't like drives more than a few gigs... 8.5gb limit maybe?), and linux kernel 2.6.10 has issues reading it...
    Read more...Collapse )
    (write )
    (Thursday) 3 June 2010
    5 things i love about my sheri
    1) she always tries to help people
    2) she's a good listener
    3) she has a pretty smile
    4) she always wants to make me happy
    5) she has a way with animals
    (write )
    (Sunday) 30 May 2010
    pork auto-sign-on
    I made perl script that automatically signs on your accounts (assuming you have passwords saved), and a bash script to get pork, an AIM client for unix, to load the perl script on startup.

    ~/.pork/pork-runCollapse )

    ~/.pork/porkrc-perlCollapse )

    ~/.pork/scripts/autosignon.plCollapse )

    This was needed because LOGIN_ON_STARTUP seems to be broken, at least with multiple screen names.
    (write )
    (Saturday) 29 May 2010
    lilystcyr has had an emotional week.. everyone go give her hugs! =)
    (write )
    (Wednesday) 5 May 2010
    quick obligatory hack
    the color survey results from the author of xkcd are in, and since the most common 954 colors have been made available in a line-by-line text format, X11's rgb.txt was just *begging* to be replaced. since this was a quick, obligatory hack, i had to do it...

    this script requires bash3 for array parameter expansion. (unfortunately, i did not have a recent enough bash for ${VAR[@]^?}, else i could have combined that with ${VAR[@]#?} and maybe have avoided awk, staying entirely within a bash script--oh well). fortunately, you don't have to worry about running it yourself, if you don't want to, as i've included the output.

    step 1: wget http://xkcd.com/color/rgb.txt
    step 2: create rgb2rgb, then chmod 755 rgb2rgb ; ./rgb2rgb < rgb.txt > X11-rgb.txt
    rgb2rgbCollapse )
    step 3: cp /usr/share/X11/rgb.txt X11-rgb-old.txt ; sort X11-rgb-old.txt X11-rgb.txt|uniq -f3 > X11-rgb2.txt
    step 4: sudo cp X11-rgb2.txt /usr/share/X11/rgb.txt

    haha, no, do not actually do step 4. zero bugtesting has gone into this.
    for reference, here is the output of rgb2rgb, pre-sort-uniq, for combining with your local X11's rgb.txt:
    X11-rgb.txtCollapse )

    [anyway, back to the project at hand...]
[ << item -= 25 ]
[os]   About LiveJournal.com