»ö« 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 Zoffix on 25 May 2018.
00:01 mcmillhj joined 00:06 mcmillhj left 00:09 konsolebox joined 00:17 mcmillhj joined 00:21 mcmillhj left
Geth doc: 42817318db | (JJ Merelo)++ | doc/Language/glossary.pod6
Changes link as indicated, closes #2170

Also reflows, puts anchors above titles, and rewrites the pull request entry (decapitalizing second word)
00:22
synopsebot Link: doc.perl6.org/language/glossary
00:43 fake_space_whale joined, mcmillhj joined 00:48 mcmillhj left 00:55 mcmillhj joined 00:57 benjikun2 is now known as benjikun 01:00 mcmillhj left 01:07 aborazmeh joined, aborazmeh left, aborazmeh joined, molaf left 01:09 jameslenz joined 01:14 jameslenz left 01:20 molaf joined 01:23 kerframil joined 01:32 mcmillhj joined 01:33 markoong left 01:34 sftp joined 01:37 mcmillhj left 01:50 mcmillhj joined 01:55 mcmillhj left 02:00 timotimo left 02:07 timotimo joined 02:08 cono joined 02:14 fake_space_whale left 02:16 aborazmeh left 02:18 Zoffix joined, Zoffix left 02:20 mcmillhj joined 02:24 mcmillhj left 02:33 mcmillhj joined 02:38 mcmillhj left
Geth marketing: 087bc1b183 | (Zoffix Znet)++ | 8 files
Add some purchased stock

  - Diwali illustrations and humans with computers
  - DepositPhotos standard license applies:
   depositphotos.com/content-license.html
02:39
02:58 tokomer joined 03:09 jameslenz joined 03:11 mcmillhj joined 03:14 jameslenz left 03:15 mcmillhj left 03:20 Xliff joined
Xliff \o 03:20
I know it's late, but... 03:21
gist.github.com/Xliff/6b16cccd09ce...8745730042
03:26 mcmillhj joined 03:30 araraloren joined 03:31 mcmillhj left
araraloren Hi 03:31
When I call more than once `tap` on a Supply, what's the order when they be called ? 03:34
Xliff m: my $supplier = Supplier.new; my $supply1 = $supplier.Supply; $supply1.tap(-> $v { say "1: $v" }); $supply1.tap(-> $v { say "2: $v" }); $supplier.emit(42); 03:39
camelia 1: 42
2: 42
Xliff ^^ araraloren
So, in order of the taps made on the supply. 03:40
araraloren Xliff Can I write code reply on that order ?
Xliff If you are doing this in a multithreaded manner, that order will be hard to define.
araraloren oh, just in single thread
Xliff araraloren: I don't really know. Based on that quick example, my guess is that the supplies execute based on a list. 03:41
araraloren okay, Xliff
thanks
Xliff m: my $supplier = Supplier.new; my $supply1 = $supplier.Supply; $supply1.tap(-> $v { say "1: $v" }); $supply1.tap(-> $v { say "2: $v" }); $supply1.tap(-> $v { say "3: $v" }); $supplier.emit(42);
camelia 1: 42
2: 42
3: 42
Xliff Now if you get another sypply from the supplier, they should execute at the same time.
araraloren sametime ? 03:42
Xliff m: my $supplier = Supplier.new; my $supply1 = $supplier.Supply; $supply1.tap(-> $v { say "1: $v" }); $supply1.tap(-> $v { say "2: $v" }); $supply1.tap(-> $v { say "3: $v" }); my $supply2 = $supplier.Supply; $supply2.tap(-> $v { say "S2: $v"}); $supplier.emit(42);
camelia 1: 42
2: 42
3: 42
S2: 42
Xliff Oh wow! I am... nonplussed.
araraloren I don't think so :) 03:43
Xliff m: my $supplier = Supplier.new; my $supply1 = $supplier.Supply; $supply1.tap(-> $v { say "1: $v" }); $supply1.tap(-> $v { say "2: $v" }); $supply2.tap(-> $v { say "S2: $v"}); $supply1.tap(-> $v { say "3: $v" }); my $supply2 = $supplier.Supply; $supplier.emit(42);
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$supply2' is not declared. Did you mean any of these?
$supply1
&SUPPLY
Supply

