Submissions from 2015-01-29 to 2015-01-30 (4 total)

Today I worked on adding signals between the various models for the world map. This ensures the models only know about their child and not their parent.

Editor -> World -> TileList -> [Tile]

In Elm signals are kinda equivalent to events, but described as "a value that changes over time". I don't quite fully grok them at the moment, so I suggest reading the info here if you're interested - http://elm-lang.org/learn/What-is-FRP.elm

No exciting screenshot for this though today.

Coding

A submission for Code @Home 4

+ Game_Over state

+ Basic particle effects

+ Collision tweaking

Lots of work done tonight. I can actually see the resulting HTML/CSS output of my components/layout! At the end of my coding session when I started to play around with the language, I realized it was desperately lacking components using components for the layout so hopefully tomorrow night I can rectify that.

Code:
http://pastebin.com/1UuHjfcG

Compiles to:
http://pastebin.com/5eD33hEM

nweb.zip1kb
1 download

Trying to work on some Forth, I've basically read through Starting Forth, but didn't do the examples. For tonight, I decided to pick an example and give it a go.

I ended up with:

VARIABLE i
: N-MAX
    0 i !
     BEGIN
        50 i +!
        i @ 0 <=
    UNTIL

    BEGIN
        i @ 1 - i !
        i @ 0>=
    UNTIL

    i @ .
;

I wasn't too disappointed with this solution. As I was attempting it, I realized +1 wasn't as fast as I had hoped. To compensate I over count, and then count back. The solution they give is here: http://www.forth.com/starting-forth/sf7/7-1.forth

Pay attention to the comments about the note. With that in mind I realized I overly complicated it with a variable (force of habit with every other programming languages.) I was able to very quickly iterate their solution to include the second loop after over counting in the first. Overall, not a bad night.