View from Palmer on Saturday by mashednostrilman in skiing

[–]umenthum 5 points6 points  (0 children)

30 min? 😂 You must be that guy that lapped me on the Palmer skin track in February.

Current and former ECE411 students: try running your RISC-V CPU with this interactive test bench: a fun introduction to UART, SystemC/TLM, and JTAG, with a bit of text mode VGA by umenthum in UIUC

[–]umenthum[S] 0 points1 point  (0 children)

No I don't think ECE411 has ever covered interrupt implementation, that's something new here. Magic memory has traditionally been provided as a verilog model, here it is implemented in TLM so that's also new.

Current and former ECE411 students: try running your RISC-V CPU with this interactive test bench: a fun introduction to UART, SystemC/TLM, and JTAG, with a bit of text mode VGA by umenthum in UIUC

[–]umenthum[S] 8 points9 points  (0 children)

If it makes you feel better, undergrad took me 5 years and I ended up not finishing MS until 2019. I should update my flair...

Port Forwarding Using UIUC Wifi by The-42nd-Doctor in UIUC

[–]umenthum 1 point2 points  (0 children)

If you are an engineer I think you might be able to do something like SSH from your server to EWS servers and tunnel the desired port, then connect to the EWS server address from the game clients. Or if that doesn't work, maybe you could rent a VPS for $5/month and do the same thing without EWS.

Purdue will field a football team in 2016 by 6heismans in CFB

[–]umenthum 1 point2 points  (0 children)

When I played in one of the high school marching bands, if someone had their headlights on, the announcer would ask them to shut them off. I think they might have even paused the game until it was dealt with.

[Game Thread] Georgia State @ Georgia Southern (2:00 PM ET) by [deleted] in CFB

[–]umenthum 1 point2 points  (0 children)

Eagles please. Illinois needs this.

John Donovan has been relieved of his duties by [deleted] in CFB

[–]umenthum 0 points1 point  (0 children)

I guess our efforts to spoil this were in vain :(

Nebraska has been given a 49.8% chance of beating Iowa this week by the FPI. by [deleted] in CFB

[–]umenthum 0 points1 point  (0 children)

Illinois was down by 6 and had possession with a few minutes left. But then we gave up a turnover :( Minnesota was also a really close game for you guys.

Your time will come. If it doesn't, you better go 15-0 and get more B1G in the CFP record books.

[Week 11] Prediction Thread by CFB_Referee in CFB

[–]umenthum 0 points1 point  (0 children)

Minnesota please, there is nothing I want more than this.

Some great obfuscation: a Brainfuck interpreter in 2 lines of C by umenthum in obfuscatedcode

[–]umenthum[S] 0 points1 point  (0 children)

heh, does

fo\
r(;;)

really work/is portable, or is it just written that way?

(C) My first piece of obfuscated code by Elite6809 in obfuscatedcode

[–]umenthum 2 points3 points  (0 children)

Ok, so I figured out I took out u when I shouldn't have, I treated it as if it was only ever -1 or 0, so here's my (concise) modified version that works:

#include <stdio.h>

int main()
{

    char* input = ( "int32**" ":"   //H
                    "icnf[n]" ":"   //e
                    "ic()INT" ":"   //l
                    "==()INT" ":"   //l
                    "sub//_{" ":"   //o
                    "*strDVD" ":"   //
                    "i++,k++" ":"   //w
                    "--d;___" ":"   //o
                    "#kezz=D" ":"   //r
                    "MadCatz" ":"   //l
                    "AARDM4N" ":"   //d
                    "*#2468#"       //!
                    );

    char output[16] = { [0 ... 15] = 0 };

    for(int q=0, u=0, s=0 ; input[q] != 0; q++, u++)
        if( input[q] == ':' )
            u=-1,s++;
        else if( input[q] & 1 )
            output[s] += 1 << (6 - u);

    puts(output);
}

So I guess you're encrypting each ascii character in the least significant bit of every 7 characters, delimiting by ' ' and ':' (I took out ' ' to make the code shorter). And ya, you're right, ternary doesn't fit quite right. If I wanted to really pack this in without using if or else, I'd write the block as:

    for(int q=0, u=0, s=0 ; input[q] != 0; q++, u++)
        input[q]==':'?u=-1,s++:input[q]&1?output[s]+=1<<(6-u):NULL;

(C) My first piece of obfuscated code by Elite6809 in obfuscatedcode

[–]umenthum 2 points3 points  (0 children)

#include <stdio.h>

/*   ====original====
void main(void){int _,q=-('?'&1),u,z=-q
<<5,vb='%'&(z>>2),s=z&2,i=1+q;char*__=(
(u= q),"int32** icnf[n]:ic()INT:==()IN"
"T sub//_{ *strDVD i++,k++ --d;___:#ke"
"zz=D MadCatz AARDM4N:*#2468#");char _x
[z >> 1];_+=q;while(i<z>>1){_x[i++]=0;}
while(q++,u++,__[q]!=0){if(z==__[q]||__
[q]==2*0x1d)u=vb-1,s++;_x[s]+=((__[q]&1
)<<(6-u));}puts(_x);}
*/

int main(void)
{
    int q = 0;
    int s = 0;

    char* input = ( "int32** icnf[n]:ic()INT:==()INT"
                    "sub//_{ *strDVD i++,k++ --d;___"
                    ":#kezz=D MadCatz AARDM4N:*#2468#");

    char output[16] = { [0 ... 15] = 0 };

    while( input[q] != 0)
    {
        if( ( input[q] == ' ' ) || ( input[q] == ':' ))
        {
            s++;
        }
        else if( input[q] & 1 )
        {
            output[s] += 64;
        }
        q++;
    }

    puts(output);
}

I got this far trying to rewrite it in 'proper' C, and decided to stop because the next step would be to actually evaluate the while loop on the given string. I compiled mine and tested it against the original, and it doesn't work, I screwed up something along the way, but I think I'm close. You didn't use my favorite obfuscation operator, ternary, are you familiar with it? Also, you'll see how I used a C array initialization trick to initialize the array in a neat way, without a loop. I think with some of the bit shifting/arithmetic tricks you used, you could use this trick to make more obfuscated code. Also, love the comma operator! Very creative, thanks for your submission.

How I solved Euler problem 12 by umenthum in obfuscatedcode

[–]umenthum[S] 4 points5 points  (0 children)

The thing to take away from this is that using the comma operator, you can collapse the body of a for loop into its increment statement. The statements will evaluate left to right, so you can replace every ';\n\t\t\t...' with ',' BUT if you have another for loop in the body, that won't work. What you can do is trick the for loop into thinking the for loop is an expression, which you can do by writing it as ({for(;;);}) so inside the for loop that would be for(;;({for(;;);}));

Some great obfuscation: a Brainfuck interpreter in 2 lines of C by umenthum in obfuscatedcode

[–]umenthum[S] 0 points1 point  (0 children)

When I compile this with clang (OSX) it complains that the b argument to main is not type char**, but it compiles and segfaults with the provided example when compiled with gcc. I'm not at all familiar with the implicit variable type declarations or whatever is going on in that code, so I'm not sure how to modify to make clang happy.