»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! Set by moritz on 22 December 2015. |
|||
AlexDaniel | parv: like, I have no designer degree, I have no idea if that is going to make things better or worse :) | 00:00 | |
parv | AlexDaniel: neither do i (have design degree). i could try in GIMP but that is not vector based software. is there other vector based software to run on FreeBSD or CentoS 6.8 which would install without hassle? | 00:02 | |
AlexDaniel | parv: inkscape | 00:03 | |
MasterDuke | krita maybe if you use kde | ||
yoleaux | 17 Jul 2017 15:44Z <AlexDaniel> MasterDuke: Malformed UTF-8 issue does not seem to be CATCH-able. I didn't really dive into this, but I guess if it happens in Proc::Async somewhere then you won't be able to handle it (as it is in a different thread)? | ||
17 Jul 2017 16:49Z <AlexDaniel> MasterDuke: nevermind. It's just that I'm an idiot: irclog.perlgeek.de/perl6-dev/2017-...i_14882744 | |||
00:03
kurahaupo__ left
|
|||
AlexDaniel | MasterDuke: do they have proper svg support nowadays? | 00:03 | |
Zoffix | TEttinger: comb is because you "comb for stuff" with it | ||
parv | AlexDaniel: i will see (but please be pessimistic). | ||
AlexDaniel | parv: don't worry, I am… :) | 00:04 | |
parv | he he he | ||
MasterDuke: i avoid kde & gnome system wherever i can (... but just may be work 'puter ... ) | 00:05 | ||
00:07
Sgeo joined
|
|||
timotimo | AlexDaniel, MasterDuke, krita is getting a full vector graphics overhaul at the moment | 00:10 | |
you can get a dev build for krita 4 which already has the svg stuff | 00:11 | ||
before that krita used ODG vector stuff internally | |||
MasterDuke | odg? | 00:12 | |
parv | openoffice thing? | 00:13 | |
timotimo | yup | 00:14 | |
open document graphic? | 00:15 | ||
parv remembers the file suffix used by (open|libre)office but had forgotten the origin | 00:16 | ||
00:17
mr-foobar left
00:19
mr-foobar joined
00:23
Morfent joined
00:27
Morfent left,
Morfent joined
00:29
lookatme joined
00:34
lizmat left
|
|||
Geth_ | whateverable: fae0078848 | (Aleks-Daniel Jakimenko-Aleksejev)++ | 2 files Move markdown escaping to Misc.pm6 Because this way we will be able to reuse this terrible hack later. |
00:36 | |
lookatme | morning | 00:41 | |
dudz | morning | 00:42 | |
00:46
mr-foobar left
00:49
mr-foobar joined
01:03
lizmat joined
01:05
noganex_ left
01:07
Ptolemarch left,
nicq20 joined
01:14
Cabanossi left
01:15
Morfent left
01:16
mr-foobar left,
Cabanossi joined
01:17
Morfent joined,
mr-foobar joined
01:20
lizmat left
01:25
Morfent left
01:28
mniip left,
mniip joined
01:33
lizmat joined
|
|||
nicq20 | Why is there no `add_method` for role HOWs? | 01:35 | |
01:38
mcmillhj joined
01:40
unicodable6 left
01:44
mcmillhj left
|
|||
lookatme | nicq20, there no document about role HOW. | 01:48 | |
:( | |||
nicq20 | Err sorry, should have been more descriptive. I'm mostly curious as to why the `add_method` method does not work with roles. | 01:52 | |
seatek | i'm pretty sure that role are immutable | 01:53 | |
that's what lets them get 'substituted' in so easily into classes | |||
01:59
wamba joined
02:03
committable6 left
02:05
cdg joined
02:06
mr-foobar left
02:09
jnthn_ joined,
nowan_ joined
02:13
stux|RC joined,
nowan left,
zengargoyle left,
gugod left
02:14
gugod joined,
timotimo joined
02:16
zengargoyle joined
02:17
epony left,
ribasushi left
02:19
ribasushi joined
02:20
pilne left
02:25
mr-foobar joined
|
|||
ugexe | m: role Foo { .^add_method("foo", { say 1 }) }; class Bar does Foo { }; Bar.foo; # but it can look like it does | 02:28 | |
camelia | 1 | ||
02:44
pm5 left
02:46
Xliff left
02:49
cdg left
02:50
cdg joined
02:52
nicq20 left
02:53
evanm joined,
evanm left
02:57
pm5 joined,
ingy joined
|
|||
BenGoldberg | m: role Foo { dd .HOW }; | 03:00 | |
camelia | ( no output ) | ||
BenGoldberg | m: role Foo { dd .HOW }; Foo.new; | ||
camelia | Perl6::Metamodel::ClassHOW.new | ||
BenGoldberg | m: role Foo { dd .HOW }; class Bar does Foo {}; | ||
camelia | Perl6::Metamodel::ClassHOW.new | ||
03:00
Cabanossi left
|
|||
BenGoldberg | m: role Foo { dd .HOW }; class Bar does Foo {}; class Baz does Foo {}; | 03:01 | |
camelia | Perl6::Metamodel::ClassHOW.new Perl6::Metamodel::ClassHOW.new |
||
03:01
Cabanossi joined
|
|||
BenGoldberg | Oooh, I see. The role's body block is executed at *class* composition time. Specifically, every time any class which does the role is composed. Neat. | 03:03 | |
03:06
lizmat left
03:11
noganex joined
03:15
cdg left
03:20
tony-o joined
03:22
evanm joined
|
|||
evanm | Hi, can someone explain the following discrepancy to me? | 03:26 | |
03:26
coverable6 left,
bloatable6 left,
quotable6 left,
statisfiable6 left,
evalable6 left,
bisectable6 left,
benchable6 left
|
|||
evanm | m: my int @ints = (1, 2, 3); say @ints[0].WHERE == @ints[0].WHERE | 03:26 | |
camelia | True | ||
evanm | m: my num @blarg = (1e0, 2e0, 3e0); say @blarg[0].WHERE == @blarg[0].WHERE | ||
camelia | False | ||
03:34
lizmat joined
|
|||
lookatme | evanm, it coercion 1e0 to num, so everytime access it produce a temporary value | 03:34 | |
I guess | |||
geekosaur | more likely from num to Num but in this situation that is arguably a bug | 03:35 | |
lookatme | m: my num32 @blarg = (1e0, 2e0, 3e0); say @blarg[0].WHERE == @blarg[0].WHERE | 03:36 | |
camelia | False | ||
lookatme | m: my @blarg = (1e0, 2e0, 3e0); say @blarg[0].WHERE; say @blarg[0].WHERE | ||
camelia | 140147420120160 140147420120160 |
||
geekosaur | I think int used to have the same issue, and it's not really fixed properly, just hacked around until someone figures out how to do it properly | ||
that is, it's boxing it on retrieval | |||
lookatme | Oh | ||
But we should not write code depend on .WHERE, right ? | 03:37 | ||
03:38
Xliff joined
|
|||
evanm | Thanks, that explains it at least | 03:38 | |
geekosaur | right | 03:39 | |
but autoboxing like that can cause unexpected performance issues | |||
lookatme | yeah, I know | ||
geekosaur | and you kinda want something like .WHERE to not give you the address of a box that you told it not to make | ||
lookatme | Hmm | 03:40 | |
geekosaur | so: this is a bug but it may be difficult to fix because natives still behave a bit oddly with respect to picking candidate methods iirc | ||
there's a hack in place for int/Int but not sure it will work for num/Num | 03:41 | ||
03:43
Cabanossi left
03:45
Cabanossi joined
|
|||
evanm | Someone said earlier that native shaped arrays are guaranteed contiguous storage; is there a way to see that somehow (maybe with WHERE)? | 03:46 | |
geekosaur | probably not; the array itself has a .WHERE, for native arrays there are no separate containers with their own .WHERE | 03:49 | |
I think | |||
evanm | m: my int @ints = (1, 2, 3); say @ints[0].WHERE; say @ints[1].WHERE | 03:51 | |
camelia | 140580465117080 140580465117120 |
||
evanm | m: my int @ints = (1, 2, 3); say @ints[1].WHERE - @ints[0].WHERE | 03:52 | |
camelia | 40 | ||
evanm | What am I looking at here? Does the 40 byte offset mean anything in particular? | ||
geekosaur | I think at this point you need to talk to jnthn or someone else who knows how the memory management works | 03:53 | |
I know only up to a point, and we're past it :/ | |||
evanm | geekosaur: ok, thanks. Well I don't want to bother people who are busy, just trying to get a handle on things | 03:55 | |
hobbs | 40 wouldn't seem very contiguous | 03:56 | |
and on my build (which is around a month old, granted) I get -40 :) | |||
geekosaur | right, one question I am not sure of here is whether native arrays have containers or not; if they do, the containers may be contiguous but their contents likely are not | 03:57 | |
but I just don't know | |||
evanm | All right, well I have another headscratcher | 04:00 | |
m: my $v1 = 10; my $v2 = 20; ($v2, $v1) = (30, 40); say $v2 | 04:01 | ||
camelia | 30 | ||
evanm | my $v1 = 10; my $v2 = 20; my $v3 = 30; (($v2, $v1), $v3) = ((40, 50), 60); say $v2; | 04:02 | |
m: my $v1 = 10; my $v2 = 20; my $v3 = 30; (($v2, $v1), $v3) = ((30, 40), 60); say $v | |||
camelia | 5===SORRY!5=== Error while compiling <tmp> Variable '$v' is not declared at <tmp>:1 ------> 3(($v2, $v1), $v3) = ((30, 40), 60); say 7⏏5$v |
||
evanm | m: my $v1 = 10; my $v2 = 20; my $v3 = 30; (($v2, $v1), $v3) = ((30, 40), 60); say $v2 | ||
camelia | (30 40) | ||
04:03
cyphase left
|
|||
evanm | I.e. why are the semantics of assigning to (($v2, $v1), $v3) apparently different from assigning to just ($v2, $v1) | 04:03 | |
04:04
El_Che left,
w4and0er96 joined
|
|||
evanm | In the case of (($v2, $v1), $v3), $v2 gets a List when I'd expect it to get a value | 04:04 | |
04:06
El_Che joined
04:07
mcmillhj joined
04:11
mcmillhj left
04:16
epony joined
04:19
wamba left
|
|||
tony-o | i'd expect that if you assigned did (($v2, $v1), $v3) = (|(1, 2), 3); | 04:26 | |
m: my $v1 = 10; my $v2 = 20; my $v3 = 30; (($v2, $v1), $v3) = (|(30, 40), 60); say $v2; | |||
camelia | 30 | ||
tony-o | the left is "flattened", the right isn't | 04:27 | |
evanm | Why the difference wrt flattening? Seems to screw up destructuring assignment | ||
tony-o | on the left you can't assign to an arbitrary sequence, on the right you're assigning a sequence to whatever is on the left. i'm not sure i'm saying that in correct p6y terms | 04:29 | |
if you flatten the Seq with the pipe, it assigns as expected | |||
evanm | Right, I'm just curious why this design decision was made | 04:31 | |
It seems like a nested lvalue should either mimic the structure of the rvalue or else produce an error | 04:33 | ||
I see how to work around it with the pipe but I'm not sure I understand the motivation for flattening the lvalue | 04:34 | ||
lookatme | m: my $v1 = 10; my $v2 = 20; my $v3 = 30; (($v2, $v1), $v3) := ((30, 40), 60); say $v2 | 04:42 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Cannot use bind operator with this left-hand side at <tmp>:1 ------> 3 30; (($v2, $v1), $v3) := ((30, 40), 60)7⏏5; say $v2 |
||
04:44
xtreak joined
|
|||
evanm | I'll ask again in the morning! | 04:46 | |
04:46
evanm left
04:49
kurahaupo_ joined
04:52
kurahaupo left
04:53
mcmillhj joined
04:58
mcmillhj left
05:12
Sgeo left
05:13
mr-foobar left
05:16
faraco joined
05:17
mr-foobar joined
05:18
kurahaupo joined,
kurahaupo left
05:19
kurahaupo joined,
kurahaupo left,
kurahaupo joined,
kurahaupo left
05:20
skids left
05:21
kurahaupo_ left,
skids joined,
kurahaupo joined,
khw left
05:23
Sgeo joined
05:28
skids left,
faraco left
05:34
Morfent joined
05:43
mr-foobar left,
Cabanossi left
05:45
Cabanossi joined,
mr-foobar joined
05:50
cognominal left
05:53
Sgeo left
05:54
Sgeo joined
06:00
Sgeo left
06:02
Sgeo joined
06:03
Sgeo left
06:04
Sgeo joined
06:09
lookatme left,
lookatme joined
06:12
BenGoldberg left
06:13
mr-foobar left
06:16
lookatme left,
lookatme joined,
mr-foobar joined
06:22
domidumont joined
06:28
domidumont left
06:29
domidumont joined
06:30
domidumont left
06:35
xtreak_ joined,
gdonald left
06:36
xtreak left
06:39
wamba joined
06:46
lowbro joined,
lowbro left,
lowbro joined,
Manifest0 left
06:47
gdonald joined
06:48
nadim joined
06:50
Xliff left,
Xliff joined
06:51
xtreak_ left
06:52
xtreak joined,
darutoko joined,
Manifest0 joined
06:55
nadim left
07:01
domidumont joined
07:03
Celelibi left
07:06
xtreak left,
xtreak joined
07:07
abraxxa joined
07:11
espadrine joined
07:13
ufobat joined
07:14
mr-foobar left
07:15
parvx joined,
mr-foobar joined
07:27
dakkar joined
07:39
Morfent left
|
|||
Geth_ | whateverable: b03eb154ba | (Aleks-Daniel Jakimenko-Aleksejev)++ | t/committable.t Increase timeouts in committable tests More releases = more time it takes to run something on all releases. |
07:41 | |
whateverable: dc4ac484d0 | (Aleks-Daniel Jakimenko-Aleksejev)++ | 4 files Gist exceptions (resolves issue #106) Whenever some exception was thrown, bots used to simply ignore what happened and not report back with anything. With this commit not only we catch exceptions, but also: * Gist them and provide a link. * Notify maintainers on #whateverable channel. ... (42 more lines) |
|||
AlexDaniel | 42 more lines xD | ||
07:44
mr-foobar left
|
|||
moritz | AlexDaniel++ | 07:47 | |
yoleaux | 17 Jul 2017 21:51Z <Zoffix> moritz: so I talked to people in #maria and one of the suggestions was to change ilbot/blob/master/lib/Ilbot/Backend/SQL.pm:40 to $_[0]->do( 'set names utf8' ); instead of the mysql-specific thing there. Is that code used to store data from IRC too tho? I popped open the db and done `select * from ilbot_lines where id = 14879831 limit 50;` and there's garbage up in there even if I do set names utf8 in the | ||
17 Jul 2017 21:52Z <Zoffix> moritz: client. So perhaps we need the set names utf8 thing some other place too? | |||
07:48
mr-foobar joined
|
|||
moritz | Zoffix: we must conserve the same format that the old 1.5M lines of logged data use, even if that looks like garbage | 07:49 | |
07:50
zakharyas joined,
committable6 joined,
ChanServ sets mode: +v committable6
07:51
unicodable6 joined,
bisectable6 joined,
coverable6 joined,
quotable6 joined,
evalable6 joined,
greppable6 joined,
ChanServ sets mode: +v unicodable6,
bloatable6 joined,
ChanServ sets mode: +v bisectable6,
ChanServ sets mode: +v coverable6,
ChanServ sets mode: +v quotable6,
ChanServ sets mode: +v evalable6,
ChanServ sets mode: +v greppable6,
ChanServ sets mode: +v bloatable6,
benchable6 joined,
ChanServ sets mode: +v benchable6,
statisfiable6 joined,
ChanServ sets mode: +v statisfiable6
07:54
lizmat left,
lizmat joined
07:57
leah2 left,
Cabanossi left
07:58
rindolf joined
08:00
Cabanossi joined,
wamba left
|
|||
lizmat clickbaits p6weekly.wordpress.com/2017/07/17/...-released/ | 08:03 | ||
08:05
|oLa| joined,
ufobat left
|
|||
llfourn takes the bait | 08:05 | ||
08:06
|oLa| left
|
|||
lookatme | lizmat++ | 08:06 | |
08:11
nadim joined
08:14
mr-foobar left,
mr-foobar joined
08:21
zakharyas left
08:33
seatek left
08:34
xerx left
08:38
Sgeo_ joined
08:39
lizmat left
08:40
lizmat joined
08:41
Sgeo left
|
|||
nine | How can I influence the sort order of objects of my class? | 08:42 | |
08:42
wamba joined
08:45
mr-foobar left
08:46
xerx joined,
jnthn_ is now known as jnthn
08:49
mr-foobar joined
08:53
lizmat left
|
|||
moritz | you can write an infix:<cmp> multi for it | 09:10 | |
09:10
lizmat joined,
TEttinger left
|
|||
lookatme | nine, overload some compare operator | 09:10 | |
abraxxa | I can reproduce the test failure of DOM::Tiny | 09:11 | |
zostay: if you want me to check it now | |||
09:12
xtreak left
|
|||
abraxxa | zostay: paste.scsys.co.uk/564629 | 09:12 | |
09:12
xtreak joined
09:14
mr-foobar left
09:15
espadrine left
09:17
xtreak left
09:19
mr-foobar joined,
parvx left,
kyan joined
|
|||
jsimonet | p6: my $a = 3.3; say $a.WHAT; ($a / 0).say; | 09:24 | |
camelia | (Rat) Attempt to divide 33 by zero using div in block <unit> at <tmp> line 1 |
||
jsimonet | 33 !% 3.3 | 09:29 | |
33 != 3.3 | |||
nine | m: class Foo { has $.bar }; multi infix:<cmp>(Foo $a, Foo $b) { say "cmp $a $b"; $a.bar cmp $b.bar }; my @a = Foo.new(:bar<b>), Foo.new(:bar<a>); @a.sort.say | 09:30 | |
camelia | (Foo.new(bar => "b") Foo.new(bar => "a")) | ||
nine | moritz: ^^^ the multi doesn't get picked apparently | ||
Presumably because it's not in method sort's lexical scope | 09:31 | ||
09:33
xtreak joined
|
|||
jnthn | :by(&infix:<cmp>) iirc | 09:36 | |
Oh, actually just .sort(&infix:<cmp>) | 09:37 | ||
To give it the version in scope | |||
09:38
lookatme left
|
|||
nine | Oh god damnit, &by is a positional. I tried it as a named, thought that maybe it's not "by" at all, looked in the docs, saw "by" and didn't notice that it's just not a named | 09:39 | |
Btw. how do I get out of a react {} loop from a whenever block? return gives a "MoarVM panic: Internal error: Unwound entire stack and missed handler". last doesn't do anything | 09:41 | ||
And in a whenever signal(SIGINT) { } I can't call .done because I don't have a reference to the Supply | 09:42 | ||
jnthn | done | 09:43 | |
nine | Ah, so close again :) Thanks jnthn++ | ||
jnthn | It's a control exception; after done it tears down all of the other subscriptions you may have and nothing will run in that react block instance again. | 09:44 | |
nine | Shouldn't we err... react to a "return" in just the same way? | 09:45 | |
09:46
mr-foobar left,
domidumont left
|
|||
nine | At least we shouldn't have MoarVM panic I guess :) | 09:47 | |
09:47
mr-foobar joined
|
|||
jnthn | Yeah, that's a bit surprising in that I'd have expected us to report "return outside of routine" | 09:47 | |
Not sure we should overload return with double-meanings... | 09:48 | ||
09:49
domidumont joined
09:56
gregf_ left
|
|||
Zoffix | moritz: I'm not following. | 10:10 | |
moritz: the encoding is broken in the database itself. Even old, pre-upgrade entries are brokne. | 10:11 | ||
10:14
gregf_ joined
10:15
mr-foobar left
|
|||
Geth | doc: 6136eaabb6 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Any.pod6 s/&by/&custom-routine-to-use/ To avoid people thinking it's a named arg. |
10:16 | |
10:19
mr-foobar joined
|
|||
Geth | doc: 04aaed60ab | (Zoffix Znet)++ | 2 files s/&by/&custom-routine-to-use/ To avoid people thinking it's a named arg. |
10:20 | |
10:21
TreyHarris left
10:24
TreyHarris joined
10:29
zakharyas joined
|
|||
Ulti | I know this is a contentious issue but could someone explain specifically what problem the rename "Rakudo Perl 6" or "Pumpkin Perl 5" is meant to solve? Feels like the number issue is there and the confusion with what's "perl" when someone say comes to /r/perl or #perl | 10:31 | |
is it simply to just add some level of they're different dont expect continuous perl'ness? | 10:32 | ||
because Im not sure it really does much to add to that and in a lot of ways makes things even more confusing by adding two made up words to the front of a recognisable one | 10:33 | ||
feels like anyone who knows what Pumpkin or Rakudo is meant to be all about would have a good idea of what Perl 6 is with respect to Perl 5 already everyone else is just left even more confused | 10:37 | ||
Zoffix | Ulti: rakudo.party/post/The-Hot-New-Lang...forthought | 10:38 | |
In a perfect world, it wouldn't have "Perl" anything in the name, but some core memebers think it does good. | |||
moritz | Zoffix: yes, and that means we can't just change the code to write in a different format to it | 10:40 | |
Zoffix: either the whole database has to be recoded, or the code that reads from the database needs to deal with the brokenness | |||
nadim | morning, when using dd to dump data, what's the difference between ('', '') and $('', '') ? IE what does the $ denote? | 10:42 | |
Zoffix | nadim: scalar container | ||
m: (('', ''), 42).flat.say | |||
camelia | ( 42) | ||
Zoffix | m: ($('', ''), 42).flat.say | ||
camelia | (( ) 42) | ||
Juerd | It feels like 'say' rarely dwim :( | 10:43 | |
It's too structured/decorated for output to end users, but not detailed enough for myself when debugging. | 10:44 | ||
Juerd liked it when it was still just print with a newline | |||
jnthn | Juerd: There's "put" for that | ||
nadim | Juerd: a single "\n" makes your data too structured/details and not detailled enough when you don't use it?! | 10:45 | |
Juerd | jnthn: Oh, wow, I didn't know. Thanks :) | ||
nadim | m: print "hello" ; | ||
camelia | hello | ||
Juerd | nadim: The () make it not very useful for output for humans, and as a programmer I want more detail (separators) | 10:46 | |
Separators that aren't whitespace, specifically | |||
nadim | m: (1, 2, 3).perl | 10:47 | |
camelia | ( no output ) | ||
nadim | m: (1, 2, 3).perl.say | ||
camelia | (1, 2, 3) | ||
Ulti | Zoffix kind of tempted to create a massive practical joke on Hacker News... create a shiny looking single page site advertising a great new language "Rakudo" point at some forked repos with any mention of Perl 6 removed and see if everyone starts going nuts. Then just time it out so it just phases everything back to Perl 6 once you have mindshare. | ||
Juerd | Yep, I use dd and .perl for debugging | ||
I'm not complaining about the lack of options, I'm just noting that I fail to see a good use case for 'say'. | |||
But it seems to be the most used printing operator somehow :) | 10:48 | ||
Zoffix | Ulti: people won't magically start going nuts over a language just because you changed the name. | 10:49 | |
Ulti | could even copy over every commit scrubbed of mentions to Perl 6 and see how long it takes anyone to notice the same authors commit to Perl 6 | ||
Zoffix I think you'd be surprised just how many people dismiss anything Perl | |||
nadim | I have difficulties with dd and .perl. works fine with a few wlwmnts then may brain needs more clarity | ||
Zoffix | It doesn't mean they want to go nuts over some unheard name. | ||
Ulti | no but they might over the actual functionality of Perl 6 thats kind of my point | 10:50 | |
Zoffix | My point is just changing the name won't magically make Rakudo a #1 sought after language. | ||
nadim | Juerd: there is Data::Dump ; Data::Pretty::Print, and Data::Dump::Tree, | ||
Ulti | the whole issue of marketing is people dont get to the point of even checking it out | ||
nadim | Juerd: my preference going to the last one because I eat my own dog food | ||
Juerd | nadim: Again, I was not complaining about a lack of options. | ||
nadim | :) | ||
Ulti | Zoffix my point is hide the provenance of the language to see if that does affect peoples opinion just publishing a post about the difference in attention would be quite interesting and a good critique of how stupid trends in programming have become | 10:51 | |
nadim | I have opted for showing structured data even to the end user, adn now and then "say" something | ||
Zoffix | :| | 10:52 | |
Ulti | I remember when someone first showed me some FORTRAN when I didnt know it was FORTRAN I couldnt work out what this elegant compiled language was.... it got a bad rep from all the shit code written in the 70s | ||
the same is true of Perl in the 90s | |||
the least favourite feature for new people sigil variance has been removed in Perl 6 | |||
10:55
Zoffix left
10:56
rindolf left
|
|||
Juerd | Ulti: That's only the least favourite feature they know is going on | 10:57 | |
Ulti | hah true | ||
Juerd | Ulti: I think context is the feature that bites newbies most. | ||
Ulti | though they are getting rid of one of my other complaints for teaching Perl 5 to newbs that hashes in scalar context dont just return the number of keys | 10:58 | |
Juerd | Ulti: It's not uncommon for Perl 5 programmers to first learn the concept of context after a frustrating first year, sometimes few years, of using the language. | ||
Ulti | or at least I remember seeing mention they might on a mailing list a while ago | ||
Juerd | I personally love the sigil variance and context, but I can understand why they're hard :) | ||
Ulti | I think it works but is stretched in places and jumping between references vs not and context is where it becomes frustrating | 10:59 | |
Juerd | Ulti: The only thing that bites me there is that you can't return a hash in Perl 5, only a hash reference or a k/v list. One requires ugly deref syntax, the other is inefficient because you're building another hash then. | 11:00 | |
Ulti: So in code that defines a my %foo, and also gets a hash from a sub, one hash will be %foo and the other might be %$foo, and then it gets ugly. | |||
Ulti | take a slice of a hashref ;P I always screw that up and I've been programming Perl 5 for 13 years daily | 11:01 | |
Juerd | This confused me, even though I've used Perl 5 since 1999 or so: juerd.nl/i/2c0430ca4d291947976ea5a60eda8aea.png | ||
(Written last week) | |||
(And yes, that project uses Dutch identifiers) | 11:02 | ||
And this asymmetry: juerd.nl/i/f35e26b7933b9c69cb7e5d430efc1bed.png :( | 11:03 | ||
Although in this case it aligns, so that compensates a little :D | |||
Ulti | I get what that code is doing but its a bit nutty | 11:04 | |
Id probably just keep lists of keys to a full datastructure | |||
Juerd | timtowtdi :) | 11:05 | |
11:05
rindolf joined
|
|||
Juerd | I need all of those structures later on | 11:05 | |
Ulti | yeah if you need a copy to work on fair enough | ||
Juerd | Well, most of this is being set up for passing to a template for reporting. | 11:06 | |
Ulti | but yeah thats the other thing you tend to do all those sorts of weird things with hashes because you are sort of treating them like sets and want intersections and unions | ||
11:06
sirhalos joined
|
|||
Ulti | which is why I really love Perl 6 | 11:06 | |
set operations are incredibly useful and common in bioinformatics | |||
Juerd | I haven't used those features yet in Rakudo and I feel very comfortable abusing hashes for it, but once I can use Rakudo for production work, I'll probably encounter the use cases where sets are great to have. | 11:07 | |
Ulti | give me all the things from this file which intersect on some key in this other file i.e. it should all be in a database but you cant for *reasons* | ||
Juerd | Heh, this code does a diff between a mysql database and an xml file :( | 11:08 | |
Ulti | sounds like Perl :D | ||
Juerd | Yes, I would be very annoyed if I had to write that in another language :) | ||
Ulti | thats the other reason Perl is feared it tends to be used to do incredibly powerful but questionably wise things :3 | ||
11:09
gdonald left
|
|||
Ulti | there are some scary things I've left littered around the place that would keep me up at night if I had to maintain them :D | 11:09 | |
Juerd | Sounds familiar | ||
Last year I got an email about code I wrote in 1999 when I had just learned Perl 5 | 11:10 | ||
Apparently that had been in production ever since | |||
Ulti | because it works | 11:11 | |
Juerd | No, because it stopped working :P | ||
Apparently "." is no longer in @INC :) | 11:12 | ||
Ulti | you mean the universe stopped working not the perl | ||
Juerd | Well, they did do a backwards incompatible change for security reasons | ||
11:12
rindolf left
|
|||
Juerd | I wish they'd do that more often. (<> operator, :utf8) | 11:12 | |
Ulti | Rakudo at the moment does include . by default I think? | 11:13 | |
Juerd | I don't know | ||
Have to go; afk | 11:14 | ||
11:15
mr-foobar left
|
|||
timotimo | it shouldn't | 11:17 | |
11:19
mr-foobar joined
11:21
gdonald joined
11:26
araraloren joined
|
|||
nine | Juerd: no, take a slice of a hashref you got from a method call. Now that looks funny | 11:32 | |
Ulti: no, wen don't look in . for modules | 11:33 | ||
m: say $*REPO.repo-chain.map: *.Str | 11:34 | ||
camelia | (/home/camelia/.perl6 /home/camelia/rakudo-m-inst-1/share/perl6/site /home/camelia/rakudo-m-inst-1/share/perl6/vendor /home/camelia/rakudo-m-inst-1/share/perl6 CompUnit::Repository::AbsolutePath<59158496> CompUnit::Repository::NQP<60476360> CompUnit::Rep… | ||
mst | I had memories of rakudo looking in . for moarvm bits or something | ||
but not the repo chain | |||
mst remembers managing to build a 'perl6' that worked from the build dir but not if you chdir-ed elsewhere | |||
nine | mst: I fixed that. Should look there only during the build but not after installation | ||
mst | nine: excellent, I was hoping somebody've done that | 11:35 | |
now you've done all this work I need to get around to getting back to my dists | |||
but other things keep intervening | |||
El_Che | dbix? :) | 11:42 | |
I saw some twitter drama :) | 11:43 | ||
11:45
xtreak left
11:46
mr-foobar left
11:47
xtreak joined
11:50
mr-foobar joined
11:54
leah2_ joined
|
|||
Ulti | nine++ thanks | 11:57 | |
12:01
leah2_ is now known as leah2
12:02
kyan left
12:04
xtreak left
12:14
evanm joined
12:16
mr-foobar left
12:20
mr-foobar joined
|
|||
evanm | Good morning, can someone explain why nested-list lvalues don't destructure? | 12:25 | |
m: my $v1=1; my $v2=2; my $v3=3; (($v1, $v2), $v3) = ((4, 5), 6); say $v1; say $v2; say $v3; | |||
camelia | (4 5) 6 (Any) |
||
12:25
lizmat left
12:26
lucasb joined
|
|||
evanm | I'd expect the code semantics to be equivalent to $v1 = 4, $v2 = 5, $v2 = 6 | 12:26 | |
*$v3 = 6 | |||
jnthn | Because that's just doing a list assignment, not destructuring | 12:30 | |
timotimo | m: my ($a, $b, $c); :(($a, $b), $c) := ((1, 2), 3); dd $a, $b, $c; | ||
camelia | Int $a = 1 Int $b = 2 Int $c = 3 |
||
12:33
mcmillhj joined
|
|||
evanm | Hmm ok, thanks. It's confusing to me that the lvalue just steamrolls the list structure in the assignment, I guess I'd expect an error there | 12:35 | |
12:38
sufrostico joined
12:40
lizmat joined
|
|||
lucasb | m: sub f($x) { :($x) := (10,); say $x }; f(20) # is this ok? | 12:42 | |
camelia | 20 | ||
jnthn | lucasb: Well, it's right that $x - which is readonly - can't be rebound. It'd be better if that were an error | 12:43 | |
timotimo | yeah, ought to err out | ||
lucasb | thanks, yes, expecting error there too :) | 12:44 | |
12:46
mr-foobar left
12:51
mr-foobar joined
12:58
Cabanossi left
13:00
Cabanossi joined
13:11
robertle joined
13:25
devmikey joined,
evanm left
13:32
skids joined,
Exodist left
13:33
Exodist joined
13:37
imcsk8 left
13:41
devmikey left
|
|||
andrzejku | hey people | 13:42 | |
I remind that someone wrote me that C++ binding to Perl6 is impossible | |||
so I want to say no it is not | |||
13:43
Cabanossi left
13:44
imcsk8 joined
13:45
Cabanossi joined,
mr-foobar left
13:46
mr-foobar joined
13:57
raschipi joined
14:00
sirhalos left
14:02
devmikey joined
14:04
kurahaupo left
|
|||
raschipi | andrzejku: How was the problem with discovering which symbol name the compiler gave to the functions solved? | 14:12 | |
14:12
Cabanossi left
14:13
zakharyas left,
zakharyas joined
|
|||
nine | raschipi: do you mean this? github.com/rakudo/rakudo/blob/nom/...er/GNU.pm6 | 14:13 | |
raschipi | Yes, that. It needs to include compiler specific code, then? | 14:14 | |
14:15
Cabanossi joined
14:16
mr-foobar left
14:17
zakharyas left
14:18
mr-foobar joined,
pmichaud joined
|
|||
pmichaud | Good morning, #perl6 | 14:19 | |
yoleaux | 24 Oct 2016 21:43Z <viki> pmichaud: any updates on HTTPS for rakudo.org ( RT#128423 )? Do you need any help? | ||
synopsebot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=128423 | ||
yoleaux | 29 Nov 2016 17:12Z <viki> pmichaud: would be sweet if you could drop the .ai of Rakudo logo into github.com/perl6/marketing/tree/master/LOGOs if you get a chance | ||
30 Nov 2016 17:13Z <babydrop> pmichaud: any way we could touch base on rakudo.org maintenance? Could a person be given a sudo or something along those lines? We need HTTPs, upgraded Wordpress, and upgraded `php` + upgraded something else too, I'm sure | |||
pmichaud | Just dropping a note here that I find docs.perl6.org/language/traps#Quot...erpolation very confusing -- especially the examples. | 14:20 | |
raschipi | Do you want help understanding it or just letting us know we need to make it clearer in the future? | 14:22 | |
14:22
kurahaupo joined
|
|||
moritz | raschipi: probably the latter :-) | 14:22 | |
nine | very much so :) | 14:23 | |
moritz | pmichaud used to be the main Rakudo developer for quite a few years | ||
raschipi | That's what I thought, but wanted to make sure. | ||
pmichaud | The first example says: "$foo<html></html>" # Perl 6 understands that as: | ||
$foo<html> ~ '</html>' | 14:24 | ||
14:24
ufobat joined
|
|||
moritz | it's $foo{"html"}{"/html"}, no? | 14:24 | |
pmichaud | .... say what?!? No, it understands it as being $foo<html></html>, which is also $foo{'html'}{'/html'} | ||
right. | |||
similarly the next example is also wrong | |||
raschipi | It only makes sense to someone who already knows the trap. | ||
pmichaud | > my $foo = { .say } | 14:25 | |
> say "$foo(" ~ @args ~ ")" ~ @args ~ | |||
True | |||
sorry | |||
lost alinebreak there | |||
> say "$foo(" ~ @args ~ ")" | |||
~ @args ~ | |||
Okay, I can see how this example is a trap... but the example text gets the answer wrong | 14:26 | ||
Perl 6 understands that as being "$foo(' ~ @args ~ ')" | 14:27 | ||
I suspect I can do a pull request there. | 14:28 | ||
andrzejku | moritz, whats happend with your book? | ||
14:34
Celelibi joined
14:35
ChristopherBotto joined
14:37
rindolf joined
|
|||
araraloren | so I intend use {} in string for interpolation | 14:40 | |
14:41
wamba left
|
|||
Geth | doc: pmichaud++ created pull request #1418: Correct Perl 6 interpretation of trap examples. |
14:42 | |
araraloren | andrzejku, I have add some impl of toolchain, have not much time work on it :) | ||
moritz | andrzejku: good question, should ask my project manager | 14:45 | |
pmichaud | I'm afk again -- see ya'll around. | ||
moritz | I've completed the final proof; it's now in the publisher's hands | ||
pmichaud | (Wishing I could get to Amsterdam this year for #yapceu) | ||
ChristopherBotto | How do I report installation issues with Rakudo Star 2017.07-RC0? It seems to install fine except that zef gives me the error "===SORRY!=== Function 'BEFORE' needs parens to avoid gobbling block at /path/to/rakudo-star-2017.07-RC0/home#sources/A9948E7371E0EB9AFDF1EEEB07B52A1B75537C31 (Zef::CLI):565" | 14:47 | |
14:47
raschipi left
14:49
raschipi joined
14:50
konsolebox left
|
|||
ChristopherBotto | This was also an issue with rakudo-star-2017.04 for me. This is on CentOS Linux release 7.3.1611 (Core). | 14:52 | |
araraloren | Work fine on fedora 25, every release | 14:54 | |
Juerd | nine: Yep, both ways look funny. | 14:55 | |
nine: But ->$#* is worse :) | 14:56 | ||
14:56
konsolebox joined
14:57
melezhik joined
|
|||
melezhik | HI! | 14:57 | |
14:58
konsolebox left
|
|||
melezhik | Hi jnthn: ! for some reasons "whenever IO::Notification.watch-path($root)" stopped triggered when I add new directories ... - github.com/melezhik/sparky/blob/ma...parkyd#L38 | 14:59 | |
any hints? | |||
btw I'm running sparky inside docker container, maybe this has impact to ... | 15:00 | ||
15:00
ChoHag left
|
|||
melezhik | once I restart sparkd it sees new directories and starts handling then ... | 15:00 | |
then -> them | |||
jnthn | melezhik: Dunno if it's exactly the issue you face but sleeping inside of a whenever will block processing of any other messages in the react block until after the sleep | 15:06 | |
Write it as whenever Promise.in($timeout) { run-project ... } | |||
melezhik | jnthn: will try, thanks. the fact that concerns me, that that worked before, but probably I just missed some code changes ... | 15:11 | |
15:13
lowbro left,
konsolebox joined
15:14
kurahaupo left
15:17
mr-foobar left
15:20
mr-foobar joined
|
|||
ChristopherBotto | Thanks araraloren. I guess I will create an issue at the github repository for zef. | 15:22 | |
15:22
ChristopherBotto left
|
|||
araraloren | .. | 15:22 | |
melezhik | jnthn: looks like I was wrong in my assumptions. indeed triggering does happen, just not that fast as I expected, I see new directories get handled by sparkyd ... | 15:27 | |
anyway, thanks. I need to investigate more if it's really the issue ... | 15:28 | ||
15:29
kurahaupo joined
|
|||
ugexe | thats not a zef issue, that seems like a precomp issue | 15:37 | |
jnthn | melezhik: I could easily imagine the sleep causing a delay | ||
melezhik | I have applied your suggestion to my code | 15:38 | |
but I need to check more ... | |||
15:44
zakharyas joined
15:45
wamba joined
15:46
mr-foobar left
15:47
ChoHag joined
15:50
mr-foobar joined
15:54
abraxxa left
|
|||
Geth | doc: cc2632ace8 | (Patrick R. Michaud)++ (committed by timo) | doc/Language/traps.pod6 Correct Perl 6 interpretation of trap examples. (#1418) |
15:57 | |
raschipi | Now it makes even less sense to someone who isn't aware of the trap already. | 15:58 | |
nadim | m: my @l = 1, (), (), () ; my ($a, $b, $c, $d) = @l ; dd ($a, $b, $c, $d) ; | 16:00 | |
camelia | (1, $( ), $( ), $( )) | ||
nadim | m: my @l = 1, (a,2), (), () ; my ($a, $b, $c, $d) = @l ; dd ($a, $b, $c, $d) ; | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared routine: a used at line 1 |
||
nadim | m: my @l = 1, (1,2), (), () ; my ($a, $b, $c, $d) = @l ; dd ($a, $b, $c, $d) ; | ||
camelia | (1, $(1, 2), $( ), $( )) | ||
16:01
st_elmo joined,
cdg joined
|
|||
nadim | and how do I get a list list? | 16:02 | |
so $l is a list, it contains a list (1,2) but when I put that in $a, I get wat, a list in scalar content? | |||
timotimo | there is no $l in there, only @l, can you clarify? | 16:03 | |
nadim | m: my $l = (1, (1,2), (), ()) ; my ($a, $b, $c, $d) = @l ; dd ($a, $b, $c, $d) ; | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Variable '@l' is not declared. Did you mean '$l'? at <tmp>:1 ------> 3 (1,2), (), ()) ; my ($a, $b, $c, $d) = 7⏏5@l ; dd ($a, $b, $c, $d) ; |
||
nadim | m: my $l = (1, (1,2), (), ()) ; my ($a, $b, $c, $d) = $l ; dd ($a, $b, $c, $d) ; | ||
camelia | (1, $(1, 2), $( ), $( )) | ||
16:03
cdg_ joined
|
|||
nadim | timotimo: indeed, I wrote a @l example | 16:04 | |
tony-o | you get a sequence, iirc | ||
16:04
khw joined
|
|||
nadim | m: my $l = (1, (1,2), (), ()).List ; my ($a, $b, $c, $d) = $l ; dd ($a, $b, $c, $d) ; | 16:04 | |
camelia | (1, $(1, 2), $( ), $( )) | ||
tony-o | m: my $l = (1, (1,2), (), ()) ; my ($a, $b, $c, $d) = $l ; $b.WHAT.say | ||
camelia | (List) | ||
tony-o | nvm | ||
nadim | do $(...) flatten differently from ( ...) ? | 16:05 | |
actually, I think I misunderstand $() and the difference with (), explanaitions welcome | 16:06 | ||
16:07
cdg left,
mcmillhj left
16:10
mcmillhj joined,
suman joined
|
|||
suman | Hi everyone | 16:11 | |
Greetings!! | |||
raschipi | hello | ||
suman | I want help on this. Any help? stackoverflow.com/questions/451721...ith-perl-6 | ||
Related with Perl 6. I want to see the perl 6 grammar used to solve this problem. Would be exciting. | 16:12 | ||
mst | post your code so far and explain where you're stuck? | ||
ugexe | m: my @a; @a.append($(1,2)); say @a.perl; my @b; @b.append((1,2)); say @b.perl | 16:13 | |
camelia | [(1, 2),] [1, 2] |
||
16:16
mcmillhj left,
mr-foobar left
|
|||
raschipi | suman: I think the appropriate way to do it in Perl6 would be to write bindings to bib2x. | 16:16 | |
16:17
mr-foobar joined
|
|||
nadim | suman: there is close to zero chance you will get your work done without you having spend a substantial amount of time trying. | 16:17 | |
docs.perl6.org/language/grammar_tutorial | 16:18 | ||
suman | nadim I saw grammar documentation. Couldn't make out however! :( | 16:20 | |
raschipi bib2x I am seeing. | 16:22 | ||
nadim | perl6advent.wordpress.com/2009/12/...d-actions/ | ||
moritz | suman: I'm working on a book that teaches grammars: leanpub.com/perl6regex enjoy! | ||
nadim | moritz++ | 16:23 | |
moritz | (to be fair, so far it "only" discusses regexes; working on the chapter right now that introduces grammars) | 16:24 | |
tyil[m] | heh | ||
16:25
yht joined
|
|||
moritz | and when you buy it, you get the updates for free | 16:25 | |
tyil[m] | moritz: interesting | ||
moritz | it's lean/agile book writing and selling, basically | 16:26 | |
perlpilot | suman: I'd look around for a BibTeX grammar in BNF or maybe google for "BibTeX parser" and convert it to Perl 6 if I were you. It would be a good learning experience in any case. | 16:27 | |
16:27
mcmillhj joined
|
|||
perlpilot | (that's kinda how I taught myself C ages and ages ago -- I knew Pascal, so I tried translating programs from Pascal to C) | 16:28 | |
16:29
dakkar left
|
|||
araraloren | night | 16:29 | |
16:29
araraloren left
|
|||
perlpilot | suman: I found github.com/aclements/biblib#recognized-grammar with a few seconds of google + clicking on links | 16:30 | |
nadim | suman: tex.stackexchange.com/questions/16...6492#16492 | 16:31 | |
16:32
domidumont left,
mcmillhj left
|
|||
robertle | dude, the original bibtex source sure is "fun" | 16:34 | |
16:42
mcmillhj joined
|
|||
tony-o | pascal seemed like a cool language | 16:43 | |
robertle | hmmm, this is also quite a lot of pascal... | ||
16:46
zakharyas left
|
|||
robertle | eh? the texlive source tree contains a C implementation as well! | 16:46 | |
16:47
mcmillhj left,
mr-foobar left
|
|||
robertle | and *of course* someone had to do #define BEGIN { | 16:49 | |
16:51
mr-foobar joined
16:52
Cabanossi left
|
|||
suman | This my code grammar REST { token TOP { '@.*{?' <key> ',\n title={' <title> '}'} token key { \w+ } token title { \w+ } } my $match = REST.parse('derm.bib'); say $match; | 16:52 | |
Not working | |||
16:53
robertle left
16:54
Cabanossi joined
16:56
|oLa| joined
16:58
nadim left
16:59
mcmillhj joined
17:00
lostinfog joined,
MasterDuke left
17:01
domidumont joined
17:02
sufrostico left
17:04
mcmillhj left
17:08
beginner joined
|
|||
beginner | Is it possible to create object with role as type instead of class | 17:08 | |
17:09
sufrostico joined
|
|||
Voldenet | suman: "derm.bib" is just passed as a string, so it doesn't work | 17:12 | |
obviously | |||
beginner | is there any syntax difference...bcoz am getting error | 17:14 | |
suman | Voldenet: This is code. Even after removing quotes not working grammar REST { token TOP { '@.*{?' <key> 'title={' <title> '}'} token key { \w+ } token title { \w+ } } my $match = REST.parse(derm.bib); say $match; | ||
This is the error message : ===SORRY!=== Error while compiling C:\Users\Suman\Desktop\bib.p6 Undeclared routine: derm used at line 8 | 17:15 | ||
17:16
zakharyas joined
|
|||
Voldenet | .parse expects a Str | 17:17 | |
REST.parse("derm.bib".IO.slurp) | |||
AlexDaniel | suman: wait, you want to parse "derm.bib" file? If so, then REST.parse(slurp('derm.bib')) | ||
17:17
mcmillhj joined
17:18
lucasb left,
lucasb joined
17:20
AndroUser2 joined
|
|||
suman | AlexDaniel even after slurping the derm.bib , its not working | 17:20 | |
Do you find anything wrong in my grammar? | |||
AlexDaniel | suman: what error are you seeing? | ||
suman: well, if you can gist your input file then I might take a look | 17:21 | ||
Voldenet | > github.com/sumandoc/My-LaTeX-Stuff...r/derm.bib | ||
suman | AlexDaniel Its here github.com/sumandoc/My-LaTeX-Stuff...r/derm.bib | ||
17:23
AndroUser2 is now known as slee,
slee is now known as Guest67938,
statisfiable6 left
17:24
Guest67938 left,
statisfiable6 joined,
ChanServ sets mode: +v statisfiable6
|
|||
AlexDaniel | suman: thinking about it, are you sure you want a grammar? | 17:29 | |
because then you'd probably want to parse everything *properly* | |||
beginner | Is it possible to create object with role as type instead of class...if yes,how? | 17:30 | |
suman | AlexDaniel: Not necessarily. But you can tell me about basic implementation in Perl 6 too. | 17:31 | |
AlexDaniel | suman: eh, I don't know… if you want a quick hack job then you can try something like this: my $data = slurp 'derm.bib'; %($data.match(:g, /'@article{'(\w+)/)»[0]».Str Z=> $data.match(:g, /'title={'(<-[}]>+)/)»[0]».Str) | 17:33 | |
jdv79 | shouldn't it be possible to use a subset type in a has declaration? | 17:34 | |
oh, nevermind. typo. | |||
lucasb | beginner: my SomeRole $x = SomeRole.new | 17:35 | |
raschipi | beginner: docs.perl6.org/type/auto-punning | 17:36 | |
17:37
domidumont left
|
|||
AlexDaniel | suman: something less hacky but still horrible: slurp('derm.bib').match(:g, /'@article{'(\w+)','\s+'title={'(<-[}]>+)/).map({~.[0] => ~.[1]}) | 17:38 | |
17:39
ChristopherBotto joined
|
|||
AlexDaniel | looking at this, I think finding something that can parses bibs correctly would be the best solution | 17:39 | |
beginner | lucasb, rashcipi : Thanks | 17:41 | |
raschipi : Thanks | 17:42 | ||
ingy | does this not work in perl6: gist.github.com/anonymous/c1ee7fc4...9c6db0bf9b ? | 17:44 | |
17:44
devmikey left
17:45
suman left
17:46
mcmillhj left
|
|||
AlexDaniel | ingy: use v5.10 ? | 17:47 | |
17:47
mr-foobar left
|
|||
geekosaur | not sure anyone's tried circular imports | 17:47 | |
ingy | AlexDaniel: enables 'say' | 17:48 | |
AlexDaniel | geekosaur: well, there's an error message for this: “Circular module loading detected trying to precompile” | ||
17:48
mr-foobar joined
|
|||
AlexDaniel | ingy: but you were talking about perl6? | 17:48 | |
17:48
mcmillhj joined
|
|||
ingy | does this perl5 not translate to perl6: gist.github.com/anonymous/c1ee7fc4...9c6db0bf9b ? | 17:49 | |
AlexDaniel | ingy: Well, you can use perl5 stuff with Inline::Perl5 github.com/niner/Inline-Perl5 | ||
ingy: but if you want to go with perl6, then it will look a bit different | |||
ingy | AlexDaniel: I'm asking if circular imports work in p6 | 17:50 | |
AlexDaniel | oooh… | ||
well, it gives this error if you translate it to perl6: “Circular module loading detected” | |||
so it seems like it is not working | 17:51 | ||
ingy | fo me it just hangs | ||
17:51
st_elmo left
|
|||
AlexDaniel | what rakudo version you have? | 17:51 | |
also, what do you mean by “it just hangs”? What code exactly hangs? | |||
17:53
mcmillhj left
|
|||
ingy | AlexDaniel: drop the hand holding. so almost all dynamic langs I know support circular loads. is there a good reason why p6 can't/doesn't? | 17:54 | |
17:54
nadim joined
|
|||
ingy | can type info not be resolved in precomp? | 17:54 | |
raschipi | ingy: Do they also support lexical loading and want to support loading multiple versions in different contexts in the future? | 17:56 | |
AlexDaniel | ingy: I think that's a good question, and it would be nice to have a good written answer in any case (good reason or not) | ||
ingy: I can't find any ticket unfortunately | |||
17:56
beginner left
|
|||
ingy | raschipi: I'm not comparing, I'm just trying to figure out if this is an oversight or on purpose, and if so why | 17:56 | |
17:57
zakharyas left
|
|||
raschipi | ingy: Me too. I'm actually interested in the answer, I didn't mean to compare. | 17:57 | |
AlexDaniel | ingy: in these cases I'd usually submit a ticket. If it is not supposed to work, someone will reject it with some good reasoning. If it's a “bug”, we will have a ticket for it at least :) | ||
raschipi | Or, another way: have those two features been combined before? If so, how? | ||
AlexDaniel | just found this: RT #126688 | 17:59 | |
synopsebot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=126688 | ||
ingy | AlexDaniel: I appreciate your helping out, but I've been with p6 from day1 :) | ||
AlexDaniel | this is what was linked in this commit (which added this protection): github.com/rakudo/rakudo/commit/21...5e26c88bc6 | ||
18:01
espadrine joined
|
|||
AlexDaniel | ingy: good, then I guess no need to explain how to submit a ticket? ;) | 18:01 | |
ingy | which was July 18th 2000 iirc | 18:03 | |
AlexDaniel: I'll turn it off and back on again. :) | |||
18:04
sufrostico left,
mcmillhj joined
18:05
deep-book-gk_ joined
|
|||
jdv79 | can i have a public attr and a custom accessor? | 18:05 | |
18:06
sufrostico joined,
deep-book-gk_ left
|
|||
perlpilot | jdv79: yes | 18:06 | |
geekosaur | afaik the thing that makes it public is the accessor, which is generated for you with $., so you define it "private" ($!) and then provide your own accessors? | 18:07 | |
18:07
Cabanossi left
|
|||
jdv79 | but then you lose out on the constructor checking | 18:08 | |
AlexDaniel | ingy: maybe this is relevant? irclog.perlgeek.de/perl6/2016-05-29#i_12567128 | ||
timotimo | you can declare it public and just implement a method with the same name as the attribute | ||
perlpilot | jdv79: exactly as timotimo said | 18:09 | |
18:09
Cabanossi joined
|
|||
jdv79 | i tried that and it seemd to not work | 18:10 | |
i'll paste it | |||
AlexDaniel | ingy: just created this doc issue: github.com/perl6/doc/issues/1419 | 18:15 | |
perlpilot | m: class C { has $.x = 42; method x { 97 }}; C.new.x.say; # simple example | ||
camelia | 97 | ||
jdv79 | oh, i need Proxy. right. thanks. | 18:16 | |
18:18
mr-foobar left
|
|||
ugexe | m: class Foo { has $.x; method x { $!x * 2 } }; say Foo.new(x => 100).x | 18:18 | |
camelia | 200 | ||
jdv79 | yeah but i want to set as well | 18:19 | |
18:20
domidumont joined
|
|||
ingy | AlexDaniel: thx | 18:22 | |
ugexe | m: class Foo { has $.x; method x is rw { say 42; $!x } }; my $foo = Foo.new(x => 100); say $foo.x; $foo.x = 400; say $foo.x | 18:23 | |
camelia | 42 100 42 42 400 |
||
ugexe | i guess you do need a proxy if you want to act according to read or write | 18:24 | |
jdv79 | yup | 18:25 | |
timotimo | yup, that's the only way i know of | ||
18:28
sufrostico left,
mr-foobar joined
18:30
perlpilot left
|
|||
jdv79 | and there's a bug | 18:30 | |
but it seems easily skirted | |||
rt.perl.org/Public/Bug/Display.html?id=126198 | |||
18:30
perlpilot joined
|
|||
timotimo | yeah, don't put methods in there | 18:31 | |
it can't work, since they are getting invoked on the proxy object | |||
and if you have something like $!x in there, it will resolve to an object that doesn't have that attribute | |||
jdv79 | the test still just has that fudged out | 18:32 | |
weird | |||
timotimo | perhaps Proxy's constructor should complain loudly if you pass objects derived from method in there | 18:33 | |
jdv79 | it doesn't help that the docs show using methods | 18:34 | |
but that's in a different context so not sure if that should work or not | |||
18:35
ChoHag left
|
|||
jdv79 | and why does FETCH get a postional arg sometimes | 18:37 | |
ugh | |||
Geth_ | whateverable: 62eee9ef6f | (Aleks-Daniel Jakimenko-Aleksejev)++ | 5 files No need to $proc.out.close anymore Resolves issue #175. Reverts at least these commits: * 96ccddccd804b33e0b9c5ed6580c1c23a91a5737 * 39cde1e3e90bd019a38f51c62221927900b5e01b * c63ed89d4ea0fb1e7d6d62683d237432e215d29a See this Perl 6 doc issue for more info: github.com/perl6/doc/issues/1304 |
18:38 | |
18:38
Cabanossi left
|
|||
timotimo | that's the object you're fetching from, i guess? | 18:39 | |
hm, no, it's probably the proxy itselfs | |||
18:39
Cabanossi joined
|
|||
jdv79 | doing $o.a = 1 is fine but say $o.a = 1 seems to give a param to FETCH | 18:41 | |
idk | |||
18:42
yht left
|
|||
jdv79 | or $o.a i what i meant | 18:42 | |
timotimo | i don't see the difference there? | ||
AlexDaniel | .tell samcv Any chance you have a quick answer for github.com/perl6/whateverable/issues/167 ? Unicodable adds ◌ for combiners, but how can I easily know if ◌ should be prepended? Like, is there some property or something? Or is there any other check I can perform? Like “(“◌” ~ $x).chars == 1” or something? | 18:44 | |
yoleaux | AlexDaniel: I'll pass your message to samcv. | ||
18:48
mr-foobar left
18:50
mr-foobar joined
|
|||
tyil | can anyone help me with a probably easy grammar problem? I have termbin.com/eimi | 18:51 | |
but $m is an (Any), without the match I wanted ("hello", supposed to be in <content>) | |||
18:52
ChoHag joined
|
|||
tyil | Grammar::Tracer shows it should match carrectly | 18:52 | |
geekosaur | as written, that grammar will stop at the second **, notice that ti is not at end of input, and fail. | 18:56 | |
perhaps you want subparse instead of parse | |||
tyil | heh, that seems to give me the result I was expecting | 18:57 | |
thanks geekosaur | |||
18:57
lizmat left
18:59
mcmillhj left
19:01
mcmillhj joined
19:06
domidumont left
19:07
domidumont joined
19:08
Cabanossi left
19:09
Cabanossi joined,
domidumont left
19:10
lizmat joined
19:11
darutoko left
19:13
zakharyas joined
19:14
st_elmo joined
19:18
st_elmo left,
mr-foobar left
19:20
mr-foobar joined
19:28
lizmat left
19:33
setty1 left
|
|||
kybr | are named captures allowed: MAIN(.... where /$<right-here>=..../ ....) ? | 19:34 | |
19:34
setty1 joined
19:35
dwarring joined
|
|||
kybr | m: sub FOO($ip where /$<first>=\d+ \. \d+ \. \d+ \. \d+/) { say $first } | 19:38 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Variable '$first' is not declared. Did you mean '&first'? at <tmp>:1 ------> 3first>=\d+ \. \d+ \. \d+ \. \d+/) { say 7⏏5$first } |
||
19:39
hoelzro joined
|
|||
kybr | m: my $s = '192.168.0.1' and $s ~~ /$<first>=\d+ \. \d+ \. \d+ \. \d+/ | 19:39 | |
camelia | ( no output ) | ||
kybr | m: my $s = '192.168.0.1' and $s ~~ /$<first>=\d+ \. \d+ \. \d+ \. \d+/ and say($first) | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Variable '$first' is not declared. Did you mean '&first'? at <tmp>:1 ------> 3irst>=\d+ \. \d+ \. \d+ \. \d+/ and say(7⏏5$first) |
||
19:40
lizmat joined
|
|||
kybr | m: my $s = '192.168.0.1' and $s ~~ /$<first>=\d+ \. \d+ \. \d+ \. \d+/ and say($<first>) | 19:40 | |
camelia | 「192」 | ||
jdv79 | is it possible to slip a list into a sig instead of having to construct a hash out of it first? | 19:41 | |
kybr was misunderstanding named captures: say $<capture> # not $capture | 19:42 | ||
19:48
mr-foobar left
|
|||
nadim | m: my $l = (1,2) ; my @a = 1, $l, $l ; dd @a ; | 19:51 | |
camelia | Array @a = [1, (1, 2), (1, 2)] | ||
19:51
mr-foobar joined
|
|||
nadim | m: my $l = (1,2) ; my @a = 1, $l xx 2 ; dd @a ; | 19:51 | |
camelia | Array @a = [1, ((1, 2), (1, 2)).Seq] | ||
nadim | m: my $l = (1,2) ; my @a = 1, | $l xx 2 ; dd @a ; | 19:52 | |
camelia | Array @a = [1, (1, 2, 1, 2).Seq] | ||
19:52
Cabanossi left
|
|||
nadim | m: my $l = (1,2) ; my @a = 1, $l x 2 ; dd @a ; | 19:52 | |
camelia | Array @a = [1, "1 21 2"] | ||
nadim | m: my $l = (1,2) ; my @a = 1, |( $l xx 2) ; dd @a ; | ||
camelia | Array @a = [1, (1, 2), (1, 2)] | ||
19:54
Cabanossi joined
19:55
sufrostico joined
19:57
rindolf left,
rindolf joined
20:12
lizmat left
20:15
TEttinger joined
20:18
mr-fooba_ joined
20:19
mr-foobar left
20:24
kst joined
20:28
xerx left,
zakharyas left
20:39
aindilis joined
20:40
lizmat joined
20:43
lizmat left
|
|||
ChristopherBotto | ugeze: Thanks for responding about my "zef" issue really being a precompilation issue earlier (irclog.perlgeek.de/perl6/2017-07-1...14888036). What is the best place to find information about how precompilation works so that I can better debug this situation? | 20:45 | |
21:01
integral joined,
integral left,
integral joined
21:02
Xliff left
21:03
pilne joined
21:04
skids left
21:06
raschipi left
21:10
lizmat joined
21:11
mcmillhj left
21:13
mcmillhj joined
21:18
mcmillhj left
21:23
setty1 left
21:24
setty1 joined
|
|||
ChristopherBotto | ugexe: Thanks for responding about my "zef" issue really being a precompilation issue earlier (irclog.perlgeek.de/perl6/2017-07-1...14888036). After searching a while, I found out that precompilation is stored under `~/.perl6` and after deleting it, the new Rakudo Star installed fine. Thanks! | 21:25 | |
21:26
setty1 left
21:27
ChristopherBotto left
21:28
setty1 joined
21:38
Cabanossi left
21:39
parv left,
Cabanossi joined
21:41
espadrine left
21:44
cpage_ left,
ab6tract joined
|
|||
ab6tract | m: dd [(^)] ( g => 5 ).Bag, (g => -5 ).Bag; # :( | 21:45 | |
camelia | ("g"=>5).Bag | ||
21:46
Popov_ joined
21:47
Popov_ left
|
|||
ab6tract | .tell lizmat i'm afraid i do not understand why that is a better answer than the actual distance between the values in these two bags. | 21:47 | |
yoleaux | ab6tract: I'll pass your message to lizmat. | ||
ab6tract | m: dd [(^)] ( g => 5 ).Bag, (g => -6 ).Bag; # nothing changes? why? | 21:48 | |
camelia | ("g"=>5).Bag | ||
ab6tract | anyway, good night #perl6 | 21:49 | |
21:54
ab6tract left
21:58
lizmat left
21:59
lizmat joined
|
|||
lizmat | . | 22:00 | |
yoleaux | 21:47Z <ab6tract> lizmat: i'm afraid i do not understand why that is a better answer than the actual distance between the values in these two bags. | ||
lizmat | .tell ab6tract (g => -5).Bag === bag(), that's why, you probably want Mixes ? | ||
yoleaux | lizmat: I'll pass your message to ab6tract. | ||
lizmat | m: dd [(^)] ( g => 5 ).Mix, (g => -5 ).Mix | 22:01 | |
camelia | ("g"=>10).Mix | ||
22:03
lucasb left
22:04
lostinfog left
22:11
cpage_ joined
22:22
rindolf left
22:25
zoll joined
22:27
Xliff joined
22:39
unicodable6 left
22:40
unicodable6 joined,
ChanServ sets mode: +v unicodable6
22:50
lizmat left
22:53
skids joined
23:16
mcmillhj joined
23:21
mcmillhj left
23:30
lizmat joined
23:32
cdg joined,
mcmillhj joined
23:36
cdg_ left,
cdg left
23:37
mcmillhj left
23:38
|oLa| left
23:54
MasterDuke joined
23:59
alimon left
|