at <tmp>:1
------> 3); $supply1.tap(-> $v { say "2: $v" }); 7⏏5$supply2.tap(-> $v { …
araraloren if they are in single thread, they should execute in order
Xliff m: my $supplier = Supplier.new; my $supply1 = $supplier.Supply; $supply1.tap(-> $v { say "1: $v" }); $supply1.tap(-> $v { say "2: $v" }); my $supply2 = $supplier.Supply; $supply2.tap(-> $v { say "S2: $v"}); $supply1.tap(-> $v { say "3: $v" }); $supplier.emit(42);
camelia 1: 42
2: 42
S2: 42
3: 42
Xliff Right. Fork and the order gets complex.
araraloren hmm 03:44
okay, thanks
I want to learn the react in Perl 6
Xliff Me to. 03:47
03:50 mcmillhj joined 03:55 mcmillhj left 04:03 aborazmeh joined, aborazmeh left, aborazmeh joined 04:04 Xliff left 04:17 mcmillhj joined 04:22 imcsk8_ left, mcmillhj left 04:28 skids left 04:29 MilkmanDan left 04:30 imcsk8 joined 04:31 aborazmeh left 04:33 mcmillhj joined 04:34 MilkmanDan joined 04:37 mcmillhj left 04:44 spycrab0 left 04:46 x[LGWs4x4i]uG2N0 left 04:49 x[LGWs4x4i]uG2N0 joined 04:56 wamba joined 04:59 mcmillhj joined 05:04 mcmillhj left
benjikun Hmm.. getting an error with installing zef that I've never gotten before 05:07
`Unhandled exception: failed to load library 'dynext/libperl6_ops_moar.so'
at <unknown>:1 (/home/perl6/.rakudo/perl6.moarvm:<dependencies+deserialize>)
`
05:10 jameslenz joined 05:12 mcmillhj joined 05:13 Zoffix joined
Zoffix benjikun: how did you install your perl6? 05:13
yoleaux 13 Jul 2018 21:49Z <samcv> Zoffix: I replied to that. thanks for the heads up
benjikun Zoffix: cloning the rakudo/rakudo repo directly and going from there
I'm redoing it now, will see if it works with rakudostar instead 05:14
Zoffix benjikun: what steps did you use to build?
geekosaur you need to update, possibly; recently some extops were removed
Zoffix sounds like you missed nqp rebuild or forgot to run perl6 Configure.pl
*perl
05:14 jameslenz left
benjikun Nah I ran `perl Configure.pl --backend=moar --gen-nqp --gen-moar` 05:14
Like normal 05:15
geekosaur hm. bootstrap nqp might need to be regenerated? 05:16
05:16 mcmillhj left
Zoffix never had any issues with this updater script: github.com/zoffixznet/r#linux 05:17
benjikun btw Zoffix, the guy I'm working with on that financial API thingy had some moarvm level error earlier: pastebin.com/Y8p6XfJ0 05:18
Invalid pointer
I believe it happened because he was using the windows subsystem for linux thing 05:19
Zoffix benjikun: are you checking out a release tag or are you building HEAD?
benjikun Zoffix: I built HEAD that time
Zoffix benjikun: could be that's why. There's a bunch of issues on HEAD ATM, e.g. R#2047 05:20
synopsebot R#2047 [open]: github.com/rakudo/rakudo/issues/2047 [⚠ blocker ⚠] [WIP] Rescalar merge & other toaster-related stuff
benjikun Ah, I see
Zoffix benjikun: you should build a release. The github.com/zoffixznet/r#linux script checks out a latest release on update
benjikun Yeah, I'm just doing it from the latest rakudostar release now
Zoffix huggable: star
huggable Zoffix, Estimated Rakudo Star releases: .01, .04, .07 & .10
benjikun We should put a warning not to use rakudobrew anymore on Zef's readme github.com/ugexe/zef 05:21
Zoffix likely get a slightly more performant compiler if you build 2018.06 compiler release instead.
Submit a PR :)
benjikun why does rakudostar still come with LWP::Simple 05:22
Zoffix What do you mean? Why shouldn't it?
benjikun didn't we stop using LWP::Simple for some reason
or stop recommending it
Zoffix doesn't remember anything of the sort. 05:23
benjikun hmm, maybe I'm just remembering nonsense lmao
Geth marketing: 2c155714b0 | (Zoffix Znet)++ | 9 files
Add "Futureproof Perl 6" flyer / ID 1531540189
05:27
05:29 molaf left
benjikun Zoffix: I just reinstalled everything using the 2018.06 release and I'm still getting the weird `failed to load library 'dynext/libperl6_ops_moar.so'` 05:31
Zoffix benjikun: did you say this was on Windows? 05:32
Can you check if you have any moar.exe processess running? It happens to me sometimes where an active process would silently interfer with rebuild 05:33
benjikun Nah, this is on debian 05:34
Zoffix benjikun: what's the full output of the reinstall session? Do you still have it? 05:35
05:35 wamba left
benjikun Zoffix: gist.github.com/ijneb/a44aac1f4803...26e61c3a57 05:36
05:37 mcmillhj joined
Zoffix benjikun: and the `load library` error comes only from zef? What about just `perl6 -e 'print 42'` ? 05:40
benjikun Running `perl6` by itself gives the same thing
Zoffix benjikun: what does `which perl6` give? 05:41
benjikun UNLESS I'm in the directory in which it is installed
oh what the heck
geekosaur you have an old perl6 somewhere
benjikun which perl6 gives `/home/perl6/.rakudo//perl6`
lol
not a typo
Zoffix it should point to /home/perl6/.rakudo/install/bin/perl6
Then I think the error will go away
benjikun I have the path set to include that too 05:42
05:42 mcmillhj left
Zoffix My only paths for Perl 6 are $HOME/rakudo/install/bin:$HOME/rakudo/install/share/perl6/site/bin 05:42
And I have rakduo installed in ~/rakudo 05:43
geekosaur check for an alias?
which could indeed include a doubled slash
benjikun weird, I logged out and logged back in and it went away 05:44
geekosaur hash -r
...right. tracked alias.
Zoffix benjikun: and the load library error gone too? 05:45
benjikun Zoffix: yep
Zoffix sweet
05:46 Zoffix left 05:52 mcmillhj joined 05:57 mcmillhj left 06:00 MasterDuke left 06:05 mcmillhj joined 06:09 mcmillhj left 06:25 robertle joined 06:26 noganex_ joined 06:28 mcmillhj joined
AlexDaniel zostay: hello :) Any news about ArrayHash ? :) 06:28
06:29 noganex left 06:33 mcmillhj left 06:34 ydlr left 06:38 konsolebox left 06:41 konsolebox joined 06:46 troys left 06:48 mcmillhj joined 06:52 mcmillhj left
Geth whateverable: 5937958248 | (Aleks-Daniel Jakimenko-Aleksejev)++ | lib/Whateverable.pm6
Tweak the score a little bit for .t files

