»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! Set by moritz on 22 December 2015. |
|||
00:11
kurahaupo left
00:13
pierre_ joined
00:21
tmtowtdi left
00:23
_dolmen_ left
00:24
finanalyst_ joined
00:53
jrusso joined,
jrusso is now known as MadcapJake
|
|||
MadcapJake | phew, finally back to a desktop after botching a distro ugprade | 00:54 | |
geekosaur can | 00:55 | ||
geekosaur can't wait for his turn at that | 00:56 | ||
(been putting off mint 17.3 upgrade on desktop) | |||
(laptop will probably be worse, though, as I'd been using secure boot and ubuntu dropped it so it's gone in mint 17.3) | |||
MadcapJake | luckily i put my /home in a separate partition | 00:57 | |
geekosaur | I do have backups, but. | ||
MadcapJake | not me, I like to live on the edge :P | 00:58 | |
AlexDaniel | .tell TimToady qww<foo „hello world” bar> – no quote protection here. Was it supposed to be this way or is it a bug? | 01:00 | |
yoleaux | AlexDaniel: I'll pass your message to TimToady. | ||
01:01
sufrosti1o joined
01:03
MadcapJake left
01:05
jrusso joined,
jrusso is now known as MadcapJake
01:14
ggoebel114 left
01:22
ggoebel114 joined
01:27
sufrosti1o left
01:31
sufrostico left
01:35
roy__ joined
01:36
roy__ left
01:38
BenGoldberg joined,
molaf left,
BenGoldberg left
01:43
BenGoldberg joined
01:45
kid51 left,
ilbot3 left
01:46
BenGoldberg left
01:47
ilbot3 joined
01:50
molaf joined
01:51
BenGoldberg joined
01:52
BenGoldberg left
01:57
BenGoldberg joined
02:03
finanalyst_ left
02:07
AlexDaniel left
02:15
ssotka left
02:21
Zoffix left
02:22
tbrowder_ joined
02:23
BenGoldberg left
02:24
BenGoldberg joined
02:25
BenGoldberg left
02:26
tbrowder_ left
02:37
BenGoldberg joined
02:45
BenGoldberg left
02:47
BenGoldberg joined
02:51
noganex joined
02:53
cpage_ left
02:54
BenGoldberg left,
noganex_ left
02:55
BenGoldberg joined
02:59
sortiz left
03:07
Tonik joined
03:08
Ben_Goldberg joined,
BenGoldberg left
03:10
Ben_Goldberg is now known as BenGoldberg
03:11
|2701 left
03:23
Tonik left
03:27
pierre_ left
03:34
pierre_ joined
03:35
cpage_ joined
03:45
boegel left
03:46
pierre_ left
03:50
boegel joined
03:55
pierre_ joined
03:56
cpage_ left
03:57
cpage_ joined
03:59
zakharyas joined
04:10
khw left
04:12
cpage_ left
04:14
ssotka joined
04:20
MadcapJake left
04:21
jrusso joined,
jrusso is now known as MadcapJake
04:22
BenGoldberg left
|
|||
pierrot | Good night. | 04:26 | |
04:27
BenGoldberg joined
04:28
BenGoldberg left
|
|||
pierrot | if I have an array of strings and want to build a regular expression for the first string of the array followed by some text followed by the second string of the array and so on.. how could I do that in p6? | 04:30 | |
in perl 5, I would do something like $pattern = join ".*", map{quotemeta} @keywords and then qr/$pattern/.. | 04:32 | ||
04:32
huggable joined
04:33
pierre_ left,
BenGoldberg joined
04:34
pierre_ joined
04:35
pierre_ left
04:36
skids left
05:09
mohae_ joined
05:12
mohae left
05:18
MadcapJake left
05:22
jrusso joined
05:23
jrusso is now known as MadcapJake
05:25
CIAvash joined
05:26
zakharyas left
05:34
BenGoldberg left
05:37
cgfbee joined
05:47
MadcapJake_ joined
05:54
domidumont joined
05:58
buharin joined,
domidumont left
|
|||
CIAvash | pierrot: I think this should work: $text ~~ /<{@keywords.join: '.*'}>/ | 05:59 | |
05:59
domidumont joined
|
|||
CIAvash | or my $pattern = @keyworkds.join: '.*'; /<$pattern>/ | 06:00 | |
06:04
lizmat left
06:18
ssotka left
06:23
pierre_ joined
06:30
firstdayonthejob joined
06:34
RabidGravy joined
|
|||
CIAvash | That's without the quotemeta part though | 06:35 | |
06:37
firstdayonthejob left
06:44
wamba joined
06:46
mr-foobar joined
06:56
buharin left
07:03
brrt joined
07:05
jack_rabbit joined
|
|||
RabidGravy | badoom! | 07:20 | |
07:20
mohae_ left
07:35
as joined
07:42
_28_ria left
07:46
darutoko joined,
TEttinger left
07:47
_28_ria joined
07:48
pierre_ left
07:49
g4 joined
07:50
pierre_ joined
07:55
pierre_ left
07:57
jack_rabbit left
08:00
_28_ria left
08:01
dakkar joined
08:02
_28_ria joined
08:03
azawawi joined
|
|||
azawawi | . | 08:03 | |
RabidGravy: ping | 08:04 | ||
RabidGravy | bloop! | ||
azawawi | RabidGravy: good morning :) | 08:05 | |
RabidGravy: strange output after adding provides on 2016.05 gist.github.com/azawawi/72729d6b5a...8bc0dbe5f5 | |||
RabidGravy: did you encounter such a problem? | |||
RabidGravy | nope | 08:06 | |
that's odd | |||
something is doing "fail()" without a message | 08:08 | ||
azawawi | Build.pm without 'use LWP::Simple' works btw... | 08:09 | |
strange | |||
tried adding "build-depends": [ "panda", "Shell::Command", "LWP::Simple" ] | |||
same problem | |||
RabidGravy looks at the Build.pm | 08:11 | ||
azawawi | actually to be exact even 'use NativeCall' causes that | ||
with a bare class Build is Panda::Builder { ... } | |||
08:12
rindolf joined
08:13
nadim joined
|
|||
azawawi nukes 2016.05 and rebuilds it | 08:13 | ||
08:14
MadcapJake_ left
08:25
vike joined
08:28
cognominal left
08:32
huggable left,
huggable joined
|
|||
azawawi | RabidGravy: `zef install .` exhibits the same problem btw | 08:46 | |
RabidGravy: im suspecting that the first `panda install GTK::Simple` which fails somehow corrupts installation metadata | 08:47 | ||
RabidGravy: even zef uninstall GTK::Simple does not fix it | |||
RabidGravy | :_O | 08:57 | |
09:01
cpage_ joined
09:10
Sgeo left
|
|||
RabidGravy | azawawi, I've just made a reset branch without that stuff at github.com/perl6/gtk-simple/tree/before-split | 09:16 | |
a get out of jail free card | |||
09:17
labster left
|
|||
azawawi | RabidGravy: confirmed a fresh 2016.05 'panda install .' without doing a failed `panda install GTK::Simple` worked. It is a metadata corruption bug. | 09:18 | |
RabidGravy: sending a PR to fix the issue | |||
RabidGravy | if nothing else it will allow for a bisect to determine which part breaks it | ||
cool | 09:19 | ||
09:19
ab6tract joined
|
|||
ab6tract | o/ #perl6 | 09:19 | |
i noticed that this section is still TBD in the docs on NativeCall: docs.perl6.org/language/nativecall#..._and_Blobs | 09:20 | ||
09:20
sftp left
|
|||
ab6tract | i was wondering if anyone knows of any ecosystem examples? | 09:20 | |
also, the zavolaj-for-examples section of this doc feels a bit out of date | 09:23 | ||
tadzik | wow, metadata corruption is something new indeed | ||
RabidGravy | Yeah, I think it needs some love | 09:24 | |
09:24
sftp joined
|
|||
RabidGravy | tadzik, there was a change at some point in the last few weeks that got rid of some of the locking I think | 09:25 | |
tadzik | huh | 09:26 | |
ab6tract | RabidGravy: do you have any experience with NC blobby/buffy interop? | ||
i'll gladly write the section, once i've put it to some use | |||
RabidGravy | I'm not sure (too many modules) | 09:27 | |
I do know that it works however | |||
dalek | c: 501dd46 | ab5tract++ | doc/Language/nativecall.pod: Remove tiny typo |
||
ab6tract | cool, i'll poke around your github :) | 09:28 | |
09:29
cognominal joined
|
|||
azawawi | RabidGravy: travis-ci.org/azawawi/gtk-simple/b.../133062628 and ci.appveyor.com/project/azawawi/gt...uild/1.0.2 | 09:29 | |
RabidGravy | ab6tract, I can short cut that for you, I don't think that I have any modules that pass a Buf to a native sub directly (or any that return one) | 09:33 | |
azawawi, yeah, the tests won't run because no DISPLAY | |||
(just grepped all my modules) | 09:34 | ||
09:35
brrt left
|
|||
azawawi | github.com/perl6/gtk-simple/pull/35 | 09:36 | |
09:36
Emeric1 joined
|
|||
RabidGravy | I'm just going to merge that without testing ;-) | 09:40 | |
dalek | k-simple: ebaf0b1 | azawawi++ | META6.json: Add missing provides. Bump version to 0.1.2 |
||
k-simple: e929c3c | azawawi++ | / (3 files): Test on Linux/MacOSX (Travis CI, latest and 2016.05) and windows (AppVeyor, 2016.05). Add badges for AppVeyor |
|||
k-simple: b69c6aa | RabidGravy++ | / (4 files): Merge pull request #35 from azawawi/master Fix #34 and add mac os x and windows testing |
|||
ab6tract | RabidGravy: actually, your Audio::PortMIDI does do, for an error message | ||
RabidGravy | yeah I thought it was familiar | ||
timotimo | so, can we get an x server, like Xvnc or something running on travis-ci to have actual tests? | 09:41 | |
also the %*ENV<DISPLAY> is only sensible for linux, obviously | |||
ab6tract | m: class A does Positional { has @.a handles Positional; method gist { "i'm all like aaaaaa {@!a}" } }; my $a = A.new; say $a.push: 42 | 09:43 | |
camelia | rakudo-moar a5c46b: OUTPUT«Cannot call push(A: Int); none of these signatures match: (Any:U \SELF: |values is raw) in block <unit> at /tmp/u_eMfQ4Mj6 line 1» | ||
ab6tract | i'm clearly holding it wrong, but i thought something like the above used to work | 09:44 | |
no results for 'handles' on docs.perl6 | |||
RabidGravy | the way handles works it doesn't over-ridge the one it gets from 'Any' | 09:46 | |
so I don't think it ever worked | |||
m: class A does Positional { has @.a handles <push>; method gist { "i'm all like aaaaaa {@!a}" } }; my $a = A.new; say $a.push: 42 | |||
camelia | rakudo-moar a5c46b: OUTPUT«[42]» | ||
azawawi | RabidGravy: thx | 09:47 | |
RabidGravy | I do have a completely separate problem with GTK::Siimple as it is, it hangs "forever" precompiling | 09:48 | |
which is almost certainly something wrong with some repository | 09:49 | ||
09:50
lizmat joined
|
|||
azawawi | RabidGravy: it takes a white | 09:51 | |
RabidGravy: s/white/while | |||
lizmat waves from NLUUG Conference where [Tux] will give a presentation about Text::CSV in Perl 6: www.nluug.nl/activiteiten/events/v.../ab06.html | 09:52 | ||
RabidGravy | no, this is "forever" (like twenty minutes before I kill it,) | ||
:) | 09:54 | ||
anyway off out shopping | |||
lizmat | hmmm... RT #126391 | 09:58 | |
synopsebot6 | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=126391 | ||
10:07
donaldh joined
10:10
donaldh left,
donaldh joined
|
|||
ab6tract | RabidGravy: i could have sworn that at some point i was able to do `has %.hash handles Associative` but maybe it was only a dream... | 10:12 | |
but it's easy enough to get the semantics via handles <AT-KEY EXISTS-KEY ASSIGN-KEY> | 10:13 | ||
10:17
donaldh left
|
|||
ab6tract | of course, then you need to remember <keys kv values> as well | 10:17 | |
azawawi | 172 wallclock seconds after GTK::Simple refactor (classes/roles out) on 2016.05 | 10:18 | |
10:19
CIAvash left
|
|||
lizmat | ab6tract: not sure about that | 10:20 | |
jnthn doesn't recall that ever being something that would work | |||
timotimo | i think keys kv values happens via Any, which your class likely already derives from | ||
10:21
donaldh joined
|
|||
jnthn | You'd still need to delegate 'em to the right place though | 10:21 | |
lizmat | as long you have a .pairs, I think all will derive ok | ||
timotimo | oh, right, you need to have the source of "what keys exist at all" in the original handles | 10:23 | |
we don't have a single underlying thing for that | 10:24 | ||
like, no LOUD-KEBAB | |||
DrForr | Or -LOUD-ARROW-> :) | 10:25 | |
ab6tract | jnthn, lizmat: okay, conceded that the memory is not based on reality. it was a good dream, though... | 10:26 | |
m: class B { has %!f handles <AT-KEY EXISTS-KEY ASSIGN-KEY pairs> }; my $b = B.new; $b<foo> = 42; say $b.keys | 10:28 | ||
camelia | rakudo-moar a5c46b: OUTPUT«0..0» | ||
10:32
brrt joined
10:37
pierre_ joined
10:41
ab6tract left,
grondilu joined
11:04
donaldh left
|
|||
dalek | k-simple: ff396b5 | finanalyst++ | README.md: Improve README |
11:06 | |
k-simple: 585f611 | azawawi++ | README.md: Merge pull request #36 from finanalyst/master Improve README |
|||
11:09
ocbtec joined
11:19
donaldh joined
11:22
kid51 joined
|
|||
azawawi | dzone.com/articles/four-reasons-wh...mming-lang # Perl 6 is mentioned in comments | 11:24 | |
11:29
brrt left
11:30
donaldh left
11:36
cpage_ left
11:37
cpage_ joined
11:38
iH2O joined,
donaldh joined,
chris2 joined,
pmurias joined
11:43
perlawhirl joined
|
|||
grondilu | frankly I'm not sure Python is that easy to learn. Sure, for basic stuff it *looks* easy, but the devil is in the details and things gets messy quite quick. I remember learning about its OO model and all the __method__ syntax for stuff and it seemed pretty complicated to me. | 11:44 | |
perlawhirl | funny conversation to walk into... i was just discussing perl5 v. python to a guy at work | 11:45 | |
cosimo | what is the __method__ syntax? | ||
perlawhirl | i'm comfortable with python, but some things would be downright difficult for a biginner... eg. var = sys.argc[1]... if you don't supply an arg it gives you one of pythons trademark ugly stack traces... followed by "Index Error", which for a beginner is very unhelpful | 11:46 | |
DrForr | And I just had someone on FB ask me yesterday because I'm on "the Perl group" if I had any advice on how to learn Python. | ||
perlawhirl | i meant... argv, but my point stands | ||
also! try re.compile('[') and look at the very unhelpful wall of garbled stack trace. whereas perl will tell you "Unmatched '[' in regex HERE<---" | 11:48 | ||
11:48
kid51 left
11:49
donaldh left
|
|||
grondilu | cosimo: I hope I remember well but IIRC it's a special syntax for meta-method names | 11:49 | |
like __new__, __init__ and so on. | |||
perlawhirl | __repr__ and __str__, which are kinda like Perl 6's Str and gist methods | 11:50 | |
grondilu | I used to be excited about python. It lasted about a month. Now I hate it. It's dull and verbose. To me it's the new Fortran. | 11:51 | |
11:54
iH2O left
|
|||
azawawi | github.com/azawawi/gtk-simple/blob.../README.md # finanalyst++ | 11:56 | |
cosimo | it's not that bad | ||
12:00
brrt joined
|
|||
brrt | what kind of article is that, even | 12:02 | |
i mean | 12:03 | ||
psch | "agile methodology is scalable" made me stumble | ||
brrt | "python is highly efficient" made me | 12:04 | |
and i /like/ python... | |||
hmm, question | |||
12:05
nadim left
|
|||
brrt | if we were to put out articles of *ahem* similar quality, but with similar ferocity, would it work? | 12:05 | |
does this work, for python, to compete for mindshare? | |||
psch | it probably would invite the same quality of comments, but more and more contrarian | ||
i'm not really sure what "work" means here, though. will people talk about it? probably | 12:06 | ||
but it probably won't motivate people to honestly examine what Perl 6 brings - or rather, only very few | 12:07 | ||
but i guess that's true regardless, and putting out this kind of content definitely would increase exposure | |||
brrt | exposure is usually a good thing | 12:08 | |
DrForr | WTH does "Python even uses real-time wordings" mean? It's written in that Indian English dialect that makes me want to facepalm. | 12:09 | |
12:11
nadim joined
12:13
wamba left
|
|||
psch | i understood it as "words that programmers use conversationally" or somesuch | 12:14 | |
although i don't quite know how "def" fits in there :) | |||
pmurias | grondilu: dull is kind of an advantage compared to some other things | 12:15 | |
DrForr | Every section of that article uses circular reasoning. | 12:18 | |
12:26
mr-foobar left
12:32
huggable left
12:33
donaldh joined
12:42
brrt left
12:46
|2701 joined
12:47
pmurias_ joined
12:50
pmurias left
|
|||
moritz | ... and we all know that circular reasoning is the best, because it's circular! | 12:54 | |
El_Che_ | moritz: don't be a square! | ||
12:55
El_Che_ is now known as El_Che
13:01
woolfy joined
13:02
sufrostico joined
|
|||
woolfy | Tux++ now does a presentation at NLUUG conference about Text::CSV in Perl 6. :-) www.nluug.nl/activiteiten/events/v.../ab06.html | 13:03 | |
13:05
pmurias joined,
pmurias_ left
|
|||
DrForr | I've got 4 proposals in for OSCON London. If I'd known last year's was in Amsterdam... | 13:12 | |
13:13
pmurias_ joined,
pmurias left
|
|||
RabidGravy | Oooh that's a bit special, "RAKUDO_MODULE_DEBUG=1 perl6 -Ilib -MGTK::Simple -e1' seems to hang forever on attempt to write to STDOUT | 13:13 | |
DrForr | (and that I thought I'd stand a chance of getting in the door...) | 13:14 | |
13:15
smls joined
13:17
brrt joined
13:19
pmurias joined,
pmurias_ left
13:20
rindolf left
13:24
woolfy left,
pmurias_ joined
13:25
pmurias left
13:26
awwaiid left,
rindolf joined,
cognominal left,
awwaiid joined
|
|||
gregf_ | i guess the point azawawi was trying to make was ....'Perl6 is getting mentioned somewhere.. by some silly blogger'.. rather than ..'hey.. heres 4 reasons out of a million to make you feel good about python' ;) | 13:26 | |
13:28
cognominal joined
|
|||
[Coke] | alexdaniel: please don't "bombard" any of our backend support staff. | 13:28 | |
13:29
pmurias joined
13:31
brrt left
13:32
pmurias_ left
13:34
pmurias_ joined
13:37
pmurias left,
cpage_ left
13:41
skids joined
13:45
pmurias joined,
pmurias_ left
|
|||
[Coke] thanks everyone getting Perl 6 out on the conf. circuit. | 13:49 | ||
DrForr bows. And likewise to the others. | 13:50 | ||
13:57
rindolf left
14:02
lizmat left
14:03
_4d47 joined,
pmurias left
14:04
pmurias joined
|
|||
RabidGravy | I can't remember the last time I even went to a conference | 14:05 | |
14:05
acrussell joined
|
|||
_4d47 | p6: my @tens = 0, 10, 20, 30; @tens[2]:delete; dd @tens; | 14:07 | |
camelia | rakudo-moar 498d0a: OUTPUT«Array @tens = [0, 10, Any, 30]» | ||
azawawi | RabidGravy: what's a conference? :) | 14:08 | |
RabidGravy | :) | ||
DrForr | A way to get your company to pay for your beer? | 14:09 | |
gregf_ | we have conferences every morning....er... standups i mean ;) | ||
azawawi | RabidGravy: seems that use-ing ::NativeLib is causing the slowness in the refactor in GTK::Simple. im testing it to improve performance atm | 14:10 | |
14:11
pmurias_ joined,
pmurias left
|
|||
tony-o | DrForr: if you find a way for that outside of travel expenses please let me know | 14:11 | |
azawawi | RabidGravy: travis-ci.org/azawawi/gtk-simple/b.../133113522 | 14:12 | |
14:14
zakharyas joined
|
|||
RabidGravy | nicie! I'm wondering if the nqp and NativeCall can go from the main GTK::Simple if they are in all the other places they are needed | 14:15 | |
azawawi | RabidGravy: im doing it :) | ||
RabidGravy | cool | ||
azawawi | but .precomp is certainly a problem in 2016.05 | 14:16 | |
14:16
pmurias joined,
woodruffw left
|
|||
azawawi | everytime i move subs from one class/module with atom open and run a prove... .precomp corruption | 14:16 | |
RabidGravy | that's not good | 14:17 | |
llfourn | azawawi: does it look like RT #128156 ? | ||
synopsebot6 | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128156 | ||
azawawi | yup same error message | 14:19 | |
14:19
woodruffw joined,
pmurias_ left
|
|||
llfourn | yeah nine++ is looking into it | 14:19 | |
14:24
khw joined
|
|||
azawawi | nine++ # cool | 14:24 | |
14:24
kent\n joined
14:32
kent\n left
14:34
mohae joined
14:35
pierre_ left
14:36
cdg joined
14:39
lizmat joined
14:40
zakharyas left
|
|||
_4d47 | p6: my @tens = 0, 10, 20, 30, 40; @tens[3]:delete; dd @tens | 14:41 | |
camelia | rakudo-moar 498d0a: OUTPUT«Array @tens = [0, 10, 20, Any, 40]» | ||
_4d47 | p6: my @tens = 0, 10, 20, 30, 40; @tens[4]:delete; dd @tens | ||
camelia | rakudo-moar 498d0a: OUTPUT«Array @tens = [0, 10, 20, 30]» | ||
14:42
donaldh left
|
|||
llfourn | if you wanna remove it completely use splice I think | 14:42 | |
grondilu | m: say 0, 10 ... 40 | ||
camelia | rakudo-moar 498d0a: OUTPUT«(0 10 20 30 40)» | ||
_4d47 | looks like it change .elems but only for the last elems | ||
llfourn | mmm I think that's intended | 14:43 | |
14:43
donaldh joined
|
|||
gfldex | m: my @tens = 0, 10, 20, 30, 40; @tens[3]:delete; .say for @tens; | 14:44 | |
camelia | rakudo-moar 498d0a: OUTPUT«01020(Any)40» | ||
llfourn | m: my @tens = 0,10 ... 40; say @tens.splice(2,1); say @tens; | ||
camelia | rakudo-moar 498d0a: OUTPUT«[20][0 10 30 40]» | ||
14:45
pmurias_ joined,
g4 left
|
|||
ugexe | m: my @a = 1,2,3,4,5; @a[1]:delete; .say for @a[0..*]; # >:) | 14:46 | |
camelia | rakudo-moar 498d0a: OUTPUT«1» | ||
psch | ugexe++ | ||
that's pretty similar to what i was trying to hack together :) | |||
14:47
pmurias left
|
|||
ugexe | m: my @a = 1,2,3,4,5; @a[1]:delete; .say for @a[0..4] | 14:47 | |
camelia | rakudo-moar 498d0a: OUTPUT«1(Any)345» | ||
ugexe | .splice(0) follows example 1, .splice follows example 2 | 14:48 | |
RT 127573 | |||
pierrot | Good morning. I had asked something yesterday and CIAvash gave me an answer but without considering quoting. Which is the p6 equivalent to p5's quotemeta? | ||
llfourn | RT #127573 | ||
synopsebot6 | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=127573 | ||
psch | pierrot: we don't have quotemeta. interpolation of variables inside a regex depends on how you put the variable into the regex | 14:49 | |
geekosaur | pierrot, in general quotemeta isn't needed (for its intended purpose at least) because the default for interpolation is to interpolate as literal string match instead of regex. (there's an alternative interpolation syntax if you want it to be treated as a regex) | ||
gfldex | i somehow feel that representing a hole in an array with Any is wrong. Nil would fit better. Nothing is more hole-like and any possible value. | 14:50 | |
14:50
Actualeyes left
|
|||
pierrot | geekosaur and psch : yes, I learnt that yesterday. interpolation is enabled with <$var> | 14:50 | |
14:50
sufrostico left
|
|||
gfldex | s/and/then/ | 14:50 | |
psch | m: my $x = '\w'; say '\w' ~~ /$x/; say 'a' ~~ /<$x>/ | ||
camelia | rakudo-moar 498d0a: OUTPUT«「\w」「a」» | ||
psch | ah, yeah | ||
m: my @a is default(10) = ^10; @a[1] = Nil; @a[2]:delete; .say for @a | 14:52 | ||
camelia | rakudo-moar 498d0a: OUTPUT«010(Any)3456789» | ||
psch | that surprised me. i had thought :delete respects the default | ||
ugexe | Nil seems like it would muck up `is default` | ||
this time i was beaten | |||
lizmat | psch: this feels like a bug to me | 14:54 | |
but it all depends on the semantics of :delete | |||
m: my %h is default(10); say %h<a> | 14:55 | ||
camelia | rakudo-moar 498d0a: OUTPUT«10» | ||
14:55
itaipu joined
|
|||
lizmat | hmmm | 14:55 | |
ugexe | i would not expect :delete to set a default value | ||
_4d47 | find weird .elems respond differently when :delete on last item | ||
moritz | if you want that, there's an undefine() function for that | ||
14:56
wamba joined
|
|||
gfldex | if you revert to the default, the Array loses his ability to have a hole. Unless you define Arrays with defaults to be hole-less. | 14:56 | |
moritz | _4d47: if you want it to keep the element alive, you can always just set it to Nil | ||
lizmat | moritz: undefine is just another way to say = Nil | ||
moritz | right | ||
lizmat | multi sub undefine(Mu \x) is raw { x = Nil } | ||
moritz | and if you want to remove an element from the middle of the list, making the higher indexes change, you can use splice | ||
so, whatever behavior you want, there are ways to get it :-) | 14:57 | ||
there simply isn't a way to make every way behave in ways that don't surprise anybody | |||
lizmat | m: my @a is default(10) = ^10; @a[1] = Nil; @a[2]:delete; say @a[2] | 14:59 | |
camelia | rakudo-moar 498d0a: OUTPUT«10» | ||
_4d47 | moritz: ok thanks, will use splice | ||
gfldex | m: my @a = 1,2,3; @a[1]:delete; say @a[1]; say @a[100] | ||
camelia | rakudo-moar 498d0a: OUTPUT«(Any)(Any)» | ||
lizmat | ok, so the Iterator is wrong | ||
ugexe | if your array ends with Anys they get cleaned up | 15:00 | |
psch | with i, personally, find completely reasonable. otherwise .elems should always report Inf (at least on default(Any) arrays) | ||
s/with/which/ | |||
15:01
ptolemarch joined
|
|||
ugexe | its just combined with rt 127573 can produce the type of .elems results that seem to match _4d47's confusion | 15:02 | |
pierrot | geekosaur: I'd like to do something similar to: my $pattern=join ".*", map{quotemeta} @keywords;if ($text =~ m/$pattern/) { } In p6, CIAvash suggested: my $pattern = @keyworkds.join: '.*'; if $text ~~ /<$pattern>/ { } but would fail with quoting issues. | 15:04 | |
I'd like each individual element of @keywords to be treated as literal, but the whole string (with ".*" separating each element) to be treated as a regexp and I'm not sure how to do it. | 15:05 | ||
15:05
rindolf joined
|
|||
psch | m: my @keywords = '\wfoo', "bar"; my $pat = "'" ~ @keywords.join("' .* '") ~ "'"; say '\wfoo and eventually bar' ~~ /<$pat>/ | 15:06 | |
camelia | rakudo-moar 498d0a: OUTPUT«「\wfoo and eventually bar」» | ||
psch | pierrot: does that ^^^ help? | 15:07 | |
gfldex | doc.perl6.org/language/subscripts#%3Adelete doesn't explain that holes are filled with Any. We seam not to explain (anywhere) what happens when Nil is assigned. | ||
15:08
acrussell left
|
|||
pierrot | psch: Yes, it does. Thanks :) | 15:08 | |
gfldex | m: my @a = 1,2,3; @a[1]:delete; say @a[1]:exists; | ||
camelia | rakudo-moar 498d0a: OUTPUT«False» | ||
15:10
pmurias_ left
|
|||
gfldex | m: my @a = 1,2,3,Any; @a[1]:delete; say @a[1]:exists; say @a[3]:exists; | 15:10 | |
camelia | rakudo-moar 498d0a: OUTPUT«FalseTrue» | ||
15:11
Amnez777 left
|
|||
gfldex | m: my @a = 1,2,3,Any; @a[1]:delete; say @a[1]:exists; say @a[3]:exists; say .defined for @a; | 15:11 | |
camelia | rakudo-moar 1ab1fb: OUTPUT«FalseTrueTrueFalseTrueFalse» | ||
gfldex | Interation turns holes into undefineness. | ||
15:12
pmurias joined
|
|||
psch | m: my @a = 1,2,3,Any; @a[1]:delete; say @a[1]:exists; say @a[3]:exists; say ""; say .defined for @a; say @a[1]:exists; say ""; say @a[3]:exists | 15:21 | |
camelia | rakudo-moar 1ab1fb: OUTPUT«FalseTrueTrueFalseTrueFalseFalseTrue» | ||
psch | eh, one of the extra says for clarity is actually at the wrong spot :| | 15:22 | |
anyway, i don't think iteration changes anything | |||
Any is just undefined | |||
lizmat | not for .defined | 15:23 | |
but it does for just the for | |||
psch | right, there was the other WAT previously | ||
pochi | m: $?USAGE | ||
camelia | rakudo-moar 1ab1fb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/YzfhVNKYiSVariable '$?USAGE' is not declaredat /tmp/YzfhVNKYiS:1------> 3<BOL>7⏏5$?USAGE» | ||
lizmat | m: my @a is default(42) = ^5; @a[2]:delete; .say for @a; for @a.keys -> { say @a[$_] } | 15:24 | |
camelia | rakudo-moar 1ab1fb: OUTPUT«01(Any)34Too many positionals passed; expected 0 arguments but got 1 in block <unit> at /tmp/Ma0GoNIFCk line 1» | ||
15:24
patrickz joined,
sufrostico joined
|
|||
lizmat | m: my @a is default(42) = ^5; @a[2]:delete; .say for @a; for @a.keys { say @a[$_] } | 15:24 | |
camelia | rakudo-moar 1ab1fb: OUTPUT«01(Any)34014234» | ||
psch | yeah, that is definitely weird | ||
15:25
cognominal left,
cognominal joined
|
|||
psch | m: my @a is default(42) = ^5; @a[2]:delete; @a[$_].say for @a.keys; | 15:25 | |
camelia | rakudo-moar 1ab1fb: OUTPUT«014234» | ||
psch | m: my @a is default(Mu) = ^5; @a[2]:delete; @a[$_].say for @a.keys; | 15:26 | |
camelia | rakudo-moar 1ab1fb: OUTPUT«01(Mu)34» | ||
dalek | c: 5049338 | (Wenzel P. P. Peppmeyer)++ | doc/Language/subscripts.pod: clarify that :delete can create holes that are bit skipped by iteration |
15:27 | |
gfldex | looks like i need more tea | ||
15:28
Azry_mobile joined
|
|||
lizmat | m: my Mu @a = ^5; @a[2]:delete; .say for @a; say @a[2] # seems it's always Any | 15:30 | |
camelia | rakudo-moar 1ab1fb: OUTPUT«01(Any)34(Mu)» | ||
gfldex | m: my @a = 1,Nil,3; say @a[1]:exists; .say for @a; | 15:32 | |
camelia | rakudo-moar 1ab1fb: OUTPUT«True1(Any)3» | ||
gfldex | So the value that indicates the absense of a value is present? | ||
lizmat | m: my Int @a = 1,Nil,3; say @a[1]:exists; .say for @a; | ||
camelia | rakudo-moar 1ab1fb: OUTPUT«True1(Int)3» | ||
psch | gfldex: assigning Nil always means "reset to default" | 15:33 | |
lizmat | yes, if it exists, there's a container for it which has the default value | ||
m: my Int @a is default(42) = 1,Nil,3; say @a[1]:exists; .say for @a; | |||
camelia | rakudo-moar 1ab1fb: OUTPUT«True1423» | ||
gfldex | That means that :exists doens't test for the existence of a value but for a container that could contain the value or it's default. | 15:35 | |
psch | fwiw, :exists and :delete (especially on arrays) are something i am staying clear of and don't want to argue for or against :) | 15:37 | |
lizmat | well, in a case of a hash, it's clear what exists means | ||
in the case of an array, less so | |||
gfldex | Nothing is hard. :-| | ||
gregf_ | coding is :| | 15:38 | |
ugexe | only 1 thing is universally accepted as not easy | 15:39 | |
15:43
CIAvash joined
15:45
domidumont left
|
|||
sjn | ugexe: cache validation and off-by-one errors? ;) | 15:47 | |
dalek | c: 892e14f | titsuki++ | doc/Language/glossary.pod: Fix a typo "gitub" to "github" |
15:48 | |
c: fd8f366 | RabidGravy++ | doc/Language/glossary.pod: Merge pull request #549 from titsuki/fix-typo Fix a typo "gitub" to "github" |
|||
MadcapJake | oh man, the "Python is Highly Scalable" paragraph in that article is completely bonkers | ||
"When a client requires a large amount of development for a software application that does not require for the project to be complete, the application can be moved to live at any moment of the development process by completing a certain amount of modules of the application" O_O | 15:50 | ||
DrForr | The article just made up reasons. | ||
15:50
Actualeyes joined
|
|||
MadcapJake | seriously that one sentence is just complete gobbledygook | 15:51 | |
tadzik | wat | ||
DrForr | You could s/Python/ = 'Ruby' # and noone would notice. | ||
RabidGravy | read it four times to see if there was any sense to be extracted, failed | ||
tadzik | "when a client requires for a large building to be completed, you can just ship a standalone bathroom and call it a day" | ||
huf | i think it means that if the client wants something complicated, release some half-baked shit and they wont notice | 15:52 | |
most likely | |||
MadcapJake | every read makes me go from "WHAT?" to shear laughter, it's so completely nonsense | ||
stmuk | maybe its a Markov chain | ||
huf | it's a sortof depressive, nihilist twist on "release early, release often" :D | ||
MadcapJake | stmuk: I wouldn't doubt it, it's at that level of incomprehension | ||
huf: lol that is hilarious | |||
huf | yeah but it's kinda real | 15:53 | |
client wants a bunch of undefined crap, you complete what you were able to figure out, the client sends incomprehensible feedback, you react by doing *something* | 15:54 | ||
MadcapJake | I like dark comedy so the more real, the more I'll laugh :) | ||
RabidGravy | yeah, it's aiming at rapid application development and continuous integration but somehow missing explaining either of those things | ||
huf | eventually the client just quiets down and goes away | ||
psch | "no bug reports means no bugs, right?" | ||
MadcapJake | RabidGravy: I think there's an element of modularity that the author is trying to describe too | ||
huf | psch: correction. no comprehensible bug report = no bug report | ||
psch | huf: that sounds more like corollary :) | 15:55 | |
MadcapJake | I could seriously start a tumblr of some of the crazy nonsense people throw around in these "X reasons that X language is the BEST!" articles | 15:56 | |
psch .oO( Perl 6 reasons that Perl 6 language is the BEST ) | |||
MadcapJake | lol | 15:57 | |
"Almost all of the syntax is very similar to "real-life" words." Oh. My. God. This article is a gold mine. | 15:58 | ||
huf | :D | ||
when i ()()()() this morning i ()() == | |||
MadcapJake | Ok, I seriously can't handle it. I'm starting a tumblr. Someone else has got to get as much joy out of this as I do. | 15:59 | |
RabidGravy | :) | 16:01 | |
16:02
ssotka joined
16:03
gorgonzola joined
|
|||
skids | glfdex: Maybe link to docs.perl6.org/type/Nil when explaining :delete? | 16:06 | |
lizmat | +1 from me | 16:08 | |
gfldex | it's one sentence to tell the difference between assigning Nil and :delete | 16:09 | |
lizmat | gfldex: but the only difference *should* be that :delete will make :exists for that element False | 16:11 | |
16:12
domidumont joined
|
|||
lizmat | it's only the iterator on Array that seems wrong (and I'm looking into fixing that) | 16:12 | |
azawawi | RabidGravy: re GTK using only ::App, ::VBox and ::Button in 01-hello-world.pl6 => ~36 second (down from ~170 sec) parse time, ~3 second runtime (second time) | ||
tadzik | that's still a crazy parsetime | 16:13 | |
azawawi | so moving classes/roles out of ::Simple | 16:14 | |
shows a big performance bug in rakudo | |||
dalek | c: 3d247b7 | (Wenzel P. P. Peppmeyer)++ | doc/Language/subscripts.pod: clarify interaction between assignment of Nil and subscripts |
16:15 | |
azawawi | i will try switching to moar-nom to verify whether it is fixed or not | 16:16 | |
RabidGravy | azawawi, all good stuff though | 16:17 | |
gfldex | lizmat: i'm not sure anymore of iteration of holes is wrong right now. If autoviv for elemets addressed with a subscript returns the default value, a hole in an Array should do so too. They are Arrays not linked lists. | ||
RabidGravy | azawawi, it could probably be shrunk a little by removing all of the unused native subs too | 16:19 | |
azawawi | RabidGravy: im working on it github.com/azawawi/gtk-simple/commits/master :) | 16:20 | |
16:20
dwarring left
|
|||
RabidGravy | looks good | 16:22 | |
16:24
gorgonzola left
16:25
araujo_ joined
16:27
CIAvash left
16:28
smls_ joined,
smls left
16:29
araujo left
16:31
Amnez777 joined
16:32
huggable joined
16:33
silug left
16:37
itaipu left
16:38
araujo_ left,
araujo joined,
araujo left,
araujo joined
16:43
cognominal left
16:44
kaare_ joined
16:45
cognominal joined
16:47
donaldh left
16:48
silug joined
16:52
vike left
16:54
_4d47 left
16:57
labster joined
17:03
cognominal left
17:04
cognominal joined
17:05
kurahaupo joined,
tharkun left,
tharkun joined
17:06
brrt joined
17:07
dakkar left,
MadcapJake left
17:08
jrusso joined,
jrusso is now known as MadcapJake
17:14
lizmat left
17:21
ZoffixW joined
|
|||
ZoffixW | RabidGravy, which RPi did you install Perl 6 on? I'm wondering whether it'll work at all with Pi Zero | 17:22 | |
azawawi | is there any performance advantage to using need or require over use? | ||
ZoffixW wants to make his A/C Internet Connected :P | |||
azawawi, highly doubt it, since you're loading the module at runtime | 17:23 | ||
RabidGravy | ZoffixW, I've got it installed on both a Rev. B and Pi 2, the former is way slow | ||
azawawi | ZoffixW: so we cant use 'require' to lazily load a module anymore, right? | 17:24 | |
ZoffixW | azawawi, oh, I think that'll work just fine. And yeah, in that case it'll probably be a performance advantage, since you don't have to load the module when you don't need it | 17:25 | |
17:25
vike joined
|
|||
psch | conditional loading isn't quite lazy loading, is it? | 17:26 | |
RabidGravy | "but" any symbols defined in the module won't be known at compile time, so you may have to jump through hoops | ||
ZoffixW | Then I don't know what lazy loading is :) | ||
psch might just be overly picky there | |||
azawawi | so github.com/azawawi/gtk-simple/blob...Simple.pm6 is a bad practice | 17:27 | |
psch | i admit that "lazy loading" as "runtime loading" is probably usually used for what i called "conditional loading" just now | ||
e.g. "when we need it, we load it" | |||
ugexe | lazy loading (like what was attempted at one time) would load the symbols and everything still | ||
psch | ...that doesn't really clarify i think | ||
more like "when we know we are going to use it, we load it explicitly" | |||
whereas lazy loading to me reads more as "we know we will use it eventually, but until we do we don't load it" | 17:28 | ||
which isn't what <use> currently does | |||
mostly because of RabidGravy++'s point above | |||
Juerd | I find 'lazy loading' quite vague as a term. "On-demand loading" is much clearer but I never see that used. | ||
Maybe it's just me | |||
psch | Juerd: no, i do agree. i think that's a good alternative | ||
the distinction of "the language user does it manually" vs "the runtime does it automagically" is what i'd but between on-demand loading and conditional loading | 17:29 | ||
...that's chiastic btw :) | |||
azawawi compares performance with github.com/perl6/gtk-simple/tree/before-split | 17:30 | ||
ugexe | i just hide all the hoop jumping inside a (caching) service locator | ||
17:32
ZoffixW left
17:35
sufrostico left
|
|||
pmurias | what would be a good way in JavaScript to make a method call on a Scalar be passed on to it's value? | 17:36 | |
a Proxy would work although I read somewhere it has performance issues on v8 | 17:38 | ||
jnthn | pmurias: A method call on a Scalar is a call on the Scalar itself; it's that a bunch of ops imply a decont on a certain argument that makes it happen on the underlying value | 17:40 | |
pmurias: So they'd compile into a decont then a method call on the value | |||
Or at least, that's how it happens elsewhere :) | |||
17:41
|2701 left
17:42
Tonik joined
|
|||
azawawi | RabidGravy: Before split => 24s startup, 3s runtime. After split => 2m52s startup, 11s runtime, Optimized => 1m57s startup, 11s runtime for 01-hello-world | 17:43 | |
17:44
sena_kun joined
|
|||
RabidGravy | if nothing else it has increased the amount of i/o involved | 17:45 | |
azawawi | SSD here | ||
github.com/perl6/gtk-simple/pull/37 | 17:48 | ||
azawawi movie night & | 17:49 | ||
17:55
sufrostico joined
|
|||
pmurias | jnthn: thanks, got confused and what I planned would have made it impossible to call methods on the container itself | 17:59 | |
dalek | k-simple: 6e69610 | azawawi++ | .travis.yml: Install gtk3 on MacOS X Travis CI |
18:00 | |
gtk-simple: e48a477 | azawawi++ | README.md: | |||
gtk-simple: More documentation in README | |||
18:00
dalek left,
dalek joined,
ChanServ sets mode: +v dalek
|
|||
sena_kun | hi, #perl6. Is it achievable to pass a hash with arguments to a class constructor to create object? Class has many fields and pass them all to bless sub will be ugly, really ugly. | 18:03 | |
perlpilot | sena_kun: Thingy.new(|%stuff) | ||
sena_kun | perlpilot, thanks! | 18:04 | |
18:08
cdg left
18:09
pmurias_ joined
|
|||
smls_ | sena_kun: Be careful with that though. If the Hash contains Array value, they will not initialize an `@.array` attribute the way you'd expect. | 18:11 | |
The `@.array` attribute will end up with a single element, which is in turn the Array value from the Hash. | 18:12 | ||
18:12
labster left
18:13
pmurias left
|
|||
smls_ | And unfortunate consequence of the facts that Hashes containerize their arguments, and `bless` uses assignment rather than binding to attributes. | 18:13 | |
*An | |||
18:19
spider-mario joined
18:20
pmurias_ left
|
|||
psch | m: class A { has @.a }; say A.new(:a[1,2,3]).perl | 18:23 | |
camelia | rakudo-moar 1ab1fb: OUTPUT«A.new(a => [1, 2, 3])» | ||
psch | m: class A { has @.a }; say A.new(:a[1,2,3]).a.perl | 18:24 | |
camelia | rakudo-moar 1ab1fb: OUTPUT«[1, 2, 3]» | ||
psch | m: class A { has @.a }; say A.new(:a[1,2,3]).a[1].perl | ||
camelia | rakudo-moar 1ab1fb: OUTPUT«2» | ||
psch | m: class A { has @.a }; say A.new(my % = a => [1,2,3]).a[1].perl | ||
camelia | rakudo-moar 1ab1fb: OUTPUT«Default constructor for 'A' only takes named arguments in block <unit> at /tmp/Os6iMZ_WlK line 1» | ||
psch | m: class A { has @.a }; say A.new(|(my % = a => [1,2,3])).a[1].perl | ||
camelia | rakudo-moar 1ab1fb: OUTPUT«Any» | ||
psch | smls_++ | ||
m: class A { has @.a }; say A.new(|(my % = a => |[1,2,3])).a[1].perl | 18:32 | ||
camelia | rakudo-moar 1ab1fb: OUTPUT«Any» | ||
psch | yeah, there's probably no trickery possible there | ||
18:32
nadim left
|
|||
psch | well, aside from a custom BUILD probably | 18:32 | |
or new, or whichever vOv | |||
18:35
xue_ joined
18:36
xue_ left
18:37
maybekoo2 joined
18:38
maybekoo2 left
18:40
maybekoo2 joined
18:43
araujo_ joined
|
|||
ugexe | i flatten inside a BUILDALL :/ | 18:45 | |
18:47
araujo left
18:52
telex left
18:53
telex joined
18:55
labster joined
18:58
lizmat joined
19:00
cognominal left,
cognominal joined
19:01
nicqbot joined
19:07
brrt left
|
|||
azawawi | RabidGravy: ping | 19:09 | |
RabidGravy | erp | ||
azawawi | RabidGravy: best optimization so far is 'use GTK::NeededModule' instead of 'GTK::Simple' | 19:10 | |
RabidGravy: 2s when using the modules needed | |||
RabidGravy | yeah, I figure that would | 19:11 | |
azawawi | builder pattern for the rescue? :) | 19:16 | |
19:18
rindolf left
19:21
AlexDaniel joined
19:22
cpage_ joined
|
|||
AlexDaniel | [Coke]: perhaps you are right and I shouldn't've said that. However, there is a problem that is not going anywhere, what's your solution? | 19:23 | |
19:25
Cabanossi joined
|
|||
dogbert17 | o/ #perl6 | 19:32 | |
is anyone interested in taking a look at an, admittedly feeble, attempt document the 'default' method in the Hash class? | 19:33 | ||
19:34
domidumont left
|
|||
dogbert17 | it's here gist.github.com/dogbert17/20650772...33d5df0f91 | 19:34 | |
nicqbot | It seems ok, for the 'Defined' part I would put "... returns Any or initalized value/object". Something like that. | 19:39 | |
19:40
kent\n joined,
kent\n left,
kent\n joined
|
|||
dogbert17 | nicqbot: thx | 19:41 | |
19:43
Azry_ joined
19:44
azawawi left
19:47
Azry_mobile left
19:48
nicqbot left
19:50
kent\n left
19:59
kent\n joined
20:12
firstdayonthejob joined
20:13
ocbtec left
|
|||
AlexDaniel | m: my %h; %h.default = 42; say %h<abc> | 20:13 | |
camelia | rakudo-moar 1ab1fb: OUTPUT«Cannot modify an immutable Any in block <unit> at /tmp/m4nXmIulAJ line 1» | ||
Emeric1 | Are the Data::Dump tests broken ? I can't install it with panda | 20:17 | |
20:18
_dolmen_ joined
|
|||
Emeric1 | Is there a way to avoid erros durings the tests with panda ? | 20:18 | |
20:18
darutoko left,
Tonik left
20:19
sena_kun left
20:21
brrt joined
|
|||
[Coke] | AlexDaniel: what's the problem? | 20:28 | |
Emeric1: there's a force option, IIRC. | |||
20:32
smls_ is now known as smls,
huggable left
20:33
cdg joined
20:34
nadim joined
|
|||
grondilu | just received an email from Jeff Bezos | 20:34 | |
oops sorry wrong chan | 20:35 | ||
[Coke] backlogs. | 20:37 | ||
tbrowder | bye | 20:38 | |
[Coke] | .tell AlexDaniel so, if this happens again, have that person send an email, but be sure to reference that it's happened before (with ticket ids or account names if possible) and point out that it might be a trend. | ||
yoleaux | [Coke]: I'll pass your message to AlexDaniel. | ||
20:38
tbrowder left
|
|||
pochi | m: sub foo() returns Array of Int { return 1,2,3 }; foo() | 20:38 | |
camelia | rakudo-moar 1ab1fb: OUTPUT«Type check failed for return value; expected Array[Int] but got List ($(1, 2, 3)) in sub foo at /tmp/61nLnD08VA line 1 in block <unit> at /tmp/61nLnD08VA line 1» | ||
pochi | is it possible to add a return signature for listy things? | 20:39 | |
something that catches both return 1,2,3 and return @x | |||
ugexe | m: sub foo(--> Array) { @ = 1,2,3 }; foo() # might work for you | 20:42 | |
camelia | ( no output ) | ||
pochi | I'd like to constrain it to a type though | 20:43 | |
20:46
sufrostico left
|
|||
ugexe | m: my List of Int $list = 1,2,3 | 20:46 | |
camelia | rakudo-moar 1ab1fb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/TgWDraLGuBList cannot be parameterizedat /tmp/TgWDraLGuB:1------> 3my List of Int7⏏5 $list = 1,2,3» | ||
ugexe | otherwise wrap/multi-dispatch to check the return value and do any neccesary transformation into a single return type | 20:47 | |
20:49
kaare_ left
20:53
wamba left
|
|||
Xliff | roles can't inherit from a base class, correct? | 20:55 | |
dalek | c: fda109d | (Jan-Olof Hendig)++ | doc/Type/Hash.pod: Added docs for method default in class Hash |
20:56 | |
ugexe | m: class Foo { method x { 1 }; }; role Bar { method xx { $.x; }; }; class Foo2 does Bar { }; say Foo2.new.xx | 20:57 | |
camelia | rakudo-moar 1ab1fb: OUTPUT«Method 'x' not found for invocant of class 'Foo2' in method xx at /tmp/5sEwBHTCqJ line 1 in block <unit> at /tmp/5sEwBHTCqJ line 1» | ||
ugexe | m: class Foo { method x { 1 }; }; role Bar { method xx { $.x; }; }; class Foo2 is Foo does Bar { }; say Foo2.new.xx | 20:58 | |
camelia | rakudo-moar 1ab1fb: OUTPUT«1» | ||
Xliff | ugexe: Hrm. I might need to go into the long explanation, here. However, this is still half baked stuff. | 20:59 | |
Maybe later. I need to give this more thought. | 21:00 | ||
ugexe | for the most part a role body is simply pasted into the class body | 21:01 | |
21:03
skids left
|
|||
Xliff | Right. OK. I have a class A::Base, A::A and A::B. A::A and A::B are functionally unrelated, but both inherit from A::Base | 21:04 | |
However A::B is more complex than A::A and has several "sections" I want to split into roles. | |||
However the roles still need methods from A::Base. | |||
What's the best way to handle that? Role parameterization? | |||
ugexe | because A::B is A::Base you should just be able to compose the roles into A::B as expected. you may ask yourself why you want to compose the parts into A::B at all if they aren't otherwise reusable or if A::B will always use the same parts | 21:08 | |
AlexDaniel | [Coke]: I think that it's not just a trend, but any new account has this problem | ||
yoleaux | 20:38Z <[Coke]> AlexDaniel: so, if this happens again, have that person send an email, but be sure to reference that it's happened before (with ticket ids or account names if possible) and point out that it might be a trend. | ||
AlexDaniel | [Coke]: I'll create a new account to prove that… | ||
21:08
brrt left
|
|||
Xliff | ugexe, A::B will always use the same parts, but I'm hoping I don't have to maintain a large, monolithic file for A::B. | 21:08 | |
21:09
araujo_ left
|
|||
Xliff | And I get the reusable part. However if I have to put all of the A::B methods into a single file, it will get really large. | 21:09 | |
21:09
araujo_ joined
|
|||
Xliff | I was hoping to split it into related, manegable chunks. | 21:10 | |
ugexe | im not sure splitting a single functional class into multiple files helps with maintenance. it certainly makes grepping the code path more dificult | ||
Xliff | You have a point, there. | ||
ugexe | but if you want to it should work the way i think you want it to | ||
Xliff | OK. Another way, then. | ||
If I split A::B into different classes. A::B::A … A::B::<n>, can I still have a class A::B that wraps the A::B::x classes in an a-la-carte manner? Kinda like the perl5 "use Module qw(<list>)" | 21:12 | ||
ugexe | the managable chunks are typically subroutines/methods themselves | ||
AlexDaniel | [Coke]: created a new account, problem not reproduced :/ | 21:13 | |
ugexe | im not sure i follow. you can `class Foo is Foo::A is Foo::B { }` | ||
AlexDaniel | [Coke]: dunno then… alright, sorry for your time | ||
ugexe | you can also `does Foo::A does Foo::B` | 21:14 | |
Xliff | Right. | ||
However I'm trying to see if I can do A::B without having it pull in all of the classes in the A::B::* space. Just the ones I need to use for a particular purpose. | 21:15 | ||
I'm probably mixing metaphors. | |||
ugexe | github.com/ugexe/Perl6-Grammar--HT...TP.pm6#L14 # this is split up into parts with roles, but i can also attest its hard to follow the code path around | ||
you are talking about dependency injection/inversion type stuff | 21:17 | ||
Xliff | OK, thanks. I think I at least have something to start from. | ||
21:17
Emeric1 left
|
|||
Xliff | ugexe, I guess. Yeah. | 21:17 | |
ugexe | you'd need to use a service locator pattern type deal to call .^add_role(whatever) | ||
Xliff | Is there .^add_class()? | 21:18 | |
ugexe | ^add_parent maybe | ||
21:19
_dolmen_ left
|
|||
Xliff | That works. Thanks! | 21:20 | |
21:30
Zoffix joined
|
|||
Zoffix | Worth mentioning in the Weekly (cc lizmat). Damian Conway will be doing two days of Perl 6 talks at Toronto Perl Mongers on June 27 and June 28: www.meetup.com/Toronto-Perl-Monger...231418224/ www.meetup.com/Toronto-Perl-Monger...231418278/ | 21:31 | |
21:32
|2701 joined
|
|||
Xliff | next question: How do you pass parameters to superclass constructor? | 21:34 | |
YAY! perl6advent.wordpress.com/2010/12/...s-cousins/ | 21:36 | ||
21:38
drforr1 left,
retup__ left,
dylanwh_ left,
hobbs left
21:40
drforr1 joined,
retup__ joined,
dylanwh_ joined
21:43
edenc joined
21:46
ggoebel115 joined
21:47
ggoebel114 left
21:49
Zoffix left
21:50
matiaslina joined
22:00
ptolemarch left,
MasterDuke left
|
|||
lizmat | .tell Zoffix noted | 22:01 | |
yoleaux | lizmat: I'll pass your message to Zoffix. | ||
22:01
perlawhirl left
22:06
zzzzzzzzz left
22:08
Sgeo joined
22:10
zzzzzzzzz joined
22:11
romrador is now known as rodarmor
22:15
smls left
|
|||
Xliff | ARGH! | 22:18 | |
No https support for HTTP::Client, yet. | |||
22:24
kid51 joined
22:29
RabidGravy left
22:34
zzzzzzzzz left
22:40
zzzzzzzzz joined
|
|||
AlexDaniel | Xliff: do you want to just download some page? | 22:43 | |
Xliff: perhaps try HTTP::UserAgent | 22:46 | ||
Xliff | AlexDaniel++ | 22:47 | |
Thanks! | |||
AlexDaniel | Xliff: I've also mentioned LWP::Simple here: github.com/supernovus/perl6-http-c.../issues/11 | 22:48 | |
Xliff: but I don't think that I ever used it. I think HTTP::UserAgent always worked for me | |||
22:54
patrickz left
22:56
cpage_ left
|
|||
Xliff | Thanks. I was using HTTP::Client, before. | 22:58 | |
22:59
sortiz joined
23:05
|2701 is now known as |meta
23:10
cpage_ joined
23:15
grondilu left
23:22
gudahtt joined
23:23
gudahtt left
|
|||
dalek | Iish: 2bacdf9 | (Salvador Ortiz)++ | t/36-pg-native.t: Keep a column-info example |
23:24 | |
Iish: 2d273a2 | (Salvador Ortiz)++ | / (3 files): mysql: Fix old typo in $dbh.quote-identifier kuerbis++ for spot that. Anyway the Connection role implementation is not robust enough, so add a native supported .quote(:$as-id) following the Pg approach. Closes #66 |
|||
Iish: cf198ad | (Salvador Ortiz)++ | / (2 files): For panda's/zef's users, now v0.5.8 |
|||
23:27
spider-mario left
23:28
kurahaupo left,
kurahaupo joined
23:35
kurahaupo left
23:36
cpage_ left
23:37
kalkin- joined
|
|||
kalkin- | hi | 23:37 | |
is there some clever way to detect if a string consists of only unique characters? | |||
m: "CasdfghjkC234" ~~ /.*(.).*$0.*/ | 23:41 | ||
camelia | ( no output ) | ||
geekosaur | you probably want to prefix that with `say so` | ||
kalkin- | m:say so "CasdfghjkC234" ~~ /.*(.).*$0.*/ | 23:42 | |
geekosaur | m: say so "CasdfghjkC234" ~~ /.*(.).*$0.*/ | ||
AlexDaniel | space | ||
camelia | rakudo-moar 1ab1fb: OUTPUT«True» | ||
kalkin- | Ahh thanks | ||
so regex is probably the shortest solution for that | 23:43 | ||
AlexDaniel | I don't think so | ||
sortiz | kalkin-, that fails, 'C' isn't unique. | ||
kalkin- | m: say so "CasdfghjkC234" !~~ /.*(.).*$0.*/ | 23:44 | |
camelia | rakudo-moar 1ab1fb: OUTPUT«False» | ||
kalkin- | m: say so "Casdfghjkc234" !~~ /.*(.).*$0.*/ | 23:45 | |
camelia | rakudo-moar 1ab1fb: OUTPUT«True» | ||
raydiak | the leading and trailing .* is unnecessary | ||
AlexDaniel | m: say so ‘abcde’.comb.Bag.values.all == 1 | 23:46 | |
camelia | rakudo-moar 1ab1fb: OUTPUT«True» | ||
AlexDaniel | m: say so ‘abcdce’.comb.Bag.values.all == 1 | ||
camelia | rakudo-moar 1ab1fb: OUTPUT«False» | ||
AlexDaniel | that's it | ||
kalkin- | m: say so "Casdfghjkc234" !~~ /(.).*$0/ | ||
camelia | rakudo-moar 1ab1fb: OUTPUT«True» | ||
kalkin- | raydiak: Thanks | 23:47 | |
raydiak | you're welcome :) | ||
kalkin- is going to read the docs to understand what happens in AlexDaniel example | |||
Of course thanks to all :) | |||
23:48
TEttinger joined
|
|||
AlexDaniel | it also depends on how efficient you want it to be | 23:49 | |
and whether you are dealing with long strings or not | |||
kalkin- | AlexDaniel: the normal use case should be < 100 chars | 23:50 | |
AlexDaniel | … and I have a feeling that regex solution is much slower than any other |