Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-05-14

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:01 derp_commander so for example, "func[x_] := 2*x-1" is actually the creation of a rule. x_ is the pattern for an arbitrary expression, which is to be scoped as "x", ":=" is the SetDelayed operator, which creates a rule whose evaluation is deferred, and the rest of the expression is the thing whatever matches that pattern gets replaces with, after scoping
00:01 derp_commander s/replaces/replaced/g
00:02 TimToady that's pretty much just a lambda
00:02 derp_commander in its simplest use case
00:03 TimToady one could certainly picture extending it into macroland
00:04 derp_commander http://reference.wolfram.com/language/ref/SetDelayed.html explains it in more detail
00:04 Actualeyes joined #perl6
00:06 derp_commander note that because, as a mathematical language, undefined variables are actually still valid objects (which can be used in expressions and so forth), you can do the substitution after the fact by using the replace operator /. on a rule set (an associative array of patterns)
00:07 psch m: my $func = 2 * * - 1; say $func(3)
00:07 camelia rakudo-moar 361448: OUTPUT«5␤»
00:08 psch from a perl-ish perspective (well, and C-ish, and Java-ish too i suppose) i'd dislike overloading [] like that
00:08 derp_commander psch: Mathematica uses [] as function parentheses
00:08 psch from the same perl-ish perspective, i'd readily accept e.g. ´` or `´
00:09 TimToady that's just cultural differences
00:09 psch yeah, i'm aware :)
00:09 TimToady I worry more about mental traps :)
00:09 psch i do agree, fundamentally it just seems like a lambda
00:09 derp_commander m: my &func($x) = 2+$x; say &func($x);
00:09 camelia rakudo-moar 361448: OUTPUT«5===SORRY!5=== Error while compiling /tmp/3qjyjlBqtq␤The () shape syntax in routine declarations is reserved (maybe use :() to declare a longname?)␤at /tmp/3qjyjlBqtq:1␤------> 3my &func($x7⏏5) = 2+$x; say &func($x);␤    expecting any of:…»
00:10 grondilu joined #perl6
00:10 psch m: my &func = -> $x { 2 + $x }; say func(2)
00:10 camelia rakudo-moar 361448: OUTPUT«4␤»
00:11 TimToady note this is not what mathematica is doing
00:11 derp_commander right
00:11 TimToady that's more of a macro rewrite system
00:11 TimToady for algebra and such
00:12 TimToady assuming that by default is less confusing to mathematicians, and more confusing to mere mortals :)
00:12 TimToady so P6 separates those concerns
00:13 derp_commander TimToady: assuming what? That undefined variables are symbols which can have their values substituted freely?
00:14 dwb Hrumph, I'm dumb: https://gist.github.com/anonymous/9dcf4e0de929423e24992da03669bd9f
00:14 TimToady rewrite rules tend toward surprise for people who think in terms of data mutation, since the referentiality is deferred
00:14 TimToady so P6 defaults to a more evaluate-it-by-default model
00:15 TimToady deferred evaluation then takes more work
00:15 TimToady one of those tradeoffs I keep mentioning :)
00:15 derp_commander TimToady: right, and the other problem is Mathematica doesn't really leave much room for OO
00:16 TimToady sure, it's gonna be pretty thoroughly FP
00:16 TimToady we rather like the balance we've struck there
00:17 psch m: https://gist.github.com/anonymous/9dcf4e0de929423e24992da03669bd9f
00:17 camelia rakudo-moar 361448: OUTPUT«5===SORRY!5=== Error while compiling /tmp/8K9AIlZ5CQ␤Two terms in a row across lines (missing semicolon or comma?)␤at /tmp/8K9AIlZ5CQ:2␤------> 3Could not find symbol '&foo'7⏏5<EOL>␤    expecting any of:␤        infix␤        infix st…»
00:18 * psch actually looks at the gist now
00:18 derp_commander TimToady: the one exception in Mathematica, is you can use the TagSet and TagSetDelayed opers to attach a rule to a symbol
00:18 derp_commander as opposed to the global lexical scope
00:18 psch dwb: subs are 'my' (i.e. lexically) scoped by default, which means they aren't visible outside their own package
00:19 psch m: module A { our sub foo { say "ok" } }; A::foo; module B { sub foo { say "never gonna work" } }; B::foo
00:19 camelia rakudo-moar 361448: OUTPUT«ok␤Could not find symbol '&foo'␤  in block <unit> at /tmp/Zl9qyjpROz line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/Zl9qyjpROz line 1␤␤»
00:19 TimToady Larry's Law: 90% of any given programming paradigm does not forbid interop with other programming paradigms.  It's only that last 10% that turns it into a religion.
00:20 dwb psch: derp, thanks!
00:20 derp_commander TimToady: well sure, I can have a lot of fun with the /: operator, but that still is only a binding to a symbol
00:20 derp_commander dwb: what did I do?
00:21 AlexDaniel m: sub infix:<-> { $^a + $^b }; say 2 − 2
00:21 camelia rakudo-moar 361448: OUTPUT«0␤»
00:21 AlexDaniel ZoffixWin: ↑ :P
00:21 dwb derp_commander: You responded to my herp derp edness.
00:21 derp_commander dwb: wasn't me
00:21 dwb Apologies for lighting up your IRC client.
00:21 ZoffixWin You're cheating
00:22 AlexDaniel ZoffixWin: if “using Perl 6” is cheating, then yes
00:22 derp_commander ZoffixWin: define cheating, please
00:22 TimToady derp_commander: in P6 it's actually impossible to attach a rule outside of its intended lexical scope, so you can't rewrite other people's code for them on the fly
00:22 ZoffixWin derp_commander, I think you're involving yourself in too many conversations :) neither dwb nor I were replying to you :)
00:22 ZoffixWin m: sub infix:<⁤> { $^a + $^b }; say 2⁤2
00:22 camelia rakudo-moar 361448: OUTPUT«4␤»
00:22 ZoffixWin AlexDaniel, ^ :)
00:23 psch m: { CALLER:('&infix:<+>') := sub { $^a - $^b } }; say 1 + 2
00:23 camelia rakudo-moar 361448: OUTPUT«===SORRY!===␤This type (QAST::WVal) does not support positional operations␤»
00:23 ZoffixWin .u -−
00:23 yoleaux U+002D HYPHEN-MINUS [Pd] (-)
00:23 yoleaux U+2212 MINUS SIGN [Sm] (−)
00:23 psch m: { CALLER::('&infix:<+>') := sub { $^a - $^b } }; say 1 + 2
00:23 camelia rakudo-moar 361448: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Gwb4CKq4yf␤Cannot use bind operator with this left-hand side␤at /tmp/Gwb4CKq4yf:1␤------> 3ER::('&infix:<+>') := sub { $^a - $^b } 7⏏5}; say 1 + 2␤»
00:23 derp_commander ZoffixWin: no, I think he confused who was the one helping him
00:23 ZoffixWin derp_commander, no, "derp" is a word and he used it when his mistake was pointed out -_-
00:23 derp_commander OHHHHHHH
00:23 ZoffixWin :)
00:24 AlexDaniel ZoffixWin: I don't know what to say now
00:24 derp_commander derp ;-P
00:24 ZoffixWin AlexDaniel, about what? :)
00:24 * TimToady thinks of "derp" as an abortive facepalm
00:24 derp_commander TimToady: it's more like a self-facepalm
00:24 AlexDaniel ZoffixWin: about ⁤
00:25 ZoffixWin m: sub infix:<⁤> { $^a + $^b }; sub infix:<⁤⁤> { $^a - $^b }; say 2⁤2⁤42
00:25 camelia rakudo-moar 361448: OUTPUT«46␤»
00:25 ZoffixWin ^_^
00:25 derp_commander a facepalm is "you're being stupid", derp is "I'm being stupid"
00:25 TimToady ZoffixWin: now be nice
00:25 TimToady invisible characters are just evil
00:25 psch always these spooky invisible operators :/
00:26 derp_commander ZoffixWin: I don't even know much Perl 6 and I know that's just plain nuts
00:26 dwb Then my derp was a multi, I suppose.
00:26 psch .u ⁤⁤
00:26 yoleaux U+2064 INVISIBLE PLUS [Cf] (<control>)
00:26 ZoffixWin I wonder why that gave 46 and not -38
00:26 psch .u ⁤
00:26 yoleaux U+2064 INVISIBLE PLUS [Cf] (<control>)
00:26 kurahaupo joined #perl6
00:26 psch .u ⁤
00:26 yoleaux U+2064 INVISIBLE PLUS [Cf] (<control>)
00:26 psch ...i copied both /o\
00:26 derp_commander .u INVISIBLE CHEESEBURGER
00:26 psch seriously ZoffixWin
00:26 yoleaux No characters found
00:27 ZoffixWin Oh... fat fingers again >_<
00:27 ZoffixWin m: sub infix:<⁤> { $^a + $^b }; sub infix:<⁤⁤> { $^a - $^b }; say 2⁤2⁣42
00:27 camelia rakudo-moar 361448: OUTPUT«5===SORRY!5=== Error while compiling /tmp/MLIHx_weDu␤Bogus postfix␤at /tmp/MLIHx_weDu:1␤------> 3}; sub infix:<⁤⁤> { $^a - $^b }; say 2⁤27⏏5⁣42␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤    …»
00:27 ZoffixWin Eh, whatever. :)
00:27 ZoffixWin psch, the other one is invisible separator
00:27 AlexDaniel ZoffixWin: guess who got caught in his own trap!
00:27 ZoffixWin :)
00:28 TimToady He that diggeth a pit shall surely fall into it.
00:28 AlexDaniel well, not necessarily
00:28 TimToady We're talking roadrunner ethics here.
00:28 derp_commander "It is a fact of history that classes give birth to their own grave-diggers." --Marx
00:29 TimToady which one was that, Groucho? :P
00:29 derp_commander lolno
00:30 psch m: class C { method new { class grave-digger { }.new } } # oh god
00:30 camelia rakudo-moar 361448: ( no output )
00:31 psch m: class C { method new { class grave-digger { }.new } }; my C $c .= new;
00:31 camelia rakudo-moar 361448: OUTPUT«Type check failed in assignment to $c; expected C but got C::grave-digger (C::grave-digger.new)␤  in block <unit> at /tmp/CVeawMx2Oa line 1␤␤»
00:31 psch that is perfectly reasonable though, i'd say :)
00:32 AlexDaniel m: multi class { } # hey look! a multi class! :PP
00:32 camelia rakudo-moar 361448: ( no output )
00:32 geekosaur classic :p
00:33 TimToady anyway, as you can see, we have no trouble adding new Unicode operators :)
00:33 derp_commander m: class bourgeoisie { method new { class proletariat { method new {say 'Workers of the world, unite!';} }.new } }.new;
00:33 camelia rakudo-moar 361448: OUTPUT«Workers of the world, unite!␤»
00:33 ShimmerFairy joined #perl6
00:34 TimToady FP is the opiate of the nomenclatura...
00:34 derp_commander lol()
00:35 AlexDaniel what I really like about Perl 6 is that it allows me to write nonsense. Sometimes it makes my day brighter
00:35 AlexDaniel though sometimes people say that such code should produce errors like “Really stupid variable name! Don't do things like that”
00:36 derp_commander AlexDaniel: anyone can write nonsense, but it takes an expert to write nonsense that will compile
00:36 AlexDaniel fools! :)
00:36 AlexDaniel aw, that message got delayed a bit
00:37 AlexDaniel derp_commander: have you ever tried doing that in perl 6?
00:37 derp_commander also, warnings about variable names sound more like the proper provenance of an IDE
00:37 psch m: class bourgeoisie { method defenestrate { say "<wilhelm scream>" }; method new { class proletariat { method new {say 'Workers of the world, unite!'; CALLER::<self>.defenestrate() } }.new } }.new;
00:37 camelia rakudo-moar 361448: OUTPUT«Workers of the world, unite!␤<wilhelm scream>␤»
00:37 AlexDaniel derp_commander: the error messages are so great that they will guide you step by step to something compilable
00:38 derp_commander AlexDaniel: that class warefare joke was the first non-trivial thing I've ever written in Perl 6 :-)
00:38 AlexDaniel m: (?"(?{noEUSHOUAuC:4}3C13∞]
00:38 camelia rakudo-moar 361448: OUTPUT«5===SORRY!5=== Error while compiling /tmp/eDVTZMHBRv␤Confused␤at /tmp/eDVTZMHBRv:1␤------> 3(?"(?{noEUSHOUAuC:7⏏4}3C13∞]␤    expecting any of:␤        colon pair␤»
00:38 AlexDaniel m: (?"(?{noEUSHOUAuC:k(4)}3C13∞]
00:38 camelia rakudo-moar 361448: OUTPUT«5===SORRY!5=== Error while compiling /tmp/V2GlZwayxP␤Unable to parse expression in double quotes; couldn't find final '"' ␤at /tmp/V2GlZwayxP:1␤------> 3(?"(?{noEUSHOUAuC:k(4)}3C13∞]7⏏5<EOL>␤    expecting any of:␤        horizontal wh…»
00:39 AlexDaniel m: (?"(?{noEUSHOUAuC:k(4)}3C13∞]"
00:39 camelia rakudo-moar 361448: OUTPUT«5===SORRY!5=== Error while compiling /tmp/EJUKFbinrV␤Unable to parse expression in parenthesized expression; couldn't find final ')' ␤at /tmp/EJUKFbinrV:1␤------> 3(?"(?{noEUSHOUAuC:k(4)}3C13∞]"7⏏5<EOL>␤    expecting any of:␤        s…»
00:39 AlexDaniel m: (?"(?{noEUSHOUAuC:k(4)}3C13∞]")
00:39 camelia rakudo-moar 361448: OUTPUT«5===SORRY!5=== Error while compiling /tmp/pK6U9axXU1␤Undeclared routine:␤    noEUSHOUAuC:k<4> used at line 1␤␤»
00:40 TimToady m: say foo
00:40 camelia rakudo-moar 361448: OUTPUT«5===SORRY!5=== Error while compiling /tmp/M1gcEQgU4l␤Undeclared routine:␤    foo used at line 1␤␤»
00:40 TimToady m: say bar
00:40 camelia rakudo-moar 361448: OUTPUT«5===SORRY!5=== Error while compiling /tmp/BZ2iCpDuzu␤Undeclared routine:␤    bar used at line 1. Did you mean 'VAR', 'bag'?␤␤»
00:40 TimToady m: say bag
00:40 camelia rakudo-moar 361448: OUTPUT«5===SORRY!5===␤Argument to "bag" seems to be malformed␤at /tmp/9b9ZRA0OVC:1␤------> 3say bag7⏏5<EOL>␤Other potential difficulties:␤    Function "bag" may not be called without arguments (please use () or whitespace to denote arguments, …»
00:40 TimToady m: say bag()
00:40 camelia rakudo-moar 361448: OUTPUT«bag()␤»
00:40 TimToady there you go :)
00:40 sortiz m: my $foo:::_ = 42; say ::<$foo:::_>; MY::.keys.say; # btw AlexDaniel.
00:40 camelia rakudo-moar 361448: OUTPUT«42␤($=pod !UNIT_MARKER EXPORT $_ $! ::?PACKAGE GLOBALish $¢ $=finish $/ $foo:::_ $?PACKAGE)␤»
00:41 derp_commander so anyway, I like Mathematica's idea of defining operators by way of rulesets, as opposed to Python which uses doubly-underscored special method names, but I like how Python leaves the behavior up to the objects themselves
00:41 AlexDaniel m: sub noEUSHOUAuC {}; (?"(?{noEUSHOUAuC :k(4)}3C13∞]")
00:41 camelia rakudo-moar 361448: OUTPUT«WARNINGS for /tmp/B_XWhVmmHi:␤Useless use of "?" in expression "?\"(?{noEUSHOUAuC :k(4)}3C13∞]\"" in sink context (line 1)␤Unexpected named parameter 'k' passed␤  in sub noEUSHOUAuC at /tmp/B_XWhVmmHi line 1␤  in block <unit> at /tmp/B_XWhVmmHi l…»
00:41 AlexDaniel look! A run-time error
00:41 AlexDaniel so it compiles
00:42 TimToady derp_commander: we're fine with delegating methods to objects, but we delegate language tweaking only to lexical scopes
00:43 TimToady confusing those is a recipe for disaster
00:43 derp_commander TimToady: I'm aware of the decisions the Perl 6 community has made, I'm just musing on other possibilities
00:43 AlexDaniel unexpected parameter, let's fix that. sink context, let's fix that too. Now it wars about nil in string context, but that's fixable
00:43 AlexDaniel m: sub noEUSHOUAuC(:$k) {‘’}; say (?"(?{noEUSHOUAuC :k(4)}3C13∞]")
00:43 camelia rakudo-moar 361448: OUTPUT«True␤»
00:43 AlexDaniel \o/
00:43 AlexDaniel warns*
00:44 AlexDaniel there was one error message that I didn't like, but then again, it's about our lovely colons
00:44 AlexDaniel m: sub noEUSHOUAuC() {}; noEUSHOUAuC:k(4)
00:44 camelia rakudo-moar 361448: OUTPUT«5===SORRY!5=== Error while compiling /tmp/0g456e5xlc␤Undeclared routine:␤    noEUSHOUAuC:k<4> used at line 1. Did you mean 'noEUSHOUAuC'?␤␤»
00:45 derp_commander as for implementation, one way is to scan the expression for objects, load their rules, and then apply them, one-by-one, in some deterministic order
00:47 TimToady but if you've already scanned the expression, you can't change the parse without reparsing, which is evil
00:47 TimToady it tends to fall into "One True Language" kinds of systems
00:47 TimToady like Tcl
00:47 TimToady or Lisp, for that matter
00:48 derp_commander TimToady: I think you're confusing the lexer with the parser
00:49 geekosaur no difference here, or in other modern parsers
00:49 TimToady P6 is a postmodern parser--there is no lexer.
00:49 geekosaur splitting them is a holdover from PDP11 64k address spaces
00:49 TimToady or looking at it the other way, a lexer is merely epiphenominal to the parser
00:49 derp_commander geekosaur: except if we do split them up, we can load the ruleset at the lexing stage, then apply them at the parsing stage
00:50 TimToady then your lexer must understand the One True Lexing Language
00:51 derp_commander TimToady: um, you mean it has an idea what *delimiters* are?
00:51 TimToady amongn other things
00:51 TimToady we are very serious when we say that those things are all derived concepts in P6 grammars
00:52 TimToady when you quote anything, you are going into a specific sublanguage that knows about those delimiters
00:52 derp_commander TimToady: yes, I know, everything's a regex to you folks
00:53 TimToady and everything's a grammar, which is a class, and everything is a rule, which is a method, which is multidispatched by the lexer
00:53 TimToady regex is a very small part of it
00:53 psch TimToady++
00:53 TimToady (by the classical definition)
00:54 derp_commander TimToady: Mathematica allows you to create new tokens, hence altering the lexer, but that comes via a separate package, and the way it works is kinda wonky.
00:54 TimToady and by the classical definition, the regex bits are the parts we can deduce a lexer from
00:54 TimToady and we deduce a new lexer every time you tweak the language in a given lexical scope
00:55 TimToady m: say Q/$x/
00:55 camelia rakudo-moar 361448: OUTPUT«$x␤»
00:55 TimToady m: say Q:s/$x/
00:55 camelia rakudo-moar 361448: OUTPUT«5===SORRY!5=== Error while compiling /tmp/wRjjbSER9N␤Variable '$x' is not declared␤at /tmp/wRjjbSER9N:1␤------> 3say Q:s/7⏏5$x/␤»
00:56 TimToady here we start off with the root Q language from the current language braid, and mix in the grammar rule that recognizes $, and deduce a lexer that recognizes $ as a pure regex prefix to some other rule, and then parse using that new language in the lexical scope of the //
00:56 TimToady we really dislike arguments from "tradition" here :)
00:57 TimToady at the end of that, we pop back to the language outside of the Q:s//
00:58 TimToady (we do some caching so we don't redo this work, of course)
00:58 * TimToady should probably pop his scope and go get dinner...
00:59 derp_commander TimToady: if I didn't know better, I'd say either you, or the whole Perl 6 community, was high on something
00:59 psch butterflhigh, maybe... :)
01:00 TimToady we've just been thinking about how to do things righter for 15 years
01:00 ZoffixWin ehehe :)
01:01 derp_commander "It's not a language, it's a braid of languages! With sublanguages! You can make your OWN language! Wowww, pretty butterflies!"
01:01 ZoffixWin :D
01:01 skids But, it works.
01:01 TimToady admittedly, it's not fast...yet...
01:02 derp_commander I mean, you're literally at the point you could turn /dev/urandom's output into a valid Perl sublang
01:02 TimToady but the first time you use " in a program, it actually does derive Q:qq for you
01:03 TimToady that's easy, using token { .*? }  :)
01:03 AlexDaniel derp_commander: is there anything bad about it?
01:03 skids derp_commenader: that's pretty close to the Q:to<some_very_unlikely_char_sequence> sublang :-)
01:03 TimToady we do expect people to think about it a little before choosing to shoot themselves in the foot
01:04 derp_commander AlexDaniel: I could easily spend the next hour enumerating various security holes that can introduce
01:04 TimToady no security hole till you assign some semantics to .*?
01:04 TimToady well, maybe DoS...
01:04 TimToady anyway, dinner &
01:05 derp_commander sounds like a great language... a great domain-specific language
01:05 psch i don't see how "turn /dev/urandom output into <something that compiles>" depends on sublanges
01:05 psch any language that does text substitution can do that
01:06 psch sure, there's an extra step
01:06 derp_commander psch: it was something of a joke
01:06 psch derp_commander: oh.
01:06 psch ha ha
01:06 * psch goes to bed :)
01:06 psch g'nite #perl6 o/
01:06 derp_commander re.sub(r'.*',r'print "OHAI"')
01:06 sortiz psch o/
01:07 skids anyway, that's one good reason why such tweaking is contained by scoping.
01:07 derp_commander re.sub(string,r'.*',r'print "OHAI"')
01:07 grondilu m: say r{}.WHAT
01:07 camelia rakudo-moar 361448: OUTPUT«5===SORRY!5=== Error while compiling /tmp/trshFSEbEM␤Undeclared routine:␤    r used at line 1␤␤»
01:08 * grondilu is not sure what r'' is
01:08 grondilu m: say r''.WHAT
01:08 camelia rakudo-moar 361448: OUTPUT«5===SORRY!5=== Error while compiling /tmp/5jVhvYG7dP␤Two terms in a row␤at /tmp/5jVhvYG7dP:1␤------> 3say r7⏏5''.WHAT␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statem…»
01:08 derp_commander grondilu: python's syntax for raw strings
01:08 derp_commander it automatically escapes all backslashes
01:09 grondilu oh yeah that was python code
01:09 * grondilu wonders how he could have thought otherwise
01:09 derp_commander dunno, lack of sleep?
01:09 AlexDaniel lack of perl 6
01:10 grondilu funny thing is I was about to say that r'.*',r'print "OHAI"' looked very confusing
01:10 grondilu I was about to suggest using {} instead of '', like r{.*}
01:11 derp_commander grondilu: the syntax of prefixing the string with a character is probably Perl-derived. The same thing is done with u/b
01:11 grondilu it's funny because people often say that python code is cleaner than perl code, in that case it was quite the opposite
01:12 derp_commander though some of that is because I omitted the import for re, and never defined the string variable
01:13 pierre_ joined #perl6
01:13 skids Actually I think that harkens back to sh's test
01:13 derp_commander skids: wherever it's from
01:14 grondilu quite probably, there is not much genuinely Perlish, since Perl was a mix of sh/C/awk or something.
01:14 sortiz In C++ the strings can be prefixed too.
01:15 jdv79 ZoffixWin: what's your next post about?
01:16 ZoffixWin jdv79, I don't have one
01:16 geekosaur sh, c, csh, awk, a bit of sed and a mainframe basic (iirc for the `foo while bar` syntax which I think I first saw in a basic for tops/20)
01:17 derp_commander some English, maybe a little Lisp, and not even Larry Wall knows what else
01:20 derp_commander oh, another thing: while I know it's also used for comments, I kinda think # is a more appropriate sigil for hashes, since it's literally called (among other things) a hash mark
01:20 jdv79 ZoffixWin: btw, nice tests in your irc module
01:21 ZoffixWin Thanks. I always pride myself on doing thorough testing :P
01:21 skids "hash" is really using a specific implementation to name a general category.
01:22 derp_commander skids: yeah, but it's still the most common implementation thereof
01:22 jdv79 is there a glyph for map or dictionary?
01:22 ZoffixWin .u map
01:22 yoleaux U+05BC HEBREW POINT DAGESH OR MAPIQ [Mn] (◌ּ)
01:22 yoleaux U+26EF MAP SYMBOL FOR LIGHTHOUSE [So] (⛯)
01:22 yoleaux U+A0B8 YI SYLLABLE MAP [Lo] (ꂸ)
01:23 ZoffixWin I always thought % looked like an 'H'
01:23 cpage_ joined #perl6
01:24 derp_commander .u dictionary
01:24 yoleaux No characters found
01:24 sortiz And in fact % means Associative, with a default 'is Hash'
01:24 derp_commander .u book
01:24 yoleaux U+1F4D1 BOOKMARK TABS [So] (📑)
01:24 yoleaux U+1F4D5 CLOSED BOOK [So] (📕)
01:24 yoleaux U+1F4D6 OPEN BOOK [So] (📖)
01:26 BenGoldberg joined #perl6
01:26 ZoffixWin m: sub term:<📑> is rw {state %h}; 📑<foo> = 42; say 📑
01:26 camelia rakudo-moar 361448: OUTPUT«{foo => 42}␤»
01:26 ssotka joined #perl6
01:26 ZoffixWin ^_^
01:28 BenGoldberg joined #perl6
01:33 ZoffixWin m: sub term:<📑> is rw {state %h}; sub postcircumfix:<⇦📄 ⁤> is rw { $^a{$^b} }; 📑⇦📄 'foo'⁤       = 42; say 📑
01:33 camelia rakudo-moar 361448: OUTPUT«{foo => 42}␤»
01:33 ZoffixWin eehehe
01:34 ZoffixWin m: sub term:<📑> is rw {state %h}; sub postcircumfix:<⇦📄 ⁤> is rw { $^a{$^b} }; 📑⇦📄 'foo' = 42; say 📑
01:34 camelia rakudo-moar 361448: OUTPUT«5===SORRY!5=== Error while compiling /tmp/HxxTRv8SML␤Unable to parse expression in postcircumfix:sym<⇦📄 ⁤>; couldn't find final $stopper ␤at /tmp/HxxTRv8SML:1␤------> 3⇦📄 ⁤> is rw { $^a{$^b} }; 📑⇦📄 'foo' = 427⏏5; say …»
01:38 pierre_ joined #perl6
01:46 itcharlie left #perl6
01:47 ilbot3 joined #perl6
01:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:54 BenGoldberg joined #perl6
01:56 ZoffixWin m: sub term:<⁢> is rw {state @}; sub postcircumfix:<⁣ ⁤> is rw {$^a[$^b]}; ⁢.push: 42; ⁢⁣1⁤ = 72; say ⁢
01:56 camelia rakudo-moar 361448: OUTPUT«[42 72]␤»
01:56 ZoffixWin ahaha. My job here is done :P
01:58 grondilu empty terms should be forbidden imho.  I vaguely remember TimToady allowed them some time ago, can't remember why.
01:59 sortiz grondilu, isn't empty, ZoffixWin used an invisible char.
01:59 ZoffixWin grondilu, it's not really empty :P
01:59 grondilu of course it's not, but it's just as if
01:59 ZoffixWin The 1 = 72 bit is what I'm especially proud of :D
02:05 ZoffixWin .oO( modify Brainfuck operators to use invisible Unicode chars instead.... ??? PROFIT! )
02:05 ZoffixWin I just need a catchy name
02:06 sortiz lol
02:06 geekosaur sounds like that belongs in Whitespace rather than Brainfuck >.>
02:07 noganex_ joined #perl6
02:07 ZoffixWin But those chars aren't whitespace!
02:08 ZoffixWin m: '⁣'.uniprop.say
02:08 camelia rakudo-moar 361448: OUTPUT«Cf␤»
02:08 ZoffixWin Oh, there's a language named Whitespace :(
02:12 derp_commander indeed there is!
02:15 * ZoffixWin came up with the name for his new lang: "Anguish"
02:15 derp_commander haha funny
02:16 ZoffixWin perl6 -MAcme::Anguish -e ''   <-- all programs will look like that
02:17 derp_commander for mine, I was thinking of "Siga"
02:24 cpage_ joined #perl6
02:34 BenGoldberg joined #perl6
02:36 ZoffixWin jdv79, why were you asking about my next article?
02:36 ZoffixWin (it's just now I know what it'll be, and I'll probably churn it out tomorrow)
02:37 jdv79 just curious.  looking for inspirations.
02:58 mr-foobar joined #perl6
03:14 mr-foobar joined #perl6
03:17 Ben_Goldberg joined #perl6
03:21 ShimmerFairy joined #perl6
03:27 Xliff joined #perl6
03:29 cpage_ joined #perl6
03:34 TEttinger ZoffixWin: make all the numbers use factoradic representation, no other way to enter an integer.
03:37 TEttinger alternately, the numbers use balanced pentary (or whatever base 5 is), the keywords are all emoji, and the math symbols change in meaning depending on the checksum of your source code to that point
03:38 Sqirrel joined #perl6
03:41 jdv79 is it possible to use a modifier after a sub call using the colon form?
03:42 jdv79 m: say: "asdf" if 1 # anyway to make this work?
03:42 camelia rakudo-moar 361448: OUTPUT«WARNINGS for /tmp/_jd51WTq3K:␤Useless use of constant string "asdf" in sink context (line 1)␤»
03:46 kaare_ joined #perl6
03:50 sortiz m: (say: "asdf") if 1; # Make priority explicit
03:50 camelia rakudo-moar 361448: OUTPUT«WARNINGS for /tmp/fts1ggqF0l:␤Useless use of constant string "asdf" in sink context (line 1)␤»
03:53 sortiz :P
04:02 molaf joined #perl6
04:10 pierrot joined #perl6
04:11 BenGoldberg TEttinger, perl6 is designed with -Ofun, not with -Oabsurd.
04:12 TEttinger not for perl6, for ZoffixWin's language that needs more horror to be called Anguish
04:12 BenGoldberg Hmm...
04:13 cpage_ joined #perl6
04:14 BenGoldberg Well, it needs to be eviller than Malbolge, for starters :)
04:21 mr-foobar joined #perl6
04:30 BenGoldberg joined #perl6
04:46 TEttinger ah, better. the keywords are all a combination of an APL character (with different meaning than they normally have), one or more Malayalam diacritics applied to an emoji, then a Cyrillic letter. designed to make text entry as hard as possible
04:47 ggoebel115 joined #perl6
04:47 TEttinger the only acceptable whitespace is the runic one
04:49 TEttinger hm,    does this work?
04:50 mr-foobar joined #perl6
04:52 Cabanossi joined #perl6
04:55 jack_rabbit joined #perl6
05:13 BenGoldberg joined #perl6
05:19 mr-foobar joined #perl6
05:22 pierre_ joined #perl6
05:26 CIAvash joined #perl6
05:28 huggable joined #perl6
05:28 mr-foobar joined #perl6
05:29 dontTrackme joined #perl6
05:37 mr-foobar joined #perl6
05:44 loren joined #perl6
05:45 kurahaupo joined #perl6
05:59 loren Hi, Perl6 everyone
05:59 mr-foobar joined #perl6
06:01 loren Does anyone can help me ?
06:03 sortiz \o loren.
06:03 loren sortiz, \o
06:03 loren I found a problem about class or role reference each other, there is a test at https://gist.github.com/araraloren/54eab01628a5cc07d044f7dedf30cf73
06:04 loren Can u have a look this problem ?
06:05 sortiz At first seems weird that inside 'something.pm6' you 'use something'.
06:06 Actualeyes joined #perl6
06:07 sortiz Seems the names are inverted.
06:07 loren sorry, wait me
06:07 cpage_ joined #perl6
06:08 loren the file name is wrong .. re look  https://gist.github.com/araraloren/54eab01628a5cc07d044f7dedf30cf73
06:09 loren Should be like this .
06:10 loren sortiz, en
06:11 buharin joined #perl6
06:11 buharin hiho
06:11 Xliff \o #perl6
06:11 loren \o .
06:12 buharin ??
06:14 sortiz loren, the other problem is that if 'something.pm6' uses reference, 'reference.pm6' *can not* 'use something'.
06:15 loren so i can not use like that ?
06:15 sortiz No, no circular uses allowed.
06:15 loren but if i want use *Something* under reference.pm6,  what should i do .?
06:17 timotimo there's always the "put the things into the same module" and "pull the common dependencies out"
06:17 broquaint joined #perl6
06:18 timotimo as well as "allow a variable to keep that dependency and resolve it later on when things have settled down"
06:18 raydiak didn't there used to be some helpful error message about circular module loading instead of running until it blows up?
06:18 timotimo via the GLOBAL:: namespace
06:19 loren yeah, i think compiler should warning me, or report a error
06:19 cpage_ joined #perl6
06:19 timotimo yeah, i suppose so
06:19 timotimo it's probably just a small matter of programming
06:19 timotimo that nobody got a round tuit for yet
06:20 sortiz Yep, that a can be expected but NYI.
06:23 pierre_ joined #perl6
06:28 raydiak https://github.com/rakudo/rakudo/blob/nom/docs/ChangeLog says circular module loading detection was initially added in 2012.08, broke at some point, was fixed in 2015.12, and apparently is now broken again...
06:36 mr-foobar joined #perl6
06:38 sortiz There is a ticket open: RT#126688
06:38 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=126688
06:46 mr-foobar joined #perl6
06:50 cpage_ joined #perl6
06:51 pierre_ joined #perl6
06:55 pierre_ joined #perl6
06:56 wamba joined #perl6
07:02 mr-foobar joined #perl6
07:12 mr-foobar joined #perl6
07:16 timotimo do you folks know how "unscrupulous" (english) is not the opposite of "skrupellos" (german)?
07:17 timotimo if we want perl6 to feel more like a natural language, we clearly need something that's exactly spelled like something in another programming language, but actually means the opposite
07:17 huf perl5's continue was p good at this
07:17 timotimo like, how about this, we have "unnumeric" mean the same thing as "is this like a number?"
07:18 dontTrackme joined #perl6
07:18 buharin joined #perl6
07:18 firstdayonthejob joined #perl6
07:28 mr-foobar joined #perl6
07:29 buharin joined #perl6
07:34 domidumont joined #perl6
07:34 domidumont joined #perl6
07:35 sortiz In german the postfix particle 'los' negate, I guess.
07:35 rindolf joined #perl6
07:36 timotimo yup, whereas in english postfixparticle "lous" is just "this word be an adjective"
07:38 espadrine joined #perl6
07:40 domidumont joined #perl6
07:41 timotimo also, there's a postfix particle "lös" that's not used very often - i think it's actually mostly colloquial perhaps? - that is the opposite of 'los' %)
07:41 timotimo skrupulös. fantastic
07:41 timotimo well, it'd be "skrupellös", but that doesn't sound right at all
07:46 cpage_ joined #perl6
07:51 BenGoldberg joined #perl6
07:56 rodarmor joined #perl6
07:57 BenGoldberg joined #perl6
07:59 mr-foobar joined #perl6
08:11 darutoko joined #perl6
08:12 masak timotimo: in Swedish, -lös would mean "without ..."
08:12 masak good antenoon, #perl6
08:26 mr-foobar joined #perl6
08:27 masak how much of an effort do people think it'd be to write a C compiler in Perl 6?
08:27 masak it feels bigger than the average mini-challenge... but how much bigger?
08:28 timotimo ugh. if you can get away with only supporting a C from, i don't know, 1980, perhaps?
08:29 masak I don't think I'm thinking "feature complete" here
08:29 masak I'm thinking "can compile 'hello world' into a runnable a.out"
08:30 timotimo *shrugs*. if you only need hello world, you can cut *all* the corners :D
08:30 pierre_ joined #perl6
08:30 timotimo i haven't thought about building a c compiler. but maybe the tcc is a good place to look for inspiration?
08:31 masak url?
08:31 timotimo not sure if it's internally nice and clean or if it's golf-class code
08:31 BenGoldberg joined #perl6
08:31 timotimo http://bellard.org/tcc/ - this one
08:31 domidumont joined #perl6
08:31 timotimo i heard there's a linux livecd that comes not with a compiled kernel but with tcc and the kernel source code
08:31 timotimo and it just compiles a kernel for you in a few seconds upon boot
08:32 masak cute
08:33 timotimo turns out your code really runs rather ridiculously fast if it fits completely into the cpu's cache or something crazy like that
08:36 timotimo 29.6 MBytes/second on a 2.4ghz pentium 4 ... that might actually be as fast as the RAM would go in a system that old :P :P
08:45 rindolf joined #perl6
08:56 pmurias joined #perl6
08:58 pmurias masak: would a miniature C compiler be mostly a grammar generating assembly?
08:58 pmurias * wouldn't
09:00 pmurias masak: seems like for a subset you could squeeze it into something like a pagefull of code
09:00 domidumont joined #perl6
09:06 masak pmurias: right, that's what I'm thinking
09:07 masak could be a cute minimalistic exercise
09:07 masak I've seen people write minimal compilers online. looks like fun
09:08 spider-mario joined #perl6
09:09 Emeric joined #perl6
09:15 timotimo "see people write minimal compilers online" sounds like some livestream kind of deal :)
09:17 RabidGravy joined #perl6
09:24 RabidGravy bam!
09:28 huggable joined #perl6
09:30 Woodi damn, even me is thinking about doing some nice lang :)  WhereYouAreMakeWhatYouWant probably ;)
09:31 Woodi but last night backlog and yesterday interview with Turbo Pascal author is realy cold water bucket :)
09:34 masak Woodi: why?
09:34 Ven joined #perl6
09:36 Woodi masak: if someone want to toy a bit or learn than it's ok. but if someone want to make something usable for others then it's much harder...
09:37 Ven joined #perl6
09:38 masak this was true even before the Hjelsberg interview :)
09:38 Woodi and so many things on the way :)  dragon book is outdated, lexing is not necesary end evil even, generating asm requires knowing asm :) etc...
09:39 Woodi masak: yea, probably just my ears got that :)
09:40 Woodi anyway, what is so wrong with many pass parsing ? inevitable backdors or something ?
09:41 Woodi masak: but making perfect/secure C compiler is nice to have, even if a bit simpler :)
09:42 cpage_ joined #perl6
09:43 pierre_ joined #perl6
09:44 tadzik ...lexing is evil?
09:45 moritz premature lexing is the root of all evil!
09:46 Woodi yes, TimToady++ was talkig abou that today... but exactly what that means and how it (don't) work ? and I djb wroted same thing somewhere...
09:47 Woodi err, similiar thing, djb said "don't parse!"...
09:48 geekosaur do you know about the typedef problem in C?
09:49 geekosaur to parse something using a typedef, the parser for typedefs has to feed back into the lexer
09:49 geekosaur otherwise you'll lex a type defined via a typedef as a variable/function/struct field name
09:50 geekosaur if lexing is part of parsing, this can be handled cleanly. if lexing is a separate pass, it gets ugly
09:50 geekosaur and that's one of the simpler cases
09:51 RabidGravy lexing luthor
09:51 tadzik hah, interesting
09:52 Woodi lexer is just a tokenizer ?
09:53 geekosaur yes
09:53 Woodi so recipe is to make lexer simpler ?
09:53 RabidGravy there was a time that 'lex' and 'yacc' were available on nearly all Unix-like systems, can't remember the last time I used either explicitly
09:54 tadzik I do, for my compilers class :P
09:54 arnsholt I used lex and yacc (flex and bison, really) just last week!
09:54 Woodi RabidGravy: when you compile something bigger ? :)
09:54 Woodi at least ./configure search for it :)
09:54 geekosaur well, the only reason they got split in the first place is that PDP11s didn't have a large enough address space for a proper parser
09:54 arnsholt I had some Python code that had bitrotted (again >.<) and decided to try my hand at implementing it in C
09:55 arnsholt Used lex and yacc to do the input file compilation
09:55 geekosaur so they split the lexer and parser so each one would fit in a 64k address soace
09:55 RabidGravy yeah, but I haven't actually *written* anything for lex or yacc since the middle of the nineties I don't thing
09:56 geekosaur (and a large part of why lex and yacc existed was to optimize the state tables down to fit that same address space limit)
09:56 masak Woodi: what's wrong with multi-pass parsing? are you familiar with some of the "fun" consequences of multi-pass parsing in Perl 5?
09:56 masak Woodi: they're worth studying, just to realize how wrong things can go.
09:57 geekosaur this would be why I went with a simpler case :)
09:58 Woodi masak: not realy, just about that problems exist. but probably multi-pass was more problem for regexes then language ?
10:02 masak it's most clear in the regex slang, and Perl 6 properly learned from that
10:02 masak but I'm pretty sure it shows up elsewhere, too
10:03 masak the canonical example for regexes is... you have //x so you can put in whitespace and even comments
10:04 masak and then when you put a `/` in a comment... boom
10:05 Woodi x was just promoted by some top peoples, nobody realy used it ;)
10:05 * geekosaur uses it a fair bit
10:05 * nine uses it everywhere
10:05 Woodi damn... :)
10:06 nine Does that mean I'm one of the top people? :)
10:06 geekosaur regexes are hard enough to understand as it is, if you want other people to be able to figure out what you're doing it helps a lot
10:06 ShimmerFairy That description of /x sounds like the default (only?) choice for Perl 6 regexen :P
10:06 geekosaur that was a design goal, yes
10:09 Woodi so what's so evil in lexing/parsing domain ?
10:10 kid51 joined #perl6
10:10 geekosaur basically, whenever you find yourself having to do more and more feedback between the lex and parse phases (which complicates both and makes both harder to understand), it's a strong clue that they shouldn't have been separated in the first place
10:11 geekosaur the typedef issue I mentioned is the only place this comes up in C. it comes up a lot more in C++, and in perl 5 it turns both phases into crawling horrors
10:12 geekosaur in perl 5, you have to exhaustively test any change to either one because it's very likely that you will break the whole thing
10:13 Woodi geekosaur: so things into some format like ast ASAP ?
10:13 CIAvash joined #perl6
10:13 geekosaur oh, masak, an example of a non-regex thing that breaks stuff is prototypes, which mutate the language at both lexer and parser levels
10:14 geekosaur in p5
10:14 Woodi probably perl 5 backward compatibility policy is more problematic then parsing... but it's good thing.
10:14 geekosaur no, backcompat is why this can't be fixed in perl 5, it's not why the problem is there in the first place
10:15 geekosaur woodi, more the opposite --- tokenizers are generating a simple AST at a lower level than the parser's output AST
10:17 geekosaur but you are in trouble as soon as the parser needs to modify the AST that the tokenizer will produce for subsequent input, which happens a lot in real languages
10:18 Woodi geekosaur: this is probably part I don't understand...
10:19 Woodi do tokenizer/lexer use modified ast for tokenizing/parsing ?
10:19 Woodi ...like in typedef example
10:20 geekosaur I'm not quite sure what you're asking
10:20 xiaomiao joined #perl6
10:20 Woodi parser modifies tokenizer output, why it is problem for tokenizer ?
10:21 geekosaur in the typedef case, something that would normally be lexed as <ident> has to be lexed as <type>, or you will do the wrong thing
10:21 geekosaur you are not modifying the tokenizer output. you are modifying the language the tokenizer recognizes, out from under the tokenizer
10:23 Woodi so, lexer doing parsing is not needed, just tokenizer ?
10:25 Woodi probably EDEFINITIONSAREBLURRY here...
10:25 geekosaur in effect, parsing a typedef `typedef unsigned long size_t;` produces a new variant of C that has a new type in it (size_t). if you don't mutate the lexer then a subsequent `extern size_t foo()` produces a lex AST [T_EXTERN, T_IDENT<size_t>, T_IDENT<foo>, '(', ')'] which doesn't match the parse rule [T_EXTERN, OPTIONAL T_TYPESPEC, T_IDENT '(']
10:26 geekosaur er, missing comma in that last part: `, T_IDENT, '(']`
10:27 geekosaur (lexer ASTs aren't very treelike normally. if needing to mutate the lexer from the parser is a strong clue you've made a mistake, outputting a tree from the lexer is a flaming red flag)
10:28 geekosaur (because it means you've put part of the parser in the lexer to try to compensate for having split the lexer from the parser)
10:31 Woodi geekosaur: I think I understand something now :)
10:32 Woodi btw. modern languages don't use something like extern ?
10:32 geekosaur they usually have something like it. it's a forward declaration
10:33 Woodi ook :)  are there things in academia that can be used instead of ast ?
10:33 geekosaur C was originally intended to be very simple (ANSI C has changed this significantly) so they used a special keyword
10:35 Woodi geekosaur: yea, I was thinking few times: WHERE IS TypeC ??
10:35 geekosaur and this was pretty much just to simplify the parsing rules to fit in a tiny address space
10:36 geekosaur academia still uses ASTs. I'm not aware of a replacement; about the only viable one is to do it the way neurons do, which is highly unstructured and difficult for people to understand. (admittedly perl 5 has more or less ended up this way p )
10:36 geekosaur :p
10:39 RabidGravy dear CSS if you don't stop screwing me around I'm going to go back to 1997 and use tables for layout
10:40 geekosaur noooooooooooo
10:44 lue joined #perl6
10:51 wamba joined #perl6
10:55 Woodi geekosaur: what it means perl 5 is working like neurons ? google don't answered me for that...
11:02 geekosaur the brain's neural networks have both forward and backward feedback, over multiple channels
11:04 Ven joined #perl6
11:04 * RabidGravy goes with http://perl6.noisegang.com/ and damn the torpedoes
11:05 geekosaur so, for example, researchers recently discovered that if the higher level brain "circuits" don't expect to see something, the lower level circuits will "erase" it completely. you can literally not see something right in front of you, as a result.
11:06 Woodi RabidGravy++ :)
11:09 Woodi geekosaur: so, chemicals/neurotransmitors need to be nullified somehow...
11:09 geekosaur https://www.sciencedaily.com/releases/2016/05/160510124822.htm
11:09 DrForr Any docker users handy?
11:10 RabidGravy .tell lizmat if you get a minute is there any chance of giving the "Noise Gang" a mention in the p6w next week?
11:10 yoleaux RabidGravy: I'll pass your message to lizmat.
11:13 geekosaur neurotransmitters aren't the only channel. electric fields are used for feedback, it turns out
11:14 timotimo evolution tends to be sensitive to basically every single little detail
11:15 timotimo like when that genetic algorithm designed circuit boards where there was elements not connected to anything, but removing them caused things to no longer work
11:16 * Woodi just wants faster cars...
11:17 Woodi or maybe less damn road signs....
11:35 stmuk_ escaped tigers in Holland! perl6 team there beware!
11:35 Woodi funny thing, I was taught that hearing is more important then hearing :)  "שמע ישראל"
11:35 Woodi *then vision
11:42 mr-foobar joined #perl6
11:48 mr-foobar joined #perl6
11:53 |2701 joined #perl6
11:59 _4d47 joined #perl6
12:03 kid51 left #perl6
12:05 kid51 joined #perl6
12:10 Actualeyes joined #perl6
12:11 kurahaupo joined #perl6
12:14 domidumont joined #perl6
12:15 brabo joined #perl6
12:15 domidumont joined #perl6
12:21 kurahaupo joined #perl6
12:23 chenryn joined #perl6
12:26 Emeric joined #perl6
12:45 araujo_ joined #perl6
12:47 araujo_ joined #perl6
12:49 araujo_ joined #perl6
12:50 _mg_ joined #perl6
12:54 pmurias joined #perl6
12:55 pmurias ShimmerFairy: you can turn on significant white space in Perl 6
12:58 darutoko- joined #perl6
13:00 pmurias Woodi: the problem with multi pass parsing is that you wast time parsing things multiple times
13:04 pmurias Woodi: it's a problem for both compilers and human readers
13:14 dogbert17 joined #perl6
13:21 |2701 is distributed computing something that perl6 is able/going to be able to do?
13:23 pmurias |2701: there shouldn't be anything stopping perl6 from doing it
13:23 pmurias |2701: isn't sockets enough to do that?
13:23 pmurias * aren't
13:25 |2701 I was envisioning something like Ruby's drb, where objects can be sent and instantiated on a client device
13:26 itcharlie joined #perl6
13:28 huggable joined #perl6
13:32 jdv79 joined #perl6
13:37 tbrowder joined #perl6
13:57 pmurias |2701: to familiar with drb besides looking at the tutorial but it looks like something that should be possible to make
14:02 Ven joined #perl6
14:10 Sgeo joined #perl6
14:16 dmc00 joined #perl6
14:21 notbenh__ joined #perl6
14:24 kipd joined #perl6
14:24 SmokeMachine____ joined #perl6
14:24 Lucas_One joined #perl6
14:27 tbrowder joined #perl6
14:27 tbrowder hi perl 6 people
14:28 dmc00 joined #perl6
14:30 obarb joined #perl6
14:31 tbrowder a bomb: I have been spending time with Perl 6 pod and wonder why we don't toss it for embedded markdown or some other well-supported markup language?
14:34 tadzik markdown would have to be extended in quite a few ways to reach Pod's featureset
14:34 Ven joined #perl6
14:35 tbrowder Maybe a kinder thing to do is not to use Perl 6 pod for stand-alone docs as is being done now on doc.perl6.org.
14:35 tadzik why not?
14:35 tadzik is it deficient in any way?
14:37 tbrowder For example, tables are ver rudimentary at the moment (formatting codes not recognized).
14:37 masak tbrowder: I don't think Perl 6's Pod format is mandatory in any way. I can definitely see the attraction in writing Markdown instead. and I don't see the problem with that.
14:37 tadzik well, a switch to markdown would give us the complete lack of any tables, wouldn't it :P
14:37 masak dunno. does CommonMark have tables? don't remember.
14:38 masak Github's flavor does, for example
14:38 rvchangue joined #perl6
14:38 tadzik oh, I didn't know
14:38 tbrowder There are other things like sphinx or asciidoc I think can do that.
14:38 masak I suspect that if the Perl 6 effort started in 2015 instead of 2000, Markdown would have been at least considered as the docs format.
14:38 masak I'm not all that sure it would've been adopted, but it would've been considered.
14:39 masak anyway, there's nothing that prevents a driven individual from creating excellent tooling for Perl 6 + Markdown rather than Perl 6 + Pod
14:40 tbrowder Can they not co-exist? Use pod for embedded stuff and something else for stand-alone.
14:40 tadzik I'm pretty sure you can have a slang of Perl 6 that uses MD instead of Pod, would be a very interesting experiment indeed :)
14:40 cbk joined #perl6
14:41 masak in fact, that's what slangs/braids are there for
14:41 dogbert17 afternoon #perl6
14:41 masak if we don't support that use case, it simply means that we are Not Done Yet
14:41 tbrowder I never want to reinvent wheels but I think using pod for stand-alone is kind of like that.
14:42 pmurias joined #perl6
14:42 * arnsholt has been too long in academia. The only acceptable text formatting language is LaTeX (with a liberal sprinkling of extension packages on top)
14:43 * tadzik just got a year older thinking about his thesis that was ~4 phases of TeX processing
14:43 dogbert17 does anyone want to take a look at an attempt to document X::Promise::Vowed and shout if there are any errors?   https://gist.github.com/dogbert17/cce803676b3fb98952e3215bc2d71d91
14:44 tbrowder Hm, can't think of name at the moment but there is a program that handles all kinds of filtering between markip languages.
14:44 arnsholt tadzik: I have a 77-line Makefile driving the compilation process, and 6490 lines of TeX
14:44 geekosaur pandoc?
14:44 khw joined #perl6
14:44 tadzik oh gods
14:44 arnsholt The main thesis.tex document is 301 lines long
14:45 arnsholt There are 29 \usepackage statements, and a pile of different customizations
14:45 Xliff joined #perl6
14:46 tadzik I had lilypond first, then latex twice (because index ¯\_(ツ)_/¯) and bibtex somewhere in the middle
14:46 tadzik I don't even want to know
14:46 arnsholt Yeah, the whole multiple compilation thing is kind of annoying
14:46 tadzik I think I lost the original .tex files when my hard drive encryption died
14:46 arnsholt I use biber and biblatex which enables even more hilarious customization
14:47 pmurias tbrowder: is the problem with Pod 6 the tooling or the language itself?
14:47 pmurias tbrowder: is the problem with Pod 6 the tooling or the language itself?
14:47 arnsholt Like on-the-fly changing of article titles between the .bib file and the bibliography
14:47 tadzik tbrowder: is the problem with Pod 6 the tooling or the language itself?
14:47 tadzik (sorry)
14:48 arnsholt (My boss, for some bizarre reason, changes colons between title and subtitle to periods. So I can apply s/\.(?=\s)/:/ via biber =D
14:48 arnsholt )
14:49 arnsholt In case it's not abundantly clear, I've been using LaTeX for way (*way*) too long
14:49 pmurias we need to switch from using github to display our module docs to a proper metacpan equivalent at some point
14:52 cdg joined #perl6
14:53 skingsbu joined #perl6
14:57 cbk joined #perl6
14:58 chenryn joined #perl6
15:01 brabo joined #perl6
15:05 dalek doc: bafa6e5 | (Jan-Olof Hendig)++ | doc/Type/X/Promise/Vowed.pod:
15:05 dalek doc: Added docs for X::Promise::Vowed
15:05 dalek doc: review: https://github.com/perl6/doc/commit/bafa6e5f87
15:10 travis-ci joined #perl6
15:10 travis-ci Doc build errored. Jan-Olof Hendig 'Added docs for X::Promise::Vowed'
15:10 travis-ci https://travis-ci.org/perl6/doc/builds/130230848 https://github.com/perl6/doc/compare/edf96f53dde0...bafa6e5f87e3
15:10 travis-ci left #perl6
15:12 dogbert17 WAT
15:13 dogbert17 Hmm, 'The command "rakudobrew build-panda" failed and exited with 2 during .' according to travis-ci
15:15 dogbert17 can't say I know how to fix that
15:17 zakharyas joined #perl6
15:19 Woodi do pdf have tables ? if not then using it as archiving format is DUMB... will produce similiar problems like NASA (probably) have with recovering data from archaic tapes without a archaic reader
15:21 brabo joined #perl6
15:22 geekosaur pdf is a stack-based programming language
15:23 geekosaur it doesn't have much of anything "built in"
15:24 Woodi geekosaur: so just asci(2|to)html ommits tables and just uses raw text location ?
15:25 geekosaur hopefully it does that much of rendering. it could just extract the strings in whatever order they are in the PDF program, and hope it's something sensible
15:26 Woodi text is :) just sequencing not :)
15:26 cbk joined #perl6
15:27 geekosaur yes, sequencing gets lost usually
15:27 hanekomu joined #perl6
15:29 geekosaur to keep it, you'd have to be able to interpret enough PDF to call any functions that are defined in the file (this is very common) and find the moveto-s, and then render text into a buffer according to those positions. and then rationalize it for lines instead of pixels
15:30 Woodi but maybe we wil have smarter OCRs some time bedore XXII century :)
15:30 Woodi but placing data into format without some container notation is just stupid...
15:33 wamba joined #perl6
15:33 dogbert17 is moritz around?
15:34 dogbert17 .seen moritz
15:34 yoleaux I saw moritz 09:45Z in #perl6: <moritz> premature lexing is the root of all evil!
15:35 _4d47 joined #perl6
15:38 arnsholt Woodi: To follow up on geekosaur's point, PDF is fundamentally a graphics format. There's a fair amount of support for text, since it was designed for mostly textual documents, but it's still graphics
15:38 RabidGravy boom
15:42 moritz dogbert17: on and off
15:43 dogbert17 moritz: I have a question or two about the type-graph.txt file
15:44 dogbert17 I have added a few missing exceptions to the docs lately, am I correct in assuming that I should add them to the type-graph.txt as well?
15:45 moritz dogbert17: yes
15:45 moritz (unless it's already there, of course, which is the case for some of the undocumented types)
15:46 dogbert17 moritz: great, I also noticed that X::Obsolete occurs twice. Is that one time too many?
15:47 moritz dogbert17: yes
15:47 dogbert17 moritz: I'll remove the duplicate then
15:47 _4d47 does anyone have time to review https://github.com/perl6/mu/pull/14 ? i'm not confident to commit
15:48 dogbert17 moritz: X::Augment::NoSuchType also occurs twice under two different headings, but I can only find one such type in the source
15:50 brabo joined #perl6
15:50 dogbert17 moritz: this one I cant find 'class X::Augment::NoSuchType                       does X::Syntax'
15:59 dalek doc: a385760 | (Jan-Olof Hendig)++ | type-graph.txt:
15:59 dalek doc: Added X::Promise::Vowed, X::IO::Move and X::IO::Symlink to type-graph.txt and removed a duplicate of X::Obsolete from same
15:59 dalek doc: review: https://github.com/perl6/doc/commit/a385760514
16:19 travis-ci joined #perl6
16:19 firstdayonthejob joined #perl6
16:19 travis-ci Doc build passed. Jan-Olof Hendig 'Added X::Promise::Vowed, X::IO::Move and X::IO::Symlink to type-graph.txt and removed a duplicate of X::Obsolete from same'
16:19 travis-ci https://travis-ci.org/perl6/doc/builds/130241760 https://github.com/perl6/doc/compare/bafa6e5f87e3...a38576051459
16:19 travis-ci left #perl6
16:32 Sunbeam_ joined #perl6
16:43 aries_liuxueyang joined #perl6
16:46 buharin joined #perl6
16:48 dmc00 joined #perl6
16:48 dmc00 joined #perl6
16:50 chenryn joined #perl6
16:53 dmc00 joined #perl6
16:59 pmurias joined #perl6
17:00 pmurias Woodi: I don't think pdf readers getting lost is a serious problem
17:01 geekosaur yeh, I was thinking that -- if Adobe were the only source there'd be a problem, but there's lots of open source pdf readers/renderers
17:03 jack_rabbit joined #perl6
17:06 pmurias there seems to be a standard version for archiving documents
17:06 pmurias * standardized version of the format
17:11 moritz the biggest problem with PDF is probably that the newer standards are so friggin huge that nearly nobody implement them in full
17:12 moritz with specs for 3D models and embedded videos and stuff
17:12 moritz (and the fact that it's hard to extract text out of a PDF, but that's a totally different tangent, and probably an intentional tradeoff)
17:20 dmc00 joined #perl6
17:22 CIAvash joined #perl6
17:23 dmc00 joined #perl6
17:25 dmc00 joined #perl6
17:28 huggable joined #perl6
17:41 buharin hiho :)
17:46 sortiz joined #perl6
17:47 CIAvash joined #perl6
17:48 sortiz \o #perl6
17:50 kurahaupo joined #perl6
18:11 dalek doc: 80d6804 | (Jan-Olof Hendig)++ | doc/Language/concurrency.pod:
18:11 dalek doc: Fixed a broken link
18:11 dalek doc: review: https://github.com/perl6/doc/commit/80d68043e9
18:18 travis-ci joined #perl6
18:18 travis-ci Doc build errored. Jan-Olof Hendig 'Fixed a broken link'
18:18 travis-ci https://travis-ci.org/perl6/doc/builds/130263316 https://github.com/perl6/doc/compare/a38576051459...80d68043e9c7
18:18 travis-ci left #perl6
18:19 mr-foobar joined #perl6
18:31 BenGoldberg joined #perl6
18:33 ssotka joined #perl6
18:34 dmc00 joined #perl6
18:35 kaare_ joined #perl6
18:37 Ben_Goldberg joined #perl6
18:40 itcharlie left #perl6
18:42 araujo_ joined #perl6
19:03 cpage_ joined #perl6
19:09 BenGoldberg joined #perl6
19:13 Ven joined #perl6
19:14 mr-foobar joined #perl6
19:24 kaare_ joined #perl6
19:24 * masak has been drawing SVG paths using Perl 6 all day
19:24 masak while also fantasizing about a tool that will DWIM a lot of what I'm doing for me
19:26 TimToady WAT?!?
19:27 moritz TimToady++
19:28 buharin joined #perl6
19:29 buharin huh
19:29 buharin someone use emacs here?
19:33 travis-ci joined #perl6
19:33 travis-ci Doc build errored. Nick Logan 'Fix and improve CI testing'
19:33 travis-ci https://travis-ci.org/ugexe/doc/builds/130274050 https://github.com/ugexe/doc/compare/less-deps-firetravis
19:33 travis-ci left #perl6
19:37 masak yeah. with the amount of DWIM I'm picturing, there's bound to be some WAT too.
19:37 masak but (naturally) I imagine it'd be worth it ;)
19:38 timotimo i draw svg paths with graphviz often
19:38 masak one always does, I guess...
19:38 timotimo it's not always perfect
19:38 masak timotimo: I've been known to use Inkscape a lot
19:38 masak timotimo: today I've been longing for something that's a bit more of a hybrid between Inkscape and programming
19:38 timotimo tikz? :)
19:39 arnsholt Yeah, TikZ is nice =)
19:39 geekosaur buharin, I use emacs
19:40 timotimo i wrote a python program at some point that output'd tikz
19:41 masak tikz looks nice, indeed
19:42 timotimo comes with the usual properties tex/latex has
19:44 wamba buharin, I use emacs too
19:45 buharin I tried emacs right now
19:45 buharin with prelude
19:46 timotimo i have heard fantastic things about spacemacs
19:46 buharin it is fine but pretty strange ;P
19:46 mst I installed that then never got around to trying it properly
19:46 arnsholt Speaking of TeX/LaTeX, this cropped up on my Facebook just now: https://pbs.twimg.com/media/CiMNh9rWEAAdM6Q.png:large =D =D =D
19:46 buharin do you use project tile?
19:46 timotimo oh yes
19:48 * geekosaur just uses plain emacs with standard major modes tbh
19:48 timotimo https://twitter.com/loltimo/status/474577064503554048
19:49 moritz arnsholt: :-)
19:49 buharin you know
19:49 buharin after I used atom for programming last time
19:49 buharin I don't see a advantage
19:49 buharin about using emacs for devloping
19:50 buharin specially I am using my customized vim over ssh
19:50 mst well, fine, keep using vim then
19:50 mst editor wars are boring
19:51 buharin yah
19:51 geekosaur use what works for you
19:51 buharin but the essence
19:51 moritz arnsholt: misses "badness: 1000"
19:51 buharin is if ui editor are better than console
19:51 * geekosaur played with atom, would like to see it address memory leaks and poor coexistence with chrome's v8 before trying it again
19:52 mst buharin: uh. then why bring emacs into it?
19:52 geekosaur (but hey, at least it's worth trying again someday. lots of editors don't make that cut for me)
19:52 mst emacs is both
19:52 arnsholt moritz: True, true =D
19:52 buharin ;-)
19:54 geekosaur on most systems it is. os x ships a terminal-only emacs
19:54 mst right, because OS X GUI apps aren't delivered that way
19:54 mst there's also an emacs-nox package on debian
19:54 mst but that's not really the point
19:55 buharin actually I am using virtual debian on os x
19:55 buharin :P
19:55 yqt joined #perl6
19:55 buharin but there is cocoa emacs
19:56 masak arnsholt: autopun spotting on that https://pbs.twimg.com/media/CiMNh9rWEAAdM6Q.png:large link ;)
20:02 chenryn joined #perl6
20:04 arnsholt masak: Definitely!
20:04 kid51 joined #perl6
20:06 arnsholt masak: Doesn't look like its set in Times New Roman though =)
20:08 moritz tex defaults to Computer Modern, no?
20:08 mspo visual studio code?
20:09 arnsholt moritz: Yeah. But I don't think it's CM either
20:09 moritz arnsholt: right
20:20 travis-ci joined #perl6
20:20 travis-ci Doc build passed. Nick Logan 'Travis: Install Pod::To::HTML'
20:20 travis-ci https://travis-ci.org/ugexe/doc/builds/130279251 https://github.com/ugexe/doc/compare/69cf755730b6...6cd16e5acb40
20:20 travis-ci left #perl6
20:31 _dolmen_ joined #perl6
20:41 cpage_ joined #perl6
20:43 hotel joined #perl6
20:46 buharin joined #perl6
20:48 cpage joined #perl6
20:49 dalek doc: d8d67cf | (Jan-Olof Hendig)++ | doc/Language/functions.pod:
20:49 dalek doc: Another five broken links fixed
20:49 dalek doc: review: https://github.com/perl6/doc/commit/d8d67cfc5f
20:49 Zoffix joined #perl6
21:03 TEttinger joined #perl6
21:04 travis-ci joined #perl6
21:04 travis-ci Doc build passed. Jan-Olof Hendig 'Another five broken links fixed'
21:04 travis-ci https://travis-ci.org/perl6/doc/builds/130285143 https://github.com/perl6/doc/compare/80d68043e9c7...d8d67cfc5f8e
21:04 travis-ci left #perl6
21:05 mr-foobar joined #perl6
21:10 aries_liuxueyang joined #perl6
21:19 crucialr_ joined #perl6
21:20 skink joined #perl6
21:22 Zoffix joined #perl6
21:27 ssotka joined #perl6
21:28 huggable joined #perl6
21:32 BenGoldberg joined #perl6
21:34 BenGoldberg joined #perl6
21:36 BenGoldberg joined #perl6
21:40 _dolmen_ joined #perl6
21:41 ugexe stmuk_: https://github.com/perl6/doc/pull/514 this should allow p6doc to discover any installed module, and not depend on reading the panda cache file
21:42 BenGoldberg joined #perl6
21:42 masak MadcapJake: I finally backlogged over the "transpiler" thing :)
21:43 masak MadcapJake: here's my take, fwiw -- a compiler is something that turns a language-A program into "the same" language-B program, fsvo "the same"
21:43 masak most of the time language B is machine code, but not always
21:43 masak thus there is a perfectly good word for transpiler already: "compiler"
21:44 masak even the "source-to-source" feels a little bit unnecessary in my mind: what's human-readable source code and what's machine-executable target code is partly a matter of context
21:45 mst transpiler mostly means to mean "compiler, except targeting something originally designed for being written by humans rather than targeted by compilers"
21:45 timotimo gcc has a flag to keep .s files around :P
21:45 masak mst: I buy that.
21:45 timotimo assembly code is definitely designed for being written by humans
21:45 Zoffix joined #perl6
21:45 timotimo that's why it's for punchcards
21:46 masak timotimo: most compilers don't compile to assembly, though. they compile to machine code.
21:46 mst masak: so, like, Transpiler isa Compiler but the word still provides additional context that's sometimes useful
21:46 skink timotimo, I'm still trying to figure out fast thread-safe reads
21:47 travis-ci joined #perl6
21:47 travis-ci Doc build passed. Nick Logan 'Discover all installed modules + Less deps
21:47 travis-ci https://travis-ci.org/ugexe/doc/builds/130290094 https://github.com/ugexe/doc/commit/8bdd3ff54cde
21:47 travis-ci left #perl6
21:47 skink Using start {} is also extremely slow and I don't think it was solving the problem anyway
21:48 masak mst: I... think I grudgingly agree.
21:48 masak mst: only my dislike of the word and the contexts in which it's used now remain ;)
21:49 BenGoldberg joined #perl6
21:51 mst masak: I have no good answer for that since I don't honestly like the word much either, I just found that it can actually have semantic value
21:51 mst well, and also, sometimes it provides the semantic value of "the way this was used in context means I can close the tab now and not lose anything"
21:52 timotimo skink: you're not getting very far as long as we're trying to allocate multiple stack frames per second
21:52 dalek doc: 8bdd3ff | ugexe++ | / (3 files):
21:52 dalek doc: Discover all installed modules + Less deps
21:52 dalek doc:
21:52 dalek doc: Discover all installed modules, not just those listed in pandas
21:52 dalek doc: cache. Also remove dependencies on panda altogether.
21:52 dalek doc: review: https://github.com/perl6/doc/commit/8bdd3ff54c
21:52 dalek doc: 8ec85d7 | (Steve Mynott)++ | / (3 files):
21:52 dalek doc: Merge pull request #514 from ugexe/discover-installed
21:52 dalek doc:
21:52 dalek doc: Discover all installed modules + Less deps
21:52 dalek doc: review: https://github.com/perl6/doc/commit/8ec85d7b77
21:52 stmuk_ ugexe: thanks
21:54 masak mst: https://twitter.com/pmrondon/status/648251230804946944
21:54 timotimo skink: you can try doing stuff with nqp:: ops and try to use as few curlies as you can
21:55 timotimo and you just might see your performance start scaling properly with the number of cors
21:55 BenGoldberg joined #perl6
21:56 mst masak: yep. I just only *sometimes* regard that as true
21:56 mst sometimes I grit my teeth and grudgingly admit their usage was useful
21:57 Ben_Goldberg joined #perl6
21:58 stmuk_ australia?
21:59 BenGoldberg joined #perl6
22:01 masak stmuk_: shiny new Australia.
22:03 chenryn joined #perl6
22:03 kjk joined #perl6
22:04 Emeric1 joined #perl6
22:06 kjk is there a way to reload a module from REPL? say I 'use MyModule' from REPL and then make some changes to the source code of MyModule, how can I easily "reload" it in the REPL so I can test it without restart the REPL and load my module again?
22:07 dalek doc: bc8f5b2 | (Jan-Olof Hendig)++ | doc/Language/operators.pod:
22:07 dalek doc: A few more broken links
22:07 dalek doc: review: https://github.com/perl6/doc/commit/bc8f5b2542
22:09 BenGoldberg joined #perl6
22:10 masak kjk: I'm not aware that's a use case that's covered by the REPL, or module loading.
22:10 masak though it would be kinda nice to have a module hotpatching story.
22:14 BenGoldberg joined #perl6
22:15 buharin joined #perl6
22:15 kjk masak: I see..., yeah, it would be quite nice for trying things out in REPL. Thanks
22:16 buharin hi
22:19 BenGoldberg joined #perl6
22:30 skink timotimo, Holy hell
22:30 skink 25,000 open/read/closes in NQP takes 0.4s
22:31 BenGoldberg joined #perl6
22:31 skink In P6 it's 46.3s
22:43 Ven joined #perl6
22:59 chenryn joined #perl6
23:10 tbrowder joined #perl6
23:12 Zoffix joined #perl6
23:22 skingsbu joined #perl6
23:24 kanishka joined #perl6
23:31 Zoffix joined #perl6
23:47 Zoffix m: 'test'».uc.say
23:47 camelia rakudo-moar ad8265: OUTPUT«(TEST)␤»
23:47 Zoffix Oh, god. This is awesome!! I just got myself a Perl 6 keyboard!
23:48 * masak .oO( useless use of » )
23:48 masak m: say 'test'.uc
23:48 camelia rakudo-moar ad8265: OUTPUT«TEST␤»
23:48 Zoffix 18 extra keys to use for Unicode ops :) https://twitter.com/zoffix/status/731631393164414976
23:48 masak nice, though :)
23:49 Zoffix masak, yeah, I was just testing my shiny (in pink!) keyboard :D
23:50 gfldex you possibly couldn't miss a key on that keyboard
23:51 gfldex any typo will make you look like an imposter
23:51 Zoffix heh. I'm kinda still getting used to it. After my MS Curve 2001 with giant keys, this one feels tiny. And I think they actually made the keys SMALLER than regular keys to fit the 18 extra ones :/
23:52 Zoffix I'm enjoying the RGB lights more than I thought I would though lol :D
23:52 masak 'night, #perl6
23:54 Zoffix night \o

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

Perl 6 | Reference Documentation | Rakudo