Conversation started Nov 4, 2013 at 20:53.
Nov 4, 2013 20:53
I made a fiddle demonstrating yield. Maybe someone wants to figure out how to get it to work in Chrome: jsfiddle.net/jcpmcdonald/…
going to install this to track my walking
I walk quite a lot and I'm curious about the distance and stuff
I kinda have this set # of hours I must walk each week; I don't know what that number is, I just "feel" when I walked enough or not enough
@AlexM. I have this app, it's quite good.
I use it for both running and walking.
cool
@JohnMcDonald your link's all like "screw you, I'm not gonna work"
Yeesh, I see that there's been some nastiness in the chat history earlier....
Nov 4, 2013 20:55
to get to my workplace I have to walk on a quite steep road
I made a fiddle demonstrating yield. Maybe someone wants to figure out how to get it to work in Chrome: jsfiddle.net/jcpmcdonald/z4sXk/6
@IcyDefiance My bad
I said to myself if I keep doing it for a whole year I'll become the most fit person in the world lol
ah, that wokrs
the first time I got to the top I was like exhausted
Haha, Alex.
Nov 4, 2013 20:57
today was easier than usual, but I was still very warmed up
@IcyDefiance should print: 0 1 1 2 3 5 8 13 21 34 in the HTML output
@JohnMcDonald is the version needed? remove it?
Get some blood moving.
@AlexM. Btw, I am still going to complete my entry game.
that's good
Wise people of GD name my function
Nov 4, 2013 20:59
Wanna hear about it?
@JohnMcDonald I think it's less an issue with chrome and more with the fiddle itself. I've changed that script tag to something I know works, and it's still ignored
p3nis(params[]) XD
I copied the javascript into the javascript box, and then it told me, "document.write is disallowed in JSFiddle envioriment and might break your fiddle." which could be another problem
@IcyDefiance yeah, check the error log: Uncaught SyntaxError: Unexpected identifier
this reminded me of that SO answer
Exception up;
throw up;
Nov 4, 2013 21:00
name ( width, height, widthSegments, heightSegments )
Creates this: http://i1294.photobucket.com/albums/b603/oliverschoening/geometry_zps475276c3.png
the Z thing
Updated to console log instead of doc write, and to use the plain old JS version: jsfiddle.net/z4sXk/11
FanoronaBoardMake( width, height, widthSegments, heightSegments)
makeUglyButSymmetricalStructure(...)
@JohnMcDonald yep, that one doesn't work either. does it work in firefox?
Nov 4, 2013 21:01
@JohnMcDonald oops see other room
not entirely serious, but that is the structure of the Fanarona board.
time to go
The old one works in FF
see you guys later :)
Nov 4, 2013 21:01
crap, my shift is over. I'm going to relocate, then take another look.
sorry for calling it the "Z thing" it's used for memory cache layouts on GPUs
@AlexM. Rude. @Almo Hm.. interesting. Thx
it's not rude
it's not serious
@Jimmy hmm
Took me way to long to figure it out :) But it is gonna pay of ^^
Nov 4, 2013 21:03
it just relies on the fact that closures and coroutines use a similar compiler transform into a state machine
@Jimmy That... just might work. I'll have to think about to re-write stuff
(to others, Jimmy wrote this): jsfiddle.net/talyian/z4sXk/10
because then at least from the call site the usage is pretty much identical
yeah, and in my case, fib() is effectively generated
lol that's exactly what I said when the issue very first came up
Is it? I guess I didn't follow
Nov 4, 2013 21:07
I've always developed with chrome and never ever even seen the yeild thingie
So, instead of: moveForward(); yield 10;, it would be: moveForward(); return { next: function() { return 10; }} ? I don't think I'm thinking about this quite right
no, not right at all
return { next : function() { moveforward(); return 10; } };
since you want moveforward to be called each time next() is called
next has to contain the entire body of your while loop
unless it is multiple yield statements
in which case you have a mutable next
if you want, post a more complex example and I can translate it
while(true)
{
    scanRight();
    yield 3;
    if(scanResult == BOT)
    {
        turnRight();
        yield 10;
        shoot();
        yield 10;
    }
    else
    {
        moveForward();
        yield 10;
        if(bumped)
        {
            turnRight();
            yield 10;
        }
    }
}
Each command (move, scan, shoot, etc), is associated with a yield statement that indicates the cost of the command (3, and 10 in eg)
When you ignore somebody in chat, can they still hear you?
Yes, I can still hear you @hasherr, :p
(I honestly don't know, but probably)
Nov 4, 2013 21:14
Thank you, John.
Ignoring someone in chat is pretty retarding, you don't have to reply. It's only putting oneself in the dark as to what the conversation is about
I asked for a reason, @MickLH ;)
I commented for no reason
Also, I'd honestly appreciate if you stopped using the word 'retarded' in the room.
There you go, "retarding" is more literally accurate
Nov 4, 2013 21:17
@John if you want to do it very similar to how the C# compiler for example creates the yield function
var state = 0;
var next = function() {
    switch(state) {
        case 0:
            scanRight();
            state=1;
            return 3;
        case 1:
            if (scanResult == BOT) {
                turnRight();
                state=2;
                return 10;
            } else {
                moveForward();
                state = 3;
                return 10;
            }
        case 2:
            shoot();
            state = 0; // end while loop
            return 10;
        case 3:
@hasherr Feel free to flag anything in chat you find offensive.
Well, of course it does have more than one meaning, but i've seen you you use it several times in a more offensive context.
return { next : next };
@hasherr who have you ignored now ?
@Byte56 Thank you.
Nov 4, 2013 21:18
oh jeese not more drama
I'm not going to say who I may have/have not ignored.
PC Gamer
Bugbear's destruction focused FlatOut successor, 'Next Car Game', is now on Kickstarter: http://bit.ly/1aYHTyk
dont worry i can work it out lol
Lol I love how cute it is when little kids are emotionally delusional
Nov 4, 2013 21:20
thats some weird view of european thats more russian
@Jimmy :/ great... that looks like fun to implement
@Dave yes
american cars - muscle
european cars - fashion
this is how we did it in the old days. We didn't have fancy shmancy generator expressions and we had to walk uphill both ways in the snow
@JohnMcDonald write it in C using setjmp and longjmp and see what emscripten generates you ;)
 
Conversation ended Nov 4, 2013 at 21:21.