Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2016-05-24

| Channels | #marpa index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
01:49 ilbot3 joined #marpa
01:49 Topic for #marpa is now Start here: http://savage.net.au/Marpa.html - Pastebin: http://scsys.co.uk:8002/marpa - Jeffrey's Marpa site: http://jeffreykegler.github.io/Marpa-web-site/ - IRC log: http://irclog.perlgeek.de/marpa/today
05:31 ronsavage joined #marpa
13:23 kaare_ joined #marpa
14:24 kaare__ joined #marpa
14:36 kaare_ joined #marpa
16:51 editable-log thanks, makes some sense now
17:34 idiosyncrat_ joined #marpa
18:46 idiosyncrat_ The bi-lingual (Lua/Perl) Marpa may yet happen within Marpa::R3
18:48 idiosyncrat_ Recall earlier we'd discussed it, and I felt that it required a clean switch -- no more Perl action closures, only Lua ...
18:48 idiosyncrat_ this was too big a change for Marpa::R3 we felt -- many people who want the other new stuff won't want to switch to writing actions in Lua ...
18:49 idiosyncrat_ so they would be robbed of a chance to use the new featurs.
18:49 idiosyncrat_ s/featurs/features/
18:50 idiosyncrat_ Well, I think I have a solution where we "have our cake and eat it too", so that you could use either Perl actions and Lua actions, your choice.
18:51 idiosyncrat_ === So a question to the IRC channel ===
18:52 idiosyncrat_ What syntax to give Lua actions in the SLIF?
18:53 idiosyncrat_ Lua actions will be actual Lua code, unlike Perl closure actions, which must be names of Perl methods:  action => My_Action::some_perl_method
18:55 idiosyncrat_ Lua actions would be stuff like
18:55 idiosyncrat_ action => {{ local x = ...;  x[1], x[0] = x[0], x[1]; return x }}
18:55 idiosyncrat_ That Lua code snippet, btw, is actually working and in the latest test suite.
18:56 idiosyncrat_ Above I used a double-curly-bracket syntax.
18:57 idiosyncrat_ My question is what syntax should I actually use.
18:57 idiosyncrat_ Double and or single quotes are out, because of compatibility with my current syntax for them, which is too restrictive.
19:00 idiosyncrat_ What happened is that I was adding Lua with only internal usage as my goal, but when adding debugging, etc., I created most of the facilities I'd need to expose the Lua to the user.
19:03 kaare_ joined #marpa
20:12 idiosyncrat_ As a 2nd thought, I think I may use Lua's "long brackets"
20:12 idiosyncrat_ so that the above would be
20:13 idiosyncrat_ action => [[  local x = ...;  x[1], x[0] = x[0], x[1]; return x ]]
20:14 idiosyncrat_ Lua's long brackets allow "levels", so that the above is a long bracket of level 0,
20:14 idiosyncrat_ action => [=[ local x = ...;  x[1], x[0] = x[0], x[1]; return x ]=]
20:15 idiosyncrat_ contains a long bracket of level 1,
20:15 idiosyncrat_ action => [==[  local x = ...;  x[1], x[0] = x[0], x[1]; return x ]==]
20:16 idiosyncrat_ contains a long bracket of level 2, etc.  This allows the Lua code inside long brackets to contain its own long brackets.
22:19 ronsavage joined #marpa
22:22 ronsavage My first thought on Lua within the SLIF is how to handle complex, i.e. large/long, actions. Can we assume the the Lua in an action could call Lua code elsewhere if the code size is large?
22:23 ronsavage 'the the' => 'that the'.

| Channels | #marpa index | Today | | Search | Google Search | Plain-Text | summary