[01:52:01] * pierpa [pierpa!57100917@gateway/web/freenode/ip.87.16.9.23] has joined the channel. [02:43:57] * diginet [diginet!~diginet@107.170.146.29] has quit (Ping timeout: 240 seconds). [02:44:16] * diginet [diginet!~diginet@107.170.146.29] has joined the channel. [02:44:50] * dustinm` [dustinm`!~dustinm@68.ip-149-56-14.net] has quit (*.net *.split). [02:44:50] * jeaye [jeaye!~jeaye@unaffiliated/jeaye] has quit (*.net *.split). [02:44:50] * earl [earl!~earl@pdpc/supporter/active/earl] has quit (*.net *.split). [02:44:50] * maaku [maaku!~maaku@173.234.25.100] has quit (*.net *.split). [02:44:56] * obfusk [obfusk!~quassel@relto.rasusan.nl] has quit (*.net *.split). [02:44:56] * lugh [lugh!~lugh@chame.co] has quit (*.net *.split). [02:45:12] * obfusk [obfusk!~quassel@relto.rasusan.nl] has joined the channel. [02:45:12] * lugh [lugh!~lugh@chame.co] has joined the channel. [02:45:19] * dustinm` [dustinm`!~dustinm@68.ip-149-56-14.net] has joined the channel. [02:45:19] * jeaye [jeaye!~jeaye@unaffiliated/jeaye] has joined the channel. [02:45:19] * earl [earl!~earl@pdpc/supporter/active/earl] has joined the channel. [02:45:19] * maaku [maaku!~maaku@173.234.25.100] has joined the channel. [02:46:50] * jtimon [jtimon!~quassel@226.110.132.37.dynamic.jazztel.es] has quit (*.net *.split). [02:46:50] * shachaf [shachaf!~shachaf@unaffiliated/shachaf] has quit (*.net *.split). [02:46:54] * groovy2shoes [groovy2shoes!~groovy2sh@unaffiliated/groovebot] has quit (*.net *.split). [02:46:54] * otoburb [otoburb!~otoburb@unaffiliated/otoburb] has quit (*.net *.split). [02:46:54] * rprimus [rprimus!~micro@a9.lence.net] has quit (*.net *.split). [02:46:54] * ephe_meral [ephe_meral!~ephe_mera@innoki.de] has quit (*.net *.split). [02:47:24] * jtimon [jtimon!~quassel@226.110.132.37.dynamic.jazztel.es] has joined the channel. [02:47:24] * shachaf [shachaf!~shachaf@unaffiliated/shachaf] has joined the channel. [02:48:02] * groovy2shoes [groovy2shoes!~groovy2sh@unaffiliated/groovebot] has joined the channel. [02:48:02] * otoburb [otoburb!~otoburb@unaffiliated/otoburb] has joined the channel. [02:48:02] * rprimus [rprimus!~micro@a9.lence.net] has joined the channel. [02:48:02] * ephe_meral [ephe_meral!~ephe_mera@innoki.de] has joined the channel. [03:46:15] * erkin [erkin!~erkin@unaffiliated/erkin] has quit (Quit: Ouch! Got SIGIRL, dying...). [03:51:42] * pierpa [pierpa!57100917@gateway/web/freenode/ip.87.16.9.23] has quit (Quit: Page closed). [04:09:28] * pierpal [pierpal!~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it] has joined the channel. [04:15:05] * pierpal [pierpal!~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it] has quit (Quit: Poof). [04:34:52] * ^alex [^alex!pi@unaffiliated/mtp] has quit (Ping timeout: 256 seconds). [04:39:40] * mtp [mtp!pi@unaffiliated/mtp] has joined the channel. [04:42:46] * pierpal [pierpal!~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it] has joined the channel. [05:23:25] * werkin [werkin!~erkin@unaffiliated/erkin] has joined the channel. [05:27:23] * pierpal [pierpal!~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it] has quit (Quit: Poof). [05:27:43] * pierpal [pierpal!~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it] has joined the channel. [06:36:17] * jtimon [jtimon!~quassel@226.110.132.37.dynamic.jazztel.es] has quit (Ping timeout: 248 seconds). [07:14:52] * werkin [werkin!~erkin@unaffiliated/erkin] has quit (Quit: Leaving). [07:47:05] * v0id_NULL [v0id_NULL!~igor_@217.150.79.251] has joined the channel. [07:52:44] It's seems dip has incorrect stack effect in it's definition: ( x quot -- x ). I think more appropriate effect is ( ..a x quot: ( ..a -- ..b ) -- ..b x ). Am I right? [07:57:27] Seems I don't understand difference between dip and keep. [08:34:35] * werkin [werkin!~erkin@unaffiliated/erkin] has joined the channel. [09:15:37] * werkin [werkin!~erkin@unaffiliated/erkin] has quit (Quit: Leaving). [10:30:19] * werkin [werkin!~erkin@unaffiliated/erkin] has joined the channel. [10:39:27] * werkin [werkin!~erkin@unaffiliated/erkin] has quit (Quit: Leaving). [10:59:01] * werkin [werkin!~erkin@unaffiliated/erkin] has joined the channel. [11:21:46] * pierpal [pierpal!~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it] has quit (Ping timeout: 252 seconds). [11:38:28] * pierpal [pierpal!~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it] has joined the channel. [12:31:57] * pierpal [pierpal!~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it] has quit (Read error: Connection reset by peer). [12:32:05] It seems to me that stack effects are not expressive enough way of typing. What do you think? [12:32:10] * pierpal [pierpal!~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it] has joined the channel. [12:47:01] Stack effects of dataflow combinators are horrible, I think. [12:49:05] * pierpal [pierpal!~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it] has quit (Ping timeout: 240 seconds). [13:00:10] * delvinj [delvinj!~Miranda@c-73-164-9-150.hsd1.mn.comcast.net] has joined the channel. [13:00:40] * jtimon [jtimon!~quassel@226.110.132.37.dynamic.jazztel.es] has joined the channel. [13:08:53] Stack effects are too dumb for me. [13:30:18] * pierpal [pierpal!~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it] has joined the channel. [13:37:34] * pierpal [pierpal!~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it] has quit (Read error: Connection reset by peer). [13:37:43] * pierpal [pierpal!~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it] has joined the channel. [13:59:11] * werkin [werkin!~erkin@unaffiliated/erkin] has quit (Quit: Leaving). [14:20:58] * pierpal [pierpal!~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it] has quit (Quit: Poof). [14:21:19] * pierpal [pierpal!~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it] has joined the channel. [14:46:37] * Sonderblade [Sonderblade!~bjourne@n164-p17.eduroam.kth.se] has joined the channel. [14:47:57] * pierpal [pierpal!~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it] has quit (Ping timeout: 240 seconds). [15:07:47] v0id_NULL: dip specifically only concerns the top two objects on the data stack, which is why it is written that way. [15:09:03] * pierpal [pierpal!~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it] has joined the channel. [15:11:50] Words with row-polymorphic stack effects like keep have quotations which might alter objects anywhere on the stack. [15:15:11] And keep in mind stack effect checking doesn't have anything to do with types. Factor is dynamically-typed through and through. Stack effect checking is only meant to catch errors of arity. [15:19:22] Krenium: Stack effects is not a fragment of typing in Factor? [15:19:43] What difference? [15:20:24] Stack effects only tell you how many objects a word takes from the stack and how many objects it leaves on the stack. [15:20:31] Stack effects don't tell you what they are. [15:21:51] You could say that a word takes a seq and leaves a seq', but that's just mnemonic. [15:22:27] It would mean the exact same thing to say that a word takes an x and leaves a y. [15:23:49] Krenium: Stack effects checks is one of the typing method in general, aren't they? [15:26:22] What for are such checks at all? [15:38:26] v0id_NULL: stack effects are a declaration of how many inputs and outputs a word takes, so that the compiler can catch some invalid programs. [15:40:50] The + word has a stack effect of ( x y -- z ) because it takes two inputs and produces one output. [15:41:26] Krenium: I think quantity of inputs for dip depends of stack effect of quotation. [15:41:35] For example [15:41:43] [ / ] dip [15:41:52] [ 2 / ] dip [15:44:58] *depends on... excuse my English. [15:51:17] I'm also confused with stack effect of spread. Quantity of it's inputs depends on length of seq. And we can't express this fact in stack effect, but we should I think. [16:02:51] good point. that is pretty strange and I think that's a shortcoming of the stack effect system [16:12:36] words which are declared inline have more strict stack checking [16:12:51] I think if a word like spread were declared inline it wouldn't compile [16:13:01] but I could be wrong, I'm no expert [16:17:56] \ spread see [16:18:04] oops. [16:18:22] Anyway, I can't get spread to compile at all when I use the exact same definition and I don't know why. [16:19:43] I get "cannot apply call to a run-time computed value" [16:20:03] : spread ( objs... seq -- ) deep-spread>quot call ; [16:20:16] Which is what I would have expected at first glance [16:22:40] * pierpal [pierpal!~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it] has quit (Quit: Poof). [16:22:57] * pierpal [pierpal!~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it] has joined the channel. [16:40:56] In the source code for combinators.factor, it says [16:40:59] ! Most of these combinators have compile-time expansions in [16:40:59] ! the optimizing compiler. [16:41:17] So I'm guessing there's hidden voodoo that makes it work. [16:52:08] * Sonderblade [Sonderblade!~bjourne@n164-p17.eduroam.kth.se] has quit (Quit: Konversation terminated!). [16:58:57] * mtp is now known as ^alex [17:07:59] How in the stack effect to express the fact of non-trivial dependence of the number of word outputs on the number of inputs? What should the stack effect be in case the number of outputs (and / or inputs) of a word depends on its specific arguments? [17:08:44] <^alex> the way i think of it is that factor is statically stacked [17:10:45] "statically stacked"? What does it mean? [17:11:55] <^alex> as opposed to statically typed [17:15:18] <^alex> if you have a word with unknown stack effect you have to declare the stack effect at call-time with the word call( [17:15:53] <^alex> err [17:15:56] <^alex> call( is for quotations [17:15:59] <^alex> and execute( is for words [17:17:20] * Sonderblade [Sonderblade!~bjourne@n164-p17.eduroam.kth.se] has joined the channel. [17:18:23] v0id_NULL: I get the feeling that you should avoid writing words that can produce a variable number of outputs. If that's what you need, put them in a sequence. [17:20:33] For words that can accept a variable number of inputs, the standard way seems to be macros. [17:20:48] For example, check out the narray word in the generalizations vocabulary. [17:21:19] Sorry, sequences.generalizations vocabulary. [17:22:05] ^alex: I know. But the problem is not to determine words with an beforehand unknown stack effect. My interest is in how expressive and restrictive the stack effects are. [17:22:06] The way it works is it takes a number on the top of the stack that indicates how many stack objects to operate on. [17:22:22] I handle this in my language by creating a function for each arity e.g. apMN applies a quote that takes M inputs and produces N outputs. [17:22:57] It may seem clumsy, but it works pretty well. [17:23:41] <^alex> i'd also like to point out that the compiler does keep enough static type information around that it can optimize eg. simd vectors to their primitive operations [17:24:27] hackerfoo: that soudns interesting. Factor already does this manually in certain places, e.g. the short-circuit combinators [17:26:13] You don't typically need high arities, and if you define things right, it's not hard to write all the variations: https://github.com/HackerFoo/poprc/blob/master/lib.ppr#L172-L201 [17:26:54] I've still thought about adding something like templates, though, for this reason, but I'm trying to keep it simple for now. [17:28:00] apMN is handled directly by the compiler for M and N 0-9. [17:48:22] * Sgeo_ [Sgeo_!~Sgeo@ool-18b98dd9.dyn.optonline.net] has joined the channel. [17:51:02] * Sgeo__ [Sgeo__!~Sgeo@ool-18b98dd9.dyn.optonline.net] has quit (Ping timeout: 256 seconds). [18:48:01] * pierpal [pierpal!~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it] has quit (Ping timeout: 248 seconds). [18:50:01] * mtp [mtp!pi@unaffiliated/mtp] has joined the channel. [18:50:18] * ^alex [^alex!pi@unaffiliated/mtp] has quit (Disconnected by services). [18:50:25] * mtp is now known as ^alex [18:52:59] * Sonderblade [Sonderblade!~bjourne@n164-p17.eduroam.kth.se] has quit (*.net *.split). [18:52:59] * delvinj [delvinj!~Miranda@c-73-164-9-150.hsd1.mn.comcast.net] has quit (*.net *.split). [18:53:04] * pierpal [pierpal!~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it] has joined the channel. [19:10:57] * v0id_NULL [v0id_NULL!~igor_@217.150.79.251] has quit (Ping timeout: 240 seconds). [19:37:14] * pierpal [pierpal!~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it] has quit (Quit: Poof). [19:37:31] * pierpal [pierpal!~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it] has joined the channel. [19:59:06] * pierpal [pierpal!~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it] has quit (Ping timeout: 256 seconds). [20:42:34] * pierpal [pierpal!~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it] has joined the channel. [20:51:52] * delvinj [delvinj!~Miranda@c-73-164-9-150.hsd1.mn.comcast.net] has joined the channel. [20:54:44] * pierpal [pierpal!~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it] has quit (Ping timeout: 255 seconds). [21:22:03] * pierpal [pierpal!~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it] has joined the channel. [21:26:21] * pierpal [pierpal!~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it] has quit (Read error: Connection reset by peer). [21:55:27] * pierpa [pierpa!57100917@gateway/web/freenode/ip.87.16.9.23] has joined the channel. [23:55:15] * Sgeo_ [Sgeo_!~Sgeo@ool-18b98dd9.dyn.optonline.net] has quit (Ping timeout: 260 seconds). [23:55:36] * Sgeo [Sgeo!~Sgeo@ool-18b98dd9.dyn.optonline.net] has joined the channel.