Otherwise in the presence of .p6 file and a .t file with a shebang both will have the same score (and I want to call a .t file from .p6).
06:54
06:55 committable6 left, bisectable6 left, committable6 joined, ChanServ sets mode: +v committable6 06:56 bisectable6 joined, evalable6 joined, ChanServ sets mode: +v evalable6 07:04 rindolf joined 07:10 jameslenz joined 07:13 lizmat joined 07:14 jameslenz left 07:19 lizmat left 07:22 mcmillhj joined 07:23 lizmat joined 07:27 mcmillhj left 07:28 ufobat_ joined 07:35 lizmat left 07:37 jmaslak_ joined 07:41 jmaslak left 07:42 mcmillhj joined 07:46 mcmillhj left 07:56 xinming_ joined 07:58 lizmat joined, sena_kun joined 07:59 xinming left 08:01 spycrab0 joined 08:12 mcmillhj joined 08:16 mcmillhj left 08:28 mcmillhj joined 08:32 mcmillhj left 08:46 mcmillhj joined 08:47 kerframil left 08:50 mcmillhj left 09:04 llfourn left 09:07 llfourn joined 09:10 jameslenz joined 09:14 jameslenz left
Woodi hi today :) 09:18
can I precompile some simple script so it would run faster ? 09:19
longer version: I have script that parses ~30 lines with grammar then sums and prints results. it takes 0.640s hot. but p5 version runs in 0.130s cold and 0.035s hot. --stagestats shows 0.400s is eaten by parse... 09:22
is it script parsing or GRAMMAR.parse time ? 09:23
64-bit debian so it is 19 x perl5. 32-bit is ~22x since few years... 09:24
AlexDaniel I don't know if it's going to help noticeably, but you can move some stuff into a module 09:26
Woodi but it's just 60 lines... arg parsing, printing :) but for benchmarking it's a good idea 09:29
Ulti startup time of just the runtime is like 0.25s to 0.3s for me if you care that much might be easier to just make your program like a service so you arent paying that all the time 09:32
09:35 woolfy joined
Woodi moving grammar to module makes 0.580s 09:38
Ulti: I mainly care for traditional *nix like usage :)
09:38 woolfy left
AlexDaniel Woodi: so what else is taking time? Maybe there's a way to optimize your program? 09:39
sure the startup time is a big chunk, but that still leaves ≈300ms of something
Woodi that quite possible :) it's just naive use of grammar and for-each on the result. so possibly not good programming. but on the other hand pretty good, IMO, newcomer-like test case... 09:41
lizmat Woodi: atm, putting the logic into a module is your best bet 09:42
perhaps creating a module with a MAIN sub in it, and just running the module might work ? 09:43
(a MAIN sub that doesn't get exported BTW)
Woodi lizmat: that's a head scratch, a bit :) from total newcomer to v6 point of view. slicing small script and putting grammar and for loop into a module is WOOT at least :) 09:47
but i realy wanted to learn all that MAIN programming, thanx :) 09:48
lizmat for instance: module Foo { } 09:49
my sub MAIN(|c) { dd c }
evalable6 \()
lizmat if you put that into a Foo.pm6 file
Woodi checking...
lizmat you can either run that as a script (it will run the sub MAIN)
or you can just load it as a module with "use Foo" and MAIN won't get executed 09:50
09:50 ufobat_ left 10:04 |oLa| joined 10:14 eliasr joined 10:32 markoong joined
Woodi ok, can't make it working atm, will try again later 10:57
10:57 mst left, mst joined
Woodi Ulti: but emacs-like service have some addiction in it :) 10:57
btw. fastest start up is a killer app ;) 11:04
11:10 jameslenz joined 11:15 jameslenz left 11:29 sarna_ joined 11:33 sarna_ is now known as sarna 11:35 pecastro joined
tbrowder_ lizmat: g’day 11:51
lizmat tbrowder_ o/
tbrowder_ lizmat: is there any way to see older p6 weeklies? 11:52
when i look at the latest i see a menu item that seems to go to older ones but public access is blocked 11:53
moritz tbrowder_: the frontpage of p6weekly.wordpress.com is infintely scrolling
11:53 MasterDuke joined
moritz there's also p6weekly.wordpress.com/page/21/ with page numbers from 1 to 25 11:54
or if you are interested in a particular month, something like p6weekly.wordpress.com/2018/06/ works
tbrowder_ moritz: thnx 11:55
if that’s not on perl6.org it needs to be 11:56
11:57 User_ joined
moritz or you can just, like, google for older issues :-) 11:59
12:01 User_ left 12:02 User_ joined 12:03 User_ left 12:10 ufobat_ joined
tbrowder_ true 12:42
12:42 pmurias joined 12:45 mprelude joined, mprelude left 13:10 jameslenz joined 13:15 jameslenz left 13:33 benjikun2 joined 13:35 benjikun left 13:43 mprelude joined, mprelude left 13:46 skids joined 13:54 felher joined 14:06 wamba joined
sarna o/ 14:08
timotimo o/
sarna I'm sorry I wasn't there for the squashaton :( 14:09
timotimo there'll be another :) 14:10
sarna I've been busy with trying to get a job
I still don't have one, but the only thing I can do now is wait for potential employers to respond, so.. :)
is it the first weekend of the month?
timotimo squashable6: status 14:11
squashable6 timotimo, Next SQUASHathon in 19 days and ≈19 hours (2018-08-04 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
sarna unbitrot? 14:12
AlexDaniel also I'd appreciate help for organizing it
sarna: the idea is that many modules in the ecosystem don't pass their tests
so are essentially broken
sarna of the whole ecosystem? hoo boy, gonna be fun
14:13 MasterDuke left, obfusk left
AlexDaniel some of them are very old, some were “broken” by fixes in rakudo over time 14:13
sarna AlexDaniel: I see
AlexDaniel so we need a list of all failing modules, and then some way to distribute the work to for going through them
honestly there's no plan yet, as I'm usually working on release-squashathon-release-squashathon clock 14:14
releasable6: status
releasable6 AlexDaniel, Next release in ≈7 days and ≈4 hours. 10 blockers. 0 out of 180 commits logged
AlexDaniel, Details: gist.github.com/7415494f707bacc310...1212686637 14:15
AlexDaniel so I'd be looking at it in around two weeks
if anybody else can organize it I'd be grateful
14:16 MasterDuke joined
sarna don't look at me, I wouldn't trust myself with important things 14:17
AlexDaniel well, you can definitely do much better than me :)
as long as you have time and interest of course 14:18
sarna well, I could try 14:19
but only if you promise I won't get extradited from #perl6 if I screw up
AlexDaniel well, I'd be around anyway to assist :) 14:21
with squashable6 bot and other things if needed
although squashable6 is perhaps of no help in this case, as we can't track all of the modules in the ecosystem
sarna alrighty then, what shall I do 👀 14:22
timotimo why not? :P
oh, we don't have control to put the hooks everywhere
AlexDaniel yeah
timotimo do we want a perl6communitymodulable btw?
forks a module to the perl6 community account and changes ecosystem's meta.list to point to the new one? 14:23
and back, once the original maintainer of a module returns
just add it to the ~5000 open issues whateverable has :')
sarna it only has 230 open issues :^) 14:25
it's such a nice number though 14:26
AlexDaniel github.com/perl6/whateverable/issues/337 14:27
14:27 sarna left 14:28 sarna joined
Kaypie what is the null multi_declarator in Perl6::Grammar meant to be used for? it's there, but it can't be used without slangs because term:sym<multi_declarator> only expects proto, multi, and only to be able to be used 14:28
14:29 sarna_ joined
moritz Kaypie: looks like dead code to me 14:36
ah no
timotimo is it what makes "multi foo" instead of "multi sub foo" work?
AlexDaniel sarna_: so we need a list of things to do, and some way of tracking the progress… I don't know really, maybe we can/should modify squashable6?
sarna_: for example maybe there should be a command like “gimme the list!!” 14:37
sarna_: and it gives you a list of modules to look at
sarna AlexDaniel: gimme the list of things to do or modules in the ecosystem?
oh
AlexDaniel yeah
moritz Kaypie: it's probably for "sub foo" instead of "multi sub foo"
AlexDaniel well can be both :)
moritz it says sym<null>, but doesn't actually match the string 'null' 14:38
AlexDaniel and then we can have a command like for saying “item X is done, comment: … … … …”
or module X is done
and it'll write down who did it and their comment
sarna sounds rad
AlexDaniel we can also have “give 10 things” or something like that, and it'd try not to give same tasks twice 14:39
moritz irc frontend for a kanban board? :-)
AlexDaniel so that we don't have multiple contributors working on the same thing 14:40
moritz: actually… yea? yeah…
I mean, if that is available somewhere, we don't need a bot, I'd say
can we do something like this on github?
like prepopulate a “Project” with a list of modules, and then anyone can drag them around and stuff like that
moritz help.github.com/articles/about-project-boards/ 14:41
there's also trello, not integrated with git/github
AlexDaniel so we can maybe have TODO | PR submitted | Fixed 14:42
or something like that?
moritz I haven't followed most of the conversation; sorry if my comments are off/useless
sarna those github project boards look the most promising imo
El_Che we're talking about kanban
so most of it is just out-my-ass talk 14:43
(what I see at work)
sarna and I have a question!
I'll ask it before I forget
m: loop (my UInt $i = 2; $i >= 0; $i--) {say $i;}
camelia 2
Type check failed in assignment to $i; expected UInt but got Int (-1)
in block <unit> at <tmp> line 1

