Good vs. Evil

Discussion in 'Forum Games' started by Randomguy404, Oct 12, 2014.

  1. duckfan77

    duckfan77 Well-Known Member

    47 *hugs those that want them*
     
  2. GamerwithnoGame

    GamerwithnoGame Forum Addict

    48. *accepts any and all hugs*
     
  3. duckfan77

    duckfan77 Well-Known Member

    47 *hugs Gamer*
     
  4. LordPINE

    LordPINE Well-Known Member

    48. *a late hug from me*
     
  5. lenscas

    lenscas Over-Achiever

    GamerwithnoGame likes this.
  6. duckfan77

    duckfan77 Well-Known Member

    48? You kind of moved by 11 there lens...
     
  7. lenscas

    lenscas Over-Achiever

    49 typo's for the win?
     
  8. duckfan77

    duckfan77 Well-Known Member

  9. MrMonsterGuy18

    MrMonsterGuy18 Well-Known Member

    47 *very delayed hug*
     
  10. duckfan77

    duckfan77 Well-Known Member

    46 Thanks <3
     
  11. MrMonsterGuy18

    MrMonsterGuy18 Well-Known Member

    45 No problem
     
  12. duckfan77

    duckfan77 Well-Known Member

    44 ugh... sleep schedules of horribleness.
     
  13. Bigdbigd03

    Bigdbigd03 New Member

    43 ^


    Sent from my iPhone using Tap a Taco
     
  14. GamerwithnoGame

    GamerwithnoGame Forum Addict

    44. My sleepiness is my own fault; I was ironing til late last night :p

    I am Iron Man
     
  15. duckfan77

    duckfan77 Well-Known Member

    43 My sleep schedule is slowly getting better. I wasn't up at 4 this morning...
     
  16. GamerwithnoGame

    GamerwithnoGame Forum Addict

    44. That's good news!
     
  17. duckfan77

    duckfan77 Well-Known Member

    43 Holy crap this professor is bad. Actual quote from him today, "Tell me what I should ask. Anticipate my questions."
     
  18. MrMonsterGuy18

    MrMonsterGuy18 Well-Known Member

    42 Ah yes, peak teaching, when you make your students teach you but in the worse possible way.
     
  19. lenscas

    lenscas Over-Achiever

    43 I made a simplistic brainfuck optimizer compiler in rust in about 1 and a half hour.

    It goes over the code in 2 passes. The first (which is done in parallel) turns the brainfuck "script" into tokens that are easier to work with. It also filters out everything that is not an instruction.

    The second pass, combines instructions that are next to each other. Meaning that +++ becomes Add(3). It also "links" the start and end of every loop. Meaning it can simply become a jump instruction.

    There are more optimizations possible like [-] which can become a single instruction to set the current cell to zero and [>]/ [<] which simply move the pointer left/right until it hits an cell containing 0.

    But before I start doing any of that I first need to fix the bug that causes the last instruction to not be part of the program and make it so it can actually execute the code. After that I should probably also dig up my old lua version of it to compare the two. I suspect the lua version is slower HOWEVER that only needs 1 pass to optimize it, so it will be interesting to see how that changes things.

    I probably should also keep the rust version that isn't multi threaded because that doesn't need to temporary make a Vec after the first pass and thus should be optimized into a single pass, just like my lua code.
     
  20. GamerwithnoGame

    GamerwithnoGame Forum Addict

    44. Wow. That makes my efforts at teaching in the past look good by comparison.
     

Share This Page