Hi Gergely, I'll first explain what the general (functional) programming error is, and then explain the problem in liquidsoap terms.
Think of a sequence of instructions: print(a) print(b) 1+2 It starts with two effects (printing) and returns a value (3). The return type of print is unit: doesn't return anything useful. Now consider another sequence: 1+2 2+3 42 It computes the values 3, then 5, without any side effect, and discards the values. Finally, it evaluates to 42. This is likely to be a programming error: you probably meant to do something with these values, e.g. printing. So statically type languages usually issue a warning when you have non-unit types in a sequence. If there's no error you can explicitly ignore the problematic values by using ignore(1+2) (which can make sense for example, if the considered value is obtained from a side effect, for example, ignore the first user input, before taking the second one into account). Let's restrict our attention to liquidsoap. In liquidsoap, it's fine to have an active source (typically, an output) apparently unused in a sequence, because it "uses itself" by streaming as soon as it's created. So we issue a warning if there is an unused value that is neither unit nor an active source. In your case, you probably wrote something like on_blank(f,s) somewhere. It creates a new source node, which is never used. It's useless, that's what the warning tells you. What you have to keep in mind is that (passive, not active) sources don't do anything unless they are being animated (indirectly) by an active source. If you don't pull data off your on_blank node, no stream will go through it, there's nothing to analyze for calling your handler. What you need to do something like: s = your initial source s' = on_blank(f,s) then only use s', not s Or, just mask the earlier definition of s to ensure the use of the wrapped source: s = initial source s = on_blank(f,s) now use s, it's the on_blank node Hope that helps, -- David ------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com _______________________________________________ Savonet-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/savonet-users
