IRCloggy #perl6 2018-07-14

Logs Search ←Prev date Next date→ Channels Documentation

Provider of IRC logs since 2005.
WARNING: As Freenode became unjoinable and lost all warnings in topics, we cannot log channels on Freenode anymore.

2018-07-14

mcmillhj joined00:01
mcmillhj left00:06
konsolebox joined00:09
mcmillhj joined00:17
mcmillhj left00:21
Geth ¦ doc: 42817318db | (JJ Merelo)++ | doc/Language/glossary.pod600:22
¦ doc: Changes link as indicated, closes #2170 00:22
¦ doc:00:22
¦ doc: Also reflows, puts anchors above titles, and rewrites the pull request entry (decapitalizing second word)00:22
¦ doc: review: https://github.com/perl6/doc/commit/42817318db00:22
synopsebot Link: https://doc.perl6.org/language/glossary00:22
fake_space_whale joined00:43
mcmillhj joined00:43
mcmillhj left00:48
mcmillhj joined00:55
benjikun2benjikun00:57
mcmillhj left01:00
aborazmeh joined01:07
aborazmeh left01:07
aborazmeh joined01:07
molaf left01:07
jameslenz joined01:09
jameslenz left01:14
molaf joined01:20
kerframil joined01:23
mcmillhj joined01:32
markoong left01:33
sftp joined01:34
mcmillhj left01:37
mcmillhj joined01:50
mcmillhj left01:55
timotimo left02:00
timotimo joined02:07
cono joined02:08
fake_space_whale left02:14
aborazmeh left02:16
Zoffix joined02:18
Zoffix left02:18
mcmillhj joined02:20
mcmillhj left02:24
mcmillhj joined02:33
mcmillhj left02:38
Geth ¦ marketing: 087bc1b183 | (Zoffix Znet)++ | 8 files02:39
¦ marketing: Add some purchased stock 02:39
¦ marketing:02:39
¦ marketing: - Diwali illustrations and humans with computers02:39
¦ marketing: - DepositPhotos standard license applies:02:39
¦ marketing: https://depositphotos.com/content-license.html02:39
¦ marketing: review: https://github.com/perl6/marketing/commit/087bc1b18302:39
tokomer joined02:58
jameslenz joined03:09
mcmillhj joined03:11
jameslenz left03:14
mcmillhj left03:15
Xliff joined03:20
Xliff \o03:20
I know it's late, but...03:21
https://gist.github.com/Xliff/6b16cccd09cee13d543bed874573004203:21
mcmillhj joined03:26
araraloren joined03:30
mcmillhj left03:31
araraloren Hi03: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 rakudo-moar 762982046: OUTPUT: «1: 42␤2: 42␤»03:39
Xliff ^^ araraloren03:39
So, in order of the taps made on the supply.03:40
araraloren Xliff Can I write code reply on that order ?03:40
Xliff If you are doing this in a multithreaded manner, that order will be hard to define.03:40
araraloren oh, just in single thread03:40
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, Xliff03:41
thanks03:41
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);03:41
camelia rakudo-moar 762982046: OUTPUT: «1: 42␤2: 42␤3: 42␤»03:41
Xliff Now if you get another sypply from the supplier, they should execute at the same time.03:41
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);03:42
camelia rakudo-moar 762982046: OUTPUT: «1: 42␤2: 42␤3: 42␤S2: 42␤»03:42
Xliff Oh wow! I am... nonplussed.03:42
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);03:43
camelia rakudo-moar 762982046: OUTPUT: «=== SORRY!=== Error while compiling <tmp>␤Variable '$supply2' is not declared. Did you mean any of these?␤ $supply1␤ &SUPPLY␤ Supply␤␤at <tmp>:1␤------> ); $supply1.tap(-> $v { say "2: $v" }); $supply2.tap(-> $v { …» 03:43
araraloren if they are in single thread, they should execute in order03:43
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);03:43
camelia rakudo-moar 762982046: OUTPUT: «1: 42␤2: 42␤S2: 42␤3: 42␤»03:43
Xliff Right. Fork and the order gets complex.03:43
araraloren hmm03:44
okay, thanks03:44
I want to learn the react in Perl 603:44
Xliff Me to.03:47
mcmillhj joined03:50
mcmillhj left03:55
aborazmeh joined04:03
aborazmeh left04:03
aborazmeh joined04:03
Xliff left04:04
mcmillhj joined04:17
imcsk8_ left04:22
mcmillhj left04:22
skids left04:28
MilkmanDan left04:29
imcsk8 joined04:30
aborazmeh left04:31
mcmillhj joined04:33
MilkmanDan joined04:34
mcmillhj left04:37
spycrab0 left04:44
x[LGWs4x4i]uG2N0 left04:46
x[LGWs4x4i]uG2N0 joined04:49
wamba joined04:56
mcmillhj joined04:59
mcmillhj left05:04
benjikun Hmm.. getting an error with installing zef that I've never gotten before05:07
`Unhandled exception: failed to load library 'dynext/libperl6_ops_moar.so'05:07
at <unknown>:1 (/home/perl6/.rakudo/perl6.moarvm:<dependencies+deserialize>)05:07
`05:07
jameslenz joined05:10
mcmillhj joined05:12
Zoffix joined05:13
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 up05:13
benjikun Zoffix: cloning the rakudo/rakudo repo directly and going from there05:13
I'm redoing it now, will see if it works with rakudostar instead05:14
Zoffix benjikun: what steps did you use to build?05:14
geekosaur you need to update, possibly; recently some extops were removed05:14
Zoffix sounds like you missed nqp rebuild or forgot to run perl6 Configure.pl05:14
*perl05:14
jameslenz left05:14
benjikun Nah I ran `perl Configure.pl --backend=moar --gen-nqp --gen-moar`05:14
Like normal05:15
geekosaur hm. bootstrap nqp might need to be regenerated?05:16
mcmillhj left05:16
Zoffix never had any issues with this updater script: https://github.com/zoffixznet/r#linux05:17
benjikun btw Zoffix, the guy I'm working with on that financial API thingy had some moarvm level error earlier: https://pastebin.com/Y8p6XfJ005:18
Invalid pointer05:18
I believe it happened because he was using the windows subsystem for linux thing05:19
Zoffix benjikun: are you checking out a release tag or are you building HEAD?05:19
benjikun Zoffix: I built HEAD that time05:19
Zoffix benjikun: could be that's why. There's a bunch of issues on HEAD ATM, e.g. R#204705:20
synopsebot R#2047 [open] : https://github.com/rakudo/rakudo/issues/2047 [⚠ blocker ⚠] [WIP] Rescalar merge & other toaster-related stuff 05:20
benjikun Ah, I see05:20
Zoffix benjikun: you should build a release. The https://github.com/zoffixznet/r#linux script checks out a latest release on update05:20
benjikun Yeah, I'm just doing it from the latest rakudostar release now05:20
Zoffix huggable: star05:20
huggable Zoffix, Estimated Rakudo Star releases: .01, .04, .07 & .1005:20
benjikun We should put a warning not to use rakudobrew anymore on Zef's readme https://github.com/ugexe/zef05:21
Zoffix likely get a slightly more performant compiler if you build 2018.06 compiler release instead.05:21
Submit a PR :)05:21
benjikun why does rakudostar still come with LWP::Simple05:22
Zoffix What do you mean? Why shouldn't it?05:22
benjikun didn't we stop using LWP::Simple for some reason05:22
or stop recommending it05:22
Zoffix doesn't remember anything of the sort.05:23
benjikun hmm, maybe I'm just remembering nonsense lmao05:23
Geth ¦ marketing: 2c155714b0 | (Zoffix Znet)++ | 9 files05:27
¦ marketing: Add "Futureproof Perl 6" flyer / ID 1531540189 05:27
¦ marketing: review: https://github.com/perl6/marketing/commit/2c155714b005:27
molaf left05:29
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 rebuild05:33
benjikun Nah, this is on debian05:34
Zoffix benjikun: what's the full output of the reinstall session? Do you still have it?05:35
wamba left05:35
benjikun Zoffix: https://gist.github.com/ijneb/a44aac1f4803744aa680b326e61c3a5705:36
mcmillhj joined05:37
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 thing05:40
Zoffix benjikun: what does `which perl6` give?05:41
benjikun UNLESS I'm in the directory in which it is installed05:41
oh what the heck05:41
geekosaur you have an old perl6 somewhere05:41
benjikun which perl6 gives `/home/perl6/.rakudo//perl6`05:41
lol05:41
not a typo05:41
Zoffix it should point to /home/perl6/.rakudo/install/bin/perl605:41
Then I think the error will go away05:41
benjikun I have the path set to include that too05:42
mcmillhj left05:42
Zoffix My only paths for Perl 6 are $HOME/rakudo/install/bin:$HOME/rakudo/install/share/perl6/site/bin05:42
And I have rakduo installed in ~/rakudo05:43
geekosaur check for an alias?05:43
which could indeed include a doubled slash05:43
benjikun weird, I logged out and logged back in and it went away05:44
geekosaur hash -r05:44
...right. tracked alias.05:44
Zoffix benjikun: and the load library error gone too?05:45
benjikun Zoffix: yep05:45
Zoffix sweet05:45
Zoffix left05:46
mcmillhj joined05:52
mcmillhj left05:57
MasterDuke left06:00
mcmillhj joined06:05
mcmillhj left06:09
robertle joined06:25
noganex_ joined06:26
mcmillhj joined06:28
AlexDaniel zostay: hello :) Any news about ArrayHash ? :)06:28
noganex left06:29
mcmillhj left06:33
ydlr left06:34
konsolebox left06:38
konsolebox joined06:41
troys left06:46
mcmillhj joined06:48
mcmillhj left06:52
Geth ¦ whateverable: 5937958248 | (Aleks-Daniel Jakimenko-Aleksejev)++ | lib/Whateverable.pm606:54
¦ whateverable: Tweak the score a little bit for .t files 06:54
¦ whateverable:06:54
¦ whateverable: Otherwise in the presence of .p6 file and a .t file with a shebang06:54
¦ whateverable: both will have the same score (and I want to call a .t file from .p6).06:54
¦ whateverable: review: https://github.com/perl6/whateverable/commit/593795824806:54
committable6 left06:55
bisectable6 left06:55
committable6 joined06:55
ChanServ set mode: +v06:55
bisectable6 joined06:56
evalable6 joined06:56
ChanServ set mode: +v06:56
rindolf joined07:04
jameslenz joined07:10
lizmat joined07:13
jameslenz left07:14
lizmat left07:19
mcmillhj joined07:22
lizmat joined07:23
mcmillhj left07:27
ufobat_ joined07:28
lizmat left07:35
jmaslak_ joined07:37
jmaslak left07:41
mcmillhj joined07:42
mcmillhj left07:46
xinming_ joined07:56
lizmat joined07:58
sena_kun joined07:58
xinming left07:59
spycrab0 joined08:01
mcmillhj joined08:12
mcmillhj left08:16
mcmillhj joined08:28
mcmillhj left08:32
mcmillhj joined08:46
kerframil left08:47
mcmillhj left08:50
llfourn left09:04
llfourn joined09:07
jameslenz joined09:10
jameslenz left09:14
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 module09:26
Woodi but it's just 60 lines... arg parsing, printing :) but for benchmarking it's a good idea09: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 time09:32
woolfy joined09:35
Woodi moving grammar to module makes 0.580s09:38
Ulti: I mainly care for traditional *nix like usage :)09:38
woolfy left09:38
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 something09:39
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 bet09: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)09:43
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 }09:49
evalable6 lizmat, rakudo-moar c567af736: OUTPUT: «\()␤»09:49
lizmat if you put that into a Foo.pm6 file09:49
Woodi checking...09:49
lizmat you can either run that as a script (it will run the sub MAIN)09:49
or you can just load it as a module with "use Foo" and MAIN won't get executed09:50
ufobat_ left09:50
|oLa| joined10:04
eliasr joined10:14
markoong joined10:32
Woodi ok, can't make it working atm, will try again later10:57
mst left10:57
mst joined10:57
Woodi Ulti: but emacs-like service have some addiction in it :)10:57
btw. fastest start up is a killer app ;)11:04
jameslenz joined11:10
jameslenz left11:15
sarna_ joined11:29
sarna_sarna11:33
pecastro joined11:35
tbrowder_ lizmat: g’day11:51
lizmat tbrowder_ o/11:51
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 blocked11:53
moritz tbrowder_: the frontpage of https://p6weekly.wordpress.com is infintely scrolling11:53
MasterDuke joined11:53
moritz there's also https://p6weekly.wordpress.com/page/21/ with page numbers from 1 to 2511:54
or if you are interested in a particular month, something like https://p6weekly.wordpress.com/2018/06/ works11:54
tbrowder_ moritz: thnx11:55
if that’s not on perl6.org it needs to be11:56
User_ joined11:57
moritz or you can just, like, google for older issues :-)11:59
User_ left12:01
User_ joined12:02
User_ left12:03
ufobat_ joined12:10
tbrowder_ true12:42
pmurias joined12:42
mprelude joined12:45
mprelude left12:45
jameslenz joined13:10
jameslenz left13:15
benjikun2 joined13:33
benjikun left13:35
mprelude joined13:43
mprelude left13:43
skids joined13:46
felher joined13:54
wamba joined14:06
sarna o/14:08
timotimo o/14:08
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 job14:10
I still don't have one, but the only thing I can do now is wait for potential employers to respond, so.. :)14:10
is it the first weekend of the month?14:10
timotimo squashable6: status14:11
squashable6 timotimo, Next SQUASHathon in 19 days and ≈19 hours (2018-08-04 UTC-12⌁UTC+14). See https://github.com/rakudo/rakudo/wiki/Monthly-Bug-Squash-Day14:11
sarna unbitrot?14:12
AlexDaniel also I'd appreciate help for organizing it14:12
sarna: the idea is that many modules in the ecosystem don't pass their tests14:12
so are essentially broken14:12
sarna of the whole ecosystem? hoo boy, gonna be fun14:12
MasterDuke left14:13
obfusk left14:13
AlexDaniel some of them are very old, some were “broken” by fixes in rakudo over time14:13
sarna AlexDaniel: I see14:13
AlexDaniel so we need a list of all failing modules, and then some way to distribute the work to for going through them14:13
honestly there's no plan yet, as I'm usually working on release-squashathon-release-squashathon clock14:14
releasable6: status14:14
releasable6 AlexDaniel, Next release in ≈7 days and ≈4 hours. 10 blockers. 0 out of 180 commits logged14:14
AlexDaniel, Details: https://gist.github.com/7415494f707bacc31008b8121268663714:15
AlexDaniel so I'd be looking at it in around two weeks14:15
if anybody else can organize it I'd be grateful14:15
MasterDuke joined14:16
sarna don't look at me, I wouldn't trust myself with important things14:17
AlexDaniel well, you can definitely do much better than me :)14:17
as long as you have time and interest of course14:18
sarna well, I could try14:19
but only if you promise I won't get extradited from #perl6 if I screw up14:19
AlexDaniel well, I'd be around anyway to assist :)14:21
with squashable6 bot and other things if needed14:21
although squashable6 is perhaps of no help in this case, as we can't track all of the modules in the ecosystem14:21
sarna alrighty then, what shall I do 👀14:22
timotimo why not? :P14:22
oh, we don't have control to put the hooks everywhere14:22
AlexDaniel yeah14:22
timotimo do we want a perl6communitymodulable btw?14:22
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 returns14:23
just add it to the ~5000 open issues whateverable has :')14:23
sarna it only has 230 open issues :^)14:25
it's such a nice number though14:26
AlexDaniel https://github.com/perl6/whateverable/issues/33714:27
sarna left14:27
sarna joined14:28
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 used14:28
sarna_ joined14:29
moritz Kaypie: looks like dead code to me14:36
ah no14:36
timotimo is it what makes "multi foo" instead of "multi sub foo" work?14:36
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?14:36
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 at14:37
sarna AlexDaniel: gimme the list of things to do or modules in the ecosystem?14:37
oh14:37
AlexDaniel yeah14:37
moritz Kaypie: it's probably for "sub foo" instead of "multi sub foo"14:37
AlexDaniel well can be both :)14:37
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: … … … …”14:38
or module X is done14:38
and it'll write down who did it and their comment14:38
sarna sounds rad14:38
AlexDaniel we can also have “give 10 things” or something like that, and it'd try not to give same tasks twice14:39
moritz irc frontend for a kanban board? :-)14:39
AlexDaniel so that we don't have multiple contributors working on the same thing14:40
moritz: actually… yea? yeah…14:40
I mean, if that is available somewhere, we don't need a bot, I'd say14:40
can we do something like this on github?14:40
like prepopulate a “Project” with a list of modules, and then anyone can drag them around and stuff like that14:40
moritz https://help.github.com/articles/about-project-boards/14:41
there's also trello, not integrated with git/github14:41
AlexDaniel so we can maybe have TODO | PR submitted | Fixed14:42
or something like that?14:42
moritz I haven't followed most of the conversation; sorry if my comments are off/useless14:42
sarna those github project boards look the most promising imo14:42
El_Che we're talking about kanban14:42
so most of it is just out-my-ass talk14:43
(what I see at work)14:43
sarna and I have a question!14:43
I'll ask it before I forget14:43
m: loop (my UInt $i = 2; $i >= 0; $i--) {say $i;}14:43
camelia rakudo-moar 5cf0afce0: OUTPUT: «2␤Type check failed in assignment to $i; expected UInt but got Int (-1)␤ in block <unit> at <tmp> line 1␤␤1␤0␤»14:43
sarna oh! why didn't it run? on my machine it throws an error on runtime14:43
timotimo that is a runtime error :)14:44
sarna well, there was an output14:44
yeah14:44
I skimmed over it14:44
timotimo stderr and stdout get kind of jumbled up14:44
sarna can I somehow check it at compile time?14:44
AlexDaniel moritz: it's very on point, and we are brainstorming :)14:44
sarna I mean something like "hey your loop is while(true) and you probably don't want that"14:45
moritz AlexDaniel: :-)14:45
timotimo very difficult, as $i could be modified inside the loop body14:45
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 accident14:47
I'll try to modify i from inside the body and see what happens14:47
timotimo C is a lot more rigid :)14:47
Aukai joined14:48
Aukai left14:49
Aukai joined14:49
sarna oh!14:50
well, look at the type, I mean14:50
i is UInt, and can't ever be < 014:50
timotimo problem is, we define UInt as a subset of Int "where * >= 0", which is code14:51
if we don't have a way to tell rakudo that this corresponds to a range, it won't be able to know14:51
sarna oh :(14:51
timotimo in your code i'd use Int instead of UInt; you're not going to reassign $i inside the block, are you? :P14:52
also, i'd probably use a ... operator and for loop, though if your code is performance-critical, the loop you have wins against that14:52
sarna it's just a toy example to illustrate what I meant :D14:53
timotimo right14:53
Aukai left14:54
sarna still, that runtime exception is much better than getting UBd into oblivion14:55
timotimo UB?14:55
oh, undefined behaviour14:56
sarna yep14:56
nasal demons :)14:56
> Organization-wide project boards can contain issues and pull requests from any repository that belongs to an organization14:58
does every module in the ecosystem belong to the perl6 organization?14:59
El_Che o15:05
no15:05
jameslenz joined15:11
jameslenz left15:15
benjikun joined15:24
benjikun2 left15:25
thowe joined15:31
sarna left15:35
sarna_sarna15:35
MilkmanDan left15:36
MilkmanDan joined15:37
fake_space_whale joined15:39
uzl joined15:58
obfusk joined16:03
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: http://docdro.id/9JLV6Lq16:05
Any feedback would be welcome!16:05
MasterDuke uzl: the resources section should probably have perl6.org in addition to (or instead of) perl.org16:13
uzl left16:13
uzl joined16:14
uzl left16:15
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
https://perlmonks.org/?node_id=238031 # 15 years ago!16:16
p6noob is Q really the minimalistic string quoting? Would just naked single quotes get that title.16:18
uzl joined16:18
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
domidumont joined16:19
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 quote16:21
m: say Qtpiet16:22
camelia rakudo-moar 5cf0afce0: OUTPUT: «=== SORRY!=== Error while compiling <tmp>␤Undeclared name:␤ Qtpiet used at line 1␤␤»16:22
timotimo ok, so no letters allowed16:22
m: say Q'foo'16:22
camelia rakudo-moar 5cf0afce0: OUTPUT: «=== SORRY!=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> say Q'foo ' ␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ statement end␤ statement modifier␤ …»16:22
timotimo that's also fair, though i imagine surprising to a newbie16:22
ExtraCrispy left16:22
uzl Juerd: That's sort of a long history. ;)16:23
domidumont left16:25
faraco joined16:25
araraloren left16:26
domidumont joined16:26
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'y16:28
er16:28
m: my $x'y = 5; dd $x'y16:28
camelia rakudo-moar 5cf0afce0: OUTPUT: «Int $x'y = 5␤»16:28
geekosaur primes are valid in names16:28
timotimo yeah, but only inside names, just like dashes16:28
geekosaur which makes Q'... look like a name instead of a quote16:29
Xliff joined16:29
Xliff \o16:29
timotimo yup, and perl6 grammar has only one place where it backtracks, and that's inside string interpolation16:29
so when it commits to interpreting it as an identifier, it sticks to that16:29
Xliff Is there an easy way to force an enum into its proper NativeCall type?16:29
Oh, and https://gist.github.com/Xliff/6b16cccd09cee13d543bed874573004216:30
timotimo well, you can leave the first three numbers out ...16:30
m: our enum Test <hello 0 goodbye 1>; say hello.^mro16:31
camelia rakudo-moar 5cf0afce0: OUTPUT: «((Test) (Int) (Cool) (Any) (Mu))␤»16:31
timotimo you don't have to use => if you don't want to16:32
Xliff Well, it's best to be explicit, sometimes.16:32
^mro?16:32
timotimo method resolution order16:34
Xliff Ah! Thanks.16:34
timotimo had to make sure if it's an int enum16:34
Xliff m: our enum Test <hello 0 goodbye 1>; say hello.enums.gist.say16:34
camelia rakudo-moar 5cf0afce0: OUTPUT: «Map.new((0 => 1, 1 => 3, goodbye => 2, hello => 0))␤True␤»16:34
sarna left16:38
zakharyas joined16:39
faraco o/16:41
faraco left16:43
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
gabiruh left17:01
timotimo but the difference comes only from how your nativecall sub's signature is set up?17:01
gabiruh joined17:03
zakharyas left17:05
Ven`` joined17:07
jameslenz joined17:11
AlexDani` joined17:15
jameslenz left17:16
gabiruh left17:17
uzl left17:17
telex left17:17
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
Ven`` left17:19
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 left17:20
Xliff Yes.17:20
telex joined17:21
timotimo d'oh17:21
yeah, that makes sense17:21
Xliff :)17:21
timotimo but i'm not sure if autodetecting is a good idea17:21
Xliff OK. I will wait until I get to a stopping point and (try) to look into NativeCall.17:21
OK. Why not?17:21
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.17:22
I am assuming that if that ABI asks for an enum that contains a 64 bit integer, it will take a 64 bit integer.17:22
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>17:23
camelia rakudo-moar 5cf0afce0: OUTPUT: «=== SORRY!=== Error while compiling <tmp>␤Cannot find method 'BUILDPLAN' on object of type Perl6::Metamodel::NativeHOW␤at <tmp>:1␤»17:23
Xliff Why would you not care about some enum values?17:23
timotimo m: our enum Test is int32 <hello 0 goodbye 1>17:23
camelia rakudo-moar 5cf0afce0: OUTPUT: «=== SORRY!=== Error while compiling <tmp>␤int32 does not support inheritance, so Test cannot inherit from it␤at <tmp>:1␤»17:23
timotimo hm.17:23
Xliff Now THAT would be fine.17:24
timotimo it's bound to happen some day17:24
Xliff Yes, but meanwhile I have code that I was hoping (foolish me) would just take the enum type and call it a day.17:24
timotimo seems like we can't have that17:25
maybe special-case enums in nativecall and give EnumHOW some storage for a native int type17:25
skids left17:32
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.say17:34
camelia rakudo-moar 5cf0afce0: OUTPUT: «=== SORRY!=== Error while compiling <tmp>␤int32 does not support inheritance, so Test cannot inherit from it␤at <tmp>:1␤»17:34
Xliff m: our enum Test <hello 0 goodbye 1>; my Test $t = 2; $t.gist.say17:34
camelia rakudo-moar 5cf0afce0: OUTPUT: «Type check failed in assignment to $t; expected Test but got Int (2)␤ in block <unit> at <tmp> line 1␤␤»17:34
Xliff m: our enum Test <hello 0 goodbye 1>; my Test $t = Test(2); $t.gist.say17:35
camelia rakudo-moar 5cf0afce0: OUTPUT: «goodbye␤»17:35
Xliff So yeah... that will be.... interesting.17:35
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)17:35
coercion types also won't do i'm afraid17:36
gabiruh joined17:41
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?17:49
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'17:50
fake_space_whale: No. I don't think so.17:50
fake_space_whale ah okay17:50
Xliff https://docs.perl6.org/language/control#while,_until17:50
fake_space_whale Thank you, it appears that while $_ = EXPRESSION {} is what I wanted17:53
sarna joined17:54
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 least17:55
those sites do have perl, that's Perl5 though17:55
seems like we should have to create it ourselves and contribute it to Dash https://kapeli.com/docsets18:00
s/should/would18:00
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 so18: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
zakharyas joined18:17
salasrod joined18:26
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 ?18:46
masak lizmat: that's a deep question :)18:46
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 left18:47
El_Che .oO(or it may point to convenience method inflation)18:52
domidumont left18:52
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 conversion18:54
but for everyday programming, we tend to prefer things like given/when over things like switch/case18:56
so is more like the former, while Bool is more like the latter18:56
"I have a Boolean here" is a rather indirect way to ask whether it's true or not18:57
s/have/want/18:57
El_Che "I have a Boolean here"18:58
"so?"18:58
TimToady ?18:58
El_Che we're really teenagers18:58
:)18:58
TimToady it's 2018, which is a teen year18:59
El_Che :)18:59
geekosaur teeny Bools?19:03
TimToady bitsy19:03
Zoffix joined19:04
zakharyas left19:04
Zoffix left19:05
zakharyas joined19:05
zakharyas1 joined19:08
zakharyas left19:09
jameslenz joined19:11
jameslenz left19:16
zakharyas1 left19:26
tokomer left19:29
thowe left19:38
Woodi p6: package P; sub s { say 'P::s'; }; package main; P::s20:00
camelia rakudo-moar 5cf0afce0: OUTPUT: «=== SORRY!=== 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…»20:00
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 messages20:05
geekosaur p6: package P { our sub s { say 'P::s' } }; P::s20:10
camelia rakudo-moar 5cf0afce0: OUTPUT: «P::s␤»20:10
geekosaur it's a "my" sub by default, so can't be invoked with a namespace20:10
it either has to be exported and subsequently imported, or has to be declared "our"20:10
MasterDuke_ joined20:11
MasterDuke left20:12
Woodi oo, thank you geekosaur !20:12
kerframil joined20:12
MasterDuke_MasterDuke20:13
gabiruh left20:19
haxmeist1rhaxmeister20:22
haxmeister hey Larry Wall didn't quit did he?20:23
TimToady doesn't think so20:24
timotimo who told you that?20:24
haxmeister nobody.. it was a cheap shot at Guido..lol20:28
AlexDani`AlexDaniel20:36
gabiruh joined20:41
DrForr o/20:46
haxmeister o/20:47
DrForr #include <macarena.h>20:47
What does $*VM.osname return for OS X?20:48
MasterDuke left20:50
lizmat DrForr: darwin20:51
DrForr Thanks.20:51
MasterDuke joined20:52
benjikun2 joined20:54
TimToady m: say $*KERNEL.name20:54
camelia rakudo-moar 5cf0afce0: OUTPUT: «linux␤»20:54
veesh joined20:56
veesh hi all20:56
is there a ubuntu ppa for installing perl6?20:57
MasterDuke huggable: debs20:57
huggable MasterDuke, CentOS, Debian, Fedora and Ubuntu Rakudo packages: https://github.com/nxadm/rakudo-pkg/releases20:57
MasterDuke veesh: ^^^20:57
benjikun left20:58
AlexDaniel left20:58
AlexDaniel joined20:58
veesh many thanks20: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 of21:01
veesh why not? would it be too big?21:01
DrForr No volunteers, I'd guess.21:02
El_Che because noone has had the itch21:02
veesh i'm dying to use perl in the browser21:02
MasterDuke veesh: pmurias is working on a JS backend for rakudo21:02
DrForr perlito compiles p5 to JS, and there's a JS backend in the works.21:03
MasterDuke and a graalvm/truffle backend also21:03
El_Che MasterDuke: I thought it was node based21:03
TimToady he was mentioning possilby targeting wasm after that, but at the moment he's playing with truffle21:03
veesh the js is node based now21:03
apparently moving to browser based as longint support is added to modern browsers21:03
something like that21:03
MasterDuke El_Che: that sounds right21:03
jameslenz joined21:12
veesh left21:12
jameslenz left21:16
woolfy joined21:21
woolfy left21:21
mspo left21:25
benjikun2 left21:27
lizmat left21:29
lizmat joined21:32
wamba left21:32
epony left21:37
gabiruh left21:51
epony joined21:52
robertle left22:01
benjikun joined22:22
lpp joined22:23
lpp left22:24
stmuk_ joined22:26
fake_space_whale left22:27
stmuk left22:28
gabiruh joined22:29
sarna left22:34
gabiruh left22:34
Some-body_ joined22:37
DarthGandalf left22:37
Some-body_DarthGandalf22:38
gabiruh joined22:43
jmaslak_ left22:46
ufobat_ left22:53
sena_kun left23:00
salasrod left23:10
jameslenz joined23:12
jameslenz left23:24
pecastro left23:43

Logs Search ←Prev date Next date→ Channels Documentation