×

Announcing: Slashdot Deals - Explore geek apps, games, gadgets and more. (what is this?)

Thank you!

We are sorry to see you leave - Beta is different and we value the time you took to try it out. Before you decide to go, please take a look at some value-adds for Beta and learn more about it. Thank you for reading Slashdot, and for making the site better!

Comments

top

MIT Unifies Web Development In Single, Speedy New Language

MemeRot Re: Spaghetti (194 comments)

Agreed. If the site was developed in it/web I'll pass. It's easy to avoid browser problems by making everything look like is 1996

about 1 month ago
top

Scientists Say the Future Looks Bleak For Our Bones

MemeRot Re: No, I refuse to believe this nonsense (115 comments)

"It never comes true and it never is going to come true.". It apparently happened 12,000 years ago

about a month ago
top

Scientists Say the Future Looks Bleak For Our Bones

MemeRot Re: Lazy farmer (115 comments)

"pinpoints the origin of weaker bones at the beginning of the Holocene epoch roughly 12,000 years ago, when humans began adopting agriculture". This doesn't have anything to do with tractor farming.

about a month ago
top

Ask Slashdot: Is an Open Source .NET Up To the Job?

MemeRot Re: Its all about THE CLOUD (421 comments)

You can spin up Windows servers and sql server instances in AWS. And other commercial products, like HANA. So cloud providers certainly do track licenses. It's baked into the price you pay for those instances.

about a month ago
top

Ask Slashdot: Is an Open Source .NET Up To the Job?

MemeRot Re: MS has been late to every recent tech movement (421 comments)

Why are you locked in? If you have web services calling web services it doesn't really matter what a web service is written in. There are some nice .net platforms that don't come from MS, like ServiceStack or Nancy. Even the MS Mvc.Net platform is mono compatible (and was already open source) so you can run Linux with docker running 6 instances of your service.

about a month ago
top

Ask Slashdot: Is an Open Source .NET Up To the Job?

MemeRot Re: Why bother? (421 comments)

I didn't realize you didn't have to declare runtime errors, sorry.

about a month ago
top

Ask Slashdot: Is an Open Source .NET Up To the Job?

MemeRot Re: MS has been late to every recent tech movement (421 comments)

Depends on what you mean. We don't use linq to sql because you're not sure of the sql you'll generate. Linq to objects is quite nice. Joining two lists of objects in memory automatically rather than writing your own low level code to copy things over is awesome.

about a month ago
top

Ask Slashdot: Is an Open Source .NET Up To the Job?

MemeRot Re: Why bother? (421 comments)

Because you know ahead of time all the possible things that can go wrong in your method?

about a month ago
top

Ask Slashdot: Is an Open Source .NET Up To the Job?

MemeRot Re: Why bother? (421 comments)

C# can compile to android apps and ios apps now too. It's not just a server world any more.

about a month ago
top

Ask Slashdot: Is an Open Source .NET Up To the Job?

MemeRot Re: Why bother? (421 comments)

Visual studio, xamarin studio, and some of the java IDEs are in the latest jolt ide awards. They're all generally recognized as good.

about a month ago
top

Ask Slashdot: Is an Open Source .NET Up To the Job?

MemeRot Re: Why bother? (421 comments)

This is why it bums me out that my company is spending so much developer time trying to move off of ms languages.

about a month ago
top

Ask Slashdot: Is an Open Source .NET Up To the Job?

MemeRot Re: Why bother? (421 comments)

You don't actually. That's the point of open sourcing .net core, to really beef up mono. MS has a strong commitment to supporting mono, especially in vNext. You can write C# to target mono, ios, and android and ignore Windows deployment entirely

about a month ago
top

At 40, a person is ...

MemeRot Me (286 comments)

I turn 40 in eleven days. Definitely starting to feel crusty. I've been in tech long enough now to see ideas come, go, and chime back again.

about a month ago
top

Ask Slashdot: Is an Open Source .NET Up To the Job?

