»ö« 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.
00:00 nicq201 joined
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
00:09 kurahaupo_ joined
nicq201 Seems I still can't get my slang to apply. :/ 00:09
timotimo dang 00:13
00:13 nadim left
timotimo i think rxtrace should show when calls go to a different type than the parent caller had 00:13
00:13 nadim joined
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
00:18 rindolf left
timotimo hmm. the functionality is actually for very general call tracing 00:18
00:21 kurahaupo_ left
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
00:23 BenGoldberg joined 00:31 Cabanossi left 00:32 Cabanossi joined
nicq201 Do I need to re-apply a slang after re-defining it? 00:35
00:44 lookatme joined
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
00:57 nadim left
lookatme nicq201, Thanks, I have read it yet 00:59
01:03 rmusial joined 01:06 raiph left 01:08 p6nomad left 01:10 eliasr left 01:40 samb1 left 01:47 mr-fooba_ left 01:50 statisfiable6 left 01:52 samb1 joined 02:01 Cabanossi left 02:02 noganex joined, Cabanossi joined 02:03 faraco joined, epony left 02:04 noganex_ left 02:08 mr-foobar joined 02:09 entonian joined 02:11 wamba joined 02:16 faraco left 02:19 entonian left 02:25 epony joined 02:35 entonian joined 02:58 pilne left 03:00 noganex_ joined 03:02 noganex left 03:06 nicq201 left 03:12 gdonald left 03:15 Cabanossi left 03:17 Cabanossi joined 03:24 gdonald joined 03:28 skids left
lookatme A running script start by old version rakudo. After I update rakudo to last version, it throw an exception when exit 03:30
03:44 Cabanossi left
AlexDaniel lookatme: ok, that's interesting 03:44
lookatme: more information? :) 03:45
03:46 Cabanossi joined
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
04:03 El_Che left 04:05 El_Che joined 04:08 wamba left 04:13 lizmat left 04:16 lizmat joined 04:19 entonian left 04:22 entonian joined 04:26 mr-foobar left 04:29 mr-foobar joined 04:34 entonian left 04:36 entonian joined 04:39 xtreak joined 04:42 mr-foobar left
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
04:48 mr-foobar joined, Khisanth left, faraco joined 04:59 Cabanossi left 05:01 Cabanossi joined 05:06 Khisanth joined 05:12 nadim joined 05:14 entonian left 05:25 lowbro joined, lowbro left, lowbro joined 05:28 parv joined 05:30 Cabanossi left 05:31 khw left, Cabanossi joined 05:37 faraco left 05:42 mr-foobar left, mr-foobar joined 05:43 entonian joined 05:47 entonian left 05:52 xtreak left 05:53 xtreak joined, statisfiable6 joined, ChanServ sets mode: +v statisfiable6 05:57 AlexDaniel left, xtreak left 06:08 espadrine joined 06:10 BenGoldberg left 06:12 mr-fooba_ joined 06:13 mr-foobar left 06:28 nadim left 06:30 xtreak joined 06:39 domidumont joined 06:43 domidumont left 06:44 domidumont joined, lizmat left 06:46 lizmat joined 06:47 andrzejku joined 06:54 nadim joined 06:55 casdr left 06:57 domidumont left 06:58 domidumont joined 07:10 parv left 07:19 Manifest0 left 07:26 Manifest0 joined 07:29 zakharyas joined, abraxxa joined 07:39 rindolf joined 07:44 gdonald left, lizmat left 07:46 andrzejku left, lizmat joined 07:49 cosimo left 07:52 wamba joined 07:54 darutoko joined 07:55 rindolf left 07:56 cosimo joined 07:57 gdonald joined 08:02 rindolf joined 08:03 wamba left 08:15 dakkar joined 08:23 dogbert17 left 08:27 wamba joined 08:29 Cabanossi left 08:31 Cabanossi joined 08:42 xtreak left, xtreak joined 08:43 mingdao left 08:44 mingdao joined 08:46 xtreak left, xtreak joined 08:53 espadrine left 08:55 abraxxa left 08:57 zakharyas left, zakharyas joined 08:59 robertle joined 09:00 lizmat left 09:02 lizmat joined 09:06 abraxxa joined 09:10 rindolf left 09:13 andrzejku joined 09:34 xtreak left
samcv how do i grep all the modules? 09:36
09:41 lookatme left 09:55 xtreak joined 09:58 Cabanossi left 10:01 Cabanossi joined 10:05 ufobat joined 10:12 lowbro left, TEttinger left 10:30 Cabanossi left 10:31 Cabanossi joined 10:33 seatek left 10:40 xtreak left 10:43 xtreak joined
moritz git grep in github.com/moritz/perl6-all-modules 10:51
oops, that hasn't updated in a month :(
11:00 lizmat left 11:02 lizmat joined 11:03 zakharyas left 11:10 rindolf joined 11:16 lizmat left 11:19 lizmat joined 11:42 lumimies joined
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
11:46 Morfent left, Morfent joined
stmuk did she explain how to distribute keys as well? 11:47
Juerd Heh, nope :) 11:49
11:59 xtreak_ joined 12:00 xtreak left 12:02 ocn joined 12:03 ocn left 12:05 xtreak_ left 12:08 xtreak joined 12:09 perlpilot left 12:13 xtreak left
[Coke] . 12:14
12:20 Morfent left 12:29 Cabanossi left 12:31 perlpilot joined, Cabanossi joined 12:42 zakharyas joined 12:48 lizmat left
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
12:57 domidumont left 12:58 domidumont joined 13:01 devmikey joined 13:02 mcmillhj joined
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
13:16 nowan left 13:17 nowan joined 13:42 wamba left 13:46 skids joined 13:58 Cabanossi left 14:01 Cabanossi joined 14:16 cdg joined 14:19 cdg_ joined 14:22 dogbert17 joined, cdg left
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
14:45 Cabanossi left 14:46 Cabanossi joined 14:50 evanm joined, khw joined 14:53 domidumont1 joined, AlexDaniel joined 14:54 domidumont left
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
15:01 araraloren joined 15:03 pmurias joined
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
15:08 nadim left 15:09 greppable6 left 15:13 alimon joined
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
15:25 zakharyas left
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
15:43 Vitaliy_ left 15:47 domidumont1 left 15:48 domidumont joined 15:55 abraxxa left 15:56 wamba joined 16:01 zakharyas joined 16:04 robertle left 16:05 mcmillhj left 16:08 araraloren left 16:11 nadim joined 16:12 mcmillhj joined, devmikey left 16:13 domidumont left 16:17 mcmillhj left 16:32 mcmillhj joined 16:34 evanm left 16:37 mcmillhj left 16:40 xui_nya[m] left, ilmari[m] left 16:41 domidumont joined 16:42 ribasushi left 16:43 shmibs left 16:44 leont_ left, mspo joined 16:45 shmibs joined 16:47 ribasushi joined, mcmillhj joined 16:48 dakkar left, robertle joined
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
17:01 |oLa| joined 17:03 zakharyas left, zakharyas joined
Geth doc: 4009d72210 | MasterDuke17++ (committed using GitHub Web editor) | doc/Language/concurrency.pod6
Correct an i.e. to e.g.
17:04
17:09 kurahaupo joined 17:10 tadzik left, mienaikage left, Matthew[m] left 17:11 dp[m] left, CIAvash[m] left, mack[m] left, unclechu left, tyil[m] left 17:15 nadim left 17:21 nhywyll joined 17:22 mienaikage joined, leont_ joined, sjoshi joined 17:24 Manifest0 left 17:29 Matthew[m] joined, ilmari[m] joined, tyil[m] joined, unclechu joined, mack[m] joined, tadzik joined 17:30 CIAvash[m] joined, dp[m] joined, xui_nya[m] joined 17:31 Manifest0 joined 17:32 lizmat joined
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
17:41 amalia__ joined
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
18:19 Dunearhp left 18:24 Dunearhp joined
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
18:32 zakharyas left
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
18:46 Cabanossi left, Cabanossi joined
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
18:52 MasterDuke left 18:53 sjoshi left, espadrine joined 18:54 sjoshi joined
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
18:56 sjoshi left
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
19:00 setty1 left 19:02 leont_ left
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
19:09 evanm joined
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
19:15 cdg_ left
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
19:19 TEttinger joined
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
19:20 darutoko left
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]
19:22 Zoffix joined
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
19:31 setty1 joined, domidumont left
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>
:)
19:33 Zoffix left 19:35 andrzejk_ joined 19:39 |oLa| left 19:44 |oLa| joined 19:46 mr-fooba_ left 19:47 cdg joined, bpmedley left, mr-foobar joined
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
19:52 cdg_ joined
moritz ilbot has a wild, historically grown way of storing its data: as UTF-8 in latin 1 columns, iirc 19:54
19:55 andrzejk_ left 19:56 cdg left
lizmat decommute& 19:59
19:59 lizmat left 20:02 lizmat joined
lizmat PSA: Perl 6 Weekly will be a little later today 20:02
20:02 lizmat left
evanm yep still confused about containers 20:04
20:04 ptolemarch left 20:05 seatek joined
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
20:09 Zoffix joined
moritz m: say 42 20:10
camelia 42
Zoffix moritz: it's the last one in the list: github.com/zoffixznet.keys 20:11
20:14 mr-foobar left
moritz Zoffix: try ssh [email@hidden.address] 20:15
20:17 S007 left
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
20:20 pilne joined
moritz Zoffix: I don't know 20:20
20:22 S007 joined, nadim joined, raiph joined, mr-foobar joined
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
20:27 setty1 left
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 ?
20:28 setty1 joined, Cabanossi left
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?
20:29 nicq20 left 20:30 mspo left
timotimo i think the whole point of native shaped arrays is to have that? 20:30
20:31 amalia__ left, bpmedley joined
moritz the point is efficient access 20:31
20:31 Cabanossi joined, setty1 left
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
20:33 setty1 joined
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
20:37 cdg joined
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
20:38 futura joined
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
20:38 cdg left 20:39 cdg joined, S007 left, cdg left, futura left 20:40 cdg__ joined 20:41 cdg_ left
timotimo but you don't get to put a list into a % sigil? 20:44
20:44 Triplefox left
Zoffix You can if you want to 20:45
20:47 wamba left, futura joined
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
20:50 S007 joined
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 ^
20:58 Zoffix left
evanm geekosaur: so the rule means the Array itself should be itemized, when it appears inside of a list? 21:01
21:01 mcmillhj left
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
21:04 skf joined
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
21:09 shlomif joined 21:10 skids left
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
21:11 rindolf left
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
21:14 shlomif is now known as rindolf
geekosaur so the second one is preferred because you are being explicit about what is going on 21:14
21:15 mr-foobar left
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
21:16 mr-foobar joined
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
21:18 silug joined
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
21:21 Zoffix joined
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
21:28 gdonald left
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
21:31 |oLa| left
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
21:40 gdonald joined 21:42 |oLa| joined, leont_ joined
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
21:45 mr-foobar left, nhywyll left, ufobat left
raiph Maybe 1 should be shortened to 1. List (verb) 21:47
21:48 Sgeo left
AlexDaniel is there anything shorter than CATCH { default { my-code-here } } ? 21:48
21:48 mr-foobar joined
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
21:59 Sgeo joined, Popov_ joined 22:00 Cabanossi left 22:01 Cabanossi joined
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
22:03 lizmat joined 22:07 evanm left, MasterDuke joined 22:08 pmurias left 22:09 leont_ left 22:12 cdg__ left 22:13 xerx left 22:14 espadrine left 22:15 nicq20 joined 22:16 Popov_ left
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
22:23 rindolf left
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?
22:25 xerx joined
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
22:32 robertle left 22:36 nadim left 22:46 mr-foobar left 22:48 |oLa| left 22:49 mr-foobar joined, nicq20 left
skf exit 22:50
22:50 skf left 22:53 cdg joined
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
22:57 parv joined 22:59 Cabanossi left 23:00 rmusial left 23:01 Cabanossi joined 23:04 cdg_ joined 23:05 skids joined 23:08 cdg left 23:13 Sgeo left 23:16 mr-foobar left 23:17 mr-foobar joined 23:26 kurahaupo_ joined
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
23:29 kurahaupo left
timotimo ZoffexDaniel 23:29
Zoffix lizmat++ # good weekly 23:34
Looks like there's quite some traffic on perl6-users mailing list
23:35 BenGoldberg joined, kurahaupo_ left 23:36 kurahaupo joined, Ptolemarch joined 23:37 kurahaupo left, kurahaupo joined 23:38 cdg_ left, kurahaupo left 23:39 kurahaupo joined
parv could "P" & "6" embedded in "Camelia" logo not look like hand painted? 23:40
23:41 kurahaupo_ joined, kurahaupo_ left 23:42 kurahaupo_ joined
lizmat
.oO( pretty good it looks hand painted while it is an SVG :-)
23:42
23:42 kurahaupo__ joined 23:44 kurahaupo left
parv "P" & "6" won't look out of place if rest of the geometrical pieces were not so perfect 23:45
23:46 mr-foobar left
geekosaur but someone got whiny when the rest of it wasn't perfect 23:46
"it needs to look professional"
or some such
23:46 kurahaupo_ left
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
23:49 mr-foobar joined
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")
23:59 kurahaupo joined
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