1
0
sarna oh! why didn't it run? on my machine it throws an error on runtime
timotimo that is a runtime error :) 14:44
sarna well, there was an output
yeah
I skimmed over it
timotimo stderr and stdout get kind of jumbled up
sarna can I somehow check it at compile time?
AlexDaniel moritz: it's very on point, and we are brainstorming :)
sarna I mean something like "hey your loop is while(true) and you probably don't want that" 14:45
moritz AlexDaniel: :-)
timotimo very difficult, as $i could be modified inside the loop body
El_Che that would be a terrible loop :) 14:46
sarna I wondered if we could check that because clang gave me a warning when I tried to do that on accident 14:47
I'll try to modify i from inside the body and see what happens
timotimo C is a lot more rigid :)
14:48 Aukai joined 14:49 Aukai left, Aukai joined
sarna oh! 14:50
well, look at the type, I mean
i is UInt, and can't ever be < 0
timotimo problem is, we define UInt as a subset of Int "where * >= 0", which is code 14:51
if we don't have a way to tell rakudo that this corresponds to a range, it won't be able to know
sarna oh :(
timotimo in your code i'd use Int instead of UInt; you're not going to reassign $i inside the block, are you? :P 14:52
also, i'd probably use a ... operator and for loop, though if your code is performance-critical, the loop you have wins against that
sarna it's just a toy example to illustrate what I meant :D 14:53
timotimo right
14:54 Aukai left
sarna still, that runtime exception is much better than getting UBd into oblivion 14:55
timotimo UB?
oh, undefined behaviour 14:56
sarna yep
nasal demons :)
> Organization-wide project boards can contain issues and pull requests from any repository that belongs to an organization 14:58
does every module in the ecosystem belong to the perl6 organization? 14:59
El_Che o 15:05
no
15:11 jameslenz joined 15:15 jameslenz left 15:24 benjikun joined 15:25 benjikun2 left 15:31 thowe joined 15:35 sarna left, sarna_ is now known as sarna 15:36 MilkmanDan left 15:37 MilkmanDan joined 15:39 fake_space_whale joined 15:58 uzl joined 16:03 obfusk joined
uzl I created a pdf version of the Perl cheat sheet. The second page is about quoting constructs, though I am not sure if the simplified examples get their point across. 16:05
This is the pdf: docdro.id/9JLV6Lq
Any feedback would be welcome!
MasterDuke uzl: the resources section should probably have perl6.org in addition to (or instead of) perl.org 16:13
16:13 uzl left 16:14 uzl joined 16:15 uzl left
Juerd Ooh, that's nice. I once created the Perl cheatsheet, Damian created the Perl 6 version of it. I'm glad to see it's still being kept up-to-date! 16:16
perlmonks.org/?node_id=238031 # 15 years ago!
p6noob is Q really the minimalistic string quoting? Would just naked single quotes get that title. 16:18
16:18 uzl joined
timotimo p6noob: naked single quotes still have limited backslashing in them i think? 16:18
p6noob yeah, there are differences, depends what is being conveyed in that cheatsheet, just seemed a bit weird to me as a starting recommendation. 16:19
16:19 domidumont joined
uzl MasterDuke: Oh, I missed that. Will take care of it. 16:19
According to the doc, Q() is interpreted as a function call. How is Q'' interpreted? And why does Q"" work? 16:21
timotimo Q"" works because what comes after Q is interpreted as a quote
m: say Qtpiet 16:22
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
Qtpiet used at line 1
timotimo ok, so no letters allowed
m: say Q'foo'
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3say Q'foo7⏏5'
expecting any of:
infix
infix stopper
postfix
statement end
statement modifier
timotimo that's also fair, though i imagine surprising to a newbie
16:22 ExtraCrispy left
uzl Juerd: That's sort of a long history. ;) 16:23
16:25 domidumont left, faraco joined 16:26 araraloren left, domidumont joined
MasterDuke would it make sense to have a special error for Q' ? 16:26
uzl timotimo: Can you ELI5 that compilation error if possible? 16:27
geekosaur m my $x'y = 5; dd $x'y 16:28
er
m: my $x'y = 5; dd $x'y
camelia Int $x'y = 5
geekosaur primes are valid in names
timotimo yeah, but only inside names, just like dashes
geekosaur which makes Q'... look like a name instead of a quote 16:29
16:29 Xliff joined
Xliff \o 16:29
timotimo yup, and perl6 grammar has only one place where it backtracks, and that's inside string interpolation
so when it commits to interpreting it as an identifier, it sticks to that
Xliff Is there an easy way to force an enum into its proper NativeCall type?
Oh, and gist.github.com/Xliff/6b16cccd09ce...8745730042 16:30
timotimo well, you can leave the first three numbers out ...
m: our enum Test <hello 0 goodbye 1>; say hello.^mro 16:31
camelia ((Test) (Int) (Cool) (Any) (Mu))
timotimo you don't have to use => if you don't want to 16:32
Xliff Well, it's best to be explicit, sometimes.
^mro?
timotimo method resolution order 16:34
Xliff Ah! Thanks.
timotimo had to make sure if it's an int enum
Xliff m: our enum Test <hello 0 goodbye 1>; say hello.enums.gist.say
camelia Map.new((0 => 1, 1 => 3, goodbye => 2, hello => 0))
True
16:38 sarna left 16:39 zakharyas joined
faraco o/ 16:41
16:43 faraco left
Xliff timotimo: What do you think about checking the max value of the enum and converting it to either uint32 or uint64 automatically? 17:00
That way enums can just be... enums. 17:01
17:01 gabiruh left
timotimo but the difference comes only from how your nativecall sub's signature is set up? 17:01
17:03 gabiruh joined 17:05 zakharyas left 17:07 Ven`` joined 17:11 jameslenz joined 17:15 AlexDani` joined 17:16 jameslenz left 17:17 gabiruh left, uzl left, telex left
Xliff timotimo: True, but if the enums also come from the same project, doesn't that mean that it would still Just Work? 17:19
17:19 Ven`` left
timotimo i'm not sure how you mean? 17:20
oh, you mean you want to put the enum type in the function signature?
17:20 AlexDaniel left
Xliff Yes. 17:20
17:21 telex joined
timotimo d'oh 17:21
yeah, that makes sense
Xliff :)
timotimo but i'm not sure if autodetecting is a good idea
Xliff OK. I will wait until I get to a stopping point and (try) to look into NativeCall.
OK. Why not?
timotimo are there ABIs that say not to clear the higher bits when passing a smaller int? 17:22
Xliff Because it's not like we have a "is repr('CEnum')" yet.
I am assuming that if that ABI asks for an enum that contains a 64 bit integer, it will take a 64 bit integer.
timotimo yeah, but what if you don't care about some enum values and instead get a 32bit enum autodetected? 17:23
m: our int32 enum Test <hello 0 goodbye 1>
camelia 5===SORRY!5=== Error while compiling <tmp>
Cannot find method 'BUILDPLAN' on object of type Perl6::Metamodel::NativeHOW
at <tmp>:1
Xliff Why would you not care about some enum values?
timotimo m: our enum Test is int32 <hello 0 goodbye 1>
camelia 5===SORRY!5=== Error while compiling <tmp>
int32 does not support inheritance, so Test cannot inherit from it
at <tmp>:1
timotimo hm.
Xliff Now THAT would be fine. 17:24
timotimo it's bound to happen some day
Xliff Yes, but meanwhile I have code that I was hoping (foolish me) would just take the enum type and call it a day.
timotimo seems like we can't have that 17:25
maybe special-case enums in nativecall and give EnumHOW some storage for a native int type
17:32 skids left
Xliff :( 17:33
OK. Well... I am doing it the "proper" way. 17:34
m: our enum Test is int32 <hello 0 goodbye 1>; my Test $t = 2; $t.gist.say
camelia 5===SORRY!5=== Error while compiling <tmp>
int32 does not support inheritance, so Test cannot inherit from it
at <tmp>:1
Xliff m: our enum Test <hello 0 goodbye 1>; my Test $t = 2; $t.gist.say
camelia Type check failed in assignment to $t; expected Test but got Int (2)
in block <unit> at <tmp> line 1
Xliff m: our enum Test <hello 0 goodbye 1>; my Test $t = Test(2); $t.gist.say 17:35
camelia goodbye
Xliff So yeah... that will be.... interesting.
timotimo hm, +| and +& on an enum type don't give you an instance of the enum back (or an error if it can't be done)
coercion types also won't do i'm afraid 17:36
17:41 gabiruh joined
Xliff OK. Moving on. I am getting this error: Calling g_signal_connect_object() will never work with declared signature (NativeCall::Types::Pointer $app, Str $name, NativeCall::Types::Pointer $handler, NativeCall::Types::Pointer $data, uint32 $connect_flags --> uint64) 17:49
fake_space_whale Does while assign $_ to the result conditional statement?
Xliff When trying to match against this signature: gulong g_signal_connect_object (gpointer instance, const gchar *detailed_signal, GCallback c_handler, gpointer gobject, GConnectFlags connect_flags); 17:50
No, it shouldn'
fake_space_whale: No. I don't think so.
fake_space_whale ah okay
Xliff docs.perl6.org/language/control#while,_until
fake_space_whale Thank you, it appears that while $_ = EXPRESSION {} is what I wanted 17:53
17:54 sarna joined
sarna hey, do you think we should add perl6 to websites like devdocs.io / zealdocs.org ? 17:55
or ask for it to be added at least
those sites do have perl, that's Perl5 though
seems like we should have to create it ourselves and contribute it to Dash kapeli.com/docsets 18:00
s/should/would
sena_kun sarna, personally, I think we should, but it depends on people willing to contribute. 18:09
sarna sena_kun: I'll look into it tomorrow or so 18:10
sena_kun And not only willing, but actually having time and enough, hmm, "power" to do so. 18:11
sarna, that'd be awesome. Generally, any improvements in code, docs, user experience, promotion/advertising are welcome, I'd say. :) 18:12
sarna sena_kun: yeah, I wish more people knew we exist :( 18:13
sena_kun I wish for a better world, where everything is nicer. And maybe a better internet connection here too. 18:15
18:17 zakharyas joined 18:26 salasrod joined
Woodi 18:43
masak .oO( you can Ctrl+Q anytime you like, but you can never leave... ) 18:46
yoleaux 13 Jul 2018 20:56Z <lizmat> masak: do you think .hash should always return a .Hash , or can it also return an immutable Map ?
masak lizmat: that's a deep question :)
lizmat: I confess to being generally bewildered when it comes to what Perl 6 convenience methods like that should do. like, what's *really* the difference between .Bool and .so? between .gist and .Str? between .list and .Array? 18:47
I don't know. if there is a general rule, I'm not aware of it :/
18:47 pmurias left
El_Che
.oO(or it may point to convenience method inflation)
18:52
18:52 domidumont left
TimToady well, in the case of "so" vs "Bool", that's just English vs Computerese :) 18:54
and it also lets you shadow 'method so' without shadowing the basic conversion
but for everyday programming, we tend to prefer things like given/when over things like switch/case 18:56
so is more like the former, while Bool is more like the latter
"I have a Boolean here" is a rather indirect way to ask whether it's true or not 18:57
s/have/want/
El_Che "I have a Boolean here" 18:58
"so?"
TimToady ?
El_Che we're really teenagers
:)
TimToady it's 2018, which is a teen year 18:59
El_Che :)
geekosaur teeny Bools? 19:03
TimToady bitsy
19:04 Zoffix joined, zakharyas left 19:05 Zoffix left, zakharyas joined 19:08 zakharyas1 joined 19:09 zakharyas left 19:11 jameslenz joined 19:16 jameslenz left 19:26 zakharyas1 left 19:29 tokomer left 19:38 thowe left
Woodi p6: package P; sub s { say 'P::s'; }; package main; P::s 20:00
camelia 5===SORRY!5=== Error while compiling <tmp>
This appears to be Perl 5 code. If you intended it to be Perl 6 code, please use a Perl 6 style declaration like "unit package Foo;" or "unit module Foo;", or use the block form instead of the semicolon…
Woodi adding 'unit' x 2 not work... 20:01
also putting packages into { } braces... 20:03
fake_space_whale complements to the devs of the Rakudo for giving good error messages 20:05
geekosaur p6: package P { our sub s { say 'P::s' } }; P::s 20:10
camelia P::s
geekosaur it's a "my" sub by default, so can't be invoked with a namespace
it either has to be exported and subsequently imported, or has to be declared "our"
20:11 MasterDuke_ joined 20:12 MasterDuke left
Woodi oo, thank you geekosaur ! 20:12
20:12 kerframil joined 20:13 MasterDuke_ is now known as MasterDuke 20:19 gabiruh left 20:22 haxmeist1r is now known as haxmeister
haxmeister hey Larry Wall didn't quit did he? 20:23
TimToady doesn't think so 20:24
timotimo who told you that?
haxmeister nobody.. it was a cheap shot at Guido..lol 20:28
20:36 AlexDani` is now known as AlexDaniel 20:41 gabiruh joined
DrForr o/ 20:46
haxmeister o/ 20:47
DrForr #include <macarena.h>
What does $*VM.osname return for OS X? 20:48
20:50 MasterDuke left
lizmat DrForr: darwin 20:51
DrForr Thanks.
20:52 MasterDuke joined 20:54 benjikun2 joined
TimToady m: say $*KERNEL.name 20:54
camelia linux
20:56 veesh joined
veesh hi all 20:56
is there a ubuntu ppa for installing perl6? 20:57
MasterDuke huggable: debs
huggable MasterDuke, CentOS, Debian, Fedora and Ubuntu Rakudo packages: github.com/nxadm/rakudo-pkg/releases
MasterDuke veesh: ^^^
20:58 benjikun left, AlexDaniel left, AlexDaniel joined
veesh many thanks 20:59
is there a wasm backend in the works for perl6? 21:00
DrForr Also while people are around, LibraryCheck::library-check() seems to throw 'Cannot invoke this object (REPR: Null; VMNull)' while running inside a function called from 'is native(...)' - it's the reason I'm searching along explicit paths rather than just calling library-check(). 21:01
El_Che veesh: not that I know of
veesh why not? would it be too big?
DrForr No volunteers, I'd guess. 21:02
El_Che because noone has had the itch
veesh i'm dying to use perl in the browser
MasterDuke veesh: pmurias is working on a JS backend for rakudo
DrForr perlito compiles p5 to JS, and there's a JS backend in the works. 21:03
MasterDuke and a graalvm/truffle backend also
El_Che MasterDuke: I thought it was node based
TimToady he was mentioning possilby targeting wasm after that, but at the moment he's playing with truffle
veesh the js is node based now
apparently moving to browser based as longint support is added to modern browsers
something like that
MasterDuke El_Che: that sounds right
21:12 jameslenz joined, veesh left 21:16 jameslenz left 21:21 woolfy joined, woolfy left 21:25 mspo left 21:27 benjikun2 left 21:29 lizmat left 21:32 lizmat joined, wamba left 21:37 epony left 21:51 gabiruh left 21:52 epony joined 22:01 robertle left 22:22 benjikun joined 22:23 lpp joined 22:24 lpp left 22:26 stmuk_ joined 22:27 fake_space_whale left 22:28 stmuk left 22:29 gabiruh joined 22:34 sarna left, gabiruh left 22:37 Some-body_ joined, DarthGandalf left 22:38 Some-body_ is now known as DarthGandalf 22:43 gabiruh joined 22:46 jmaslak_ left 22:53 ufobat_ left 23:00 sena_kun left 23:10 salasrod left 23:12 jameslenz joined 23:24 jameslenz left 23:43 pecastro left