MemeRot C# and Xamarin allow cross platform mobile (421 comments)

Which is probably more important than anything else. The benefit of open sourcing .net core is that mono will get better. So if you have a lot of existing .net code and want to get away from ms licensing, at least ms will keep the dev tool revenue.

about a month ago
top

BitTorrent Launches Project Maelstrom, the First Torrent-Based Browser

MemeRot Re:Private? (67 comments)

Why? CDN companies like Akamai spend huge amounts on their server networks, and they are already local to you.

about a month and a half ago
top

Visual Studio vs. Eclipse: a Programmer's Comparison

MemeRot Re:Spoiled by Visual Studio (543 comments)

Intellisense *almost* works flawlessly. The times when it doesn't show properties that I know exist drive me bananas.

The unit testing changes from VS 2010 to VS 2012 were quite confusing and a big step down in usability. Wasn't even at an ok level until update 2.

about a year and a half ago
top

Visual Studio vs. Eclipse: a Programmer's Comparison

MemeRot Re:Getters and setters (543 comments)

Depends on your context a bit. When dealing with automatically binding form fields to a view model like with an MVC .net project the convenience and speed pay off handsomely, even at the cost of having to have your form fields and properties identically named.

about a year and a half ago
top

Visual Studio vs. Eclipse: a Programmer's Comparison

MemeRot Re:Getters and setters (543 comments)

The syntactic overhead in C# is at least lighter than Java/C++. It's just Foo.Bar == 'something' or Foo.Bar = 'thing', you just have to declare Bar with a {get; set; }

about a year and a half ago
top

Visual Studio vs. Eclipse: a Programmer's Comparison

MemeRot Re:TLDR: It's a flaw of the language (543 comments)

No good reason I shouldn't be able to shoot laser beams out of my eyes either. But I can neither change how an attribute is accessed in Java/.Net nor shoot laser beams out of my eyes.

about a year and a half ago

Submissions

MemeRot hasn't submitted any stories.

Journals

top

RC4 encryption in tcl 7.6, StoryServer 4

