IRC Logs for #io Wednesday, 2014-01-15

zephyrtroniumwhat is the point of block()?00:09
prologicit defines a new code block00:13
prologican activatable object00:13
zephyrtroniumbut it can't be activated00:13
prologici.e: a new function/method/block00:13
prologicwhy not?00:13
prologicit's activated when you call it00:14
hashmalmyBlock call00:14
zephyrtroniumoh, you have to explicitly call it?00:14
prologicyes00:14
prologicin Io you do00:14
hashmalyes, unlike methods00:14
hashmalyou can pass arguments to call, if your block needs some00:15
zephyrtroniumstill doesn't make sense to me; might as well just define a method and not use self00:15
hashmalblocks use lexical scoping iirc00:15
prologicit's useful because blocks are scopeable00:15
hashmalbut methods use the receiver's scope00:15
prologicread the guide on the differences between blocks and methods00:15
prologicmethods are basically blocks00:15
prologicbut their scope has been set to the receiver00:15
hashmalto be fair, the guide doesn't mention that you have to call blocks explicitely00:16
prologicperhaps it should :)00:16
prologicin mio I make all methods/blocks use explicit calling semantics00:16
prologicvia foo() or bar()00:16
zephyrtroniumbut that's so much less pretty :c00:17
prologicno not really00:17
prologicit's fairly common in many languages to denote parens to call/activate the object00:17
prologicor in this case method/block (which is just an object)00:17
zephyrtroniumbut i'm a hipster and don't want to do what everyone else does00:18
hashmalhaha00:18
prologichah00:18
prologicthen go write your own lang :)00:18
zephyrtroniumwhy do that when io is already hipster? :D00:19
hashmalyou can even use io to implement your own language :)00:19
prologicIo isn't that much of a hipster ;)00:19
prologiclol00:19
prologicyou can use any language to implement any language00:19
prologicthat's kinda the point00:19
hashmalgiven google trends and the mailing list activity, io's hipster phase has ended :P00:20
hashmalprologic: I asked this recently but there was no one around; is there something like rack or wsgi for Io?00:21
zephyrtroniumi would like to see a programming language implemented in piet00:22
*** mkroehnert has quit IRC00:25
prologichashmal: no I'm not sure00:29
prologicthere rare some web libraires/addons/etc00:29
prologicbut nothing like wsgi afaik00:29
hashmalthanks00:32
jeri didn't read the whole scrollback but00:39
jera block and a method are the same thing with two differences. 1) A method's scope is dynamic, a block's is the context in which it was created (illustration: A := Object clone do(x := block); A x scope == A00:40
jerand 2) blocks activatable bit is disabled, because you usually want to pass a lexical closure (block) to some method, and you don't want it to activate when you do00:41
jerso instead of having to do: methodThatTakesABlock(getSlot("myBlock")) you could do just do methodThatTakesABlock(myBlock)00:42
zephyrtroniumfair enough01:06
zephyrtroniumthank you to all of you01:06
jerthe scope just affects lookup in the locals of a block/method01:33
jera method will, if it doesn't find the slot in the locals, go to the receiver, whereas a block will go to the context it was created in01:34
jerbut it's not a true lexical closure, since if A was changed some time between when x was created and when x was called, i.e., A foo := 10 when x was created, but A foo = 23 was hit at some point; if x's body asks for foo, it'll get value 2301:34
jerwhich may or may not be what you expect01:34
hashmaloh that's a detail that is good to know01:54
hashmalis there something special to "@" being prefixed in some places?01:55
*** bjz has quit IRC01:56
hashmalexample on: http://iolanguage.org/scm/io/docs/reference/index.html#/Networking/Socket/Server01:56
hashmalEcho clone @handleSocketFromServer(aSocket, self)01:57
hashmaloh nevermind02:00
hashmalhttp://iolanguage.org/scm/io/docs/reference/index.html#/Core/Core/Object/@02:00
hashmalthe answer was just there! :)02:00
*** bjz has joined #io02:00
*** hashmal has quit IRC02:27
*** bjz has quit IRC02:47
*** bjz has joined #io02:47
*** bjz has quit IRC02:54
*** bjz has joined #io02:55
*** bjz has quit IRC03:00
*** bjz has joined #io03:01
*** bjz has quit IRC03:01
*** bjz has joined #io03:01
*** bjz has quit IRC03:06
*** bjz has joined #io03:09
*** Raimondi has quit IRC03:25
*** Raimondi has joined #io03:45
*** bjz has quit IRC03:51
*** bjz has joined #io04:12
*** gatesphere has quit IRC04:13
*** hashmal has joined #io04:28
*** hashmal has quit IRC04:32
*** bjz has quit IRC04:54
*** bjz has joined #io04:54
*** bjz has quit IRC05:07
*** asie has joined #io05:07
*** bjz has joined #io05:07
*** asie has quit IRC05:29
*** bjz has quit IRC06:24
*** hashmal has joined #io06:29
*** hashmal has quit IRC06:33
*** fredreichbier has joined #io07:02
*** gatesphere has joined #io08:00
*** fredreichbier has quit IRC08:04
*** gatesphere has quit IRC08:06
*** bjz has joined #io08:25
*** hashmal has joined #io08:29
*** hashmal has quit IRC08:34
*** bjz has quit IRC08:46
*** bjz has joined #io09:06
*** pchalupa has joined #io09:10
*** bjz has quit IRC10:03
*** fredreichbier has joined #io10:04
*** fredreichbier has quit IRC10:29
*** hashmal has joined #io10:31
*** hashmal has quit IRC10:35
*** bjz has joined #io11:11
*** hashmal has joined #io12:31
*** hashmal has quit IRC12:35
*** fredreichbier has joined #io13:18
*** bjz has quit IRC13:46
*** fredreichbier has quit IRC13:48
*** bjz has joined #io13:48
*** hashmal has joined #io14:11
*** espiral has joined #io14:51
*** pchalupa has quit IRC15:42
*** hashmal has quit IRC16:02
*** hashmal has joined #io16:02
*** hashmal has quit IRC16:07
*** bjz has quit IRC17:22
*** hashmal has joined #io17:32
*** bjz has joined #io17:36
*** bjz has quit IRC17:37
*** hashmal has quit IRC17:37
*** bjz has joined #io17:37
*** fredreichbier has joined #io18:45
*** hashmal has joined #io19:21
*** fredreichbier_ has joined #io19:22
*** fredreichbier has quit IRC19:26
*** hashmal has quit IRC19:26
*** bjz has quit IRC20:52
*** bjz has joined #io20:55
*** hashmal has joined #io21:09
*** hashmal has quit IRC21:14
*** hashmal has joined #io21:55
*** mkroehnert has joined #io22:04
*** bjz has quit IRC22:36
*** bjz has joined #io22:39
*** gatesphere has joined #io23:11
*** locks_ has joined #io23:14
*** locks has quit IRC23:17
*** OpenSpace has quit IRC23:17
*** OpenSpace has joined #io23:17

Generated by irclog2html.py 2.11.0 by Marius Gedminas - find it at mg.pov.lt!