Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-08-22

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:00 AlexDaniel m: my %a = 'A' => 1, 'B' => 2, 'cD' => 34, 'Ef' => 56; my %b = %a.map: { .key.lc => .value }; dd %a; dd %b
00:00 camelia rakudo-moar 8a0f6a: OUTPUT: «Hash %a = {:A(1), :B(2), :Ef(56), :cD(34)}?Hash %b = {:a(1), :b(2), :cd(34), :ef(56)}?»
00:00 AlexDaniel m: my %a = 'A' => 1, 'B' => 2, 'cD' => 34, 'Ef' => 56; my %b = %a.map: { .key.fc => .value }; dd %a; dd %b # probably
00:00 camelia rakudo-moar 8a0f6a: OUTPUT: «Hash %a = {:A(1), :B(2), :Ef(56), :cD(34)}?Hash %b = {:a(1), :b(2), :cd(34), :ef(56)}?»
00:01 ugexe now what about when you have A and a?
00:01 rba_ joined #perl6
00:05 AlexDaniel oh, right
00:08 AlexDaniel m: my %a = 'A' => 1, 'B' => 2, 'cD' => 34, 'a' => 56; say %a.categorize({.key.fc})
00:08 camelia rakudo-moar 8a0f6a: OUTPUT: «{a => [a => 56 A => 1], b => [B => 2], cd => [cD => 34]}?»
00:08 AlexDaniel almost
00:09 AlexDaniel m: my %a = 'A' => 1, 'B' => 2, 'cD' => 34, 'a' => 56; say %a.categorize({.key.fc}, as => {.value})
00:09 camelia rakudo-moar 8a0f6a: OUTPUT: «{a => [56 1], b => [2], cd => [34]}?»
00:09 AlexDaniel there
00:09 AlexDaniel m: my %a = 'A' => 1, 'B' => 2, 'cD' => 34, 'a' => 56; say %a.classify({.key.fc}, as => {.value})
00:09 camelia rakudo-moar 8a0f6a: OUTPUT: «{a => [56 1], b => [2], cd => [34]}?»
00:11 AlexDaniel m: my %a = 'A' => 1, 'B' => 2, 'cD' => 34, 'a' => 56; say %a.classify: *.key.fc, as => *.value
00:11 camelia rakudo-moar 8a0f6a: OUTPUT: «{a => [56 1], b => [2], cd => [34]}?»
00:16 rba__ joined #perl6
00:29 ipatrol joined #perl6
00:30 ipatrol is the named captures syntax actually an interpolated form of assignment, or does it just look that way?
00:31 rba_ joined #perl6
00:33 Exodist joined #perl6
00:35 raschipi ipatrol: It looks like an asignement on purpose, but it's special syntax not really related to asignments.
00:37 ipatrol raschipi: I'm not sure if I'm a big fan of it, since it puts the name outside of the group instead of as a flag within it
00:37 Cabanossi joined #perl6
00:39 pierre_ joined #perl6
00:39 ryu0 joined #perl6
00:39 ipatrol in other notes, is there anything we could really call a "Perl 6 editor/IDE" available yet?
00:40 pierre_ joined #perl6
00:41 enheh joined #perl6
00:45 raschipi There's a plugin for padre and for intelij, I think. Don't know if they are any good.
00:46 rba__ joined #perl6
00:49 ipatrol raschipi: what about one that gives you an extra pallet for unicode operators?
00:50 nuk9 joined #perl6
00:51 raschipi you mean an on-screen keyboard? I don't think there's any.
00:51 raschipi You don't need to use them anyway.
00:52 pilne joined #perl6
00:52 ipatrol raschipi: It might be nice to have them anyway. Mathematica does this with a "Basic Math Pallet" to the side of the editor window
00:53 raschipi Most people use xcompose on linux, it's an input method that would work for any ide
00:54 ipatrol raschipi: yes, but then you have to remember the sequences. I think a pallet would be a nice feature
00:55 raschipi Well, I don't think it belongs in the IDE, but go ask them if you think it would be a good feature.
00:57 astj joined #perl6
00:59 ipatrol raschipi: as far as I know, Mathematica is the only other language that by default makes use of Unicode operators (it also has an ASCII syntax for them, FYI). We could do a lot worse than cribbing a few ideas from them :-)
01:00 teatime and then there's APL...
01:00 ipatrol but that was pre-Unicode, technically
01:01 teatime yar
01:01 ipatrol the symbols later got mapped to Unicode codepoints, but by the time that happened, I'm not sure if anyone was even using APL on a production level anymore.
01:02 rba_ joined #perl6
01:03 mspo hm
01:04 MasterDuke ipatrol: i think the closest to an IDE is Atom
01:05 MasterDuke https://github.com/perl6/Atom-as-a-Perl6-IDE
01:07 Cabanossi joined #perl6
01:12 Xliff What is the best way to lowercase all keys in Hash?
01:12 Xliff (Or would I need to create a new hash with lowercased keys?)
01:13 Juerd my @keys = %hash.keys».lc;
01:14 Xliff m: my %a = ( 'A' => 1, 'B' => 2, 'cD' => 34, 'Ef' => 56 \; my @keys = %hash.keys».lc; dd %a;
01:14 camelia rakudo-moar 8a0f6a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Confused?at <tmp>:1?------> 3' => 1, 'B' => 2, 'cD' => 34, 'Ef' => 567?5 \; my @keys = %hash.keys».lc; dd %a;?    expecting any of:?        infix?        infix stopper?        statement …»
01:14 AlexDaniel huggable: xy
01:14 huggable AlexDaniel, You want to do X, but don't know how. You think you can solve it using Y, but don't know how to do that, either. So, you ask about Y in order to solve X, which doesn't make sense. You should ask about X.
01:14 Juerd Oh, in the existing hash? Keys can't be changed afterwards. You'd need to create a new hash.
01:14 AlexDaniel Xliff: what are you trying to do?
01:14 Xliff m: my %a = ( 'A' => 1, 'B' => 2, 'cD' => 34, 'Ef' => 56 ); my @keys = %hash.keys».lc; dd %a;
01:14 camelia rakudo-moar 8a0f6a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Variable '%hash' is not declared. Did you mean any of these??    &hash?    Hash??at <tmp>:1?------> 2, 'cD' => 34, 'Ef' => 56 ); my @keys = 7?5%hash.keys».lc; dd %a;?»
01:14 AlexDaniel Xliff: I mean, why do you need lowercased keys?
01:14 Xliff Juerd: Yes, exactly.
01:15 Xliff AlexDaniel: There is no why. I just wanted to if I could do that in perl6.
01:15 Juerd Xliff: So, if you need lowercased keys, why did you put uppercased letters in there in the first place? :)
01:15 Xliff And I think your xy thing is oversimplifying a lot of things.
01:15 Xliff Sometimes we ask for Y because it is a simplified version of X.
01:15 Xliff Think golfing.
01:16 AlexDaniel :/
01:16 Xliff Well, here's the whole use case
01:16 Xliff 1) I have a routine with named parameters
01:16 rba__ joined #perl6
01:16 Xliff But I don't want to create an overly complex signature
01:17 Xliff Mainly because I want flexible usage and that means programmatic parameter validation in-sub.
01:17 raschipi Create a new type that's a hash but lowercases keys.
01:17 Xliff So in that situation, creating a new hash is a valid option.
01:17 Xliff But then I got sidetracked and wondered if %hash.keys would give me something I could assign to.
01:17 Xliff And it doesn't. Question answered
01:18 AlexDaniel also, .fc is technically more correct (although you're not going to have unicodey parameters I suppose)
01:18 Xliff AlexDaniel: Now that would be ridiculous. ;)
01:18 ipatrol I'd say the only major design difference of opinion I have with perl6, is the fact that subroutine and class identifiers don't generally have sigils
01:19 raschipi They had in Perl4, but it was taken out ages ago. It looks too ugly.
01:19 ipatrol because in my experience (Python), that makes it easy for new versions of the language to break old code
01:20 raschipi And remember that in Perl6 there's no difference between built-ins and user-defined.
01:21 pierre_ joined #perl6
01:21 ipatrol raschipi: in theory. in practice some operators are "special cased" by the compiler
01:22 AlexDaniel Xliff: maybe it'd be a better idea to have a hash with default values, and then just set the values in that hash with whatever you got from the args
01:22 Xliff AlexDaniel: Default values is not the issue though.
01:22 Xliff The names of the arguments are.
01:23 raschipi Having the compiler cheats doesn't mean they're any different. Go look at the code, they have just normal definitions.
01:23 Juerd m: class LCHash is Hash { method ASSIGN-KEY(Str:D $key, $val) { nextwith $key.lc, $val }; method STORE_AT_KEY(Str:D $key, $val) { nextwith $key.lc, $val }; method AT-KEY(Str:D $key) { nextwith $key.lc }; method DELETE-KEY (Str:D $key) { nextwith $key.lc } }; my %lch is LCHash; %lch<FOO> = 'bar'; say %lch<Foo>; dd %lch;
01:23 camelia rakudo-moar 8a0f6a: OUTPUT: «bar?{:foo("bar")}?»
01:23 * Juerd cringes at the underscores in STORE_AT_KEY...
01:23 Xliff Oooh!
01:24 Xliff Juerd++ # I was already thinking about that approach.
01:24 Juerd Xliff: I think flexibility in named arguments is a bad design decision.
01:24 Xliff That's not the question I am trying to answer, though.
01:24 Juerd I'd rather have mixed styles between several APIs than within a single API.
01:24 [Coke] bah. looks like another node issue blocking the doc build.
01:24 Xliff What if I am not the person making the design?
01:24 ipatrol raschipi: I don't know how those compiler shortcuts interact with user-defined operators
01:25 Xliff But I want to work with said design (read: add on to)
01:25 Juerd Xliff: Then please send the designer my regards and comments. I'll happily discuss the issue with them.
01:25 Xliff :P
01:25 mcmillhj joined #perl6
01:25 Juerd Grepability is important. Try not to have two names for the same thing.
01:25 raschipi ipatrol: it's not completely implemented yet.
01:26 Xliff What is design-appropriate, and the reality are two different things.
01:26 mspo I've seen plenty of perl5 code with &sub()
01:26 ipatrol If all operators are simply part of the environment, then it shouldn't be an issue if the user defines an operator that is already a builtin; the later user definition simply overwrite's the language's
01:26 Juerd You're the programmer, you get to fix your part of reality.
01:27 Xliff Juerd: Aaand... now this conversation has devolved into noise. ;)
01:27 Xliff Your points are well received, but it is not the question I asked.
01:28 Juerd Xliff: It was noise when STORE_AT_KEY came along with its underscores, next to ASSIGN-KEY, AT-KEY, and DELETE-KEY which have hyphens...
01:28 Xliff And whose fault is that??!
01:28 Xliff Aren't you a P6 dev?
01:28 ipatrol hey, play nice children ;-P
01:28 Juerd Xliff: I'm not here to answer questions. If I happened to answer your question while trying to have a conversation, then consider yourself lucky :P
01:28 Xliff <Juerd> You're the programmer, you get to fix your part of reality.
01:28 Xliff Juerd: I do. Believe me.
01:29 ipatrol raschipi: what parts of user-defined operators are still NYI in Rakudo?
01:29 MasterDuke ipatrol: you can define your own versions of operators and the builtins will get overwritten (in the lexical scope i believe)
01:29 raschipi ipatrol: macros
01:30 Xliff Should I submit a bug report asking for consistency between STORE_AT_KEY et al. :)
01:30 ipatrol MasterDuke: assuming none of them are special cased. If any of them are, I don't know what happens
01:30 raschipi But traits are already available.
01:30 Xliff (that was semi-joking)
01:30 Xliff (and how much code would I need to rewrite?)
01:30 raschipi ipatrol: And it's always cheating: it should be transparent or it's buggy.
01:30 MasterDuke Xliff: sure
01:31 ipatrol Xliff: s:g/STORE_AT_KEY/STORE-AT-KEY/
01:32 rba_ joined #perl6
01:33 Xliff MasterDuke
01:33 Xliff ...ask me next week. Pizza is being served!! ^_^
01:33 MasterDuke heh
01:35 ipatrol raschipi: one of the problems I've noticed that Python had, historically, was that since it forbids variable names from being the same as language operators, which are AYK typically English words, minor versions that were supposed to be backward compatible, weren't, because given a large enough codebase, some variable would inevitably clash with the new operator
01:35 AlexDaniel Juerd: I think it is from older times when most things had underscores
01:36 AlexDaniel Juerd: since then all user-facing things were changed to use dashes, except for some of the internal stuff that you shouldn't use anyway
01:36 AlexDaniel Juerd: but STORE_AT_KEY is simply a leftover from these times I think
01:36 AlexDaniel Juerd: maybe ask lizmat about it, or submit a ticket
01:36 Juerd m: role TranskeyHash[&transformation] is Hash { method ASSIGN-KEY(Str:D $key, $val) { nextwith transformation($key), $val }; method STORE_AT_KEY(Str:D $key, $val) { nextwith transformation($key), $val }; method AT-KEY(Str:D $key) { nextwith transformation($key) }; method DELETE-KEY (Str:D $key) { nextwith transformation($key) } }; class LCHash does TranskeyHash[*.lc] { }; class UCHash does TranskeyHash[*.uc]
01:36 camelia rakudo-moar 8a0f6a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Unable to parse class definition?at <tmp>:1?------> 3 }; class UCHash does TranskeyHash[*.uc]7?5<EOL>?»
01:36 ugexe m: sub class { 42 }; say class # ipatrol ?
01:37 camelia rakudo-moar 8a0f6a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Unable to parse class definition?at <tmp>:1?------> 3sub class { 42 }; say class # ipatrol ?7?5<EOL>?    expecting any of:?        generic role?»
01:37 Juerd { }; my %lc is LCHash; my %uc is UCHash; %lc<Foo> = "bar"; %uc<fOo> = "bar"; say %lc<FOo>, %uc<fOO>, %lc.keys, %uc.keys;
01:37 Juerd Aw shit, doesn't fit on a line
01:37 ugexe m: sub class { 42 }; say class; # ipatrol ?
01:37 camelia rakudo-moar 8a0f6a: OUTPUT: «42?»
01:38 Cabanossi joined #perl6
01:38 pierre_ joined #perl6
01:38 ipatrol ugexe: ok, that shows the class operator is relatively well-behaved
01:39 ugexe it shows user defined operators cant be replaced by newer versions magically
01:39 cdg joined #perl6
01:39 Juerd m: role TKH[&tr] is Hash { method ASSIGN-KEY(Str:D $k, $v) { nextwith tr($k), $v }; method STORE_AT_KEY(Str:D $k, $v) { nextwith tr($k), $v }; method AT-KEY(Str:D $k) { nextwith tr($k) }; method DELETE-KEY (Str:D $k) { nextwith tr($k) } }; class LCHash does TKH[*.lc] { }; class UCHash does TKH[*.uc] { }; my %lc is LCHash; my %uc is UCHash; %lc<Foo> = "bar"; %uc<fOo> = "bar"; dd %lc, %uc;
01:39 camelia rakudo-moar 8a0f6a: OUTPUT: «{:foo("bar")}?{:FOO("bar")}?»
01:39 Juerd ^ golfed to fit on a line.
01:39 ipatrol right, because code in the script itself takes precedence over the implicit code loaded by the interpreter
01:40 Juerd I can think of other useful transformations, such as underscores to kebab case for MIME headers.
01:40 ipatrol Juerd: "kebab case" sounds vaguely racist, for some reason :-P
01:40 Juerd ipatrol: What's racist about meat on a skewer?
01:41 ipatrol it's a slur for Turks
01:41 Juerd It's also delicious
01:41 mcmillhj joined #perl6
01:42 ugexe there is a tutorial for http headers
01:49 ugexe https://docs.perl6.org/language/subscripts#Custom_type_example
01:49 Juerd Heh, I probably should have added EXISTS-KEY to my example :)
01:51 ilbot3 joined #perl6
01:51 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:52 ipatrol I know Perl* historically likes to treat various things as interchangeable with strings, but in practice I've found that coercing values to and from strings is often prone to hard-to-debug errors, and I'm inclined to say that such conversions should never be implicit unless a meaningful result is always possible
01:54 ugexe so write multi methods with type constraints
01:54 ryu0 ipatrol: converting to string is usually non-issue. not so for from so much.
01:55 ipatrol ryu0: yes, most things have some kind of string representation, even if it's only useful for printing messages
01:56 ugexe multi method AT-KEY(Str $key) {...} multi method AT-KEY(|c) { ... }
01:56 ipatrol ugexe: that doesn't "fix" the builtin methods. Now, one can enforce a coding style where all conversions must be explicitly laid out, and thankfully Perl6 does, of course, support such a system
01:56 ipatrol p6: '3.14159'.Int.tan;
01:56 camelia rakudo-moar 8a0f6a: ( no output )
01:56 ipatrol p6: say '3.14159'.Int.tan;
01:57 camelia rakudo-moar 8a0f6a: OUTPUT: «-0.142546543074278?»
01:57 mcmillhj joined #perl6
01:57 ugexe you can store objects as hash keys
01:57 Juerd ipatrol: I disagree, I used Perl 5 a lot and almost never run into this. The only weird thing in this area is "0" being false, really...
01:57 raschipi say so "0"
01:57 evalable6 raschipi, rakudo-moar 8a0f6ac11: OUTPUT: «True»
01:58 Juerd ipatrol: The best (unintended) feature in Perl 5 is also a very hard one if you don't know what you're doing: byte strings and text strings are the same thing and can be used interchangably. I really miss that in Perl 6.
01:59 * Juerd very regularly uses regexes on binary strings of around 100 MB.
01:59 Juerd Writing the same thing without regexes is a lot of work.
01:59 ipatrol Juerd: Python made the same change in v3
02:00 ipatrol Juerd: you can't coerce the binary to utf-8?
02:00 Juerd ipatrol: Encoding and decoding would be very slow.
02:01 rba_ joined #perl6
02:02 raschipi ipatrol: If you want to ensure some variable can only hold Numeric data, declare it Numeric.
02:02 ipatrol Juerd: does Perl6 actually need to do any converting to store a byte string as utf-8?
02:05 ipatrol Juerd: only thing to be aware of is that you should use utf8-c8 to avoid hitting problems with invalid byte sequences
02:06 Juerd ipatrol: I don't understand the question. What's "storing as utf-8" exactly? And even then I probably couldn't answer your question because I don't know much about Perl 6 internals.
02:07 raschipi ipatrol: Str in P6 is normalized and stored in strands, so it doesn't have much in common with a sequence of bytes.
02:08 ipatrol Juerd: if they are stored as utf-8, that implies that whatever array in the RAM that the variable ultimately references consists of a sequence of bytes that form the UTF-8 representation of the string
02:09 raschipi ipatrol: Perl6 will also create syntetic codepoints to represent utf-8 chords as one single thing.
02:09 Geth ¦ doc: 357e6e2f18 | (Will "Coke" Coleda)++ | doc/Type/Date.pod6
02:09 Geth ¦ doc: Fix sample output
02:09 Geth ¦ doc:
02:09 Geth ¦ doc: Closes #1463
02:09 Geth ¦ doc: review: https://github.com/perl6/doc/commit/357e6e2f18
02:09 ipatrol raschipi: do regexes work on Uni objects?
02:10 raschipi Not yet.
02:10 ipatrol but they're planned to be?
02:11 raschipi Yes, that's why I said 'yet'.
02:11 ipatrol ok, so Juerd just needs to wait for that
02:11 Actualeyes joined #perl6
02:12 Geth ¦ doc: aeddc020bb | (Douglas L. Schrag)++ | doc/Language/operators.pod6
02:12 Geth ¦ doc: Add documentation of loose xor operator
02:12 Geth ¦ doc: review: https://github.com/perl6/doc/commit/aeddc020bb
02:12 Geth ¦ doc: 3186181df0 | (Douglas L. Schrag)++ | doc/Language/operators.pod6
02:12 Geth ¦ doc: Expand documentation of loose xor
02:12 Geth ¦ doc:
02:12 Geth ¦ doc: Add links in loose or / xor to strict sections
02:12 Geth ¦ doc: Summarize chaining behavior
02:12 Geth ¦ doc: review: https://github.com/perl6/doc/commit/3186181df0
02:12 Geth ¦ doc: 3fc8e26fb6 | (Will Coleda)++ (committed using GitHub Web editor) | doc/Language/operators.pod6
02:12 Geth ¦ doc: Merge pull request #1460 from dmaestro/xor-operator
02:12 Geth ¦ doc:
02:12 Geth ¦ doc: Add documentation of loose xor operator
02:12 Geth ¦ doc: review: https://github.com/perl6/doc/commit/3fc8e26fb6
02:12 raschipi No, he will use utf-c8, it's not really difficult.
02:12 mcmillhj joined #perl6
02:13 ipatrol raschipi: I thought you just said Str does unicode normalization?
02:13 raschipi utf8-c8 doesn't.
02:13 ipatrol ah, ok
02:16 rba__ joined #perl6
02:19 ipatrol Interestingly, Python 3's `re` module allows regexes to be used on binary data, so long as the pattern is also a binary sequence.
02:21 ipatrol raschipi: doing so changes the semantics of some of the operators. Perhaps we could implement an adverb to make a blob regex?
02:22 raschipi ipatrol: Yes, that's the idea, but it's not implemented yet.
02:23 ipatrol raschipi: sounds like the setup to a joke
02:23 ipatrol "How do you know Perl 6 is the language of the future?" "Because that's when all the best features will be implemented!"
02:25 raschipi Why should implementers concentrate on something Perl5 does well, since one can always call Perl5 code.
02:26 ipatrol raschipi: I thought what Perl 5 does well is being a shell replacement
02:26 raschipi No, never seen Perl5 work in any way as a shell replacement.
02:26 ipatrol I even compiled it for my wireless router so I can make administration scripts in Perl
02:27 ipatrol raschipi: not interactively, but for shell scripts
02:27 raschipi It's not good as an interactive language.
02:27 raschipi Perl5 is a multipurpose language.
02:27 ipatrol raschipi: that it is, but that doesn't answer what it's best at
02:29 raschipi Well, where it's "best" is bioinfomatics, just like Perl6 is specially well suited for commercial analysis.
02:30 ipatrol the backtick inlining, the -n, -p, and -a switches, the diamond operator, the fact that most file system operations are builtins; to me that suggests a language for system administration and gluing programs together
02:30 mcmillhj joined #perl6
02:31 raschipi It's also good for that, yes. Perl6 is even better as a glue language in my opinion.
02:31 mspo perl -00 ++ :)
02:31 rba_ joined #perl6
02:31 ipatrol raschipi: I'd actually dispute Perl5's suitability for bioinfomatics somewhat. I don't think it's OO enough, which is why Python has been eating away at it in that arena
02:33 raschipi It's "eating away" because it's trendy and taught by default. Perl is the exchange format in bioinformatics, just like Tex is the exchange format of math.
02:34 ipatrol raschipi: the exchange formats are a set of file formats, none of which have anything to do with Perl or Python.
02:35 raschipi Nope, if you publish code in an academic setting, it better be in Perl or otherwise everyone will ignore you.
02:35 pierre_ joined #perl6
02:35 raschipi Same thing as math, if it's not in Tex, it might as well not exist.
02:35 mcmillhj joined #perl6
02:36 ipatrol raschipi: no, I think Perl became prominent because at the time of the Human Genome Project, it was the only really mature language that could efficiently process the text-based formats in use at the time like FASTA
02:37 Cabanossi joined #perl6
02:38 Geth ¦ doc: 6252e3d6f7 | (Will "Coke" Coleda)++ | doc/Type/Cool.pod6
02:38 Geth ¦ doc: use OUTPUT: tags
02:38 Geth ¦ doc: review: https://github.com/perl6/doc/commit/6252e3d6f7
02:38 Geth ¦ doc: 0eb07d333d | (Will "Coke" Coleda)++ | 2 files
02:38 Geth ¦ doc: fix trim usage
02:38 Geth ¦ doc: review: https://github.com/perl6/doc/commit/0eb07d333d
02:38 raschipi Right, so you know what it's good for.
02:38 noganex joined #perl6
02:39 ipatrol raschipi: yes, it's also very good for text processing, though I think Perl 6 is even better for that
02:46 rba__ joined #perl6
02:48 ipatrol I think Perl6 will really excel in the parsing and linguistic realms
02:49 b2gills m: class ::('?') { method state { "DEAD" } }; constant term:<?> = ::('?'); ?.new.state.say
02:49 camelia rakudo-moar 8a0f6a: OUTPUT: «DEAD?»
02:51 mcmillhj joined #perl6
02:54 john_parr joined #perl6
02:56 mcmillhj joined #perl6
03:00 Actualeyes joined #perl6
03:00 ipatrol raschipi: hey, I have some data to parse where the order of tokens is generally unimportant, but each token when present only has one meaning, and is not used for anything else. What would be a good way to construct a grammar for this?
03:02 rba_ joined #perl6
03:04 raschipi I don't think a grammar would be the right tool, I would use split to separate the tokens and them put them into a Hash.
03:06 ipatrol raschipi: the data is such that split would not work. That's why it's defied all my attempts to parse it so far, as it doesn't really lex cleanly
03:06 Cabanossi joined #perl6
03:07 ipatrol I was thinking just go down the list of tokens, s///'ing each of them out
03:07 BenGoldberg joined #perl6
03:07 raschipi right, a grammar would be easier to use, then.
03:08 ipatrol raschipi: using the proto-regexen?
03:09 raschipi define a grammar with a token rule which has all the tokens as an alternation and a rule TOP that calls for a sequence of tokens.
03:12 mcmillhj joined #perl6
03:12 ipatrol raschipi: would having TOP be a single [<proto><ws>?]* work?
03:13 raschipi The only thing you need there is to capture it, I think.
03:14 ipatrol raschipi: in some cases, I may want to swap the match out with something else
03:16 rba__ joined #perl6
03:17 raschipi right, the match will return a list of tokens and can substitute whatever then.
03:19 Actualeyes left #perl6
03:24 ipatrol raschipi: since regexes are now considered grammar, does interpolating strings into them still work?
03:24 raschipi There's special syntax for it.
03:24 snarkyboojum joined #perl6
03:25 ipatrol raschipi: and it is...?
03:25 raschipi don't remember
03:26 ipatrol raschipi: does it work with the regex operators too?
03:26 raschipi yes, why wouldn't it?
03:28 mcmillhj joined #perl6
03:31 rba_ joined #perl6
03:32 ipatrol m: my $patt = <spam camel butterfly>.join('|'); 'camelfly spam' ~~ /$patt/ and say ~$/;
03:32 camelia rakudo-moar 8a0f6a: ( no output )
03:35 ipatrol m: say <spam camel butterfly>.join('|');
03:35 camelia rakudo-moar 8a0f6a: OUTPUT: «spam|camel|butterfly?»
03:35 ipatrol m: 'camelfly spam' ~~ /spam|camel|butterfly/ and say ~$/;
03:35 camelia rakudo-moar 8a0f6a: OUTPUT: «camel?»
03:36 ipatrol raschipi: evidently it does not
03:37 raschipi right, but you're no using the necessary incantations.
03:38 raschipi which I don't remember.
03:38 ipatrol abracadabra? :-P
03:39 cdg joined #perl6
03:44 ipatrol m: my $patt = <spam camel butterfly>.join('|'); 'camelfly spam' ~~ / <$patt> / and say ~$/;
03:44 camelia rakudo-moar 8a0f6a: OUTPUT: «camel?»
03:44 ipatrol raschipi: found the incantation. It's angle brackets :-P
03:45 mcmillhj joined #perl6
03:46 rba__ joined #perl6
03:48 ipatrol presumably it forces the string being referenced to be treated as a regex subrule
03:48 teatime m: my @patt = <spam camel butterfly>; 'camelfly spam' ~~ / @patt / and say ~$/;
03:48 camelia rakudo-moar 8a0f6a: OUTPUT: «camel?»
03:49 teatime I guess I should have renamed @patt to something else.
03:49 ipatrol teatime: oh that's even more interesting, but where is it documented?
03:50 teatime couple of places
03:51 teatime when you interpolate a string by default it's treated as a literal to match against rather than pattern, as you established
03:51 teatime if it's a @ of strings instead it matches like an alternation
03:52 llfourn joined #perl6
03:55 ipatrol teatime: how can I negate a portion of a regex?
03:59 teatime can you give more details / an example
04:00 ipatrol teatime: what's the P6 equivalent of (?!pattern) ?
04:00 ipatrol *from P5
04:00 mcmillhj joined #perl6
04:01 rba_ joined #perl6
04:02 teatime (?!pattern) would be negative lookahead, so <!before pattern>
04:02 ipatrol ah, ok
04:03 teatime https://docs.perl6.org/language/regexes  is pretty exhaustive, I think.
04:03 Cabanoss- joined #perl6
04:04 ipatrol teatime: it didn't explain either of those two interpolation tricks
04:08 ipatrol teatime: actually, looking at it, it doesn't explain interpolation in regexes at all
04:09 teatime fair enough.
04:13 raschipi time to sleep, bye everyone
04:13 ipatrol teatime: it is described in https://design.perl6.org/S05.html#Extensible_metasyntax_(%3C...%3E) where it says "A leading $ indicates an indirect subrule call. The variable must contain either a Regex object (really an anonymous method--see above), or a string to be compiled as the regex. The string is never matched literally."
04:15 teatime yes.
04:16 ipatrol teatime: and the array syntax is explained in https://design.perl6.org/S05.html#Variable_(non-)interpolation
04:17 rba__ joined #perl6
04:17 teatime so I'm not 100% sure, but I'm thinking the fact that you interpolated your string into the pattern with < > was kindof an accident
04:18 teatime like, it doesn't interpolate into the pattern, it is interpreted as a standalone subpattern
04:18 teatime and perhaps this is how to say what you really meant:
04:18 teatime m: my $patt = <spam camel butterfly>.join('|'); 'camelfly spam' ~~ / <{ $patt }> / and say ~$/;
04:18 camelia rakudo-moar 8a0f6a: OUTPUT: «camel?»
04:18 ipatrol teatime: yeah, that's what I said. It coerces it into a subrule
04:19 teatime I think you'll find you don't need/want this behavior as often as you seem to be expecting, though
04:20 teatime instead of building a pattern up out of strings it's more natural to just build with regex objects / subrules
04:21 ipatrol teatime: I wanted to store the information as a hash, so the list interpolation allows me to use the keys method of the hash to build the regex
04:22 ipatrol because I might later move the information out of the code and into a config file
04:23 araraloren_fake joined #perl6
04:23 araraloren_fake good noon
04:25 ipatrol araraloren_fake: you live in East Asia then I take it?
04:25 araraloren_fake yeah, in China
04:25 teatime o/
04:26 araraloren_fake o/
04:26 ipatrol \o/
04:27 araraloren_fake \o|
04:29 ipatrol At work the other day I had a group of 32 Chinese people show up. They were with some company. For where I work, that's a rather large group, so I jokingly asked the lady in charge if she was bringing the whole country with her
04:29 ipatrol but anyway, </noise>. So, araraloren_fake, what can we help you with?
04:31 rba_ joined #perl6
04:31 araraloren_fake no, I'm come here often.
04:33 araraloren_fake :) And I can help others, I'm not newbie of Perl 6
04:33 * teatime lols at the new ? operators
04:37 araraloren_fake What is the atomicint for ?
04:38 teatime atomic/safe operations on native ints when multiple threads may be doing the operation
04:38 teatime don't have to acquire a lock first before making the modification
04:39 ipatrol araraloren_fake: in that case, since I am a newbie, what can you help me with? :-P
04:39 araraloren_fake oh, so it's aim for safe operator on native int, not for Perl6 object type ?
04:40 araraloren_fake ipatrol, :) you can ask me, if I know I'll tell you or where it can found in document.
04:41 mcmillhj joined #perl6
04:41 araraloren_fake teatime, I see, it's just like a Atomic integer of C/C++
04:41 ipatrol araraloren_fake: ok, how can I set a hash, or else create a custom subtype thereof, that when a key is not found in the mapping, simply returns the requested key as a value?
04:44 Actualeyes joined #perl6
04:45 araraloren_fake ipatrol, you can mixin a role with custome AT-KEY method
04:46 rba__ joined #perl6
04:48 araraloren_fake m: my %hash; %hash does role :: { method AT-KEY($key, |c) { return $key unless self.{$key}:exists; nextwith(|c); }; }; say %hash{2};
04:48 camelia rakudo-moar 8a0f6a: OUTPUT: «2?»
04:48 araraloren_fake It's just like ^^^
04:48 xtreak joined #perl6
04:49 ipatrol araraloren_fake: what does nextwith(|c) do?
04:50 araraloren_fake ipatrol, it'll call next method in inheritance chains
04:50 araraloren_fake in there, it'll call same name method AT-KEY of Hash
04:50 ipatrol araraloren_fake: what exactly does the |c stand for?
04:51 araraloren_fake It is a argument Capture
04:52 araraloren_fake m: my %hash = f => 42; %hash does role :: { method AT-KEY($key, |c) { return $key unless self.{$key}:exists; nextwith($key, |c); }; }; say %hash{2}; say %hash<f>;
04:52 camelia rakudo-moar 8a0f6a: OUTPUT: «2?42?»
04:53 araraloren_fake I forget pass $key to nextwith, that's the final version
04:53 ipatrol araraloren_fake: so like python's asterisk operator?
04:53 araraloren_fake IDK python
04:54 ipatrol captures a variable number of arguments and returns them as a list
04:54 araraloren_fake m: sub foo(|c) { dd c; }; foo(1, 2, "23", :f(3), "z" => "w");
04:54 camelia rakudo-moar 8a0f6a: OUTPUT: «\(1, 2, "23", :z("w"), :f(3))?»
04:54 araraloren_fake ipatrol, it's Capture object here
04:54 xtreak joined #perl6
04:55 araraloren_fake m: sub foo(|c) { say c.WHAT; }; foo(1, 2, "23", :f(3), "z" => "w");
04:55 camelia rakudo-moar 8a0f6a: OUTPUT: «(Capture)?»
04:55 ipatrol which docs say gives you a list for positional arguments and a hash for named ones
04:56 araraloren_fake It's *@ and *%
04:56 xtreak joined #perl6
04:56 ipatrol or a method-based conversion likewise
04:57 mcmillhj joined #perl6
04:58 araraloren_fake m: sub foo(|c, *%nas) { say c; say %nas; }; foo(1, 2, "23", :f(3), "z" => "w");
04:58 camelia rakudo-moar 8a0f6a: OUTPUT: «\(1, 2, "23", :z("w"), :f(3))?{f => 3}?»
04:59 araraloren_fake m: sub foo(Int, |c, *%nas) { say c; say %nas; }; foo(1, 2, "23", :f(3), "z" => "w");
04:59 camelia rakudo-moar 8a0f6a: OUTPUT: «\(2, "23", :z("w"), :f(3))?{f => 3}?»
04:59 araraloren_fake m: sub foo(Int, *%nas, |c) { say c; say %nas; }; foo(1, 2, "23", :f(3), "z" => "w");
04:59 camelia rakudo-moar 8a0f6a: OUTPUT: «\(2, "23", :z("w"))?{f => 3}?»
05:00 araraloren_fake m: sub foo(Int $z, *%nas, |c) { say c; say %nas; }; foo(1, 2, "23", :f(3), "z" => "w");
05:00 camelia rakudo-moar 8a0f6a: OUTPUT: «\(2, "23", :z("w"))?{f => 3}?»
05:00 araraloren_fake m: sub foo(Int $z, *%nas, |c) { say $z; say c; say %nas; }; foo(1, 2, "23", :f(3), "z" => "w");
05:00 camelia rakudo-moar 8a0f6a: OUTPUT: «1?\(2, "23", :z("w"))?{f => 3}?»
05:01 teatime sooo... there is this giant angry hornet nest (maybe 12" around and 14" tall) that I have to attempt to remove this morning
05:01 rba_ joined #perl6
05:01 teatime once more unto the breach, dear friends
05:01 ipatrol teatime: did you try using smoke?
05:02 teatime like a beekeeper?  I don't have any equipment like that, heh
05:03 ipatrol teatime: all you need is a can with some holes in it
05:03 ipatrol araraloren_fake: why is the . needed between self and {$key}?
05:04 Cabanossi joined #perl6
05:04 ipatrol m: my %hash = f => 42; %hash does role :: { method AT-KEY($key, |c) { return $key unless self{$key}:exists; nextwith($key, |c); }; }; say %hash{2}; say %hash<f>;
05:04 camelia rakudo-moar 8a0f6a: OUTPUT: «2?42?»
05:05 teatime I wish I had the suit though, I'm pretty scared heh
05:05 ipatrol teatime: the other option is to kill them all with chemistry and then remove the thing
05:06 teatime yeah that's the plan
05:08 ipatrol if you're fine being fairly unspecific, burning some sulfur in a can underneath the hive will work quite well. Otherwise there are various insecticides, of course.
05:09 ipatrol araraloren_fake: I'm not even sure why it worked with the dot. I thought calling obj.{$var} would try to return you a method with the name of whatever $var is once coerced to a strign
05:09 ipatrol *string
05:10 araraloren_fake ipatrol, oh that's like dereference in Perl 5
05:10 araraloren_fake https://docs.perl6.org/language/5to6-nutshell#Dereferencing
05:12 ipatrol araraloren_fake: your version treated self as a reference to a hash, whereas mine treated it as the hash itself
05:12 mcmillhj joined #perl6
05:14 araraloren_fake yeah, cause self is sigilless variable, I prefer dereferencing it and call method on it
05:14 araraloren_fake sigilless variable is not in any context
05:16 kannan joined #perl6
05:16 rba__ joined #perl6
05:18 ipatrol araraloren_fake: whereas I'm inclined to think of self as representing the actual object
05:20 ipatrol m: say Any.defined;
05:20 camelia rakudo-moar 8a0f6a: OUTPUT: «False?»
05:21 ipatrol m: say Any // 'pie';
05:21 camelia rakudo-moar 8a0f6a: OUTPUT: «pie?»
05:22 ipatrol m: my %hash = f => 42; %hash does role :: { method AT-KEY($key, |c) { nextwith($key, |c) // $key; }; }; say %hash{2}; say %hash<f>
05:22 camelia rakudo-moar 8a0f6a: OUTPUT: «(Any)?42?»
05:23 ipatrol hm
05:27 wamba joined #perl6
05:27 araraloren_fake ipatrol, maybe and the docs said it represent invocant(https://docs.perl6.org/routine/self). And you can custom the method invocant
05:28 ipatrol m: my %hash = {'f' => 42}; %hash does role :: { method AT-KEY($key, |c) { return callsame // $key; }; }; say %hash{2}; say %hash{'f'};
05:28 camelia rakudo-moar 8a0f6a: OUTPUT: «5===SORRY!5===?Null regex not allowed?at <tmp>:1?------> 3od AT-KEY($key, |c) { return callsame //7?5 $key; }; }; say %hash{2}; say %hash{'f'?Other potential difficulties:?    Useless use of hash composer on right side of hash assignm…»
05:28 ipatrol m: my %hash = {'f' => 42}; %hash does role :: { method AT-KEY($key, |c) { return callsame() // $key; }; }; say %hash{2}; say %hash{'f'};
05:28 camelia rakudo-moar 8a0f6a: OUTPUT: «Potential difficulties:?    Useless use of hash composer on right side of hash assignment; did you mean := instead??    at <tmp>:1?    ------> 3my %hash = {'f' => 42}7?5; %hash does role :: { method AT-KEY($ke?2?42?»
05:28 araraloren_fake m: my %hash = f => 42; %hash does role :: { method AT-KEY($key, |c) { callwith($key, |c) // $k }; }; say %hash<2>; say %hash<f>;
05:28 camelia rakudo-moar 8a0f6a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Variable '$k' is not declared?at <tmp>:1?------> 3T-KEY($key, |c) { callwith($key, |c) // 7?5$k }; }; say %hash<2>; say %hash<f>;?»
05:29 araraloren_fake m: my %hash = f => 42; %hash does role :: { method AT-KEY($key, |c) { callwith($key, |c) // $key }; }; say %hash<2>; say %hash<f>;
05:29 camelia rakudo-moar 8a0f6a: OUTPUT: «2?42?»
05:29 ipatrol m: my %hash = 'f' => 42; %hash does role :: { method AT-KEY($key, |c) { return callsame() // $key; }; }; say %hash{2}; say %hash{'f'};
05:29 camelia rakudo-moar 8a0f6a: OUTPUT: «2?42?»
05:29 ipatrol I think the braces with a lone pair confused it
05:29 araraloren_fake yeah, call* with return to current method when call over
05:30 araraloren_fake next* will never return to current method
05:31 ipatrol similar to system versus exec
05:31 araraloren_fake yeah
05:31 ipatrol from p5
05:31 araraloren_fake callsame use same argument of current method, and same like nextsame
05:31 rba_ joined #perl6
05:32 ipatrol which makes the expression a bit shorter
05:33 ipatrol I wonder if the return is actually necessary
05:33 araraloren_fake ipatrol, not necessary
05:33 ipatrol m: my %hash = 'f' => 42; %hash does role :: { method AT-KEY($key, |c) { callsame() // $key; }; }; say %hash{2}; say %hash{'f'};
05:33 camelia rakudo-moar 8a0f6a: OUTPUT: «2?42?»
05:34 ipatrol yay! a birdie!
05:35 araraloren_fake :P
05:35 ipatrol why does it think it's a null regex though?
05:35 ipatrol m: my %hash = 'f' => 42; %hash does role :: { method AT-KEY($key, |c) { callsame // $key; }; }; say %hash{2}; say %hash{'f'};
05:35 camelia rakudo-moar 8a0f6a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Null regex not allowed?at <tmp>:1?------> 3 { method AT-KEY($key, |c) { callsame //7?5 $key; }; }; say %hash{2}; say %hash{'f'?»
05:35 araraloren_fake cause // is like a null regex
05:36 araraloren_fake m: say //
05:36 camelia rakudo-moar 8a0f6a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Null regex not allowed?at <tmp>:1?------> 3say //7?5<EOL>?»
05:36 araraloren_fake m: say /123/;
05:36 camelia rakudo-moar 8a0f6a: OUTPUT: «/123/?»
05:36 ipatrol but I'm using it with two operands and not with a matching operator
05:36 ipatrol m: say Mu // 2;
05:36 camelia rakudo-moar 8a0f6a: OUTPUT: «2?»
05:37 araraloren_fake callsame is a method name, and //, $key is argument
05:37 araraloren_fake just like `say // $key'
05:37 araraloren_fake m: say // $key
05:37 camelia rakudo-moar 8a0f6a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Null regex not allowed?at <tmp>:1?------> 3say //7?5 $key?»
05:38 ipatrol so it's putting commas in there?
05:38 ipatrol m: say(//,'key');
05:38 camelia rakudo-moar 8a0f6a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Null regex not allowed?at <tmp>:1?------> 3say(//7?5,'key');?»
05:38 ipatrol m: say('key');
05:38 camelia rakudo-moar 8a0f6a: OUTPUT: «key?»
05:38 araraloren_fake so you can use say without parentheses
05:38 ipatrol m: say(Mu // 'key');
05:38 camelia rakudo-moar 8a0f6a: OUTPUT: «key?»
05:39 ipatrol m: my %hash = 'f' => 42; %hash does role :: { method AT-KEY($key, |c) { (callsame // $key); }; }; say %hash{2}; say %hash{'f'};
05:39 camelia rakudo-moar 8a0f6a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Null regex not allowed?at <tmp>:1?------> 3{ method AT-KEY($key, |c) { (callsame //7?5 $key); }; }; say %hash{2}; say %hash{'f?»
05:39 araraloren_fake m: say( say // $key )); # like this
05:39 camelia rakudo-moar 8a0f6a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Null regex not allowed?at <tmp>:1?------> 3say( say //7?5 $key )); # like this?»
05:39 ipatrol m: say(&say // 'key');
05:39 camelia rakudo-moar 8a0f6a: OUTPUT: «sub say (| is raw) { #`(Sub|36908248) ... }?»
05:40 pierre_ joined #perl6
05:40 araraloren_fake yeah, use & get the sub
05:40 ipatrol or use () to call it
05:40 araraloren_fake and without & will call it
05:40 cdg joined #perl6
05:40 ipatrol what does &meth() do?
05:40 araraloren_fake m: say; # this will call say
05:40 camelia rakudo-moar 8a0f6a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Unsupported use of bare "say"; in Perl 6 please use .say if you meant to call it as a method on $_, or use an explicit invocant or argument, or use &say to refer to the function as a noun?at <tmp>:1?--…»
05:41 araraloren_fake m: &say; # this will call say
05:41 camelia rakudo-moar 8a0f6a: OUTPUT: «WARNINGS for <tmp>:?Useless use of &say in sink context (line 1)?»
05:41 araraloren_fake this not
05:41 ipatrol nopu
05:41 araraloren_fake m: &say(); # this will call say
05:41 camelia rakudo-moar 8a0f6a: OUTPUT: «?»
05:41 ipatrol m: &say('kitten');
05:41 camelia rakudo-moar 8a0f6a: OUTPUT: «kitten?»
05:42 ipatrol I prefer "kitten" to "foo" :-P
05:42 araraloren_fake m: say &say;
05:42 camelia rakudo-moar 8a0f6a: OUTPUT: «sub say (| is raw) { #`(Sub|60094056) ... }?»
05:42 ipatrol or rather, "cat" is foo, and "kitten" is foobar
05:43 araraloren_fake haha
05:43 pierre_ joined #perl6
05:48 nadim joined #perl6
05:50 ipatrol araraloren_fake: can a hash literal contain a trailing comma?
05:51 ipatrol m: my %hash = {'cat'=>'kitten','foo'=>'foobar',};
05:51 camelia rakudo-moar 8a0f6a: OUTPUT: «Potential difficulties:?    Useless use of hash composer on right side of hash assignment; did you mean := instead??    at <tmp>:1?    ------> 3ash = {'cat'=>'kitten','foo'=>'foobar',}7?5;?»
05:51 ipatrol m: my %hash = {'cat'=>'kitten','foo'=>'foobar',}; say %hash.gist;
05:51 camelia rakudo-moar 8a0f6a: OUTPUT: «Potential difficulties:?    Useless use of hash composer on right side of hash assignment; did you mean := instead??    at <tmp>:1?    ------> 3ash = {'cat'=>'kitten','foo'=>'foobar',}7?5; say %hash.gist;?{cat => kitten, foo => foobar}?»
05:52 ipatrol m: my %hash = 'cat'=>'kitten','foo'=>'foobar',; say %hash.gist;
05:52 camelia rakudo-moar 8a0f6a: OUTPUT: «{cat => kitten, foo => foobar}?»
05:52 brrt joined #perl6
05:52 ipatrol I don't understand why choosing to use the optional braces is considered a "potential difficulty"
05:54 Skarsnik joined #perl6
05:55 Skarsnik Hello
05:56 ipatrol anyway, I need to go to bed. It's like 2AM here. Night all.
05:56 Skarsnik AlexDaniel, did you try connecting some of your bot on ipv6 to bypass the 10 connections limits?
06:04 Cabanossi joined #perl6
06:14 espadrine joined #perl6
06:34 Cabanossi joined #perl6
06:36 andrzejku joined #perl6
06:59 domidumont joined #perl6
07:02 astj_ joined #perl6
07:05 parv joined #perl6
07:07 domidumont joined #perl6
07:11 snarkyboojum_ joined #perl6
07:13 darutoko joined #perl6
07:13 ChoHag joined #perl6
07:15 nadim joined #perl6
07:28 domidumont joined #perl6
07:40 zakharyas joined #perl6
07:41 cdg joined #perl6
07:47 dakkar joined #perl6
07:48 Dunearhp joined #perl6
07:59 mcmillhj joined #perl6
08:02 jonas1 joined #perl6
08:03 ChoHag joined #perl6
08:03 Cabanossi joined #perl6
08:06 rindolf joined #perl6
08:15 mcmillhj joined #perl6
08:16 melezhik joined #perl6
08:16 melezhik Hi Perl6 gurus!
08:16 melezhik How can I know the time my script is working at the moment ?
08:17 melezhik a special variable ...
08:19 nadim https://docs.perl6.org/routine/now
08:22 araraloren_fake joined #perl6
08:22 araraloren_fake :)
08:24 wigner joined #perl6
08:24 snarkyboojum joined #perl6
08:32 xtreak joined #perl6
08:32 mcmillhj joined #perl6
08:34 lizmat Juerd: I see STORE_AT_KEY as an implementation detail that may not survive in the future
08:34 yoleaux 00:43Z <japhb> lizmat: re: rakudo 5db5b1db , couldn't you test for being concrete or being Any?  That would only leave the much smaller number of type objects that are Mu but not Any.  Not perfect, but an improvement I think.
08:36 pazitiff joined #perl6
08:38 wamba joined #perl6
08:39 pierre_ joined #perl6
08:42 * lizmat clickbaits https://p6weekly.wordpress.com/2017/08/21/2017-34-going-atomic/
08:48 araraloren_fake lizmat++
08:50 ambs joined #perl6
08:51 mcmillhj joined #perl6
08:58 robertle joined #perl6
09:00 samcv joined #perl6
09:02 pazitiff Hello!
09:02 pazitiff Some useing Perl6 in prodcation?
09:03 pazitiff I am just looking to Perl6. Grammars is realy great idea
09:05 nuk9 joined #perl6
09:10 nattefrost joined #perl6
09:12 araraloren_fake pazitiff, hi
09:12 melezhik joined #perl6
09:12 araraloren_fake yeah, I like Grammar too :)
09:13 lowbro joined #perl6
09:13 lowbro joined #perl6
09:13 melezhik HI nadim: , thanks. I need indeed time elapsed my script has been running , not current time
09:14 moritz pazitiff: I'm liking grammars so much that I'm writing a book about them :-)
09:15 moritz if you want to be informed when it (or other Perl 6 books) come out, sign up for the mailing list at https://perl6book.com/
09:15 moritz </ad type="blatant">
09:19 melezhik How to know the time elapsed from the begining till now my script has been running ... ?
09:20 El_Che moritz: how far are you on the book?
09:21 El_Che moritz: and aren't you tired from the last one?
09:22 moritz melezhik: now - INIT now
09:23 moritz melezhik: there's also $*INITTIME
09:23 moritz El_Che: I've written about 95 pages in A4
09:23 El_Che melezhik: or use "time" from the shell
09:23 moritz El_Che: so volume-wise about 80% done
09:23 El_Che moritz: you're inspired
09:23 El_Che nice
09:24 moritz El_Che: and I had a break during the time that the production team did all their magic
09:24 El_Che I have been keeping an eye for your book on safari, not there yet
09:24 melezhik guys, thanks for options, will take a look
09:24 El_Che Think Perl 6 was recently changed from Early Cut to Final
09:27 moritz will there be a Director's Cut also? :-)
09:28 El_Che hehe
09:28 El_Che I started browsing the book
09:29 El_Che (in the hope the author will get paid)
09:29 El_Che interesting beginners book
09:31 moritz aye; I proof-read the first 100 pages or so
09:31 moritz (and then got bogged down in my own book)
09:31 El_Che yes, I saw your name there
09:31 El_Che and liz
09:32 jmerelo joined #perl6
09:33 jmerelo Hi :-)
09:33 moritz \o jmerelo
09:33 El_Che jota-jota
09:34 jmerelo @el_che I loved your meta-analysis of the issues in the TPCiA chat :-)
09:34 moritz speaking of jmerelo -- yesterday I started creating a docker image for the regexes/grammar book, based on the perl6-alpine docker image
09:34 El_Che jmerelo: haha, I have an audiance
09:34 jmerelo I am having trouble with it now...
09:34 * El_Che climbs on a box
09:35 jmerelo I am trying to update it to the latest version of Rakudo Perl and it fails to build.
09:35 jmerelo moritz: glad it helps :-) If you need anything, just let me now
09:36 El_Che jmerelo: gave alpine a go again, and still ruby-musl problems. Wanted to send a PR for your img to use pkgs (so it builds inmediately). Not there yet
09:36 moritz jmerelo: will do, thanks :-)
09:36 jmerelo El_che I don't know if this is related to that. Check out the error:
09:37 jmerelo um
09:39 jmerelo This is the problem https://twitter.com/jjmerelo/status/899928919570305026
09:39 jmerelo It core dumps in stage1
09:40 El_Che mmm
09:40 El_Che jmerelo: I'll sping the new release for my packages and see if I have it as well
09:40 jmerelo Thanks
09:40 El_Che I also have a alpine branch were rakudo gets built, but fails at packaging
09:41 jmerelo Here's the Dockerfile https://github.com/JJ/alpine-perl6/blob/master/Dockerfile
09:41 cdg joined #perl6
09:42 jmerelo El_che: how does it fail? Size problems?
09:43 lizmat joined #perl6
09:45 wamba joined #perl6
09:49 Ulti out of curiosity does anyone here use windows not 10?
09:50 Ulti installing R* and the WWW stuff just worked for me apart from some failing tests unrelated to OpenSSL problems
09:58 jmerelo 2017.01 builds correctly in Alpine. There must be some change after that...
10:00 El_Che 2017.07 builds fine on alpine on my side
10:00 El_Che (sorry, I was afk)
10:01 jmerelo Checking that now. No problem.
10:02 jmerelo So it must be something in 2017.08 and a completely unrelated thing in v6.c
10:03 jmerelo It's building now in Docker Hub https://hub.docker.com/r/jjmerelo/alpine-perl6/builds/bzyhudn9iqxf4yyhxpjl22c/
10:03 El_Che building 2017.07 with travis: https://travis-ci.org/nxadm/rakudo-pkg
10:04 El_Che I'll create pkgs if ok
10:04 jmerelo Great :-)
10:04 El_Che I should look into creating release automatically with travis
10:04 El_Che haven't had the time
10:05 El_Che jmerelo: I'll run my alpine container manually to here if it build
10:06 jmerelo It does locally.
10:06 jmerelo Guess there will be no problem in Docker Hub
10:08 El_Che I am confused. You fixed the 2017.08 build problem?
10:09 araraloren_fake Is the last release of rakudo rpm released ?
10:09 El_Che Ulti: my ubuntu pkg works on the Linux Subsystem of windows 10. I ran some tests, but don't use win10 much
10:10 El_Che araraloren_fake: I you refer to 2017.08 and my pkgs, they are being built. If you refer to distro's own pkgs, probably on their "unstable/rawhide/dev" branch. If you mean Rakudo Star, no (the lastest is 2017.07)
10:12 El_Che ===SORRY!===
10:12 El_Che Found /opt/rakudo/bin/moar version 2017.08, which is too old. Wanted at least 2017.08.1
10:13 El_Che agh
10:13 El_Che again the version mismatch
10:20 Actualeyes left #perl6
10:20 jmerelo Built new perl6 docker image https://hub.docker.com/r/jjmerelo/alpine-perl6/builds/bzyhudn9iqxf4yyhxpjl22c/
10:21 jmerelo El_Che: I didn't fix it. I checked it worked with 2017.07, as you said. It's still not working with 2017.08, and I have no idea how to fix it.
10:21 araraloren_fake El_Che, I mean rakudo not Rakudo Star
10:24 xinming_ joined #perl6
10:28 xtreak joined #perl6
10:28 stmuk I believe alpine linux has exec stack protection of some sort, there have been some changes to do with that in .08 so maybe related
10:28 stmuk does dmesg display anything odd?
10:31 xtreak_ joined #perl6
10:39 xinming joined #perl6
10:39 cdg joined #perl6
10:40 leont joined #perl6
10:42 sena_kun joined #perl6
10:44 DarthGandalf joined #perl6
10:44 sena_kun arnsholt, ping.
10:51 cog_ joined #perl6
10:54 masak joined #perl6
10:54 shadoxx_ joined #perl6
10:55 brimonk joined #perl6
10:56 cosimo joined #perl6
11:00 maettu joined #perl6
11:00 jmerelo joined #perl6
11:00 El_Che joined #perl6
11:01 leedo_ joined #perl6
11:01 teatime joined #perl6
11:02 pm51 joined #perl6
11:02 tinita joined #perl6
11:02 Voldenet joined #perl6
11:02 Voldenet joined #perl6
11:03 kubrat joined #perl6
11:05 incredible joined #perl6
11:05 cgfbee joined #perl6
11:07 eythian joined #perl6
11:14 jmerelo stmuk: I would have to check from the Docker image itself. What kind of things should I look for?
11:26 leont joined #perl6
11:26 El_Che jmerelo: rakudo 2018.08 build fails on alpine (this is new), and builds fine on other distors
11:26 El_Che distros
11:27 jmerelo Timo is telling me in Twitter that there seems to be a problem with that particular version.
11:27 jmerelo 2018.08.1 should be available soon.
11:27 jmerelo s/2018/2017/
11:27 El_Che jmerelo: https://gist.github.com/nxadm/ea6a2aa2965c19e4d3c79b2d1dd7353a
11:28 jmerelo Correct, same problem I had.
11:28 El_Che it does build fine however on Ubuntu, Debian, Fedora and Centos: https://travis-ci.org/nxadm/rakudo-pkg/builds/267123623
11:29 El_Che jmerelo: I am building again moarvm 2018.08.1
11:30 jmerelo I had a problem also with building latest version in ubuntu 14.04 https://github.com/tadzik/rakudobrew/issues/119
11:31 timotimo jmerelo: 2017.08.1 is already available
11:31 timotimo in git
11:31 timotimo AFAIK rakudobrew doesn't build from tarballs
11:31 El_Che timotimo: rakudo 2017.08.1 or moarvm?
11:32 timotimo moarvm
11:32 jmerelo does not show up in rakudobrew list-available. Which might be my fault, since that part of rakudobrew is mine...
11:32 timotimo rakudo 2017.08 should depend on moarvm 2017.08.1
11:32 El_Che timotimo: in that case, it doesn't fix it
11:32 El_Che timotimo: my output is with that version
11:32 haukex joined #perl6
11:33 timotimo where do i have to look for the output?
11:33 El_Che 13:27 < El_Che> jmerelo: https://gist.github.com/nxadm/ea6a2aa2965c19e4d3c79b2d1dd7353a
11:33 timotimo thanks
11:33 El_Che I can paste a larger part if needed, shell still open
11:33 timotimo can you also get moar --version?
11:37 timotimo what do i do on my local docker to get the same exact setup you have?
11:38 stmuk jmerelo: errors about stack something or other
11:39 jmerelo stmuk: errors are not too informative. Just the line and an error code. But I'll look for that if I can find it. Thanks!
11:40 El_Che timotimo: do you want to build one from a Dockerfile or do you want one from the hub?
11:40 stmuk oh alpine doesn't use glibc either
11:40 timotimo whatever lets me go in there and run the command via gdb
11:40 timotimo so i can figure out why it segfaults
11:42 stmuk " it appears that Alpine Linux (and specifically the musl-libc library it uses) has a very limited stack size by default"
11:44 El_Che timotimo: https://gist.github.com/anonymous/bd1e3572fc9917f6d26f9654eed8c1e7
11:46 timotimo El_Che: need to switch the checkout and the cd :)
11:46 El_Che timotimo: if you create the alpine container (skip the create pkg command) from the gist, you can just do: docker run -ti --rm --entrypoint=/bin/bash rakudo/pkgrakudo-alpine-amd64
11:47 El_Che from there you can do the needed steps manually
11:47 timotimo the "create pkg command" is "pkg_rakudo.pl"?
11:48 El_Che that's a wrapper for passing the version information to the packager script in the image
11:48 timotimo mhm
11:48 El_Che https://github.com/nxadm/rakudo-pkg/blob/30d8e3944e48dd8e9c04859ebfbe9b9038e006c6/docker/Dockerfile-pkgrakudo-alpine-amd64-3.5#L21
11:48 El_Che that copy there puts "pkg_rakudo" in the / of the image
11:48 El_Che with the download and build instructions
11:49 El_Che https://github.com/nxadm/rakudo-pkg/blob/alpine/docker/pkg_rakudo
11:49 ggoebel joined #perl6
11:50 El_Che it's a just simple distro-agnostic script that download the sources, compiles them and packages them
11:50 timotimo i can't do the docker run command
11:50 timotimo "Unable to find image 'rakudo/pkgrakudo-alpine-amd64:latest' locally"
11:50 El_Che yes, you need to build it first
11:50 El_Che timotimo: let us do something else
11:50 El_Che I'll prepare an image with the sources in place and gdb
11:51 timotimo i ran create_container.pl, shouldn't that do it?
11:51 El_Che upload it to the docker hub and let  you run that
11:51 El_Che timotimo: yes, it should
11:52 timotimo Successfully built 3dc7ded9a64f
11:52 timotimo Successfully tagged rakudo/pkgrakudo-alpine-amd64:3.5
11:52 timotimo i probably have to put the version at the end to be able to ues it?
11:52 El_Che yes
11:52 timotimo that was easy
11:54 timotimo the tarball for moarvm's point release is already up, btw
11:56 timotimo i can't run it under gdb: warning: Error disabling address space randomization: Operation not permitted
11:56 timotimo During startup program terminated with signal SIGSEGV, Segmentation fault.
11:56 El_Che yes
11:57 El_Che musl
11:57 El_Che I think stmuk commented about that a few weeks ago
11:57 El_Che (the randomization stuff, not gdb)
12:00 timotimo oh, docker threw everything i did away, okay
12:00 timotimo is that what --rm odes?
12:02 El_Che timotimo: I created a sandbox for you:
12:02 El_Che docker run -ti nxadm/timoalpine bash
12:02 El_Che in the container you can run /pkgrakudo with no params
12:02 timotimo too late, i'm already in gdb now :)
12:03 El_Che it will download the rakudo, nqp and moarvm dists and unpack them on /
12:03 El_Che then you can build them however you like it
12:04 timotimo i wonder if rr works inside there
12:05 El_Che apk is your friend if you need extra packages
12:05 timotimo yup
12:05 timotimo apk doesn't have rr though
12:05 El_Che and --rm, yes ;)
12:06 timotimo #0  0x00007ffff7d95dc6 in malloc () from /lib/ld-musl-x86_64.so.1
12:06 timotimo #1  0x0000000000000000 in ?? ()
12:06 timotimo fantastic backtrace
12:07 El_Che timotimo: while you're at it, fix the fpm crash so I can create rakudo packages on alpine :)
12:07 El_Che (to illustrate that a lot of soft seems to have trouble with musl)
12:09 timotimo i'm running it through valgrind right now
12:09 timotimo that'll potentially take a long while
12:10 wigner joined #perl6
12:11 timotimo ==3532==  Bad permissions for mapped region at address 0x4089F68
12:11 timotimo ==3532==    at 0x54DD1C6: build_cfg (graph.c:102)
12:11 timotimo the what now?
12:16 raschipi joined #perl6
12:18 P6steve joined #perl6
12:18 timotimo well, gdb recording is out
12:18 araraloren_fake Why I can use `is export` on variable declared with my, but can apply it on `my sub` ?
12:18 ggoebel joined #perl6
12:19 colomon joined #perl6
12:19 moritz araraloren_fake: are you missing a negation somewhere in there?
12:20 timotimo [Inferior 1 (process 3541) exited normally]
12:20 timotimo graaahhh
12:20 araraloren_fake m: module Foo { my $x is export; };
12:20 camelia rakudo-moar 636a3c: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Can't apply trait 'is export' on a my scoped variable. Only our scoped variables are supported.?at <tmp>:1?------> 3module Foo { my $x is export7?5; };?    expecting any of:?        constrain…»
12:20 araraloren_fake m: module Foo { my sub x() of Int is export { 42 } };
12:20 camelia rakudo-moar 636a3c: ( no output )
12:21 araraloren_fake moritz, I'm not get you mean
12:22 colomon is there a way to get the process’s exit code from Proc::Async?  I need to figure out how to detect it when the process segfaults…
12:22 jnthn colomon: the Promise returned by .start will be kept with an object that has a .exitcode method
12:23 araraloren_fake or maybe can someone explain something about symbol table of PACKAGE ?
12:24 araraloren_fake I notice this question talk about some about public symbol table of PACKAGE: https://stackoverflow.com/questions/45770133/perl6-load-functions-into-other-namespace
12:24 araraloren_fake Is there a private symbol table ,or it called lexical symbol table ?
12:24 timotimo "lexical pad" usually
12:25 araraloren_fake oh lexical pad, I got it
12:26 araraloren_fake so we can too table or pad. But I can not get why we can export a sub declared with my?
12:26 timotimo El_Che: a quick google search shows how the alpine people patched mpd to set the stack size to 1024*1024 for threads created with pthread_create
12:26 timotimo El_Che: they used to get the exact same error, now they don't any more
12:27 araraloren_fake s/too/two/ :)
12:27 moritz araraloren_fake: in first approximation, scoping and exporting are orthogonal
12:27 wigner joined #perl6
12:28 araraloren_fake yeah, I see
12:28 El_Che timotimo: I can bump the image to 3.6
12:28 El_Che should be out by now
12:32 colomon jnthn: is there an example for it somewhere?  I am having a hard time figuring out how to make it work.
12:32 timotimo libuv has a piece of code to set the stack size to RLIMT_STACK when creating a new thread
12:33 timotimo maybe this is necessary on alpine linux as well for whatever reason?
12:33 zakharyas joined #perl6
12:34 Cabanossi joined #perl6
12:34 jnthn colomon: say (await $proc.start).exitcode
12:35 timotimo El_Che: how do you feel about patching moarvm for the alpine image?
12:35 El_Che timotimo: docker run -ti nxadm/pkgrakudo-alpine-amd64:3.6 bash
12:36 El_Che timotimo: as long as I cant get fpm to create packages, it won't do much
12:36 OtherNick joined #perl6
12:36 timotimo ?
12:36 El_Che timotimo: I think jj merelo is closer to the issue
12:36 El_Che timotimo: jjmerelo's image == rakudo on alpine
12:37 El_Che mine == an alpine image for creating alpine packages. The package part does not work yet as fpm as trouble as well
12:37 El_Che in short, my img is a short-live build environment for native packages
12:38 timotimo ok i have the image, where's th sources?
12:38 El_Che timotimo: but If you want me to patch that image, sure
12:38 timotimo i mean literally include a piece of C code in there
12:39 El_Che This are my images: https://github.com/nxadm/rakudo-pkg/tree/master/docker , this is jj's: https://github.com/JJ/alpine-perl6/blob/master/Dockerfile
12:39 timotimo i mean i'm inside the image, where are moar, nqp, and rakudo extracted to?
12:39 El_Che root
12:39 El_Che /
12:40 timotimo i only see the three scripts there for zef and pkg_rakudo
12:40 El_Che ok
12:40 El_Che in the regular image you need to run pkg_rakudo with env variables
12:40 timotimo oh
12:40 El_Che on the one I built from you I hardcoded those
12:41 El_Che so it downloaded and extracted them automatically
12:41 El_Che but that was 3.5
12:41 El_Che do you want me to create one like that for 3.6?
12:41 colomon jnthn++
12:41 timotimo what do i need REVISION for?
12:41 * colomon will figure this out sooner or later.
12:41 El_Che put 01
12:41 El_Che it's a pkg thing
12:42 timotimo ok
12:42 El_Che you can repkg the same version of the software with changes on the pkg
12:43 AnotherNick joined #perl6
12:45 Ven`` joined #perl6
12:46 lizmat joined #perl6
12:46 AnotherNick joined #perl6
12:47 timotimo i don't think libuv lets us tell them a stack size
12:47 Ven`` https://twitter.com/coetry/status/896169863684792320 if coetry comes around, he might want to check out #6macros :).
12:47 timotimo so we'd have to patch 3rdparty/libuv inside the alpine package
12:47 domidumont joined #perl6
12:47 leont joined #perl6
12:48 colomon jnthn: so it’s the .result of the Promise which has an exitcode, yes?
12:48 jnthn Yes
12:48 * colomon may be starting to undertand
12:48 colomon \o/
12:48 El_Che timotimo: that's ok for a self contained pkg as mine (if I fix the ruby prob), but distro's won't like tha
12:48 El_Che t
12:48 AnotherNick left #perl6
12:48 AnotherNick joined #perl6
12:49 timotimo "distros"?
12:49 timotimo oh
12:49 El_Che alpine, debian, centos
12:49 timotimo well, alpine will have to Deal With It
12:49 El_Che they don't like the include-3rd-party-libs
12:50 timotimo or offer us a magical stack compression library or something
12:50 El_Che yeah, my enthousiasm for alpine (see, 5mb images!) is somewhat cooled
12:51 timotimo i don't even think reducing default stack size for new threads helps with making small images
12:51 El_Che no, that's unrelated
12:51 timotimo well i guess it makes programs a little bit smaller? if they only ever use a kilobyte of the stack for every new tread
12:51 Ven`` well if they're OS threads, then they're a least a page big
12:51 El_Che I mean the idea of small images is very nice until you meet real world apps
12:52 Ven`` .oO( Always detect EVAL )
12:52 timotimo with MVM_SPESH_DISABLE=yes i can build nqp, but it won't test because "prove" is not installed
12:52 timotimo that's only a matter of a single apk add, though
12:53 timotimo how do i ask apk what package provides a given binary?
12:53 timotimo oh, second google search result
12:53 mcmillhj joined #perl6
12:53 timotimo apkfind() {wget -q --no-check-certificate -O - http://pkgs.alpinelinux.org/contents\?file=$1 | sed -e '1,119d' -e '/panel-footer/,$ d' -e 's/]*>//g' -e 's/\&\#x2F\;/\//g' -e '/^ *$/d' | xargs -n 5 | awk '{ printf("%-20s %-7s %-11s %-13s %s\n",$2,$3,$4,$5,$1)}' }
12:53 timotimo Operations
12:53 timotimo cool.
12:53 El_Che oh crap
12:54 Ven`` beautiful, glorious sed.
12:55 timotimo that output is disgusting
12:55 nuk9 joined #perl6
12:56 timotimo it's perl-utils
12:58 timotimo El_Che: looks like spesh is the only thing that blows the stack limit, and you can just disable that and still build your packages
12:59 El_Che timotimo: I am stuck at the packaging level. Until this release, rakudo built fine on alpine.
12:59 El_Che timotimo: jjmerelo is stuck on his rakudo img
13:00 El_Che the question is why this release needs the workaround and previous don't
13:00 timotimo spesh changed significantly between the previous and the current release
13:00 timotimo it got pushed to its own thread
13:01 timotimo i'll tweet our results at him
13:03 Cabanossi joined #perl6
13:03 cdg joined #perl6
13:06 jnthn Also, basic block walking recurses on the C stack, and spesh graphs split up into more basic blocks, so it can end up deeper. There's an upper limit on the code size we'll specialize.
13:06 jnthn But it assumes a stack size of around a meg
13:06 lizmat seems like someone referred to the latest P6W on HN: https://news.ycombinator.com/item?id=15071037
13:07 lizmat no comments yet, though
13:07 lizmat :-)
13:07 raschipi Reddit has comments: https://www.reddit.com/r/perl6/comments/6v63wv/201734_going_weekly_changes_in_and_around_perl_6/
13:08 cdg_ joined #perl6
13:09 cosimo joined #perl6
13:13 ilmari nobody tell tektektektektek that all ASCII characters are UTF-8...
13:14 ilmari nor that "UTF-8 character" isn't a thing, for that matter
13:15 timotimo jnthn: it already crashes inside build_cfg :)
13:15 timotimo at least it looked like it from valgrind's output
13:15 jnthn timotimo: haha
13:15 jnthn Wow
13:16 jnthn I wonder what recurses there
13:16 timotimo i wonder if the interp_run stackframe is a big part of the blame
13:16 timotimo why is that even on there for just the spesh worker? :P
13:16 * colomon has rebuilt his crash testing script to recognize the difference between crashes, hangs, returned no output, and success. o/
13:16 timotimo initial_invoke, surely
13:16 jnthn timotimo: Just so we can have it set up as a normal thread
13:17 jnthn timotimo: So it plays the same way with GC as everything else
13:17 jnthn It's hard enough to get threads and GC right without two kinds of thread :)
13:17 jnthn It's possible we could still have that and avoid the run stack frame though
13:17 jnthn Just was expedient to do it this way
13:19 timotimo right
13:20 timotimo i'm still not sure how big the stackframe for interp_run even is
13:20 timotimo probably not terribly bug
13:20 timotimo big*
13:23 gfldexwork joined #perl6
13:23 jnthn Dunno
13:23 timotimo hey google, how do i measure stack frame size? - here's a whole bunch of info about how to find the right sized bike for you
13:23 jnthn Anyway, time to start heading towards Switzerland...
13:23 jnthn o/
13:24 timotimo have a good trip!
13:24 AlexDaniel .tell Skarsnik ipv6 or not, how would I choose the ip unless the ticket is resolved?
13:24 yoleaux AlexDaniel: I'll pass your message to Skarsnik.
13:28 timotimo oooh -fstack-usage
13:29 DarthGandalf joined #perl6
13:34 pierre_ joined #perl6
13:35 timotimo interp_run: 1312 dynamic,bounded
13:37 timotimo bounded means that number is a reliable upper limit
13:40 leont I should have finished my PR Before 2017.8 came out :-/
13:40 lizmat leont: there's always 2017.09 ?
13:42 leont Can't make TAP::Harness parse subtests until Test.pm outputs them correctly, there's a chain effect :-/
13:44 leont fg
13:50 leont Test::_diag looks rather optimized (I mean, it's using nqp directly), and I'm not sure how to fix the issue without unoptimizing it
13:51 leont The easiest way is just to remove the empty-line-removing line entirely
13:54 Geth ¦ doc: 36251c6ecf | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/unicode_texas.pod6
13:54 Geth ¦ doc: List Texas atomics
13:54 Geth ¦ doc:
13:54 Geth ¦ doc: - Create a separate table (following format of the first one
13:54 Geth ¦ doc:     with all the ops got kinda messy)
13:54 Geth ¦ doc:
13:54 Geth ¦ doc: P.S.: Some of the subs appear to be undocumented
13:54 Geth ¦ doc: P.P.S: the docs for Texas/Unicode versions are duplicated; Wouldn't
13:54 Geth ¦ doc:     be easier to just list both variants with one description?
13:54 Geth ¦ doc: P.P.S.: Shouldn't ?+= and ?-= be called atomic-add-assign and atomic-sub-assign
13:54 Geth ¦ doc:     instead of atomic-add-fetch and atomic-sub-fetch, since ?= is atomic-assign,
13:54 Geth ¦ doc:     not atomic-fetch, which is just prefix:<?>
13:54 Geth ¦ doc: review: https://github.com/perl6/doc/commit/36251c6ecf
13:56 raiph joined #perl6
13:57 skids joined #perl6
13:58 domidumont joined #perl6
14:00 epony joined #perl6
14:01 Ven`` I love it.
14:02 araraloren_fake :)
14:03 Geth ¦ doc: e5cadaedaa | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/unicode_texas.pod6
14:03 Geth ¦ doc: Remove accidentally duped line
14:03 Geth ¦ doc: review: https://github.com/perl6/doc/commit/e5cadaedaa
14:03 ShalokShalom joined #perl6
14:03 nadim What's the format of the rakudo release tags that are considered stable? yyyy.mm(.v)?
14:04 moritz that is the format of release tags
14:04 moritz we don't have a separate syntax for those we consider "stable"
14:04 nadim release is good enough
14:04 moritz that's something that we typically can only tell after the fact
14:04 nadim :)
14:05 El_Che ha
14:06 Skarsnik joined #perl6
14:06 Skarsnik Hello
14:06 yoleaux 13:24Z <AlexDaniel> Skarsnik: ipv6 or not, how would I choose the ip unless the ticket is resolved?
14:07 Skarsnik AlexDaniel, if you put a ipv6 addr as dest it will be forced to use an interface with an ipv6 addr on it
14:07 araraloren_fake Skarsnik, Hello
14:07 timotimo can you also supply an interface name that way?
14:07 Skarsnik I am not 100% sure. but I am pretty sure that will work
14:07 timotimo or is that for outgoing addresses?
14:07 AlexDaniel Skarsnik: oh, so I can double the amount of bots by simply connecting to different hosts?
14:08 Skarsnik I don't think you can bind your socket on a an interface
14:08 rindolf joined #perl6
14:09 Skarsnik AlexDaniel, it's my guess since I can't bind a socket on a ipv4 address if I try to connect to a ipv6 address
14:09 newb2 joined #perl6
14:09 AlexDaniel I'll try it now
14:09 El_Che new linux packages: https://github.com/nxadm/rakudo-pkg/releases/tag/2017.08
14:10 Xliff I'm bored. Can someone suggest a Perl6 project to work on?
14:10 cosimo joined #perl6
14:10 Skarsnik (I have to go somewhere in 5 min, I will check more later)
14:10 timotimo Xliff: how do you like Terminal::Print?
14:10 Xliff I've worked with Terminal::Print /some/
14:11 moritz Xliff: you could implement <commit> in regexes. That would be very helpful :-)
14:11 Xliff moritz: Linky?
14:11 Xliff I think that might be a bit more than I can chew, atm
14:11 Xliff Plus, I have not found a good way to test nqp changes in rakudo.
14:12 Xliff THAT would be good to know, TBH
14:12 moritz Xliff: https://design.perl6.org/S05.html search for <commit>
14:12 timotimo bailador is getting a bunch of attention & traction, perhaps that's interesting to you?
14:12 timotimo with <commit> you can alreday test it in nqp without building rakudo
14:12 Xliff timotimo: That also is on my roadmap.
14:12 Xliff timotimo: Ah. I will look into how to do that. Any hints?
14:14 quotable6 joined #perl6
14:14 newb2 I want to import Readline.pm from drforr/perl6-readline into the perl6 RPL but
14:14 quotable6 joined #perl6
14:14 statisfiable6 joined #perl6
14:15 AlexDaniel Skarsnik: it works XDDD
14:15 Xliff Re: <commit> -- Ah... such a small description implies such.... complexity. :P
14:16 Xliff So a <commit> assertion accepts either a Code block or a string argument?
14:16 AlexDaniel anyway, time to update rakudo…
14:16 * AlexDaniel hides
14:16 Actualeyes joined #perl6
14:16 Xliff AlexDaniel: I just did that. LOL!
14:17 timotimo Xliff: i don't know :<
14:17 Xliff Are there test cases written for <commit> ?
14:17 AlexDaniel Skarsnik: (‘chat.freenode.net’, ‘185.30.166.38’).pick # :D
14:17 Xliff S05 isn't anywhere near as clear on it.
14:17 Ven`` wasnt <commit> spelt :: ?
14:17 Ven`` I think we had :, :: and :::. I remember FROGGS talking about it
14:18 AlexDaniel Skarsnik: now the limit is effectively 20 bots, so I have some room for 8 more or something
14:18 Xliff I am working on the "<commit>" assertion, as written between quotes.
14:18 newb2 I want to import Readline.pm from drforr/perl6-readline into the perl6 REPL for testing
14:19 silug joined #perl6
14:19 newb2 but "use lib '/home/cvs/.zef/tmp/perl6-readline.git/lib'; use Readline" hangs up on the 2nd use pragma
14:19 newb2 So obviously there's something here Cover looked
14:20 newb2 .. here I overlooked
14:20 timotimo you are using "zef look"?
14:20 newb2 PS it doesn't work as a perl6 script either
14:20 newb2 OK will try ..
14:20 timotimo no, don't
14:21 newb2 OK
14:21 timotimo the REPL will try to load readline itself to provide line editing if it's installed
14:21 bloatable6 joined #perl6
14:21 quotable6 joined #perl6
14:21 evalable6 joined #perl6
14:21 coverable6 joined #perl6
14:21 committable6 joined #perl6
14:21 bisectable6 joined #perl6
14:21 releasable6 joined #perl6
14:21 greppable6 joined #perl6
14:21 unicodable6 joined #perl6
14:21 benchable6 joined #perl6
14:21 statisfiable6 joined #perl6
14:21 newb2 yes but Iwant to do testing
14:21 timotimo i'm not sure if it'll work to load readline inside the repl, because you'll be using a readline inside a readline
14:22 newb2 such as adding or changing bindings or setting vars
14:22 Xliff Ven: If I am reading this correctly: "::", "::>" and ":::" have to do with alternation.
14:22 wamba joined #perl6
14:22 timotimo the REPL is quite wobbly in general. if at all possible, you should prefer a script somehow
14:22 newb2 Right - but it also doesn't work with a regular  p6 script
14:22 timotimo gotta go AFK for a bit
14:22 newb2 check
14:22 AlexDaniel Skarsnik: thanks :)
14:23 newb2 So my question is "if the module is in the directory from the use lib statement
14:23 lizmat joined #perl6
14:23 newb2 which returns nil - what does that mean?
14:23 pierre_ joined #perl6
14:23 newb2 then why does it hang up on 'use Readline'?
14:23 Kyo91 joined #perl6
14:23 newb2 INSIDE a script
14:24 timotimo you can set the RAKUDO_MODULE_DEBUG (or something?) environment variable and see what it tries at the time it starts hanging
14:25 newb2 SHOULD "use lib '/home/cvs/.zef/tmp/perl6-readline.git/lib'; use Readline" work unless I have made a typo?
14:26 newb2 From inside a script?
14:26 newb2 OK time will try ...
14:26 newb2 s/time/tim/
14:27 moritz uhm, did you install it?
14:27 newb2 "zef install'
14:27 moritz then you shouldn't need a "use lib..."
14:28 newb2 but it's placed in a ~/.zef directory NOT in the expected path
14:28 moritz that's where the sources are
14:28 andrzejku_ joined #perl6
14:28 moritz installing it should place it in other places too, potentially with file names you wouldn't expect
14:29 newb2 OK so when I do 'find / | grep Readline.pm" that's the only thing that is found
14:30 newb2 AHA so how would I find it and what difference does it make if I do 'use lib .."
14:30 moritz why would you want to find it? isn't it enough if rakudo finds it?
14:31 ugexe zef locate lib/Readline.pm
14:31 newb2 I have to import the Module in order to use it if its not in @INC or whatever in perl 6
14:31 newb2 ugexe will try ..
14:31 araraloren_fake joined #perl6
14:31 ugexe but you wouldnt use that result of that in a `use lib "..."`
14:31 wigner joined #perl6
14:32 moritz newb2: if you installed it with 'zef install Readline', there is no need to do anything manually with paths to be able to use it
14:32 moritz just "use Readline;"
14:33 newb2 : "Readline => /opt/share/perl6/site/sources/D8BAC826F02BBAA2CCDEFC8B60D90C2AF8713C3F" Thanks!
14:56 smls joined #perl6
15:01 smls m:  role R [::T] { has T $.a };  say R[Int].new.a;
15:01 camelia rakudo-moar 636a3c: OUTPUT: «No such method 'gist' for invocant of type 'T'?  in block <unit> at <tmp> line 1??»
15:01 smls ^^ Is this supposed to work?
15:04 Ven`` no, AFAIK, because T is not available at that time. There's no "instantiation" type
15:04 Ven`` s/type/time/
15:04 smls m:  role R [::T] { has T $.a = T};  say R[Int].new.a;
15:04 camelia rakudo-moar 636a3c: OUTPUT: «(Int)?»
15:05 smls Hm, like that it works...
15:05 Ven`` m:  role R [::T] { my constant T $.a = T};  say R[Int].new.a;
15:05 camelia rakudo-moar 636a3c: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Missing initializer on constant declaration?at <tmp>:1?------> 3role R [::T] { my constant T7?5 $.a = T};  say R[Int].new.a;?»
15:05 Ven`` m:  role R [::T] { my constant $.a = T};  say R[Int].new.a;
15:05 camelia rakudo-moar 636a3c: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Variable $.a used where no 'self' is available?at <tmp>:1?------> 3role R [::T] { my constant $.a7?5 = T};  say R[Int].new.a;?»
15:05 Ven`` whoops
15:06 Ven`` m:  role R [::T] { my constant $a = T};  say R[Int].new;
15:06 camelia rakudo-moar 636a3c: OUTPUT: «R[Int].new?»
15:06 Ven`` not sure then :)
15:06 araraloren_fake m: role R [::T] { has T $.a };  say R[Int].new(a => 42).a;
15:06 camelia rakudo-moar 636a3c: OUTPUT: «42?»
15:07 araujo joined #perl6
15:07 araujo joined #perl6
15:07 araraloren_fake Of course it works
15:07 Ven`` m:  role R [::T] { has T $.a };  say WHAT R[Int].new.a;
15:07 camelia rakudo-moar 636a3c: OUTPUT: «No such method 'gist' for invocant of type 'T'?  in block <unit> at <tmp> line 1??»
15:08 Ven`` right
15:08 araraloren_fake That error is not about generic role
15:08 Ven`` m:  role R [::T] { has T $.a }; # well
15:08 camelia rakudo-moar 636a3c: ( no output )
15:09 araraloren_fake m: m: role R [::T] { has T $.a; };  say R[Int].new.a.WHAT;
15:09 camelia rakudo-moar 636a3c: OUTPUT: «No such method 'gist' for invocant of type 'T'?  in block <unit> at <tmp> line 1??»
15:09 araraloren_fake Hmm, but that's strange here..
15:10 Ven`` funnily enough, removing the `.a` gives a slightly different error message:
15:10 Ven`` m: role R [::T] { has T $.a; };  say R[Int].new
15:10 camelia rakudo-moar 636a3c: OUTPUT: «No such method 'perl' for invocant of type 'T'?  in block <unit> at <tmp> line 1??»
15:10 Ven`` it's just recursively calling `.perl`, surely?
15:11 smls m:  role R [::T] { has T $.a };  say R[Int].new.a.HOW;
15:11 camelia rakudo-moar 636a3c: OUTPUT: «Perl6::Metamodel::GenericHOW.new?»
15:12 * smls will RT.
15:12 araraloren_fake m: role R [::T] { has T $.a };  say R[Int].new.HOW;
15:12 camelia rakudo-moar 636a3c: OUTPUT: «Perl6::Metamodel::ClassHOW.new?»
15:14 Ven`` smls: I'm really not sure it's not how it's supposed to be. It's just that a GenericHOW has no .gist?
15:15 Ven`` I know I had similar questions 1-2 years back, and jnthn++ explained that it was meant to be that way
15:15 smls Oh?
15:16 smls Couldn't  `has T $.a;`  be made to do the same thing as  `has T $.a = T;`  ?
15:16 araraloren_fake m: m: role R [::T] { has T $.a = T; };  say R[Int].new.a;
15:16 camelia rakudo-moar 636a3c: OUTPUT: «(Int)?»
15:17 araraloren_fake m: role R [::T] { has $.a };  say R[Int].new.HOW;
15:17 camelia rakudo-moar 636a3c: OUTPUT: «Perl6::Metamodel::ClassHOW.new?»
15:17 araraloren_fake m: role R [::T] { has $.a };  say R[Int].new.a;
15:17 camelia rakudo-moar 636a3c: OUTPUT: «(Any)?»
15:17 araraloren_fake I think it should be
15:20 kannan joined #perl6
15:22 domidumont joined #perl6
15:29 devmikey joined #perl6
15:33 Cabanossi joined #perl6
15:38 timotimo damnit! i forgot about plug adapters for going to switzerland
15:38 timotimo i had one and i knew exactly where it was ... then i moved to a different place
15:44 lizmat_ joined #perl6
15:44 ufobat joined #perl6
15:45 Skarsnik btw does IO::Socket::Async::SSL is installable? it fails test with rakud 17.08
15:48 jnthn What does it fail? I installed it fine on my laptop last night
15:49 timotimo worked for me just now, too
15:50 Skarsnik (btw the binding does provide an abi version so the dev package is needed x)
15:50 Skarsnik +does not
15:50 ilmari openssl version difference?
15:51 jnthn Skarsnik: Patches welcome :)
15:51 kannan my laptop failed due to  hardware probelm. now i am re-installing on a debian 9 VM. i get the following error. Killed
15:51 P6steve joined #perl6
15:51 kannan Makefile:492: recipe for target 'CORE.setting.moarvm' failed
15:51 kannan make[1]: *** [CORE.setting.moarvm] Error 137
15:51 kannan make[1]: Leaving directory '/usr/src/perl6/rakudo-star-2017.07/rakudo'
15:51 kannan Makefile:43: recipe for target 'rakudo/perl6-m' failed
15:51 kannan make: *** [rakudo/perl6-m] Error 2
15:52 Skarsnik libssl1.0.0: /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0
15:52 kannan ah ok, thanks
15:52 kannan i will try
15:53 cdg joined #perl6
15:53 Skarsnik ilmari, ABI version, not just version :)
15:53 ugexe install works on osx here as well
15:54 araraloren_fake good night!
15:54 kannan oop, i thought maybe i am missing the libssl-dev package, but i read wrongly. not sure why install failed.
15:54 Skarsnik jnthn, I don't patch nc lib finding stuff anymore. I think https://github.com/rakudo/rakudo/pull/716 need to be discussed/pushed. I am actually not sure how to handle libxml2 without that x)
15:54 * ilmari tries on debian stable (which has libssl 1.1.0f)
15:55 Skarsnik Original exception:
15:55 Skarsnik Could not find symbol '&SSL_ctrl'
15:55 Skarsnik in block  at /root/.zef/store/p6-io-socket-async-ssl.git/62212cdbb1940ea5d3dd4b8824aa10c83aa4e1d9/lib/IO/Socket/Async/SSL.pm6 (IO::Socket::Async::SSL) line 176
15:55 Skarsnik should have use gist maybe
15:56 ilmari Cannot locate symbol 'SSL_load_error_strings' in native library 'libssl.so'
15:56 ilmari is my error
15:56 Skarsnik yeah libssl.so is in libssl-devel
15:56 ilmari yes, I know
15:56 ilmari libssl-dev:amd64: /usr/lib/x86_64-linux-gnu/libssl.so
15:56 Skarsnik that why the abi version should be here when it's possible (not like libmysqlclient)
15:57 ugexe but OpenSSL installs? thats where the bindings are
15:57 ilmari yes
15:57 ugexe OpenSSL has one spot where it checks for some interface change by trying one method and if that fails, some other
15:58 ilmari it's only available if OPENSSL_API_COMPAT < 0x10100000L
15:58 ilmari and deprecated and a no-op in 1.1.0
15:58 Skarsnik I am not sure if the error come from the module or just my perl6 install
15:58 ugexe https://github.com/sergot/openssl/commit/7eb4609688e2d0b7bb9ffd702e7c2bd2a09ce091#diff-4232204bc64eb3f0f0a3b69760ca1c67R38
15:59 Skarsnik I already had a 2016 rakudo an /opt and I installed the last release on top of it
16:00 ilmari ugexe: but on libssl 1.1.0 SL_load_error_strings isn't a symbol, it's a conditional macro
16:00 ilmari #if OPENSSL_API_COMPAT < 0x10100000L
16:00 ilmari # define SSL_load_error_strings() \
16:00 ilmari OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS \
16:00 ilmari | OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL)
16:00 ilmari #endif
16:00 Skarsnik well we can't really call MACRO from NC ^^
16:01 nhywyll joined #perl6
16:01 Xliff I thought there was a provided fix in the comments. I don't know if that was ever excepted.
16:01 Xliff I remember because I ran into that macro problem myself.
16:02 bdmatatu joined #perl6
16:03 ilmari OPENSSL_init_ssl() is only necessary if you need non-default settings
16:03 Cabanossi joined #perl6
16:06 brimonk joined #perl6
16:08 timotimo kannan: that sounds like you don't have enough ram to build the core setting
16:08 timotimo it takes quite a bit of resources, since it's a multiple hundred thousand lines of code file
16:08 timotimo or is it just multiple tens of thousands?
16:09 timotimo sorry, it's just 60 thousand lines of code
16:09 kannan timotimo , makes sense, i spin up the cheapest thing at 4 $ / mo has 0.6 mb ram,
16:09 timotimo i hope you mean 0.6 GB ram :)
16:09 kannan i did
16:09 kannan 0.6 gb ram
16:09 Skarsnik that expensive for 0.6GB
16:10 kannan really? , its in google cloud...
16:11 kannan i will wait for my laptop to get repaired i guess.
16:11 kannan i had one day adevnture now in perl6, lol.
16:11 Skarsnik Dunno I pay a vps for like 3€/month and has 2Gbytes
16:11 kannan but successfully ran helloworld... written in atom editor.
16:12 El_Che kannan: use pkgs
16:12 mspo use swap
16:12 El_Che kannan: https://github.com/nxadm/rakudo-pkg/releases
16:12 El_Che kannan: fresh from today
16:14 kannan El_Che  : thank you, i will trythis
16:18 andrzejku_ joined #perl6
16:20 stmuk hmm don't read reddit
16:21 lizmat joined #perl6
16:22 mspo yeah ? renders a little weird for me too
16:23 mspo I mean it's cute and all
16:23 El_Che stmuk: that sounds like good advice even without context :)
16:26 * ilmari hasn't reddit
16:27 kannan El_Che  : gr8 , it worked
16:29 El_Che people complaining that the ascci variant of atom is a lot less expressive and more typing ($var ?= $value (aka atomic-assign($var,$value))) do have a point though
16:29 El_Che kannan: great to hear
16:29 ugexe no they dont
16:29 mspo yeah are there other places where "texas" is not in the same position?
16:29 ugexe how often do you think this gets used?
16:30 mspo ?  also renders wide
16:30 mcsnolte joined #perl6
16:30 El_Che raiph's answer was pretty useful, showing .A++
16:30 ugexe it people looking for a reason to complain without thinking about the use case
16:31 timotimo i just wrote a little reddit
16:31 El_Che I am just at the top, but that comment didn't struck to me as just-commplainig-because
16:32 timotimo https://www.reddit.com/r/perl6/comments/6v63wv/201734_going_weekly_changes_in_and_around_perl_6/dlyyfgs/  - this is what i wrote
16:33 kannan well, zef will not install and says memory not enough. i guess i will wait a day or so to resume
16:33 El_Che kannan: really?
16:33 domidumont joined #perl6
16:34 kannan yes, the vm is pretty costly for me, and my laptop is in service
16:35 El_Che kannan: give it a swapfile in the meanwhile?
16:35 El_Che timotimo: good point
16:35 kannan ok i can try that also.
16:35 AlexDaniel propdump: a?
16:35 itaylor57 joined #perl6
16:35 unicodable6 AlexDaniel, https://gist.github.com/57e1344fe924fa6786ace3c3efea6a23
16:36 El_Che I am not a mac user, so I haven't done much configuration on this machine, but the atom operator looks awful in vim
16:37 mspo like why isn't the texas of "÷"  divide(num,dem)?
16:37 mspo El_Che: oh osx it renders as a purple icon for me
16:37 El_Che double wide (partly on top of =) and it looks like a pink emoji
16:37 mspo El_Che: and eats the next character
16:37 El_Che agh
16:37 AlexDaniel “Strictly speaking, it makes no sense to talk of narrow and wide for neutral characters, but because for all practical purposes they behave like Na, they are treated as narrow characters (the same as Na) under the recommendations below.”
16:37 mspo yep yep
16:38 AlexDaniel “Narrow (and neutral) Unicode characters always map to halfwidth characters.”
16:38 AlexDaniel so if I'm reading this correctly, ? should be halfwidth
16:39 AlexDaniel “? also renders wide” is likely a problem with your system, or font, or editor, or something…
16:39 El_Che ok, it's not a mac thing. Same results on vim on Ubuntu
16:40 El_Che AlexDaniel: you mean fixed width fonts? What kind of heretic would other something else in the terminal?
16:40 geekosaur I suspect it's a font substitution
16:40 AlexDaniel ah, actually the last quote was from the wrong place
16:41 geekosaur your current font doesn't have that glyph so a fallback font is used to render it, and the character metrics don't match up
16:41 AlexDaniel El_Che: how can you possibly render ? as a halfwidth character?
16:41 AlexDaniel El_Che: it's fullwidth both in my terminal and emacs
16:41 El_Che AlexDaniel: that's kind of my point
16:42 El_Che not a big fan of cute-but-a-lot-readable
16:44 El_Che I takes effort to get someone to try perl6 (and most of the time they like it)
16:44 AlexDaniel actually, it doesn't really say what should be done with neutral characters
16:44 AlexDaniel so ? could be anything? I don't know…
16:44 El_Che guess what is the chance people in my surrounding will try it if they need to change their font
16:44 AlexDaniel samcv: ? ? Maybe you do?
16:45 geekosaur terminals can't generally deal with this, sadly
16:45 El_Che I am not trying to troll, I think it's an issue
16:45 El_Che geekosaur: we have zero IDE support
16:45 El_Che and some editors
16:45 geekosaur this is a big part of why you don't see much unicode in practice
16:45 El_Che so a lot of people will use a terminal
16:46 AlexDaniel El_Che: typically it's not about changing their font, but about fixing their system
16:46 AlexDaniel El_Che: if it can't render ? then chances are it can't render emoji and a bunch of other stuff
16:46 El_Che AlexDaniel: sure, but that won't happen if tehy don't see it as broken
16:47 AlexDaniel ????
16:47 El_Che I am a linux user and have years of experience of tweaking stuff, it's a second nature
16:47 El_Che how many mac and win users will do that?
16:47 mcmillhj joined #perl6
16:49 AlexDaniel .tell moritz speaking of unicode… I know that I am probably being very annoying, sorry, I don't know how to help… but want it to be fixed anyway… Any news regarding unicode in irc log? Or some info or something so that I can be more useful? :/
16:49 yoleaux AlexDaniel: I'll pass your message to moritz.
16:50 moritz AlexDaniel: Unicode in IRC logs seems fine, for the BMP
16:50 yoleaux 16:49Z <AlexDaniel> moritz: speaking of unicode… I know that I am probably being very annoying, sorry, I don't know how to help… but want it to be fixed anyway… Any news regarding unicode in irc log? Or some info or something so that I can be more useful? :/
16:50 El_Che besides the emoji discussion, great addition for having thread-safe libs
16:51 robertle joined #perl6
16:51 moritz AlexDaniel: and due to the mysql backings, getting non-BMP Unicode is probably quite a journey...
16:51 AlexDaniel moritz: that I know, but even the output from camelia is broken
16:51 moritz AlexDaniel: https://irclog.perlgeek.de/perl6/2017-08-22#i_15052699 looks fine here
16:51 AlexDaniel (because every single message has at least ? in it)
16:52 moritz huh, the N/L is broken, the «..» look fine
16:52 moritz wtf?
16:52 AlexDaniel propdump: «»?
16:52 unicodable6 AlexDaniel, https://gist.github.com/4cacf070d5962466efcb49632d12e16f
16:54 AlexDaniel m: ‘?’.ords.say
16:54 camelia rakudo-moar 636a3c: OUTPUT: «(10)?»
16:54 moritz AlexDaniel: if you want, I can give you shell access to the box so that you do your own debugging
16:54 AlexDaniel camelia: that's not what I meant
16:54 AlexDaniel moritz: I can try, but do you have any clues?
16:55 AlexDaniel moritz: like where should I look approximately
16:55 AlexDaniel https://github.com/AlexDaniel.keys ? first one
16:55 moritz AlexDaniel: probably in the logger, since it comes out as a question mark in the direct DB output
16:55 moritz AlexDaniel: ssh ilbot@tina.perlgeek.de
16:56 AlexDaniel worked
16:56 moritz AlexDaniel: 'mysql moritz5' gives you the DB prompt
16:56 moritz and the sources are nextgen-ilbot, systemd service file in /etc/systemd/system/ilbot@.service
16:57 moritz config in ~/nextgen-ilbot/config/*.conf
16:58 moritz I tend to test by creating a copy of ilbot2.pl and give it a config that joins #bottest
16:58 mr_ron joined #perl6
17:00 geekosaur sometimes my irc mapping confuses things. this discussion would probably make more sense if I weren't rendering U+0010 as ? + newline
17:04 Cabanossi joined #perl6
17:04 mr_ron m: say [so "\c[CR]\c[LF]" ~~ / \x[0D] /, so "\c[CR]\c[LF]" ~~ / \x[0A] /, so "\c[CR]" ~~ / \x[0D] /, so  "\c[LF]" ~~ / \x[0A] /]; say "\c[CR]\c[LF]".encode
17:04 camelia rakudo-moar 636a3c: OUTPUT: «[False False True True]?utf8:0x<0d 0a>?»
17:05 timotimo m: say "\n".encode("utf8", :!translate-nl); say "\n".encode("utf8", :translate-nl)
17:05 camelia rakudo-moar 636a3c: OUTPUT: «utf8:0x<0a>?utf8:0x<0a>?»
17:08 mr_ron Is there a good document someplace on p6 on dos newlines?
17:08 cdg joined #perl6
17:09 cdg_ joined #perl6
17:09 timotimo m: say "\r\n".encode("utf8", :!translate-nl); say "\r\n".encode("utf8", :translate-nl)
17:09 camelia rakudo-moar 636a3c: OUTPUT: «utf8:0x<0d 0a>?utf8:0x<0d 0a>?»
17:09 timotimo maybe only on windows
17:10 mr_ron I am running on ubuntu
17:11 kannan El_Che  : everything is good. i upgraded the VM, and re-installed rakudo-star 2017.07 from source.
17:15 El_Che kannan: great to hear
17:18 mr_ron m: say so "\c[CR]\c[LF]" ~~ / \x[0D] /; say so "\c[CR]\c[LF]" ~~ / \x[0A] / # new RT ??
17:18 camelia rakudo-moar 636a3c: OUTPUT: «False?False?»
17:26 mr-fooba_ joined #perl6
17:26 stmuk_ joined #perl6
17:34 Cabanossi joined #perl6
17:38 itaipu joined #perl6
17:38 devmikey joined #perl6
17:40 pierre_ joined #perl6
18:03 MilkmanDan joined #perl6
18:10 setty1 joined #perl6
18:11 jnthn mr_ron: CRLF is a single grapheme, regexes match at grapheme level, so no, wouldn't expect those to match
18:11 jnthn Working as designed.
18:12 Geth ¦ doc: 489cc2d6c7 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/unicode_texas.pod6
18:12 Geth ¦ doc: "Fix" display of atomic ops
18:12 Geth ¦ doc:
18:12 Geth ¦ doc: The POD parser chokes due to ops having `=` in them, which are
18:12 Geth ¦ doc: things to draw the table with.
18:12 zakharyas joined #perl6
18:12 Geth ¦ doc:
18:12 Geth ¦ doc: Fixed by wrapping them in C<>, but the parser doesn't parse those in
18:12 Geth ¦ doc: tables :(
18:12 Geth ¦ doc: review: https://github.com/perl6/doc/commit/489cc2d6c7
18:15 mr_ron jnthn: ABNF Core ( https://tools.ietf.org/html/rfc5234 ) does matching for CR, LF and CRLF.  Any way for CRLF to match single ASCII CR / LF ?
18:15 jnthn No
18:16 mr_ron OK - will just document in US-ASCII module.  Thanks.
18:20 geekosaur joined #perl6
18:24 DerAlex joined #perl6
18:29 lostinfog joined #perl6
18:30 Kyo91 joined #perl6
18:34 Cabanossi joined #perl6
18:36 konsolebox joined #perl6
18:37 cdg joined #perl6
18:41 ryu0 grapheme?
18:47 timotimo "something the user would call 'a single thing'"
18:48 moritz or a base character + combining characters also lumped into a single character
18:49 mr_ron maybe: https://stackoverflow.com/questions/27331819/whats-the-difference-between-a-character-a-code-point-a-glyph-and-a-grapheme
18:49 timotimo also series of emoji joined with the zero-width-joiner, like the family emoji
18:49 Kyo91 joined #perl6
18:51 devmikey joined #perl6
18:51 ryu0 I see.
18:51 ryu0 a grapheme is a single letter or so, as a human would see it.
18:52 ryu0 i've only really dealt with English/ASCII so the distinction is largely irrelevant to what i write...
18:53 timotimo english has words like "naive" which is supposed to have two dots on the i instead of just 1 :)
18:53 sena_kun arnsholt, re-ping.
18:53 itaipu joined #perl6
18:57 smls joined #perl6
18:59 AlexDaniel m: say ‘i’ ~ ‘?’
18:59 camelia rakudo-moar 636a3c: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Missing required term after infix?at <tmp>:1?------> 3say ‘i’ ~7?5 ‘?’?    expecting any of:?        prefix?        term?»
19:00 AlexDaniel m: say ‘i?’
19:00 camelia rakudo-moar 636a3c: OUTPUT: «ï?»
19:01 AlexDaniel timotimo: ? this does not feel right
19:01 AlexDaniel it normalizes to ï, but shouldn't it have three dots in the end? :)
19:02 timotimo got no clue :)
19:03 [Coke] AlexDaniel: why?
19:03 [Coke] oh. a funny.
19:04 AlexDaniel m: say ‘??’
19:04 camelia rakudo-moar 636a3c: OUTPUT: «???»
19:05 geekosaur that may be up to font metrics
19:05 Geth ¦ doc: e610ddb097 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/unicode_texas.pod6
19:05 Geth ¦ doc: Clarify Texas atomics are just subs
19:05 Geth ¦ doc: review: https://github.com/perl6/doc/commit/e610ddb097
19:05 AlexDaniel so dotless i (?) + diaeresis does not normalize into ï, but normal i does :)
19:06 Geth ¦ doc: 1ee4ec3a2c | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/unicode_texas.pod6
19:06 Geth ¦ doc: Fix typo in sub name
19:06 Geth ¦ doc: review: https://github.com/perl6/doc/commit/1ee4ec3a2c
19:06 domidumont joined #perl6
19:13 espadrine joined #perl6
19:16 smls m:  say foo List;  sub foo (::T --> T) { T.new: |<a b c> }
19:16 camelia rakudo-moar 636a3c: OUTPUT: «Died with X::TypeCheck::Return?  in sub foo at <tmp> line 1?  in block <unit> at <tmp> line 1??»
19:17 smls ^^ Should this succeed ?
19:19 El_Che fyi, on my home ubuntu machine, the atom is not wide and noet emoji like. On the other hand, it's not very readable, more like a badly printed asterisk
19:23 El_Che it looks like this: http://claudio.ulyssis.be/var/tmp/atom_vim_ubuntu.png
19:23 El_Che the size of it should be dependant of the font then
19:31 |oLa| joined #perl6
19:33 [Coke] I think they're subbing in the other symbol, looks like.
19:35 brrt joined #perl6
19:35 [Coke] ... or maybe I'm crazy. nevermind. :)
19:37 Geth ¦ ecosystem: 2936c63286 | (Brian Duggan)++ | META.list
19:37 Geth ¦ ecosystem: Add p6-jupyter-kernel to the ecosystem
19:37 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/2936c63286
19:40 ccntrq joined #perl6
20:06 timotimo yes!!!
20:07 timotimo finally <3
20:07 cdg joined #perl6
20:08 Skarsnik Good night people ^^
20:08 lizmat Skarsnik: good night
20:09 cdg_ joined #perl6
20:10 Kyo91 joined #perl6
20:29 khw joined #perl6
20:30 Xliff timotimo: why so excited over... what looks to be python bindings (?) for other languages?
20:31 Xliff Well... other than it makes them available to P6 (which is really cool now that I think about it)
20:31 char_var[buffer] joined #perl6
20:34 Xliff Ooor... that I miss the fact that there are notebooks using this thing.
20:34 * Xliff googles further.
20:35 lizmat m: my %h = :1a, :2b; for %h -> (:$key,:$value) { dd $key, $value }   # isn't that almost like magic ?
20:35 camelia rakudo-moar 636a3c: OUTPUT: «Str $key = "a"?Int $value = 1?Str $key = "b"?Int $value = 2?»
20:35 lizmat just something I realized when looking at a very old P6Weekly report
20:36 Sgeo joined #perl6
20:36 Xliff lizmat: Yes, that is cool, once you learn it.
20:36 Xliff However I've always found that initialization format to be confusing.
20:37 Xliff :<Value><Key>
20:37 Xliff Breaks my haid.
20:39 Xliff From: https://try.jupyter.org/: "ts = ts.cumsum()"
20:40 Xliff Which proves that with a little thought, sometimes the obvious shortening is not a good idea.
20:40 Xliff ];-)
20:42 mr-foobar joined #perl6
20:42 Xliff Probably better to use this link: https://tmp59.tmpnb.org/user/08yVC3UsZc5j/notebooks/Welcome%20to%20Python.ipynb
20:42 Xliff Which may not work after a bit.
20:47 * Xliff extemporizes: "Where notebooks == Cool google doc like pages that can run code like an online MatLab"
20:49 Cabanossi joined #perl6
20:56 timotimo Xliff: .sumcumlaude
20:57 timotimo 223002     Xliff ? :<Value><Key>
20:57 timotimo oops
21:03 Xliff timotimo: .sumcumlaude.graduate
21:04 Xliff But I don't think ".cumsum.graduate" will do what you expect. :P
21:04 Xliff Mainly because I have a gutter brain. That's my story and I'm sticking to it!!
21:05 * Xliff is still waiting for "zef install ." to complete.
21:05 cdg joined #perl6
21:06 Xliff I've since gone and: smoked cigarette, and diagnosed a wireless problem. It's "still going"
21:07 TEttinger joined #perl6
21:08 cdg joined #perl6
21:32 giraffe joined #perl6
21:48 cdg_ joined #perl6
21:49 Cabanossi joined #perl6
22:05 cpage_ joined #perl6
22:10 Peter_R joined #perl6
22:23 snarkyboojum joined #perl6
22:37 Xliff "zef install Net::ZMQ" - hangs rakudo
22:38 sena_kun Xliff, do you use arnsholt's master?
22:38 Xliff I use whatever is in META6.json
22:39 sena_kun Seems like it then, well.
22:39 Xliff Using panda now, and at least it installs the dependencies.
22:39 sena_kun Xliff, you can try my fork out: https://github.com/Altai-man/Net-ZMQ - git clone, git checkout revitalize, zef --verbose install .
22:39 Xliff Still, no response from the Net::ZMQ tests.
22:40 sena_kun it works good with zmq 4.1, but 4.2 is... Yet to work, yes.
22:40 Xliff Crud. I think I am on zmq 5
22:40 sena_kun I am trying to contact arnsholt to merge update into master.
22:40 Xliff No. 4.2.1
22:40 sena_kun But still no luck.
22:41 sena_kun Xliff, can you downgrade to 4.1 somwhow? Stable work for 4.2 is, ugh, a hard thing to talk about.
22:41 sena_kun Xliff, for what package do you need this library?
22:41 Xliff Trying to install Net::ZMQ from clone
22:42 Xliff Worked.
22:42 Xliff p6-jupyter-kernel
22:42 sena_kun ah, okay.
22:42 sena_kun the thing is.
22:43 mcmillhj joined #perl6
22:43 Xliff # Could not find Net::ZMQ::Constants at line 6
22:43 sena_kun Net::ZMQ was started on 2013 when zmq version was 2. And since then many things were changed. Some time ago I've updated it, wrote some docs, made api easier, etc. And broke API, of course.
22:43 sena_kun Xliff, ^
22:44 Xliff Oh. Shuks.
22:44 sena_kun I can help you to port to my version.
22:44 sena_kun It should be SO HARD.
22:44 sena_kun I mean.
22:44 Xliff p6-jupyter-kernel doesn't realize that Net::ZMQ is now Net::ZMQ4
22:44 sena_kun s/Net::ZMQ::Constants/Net::ZMQ4::Constants/
22:44 sena_kun Yeah.
22:44 sena_kun Only in my fork though. :)
22:45 sena_kun And some obsolete constants may be used too.
22:45 Xliff :(
22:45 Xliff This sounds bad.
22:45 sena_kun Actually, it is possible to write a compatibility layer for older zmq realizations, but I thought it is more important to support actual version in conditions of manpower lack.
22:46 sena_kun Xliff, not SO bad, I think. I can try to run this module and write a update patch tomorrow or on weekends. Will it be merged? :)
22:46 Xliff So downgrading is also not an option then?
22:46 sena_kun Downgrading what?
22:46 Xliff zmq to 4.1
22:47 ugexe sena_kun: your fork can be installed via `zef install https://github.com/Altai-man/Net-ZMQ.git`
22:47 Xliff I have not analyzed p6-jupyter-kernel yet. I don't know how the changes in your Net::ZMQ branch will react to it.
22:47 timotimo i found it a bit difficult to understand what version and what api version of zmq i'd be on
22:47 sena_kun downgrade to 4.1 will make you safe from very persistent errors I'm getting on 4.2. But constatns are constants.
22:47 timotimo from any given package version
22:47 Xliff I blame timotimo
22:47 Xliff He started it.
22:48 sena_kun timotimo, well, Net::ZMQ used a mixture of versions API as I looked on it.
22:48 sena_kun ugexe, thanks, it's fine, but I anyway want this changes be in the main repo.
22:48 Cabanossi joined #perl6
22:49 sena_kun If arnsholt is against... The fork will get a different name or something. :/
22:50 sena_kun and zef won't change installation branch of the repo for me. :P
22:51 Xliff This blows the docs for p6-jupyter-kernel and it was just added to the ecosystem, today.
22:51 Xliff Methinks they tested with an older version of Net::ZMQ
22:51 sena_kun Sure they were.
22:53 sena_kun Looking on p6-jupyter-kernel sources right now...
22:54 mcmillhj joined #perl6
22:56 sena_kun I see some obsolete pieces, but it is not really a disaster, just to easy-fix 5-10 lines of code.
22:56 ugexe you can give it a commit id then, zef install https://github.com/Altai-man/Net-ZMQ@a317944
22:56 ugexe er zef install https://github.com/Altai-man/Net-ZMQ.git@a317944
22:58 sena_kun ugexe, oh, cool. didn't know about it. Still doesn't look enterprisey enough to just write a "Net::ZMQ" for everyone in meta file dependencies and go. :)
22:58 sena_kun but I will use it next time.
22:58 ugexe no, but it lets other people test your fork with less steps
22:58 sena_kun sure.
23:00 Xliff LOL
23:00 Xliff Undeclared name:
23:00 Xliff ZMQ_FORWARDER used at line 113
23:00 Xliff So yes. This is now becoming an effort in futility.
23:01 Xliff Not to denegrate your efforts, sena_kun.
23:01 Xliff But now I would need to look in to what ZMQ_FORWARDER was, its intended purposes, and a workaround.
23:01 Xliff And I was so hoping to play with this tonight.
23:02 ugexe do you have an old version of Net::ZMQ installed?
23:04 sena_kun Xliff, forwarder is a piece of zmq_device, which was killed years ago. Now you just use zmq_proxy.
23:06 sena_kun Xliff, should I write you a guide about an update? I'd more like to: 1)merge my fork with master; 2)create an issue for p6-jupyter-kernel with an explanations about how to port it to modern means. But it can easily take more than one night. :/
23:06 Xliff Only used in one line: "try zmq_device(ZMQ_FORWARDER, $!socket, $!socket);"
23:06 Xliff I don't have the strength tonight for "more than one night"
23:06 Xliff Not even: "More than 20 minutes tbh."
23:06 * Xliff looks up zmq_proxy
23:07 sena_kun use Net::ZMQ4::Proxy;
23:07 sena_kun Then zmq_proxy(First_socket, Second_socket, Pointer[void]).
23:07 sena_kun But I didn't test it. :)
23:07 mcmillhj joined #perl6
23:08 Xliff What does the poiner do?
23:08 Xliff Looks like a callback.
23:08 Xliff k... looks like I can do a NULL equiv.
23:09 sena_kun It's the "intermediate" you can stick in if you sant to sniff all packages that are forwarded from both sides.
23:09 sena_kun See http://api.zeromq.org/4-2:zmq-proxy
23:09 sena_kun s/sant/want/
23:10 Xliff Undeclared routine:
23:10 Xliff zmq_proxy used at line 115
23:11 sena_kun did you add an import?
23:11 Xliff Nope. You didn't imply one. :P
23:11 sena_kun :)
23:12 sena_kun Try it. iirc it should work with `our` even without explicit "is export". If now I'll commit a patch quickly.
23:12 sena_kun *If not
23:12 sena_kun I probably need to go to sleep already...
23:16 Xliff Shouldn't you be able to selectively import symbols even if not marked "is export"
23:17 skids joined #perl6
23:17 sena_kun There is more than one way to do it... :) I yet to remember everything about importing/exporting.
23:17 ugexe with `our` you use the full name: My::Module::sub_name(...)
23:17 Xliff kk
23:18 sena_kun Patches are welcome, btw. :) I am sure my perl 6 skills have a long way to go.
23:20 Xliff t/02-sandbox.t .. ok
23:20 Xliff Cannot resolve caller AUTOGEN(Net::ZMQ4::Socket: Net::ZMQ4::Message, Int); none of these
23:20 Xliff signatures match:
23:20 Xliff kk... consider that. I got past the first test with changes to Jupyter::Kernel::Service.pm6
23:20 sena_kun What I dislike about this message is that it doesn't say you the actual subroutine name...
23:20 mcmillhj joined #perl6
23:21 sena_kun anyway, it seems like `send`-related trouble.
23:21 Xliff Yeah. And that is the limit of my strength ATM.
23:21 sena_kun or not. :/
23:21 Xliff Gotta crash. Or at least take a break.
23:21 sena_kun Xliff, while you're still here.
23:21 Xliff nooooooo
23:21 Xliff :)
23:22 Xliff sena_kun: ga
23:22 sena_kun I'll go to sleep now and be back in 10-12 hours or so. Then ping me with yoleaux or something, I will help you further with everything I can.
23:22 sena_kun Regarding my fork, of course. :)
23:23 Xliff You ping ME with yoleaux. If I am active, I will respond.
23:23 Xliff I don't know what I will be doing in 10-12 hours.
23:23 Xliff Heck... I don't know what I am doing in the next 20 minutes..... maybe sleep.
23:23 Xliff Mmmm......sleeep
23:23 sena_kun Ah, okay.
23:23 Xliff Have a good night!
23:25 sena_kun o/
23:25 timotimo i'll go to sleep
23:25 timotimo have a good one!
23:29 BenGoldberg joined #perl6
23:34 BenGoldberg m: say // ~~ Method;
23:34 camelia rakudo-moar 636a3c: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Null regex not allowed?at <tmp>:1?------> 3say //7?5 ~~ Method;?»
23:35 BenGoldberg m: say /./ ~~ Method;
23:35 camelia rakudo-moar 636a3c: OUTPUT: «True?»
23:35 ggherdov joined #perl6
23:38 cdg joined #perl6
23:40 mcmillhj joined #perl6
23:50 cdg joined #perl6
23:55 mcmillhj joined #perl6
23:59 Xliff .tell sena_kun You're right. It's .send related.
23:59 yoleaux Xliff: I'll pass your message to sena_kun.

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

Perl 6 | Reference Documentation | Rakudo