Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 02:49
    kusumotonorio commented #2364
  • Jan 23 11:15
    kusumotonorio commented #2364
  • Jan 23 11:14
    kusumotonorio commented #2364
  • Jan 23 06:51
    kusumotonorio commented #2364
  • Jan 23 05:21
    kusumotonorio commented #2364
  • Jan 23 02:00
    erg commented #2364
  • Jan 23 01:59
    erg commented #2364
  • Jan 23 01:56
    erg commented #2364
  • Jan 23 01:55
    erg commented #2364
  • Jan 23 01:51
    kusumotonorio commented #2364
  • Jan 22 17:12
    mrjbq7 commented #2364
  • Jan 22 17:12
    mrjbq7 commented #2364
  • Jan 22 12:31
    kusumotonorio commented #2364
  • Jan 22 12:13
    kusumotonorio commented #2364
  • Jan 20 03:55
    kusumotonorio commented #2380
  • Jan 20 03:54
    kusumotonorio commented #2380
  • Jan 18 11:25
    kusumotonorio commented #2364
  • Jan 17 12:26
    kusumotonorio commented #2364
  • Jan 16 03:24
    kusumotonorio commented #2364
  • Jan 16 03:10
    kusumotonorio commented #2364
John Benediktsson
@mrjbq7
Hmm seems to work for me
I pasted it in
Dave Carlton
@tgunr
hmm
John Benediktsson
@mrjbq7
IN: scratchpad TUPLE: foo a b c ;
TUPLE: bar < foo d e f ;
IN: scratchpad bar tchain [ tuple>nodes ] map .
{
    T{ tuple-node
        { id "bar" }
        { tuple bar }
        { slots { } }
        { next# 2 }
    }
    T{ tuple-node
        { id "foo" }
        { tuple foo }
        { slots { } }
        { next# 2 }
    }
    T{ tuple-node
        { id "tuple" }
        { tuple tuple }
        { slots { } }
        { next# 1 }
    }
}
Dave Carlton
@tgunr
you got a good graph?
John Benediktsson
@mrjbq7
Do you have a small example showing it breaking?
(I haven't had 1+ for a few years, memories!)
John Benediktsson
@mrjbq7
tuple-tree-test produces wrong output it looks like
but my example above produces correct output?
Dave Carlton
@tgunr
{ track pack } [ tuple>node ] map first attributes>> label>> . works
tgunr @tgunr puzzeled
John Benediktsson
@mrjbq7
i think preview isn't working
maybe?
track <tuple-graph> tchain [ tuple>nodes ] map [ add ] each .
that "works"
meaning it looks right
but preview looks wrong
Dave Carlton
@tgunr
I can see it in the walker it is wrong after stepping over [ tuple>node ] map
The preview reflects each node having the wrong label as seen in the walker when stepping over
John Benediktsson
@mrjbq7
so if you run it, it's correct, if you walker it, it's wrong?
Dave Carlton
@tgunr
no, if I step over in walker its wrong
if I step into the mapping, its right
John Benediktsson
@mrjbq7
IN: scratchpad track <tuple-graph> tchain [ tuple>nodes ] map [ add ] each .
T{ graph
    { id "track" }
    { directed? t }
    { statements
        V{
            T{ graph-attributes
                { rankdir "LR" }
                { size "8,8" }
            }
            T{ node-attributes
                { fontsize "8" }
                { shape "record" }
            }
            T{ tuple-node
                { id "track" }
                { tuple track }
                { slots { } }
                { next# 2 }
            }
            T{ tuple-node
                { id "pack" }
                { tuple pack }
                { slots { } }
                { next# 2 }
            }
            T{ tuple-node
                { id "aligned-gadget" }
                { tuple aligned-gadget }
                { slots { } }
                { next# 2 }
            }
            T{ tuple-node
                { id "gadget" }
                { tuple gadget }
                { slots { } }
                { next# 2 }
            }
            T{ tuple-node
                { id "rect" }
                { tuple rect }
                { slots { } }
                { next# 2 }
            }
            T{ tuple-node
                { id "tuple" }
                { tuple tuple }
                { slots { } }
                { next# 1 }
            }
        }
    }
}
Dave Carlton
@tgunr
tuple-node inherits from node
John Benediktsson
@mrjbq7
the labels look okay to me
oh i see what you mean
label>> is wrong
Dave Carlton
@tgunr
yes
only if you step over the map call
John Benediktsson
@mrjbq7
so i figured it out maybe
tuple-node extends node
node has attributes
tgunr @tgunr waiting with bated breath
John Benediktsson
@mrjbq7
attributes has an initial value of a tuple instance
all nodes share the same tuple instance
unless you clone it
(the attributes)
Dave Carlton
@tgunr
ok, looking
i swear this worked yesterday
John Benediktsson
@mrjbq7
node new node new [ attributes>> ] bi@ eq? .
Seems like we should fix that in the graphviz vocab
If you use <node> to make nodes then it's not a problem
Dave Carlton
@tgunr
changing code
John Benediktsson
@mrjbq7
You can add this to your <tuple-node>
<node-attributes> >>attributes
or solve it some other way etc.
Dave Carlton
@tgunr
roger
John Benediktsson
@mrjbq7
tuple-tree-test looks great now!
Dave Carlton
@tgunr
now to connect the nodes
Justin Hill
@hiljusti
man you all are super productive