My understand of scriptless scripts

prealpha, this thing published as I was writting may as well get feedback

I need to build up some concepts first so bear with me, err I mean lets look at some fun other examples first:

1. Advance Jank Functions

Jank is an underappreciated part of computer science; from carmack’s magic function(this is the proper name, fite me) to the entire point of zachtonics games. Furthermore advance jank is so under appreciated I have to coin the phase, right here and now.

So what is formal definition of jank? I’m glad you asked, person rolling your eyes and irritated with me. Jank is is taking an (unintentionally) overloaded function and pre-compile time pushing pre-solved math into it, for example; carmack magic function:

	x2 = number * 0.5F;
	y  = number;
	i  = * ( long * ) &y;  // evil floating point bit level hacking
        i  = 0x5f3759df - ( i >> 1 );       // what the fuck?
	y  = * ( float * ) &i;
	y  = y * ( threehalfs - ( x2 * y * y ) );

“What the fuck?”.author() is right; this is awfully confusing; this of all things needs a very long comment. But because this example was so great people did reverse engineer it.

i is a float that gets int’s add applied to it; this is the unintentional overloaded function, as in hardware floats are roughly written in scientific notation and when you treat the hardware to this abuse(don’t worry it has many safe words, like nullpointer); it will add to the exponent directly… incorrectly, but in a single cpu call, which is nice and fast clapclapclap.gif. As for the rest of pre-solving math and how this works, I’m not the right person to ask for that… clearly; but its very clever let me assure you.

Thats only simple jank tho, whats advance jank? Advance jank is when you apply higher order thoughts to jank. Lets go thru a terrible example that makes you a worse person for knowing. Compiling for a single instruction computer, for this I’ll use sub_negitiveflag_jump; try to get used to my sudo-code xkcd.png

   int computerstate= new array(awful_awful_machinecode)
   int instruction= 0
      result = computerstate[instruction] - computerstate[instruction+1]
      computerstate[instruction+2]= result
      if (result < 0) instruction = computerstate[instruction+3]

I feel dirty; I’m deeply sorry your all forever damaged if you understood this, “potential programmers they are mentally mutilated beyond hope of regeneration.” -dijstra ; for those who didn’t let me feel sorry after this:

  1. this subtracts two numbers, and puts the result in a third register
  2. if this number is negative jump to a 4th register
  3. loop this dog shit and get a turing complete computer( assuming I got all the piece I needed, but I did this from memory)

Making anything out of this is pure jank so lets go thru the first bits of a compiler

I would like a few things:

  1. sub no jump
  2. add
  3. conditional goto

your homework for this week is to complete this compiler, most people drop out of this advance jank course this week and this is after the refund period, so start early and don’t be afraid to ask for help.

Those who finish go on to master in an emerging field.

2. Functional Style Database Meta Functions


I’m kinda tired getting that last interweaved joke out. I feel a migraine coming, I wonder if 1/2 of people managed to get in my head

I’m not sure how how common this style of thing is, but I took a scala database course; I now hate scala(text highlighting (or whatever was so hard about running it) shouldn’t make most ide’s crash prone and the “toolchain” setup is worse then c++ but doesn’t have the excuse of age) but I did get several functional programming patterns that were data and parallel oriented. pesdo code, building up these patterns so I can use these concepts in the next bit

      return (processor1.statement1, processor2.statement2) // runs the statement in parallel

      reduce(f(list.head,list.tail.head) ::list.tail.tail,f)

    addshit(list) = reduce(list, +)
    mulishit(list)= reduce(list, *)

    reduce_mulicomputers(listcomputers,biglist){ //run reduce on n computers
       pairs = zip(listcomputers, small_lists) (a,b) => a.b)

assuming this is confusing, I’m trying to communicate tail recurive style and being able to communicate “computerobject.function” to mean this code runs else where

3. The Actual Explanation

I know the following is incorrect but I function on fuzzy logic and in theory the audience has been in my head for a while by this bit

the pattern of bitcoins smart contracts is roughly

    return sig,public
    fancymath(sig) == public

this simple way of thinking is not remotely explained to the general public, and eth doesn’t help or naturally the explanation of

    return magicdata,public
    fancymath(magicdata) == public

is very much lost on them

Futhermore I believe that mw blockchain as a simple computer like an snj computer could be pushed and potentially be very helpful as an explaination but making that sudocode with a migraine isn’t happening

4. Future Work

//Look at me, being an acki-demic type

I would like to speculate that maybe fancy verifying transactions could make extremely interesting blockchains

eh, latter