MemeRot MemeRot writes  |  about 13 years ago [
##
##    INPUTS:        plainText
##
##    RETURNS:    cipherText
##
##    NOTES:        Conversion to Hex values may not
##      have been necessary, but was much easier to debug
##    See references at www.ncat.edu/~grogans and
##    http://www.tillerman.st/ietf/rodney_drafts/draft-kaukonen-cipher-arcfour-01.txt
##
##      This has been tested and found to match RC4, using
##      the perl module, also the public examples.
##      This was written for StoryServer 4.2, which is
##      based on tcl 7.6 (i.e. no binary stream, namespaces)
##
##      Tcl'ers, some of the syntax is slightly different,
##      not very though.
##
##      cypherText is created as a variable with the
##      encrypted string, not returned as the return value
##      from this function.

proc RC4_encrypt {plainText} {
    ## Must set these globally - but its global
    ## TO THIS PROCEDURE only
    global buffer S i enewsKey hexKeyList keyList enewsHex K f c HexVal plainList ccList l resultSet cipherText counter cardLen base64String

    for {set loop 0} {$loop <= 255} {incr loop} {
       append buffer " $loop "
    }

    ## Create a State array consisting of the numbers
    ## 0 through 255
    FOREACH num IN $buffer {
        [array set S [list $num $num]
        NULL]
    }

    ## The cipher key. Guard it.
    ## Put your own key in here, this will resolve to
    ## slashtroll

    set cipherKey [DECODE64 "c2xhc2h0cm9sbA=="]

    ## Its much easier to deal with the algorithm in
    ## hex and decimal than strings, so do that. This
    ## creates a list of the hex values.

        for {set l 0} {$l < [string length [SHOW cipherKey]]} {incr l} {
        scan [string index [SHOW cipherKey] [SHOW l]] %c keyInts
        lappend hexKeyList [format %X $keyInts]
    }

    ## destroy the key so that if there is a stack dump
    ## it is not compromised.
    unset cipherKey

    ## Make the key decimal, expand it to fill 256
    ## places in an array
    FOREACH HexVal IN [SHOW hexKeyList] {
        [scan $HexVal %x KeyStr]
        [lappend keyList $KeyStr]
    }
    set i 0
    for {set loop 1} {$loop <= 32} {incr loop} {
        for {set doubleloop 0} {$doubleloop <= 7} {incr doubleloop} {
            array set cypherHex [list $i [lindex $keyList $doubleloop]]
            incr i
        }
    }
    FOREACH num IN $buffer {
        [array set K [list $num $cypherHex($num)]
        NULL]
    }

    ## Delete more key variables in case of stack dump.
    unset hexKeyList keyList cypherHex

    ## Use the key array to mix the state array into an
    ## encrypting variable array
    set i 0
    set f 0
    FOREACH i IN $buffer {
        [SET f [expr ($f + $S($i) + $K($i)) % 256]]
        [SET tempVal $S($i)]
        [array set S [list $i $S($f)]
        NULL]
        [array set S [list $f $tempVal]
        NULL]
    }

    ## Get rid of the Key array. Now it should not be
    ## feasable for a user to crash the system with
    ## invalid plaintext and derive the key from any
    ## existing variables.
    unset K

    ## Create a hex, then decimal list of the plaintext
    set i 0
    set f 0
    set c 0
    for {set l 0} {$l < [string length $plainText]} {incr l} {
        lappend ccList [string index $plainText $l]
    }
    FOREACH HexVal IN [SHOW ccList] {
        [scan $HexVal %c plainStr]
        [lappend plainList $plainStr]
    }

    ## Encrypt the plaintext by deriving a number from
    ## the encrypting variable array to use and
    ## XOR'ing  it with the value of the plaintext
    FOREACH num IN $plainList {
        [SET i [expr ($i + 1) % 256]]
        [SET f [expr ($f + $S($i)) % 256]]
        [SET tempVal $S($i)]
        [array set S [list $i $S($f)]
        NULL]
        [array set S [list $f $tempVal]
        NULL]
        [SET t [expr ($S($i) + $S($f)) % 256]]
        [SET encrByte $S($t)]
            [array set resultSet [list $c [expr $num ^ $encrByte]]
        incr c
        NULL]
    }
    SET base64String "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
    set counter 0
    set cardLen [array size resultSet]
    FOREACH num IN {1 2 3 4 5 6} {
        [IF {[SHOW counter] != [SHOW cardLen]} {
            [append cipherText [string index $base64String [expr [SHOW resultSet([SHOW counter])] / 4]]]
            [incr counter; NULL]
            [IF {[SHOW counter] != [SHOW cardLen]} {
                [append cipherText [string index $base64String [expr ([SHOW resultSet([expr [SHOW counter] - 1])] % 4) * 16 + ([SHOW resultSet([SHOW counter])] / 16)]]]
                [incr counter; NULL]
                [IF {[SHOW counter] != [SHOW cardLen]} {
                    [append cipherText [string index $base64String [expr ([SHOW resultSet([expr [SHOW counter] - 1])] % 16) * 4 + ([SHOW resultSet([SHOW counter])] / 64)]]]
                    [append cipherText [string index $base64String [expr [SHOW resultSet([SHOW counter])] % 64]]]
                    [incr counter; NULL]
                } ELSE {
                    [append cipherText [string index $base64String [expr ([SHOW resultSet([expr [SHOW counter] - 1])] % 16) * 4]]]
                    [append cipherText "="]
                }]
            } ELSE {
                [append cipherText [string index $base64String [expr ([SHOW resultSet([expr [SHOW counter] - 1])] % 4) * 16]]]
                [append cipherText "=="]
            }]
        }]
    }

    unset buffer S i f c HexVal plainList ccList l resultSet counter cardLen base64String
    return
}]

Slashdot Login

Need an Account?

Forgot your password?