Slashdot Mirror


User: K45

K45's activity in the archive.

Stories
0
Comments
34
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 34

  1. PalmOS Requirements on Python Painfully Ported to Palm; Plan is "Peer-to-Peer" · · Score: 3

    In the README they say "There is a GUI problem with PalmOS 3.0 that we are investigating", and at startup it warns me that I don't have at least PalmOS 3.5, but I just wrote some trivial code in and so far I haven't seen any problems with running it on 3.0.

    Anyone discover what the issues with 3.0 are yet? Anyone dare try some serious recursion?

    K45

  2. Nice license agreement. on Python Painfully Ported to Palm; Plan is "Peer-to-Peer" · · Score: 2

    So my first question was: "What license is this released under?".

    It's released under the "Pippy Open Source License Agreement Version 1", which looks like it'll pass the usual Open Source and Free Software tests. Here's the key part:

    2. Subject to the terms and conditions of this ETI Pippy License Agreement, ETI hereby grants Licensee a non-exclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use the Software alone or in any derivative version, provided, however, that the ETI Pippy License is retained in the Software, alone or in any derivative version prepared by Licensee.

    The rest is just the usual NO WARRANTY and such.

    K45.

  3. kpackage? on Ximian's Red Carpet Released · · Score: 2

    What does this do differently than kpackage?

    I'm not trying to troll here, I really would like to know.

    K45.

  4. The other software.. on Bungie's Marathon Infinity on Linux · · Score: 2

    You'll likely need to download more than what's linked to above.

    Try here instead (unless it gets slashdotted):
    http://www.uni-mainz.de/~bauec002/A1Main.html

    K45

  5. Re:Did anybody else think of... on Sourceforge + Hardware = OpenH? · · Score: 1

    Actually, I was thinking of OpenHentai.

    Yeah, we're all perverts.

    K45

  6. Oops... on Death of the P2P net Predicted! Film at 11! · · Score: 1

    I think you just produced a piece of content by accident.

  7. Decoder in Python on Digital Convergence Changes EULA, and Gets Cracked · · Score: 1

    Here's a Python implementation of the decoding algorithm. It's a little rough around the edges, but it works (hey, this is my first shot at learning Python).

    This decoder is a bit different than the others I've seen, in that I put an emphasis on human-readable output.

    Also, I've tested this with two different scanners, and each scanner obviously sends its own ID along with each barcode scanned (I think we already knew this, but I've now confirmed it).

    Oh, one more thing.. It should be pretty easy to make this into a CGI script. <grin type="evil"/>

    Happy scanning :)

    #!/usr/bin/python

    # Reads input from a :Cue:CAT and displays the barcode in human-readable
    # form. Simply start the script and scan a barcode.
    #
    # Written by Nathan Walther <kas@devzero.org>, September 2000
    #
    # Copyright 2000 Nathan Walther
    # This program is free software under the terms of the GNU General Public
    # License, with absolutely no warranty.
    #
    # Thanks to...
    # Joshua Garvin, for providing a very well-documented decoder in VisualBasic
    # Stu, for pointing out the obvious (periods are the field seperators)
    # And the people who gave me their :Cue:CAT readers.

    import string

    # The base64 mapping of ASCII characters to numeric values
    # There is a Python module for this, but I'd rather implement the
    # whole algorithm here, to help others see how it works.
    map64 = {
    'a':0, 'b':1, 'c':2, 'd':3, 'e':4, 'f':5, 'g':6, 'h':7, 'i':8, 'j':9,
    'k':10, 'l':11, 'm':12, 'n':13, 'o':14, 'p':15, 'q':16, 'r':17, 's':18, 't':19,
    'u':20, 'v':21, 'w':22, 'x':23, 'y':24, 'z':25,
    'A':26, 'B':27, 'C':28, 'D':29, 'E':30, 'F':31, 'G':32, 'H':33, 'I':34, 'J':35,
    'K':36, 'L':37, 'M':38, 'N':39, 'O':40, 'P':41, 'Q':42, 'R':43, 'S':44, 'T':45,
    'U':46, 'V':47, 'W':48, 'X':49, 'Y':50, 'Z':51,
    '0':52, '1':53, '2':54, '3':55, '4':56, '5':57, '6':58, '7':59, '8':60, '9':61,
    '+':62, '-':63 }

    def decode(input):
    'Takes a component of the scan text, and returns it in human-readable form.'

    # Process blocks of 4 6-bit values
    block_list = []
    i = 0
    block = 0
    shift = (18, 12, 6, 0)
    for char in input:
    if map64.has_key(char):
    block = block | (map64[char] << shift[i])
    i = i + 1

    # One block of 4 values completed
    if i == 4:
    block_list.append(block)
    i = 0
    block = 0
    else:
    print 'Unexpected character:', char
    # Check for leftovers
    if block > 0:
    block_list.append(block)

    # Convert each block of 24 bits into 3 8-bit values
    byte_list = []
    for block in block_list:
    for offset in (16, 8, 0):
    byte_list.append((block & (0xFF << offset)) >> offset)

    result = ''
    for byte in byte_list:
    dec = (byte ^ 67) - 48 # Get one decimal digit (48 is ASCII 0)
    if dec < 0 or dec > 9:
    print 'Unexpected value:', dec
    else:
    result = result + `dec`

    return result

    # Read a line of text as if it came from the keyboard
    scantxt = raw_input('Scan: ')

    # Split scan text into its component parts
    prefix, scanner, type, barcode, suffix = string.split(scantxt, '.')

    # Prefix should be two escape characters followed by '[21~'
    # Suffix should just be ''
    # TODO verify the prefix, suffix, and number of parts

    # Print human-readable output, with nice formatting
    print
    print 'Device Number: ' + decode(scanner)
    print
    num = decode(barcode)
    if type == 'fHmc':
    print 'Barcode Type: UPC-A'
    print 'Manufacture: ' + num[0] + '-' + num[1:6]
    print 'Product: ' + num[6:11]
    print 'Checksum: ' + num[11] # TODO compute expected checksum
    elif type == 'cGf2':
    print 'Barcode Type: ISBN and price'
    print 'ISBN: ' + num[3] + '-' + num[4:9] + '-' + num[9:12] + '-' + num[12]
    currency = num[13]
    if currency == '9':
    currency = 'Unspecified'
    elif currency == '5':
    curreny = 'US Dollars'
    elif currency == '6':
    currency = 'Canadian Dollars'
    else:
    currency = 'Unrecognized'
    print 'Currency: ' + currency
    print 'Price: ' + num[14:16] + '.' + num[16:18]
    elif type == 'cGen':
    print 'Barcode Type: ISBN'
    print 'ISBN: ' + num[3] + '-' + num[4:9] + '-' + num[9:12] + '-' + num[12]
    elif type == 'fGj2':
    print 'Barcode Type: Paperback (?)' # TODO confirm this and get more info
    print 'ISBN: ?-???-' + num[12:17] + '-?'
    print 'Price: US $' + num[7:9] + '.' + num[9:11]
    elif type == 'aabI':
    print ':Cue: ' + num # TODO figure out the format of these beasts
    else:
    print 'Unrecognized Barcode: ' + num

  8. Interviews go both ways on Non Disclosure Agreements in Interviews? · · Score: 1

    I work as a software engineer at a startup company, and our interview process tends to go like this:

    1. Have a phone interview to talk about their qualifications.
    2. Bring the candidate to the company and talk about our qualifications.

    In interview 2, we are getting more information about the candidate's skills, but more importantly we're giving the candidate a chance to interview the company and meet the people they might work with. At this stage, we ask for an NDA. The candidate may refuse, but if so the interview will be completely one-sided: we ask about their experience, they hear nothing solid about what the position entails.

    So, if you don't care about the position you're applying for, then tell them where they can put their NDA (in the shredder). But, if you want to know every last detail about what you're getting yourself into, then the NDA is a good thing. An NDA only becomes an asshole thing to do if the interviewers make you sign it, but then still don't tell you anything useful about the company.

    Kas.

  9. Re:Make a MUD on Ideas for High School Computer Projects? · · Score: 1

    Yes, make a MUD!

    I wouldn't have them write a mud from scratch, but rather setup an LPMUD for them and let the students have at it. Some of the other posts have suggested assigning the students to various management positions, and this also works very well in a mud setting; some students can manage the domains in the game, one can be in charge of quality control, and so on.

    Personally, I was able to get a good intuitive grasp on object-oriented programming as a result of my work in LPC, and it definitely made my jump from Pascal to C++ much easier.

    As a side bonus, your students will likely improve their creative writing skills as they write room descriptions. Yet another side bonus is that the creative outlet of a mud can be very healthy for "troubled teens".

    Kas.