»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋
Set by Zoffix on 25 July 2018.
00:00 reportable6 left 00:03 reportable6 joined, ChanServ sets mode: +v reportable6
vrurg timotimo: I don't remember exactly, but there was word "game". :) 00:03
timotimo oh, right
i do say that every now and then
vrurg SmokeMachine: ok, will do now.
00:05 nephele left, nephele joined 00:06 MilkmanDan left 00:07 MilkmanDan joined, cpup joined
vrurg SmokeMachine: BTW, what method .^alias does? 00:12
00:15 MilkmanDan left 00:16 nephele left 00:24 MilkmanDan joined 00:26 irced joined
irced when I call prompt execution is proceeding but i have not messed with any handles. any thoughts? 00:31
oh, i actually am ctrl-d'ing from a previous prompt. i think that is signalling something in the stream. any way to clear it? 00:33
00:52 pamplemousse left 01:00 aborazmeh left 01:03 cpup left 01:04 cpup joined 01:13 molaf left 01:26 molaf joined
irced i think i know why it's so quiet in here, because perl6 is so deck we can't bring ourselves to jack out 01:26
irced is neuromancing the stone -- perl6 stone that is. 01:27
01:48 epony left 02:01 Manifest0 left 02:02 Manifest0 joined
cpan-p6 New module released to CPAN! Sparrow6 (0.0.6) by 03MELEZHIK 02:13
02:23 Cabanossi left 02:26 Cabanossi joined 02:27 epony joined 02:29 irced left 02:36 Sgeo left 02:41 Sgeo joined 03:27 rindolf joined 04:04 pamplemousse joined 04:16 [Sno] left 04:33 pamplemousse left 04:47 cpup left 04:48 cpup joined
Xliff went *plop* 05:30
05:44 aeruder joined 06:00 reportable6 left 06:04 reportable6 joined, ChanServ sets mode: +v reportable6 06:05 [particle]1 joined, jmerelo joined 06:06 [particle] left 06:08 riatre joined 06:18 pamplemousse joined
SmokeMachine vrurg: it’s used (or was used I’m not sure) if you want to join the same table twice... if you use `Bla.^alias(“ble”).^all.map: *.id` the select will do something like `SELECT ble.id FROM bla ble` 06:26
06:28 pamplemousse left
Geth doc: 86559aa541 | (JJ Merelo)++ | util/issue-with-all-pod6.p6
Fixes URLs, thanks to @randyl, refs #2924
06:36
doc: b86b6ab075 | (JJ Merelo)++ | util/issue-with-all-pod6.p6
Improves document name for #2924
06:41
06:52 reach_satori_ joined 06:54 satori__ joined 06:57 reach_satori_ left 06:59 satori__ left 07:00 ufobat joined 07:03 Black_Ribbon left 07:05 curan joined 07:13 Black_Ribbon joined 07:15 khisanth_ left 07:16 dakkar joined, khisanth_ joined 07:20 Itaipu_ joined 07:22 patrickb joined 07:24 [particle]1 left 07:25 cpan-p6 left, cpan-p6 joined, cpan-p6 left, cpan-p6 joined 07:27 robertle joined, [particle] joined 07:29 chloekek joined
lizmat clickbaits p6weekly.wordpress.com/2019/07/29/...sed-again/ 07:33
Geth doc: 531e030d6e | (JJ Merelo)++ | doc/Language/contexts.pod6
Corrections about implicit coercions, refs #1225
07:35
synopsebot Link: doc.perl6.org/language/contexts
doc: 3fb402a243 | (JJ Merelo)++ | doc/Language/contexts.pod6
Adds Boolean contexts refs #1225
07:35 [particle]1 joined 07:37 [particle] left 07:39 [particle] joined 07:41 [particle]1 left 07:50 zakharyas joined, scimon joined 08:00 noisegul joined 08:07 [particle] left, [particle]1 joined 08:10 dustinm` joined 08:14 dolmen joined 08:30 aeruder left 08:33 aeruder joined 08:40 Black_Ribbon left 08:43 ThisGeekChick joined 08:47 Black_Ribbon joined 08:52 ThisGeekChick left 08:54 ravenousmoose_ left 08:55 ravenousmoose_ joined 09:00 ChoHag joined, mowcat joined 09:17 satori__ joined 09:18 reach_satori_ joined 09:21 satori__ left 09:31 Black_Ribbon left 09:39 HarmtH joined 09:42 pat_js joined 09:46 pilne left 09:52 Itaipu_ left, Itaipu joined
chloekek p6: no strict; foo; 09:58
09:58 evalable6 left
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
foo used at line 1
09:58
chloekek Aw, can't write System.out.print("Hello, world!") out of the box unlike Perl 5. 09:59
Oh right, . means something different in Perl 6 anyway.
09:59 tadzik joined
scimon That's for the best really. 10:00
10:01 evalable6 joined, ChanServ sets mode: +v evalable6 10:05 reach_satori_ left, ravenousmoose_ left 10:33 ChoHag left 10:35 ChoHag joined, ilmari joined 10:37 ilmari left
jmerelo chloekek: what do you mean exactly? You can do "Hello".say or say "Hello" (or put or print) 10:39
m: &_("Hello") for print,say,put 10:40
10:40 evalable6 left
camelia 5===SORRY!5=== Error while compiling <tmp>
Unsupported use of bare "print"; in Perl 6 please use .print if you meant to call it as a method on $_, or use an explicit invocant or argument, or use &print to refer to the function as a noun
at <tm…
10:40
jmerelo m: $_("Hello") for print,say,put
camelia 5===SORRY!5=== Error while compiling <tmp>
Unsupported use of bare "print"; in Perl 6 please use .print if you meant to call it as a method on $_, or use an explicit invocant or argument, or use &print to refer to the function as a noun
at <tm…
jmerelo m: $_("Hello") for say,put
camelia 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…
jmerelo m: ("Hello").&_ for say,put 10:41
camelia 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…
scimon m: $_("Hello") for &print, &say, &put;
camelia HelloHello
Hello
scimon :D
jmerelo scimon: right. Sorry.
10:44 evalable6 joined, ChanServ sets mode: +v evalable6
Geth doc: a7606861ba | (JJ Merelo)++ | util/issue-with-all-pod6.p6
Fifth's the charm
10:52
11:02 dolmen left, antoniogamiz joined 11:04 lichtkind joined
lichtkind lizmat: cheers 11:04
chloekek jmerelo: System.out.print("Hello, world!"); prints hello world in Perl 5. :') 11:05
antoniogamiz chloekek: really? hahaha 11:06
chloekek print prints, System and out are barewords, . concatenates.
So what it does is: print hello world, construct the string "Systemout1", throw that string away.
p6: module System { our \out = $*OUT }; System.out.print("Hello, world!") 11:08
11:08 evalable6 left
camelia 5===SORRY!5=== Error while compiling <tmp>
our scoped term definitions (only 'my' is supported at the moment) not yet implemented. Sorry.
at <tmp>:1
------> 3module System { our \out7⏏5 = $*OUT }; System.out.print("Hello, wor
exp…
11:08
chloekek p6: module System { sub out { $*OUT } }; System.out.print("Hello, world!")
camelia No such method 'out' for invocant of type 'System'
in block <unit> at <tmp> line 1
chloekek p6: class System { method out { $*OUT } }; System.out.print("Hello, world!")
camelia Hello, world!
11:09 evalable6 joined
antoniogamiz aahh 11:09
11:10 tokomer joined
chloekek p6: class System { method out { $*OUT but role { method println($_) { self.put($_) } } } }; System.out.println("Hello, world!") 11:10
11:10 evalable6 left
camelia Hello, world! 11:10
11:12 evalable6 joined
chloekek But it's not so funny if it doesn't work out of the box. :') 11:15
11:19 lizmat_ joined 11:20 gdonald joined, ChoHag left, ChoHag joined 11:34 lizmat_ is now known as lizmat 11:37 mowcat left
SmokeMachine m: .("Hello") for &print, &say, &put; 11:40
11:40 evalable6 left
camelia HelloHello
Hello
11:40
scimon Nice
11:41 nepugia joined
lizmat m: .("Hello") for &print, &say, &put, &note, &warn, &die; 11:41
camelia HelloHello
Hello
Hello
Hello
in block at <tmp> line 1
Hello
in block <unit> at <tmp> line 1
11:42 molaf left, lichtkind_ joined 11:43 evalable6 joined 11:45 lichtkind left 11:49 pat_js left, Sgeo left, Sgeo joined 11:58 ravenousmoose joined 12:00 reportable6 left 12:01 reportable6 joined
sena_kun in `given $foo {}` construction, how would I name `$foo` part? Topicalizer? 12:01
12:03 dolmen joined
tobs sena_kun: I'm maybe lacking the required feeling for English, but "topicalizer" sounds like it refers to `given`, the device that sets the topic. 12:04
given that "topic" is also already used up, maybe $foo is the "topicalizee" :P
sena_kun :Z
I'll probably go with `getTopic` name then...
tobs sena_kun: topicalizing is actually used here docs.perl6.org/language/traps#Topi..._operators 12:05
and in A06 perl6.org/archive/doc/design/apo/A06.html 12:07
I think it does refer to the syntax element doing the topicalization
12:08 MARTIMM joined
sena_kun tobs, I see, thanks. 12:08
chloekek There's more than one way to name it ... la topique.
12:12 antoniogamiz left
tobs the topic-to-be, or to-be-c 12:15
lizmat sena_kun: I would suggest "topicalee" rather than "topicalizee" 12:18
12:19 reach_satori_ joined
sena_kun lizmat, I am using `getTopic` already, thanks. ;) 12:19
woah, a sudden heavy rain here... 12:20
12:24 reach_satori_ left 12:32 aborazmeh joined, aborazmeh left, aborazmeh joined 12:44 pat_js joined 12:45 guifa2 joined
guifa2 I remember reading somewhere that some of the philosophy of P6 design was to put more work on the core/module developers to relieve the users of some of the dirtier work where .lines and .words were used as an example. Does anyone happen to have a memory of who said it / where? 12:46
timotimo you'd want to search for "torture the developers" or "torture the implementors" 12:48
sena_kun guifa2, can't said origins, but I know that a more exact phrasing is "torture the implementers for the sake of the users", you can google more
news.perlfoundation.org/2017/09/gra...uni-3.html 12:49
guifa2 (timotimo,sena_kun).map: *++
chloekek Torture the implementor on behalf of the user, it is mentioned by TimToady in his Perl 6 talk www.youtube.com/watch?v=mxLIQxSda0E I believe.
guifa2 chloekek++ figures it's on a youtube video and my connection here is :-( haha 12:52
chloekek This in contrast with some languages (torture the user on behalf of the implementor) and C++ (torture everybody).
guifa2 is talking about why having transcribers use TEI is an excercise is insanity, and a Markdown-like format would be better for everyone except for the one soul that has to write the psuedo-MD to TEI or whatever converter, and the quote is a good one for it (plus, you know, trying to push P6 anywhere I can) 12:54
12:57 wbn joined
chloekek guifa2: what is TEI? 13:08
timotimo the text encoding initiative? 13:10
guifa2 chloekek. Text Encoding Initiative. It's an XML format for transcribed texts. It's thorough but… it's also XML haha
timotimo that means it's extensible!
guifa2 timotimo: nonononono. Bad timotimo. It's already got enough tags as it is lol
For example, in one of the showcase-y projects in my field, the word "nr̄o" is encoded thus: 13:12
<choice><abbr>nr<am>̄</am>o</abbr><expan>n<ex>uest</ex></expan></choice>
moritz it could be worse. You could be forced to use namespaces :D 13:13
though I wouldn't want to type this by hand
chloekek Just make documents with the various sequences you often use and you use XInclude.
guifa2 mortiz: that's the problem, most people do type this stuff by hand (!)
chloekek Or make your own DSL and transform it with XSLT.
guifa2 chloekek: the custom DSL is what I'm arguing for 13:14
chloekek Great hackathon project. 13:15
13:16 antoniogamiz joined 13:17 ravenousmoose left
guifa2 The one I made for my dissertation is mostly based on Markdown principles, and so the plaintext version actually looks a lot like the manuscript, and I can transcribe a page in about 15 minutes as opposed to the standard 90+ min. Using P6 grammars makes tweeking it a breeze, and then adding actions makes it a breeze to convert to e.g., TEI or HSMS or whatever else 13:18
chloekek Once wrote a program to convert orders to invoices. After years of typing invoices by hand, the clerk was relieved. 13:19
guifa2 Nice. I wish I could do that at work for some stuff I have, but they won't give me access to the database to do it =\ 13:20
chloekek Also automated concatenating invoices and work order PDFs for the same company, saving a lot of paper because apparently the standard procedure to concatenate two PDFs is to print them both to paper, and then scan them into a single document with the document scanner.
antoniogamiz lol 13:21
guifa2 facepalms 13:22
Geth doc: a56fb058b7 | Coke++ | util/issue-with-all-pod6.p6
whitespace
doc: c1e1705395 | Coke++ | doc/Language/contexts.pod6
use English "Ahoy" to avoid spellcheck issues
synopsebot Link: doc.perl6.org/language/contexts
13:23 curan left 13:29 AlexDaniel left 13:30 ChoHag left
antoniogamiz * turns on netflix and starts rewriting links 13:31
ups, it does not work hahaha 13:32
13:35 Kaiepi joined, lucasb joined 13:37 ravenousmoose joined 13:38 aborazmeh left
timotimo you mean netfix? because you're fixing the net of links? 13:40
antoniogamiz nop, I mean I'm watching a serie while I rewrite links in docs :D
13:41 ravenousmoose left 13:42 ChoHag joined
sena_kun what a nice approach to ruin both things at once 13:44
antoniogamiz ruin? 13:45
sena_kun well, I doubt constant distracting would make any of that any bit enjoying experience. though I heard that around 2% of people are not so bad at multitasking as other 98%, but not sure how good is this info. 13:47
left a quick note about search categories~
antoniogamiz let's see 13:48
13:52 reach_satori_ joined 14:01 pat_js left
Xliff m: say 1 /2 / 3/ 4 14:11
14:11 evalable6 left
camelia 0.041667 14:11
14:11 Cabanossi left, patrickb left 14:12 evalable6 joined, ChanServ sets mode: +v evalable6
chloekek Generate the links using vectorflow. 14:13
14:13 demanuel left
antoniogamiz vectorflow? 14:14
14:14 Kaiepi left
chloekek Machine learning library from Netflix. :P 14:15
14:15 Kaiepi joined
antoniogamiz ah 14:15
14:17 patrickb joined 14:22 demanuel joined 14:39 ravenousmoose joined
Geth doc: cab3b924e8 | Antonio++ | 30 files
fixs some links #561
14:40
14:40 mowcat joined 14:47 pat_js joined, guifa2 left 14:56 antoniogamiz left
timotimo gitorious.org/ 15:02
15:06 wildtrees joined 15:07 ctilmes joined 15:10 robertle left 15:15 ChoHag left 15:25 pamplemousse joined 15:26 zakharyas left, ChoHag joined
ctilmes Trying to build NQP under Alpine 3.10.1, fails with "Can't locate NQP/Config.pm in @INC" 15:30
cpan-p6 New module released to CPAN! Tinky::Hash (0.4.2.7) by 03MARTIMM
ctilmes Here's what I did: gist.github.com/CurtTilmes/8df6248...dafa5a25aa
timotimo yeah, github archives don't have subprojects in them 15:33
github.com/perl6/nqp/releases/down...7.1.tar.gz
you need this
ctilmes Ok, I'll put that instead. Thanks!
timotimo no problem :) 15:34
same thing will likely happen for rakudo if you use the github archive there
chloekek Do we want modules.perl6.org to render POD? 15:41
timotimo i think so 15:44
chloekek Sounds tricky since that means executing arbitrary code.
timotimo true
15:51 chloekek left
moritz we really need a safe way to render pod 15:53
cpan-p6 New module released to CPAN! Gnome::Gtk3::Glade (0.8.6) by 03MARTIMM 15:58
15:59 patrickb left
jmerelo chloekek: yep, that would be nice, yes, it's tricky. 16:00
cpan-p6 New module released to CPAN! Unicode::PRECIS (0.5.1.1) by 03MARTIMM 16:03
New module released to CPAN! Semaphore::ReadersWriters (0.2.6.1) by 03MARTIMM
New module released to CPAN! Neo4j (0.1.0.1) by 03MARTIMM
New module released to CPAN! MongoDB (0.43.8) by 03MARTIMM
New module released to CPAN! UEncoding (0.1.0) by 03MARTIMM
New module released to CPAN! TMap (0.2.0) by 03MARTIMM
New module released to CPAN! SemiXML (0.48.1) by 03MARTIMM
New module released to CPAN! Rdf (0.3.3.1) by 03MARTIMM
16:03 ChoHag left
cpan-p6 New module released to CPAN! PKCS5 (0.1.6.2) by 03MARTIMM 16:03
New module released to CPAN! TMap (0.1.0.1) by 03MARTIMM
New module released to CPAN! Library (0.13.4) by 03MARTIMM 16:04
New module released to CPAN! GraphQL::Html (0.7.0) by 03MARTIMM
New module released to CPAN! Decimal (0.3.1) by 03MARTIMM
New module released to CPAN! VCard (0.0.1) by 03MARTIMM
16:04 robertle joined
jmerelo Wow. They come by the dozen. 16:05
16:15 dolmen left
cpan-p6 New module released to CPAN! Config::DataLang::Refine (0.7.3) by 03MARTIMM 16:19
New module released to CPAN! XML::Actions (0.3.2) by 03MARTIMM
16:25 noisegul left, Sgeo_ joined 16:29 Sgeo left 16:30 chloekek joined, khisanth_ left 16:31 pamplemousse_ joined, scimon left
chloekek Can zef verify signatures and generate lock files? 16:34
16:34 pamplemousse left
jmerelo chloekek: as in, check that what's downloaded is precisely what was published? 16:34
chloekek: not clear what you mean about lock files, but I don't think so.
chloekek If I install my dependencies, and then delete ~/.zef, and then install again, that I get exactly the same code. 16:35
timotimo i think lock files record what exact versions of different modules you have installed
jmerelo chloekek: also, no to the first one. There's no such thing, at least on the ecosystem.
16:35 pat_js left
jmerelo chloekek: ah, as in package-lock.json 16:35
chloekek: no, it does not do that either.
chloekek: but zef need not be the only tool out there. I'm all for another one that competes with it. 16:36
chloekek Well if I (or someone else) could add this to Zef that'd be neat. :)
16:36 dakkar left
chloekek Another problem is that Zef executes tests (i.e. arbitrary untrusted code) during module installation, AFAICT. 16:37
jmerelo chloekek: you can give it a try. In general, external suggestions for features or changes are not exactly well received.
16:37 ChoppedBacon joined
jmerelo chloekek: which is why I'm all for having another tool that downloads and install stuff. 16:37
Geth doc: 6362417a48 | Coke++ | doc/Language/subscripts.pod6
This code only compiles, doesn't generate output

The previous declaration caused compilation issues, avoid it.
synopsebot Link: doc.perl6.org/language/subscripts
doc: 3569484df8 | Coke++ | doc/Language/traps.pod6
whitespace
synopsebot Link: doc.perl6.org/language/traps
chloekek Oh I see.
16:38 ChoppedBacon left
jmerelo chloekek: this is the issue I raised about something different, versions: github.com/perl6/problem-solving/issues/72 16:38
16:38 ChoppedBacon joined
chloekek Thanks! 16:39
jmerelo chloekek: you can try raising that issue also in that repo. I would support it. But in general, as I say, not very receptive.
chloekek I think I'll work on a tool to convert META6.json to Nix expressions (been on my todo list for ages). 16:40
16:40 ChoppedBacon left
jmerelo chloekek: this? nixos.wiki/wiki/Nix_Expression_Language 16:40
chloekek: you mean using a declarative language for metadata for Perl 6 modules? That's cool. 16:41
16:41 ChoppedBacon joined
chloekek Yeah, it's a language-agnostic package manager. Expressions describe how to download and build packages. It ships with expressions for many Perl 5 libraries. 16:41
jmerelo chloekek++
chloekek It has some issues, e.g. inserting hard-coded absolute paths to /nix/store/... in the build artifacts, but in production I work around them with bind mounts. XD 16:42
16:42 ChoppedBacon left, MilkmanDan left
jmerelo chloekek: cool. 16:42
16:43 ChoppedBacon joined, khisanth_ joined, MilkmanDan joined 16:44 ChoppedBacon left 16:45 ctilmes left 16:46 ChoppedBacon joined, ctilmes joined
cpan-p6 New module released to CPAN! Libui (0.0.3) by 03GARLANDG 16:47
16:57 Typhoonox joined, [Sno] joined, Typhoonox left 17:01 [Sno] left 17:08 robertle left 17:10 antoniogamiz joined 17:12 jmerelo left 17:19 aindilis joined 17:30 domidumont joined
chloekek .tell jmerelo Got something working with hand-written Nix expressions. :) It takes some dependencies from the ecosystem (Pod::To::HTML and its dependencies) and generates a Bash script that sets PERL6LIB and then execs Rakudo: github.com/chloekek/meta62nix/blob...efault.nix 17:31
Oh yoleaux is dead.
17:35 [Sno] joined 17:49 robertle joined
cpan-p6 New module released to CPAN! Sparrow6 (0.0.7) by 03MELEZHIK 17:51
18:00 reportable6 left, reportable6 joined 18:10 domidumont left 18:16 candr joined
candr how can I conditionally load a module? like `use Module unless $foo` 18:18
18:18 tokomer left, [Sno] left
chloekek candr: do you want to evaluate the condition at compile time or at runtime? 18:19
candr compile time... it is in a module 18:20
18:20 [Sno] joined
candr hmm.. i think i got the compiler to stop complaining by putting it in an unless block instead of the unless porstfix way 18:24
18:24 antoniogamiz left
candr but now the routines from that module are not recognized.... hmm.... i am trying to disable certain parts of the code... 18:25
chloekek Yeah, they will only be available within the lexical scope of the braces of the unless statement. :) 18:27
candr so maybe i can put the sub that user that module in that lexical scope.... but the i still need access do it.... can i declare it outside and define it inside.... 18:29
lizmat feels this page could use some updates: en.wikipedia.org/wiki/Outline_of_Perl 18:30
18:31 sauvin left 18:34 Cabanossi joined
chloekek candr: Maybe something like this works: BEGIN { if $foo { require 'Module' } else { module ::Module {} } }; import Module require merely loads a module, import also brings its exports into scope. If $foo is false then you load the actual module and otherwise you define a module that doesn 18:35
18:35 holyghost left
chloekek 't export anything. 18:35
18:35 holyghost joined
chloekek These links may also be helpful: docs.perl6.org/language/modules#Lo..._importing 18:39
candr i think i got it working with an unless block. I have a my &foo outside the unless block than &foo = -> {} inside...
chloekek Yeah that works too, but if it's a bare unless outside of BEGIN then it will always be executed at compile-time. 18:41
candr if it breaks somewhere i will look into that though. thanks
chloekek Actually I'm not quite sure how you'd do that conditionally even with BEGIN.
18:42 irced joined
chloekek require instead of use should do the trick. 18:42
cpan-p6 New module released to CPAN! Physics::Measure (0.0.2) by 03PSIXSTEVE
sena_kun give me a second...
ugh, 3g is horrible, maybe a bit more than a second...
chloekek sena_kun.seconds++
sena_kun github.com/FROGGS/p6-if <- can this help? 18:43
candr i am trying to switch off a module and features that rely on it if the program is run on windows. seems to be working in unix... need to go test it in windows now
irced hey all, I've defined a class and want it to output a string when it is join'ed as in say join '', @array-with-object-that-should-coerce-to-string . how do i do this? maybe some sort of operator overload on ~ ? i already _tried_ defining the method gist. 18:44
candr oh that looks cool too sena_kun 18:45
thanks
sena_kun hope that'll work out. :) 18:46
chloekek p6: class Foo { method Str { "Foo but as a string" } }; my $foo = Foo.new; say $foo.Str; say ~$foo; say join('', ($foo, $foo, $foo)) 18:58
18:58 evalable6 left
camelia Foo but as a string
Foo but as a string
Foo but as a stringFoo but as a stringFoo but as a string
18:58
chloekek irced: ☝️ define the Str method 18:59
See the following two links: docs.perl6.org/routine/gist#(Mu)_routine_gist and docs.perl6.org/routine/Str#(Mu)_method_Str 19:00
19:00 evalable6 joined
irced chloekek: thanks! will do! 19:01
chloekek irced: in general conversion methods are named after the type they convert into. So to convert to string, Str. To convert to integer, Int. Etc. These are then called implicitly in the relevant contexts, or when using the ~, +, and ? operators. 19:03
prefix operators*
irced chloekek: nice! thanks, you're like a living book 😄 19:05
sena_kun chloekek, maybe you will be intetested in helping with docssearch categories? :) 19:06
irced docssearch categories? 19:07
sena_kun oops, this whitespace got me. :S
yup, docssearchcategories .
whitespace is not very important, I left it all at the end of the sentence...
chloekek Sometimes my line of thought is: if someone asks a question, don't answer it. Instead, update the documentation, since it was clearly insufficient. 19:08
irced sena_kun: docssearchcategories ?
sena_kun: that does not compute. 19:09
chloekek For example, the documentation of join doesn't mention Str. It does mention conversion to strings, but doesn't link to how that works.
irced covers his mouth.
chloekek By updating the documentation instead of answering the question directly, everyone benefits.
The problem is that it takes more time. :)
irced time is relative, or so i hear 19:10
relatively expensive!
sena_kun chloekek, that's a very nice method of thinking, an optimized one.
19:10 Black_Ribbon joined
chloekek It's similarly to how, when you encounter a bug, you first make a regression test instead of just fixing it and hoping it won't happen again. 19:10
And also similar in why people don't do it: it is too much effort. Either because of missing infrastructure, or because they are tired, or any other valid reason. :) 19:11
irced Regression testing is a type of software testing that ensures that previously developed and tested software still performs the same way after it is changed or interfaced with other software. 19:12
irced covers his mouth.
19:12 pecastro joined
irced 🙊 19:14
Elronnd is there a type like a hash, where calling .keys or .values or .kv will return them in the order I declared the original hash? 19:15
irced Elronnd: that's hasheresy which is a amalgamation of hash heresy 19:16
Elronnd i'm a heretic tho
sena_kun Elronnd, either keep a list of keys, which is LTA, or, hmm... 19:19
I don't see anything interesting at modules.perl6.org/search/?q=hash 19:20
chloekek sena_kun: what is docssearchcategories?
irced Elronnd: so a hash takes a key and hashes it to some memory offset. then depending on the algorithm, it might choose another memory location if that one is occupied, or it might just point to a container. it does not seem trivial to keep track of what keys were added in what order unless you define your own setter which stacks the keys.
Elronnd irced: it's constant; never modified. I just want to say constant %h = %(a => b, c => d); and have %h.keys[0] == "a" 19:21
irced Elronnd: that's a simpler case but i have never heard of a hash abtracted that way, because hashes are meant to be efficient and that would go against the grain of efficiency. i would be surprised if perl6 implemented that automatically. 19:22
sena_kun chloekek, there is an issue with search categories in documentation, long story short they are very LTA right now and some work is being done as a part GSOC project, but apparently creating a set of categories of things in Perl 6 requires someone who knows the language pretty well, and you look like a person who is pretty good with it. See github.com/perl6/doc/issues/1410 19:23
Elronnd irced: I think c++ has something like that
not sure, though. C++ was kind of traumatic so I blocked most of it out
irced Elronnd: hmm. an unordered_map perhaps. i suppose so then! silly me 19:24
sena_kun chloekek, of course, it's volunteering, so I don't expect anything, but I just learned that + and ? are not just out of place ops, but prefix counterparts of methods, and it was wow.
Geth doc: chloekek++ created pull request #2925:
Clarify join
irced from cppreference concerning unordered_map: Internally, the elements are not sorted in any particular order, but organized into buckets. Which bucket an element is placed into depends entirely on the hash of its key. 19:25
Elronnd: so, i don't think you can count on subscripting in that case either.
chloekek p6: my $x = 'answer' but role { method Numeric { 42 } }; say $x; say +$x;
19:25 evalable6 left
camelia answer
42
19:25
chloekek p6: my $x = 'answer' but role { method Int { 42 } }; say $x; say +$x; 19:27
camelia answer
Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5answer' (indicated by ⏏)
in block <unit> at <tmp> line 1
Geth doc: eefd0f3c10 | Chloé++ | 2 files
Clarify the behavior of Any.join and List.join

Somebody on IRC asked how to customize the way join treats the elements. The documentation merely stated that the elements were treated as strings, but not how this happens. This patch clarifies that .Str is called. Also clarify how Any.join calls self.list first.
doc: 2a35481a43 | Chloé++ | 2 files
Fix minor typos in join documentation
doc: 05a5e8dfd4 | Altai-man++ (committed using GitHub Web editor) | 2 files
Merge pull request #2925 from chloekek/clarify-join

Clarify join
19:28 MARTIMM left, Marcel joined, evalable6 joined 19:29 epony left
irced Elronnd: but then again that just speaks to storage and retrieval by key not by subscript. so you may be looking for something that perl6 might actually implement (and c++ does as well) 19:29
irced is trying it in c++ atm.
Elronnd ah, right; I assumed since the map class was called std::unordered_map, that there was an ordered counterpart 19:31
chloekek C++ unordered_map is similar to Perl 6 Hash.
C++ does not provide a map type that remembers the insertion order. std::map sorts by the key (because it's usually implemented as a red–black tree). 19:32
PHP has associative arrays that maintain the insertion order of the keys. I presume that implementing it in Perl 6 is not very difficult if you store both a Hash and an Array internally.
lizmat modules.perl6.org/dist/Hash::Agnostic # chloekek: should be easy to implement with this 19:34
irced Elronnd: well the unordered map just doesn't do any ordering nevertheless the iterator does not iterate in order. (can't use subscript with integer but can get an iterator pointer and advance it to inspect, which i did) 19:38
Elronnd: I didn't know PHP was heretical!
19:39 cygx joined
cygx Elronnd: github.com/smls/perl6-LinkedHash 19:39
irced lizmat: are you being funny?
cygx Elronnd: github.com/zostay/perl6-ArrayHash
irced is laughing.
lizmat TIL :-) 19:40
irced oh, that's a real link, what a coincidence
Err, chloekek: i didn't know PHP had that.
chloekek lizmat: very nice
19:43 epony joined 19:55 cpan-p6 left
chloekek Seems ArrayHash.kv works differently from Hash.kv; it returns a list of pairs, whereas Hash.kv returns a seq of alternating keys and values. 19:55
19:55 cpan-p6 joined, cpan-p6 left, cpan-p6 joined
lizmat then ArrayHash is incorrect in its implementation 19:57
20:14 molaf joined 20:22 woolfy left 20:23 woolfy joined
chloekek p6: sub f(Int:D $x) { LEAVE { say 'boom' } }; f('crash') 20:28
20:28 evalable6 left
camelia boom
Type check failed in binding to parameter '$x'; expected Int but got Str ("crash")
in sub f at <tmp> line 1
in block <unit> at <tmp> line 1
20:28
timotimo p6: sub f(Int:D $x) { KEEP { say 'boom' } }; f('crash') 20:29
camelia Type check failed in binding to parameter '$x'; expected Int but got Str ("crash")
in sub f at <tmp> line 1
in block <unit> at <tmp> line 1
timotimo p6: sub f(Int:D $x) { KEEP { say 'boom' } }; f(1234)
camelia ( no output )
timotimo ah, no return doesn't count as success
p6: sub f(Int:D $x) { KEEP { say 'boom' }; say "yup" }; f(1234)
camelia yup
boom
timotimo p6: sub f(Int:D $x) { KEEP { say 'boom' }; say "yup" }; f("crash")
camelia Type check failed in binding to parameter '$x'; expected Int but got Str ("crash")
in sub f at <tmp> line 1
in block <unit> at <tmp> line 1
20:31 pamplemousse_ left 20:32 evalable6 joined, ChanServ sets mode: +v evalable6 20:36 lichtkind_ is now known as lichtkind 20:38 lichtkind left 20:42 netrino joined 20:52 pamplemousse_ joined 20:54 Marcel left 21:00 irced left 21:02 molaf left
candr having trouble not evaluating code at compile time... i am using the p6-if module to not load a module if `$*DISTRO.is-win`, but now I have a subroutine that user functions from the module I am not loading that I need do have ignored at compile time based on `$*DISTRO.is-win` 21:02
21:04 cygx left
Xliff m: 0x2660.unichar.say 21:06
21:06 evalable6 left
camelia No such method 'unichar' for invocant of type 'Int'
in block <unit> at <tmp> line 1
21:06
Xliff m: 0x2660.char.say
camelia No such method 'char' for invocant of type 'Int'. Did you mean any of these?
can
chars
chop
chr

in block <unit> at <tmp> line 1
Xliff m: 0x2660.chr.say 21:07
camelia
21:09 evalable6 joined, ChanServ sets mode: +v evalable6
candr anyone know how to ignore a block of code at compile time? 21:16
21:18 chloekek left
timotimo candr: "block of code" is a little tricky; a slang can do it, i'm sure. other than that, you can put it into a separate file and conditionally use it. you could also use EVAL for this purpose 21:19
ufobat i think the docs for EVAL is not correct? docs.perl6.org/routine/EVAL 21:20
proto sub EVAL($code where Blob|Cool|Callable, .....) how could $code be a Callable?
timotimo yeah i don't see an example of callable being used in EVAL on the docs page at least 21:21
medium.com/@nimelrian/no-way-to-pr...f59e6836de 21:30
lizmat die "EVAL() in Perl 6 is intended to evaluate strings, did you mean 'try'?" 21:33
if nqp::istype($code,Callable);
21:34 candr left
lizmat that's why there is a `Callable` in the sig 21:34
timotimo haha
we don't have anything clever for "if a specific type is passed, give a more specific error, but don't claim in the signature that it's a potential candidate" 21:35
lizmat well, we could have a candidate for it, but since for various reasons, this is in the proto, there is no real way around it 21:36
timotimo something to attach to a callable that the error report will be able to enquire 21:37
simcop2387 r, say "Hello" # sorry for noise, need to test something 21:38
perlbot simcop2387: Hello␤
simcop2387 ok good
lizmat candr: of your module is importing &foo, then creating a stub &foo will silence compile time warnings for &foo not being available if the module isn't loaded 21:40
lizmat hopes that made sense
m: sub pass() { say "tis that" }; pass'
21:40 evalable6 left
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3sub pass() { say "tis that" }; pass7⏏5'
expecting any of:
infix
infix stopper
statement end
statement modif…
21:40
lizmat m: sub pass() { say "tis that" }; pass 21:41
camelia tis that
lizmat m: sub pass() { say "tis that" }; pass; use Test; # hmmm... maybe not.... sorry for the noise 21:42
camelia 5===SORRY!5=== Error while compiling <tmp>
Cannot import symbol &pass from Test, because it already exists in this lexical scope
at <tmp>:1
------> 3ass() { say "tis that" }; pass; use Test7⏏5; # hmmm... maybe not.... sorry for th
21:43 evalable6 joined, ChanServ sets mode: +v evalable6 22:11 sena_kun left 22:13 netrino left
El_Che Altreus: the 99 misc test fix wasn't part of the 2019.07.1 release? 22:19
22:20 rindolf left 22:21 pilne joined
El_Che oops 22:22
Altreus: sorry, meant AlexDaniel`
22:26 mowcat left 22:46 ctilmes left
pilne hrm.... vscode or atom... last time i had both, atom was a bit slower for things i tend to work on, but i like the UI a bit more than vscode.... 22:51
but solid perl6 support trumps either of my dislikes with either platform.
Elronnd pilne: vim! 22:52
or comma
pilne i'm currently spending most of my times on a win10 box, i guess i should have stated that first though, sorry! 22:53
Elronnd both of those work on win10
pilne comma i've seen
i just have never liked how heavy intellij things have felt
masak they are a bit on the heavy side 22:54
pilne and vim is perhaps the best way to go, i have a long history with it
masak though not as heavy as Eclipse :)
pilne if i ever honestly start doing something big and serious i'll probably consider comma
but i'm just getting back into things after a forced/unwanted hiatus from most of my free time lol
it did help fund the replacement of a very old laptop though (the hiatus). 22:55
23:01 robertle left 23:12 pamplemousse_ left 23:15 |oLa|1 left
rba www.perl6.org/perl6.org is running on the server from nine. let me know if there are any issues. 23:22
23:23 Cabanossi left 23:28 nepugia left 23:30 Cabanossi joined 23:35 aborazmeh joined, aborazmeh left, aborazmeh joined 23:47 aindilis left, pecastro left 23:53 |oLa| joined