»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
nicq201 Anyone know of a way to get more verbose output from '--target=parse'? 00:01
timotimo what is it that you need? 00:02
nicq201 I want to see what it grabs as whitespace.
timotimo ah, hehe 00:03
so the problem is it prints out the whitespace but you can't tell because it doesn't put it in quotes or anything
you can change how it dumps match objects by changing src/QRegex/Cursor.nqp "method dump" 00:04
after recompiling and reinstalling nqp you'll also have to recompile and reinstall rakudo
nicq201 Well, more that it does not tell me anything about whitespace...
timotimo oh? 00:05
ah
of courske
whitespace is matched as <.ws>, which means "don't capture it"
nicq201 Right.
I was kind of hoping there was some hidden magic to have the kind of info shown. 00:06
timotimo there's also rxtrace, which shows a bunch of calls to _ws and ws and such, but it doesn't show from where it tries to match
--target=parse will not be able to do this at all, as it just dumps what the pase target spits out, and at that point the info is lost already 00:07
but rxtrace does see these calls, because it doesn't care about capturing or non-capturing
it's just not very informative
nicq201 Ah, I see... 00:08
Well, now that I run some more tests, looks like that may not be my problem. 00:09
nicq201 Seems I still can't get my slang to apply. :/ 00:09
timotimo dang 00:13
timotimo i think rxtrace should show when calls go to a different type than the parent caller had 00:13
timotimo so you could see exactly where a slang (or just going from main to regex or quote) happens 00:13
nicq201 Oh, that would be super useful! :D 00:14
timotimo hmm. the functionality is actually for very general call tracing 00:18
timotimo not quite sure how i'd put match-specific infrastructure there 00:21
nicq201 Well, this confirms that my slang does get applied until in another scope. 00:23
nicq201 Do I need to re-apply a slang after re-defining it? 00:35
lookatme morning 00:44
nicq201 lookatme: o/ 00:47
lookatme nicq201, \o
Any link about this week blog? 00:54
nicq201 lookatme: This is the most recent I could find: p6weekly.wordpress.com/2017/07/10/...do-is-hot/ 00:57
lookatme nicq201, Thanks, I have read it yet 00:59
lookatme A running script start by old version rakudo. After I update rakudo to last version, it throw an exception when exit 03:30
AlexDaniel lookatme: ok, that's interesting 03:44
lookatme: more information? :) 03:45
lookatme gist.github.com/araraloren/6d29da6...a7dfebcaa1 03:48
AlexDaniel, code and exception
lunch time 03:49
AlexDaniel that's very interesting :) 03:50
oh… that's also on 2017.07 03:52
lookatme: I think you should submit a ticket 03:54
geekosaur o.O
random strings more or less
lookatme AlexDaniel, Hmm, thanks 04:43
AlexDaniel lookatme: really, please do. Right now everyone is sleeping I think, so not much help 04:44
lookatme: but if this is indeed a regression, then we probably want to do something with it…
lookatme ok, I will report later 04:46
samcv how do i grep all the modules? 09:36
moritz git grep in github.com/moritz/perl6-all-modules 10:51
oops, that hasn't updated in a month :(
stmuk pl6anet.org/drop/rakudo-star-2017.07-RC0.tar.gz 11:42
Juerd My mother always told me never to run arbitrary code from the internet without checking signatures first 11:45
stmuk did she explain how to distribute keys as well? 11:47
Juerd Heh, nope :) 11:49
[Coke] . 12:14
daxim www.open-std.org/jtc1/sc22/wg21/doc...244r2.html # C++ 2020 string handling, being able to iterate over code points, will be as good as 2002 Perl 12:51
tyil[m] are there any dbgp compatible debugging systems for perl 6 yet? 13:04
daxim do you have a specific debugger you want to use in mind? (just curious) 13:13
tyil[m] p6: "pomf".reverse.say 14:28
camelia (pomf)
tyil[m] why is this not reversed :(
jnthn Because reverse is for reversing lists
tyil[m] hmm
that makes sense
jnthn Use .flip
tyil[m] thanks :> 14:29
[Coke] wonders what problem having .reverse on a Str is intended to fix. 14:30
Geth doc: b09385a173 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/IO/Handle.pod6
Document .DESTROY doesn't close standard handles
timotimo [Coke]: it's just about having all listy methods on single things 14:31
jnthn [Coke]: Not having to remember which list operations turn an item into a 1-element list and which don't, by having them all do so
Geth doc: a75410cfd6 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/IO/Handle.pod6
Document '-' path specialness in 6.c language
14:34
doc: 075503b40b | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/IO/Handle.pod6
Document .closing standard handles

will lead to inability to open them again
14:36
Voldenet What's the fastest method to store large hashes in p6? I need to store parsed logfiles that are quite large in size and the parsing process takes a while 14:56
araraloren Can I have an attachment when report a bug ? 15:04
pmurias jnthn: for example nqp::continuationcontrol($protect, ...) has a $protect flag that can be 0 or 1 while rakudo always seems to pass 0 there 15:05
araraloren OK, I report that bug : perl #131758 15:14
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=131758
araraloren And the gist: gist.github.com/araraloren/6d29da6...a7dfebcaa1 15:18
timotimo Voldenet: if you store them split by null bytes you can write them out and read them back pretty fast 15:33
if it's just a hash with string keys and string values
Geth doc: 643eb79375 | MasterDuke17++ (committed using GitHub Web editor) | doc/Language/concurrency.pod6
Remove space before a period
16:55
Voldenet timotimo: well, it's a hash that contains arrays, so I guess I'd need to use some legit serialization format, but "what's the fastest" question still remains 16:59
timotimo if it's just a hash from string to array, it'll be rather easy to do with null separators only 17:00
as long as your strings will never have null in them, of course
just put two nulls in a row after the last entry of the array, or put the number of entries in the array in front of the entries
Geth doc: 4009d72210 | MasterDuke17++ (committed using GitHub Web editor) | doc/Language/concurrency.pod6
Correct an i.e. to e.g.
17:04
zengargoyle Voldenet, timotimo: there are a plethora of control characters other than \0 that could be used in serialization. SOH, STX, ETX, EOT, FS, GS, RS, US, maybe others that shouldn't interfere with ascii/utf8 data. (i'm sure they meant something else at some point in the past for serial communications... but they work pretty well as multiple \0 types). 17:39
zengargoyle you can probably use everything below 0x20 as long as you're not going to try and send it to a terminal in raw form. 17:42
well modulo the BS/CR/NL/VT/FF type stuff which may be in data already. 17:43
geekosaur a common way to deal with embedded nul in utf8 data is to encode it non-normalized (c0 80 being the most common; also used to roundtrip them through C APIs). 17:59
(and note that if someone actually used that in data it should probably be utf8-c8 which again encodes differently, so c0 80 should still be safe for this) 18:01
zengargoyle geekosaur: can the c0 be used to embed all of the ascii chars? 18:06
geekosaur yes, it's just the non-normalized form (so technically illegal but somewhat widely used as an extension). it's the trivial case for the protocol that lets codepoints >0x7f be encoded in bytes 18:08
well, not the trivial case, that's normalized <0x80. but it's how those would get encoded if run through the protocol
zengargoyle *nods* i think i get it. 18:10
Voldenet Oh, I just assumed there was such a /trivial serialization/ lib, but I think writing one isn't going to be extremely hard 18:28
The trivial version could be far from fast though, I'm afraid
zengargoyle Voldenet: out of curiosity, how large of a hash-of-arrays is 'large'? 18:43
and how slow is 'slow'?
Voldenet 400k rows with a ~20 fields each atm, slow is 4-5 minutes 18:44
but since it's log-like, it will grow
zengargoyle plain ascii like generic log file text or anything really weird? 18:45
zengargoyle tended to use '^' as a field sep and "n" as record sep because it worked for my data and was still text-mungeable. 18:48
Voldenet plain-ish, there are some rows connected to each other
so you have to build hashes, compare 3-4 fields during import
it just occured to me I could use plain and simple CSVs with a bit of hacks :> 18:50
it'll feel a lot like reinventing the wheel 18:51
Voldenet and I'd welcome some high-performance serialization lib recommendation for p6 :) 18:54
zengargoyle about 50% of last $WORK was p5 hackery by tailing or otherwise large logfiles so i'm curious but have no answers. :)
i have a slightly buggy p5 module that can tail intermittantly via cronjobs that handles rotations and compression. on my TODO list.... 18:56
Voldenet hmm, I could just implement it in C as a part of moarvm and smuggle nqp::deserialize_native and nqp::serialize_native in :> 18:57
zengargoyle last time it broke was when hardware went *boom* and was restored from backups and it got a bit confused.
Voldenet that'd be the ultimate "hacky solution", but I'm sure I can count on C's performance :-) 18:59
jnthn Voldenet: Less hacky would be to call the C code from NativeCall :) 19:00
There's even a module that handles compiling the C code on different platforms
Voldenet oh, I see there's MVM_serialization_serialize already 19:03
geekosaur that is likely to be specific to mvm bytecode though 19:05
Voldenet Usage is okay-ish, if it fails I can just discard all the pre-parsed data 19:06
jnthn If you're going to use it, you should know that all data you serialize with it will be invalidated whenever you upgrade your Rakudo 19:10
Voldenet Yeah, it's totally fine, at the moment I just re-parse logs whenever I start the app, so trying to use pre-parsed data would be some boost anyway :P 19:11
jnthn Though note that if you just write a module that does something like constant foo = do { ...code that parses the logs... } 19:12
Then it'll use that very mechanism under the hood to serialize the result of that do block :)
Plus you'll get automatic invalidation if you upgrade your Rakudo.
Similar tricks are possible with sub EXPORT 19:13
Which could be even neater :)
evanm Hi, is itemization the same idea as hashrefs / arrayrefs in Perl 5? 19:14
evanm The docs don't really define itemization, they just start talking about it with no context (eg docs.perl6.org/language/list#Arrays) 19:16
zengargoyle i thought item was more like don't do any auto flat/slip sort of thing in places where @ or % would DWIM into multiple things. 19:20
zengargoyle m: my @x = <one two>; for @x -> $x { $x.say }; for @x.item -> $x { $x.say }; for $@x -> $x { $x.say } 19:22
camelia one
two
[one two]
[one two]
Zoffix evanm: this is a better read: docs.perl6.org/language/containers 19:23
zengargoyle m: my @x = <one two>; for @x, -> $x { $x.say }
camelia 5===SORRY!5===
Expression needs parens to avoid gobbling block
at <tmp>:1
------> 3@x = <one two>; for @x, -> $x { $x.say }7⏏5<EOL>
Missing block (apparently claimed by expression)
at <tmp>:1
------> 3@x = <one two>; for @x, -> $x …
evanm Zoffix: thanks, I'll take a look 19:24
zengargoyle m: my @x = <one two>; for (@x,) -> $x { $x.say }
camelia [one two]
evanm The first mentions of itemization in the Array docs are pretty confusing
The first mention is: "Arrays differ from lists in three major ways: Their elements may be typed, they automatically itemize their elements, and they are mutable." (no definition provided)
Zoffix evanm: I'd say it's similar to behaviour in Perl 5, yes, but has an entirely different concept under the hood. Iterables in scalar containers will get treated as single items, rather than examined for the items they contain
evanm: yeah, itemization is a poorly documented concept. Probably not a good term either (that I may be guilty of popularizing). 19:25
geekosaur it's addressing the same issue, but doing so very differently
evanm The second mention is: "First, be aware that because itemization in Arrays is assumed, it essentially means that $(…)s are being put around everything that you assign to an array, if you do not put them there yourself." (still not sure what they're talking about)
geekosaur the issue being "when are you talking about the container itself, vs. when are you talking about its contents?"
Zoffix evanm: would you write down your comments as an Issue in the docs repo, so the docs could be improved? github.com/perl6/doc/issues/new 19:26
evanm geekosaur: thanks.
When $(...) is mentioned, does this mean it's the equivalent of putting $(...) around only arrays/lists/hashes, or around everything (Ints, scalars, whatever)? 19:27
Zoffix Arrays give containers to their items, which is how they end up being mutable. Lists don't. So when you put another list in a list, it's still just a list you can iterate over, but if you shove one into an array, it'll get a scalar container for itself
evanm: yeah, everything.
m: my @a = (1, 2, 3), 42; .say for @a.head 19:28
camelia (1 2 3)
Zoffix m: my @a := (1, 2, 3), 42; .say for @a.head
camelia 1
2
3
Zoffix ^ first one is an array that got the inner list in a container. Second one's a list that didn't give the list a container and you can see in second case, the items of the inner list got individually looped ovcer
m: my @a := $(1, 2, 3), 42; .say for @a.head 19:29
...
camelia Resource temporarily unavailable
Zoffix Well, the output is `«(1 2 3)␤»` and this is 'cause we put that `$` up in there, giving the list a scalar container 19:30
So it ended up being iterated as a single item, instead of the stuff inside of it being considered individually
m: my @a := $(1, 2, 3), 42; .say for @a.head
camelia (1 2 3)
Zoffix m: my @a := $(1, 2, 3), 42; .say for @(@a.head)
camelia 1
2
3
Zoffix ^ and here we took it outta that scalar container with the @() thing
Zoffix And the difference between Perl 5 is you don't *need* to "itemize" Iterables to prevent them from being flattened when storing them in other things. 19:32
m: say (1, (2, (3, %(:52a, :70b))))
camelia (1 (2 (3 {a => 52, b => 70})))
Zoffix m: say (1, (2, (3, %(:52a, :70b)))).flat # you can call .flat to flatten 'em
camelia (1 2 3 a => 52 b => 70)
Zoffix m: say (1, (2, $(3, %(:52a, :70b)))).flat # but "itemized" things won't get flattened, because they're being considered as an item in themselves instead of gutted for their contents 19:33
camelia (1 2 (3 {a => 52, b => 70}))
Zoffix </soliloquy>
:)
moritz . 19:51
yoleaux 17:09Z <Zoffix> moritz: so I launched my own ilbot on v5.24.0 and there ain't no encoding issues. Is it possible the database was exported/imported incorrectly when the box was upgraded? I'm sick of broken logs and I wanna fix the issue. How?
moritz zoffix: I think it might be related to the upgrade from mysql do mariadb that was part of the Debian upgrade 19:52
zoffix: if you want to help debug, /msg an ssh pubkey, and I can give you access
moritz ilbot has a wild, historically grown way of storing its data: as UTF-8 in latin 1 columns, iirc 19:54
lizmat decommute& 19:59
lizmat PSA: Perl 6 Weekly will be a little later today 20:02
evanm yep still confused about containers 20:04
evanm are an array's containers immutable in a sense? Like the array can grow or shrink, and the contained things can change, but should I think of all arrays just as being arrays of containers? 20:05
Voldenet jnthn: the const trick in the module is quite neat, but then I suppose the module wouldn't allow passing arbitrary filenames to it and make things more magical
moritz evanm: there's nothing about arrays that's immutable; you can even replace the container by binding to an array element 20:06
Voldenet ...so I'll just stick to plain and /simple/ serialization (I guess it would require some additional magic describing expected moarvm version) :)
evanm moritz: right. okay. 20:07
moritz m: say 42 20:10
camelia 42
Zoffix moritz: it's the last one in the list: github.com/zoffixznet.keys 20:11
moritz Zoffix: try ssh [email@hidden.address] 20:15
evanm So internally, even parameterized P6 arrays never look like C arrays, right? the array holds containers, and the containers point to objects which could be all over memory? 20:18
Zoffix evanm: in my imperfect understanding: you can thing of there just being scalar containers. A pudding cup is a scallar container and it contains one pudding (the stuff inside the container). Arrays are like a bunch of sequentially linked scalar containers: you can ask them for a third pudding cup and get it. Hashes are like labeled scalar containers: you can ask them for a lemon pudding cup and get it. However,
nothing's stopping you from putting a bunch of jelly-beans inside of your pudding cup. It's just when you ask for them, you'd get a single bunch (whatever fits into a pudding cup). If you want to consider jelly beans individually, you gotta take them out of the cup (using @() or %() or other means). 20:19
evanm: I'd think it's implementation detail.
moritz evanm: native arrays are an exception
Zoffix moritz: thanks. Will try when I gey home
moritz: are they guranteed in Perl 6 to be contiguous in memory? 20:20
moritz Zoffix: I don't know 20:20
evanm Zoffix: to extend the analogy, with a List you have to provide your own cups? 20:24
re: contiguity, memory layout is an important detail for heavy number-crunching applications 20:25
Zoffix evanm: you could if you wanted to. That's one way to make stuff mutable and how an Array is made outta a List 20:27
raiph evanm: take care to consider a key distinction related to data structures bound to `@` symbols and thus also its elements
timotimo native shaped arrays are guaranteed to be contiguous storage
raiph evanm: native arrays vs non-native arrays 20:27
Zoffix and if you don't provide your own cups you just get stuff as is :) ummm in plastic bags. So you can still see your bundles of jelly beans as bundles, but you can't modify the bundles ') 20:28
evanm native array = CArray ?
moritz I meant more like my int @a 20:28
Zoffix timotimo: in Perl 6 spec? Or just Rakudo's implementation detail? 20:29
raiph: what's the distinction?
timotimo i think the whole point of native shaped arrays is to have that? 20:30
moritz the point is efficient access 20:31
timotimo hmm 20:31
raiph evanm: aiui, yes 20:32
timotimo no, raiph
CArray is different still
raiph ok
i wondered
timotimo native array is "my int @foo"
CArray is my @foo := CArray.new(1, 2, 3);
evanm Zoffix: Ok thanks. I'll play around in the shell and make some diagrams, I'm finding it hard to "see it" with just p6 syntax
raiph evanm: I agree that both the word "item" and its doc is weak 20:33
evanm: or rather, perhaps you are just wondering but I don't like the way we use the word "itemize" in the opposite sense from the conventional one
geekosaur unfortunately 'containerize' is already in use for a lower level concept relevant to moarvm 20:34
raiph i propose s/item/individual/
geekosaur we could piss everyone off and call it 'idem' :p
raiph i know it's longer, but it preserves something i really, really like which is that it starts with I 20:35
Zoffix maybe something that means "one thing"... like... scalar :) 20:36
raiph because i like the mnemonic that a $ symbolizes an Individual in Scalar (or Item in Single Container)
geekosaur raiph, I think that has the same problem, it makes me think it means the individual contents instead of the thing itself
raiph and then an Array individualizes the individuals that it stores
raiph speaking as an individual, i most protest of this talk of me as my individual contents rather than me as myself (thing in my itself, if you must) :) 20:38
Zoffix evanm: FWIW, I struggled to understand these, until I stopped trying to link the sigils into the equation. The $, @, % and & don't matter much amd are more about the defaults rather than dictating what type of "container" you get. So once you realize that, then an Array in $ sigil or a list in % sigil don't look weird 20:38
timotimo but you don't get to put a list into a % sigil? 20:44
Zoffix You can if you want to 20:45
Zoffix which I'm totally forgetting how to do 20:48
you need to add is Positional or of Positional or something or other. Basically retype it from Associati e
you can't do that on & sigil tho; it says it's NYI 20:49
evanm What does this mean? "use Arrays as non-itemized lists of itemized lists, if appropriate" 20:50
evanm docs.perl6.org/language/list#Itemization bullet point 4 20:51
Zoffix I remember commenting examples on reddit... maybe I'm misremembering :(
geekosaur [[a,b,c],[d,e,f]] instead of it turning into [a,b,c,d,e,f] 20:52
erm, parens not p[
not []
if you @a = @b, @c then you get @b and @c flattened, if you @a = $@b, $@c then they remain (sub)lists 20:53
Zoffix cringes at that gather/take flattening approach :( 20:54
m: my %list is Array = (1, 2, 3); dd %list 20:56
camelia [1, 2, 3]
AlexDaniel heh
Zoffix I guess what I was thinling of was that ^
evanm geekosaur: so the rule means the Array itself should be itemized, when it appears inside of a list? 21:01
geekosaur evanm, the rule means you can put a list inside another list _as a list_, not as its contents 21:04
which is what would normally happen
raiph evanm: A courtesy to consider, not a rule, but my, that looks like a lot to consider; and then reading it... 21:05
evanm geekosaur: that sentence still isn't parsing for me. "use Arrays as non-itemized lists of itemized lists". 21:07
My understanding was that arrays are always itemized
geekosaur but you can use them in contexts that want lists
so they turn into lists. but that means they no longer get automatic itemization 21:08
evanm So if I return an Array where a List is expected, the entries lose their containers? 21:10
geekosaur let's try this again.
evanm The "courtesies" are talking about return values, so I'm not sure how to map your assignment examples onto what the docs are talking about
evanm I guess I'd like to see a conforming function and a non-conforming function 21:11
geekosaur the default when you return more than one thing from a function is a list. this will not be automatically itemized 21:12
return @a, @b -- these get flattened even though they are Arrays
return [@a, @b] -- this is an Array and the contents retain their Array-ness 21:13
in perl 5, your only option is the first one and you would need to use arrayrefs to get the second
return $@a, $@b -- this explicitly itemizes the arrays so they don't get flattened into the result list. but this can be confusing 21:14
geekosaur so the second one is preferred because you are being explicit about what is going on 21:14
geekosaur (arrayrefs are actually more like the third option than the second; the second is not something perl 5 does) 21:15
raiph evanm: note that "itemizes" in P6/geekosaur's usage does not mean what it means at dictionary.com; it means something akin to the opposite of dictionary.com's meaning
raiph itemifies would be perhaps better 21:16
geekosaur maybe idem's not such a bad idea after all
Voldenet Hmm, how to check if the object is null? 21:17
evanm geekosaur: Ok, I understand your examples. I am still confused by the sentence. Your second example looks to me like more like "itemized list of itemized lists" rather than "non-itemized list of itemized lists" 21:19
Voldenet m: use nqp; my $null = nqp::null(); say nqp::isnull($null) 21:20
camelia 0
timotimo Voldenet: you need to decont, i believe
Voldenet Ah, right.
geekosaur evanm, I think the doc was written for perl 5 users, for whom the outer list is the implicit one containing the result of the function
that is the non-'item'ized list
Zoffix moritz: what db is the log data in? 21:21
Zoffix doesn't wanna start dumping random dbs out :P
ah, got it from config file. nevermind :) 21:22
geekosaur (I get that interpretation from the context of that list of considerations.)
Zoffix Voldenet: or just bind instead of assign: m: use nqp; my $null := nqp::null(); say nqp::isnull($null) 21:23
m: my $null := nqp::null(); say nqp::isnull($null)
camelia 5===SORRY!5=== Error while compiling <tmp>
Could not find nqp::null, did you forget 'use nqp;' ?
at <tmp>:1
------> 3my $null := nqp::null()7⏏5; say nqp::isnull($null)
21:24
Zoffix m: use nqp; my $null := nqp::null(); say nqp::isnull($null)
camelia 1
nadim Hi, I get this message "our printf-style directives specify 3 arguments, but 5 arguments were supplied" and that's it, no file, no line, nothing 21:27
Zoffix m: printf "%s"
camelia Your printf-style directives specify 1 argument, but no argument was supplied
Zoffix oops
nadim: would you report it as a bug, please?
huggable: rakudobug
huggable Zoffix, Report bugs by emailing to [email@hidden.address]
nadim sure 21:28
Zoffix nadim: add --ll-exception flag and it should give more info 21:28
nadim ok
Zoffix hm, don't seem to point at it tho :(
even with ll-exception
nadim is a printf style directive always a printf? at least that will narrow it down 21:30
nadim ah, I just has a single sprintf in the code, lucky me 21:32
Zoffix moritz: how can I restart the webservice to check if a fix worked? 21:33
skf Hi all! Have made my first ever module and uploaded it to github: github.com/svekenfur/Swedish-TextDates_sv.git The module takes a date (yyyy-mm-dd) and transforms it to swedish text, for example '2017 july fouth' expept in swedish :-) Does a module like that have a place in the ecosystem? 21:37
*fourth
Zoffix skf: sure, why not 21:39
raiph evanm et al: I apologize. "itemize" has *both* meanings at dictionary.com 21:43
1. Treat as a list of items.
2. Treat a list of items as an item in its own right.
When "itemize" is written in P6 doc the second meaning is intended, not the first.
skf Thanks Zoffix! 21:44
raiph Maybe 1 should be shortened to 1. List (verb) 21:47
AlexDaniel is there anything shorter than CATCH { default { my-code-here } } ? 21:48
ugexe try ...; my-code-here if $!; 21:50
or try { ... } || my-code-here 21:51
Zoffix .tell moritz so I talked to people in #maria and one of the suggestions was to change ilbot/blob/master/lib/Ilbot/Backend/SQL.pm:40 to $_[0]->do( 'set names utf8' ); instead of the mysql-specific thing there. Is that code used to store data from IRC too tho? I popped open the db and done `select * from ilbot_lines where id = 14879831 limit 50;` and there's garbage up in there even if I do set names utf8 in the
yoleaux Zoffix: I'll pass your message to moritz.
Zoffix client. So perhaps we need the set names utf8 thing some other place too?
.tell moritz client. So perhaps we need the set names utf8 thing some other place too? 21:52
yoleaux Zoffix: I'll pass your message to moritz.
Zoffix note that try does `use fatal` 21:53
m: $ = +"a"; CATCH { default { say "caught" } }
camelia ( no output )
Zoffix m: try $ = +"a"; say "caught" if $!
camelia caught
AlexDaniel thanks! 21:55
m: sub foo($x) { CATCH { return 42 }; die ‘foo’ }; say foo(60) # this also seems to accomplish something similar, depending on what is actually needed 21:59
camelia 42
Geth_ ecosystem: svekenfur++ created pull request #350:
Add Swedish-Textdates to ecosystem
22:01
Zoffix m: sub foo($x) { CATCH { return 42 }; die ‘foo’ }; say foo 1, 2, 3, 4, 5, <meeeaaaoooowwwws> 22:02
camelia Too many positionals passed; expected 1 argument but got 6
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
Zoffix dang it
Right, I was thinking of LEAVE phaser, not CATCH :) 22:03
nicq20 m: role A { token m { \N* } }; A.^methods(:all).say 22:20
camelia (token m { \N* })
nicq20 Why does that happen?
Shouldn't it spit out just 'm'? 22:21
timotimo no, you're printing out the method 22:23
if you want just m, you need to A.^methods(:all)>>.name.say 22:24
nicq20 So why does it work that way for methods?
timotimo m: my $themethod = Str.^methods(:all)[0]; say $themethod.gist; say $themethod.perl; say $themethod.Str 22:26
camelia BUILD
submethod BUILD (Str $: :$value = "", *%_ --> Nil) { #`(Submethod|41669832) ... }
Submethod object coerced to string (please use .gist or .perl to do that)
in block <unit> at <tmp> line 1
BUILD
timotimo m: role A { token m { \N* } }; my $thetoken = A.^methods(:all)[0]; say $thetoken.Str; say $thetoken.gist; say $thetoken.perl 22:27
camelia Regex object coerced to string (please use .gist or .perl to do that)
in block <unit> at <tmp> line 1
m
token m { \N* }
token m { \N* }
timotimo seems like tokens, as opposed to other methods, will .gist to their name + contents
nicq20 Is it supposed to? 22:28
timotimo m: say Str.^methods
camelia (BUILD Int Num chomp starts-with ends-with substr-eq contains indices index rindex pred succ comb match subst-mutate subst ords lines parse-base parse-names samecase samemark samespace word-by-word trim-leading trim-trailing trim words encode NFC NFD NFK…
timotimo well, it's not consistent with other methods 22:29
Zoffix m: m: role A { token m { \N* } }; my $thetoken = A.^methods(:all)[0]; $thetoken.^mro.say
camelia ((Regex) (Method) (Routine) (Block) (Code) (Any) (Mu))
Zoffix ^ it's a Regex, so it's consistent with regexes
m: /foo .+ bar/.gist.say
camelia /foo .+ bar/
Zoffix m: m/foo .+ bar/.gist.say
camelia Use of uninitialized value of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.
in block <unit> at <tmp> line 1
Nil
Zoffix right 22:30
Zoffix can't ever remember which of the two is which
m: rx/foo .+ bar/.gist.say
camelia rx/foo .+ bar/
Zoffix That
:)
nicq20 Ah, ok. That makes sense. 22:31
skf exit 22:50
Geth_ ecosystem: c42ec75a0d | svekenfur++ (committed by Zoffix Znet) | META.list
Add Swedish-Textdates to ecosystem (#350)

See github.com/svekenfur/Swedish-TextDates_sv.git
22:56
lizmat and another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2017/07/17/...-released/ 23:28
geekosaur zoffix 2.0? :p 23:29
timotimo ZoffexDaniel 23:29
Zoffix lizmat++ # good weekly 23:34
Looks like there's quite some traffic on perl6-users mailing list
parv could "P" & "6" embedded in "Camelia" logo not look like hand painted? 23:40
lizmat
.oO( pretty good it looks hand painted while it is an SVG :-)
23:42
parv "P" & "6" won't look out of place if rest of the geometrical pieces were not so perfect 23:45
geekosaur but someone got whiny when the rest of it wasn't perfect 23:46
"it needs to look professional"
or some such
parv then why not react out & touch <P 6>?/ 23:47
Zoffix I guess we're back on track with the language, if people have nothing to complain about but the logo :)
parv i have given up on the name change, after airing my comments. thus achievingW^making peace. 23:49
parv s/W^/^W/ # X-] 23:49
Zoffix parv: because you're dealing with a community of at least a 1000 people, all of whom have their Internet Designer degree, all of which have 1000s of suggests for how the logo should look like.
parv of course that is to be expected when asked for opinion. 23:50
Zoffix bikeshed.com/
parv as for the language, I am not satisfied: () is a list, (x) is not, and (,) is error; 'xy'.split( '' ) gives unreasonably empty strings at either end in normal case (in <x y>.join("3") i do not expect "3x3y3" back). (feel free to tell me to shut up) 23:55
timotimo why would you .split('')? .comb() is for you 23:56
TEttinger another good example of odd names
is it like a hair comb?
timotimo yeah
TEttinger is it short for combine?
timotimo no
it has nothing to do with Half-Life
TEttinger combinator
timotimo parv: your example is wrong, though 23:57
parv: you don't get <x y> from "3x3y3".split("3"), you get ("", "x", "y", "")
TEttinger he said join
timotimo yes, but the complaint is about "foo".split("") giving empty strings at beginning and end 23:58
TEttinger I'm a bit confused
timotimo the equivalent example with 3 is "3f3o3o3".split("3"), not "f3o3o".split("3")
AlexDaniel parv: well, you can try changing P and 6, I'd love to see how it looks 23:59
ugexe in perl5 you use LIMIT 0 for no empty stringys and LIMIT -1 to include them