»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend! Set by sorear on 25 June 2013. |
|||
dalek | href="https://modules.perl6.org:">modules.perl6.org: 5ddfccd | raydiak++ | web/lib/P6Project.pm: Revert "Allow HTTP redirection" - causes other problems; discussion needed This reverts commit e5af4fc7246755cbb3c0e055778c84834002867a. |
00:12 | |
raydiak | gotta run, back in a while | ||
01:16
FROGGS_ joined
01:20
FROGGS left
01:30
raiph joined
|
|||
raiph | .tell FROGGS Just want to let you know I am working on a CPAN MIRRORED_BY grammar. My start is at gist.github.com/raiph/63508a5f4ade000acc7f | 01:32 | |
yoleaux | raiph: I'll pass your message to FROGGS. | ||
01:48
ilbot3 joined
01:49
adu joined
|
|||
raydiak | okay, so the problem with modules.perl6.org is that raw.github.com now redirects to raw.githubusercontent.com | 01:53 | |
there are 2 ways to fix it | 01:54 | ||
either change the script that generates the module list for the website so it handles the redirects properly | |||
or update all urls to point to the new domain | 01:55 | ||
from a technical efficiency standpoint, it'd be better to use the new direct urls | 01:57 | ||
01:57
klapperl_ joined
|
|||
BenGoldberg | There's also solution 1B, which is to cache the redirects ;) | 01:57 | |
raydiak | but idk if there would be an ramifications (eg for tools like panda) would be if we changed *every* url in META.list all at once | 01:58 | |
hm | |||
basically it's a question of whether we want to know when something has been redirected (by having it break), or just not have it break and have it work as long as possible, even when buried under umpteen layers of years-old redirects | 01:59 | ||
01:59
klapperl left
|
|||
raydiak | if we cache then it eliminates the performance problem if we don't care about having updated urls | 02:00 | |
BenGoldberg | Cache and give a warning ;) | ||
And, perhaps, deprecate the old urls, eventually. | 02:01 | ||
raydiak | why are the best compromises always the most complex to code? :) | ||
02:01
plobsing joined
|
|||
BenGoldberg | The best compromises are the ones least uncomfortable for the largest number of humans. Since humans are both complex and uncomfortable creatures, it's inevitable that the compromises will be too :) | 02:02 | |
raydiak | hah...well put | 02:03 | |
lue | raydiak: the clear solution is to abstract away the URLs :) | 02:10 | |
02:10
hoverboard joined,
ivan`` left
02:15
ivan`` joined,
raiph left,
ivan`` left
02:19
ivan`` joined,
adu left
02:20
ivan`` left
02:26
ivan`` joined
|
|||
colomon | tadzik: it appears my rakudobrew / panda problems came from having other installs of rakudo floating around. everything seems to be working now. (crosses fingers) | 02:28 | |
02:33
xragnar_ joined,
xragnar left,
xragnar_ is now known as xragnar
|
|||
colomon | tadzik: though when I do rakudobrew build-panda on my Mac, for some reason it doesn't create a link to the panda script in the .rakudobrew/bin directory? | 02:36 | |
02:37
pecastro joined
|
|||
colomon | doing rakudobrew switch moar does install it there. | 02:37 | |
(well, a link, I presume) | |||
panda install NativeCall | |||
resolve stage failed for NativeCall: Project NativeCall not found in the ecosystem | |||
colomon is having one of those days when every single step fails. :\ | |||
ecosystem is broken at the moment? | 02:39 | ||
on my Linux box, doing panda list produced the expected list of files. Then I did panda update and panda list again, and this time it is only the installed modules plus HTTP::Headers, HTTP::Message, and HTTP::Request | 02:40 | ||
02:41
skids left
|
|||
raydiak | colomon: those are the only 3 modules not pointed at raw.github.com, which as of today, is a redirect...so its breaking stuff | 02:42 | |
colomon | raydiak: tell me more, please? | ||
I see they're pointed at raw2.github.com? | 02:43 | ||
raydiak | colomon: right, that one isn't a redirect yet | ||
so those 3 still work | |||
suppose we could just update all the urls in META.list | |||
colomon | to raw2 ? | 02:44 | |
raydiak | no, to where they're redirecting to | ||
raw.githubusercontent.com | |||
I didn't know anything besides modules.perl6.org was broken | 02:47 | ||
colomon | are you sure that's the right URL? my naive attempts to access it have all just failed. | 02:48 | |
raydiak | go to any of the urls in META.list and look at where your browser takes you | ||
colomon | WTF | ||
I would swear that didn't work the first time I tried it. | 02:49 | ||
and did the second time. | |||
raw2.github.com seems to work as well | |||
raydiak | yeah but I'm assuming that will redirect eventually too | 02:50 | |
lue | raydiak: I think the best solution might be to take away the place.github.com/ from the list, leaving things like moritz/json/master/META.info | ||
(maybe make the first entry of the list the common part of the URL?) | |||
raydiak | but then we as module authors are inextricably tied to github with no choice to host elsewhere | 02:51 | |
iow it adds the artificial limitation that all modules must reside on the same domain | |||
lue | raydiak: maybe instead something like GITHUB_RAW:jrandom/... ? | ||
dalek | osystem: 48b2383 | (Solomon Foster)++ | META.list: Switch all raw.github.com to raw.githubusercontent.com. |
02:52 | |
raydiak | that's not a bad idea | ||
colomon | wonder how long it will take it to get from there to feather? | ||
lue | I don't know how often modules.perl6.org is updated. | ||
raydiak | have to fix the META.list url in the script that does that too | 02:53 | |
I got it | |||
dalek | href="https://modules.perl6.org:">modules.perl6.org: 62151e8 | raydiak++ | web/build-project-list.pl: Update META.list URL |
02:54 | |
02:55
btyler joined
03:03
arturo_ left
|
|||
dalek | osystem: 4da5508 | raydiak++ | META.list: Update URLs for Acme::Addslashes and Text::Abbrev |
03:04 | |
03:13
benabik left
03:28
benabik joined
03:31
benabik left
03:44
sivoais joined
03:54
sivoais_ joined
03:55
sivoais left
03:56
hoverboard left
03:57
hoverboard joined,
hoverboard is now known as moistcherry
04:07
btyler left
04:19
sivoais_ is now known as sivoais,
sivoais left,
sivoais joined,
moistcherry left
04:20
BenGoldberg left
04:26
SamuraiJack joined
04:30
Psyche^ joined
04:34
Psyche^_ left
|
|||
avuserow | raydiak++, colomon++ # fixing the ecosystem | 04:55 | |
04:58
xenoterracide_ left
|
|||
timotimo | retupmoca: can you explain why you used read_int and read_varint instead of just read_int in the serialization and deserialization of CStruct? | 05:49 | |
05:52
vaskozl left
05:58
vaskozl joined
06:09
jlaire left
06:10
jlaire joined
|
|||
dalek | href="https://modules.perl6.org:">modules.perl6.org: 051a448 | raydiak++ | web/lib/P6Project/Hosts/Github.pm: Catch GitHub API errors |
06:14 | |
href="https://modules.perl6.org:">modules.perl6.org: 5569415 | raydiak++ | web/lib/P6Project/Hosts/Github.pm: Fix github raw url in another place |
|||
href="https://modules.perl6.org:">modules.perl6.org: c3e1be6 | raydiak++ | web/build-project-list.pl: Add missing line break after error list |
|||
raydiak | modules.perl6.org should fix itself at the next cron run, now; temporary working mirror at cyberuniverses.com/perl6-modules/ | 06:17 | |
note panda and modules.perl6.org will still break when redirects are introduced | 06:29 | ||
will touch base tomorrow when more people are online. good night, #perl6 \o | |||
timotimo | thank you! | 06:30 | |
gnite! | |||
06:31
kaare_ joined
06:48
logie left,
xinming_ joined
06:51
xinming__ left
06:55
darutoko joined
06:57
vaskozl left
06:59
ClarusCogitatio joined
07:03
vaskozl joined
07:04
Rotwang joined
07:05
darutoko left,
darutoko joined
07:08
FROGGS_ is now known as FROGGS
|
|||
FROGGS | raiph++ | 07:08 | |
moritz | \o | ||
FROGGS | morning moritz | 07:09 | |
07:10
darutoko left
07:11
darutoko joined
|
|||
timotimo | o/ | 07:11 | |
moritz | somehow I've managed to roally screw up my laptop | ||
after a few small updates, and booting to windows (and updating windows from 8.0 to 8.1), diretories under /var/lib were missing | |||
like, /var/lib/{dpkg,postgresql} | 07:12 | ||
it was bad enough that network wouldn't start anymore, and neither could I run apt/dpkg | |||
07:12
kaare_ left
|
|||
moritz | so I tried to reinstall | 07:12 | |
timotimo | what o_O | ||
moritz | which needed several attepts | ||
and ended up killing both windows and linux | 07:13 | ||
and didn't finish, 'cause it claimed there was an IO error while reading from the CD/DVD (which really is a USB stick) | |||
so tried a different USB stick, same result | |||
summary: linux broken, windows broken, all fucked up | 07:14 | ||
(I did back up /etc/ and /home to an external drive before) | |||
07:14
ponbiki_ joined
|
|||
moritz | I guess I should have checked sha1sums of the image before I started to download it | 07:15 | |
07:16
kaare_ joined,
Rotwang left
|
|||
FROGGS | ohh dear :/ | 07:16 | |
moritz | oh dear indeed :( | 07:19 | |
timotimo | poor you ;( | 07:20 | |
moritz | very strange; downloading that ubuntu image via firefox or wget consistently produces wrong sha1sums | 07:28 | |
downloading it via wget on a totally different machine in a totally different network works, though | |||
now trying the wget -> scp cascade | |||
moritz suspicious | 07:29 | ||
masak | mornin', #perl6 | 07:30 | |
07:30
darutoko left
|
|||
moritz | sha1sum broken even after scp transfer. WTF? | 07:34 | |
\o masak | |||
moritz tries again, and feels very stupid | |||
"trying the same thing twice and expecting a different resut is a sign of stupidity" -- paraphrasing EY | 07:35 | ||
timotimo | this code is sooooo slooooow :| | 07:36 | |
moritz | and it worked the second time. Now I fell *really* stupid | 07:38 | |
07:47
arturo_ joined
07:54
dmol joined
|
|||
timotimo | you can watch the screen build up >_< | 07:54 | |
FROGGS | moritz: I'd suggest you do a memtest | 07:56 | |
timotimo | is the hard drive failing? | 07:59 | |
08:02
pdcawley left
08:04
vaskozl left
08:05
pdcawley joined
08:06
fhelmberger joined
|
|||
FROGGS | it can also be the sata controller... there are many things that could cause this | 08:09 | |
08:10
vaskozl joined
|
|||
masak | moritz: apparently the "definition of insanity" quote comes from Narcotics Anonymous: en.wikiquote.org/wiki/Narcotics_Anonymous | 08:10 | |
(at least that's very likely the origin) | |||
wikiquote++ | 08:11 | ||
08:14
fhelmberger left
08:22
darutoko joined
08:32
arturo_ left
08:45
denis_boyun_ joined
|
|||
tadzik | colomon: I think I fixed it | 08:57 | |
08:57
sqirrel joined
09:02
denis_boyun__ joined
09:03
kaare_ left
09:04
denis_boyun_ left
|
|||
vendethiel | is there a "rule vs token vs regex" in the FAQ or something ? I recall something similar, but nothing in S05 | 09:05 | |
arnsholt | It's in S05 | 09:07 | |
09:07
vaskozl left
|
|||
arnsholt | token is regex :ratchet, and rule is regex :ratchet :sigspace | 09:09 | |
vendethiel | Ok, in "Regexes constitute a first-class language, rather than just being strings" found it | ||
I think that could be moved to a FAQ Q/A ? | |||
arnsholt | Could be, yeah | 09:10 | |
09:12
pdcawley left
09:15
vaskozl joined
|
|||
vendethiel | m: my 'foo bar' ~~ my anon rule { 'foo' 'bar' } | 09:22 | |
camelia | rakudo-moar 440739: OUTPUT«===SORRY!=== Error while compiling /tmp/M_7gE4LikTMalformed myat /tmp/M_7gE4LikT:1------> my ⏏'foo bar' ~~ my anon rule { 'foo' 'bar'  expecting any of: scoped declarator» | ||
vendethiel | m: my 'foo bar' ~~ (my anon rule { 'foo' 'bar' }) | ||
camelia | rakudo-moar 440739: OUTPUT«===SORRY!=== Error while compiling /tmp/Zdi4yn4WJnMalformed myat /tmp/Zdi4yn4WJn:1------> my ⏏'foo bar' ~~ (my anon rule { 'foo' 'bar' expecting any of: scoped declarator» | ||
vendethiel | m: say 'foo bar' ~~ (my rule foo { 'foo' 'bar' }) | ||
camelia | rakudo-moar 440739: OUTPUT«「foo bar」» | ||
vendethiel | m: say 'foo bar' ~~ (my regex foo { 'foo' 'bar' }) | ||
camelia | rakudo-moar 440739: OUTPUT«Nil» | ||
vendethiel | Like `regex : Backtracks, no significant space. token : Doesn't backtrack, doesn't have significant space. rule : Doesn't backtrack, has sigspace` | 09:26 | |
09:27
Rotwang joined,
Rotwang left
|
|||
FROGGS | is 'no significant space' clear enough for a beginner? | 09:30 | |
vaskozl | FROGGS: what about him? | ||
FROGGS | maybe 'ignores whitespace' might be easier to understand | ||
or something like that | 09:31 | ||
vaskozl | perl6 introduces significantly more whitespace doesn't it? | ||
FROGGS | errrm, what? | 09:33 | |
vaskozl | like loop ($j=0; $j < 4; $j++) | 09:34 | |
compared to: for($j=0;$j<4;$j++) | |||
FROGGS | ahh | ||
well, yes | |||
it uses whitespace to distinguish between subcalls and things that are not | 09:35 | ||
vaskozl | FROGGS: yes I know now | ||
what about the $j<4 becomming $j < 4 | 09:36 | ||
I've always liked perl because I don't have to remember how much whitespace there was where | |||
FROGGS | you don't have to put space around an infix if it is obvious and there is only one waay to parse it | 09:37 | |
if you would introduce an < post- or prefix you would have to put space around the infix | |||
vendethiel | FROGGS: maybe that could point to a relevant place in the syn or something else ? | ||
FROGGS | vendethiel: perhaps, yes (not that I know the relevant places offhand :o) | 09:38 | |
vaskozl: I find the rules in P6 about whitespace even easier to understand, and therefore the code is easier to understand for me | |||
vendethiel | m: sub postfix:<< < >>($n) { $n ** $n }; say 5< | 09:39 | |
camelia | rakudo-moar 440739: OUTPUT«3125» | ||
FROGGS | m: say 1+2; sub postfix:<+>(|) { }; say 1+2 # vaskozl: see | 09:40 | |
camelia | rakudo-moar 440739: OUTPUT«===SORRY!=== Error while compiling /tmp/SF5kDmizJJTwo terms in a rowat /tmp/SF5kDmizJJ:1------> say 1+2; sub postfix:<+>(|) { }; say 1+⏏2 # vaskozl: see expecting any of: postfix inf…» | ||
vaskozl | m: my $i;loop ($i;$i<10;$++){ say "The numbers is $i";} | ||
camelia | rakudo-moar 440739: OUTPUT«===SORRY!=== Error while compiling /tmp/eI4DcCr9PAWhitespace required before < operatorat /tmp/eI4DcCr9PA:1------> $i;$i<10;$++){ say "The numbers is $i";}⏏<EOL> expecting any of: postfix» | ||
FROGGS | vaskozl: I like that way, because you can always be sure to parse it right | ||
vendethiel | m: class A { has $.n; method postcircumfix:<( )>($n) is export { 'hey you !'; } }; sub postfix:<< < >>($n) { new A(:$n); }; say 5< 3; | 09:41 | |
camelia | rakudo-moar 440739: OUTPUT«===SORRY!=== Error while compiling /tmp/83ZPvhYy8SUnsupported use of C++ constructor syntax; in Perl 6 please use method call syntaxat /tmp/83ZPvhYy8S:1------> !'; } }; sub postfix:<< < >>($n) { new A⏏(:$n); }; s…» | ||
vendethiel | m: class A { has $.n; method postcircumfix:<( )>($n) is export { 'hey you !'; } }; sub postfix:<< < >>($n) { A.new(:$n); }; say 5< 3; | ||
camelia | rakudo-moar 440739: OUTPUT«===SORRY!=== Error while compiling /tmp/iw12IGSbfhTwo terms in a rowat /tmp/iw12IGSbfh:1------> fix:<< < >>($n) { A.new(:$n); }; say 5< ⏏3; expecting any of: postfix infix stopper…» | ||
vendethiel | m: class A { has $.n; method postcircumfix:<( )>($n) is export { 'hey you !'; } }; sub postfix:<< < >>($n) { A.new(:$n); }; say 5<(3); | 09:42 | |
camelia | rakudo-moar 440739: OUTPUT«hey you !» | ||
vendethiel | :D | ||
09:42
sqirrel left
|
|||
vaskozl | m: loop (my $i;$i <'10';$i++){ say "The numbers is $i";} | 09:42 | |
camelia | rakudo-moar 440739: OUTPUT«use of uninitialized value of type Any in numeric contextuse of uninitialized value of type Any in string contextThe numbers is The numbers is 1The numbers is 2The numbers is 3The numbers is 4The numbers is 5The numbers is 6The n…» | ||
vendethiel | $i = 0; $i < 10 ? | ||
vaskozl | what's the uninitailised value? | ||
vendethiel: oh thx | 09:43 | ||
vendethiel | m: loop (my Int $i;$i <10;$i++){ say "The numbers is $i";} | ||
vaskozl | m: loop (my $i=0;$i <'10';$i++){ say "The numbers is $i";} | ||
camelia | rakudo-moar 440739: OUTPUT«Invocant requires an instance, but a type object was passed in method Bridge at src/gen/m-CORE.setting:4491 in sub infix:<<> at src/gen/m-CORE.setting:4404 in block at /tmp/VRoB8Ssf2K:1» | ||
rakudo-moar 440739: OUTPUT«The numbers is 0The numbers is 1The numbers is 2The numbers is 3The numbers is 4The numbers is 5The numbers is 6The numbers is 7The numbers is 8The numbers is 9» | |||
vendethiel | m: loop (my int $i;$i <10;$i++){ say "The numbers is $i";} | ||
camelia | rakudo-moar 440739: OUTPUT«The numbers is 0No such method 'STORE' for invocant of type 'Int' in sub postfix:<++> at src/gen/m-CORE.setting:4554 in block at /tmp/ekw87rbgor:1» | ||
vendethiel | ah yeah, there's no postfix:<++> | 09:44 | |
vaskozl | vendethiel: huh? | ||
vendethiel | "int" is a native type | ||
FROGGS | there is no such postfix for that type YET | 09:51 | |
it should get one though :o) | |||
m: loop (my int $i;$i <10;$i=$i+1){ say "The numbers is $i";} | |||
camelia | rakudo-moar 440739: OUTPUT«The numbers is 0The numbers is 1The numbers is 2The numbers is 3The numbers is 4The numbers is 5The numbers is 6The numbers is 7The numbers is 8The numbers is 9» | ||
FROGGS | m: loop my int $i;$i <10;$i=$i+1 { say "The numbers is $i";} | ||
camelia | rakudo-moar 440739: OUTPUT«===SORRY!=== Error while compiling /tmp/hHN2_hDkvnMissing blockat /tmp/hHN2_hDkvn:1------> loop ⏏my int $i;$i <10;$i=$i+1 { say "The numb expecting any of: statement list scoped bloc…» | ||
FROGGS | ohh, sad | ||
but yeah, makes sense | 09:52 | ||
(because of the semicolon) | |||
10:15
IllvilJa left
10:16
vaskozl left,
rindolf joined
10:20
yoleaux joined,
ChanServ sets mode: +v yoleaux
|
|||
tadzik | wow, new ubuntu actually ships with perl 5.18 | 10:21 | |
10:22
vaskozl joined
|
|||
nwc10 | is it newer than the Rakudo they package? :-) | 10:22 | |
Ulti | tadzik: also rakudo from December 2012 | ||
nwc10 | so, yes! :-) | ||
Ulti | sorry 2013! | ||
nwc10 | oh. :-( | ||
Ulti | keep forgetting its 2014 | ||
because I'm olde | 10:23 | ||
moritz | faq.perl6.org/#token # already in the FAQ | 10:24 | |
because it's, like, a frequently asked question :-) | |||
anybody wants to hack up perl6/doc htmlify.pl? | 10:26 | ||
the index page could list the title of the "Language Documentation" docs next to the link | 10:27 | ||
vendethiel | moritz: I double-checked ôO | 10:35 | |
How in the name of camelia did I miss that | 10:36 | ||
10:45
dmol left
|
|||
colomon | tadzik: fixed what? | 10:48 | |
tadzik | colomon: 'panda' not available after build-panda | 10:51 | |
colomon | tadzik++ | ||
tadzik | colomon++ # #1 bugfinder | ||
colomon | now if the ecosystem was just functional.... | 10:53 | |
colomon does not think the problem is tadzik++'s fault | 11:01 | ||
tadzik | that depends. What's dysfunctional? :) | 11:03 | |
colomon | Pretty much everything. | ||
right now, from my systems the ecosystem only appears to have three modules in it. | |||
HTTP::Headers | |||
HTTP::Message | |||
HTTP::Request | |||
all the modules located at raw.github.com were not working. | 11:04 | ||
last night I changed ALL the raw.github.com modules to raw.githubusercontent.com | |||
which seems to work better if I call it up directly. | |||
but this has had no apparent effect on the ecosystem. | 11:05 | ||
might just be that feather hasn't updated the list? | |||
tadzik | let me see | 11:06 | |
11:06
SamuraiJack left
|
|||
tadzik | :o | 11:06 | |
crazy | |||
ah, the new ones are SSL'd | 11:07 | ||
and lwp-request doesn't like that | |||
colomon | tadzik: irclog.perlgeek.de/perl6/2014-04-26 (discussion starts, pauses briefly, then continues) | ||
tadzik | colomon: the modules that work use raw2.github.com, maybe we should switch to that | 11:08 | |
colomon | but you may have just figured out more than we did already | ||
can do for the ecosystem | |||
tadzik | yes, that fixes it | 11:09 | |
I'll do that in the ecosystem repo as well | 11:10 | ||
dalek | osystem: f4865e5 | (Solomon Foster)++ | META.list: Try raw2.github instead of raw.githubusercontent. |
11:12 | |
tadzik | ah, you did that alreayd :) | ||
colomon | :) | ||
tadzik | but you did .github.com.com :P | ||
11:12
spider-mario joined
|
|||
tadzik | I fixed the list on feather for the time being | 11:13 | |
dalek | osystem: 3c61acf | (Solomon Foster)++ | META.list: .com, not .com.com. Sigh. |
||
tadzik | looks good now :) | ||
colomon | raydiak found a spot in modules.perl6.org that needed to be fixed as well | ||
github.com/perl6/modules.perl6.org...62151e893a | 11:14 | ||
tadzik | also, we may just switch that list to user/repo | ||
instead of the full url | |||
colomon | tadzik++ # fixing feather, panda works again! | ||
tadzik | there are two places that'll need to be upated after that | ||
but I think it's for the best | |||
colomon | how would we indicate to use something other than github? | 11:15 | |
tadzik | ah :) | 11:16 | |
dalek | href="https://modules.perl6.org:">modules.perl6.org: 5f7a6a1 | (Solomon Foster)++ | web/build-project-list.pl: Switch $list_url to use raw2.github instead of raw.githubusercontent. |
11:19 | |
11:24
vaskozl left
11:26
darutoko left
11:27
darutoko joined
11:28
vaskozl joined
|
|||
masak | heh. is Burnside's lemma too advanced for an introductory Python course? :P | 11:29 | |
ooh, let's make that today's mini-challenge, actually. | |||
a factory is making necklaces with 16 beads each; 13 black and 3 white. they become ridiculously popular, with people collecting unique ones. | |||
how many unique necklaces are there? | 11:30 | ||
the necklaces have reflection symmetries, and rotational symmetries. there's no buckle. | 11:31 | ||
this problem is simple enough that you can solve it with a one-liner in Perl 6, but scripts are fine too. | |||
colomon | m: (2..*).map(*.is-prime).first-index(73).say | 11:39 | |
camelia | rakudo-moar 440739: OUTPUT«(timeout)» | ||
colomon | m: (2...*).map(*.is-prime).first-index(73).say | ||
moritz | colomon: try .grep | ||
camelia | rakudo-moar 440739: OUTPUT«(timeout)» | ||
colomon | moritz++ | ||
colomon-- | |||
m: (2...*).grep(*.is-prime).first-index(73).say | |||
camelia | rakudo-moar 440739: OUTPUT«20» | ||
colomon | m: my @primes := (2...*).grep(*.is-prime); my @reversible := @primes.grep(*.flip.is-prime); say @reversible[^10] | 11:41 | |
camelia | rakudo-moar 440739: OUTPUT«No such method 'is-prime' for invocant of type 'Str' in block at /tmp/w5fQ7g5pu6:1» | ||
colomon | m: my @primes := (2...*).grep(*.is-prime); my @reversible := @primes.grep(*.flip.Int.is-prime); say @reversible[^10] | ||
camelia | rakudo-moar 440739: OUTPUT«2 3 5 7 11 13 17 31 37 71» | ||
colomon | m: my @primes := (2...*).grep(*.is-prime); my @reversible := @primes.grep(*.flip.Int.is-prime); say @reversible[^20] | 11:44 | |
camelia | rakudo-moar 440739: OUTPUT«2 3 5 7 11 13 17 31 37 71 73 79 97 101 107 113 131 149 151 157» | ||
11:46
xfix joined
|
|||
masak | m: say "31".is-prime | 11:51 | |
camelia | rakudo-moar 440739: OUTPUT«No such method 'is-prime' for invocant of type 'Str' in block at /tmp/pEqc9xCT4j:1» | ||
masak | fair enuff. | ||
m: say 3.5.is-prime | |||
camelia | rakudo-moar 440739: OUTPUT«No such method 'is-prime' for invocant of type 'Rat' in block at /tmp/yggiVl0KUt:1» | ||
masak | why is .flip on Cool, but .is-prime on Int? | ||
colomon | I vaguely recall a discussion on why .is-prime should be on Int instead of Cool. | 11:53 | |
it was a while ago. :) | |||
moritz | because primality testing is very integer specific | ||
11:53
zakharyas joined
|
|||
moritz | and not everything can be coerced sensibly to Int | 11:53 | |
whereas everything Cool has a clear and well-defined coercion to Str | 11:54 | ||
masak | ok, makes sense. | ||
colomon | Are GTK+ and GTK the same thing? | 11:55 | |
moritz | seems like they aren't | 11:57 | |
The name GTK+ originates from GTK; the plus was added to distinguish an enhanced version # from en.wikipedia.org/wiki/GTK+ | 11:58 | ||
colomon | but it also seems like GTK+ is what people mean when they say GTK? Or is that wrong? | 12:00 | |
moritz | it would seem to me, but I'm not really sure | ||
12:01
SamuraiJack joined
|
|||
_sri wonders what a perl6-ish rewrite of Mojo::EventEmitter with supplies and promises would look like mojolicio.us/perldoc/Mojo/EventEmitter | 12:02 | ||
perhaps something like $foo.on('bar').tap({...}) | 12:08 | ||
_sri also wonders if there's a way to get a promise only for the next value of a supply | 12:10 | ||
$foo.on('bar').next.then({...}) | 12:11 | ||
colomon is scared by the OS X build instructions for GTK+ | 12:12 | ||
"If you have MacPorts or Fink installed, you must remove all traces of them from your environment before you try to run jhbuild. " | 12:14 | ||
moritz | "excise all traces with fire, or preferably with nukes and lasers from outer space" | 12:15 | |
colomon | seriously, these are some of the most ridiculous instructions i've ever seen for building software. | 12:24 | |
12:27
vaskozl left
12:34
vaskozl joined
12:54
skids joined
12:56
xenoterracide_ joined
13:26
SamuraiJack left
13:32
vaskozl left
13:35
vaskozl joined
13:39
dmol joined
|
|||
geekosaur | os x is rather a challenge; if you start digging into *why* they say that, the road leads ultimately to decisions made by apple | 13:51 | |
however, if you have macports/fink/homebrew installed, you can install gtk+ via that and ignore those build instructions | 13:52 | ||
FROGGS | "lovely" | 13:53 | |
yoleaux | 01:32Z <raiph> FROGGS: Just want to let you know I am working on a CPAN MIRRORED_BY grammar. My start is at gist.github.com/raiph/63508a5f4ade000acc7f | ||
FROGGS | ohh, wb yoleaux | ||
colomon | geekosaur: alas, I just have broken, leftover bits of a macports install around | ||
geekosaur | those instructions are specifically for building against a pure-apple ecosystem, and that means living with out of date and sometimes incompatible versions of libraries shipped by apple and mixing in the modern stuff provided by third party package managers is a recipe for weird link errors or core dumps | ||
colomon | I suppose trying to fix my macports might be the most straightforward thing to do. | 13:54 | |
geekosaur | iconv in particular is an infamous point of collision because apple ships an ancient one and if you get any parts of a newer one tangled up in it your programs WILL dump core on startup | 13:55 | |
14:00
pippo joined
|
|||
pippo | Hello #perl6! | 14:00 | |
FROGGS | hi pippo | 14:01 | |
pippo | I am trying to install DBIish with panda but if fails tests. Any ideas? gist.github.com/anonymous/11320743 | ||
moritz tries it too | 14:04 | ||
dalek | osystem: 441275d | (Andrew Egeler)++ | META.list: Add Net::SOCKS |
||
FROGGS | pippo: what is your `perl6-m --version` ? | 14:06 | |
moritz | oh, it's actually a NativeCall test failure | 14:07 | |
pippo | FROGGS: This is perl6 version 2014.04-98-g440739c built on MoarVM version 2014.04-29-ga109e8d | ||
moritz: yes! | |||
FROGGS | pippo: that should work out... | ||
must be a regression, since it was working for 2014.04 | 14:08 | ||
moritz | works on HEAD for me too | ||
pippo | FROGGS: unfortunately does not on my box. Anything relevant to 32/64 bits? | 14:09 | |
FROGGS | pippo: most of us are on x86_64, so I can only tell about that | ||
that is, x64 should work | |||
pippo | I have a 32 bits box. | 14:10 | |
FROGGS | :/ | ||
pippo: can you make an RT ticket with some system information? | |||
pippo | I can put everything in a gist. RT I do not know how to do it. Sorry :-( | 14:12 | |
14:13
skids left
|
|||
FROGGS | pippo: you can email to [email@hidden.address] | 14:18 | |
but a gist is fine also, I'll create the ticket then | 14:19 | ||
pippo: would be enough if you pasted `perl -V` to the gist you posted already | 14:21 | ||
pippo | FROGGS: gist.github.com/anonymous/11321347 | ||
FROGGS: let me know if I need to add some other infos. | |||
FROGGS | pippo: please add the out of `perl -V` | 14:22 | |
pippo | FROGGS: sorry I did not see your request. I'll do... | ||
FROGGS | np :o) | 14:23 | |
pippo | FROGGS: here it is: gist.github.com/anonymous/11321460 | 14:25 | |
FROGGS | pippo++ # thank you | 14:26 | |
14:26
Rotwang joined
|
|||
pippo | FROGGS: thanks to you. o/ | 14:27 | |
14:27
pippo left
|
|||
FROGGS | I won't have time for it today but hopefully tomorrow | 14:29 | |
but loop labels for nqp-j are kinda burning under my fingernails, though I tried that already and failed :( | 14:30 | ||
masak | FROGGS++ # courage | 14:32 | |
grondilu mentioned failure to install NativeCall on 32bit yesterday. Pippo's issues seem very much related. I could install NativeCall locally by replacing 'int' with 'int32' in relevant places in the *.t files. | 14:39 | ||
14:40
pippo joined,
xenoterracide_ left
14:41
vaskozl left
|
|||
pippo | grondilu: I'll try and let you know ... | 14:41 | |
14:47
vaskozl joined
|
|||
pippo | grondilu: I confirm I have same results here i.e. tests work if int32 iso int. | 14:55 | |
o/ | |||
14:55
pippo left
15:00
xenoterracide joined
15:24
Rotwang left
15:40
guru joined
15:41
guru is now known as ajr_
15:42
darutoko- joined,
darutoko left
15:46
vaskozl left,
logie joined
15:52
vaskozl joined
15:57
zakharyas left
16:03
benabik joined,
Maddingue joined
16:04
logie left
16:11
guest10 joined,
guest10 left
16:15
hoverboard joined
16:16
lizmat joined
16:21
Shozan is now known as SHODAN
16:23
xenoterracide left,
xenoterracide joined
16:26
ssutch joined
|
|||
masak misses sorear | 16:27 | ||
FROGGS | yeah | ||
16:31
ssutch left
|
|||
raydiak | morning #perl6 | 16:34 | |
moritz | good UGT, raydiak | 16:35 | |
raydiak | \o | 16:37 | |
16:37
hoverboard left
|
|||
raydiak | I recommend installing ssl on feather and pointing the links to their new location. wouldn't count on raw2 being not a redirect forever. | 16:39 | |
also, was wondering if we want redirection to work with the modules.perl6.org script, or if we want to know when they change (by them breaking) | 16:41 | ||
timotimo | perhaps we want reports from the cron job to be received by many members of the community | 16:43 | |
and output things like that at the top if possible | |||
or at least easy to see at a glance | 16:44 | ||
16:49
denis_boyun joined,
denis_boyun__ left
|
|||
raydiak | apologies, apparently my morning has other plans for me. :P back in a while. | 16:50 | |
17:11
zakharyas joined
17:21
hoverboard joined
17:23
anaeem1 joined
|
|||
timotimo | :) | 17:25 | |
that's fair | |||
17:47
anaeem1 left
17:48
xenoterracide left
17:49
xenoterracide joined
17:50
anaeem1_ joined
17:52
anaeem1_ left
17:53
anaeem1_ joined
17:55
denis_boyun left
17:57
rurban joined
18:10
jtpalmer left
18:11
telex left,
jtpalmer joined
18:12
telex joined
18:15
xenoterracide left
18:18
anaeem___ joined
18:21
anaeem1_ left
18:26
woosley left
18:28
woosley joined
18:29
zakharyas left
|
|||
dalek | rl6-most-wanted: e1cc7bc | (Andrew Egeler)++ | most-wanted/modules.md: Mention Net::IMAP |
18:31 | |
18:40
anaeem___ left
18:45
anaeem1_ joined
18:47
hoverboard left
18:48
kurahaupo joined
18:49
raiph joined
18:50
darutoko- left
18:53
xinming_ left
18:59
xinming_ joined
19:07
rindolf left
19:08
raiph left
19:09
raiph joined
19:20
anaeem1_ left
19:35
anaeem1_ joined
|
|||
vaskozl | Hey I'm trying to learn perl6 and I'm confused as to why you have all these "methods" that you put after a scalar or so with a dot instead of just having functions | 19:35 | |
I don't really like these methods for now :( | |||
masak | I'm willing to explain, but I need to understand your concern/confusion first. | 19:36 | |
vaskozl | yah I've never really understood object orientation | ||
19:36
Su-Shee joined
|
|||
masak | methods are like functions, but they are "tied" to a certain class, so that all objects of that class can be called with that method. | 19:36 | |
Su-Shee | good evening. | ||
masak | Su-Shee! \o/ | ||
vaskozl | hey | ||
masak | vaskozl: here, let me put together an example, so we can talk about it. | ||
vaskozl | masak: examples would probably help | 19:37 | |
raiph | By default: when regex partially match, then fail, they backtrack to try another way; tokens don't backtrack; rules don't backtrack and add <ws>+ between elements. #6now #grammar #regex #rule #token #faq irclog.perlgeek.de/perl6/2014-04-26#i_8640947 | ||
vaskozl | I don't really understandthe part: that all objects of that class can be called with that method | ||
raiph: please take small steps.. | 19:38 | ||
masak | m: class Computer { has $.name; method greet() { say "Bleep blorp, I am $.name" } }; my $c1 = Computer.new(:name<COMPUTRON>); my $c2 = Computer.new(:name<FORTRANATOR>); $c1.greet; $c2.greet | ||
camelia | rakudo-moar 440739: OUTPUT«Bleep blorp, I am COMPUTRONBleep blorp, I am FORTRANATOR» | ||
masak | vaskozl: hoping that was a small enough step. please study the code above. | ||
vaskozl tries to proccess what he sees | |||
masak | there's a class declaration, telling you what a "Computer" is. | ||
raiph | vaskozl: what I wrote has nothing to do with your dialog with masak, please ignore it | 19:39 | |
masak | it contains an attribute $.name, which all Computers have. | ||
and a method, greet, which all Computers do. | |||
next, we create ("instantiate") two new Computer objects, and put them in $c1 and $c2. | |||
then we call their methods. | |||
note *especially* that each Computer object knows what it's called. that's the crucial bit. | |||
objects are bundles of data (like $.name) traveling along with shared methods (like greet). | 19:40 | ||
hth | |||
19:41
hoverboard joined
|
|||
vaskozl | masak: what do you call an object? | 19:41 | |
masak | the things in $c1 and $c2. | 19:42 | |
vaskozl | aren't those scalars? | ||
masak | the variables are scalars, yes. | ||
the values inside of them are objects. | |||
we can ask values to identify themselves. hold on. | 19:43 | ||
m: say 42.WHAT | |||
camelia | rakudo-moar 440739: OUTPUT«(Int)» | ||
masak | m: class Computer { has $.name; method greet() { say "Bleep blorp, I am $.name" } }; my $c1 = Computer.new(:name<COMPUTRON>); say $c1.WHAT | ||
camelia | rakudo-moar 440739: OUTPUT«(Computer)» | ||
masak | see? one is a normal Int, the other is a Computer object. | ||
(the cool thing being that "Computer" is a type that we just added to the programming language ourselves) | 19:44 | ||
m: say [].WHAT; say {}.WHAT; say (2/3).WHAT | 19:45 | ||
camelia | rakudo-moar 440739: OUTPUT«(Array)(Hash)(Rat)» | ||
vaskozl | so why would we just do: sub computer { say "Bleep blorp, I am @_[0]"; }; computer('COMPUTRON'); computer('FORTRANTOR'); | ||
*wouldn't | |||
masak | you can, in a lot of cases. | 19:46 | |
but objects *persist* after you've called them. | |||
vaskozl | persist? | ||
masak | you can see that from the order in which I did things: create $c1, create $c2, call $c1.greet, call $c2.greet | ||
with your solution, you call them once, and then they're gone. | 19:47 | ||
that's, like, the opposite of persisting :) | |||
yes, "persist" as in "stay around for as long as you need them, holding the data you've put into them". | |||
vaskozl | masak: call $c1.greet, when did we do that? | ||
masak: OOH, it holds the original input! | 19:48 | ||
masak | yes! | ||
*lightbulb on*! | |||
:D | |||
vaskozl | but why don't we just have $inputcomputer1 and $outputcomputer1 | ||
masak | not sure what you mean. | ||
vaskozl | $output1 = sub($input1); | 19:49 | |
masak | the cool thing is that we can "put away" the names of the computers into those objects, and then they are not really our concern any more. they "belong" to the objects, and the objects manage that data. | ||
19:49
anaeem1_ left
|
|||
masak | ah, well what you're suggesting works in small cases, but it quickly gets messy for bigger things. | 19:49 | |
vaskozl | what was the $c1.greet you mentioned? | 19:50 | |
masak | the big win here is that objects "hide" their data and expose everything through the methods instead, so in some sense we don't have to care as much about how the objects do things. | ||
$c1.greet is a method call I did above. | |||
the crucial thing is that I defined greet as a method on the class ("Computer"), but then I called it on an object ($c1). | |||
vaskozl | did we have $c1.greet in our code? | 19:51 | |
oh yah I see | |||
masak | yes, we did :) | 19:52 | |
vaskozl | wow now I think I understand it | ||
masak | \o/ | ||
vaskozl: let's take a bigger example. say you have a window manager. | |||
vaskozl | so we can have a bunch of different methods | ||
and each method may use different attributes | |||
masak | vaskozl: each individual thing on the screen that you care about can be an object: windows, text boxes, buttons, labels, etc. | ||
vaskozl | I'm taking a leap of fait here | 19:53 | |
19:53
rurban left
|
|||
masak | vaskozl: but they often have things in common, so their classes often share many attributes and methods between each other (through various mechanisms such as inheritance) | 19:53 | |
vaskozl: for example, you can ask almost any object for its width, or tell it to place itself somewhere on the screen. | |||
or maybe there's a "click" method that gets called when the user clicks on one of the objects on the screen. | 19:54 | ||
now, all this *could* be done with just subroutines as you propose, but it's usually nicer to separate things into their own classes and objects. | |||
think of it as a way of organizing things. | |||
vaskozl | alright | ||
masak | object oriented programming is not a God-given. it's just one of many possible ways to manage complexity. | 19:55 | |
vaskozl | it seems to me that's it makes managing a bunch of similar things more easily | 19:56 | |
like a lot of buttons | |||
masak | right. | ||
you can have hundreds of button objects on-screen, but they're all managed by the same Button class. | |||
so each method in that class only needs to exist in one place in memory. | |||
and each Button object holds its individual state, such as position, button text, and whether it's being pressed down or not. | 19:57 | ||
vaskozl | masak: I'm stunned by how quickly and efficiently you are explaing this to me | ||
masak | vaskozl: I'm glad. | ||
vaskozl: at $dayjob, I teach. | |||
vaskozl | masak: and there are a bunch of default methods in perl6? | 19:58 | |
like .get and .words | |||
masak | yeah, there are hundreds. | ||
m: for "do you feel lucky punk".words -> $word { say "$word.uc()." } | 19:59 | ||
camelia | rakudo-moar 440739: OUTPUT«DO.YOU.FEEL.LUCKY.PUNK.» | ||
masak | .words takes a string and divides into chunks of non-whitespace. | ||
vaskozl | what's the .uc method do? | ||
masak | .uc takes a string and Upper-Cases it. | ||
there's also .lc and .tc :) | 20:00 | ||
feel free to try. | |||
vaskozl | oh.. | ||
that's pretty cool | |||
masak | those particular methods are "string methods". | ||
I don't know whether they're actually on the Str class in this case, but for simplicity, let's assume they are. | 20:01 | ||
m: say ?Str.has("uc") | |||
camelia | rakudo-moar 440739: OUTPUT«No such method 'has' for invocant of type 'Str' in block at /tmp/5mOhsLa1jq:1» | ||
masak | m: say ?Str.^has("uc") | ||
camelia | rakudo-moar 440739: OUTPUT«No such method 'has' for invocant of type 'Perl6::Metamodel::ClassHOW' in block at /tmp/aeXUv_Tv9H:1» | ||
masak | hrm. | ||
m: say ?Str.^does("uc") | |||
camelia | rakudo-moar 440739: OUTPUT«False» | ||
masak | there we go. | ||
m: say ?Str.does("uc") | |||
camelia | rakudo-moar 440739: OUTPUT«True» | ||
masak | m: say ?Str.does("scary-freakin-dinosaurs") | 20:02 | |
camelia | rakudo-moar 440739: OUTPUT«True» | ||
masak | o.O | ||
m: say Str.does("scary-freakin-dinosaurs") | |||
camelia | rakudo-moar 440739: OUTPUT«True» | ||
masak | oh, I'm using the wrong method :P | ||
retupmoca | m: say ?Str.can("scary-freakin-dinosaurs") | ||
camelia | rakudo-moar 440739: OUTPUT«False» | ||
masak | m: say ?Str.can("uc") | ||
camelia | rakudo-moar 440739: OUTPUT«True» | 20:03 | |
masak | m: say ?Str.can("scary-freakin-dinosaurs") | ||
camelia | rakudo-moar 440739: OUTPUT«False» | ||
masak | that's better. | ||
ignore my fumbling with "has" and "does" -- apparently, I'm tired. | |||
vaskozl | I got kinda lost with all the ?Str.^ and what's true or false | ||
masak | yeah, just look at the last two evals. | ||
objects "know" what you can call on them and what you can't. | |||
20:04
Mouq joined
|
|||
masak | let's get back to basics. | 20:04 | |
vaskozl | so are you checking if scary-freakin-dinosaurs is a method? | ||
masak | right. | ||
(it isn't) | |||
vaskozl | surprise surprise! | ||
masak | Perl 6 can surprise you :) | ||
for example, we have a Mu class. | |||
someone also added this lately: | 20:05 | ||
m: say 42.WHY | |||
camelia | rakudo-moar 440739: OUTPUT«Life, the Universe and Everything» | ||
vaskozl | m: say 42.why | ||
camelia | rakudo-moar 440739: OUTPUT«No such method 'why' for invocant of type 'Int' in block at /tmp/BDAywA9HeU:1» | ||
masak | case-sensitive. | ||
needs to be .WHY | |||
vaskozl | why is it in all caps? | ||
masak | some methods are special. | ||
.WHAT and .WHY are kind of "debugging methods". | |||
not meant for a healthy program. | |||
vaskozl | masak: ok that makes sense | 20:06 | |
masak | so they shout to mark that something is going on. | ||
oh, speaking of all-caps things... | |||
gonna show you something. :) | |||
Mouq | m: say "1+20*2+e**(2*pi*i).re".EVAL | 20:07 | |
camelia | rakudo-moar 440739: OUTPUT«42» | ||
Mouq | m: say "1+20*2+e**(2*pi*i).re".EVAL.WHY | ||
camelia | rakudo-moar 440739: OUTPUT«(Any)» | ||
masak | m: for reverse 1 .. 10 -> $count { LAST { say "liftoff! lots of smoke and fire!" }; say "$count..." } | ||
camelia | rakudo-moar 440739: OUTPUT«10...9...8...7...6...5...4...3...2...1...liftoff! lots of smoke and fire!» | ||
Mouq | m: say "1+20*2+e**(2*pi*i).re".EVAL.Int.WHY | ||
camelia | rakudo-moar 440739: OUTPUT«Life, the Universe and Everything» | ||
masak | vaskozl: see the countdown above :) | ||
Mouq | also o/ | ||
masak | vaskozl: and the LAST block, which gets executed after the last iteration. | ||
Mouq: \o | |||
20:08
LLamaRider joined
|
|||
masak | vaskozl: in this case, the "LAST" is uppercase because the special thing going on is "out-of-the-flow" timing of things. the LAST doesn't get executed where it is, but afterwards. | 20:08 | |
in the same vein: | 20:09 | ||
m: say "HAI"; BEGIN { say "OH" } | |||
camelia | rakudo-moar 440739: OUTPUT«OHHAI» | ||
masak | (BEGIN blocks run during compilation; the rest of the program runs during runtime.) | ||
Mouq | m: END {say now - BEGIN now}; my $expensive-computation = [+] 0..100000 | 20:10 | |
camelia | rakudo-moar 440739: OUTPUT«0.60834820» | ||
20:10
vaskozl left
|
|||
Mouq | m: END {say now - BEGIN now}; my $expensive-computation = [+] 0..100000; say $expensive-computation | 20:11 | |
camelia | rakudo-moar 440739: OUTPUT«50000500000.6682453» | ||
20:11
vaskozl joined
|
|||
vaskozl | s/between to/between two/;s/keywoard/keyword/ | 20:11 | |
oh.. did I lose connection? | |||
masak | for a little while. | ||
see /topic for a backlog :) | 20:12 | ||
vaskozl | masak: uhm what in the topic? | ||
20:12
woolfy joined
|
|||
vaskozl | what was the last thing I said? | 20:12 | |
masak | vaskozl: irclog.perlgeek.de/perl6/today | ||
woolfy: \o | 20:13 | ||
woolfy | masak \o/ | ||
lizmat and jnthn are tired from NLPW and King's Day festivities and bicycle trip | |||
masak | I can imagine :) | ||
vaskozl | I don't really like too much all caps :/, which I think perl handles quite well | 20:15 | |
masak | most of the keywords are lowercase :) | ||
the all-caps things are reserved for special stuff. | |||
Mouq really likes that he can do $var-name rather than $var_name or $varName. so much nicer and easier to type | 20:16 | ||
vaskozl | I'm gonna paste my question I asked when I DC'd (sorry): | ||
is there an object that removes newlines from a string allowing us to regex the entire file instead of line by line? | |||
I often want to extract something between two <plaintext>extract me!</plaintext> tags in a file | |||
that I know to be after some keyword | 20:17 | ||
and I never know how to do it :/ | |||
currently I'm stupidly running trough sed to remove newlines and passing the input as one line | |||
s/object/method/ | |||
masak | vaskozl: I think what you want is the IO.slurp method. | 20:18 | |
vaskozl: it reads in a file as a single string, which you can then manipulate as you see fit. | |||
FROGGS | "myfile.txt".IO.slurp.subst(/.../, '', :g) | ||
Mouq | m: say "ab\ncd\n<plaintext>\nextract me!\n</plaintext>" ~~ ms/'<plaintext>' .*? '</plaintext>'/ | ||
camelia | rakudo-moar 440739: OUTPUT«「<plaintext>extract me!</plaintext>」» | ||
Mouq | m: say "ab\ncd\n<plaintext>\nextract me!\n</plaintext>" ~~ ms/'<plaintext>' <( .*? )> '</plaintext>'/ | 20:19 | |
camelia | rakudo-moar 440739: OUTPUT«「extract me!」» | ||
vaskozl | alright that's cool! | 20:21 | |
how'd we do it with STDIN? | |||
masak | m: say get | ||
camelia | rakudo-moar 440739: OUTPUT«There were three men came out of the West» | ||
masak | m: say get.subst(/men/, 'really cool dudes') | ||
camelia | rakudo-moar 440739: OUTPUT«There were three really cool dudes came out of the West» | ||
vaskozl | masak: what did you just do? | 20:22 | |
lue | m: say $*IN.slurp.subst(/men/, 'really cool dudes', :g); # :P | ||
camelia | rakudo-moar 440739: OUTPUT«There were three really cool dudes came out of the WestTheir fortunes for to tryAnd these three really cool dudes made a solemn vowJohn Barleycorn must dieThey've ploughed, they've sewn, they've harrowed him inThrew clouds upon his head…» | ||
masak | lue: :) | ||
vaskozl: 'get' reads a line from STDIN. | |||
vaskozl: .subst does the substitution. | |||
FROGGS | vaskozl: there is a textfile attached to camelia's stdin | 20:23 | |
vaskozl | oh... | ||
masak | vaskozl: lue++ just showed how to do the substitution "globally" (:g), many times. | ||
oh, yes. textfile. forgot to mention. | |||
I have no idea what that poem is. | |||
but I realize I haven't had enough irreverent fun with it since it changed from the Austrian national anthem. :) | |||
20:24
raiph left
|
|||
Mouq | vaskozl: $*IN.slurp or lines.join ($*IN is set to STDIN by default) | 20:24 | |
vaskozl: We have the evalbot's STDIN set to github.com/perl6/evalbot/blob/master/stdin | |||
Timbus | slurp works on $*IN on nits own doesnt it? | ||
vaskozl | now I know where to contribute... | ||
Timbus | just like lines and get | ||
masak | m: for lines() -> $line { say $line.subst(/\w+$/, -> $/ { $/.uc }) } | ||
camelia | rakudo-moar 440739: OUTPUT«There were three men came out of the WESTTheir fortunes for to TRYAnd these three men made a solemn VOWJohn Barleycorn must DIEThey've ploughed, they've sewn, they've harrowed him INThrew clouds upon his HEADAnd these three men made a …» | ||
masak | Timbus: aye. | 20:25 | |
Timbus | cool | ||
Mouq | Timbus: lines() is just $*IN.lines AFAIK | ||
masak | vaskozl: what Timbus++ just said. some methods (like .slurp) have a subroutine form (like slurp) with some defaul behavior. | ||
Mouq | Oh | 20:26 | |
masak | Mouq: more like $*ARGFILES.lines, but yes. | ||
Mouq | Oh | ||
20:26
Rotwang joined
|
|||
masak | default* | 20:26 | |
Mouq didn't realize there was a slurp sub | 20:27 | ||
FROGGS | most ppl expect that for basic file IO me thinks | ||
masak | it's a nice convenience. | 20:28 | |
it's like STDIN and STDOUT are "there", in a kind of ambient global presence in the program, even though they're really objects. | |||
vaskozl | get gives only the first line for me :/ | ||
Mouq | Does anyone know it jnthn++'s golf-helper script works on OS X? | 20:29 | |
masak | vaskozl: yes, get does one line at a time. | ||
vaskozl: if you want the whole file, use slurp. | |||
vaskozl: if you want a list of lines, use lines. | |||
vaskozl | masak: can we get the whole input at once? | ||
lets say we have a file with names on each line | 20:30 | ||
and we want to print all names between the two specific names John and Billy | 20:31 | ||
Mouq | vaskozl: "< masak> vaskozl: if you want the whole file, use slurp." | 20:33 | |
vaskozl | oh right | ||
yah I just realised | |||
Mouq | :) | ||
masak | vaskozl: < masak> vaskozl: I think what you want is the IO.slurp method. | ||
vaskozl | yah, you might have to tell me 5 times before I get it O_O | ||
vaskozl goes on to fix all his stupidly done scripts up to now | 20:34 | ||
Mouq | m: for lines() { .say if m/^They/ ff m/^And/ } | ||
camelia | rakudo-moar 440739: OUTPUT«They've ploughed, they've sewn, they've harrowed him inThrew clouds upon his headAnd these three men made a solemn vowThey've let him lie for a very long timeTill the rains from heaven did fallAnd little Sir John sprung up his headThey've…» | ||
lue forgot what ff is supposed to do | 20:35 | ||
vaskozl is wondering the same | |||
Mouq | "flipflop" | ||
It's false until the first thing is true | |||
vaskozl | and why do we have a 'Threw'? | ||
Mouq | Then it's true until the second thing is true | 20:36 | |
masak | because it picks all the lines in between. | ||
Mouq | And then it's false again | ||
vaskozl | ah.. | ||
masak | *after* the line that matches. | ||
Mouq | (it's not the most commonly used operator) | ||
masak | m: for lines() { .say if m/^They/ ff^ m/^And/ } | ||
camelia | rakudo-moar 440739: OUTPUT«They've ploughed, they've sewn, they've harrowed him inThrew clouds upon his headThey've let him lie for a very long timeTill the rains from heaven did fallThey've let him stand till midsummer's dayTill he looked both pale and wanThey've …» | ||
vaskozl | I thought it was some sort or "or" in the beggining | ||
lue | Mouq: seeing ff reminded me somebody needs to create a new table of operators by now :) | 20:37 | |
masak | ff is not very commonly used. | ||
vaskozl | I saw youtu.be/x4Ep0VKa_ZI with Larry Wall the other day. | 20:38 | |
was stunned by them vim skills | |||
20:39
benabik left
|
|||
vaskozl | You guys are awesome btw, thx for all the help! | 20:41 | |
masak | vaskozl: we're happy you stopped by. | ||
vaskozl: keep coming back :> | 20:42 | ||
vaskozl | in #perl I'd get !perlbot rtfm, tutorial, stupid | ||
masak: I never leave :D | |||
lue | no problem, we're glad you have a better understanding of object oriented programming now :) | ||
masak | hehe, #perl keeps being lovable as always... :) | ||
vaskozl: I'm happy someone asked me to explain OO tonight. put me in a good mood ;) | |||
vaskozl | masak: yay! | ||
vaskozl is going to have some weird dreams tonight | 20:43 | ||
20:43
pippo_ joined
|
|||
lue | masak: IIUC, the kindness here is all thanks to au++, no? | 20:43 | |
20:43
pippo_ left
20:44
pippo joined
|
|||
vaskozl | I also love how quickly you solved the -p flag and added multiple flag support like -pe and -ne | 20:44 | |
masak | lue: dunno about "all", but she gave it a really good start. | ||
wow, -pe has been added now? great! | 20:45 | ||
vaskozl++ | |||
shows how we need newcomers with the priorities in all the right places :P | |||
vaskozl | it was literally added 5 minutes after I asked about it | 20:46 | |
masak | that's a nice amount of minutes. | ||
vaskozl | sometimes I think it'd be better if we were using base 12 | 20:47 | |
btw, does masak++ increase rating or something? | 20:48 | ||
or is it just a way of saying kudos? | 20:49 | ||
lue | .oO(great, another karma-check-fest incoming...) |
||
karma lue | |||
vaskozl | T_T | ||
lue | .karma lue | ||
masak | not sure we have a karma bot at the mo. | ||
lue | vaskozl: don't worry about it, not a bad thing :) | 20:50 | |
Mouq | m: rand(42) # www.youtube.com/watch?v=x4Ep0VKa_ZI | 20:51 | |
camelia | rakudo-moar 440739: OUTPUT«===SORRY!=== Error while compiling /tmp/DUu5GJMo4bUnsupported use of rand(N); in Perl 6 please use N.rand or (1..N).pickat /tmp/DUu5GJMo4b:1------> rand⏏(42) # www.youtube.com/watch?v=x» | ||
Mouq | \o/ | ||
20:53
rurban joined
|
|||
vendethiel | <awesome people>++ | 20:53 | |
20:55
ajr_ left
20:57
rurban left
20:59
kurahaupo left
|
|||
vaskozl | where can I read more about ms/'<plaintext>' <( .*? )> '</plaintext>'/ syntaxness? | 21:00 | |
vendethiel | S05, probably :) | ||
lue | vaskozl: there's also doc.perl6.org/language/regexes, which might be easier to read than S05 | 21:01 | |
avuserow | colomon: I just updated Audio::Taglib::Simple to use proxies. I agree that it seems like a more appropriate way to handle editing in this case. Let me know if you have any other comments or feedback on it. I'd also love to hear about anything built with it | ||
vaskozl | S05 being? | 21:02 | |
vendethiel | lue: definitely ! | ||
vaskozl: the Synopse 05 | 21:03 | ||
Mouq | vaskozl: perlcabal.org/syn/S05.html | ||
vaskozl | I'm trying something like ms/'keyword .*? <plaintext>' <( .*? )> '</plaintext>'/ | ||
but I just get false | 21:04 | ||
Mouq: thx! | |||
Mouq | vaskozl: You have the .*? in the quotes | ||
21:04
rurban joined
|
|||
Mouq | The quotes actually make the .*? a literal string that the regex matches againts | 21:04 | |
8st | |||
bluh | |||
s/nts/nst/ | |||
vaskozl | argh ok! | ||
so qutoes need to be escaped now! | 21:05 | ||
Mouq | vaskozl: Yup! | ||
vaskozl: "Alphanumeric characters and the underscore _ are literal matches. All other characters must either be escaped with a backslash (for example \: to match a colon), or included in quotes" | |||
vaskozl: doc.perl6.org/language/regexes#Literals | 21:06 | ||
vaskozl | Mouq: thx again! | ||
why am I getting weird squares before and after the output? | |||
Mouq | vaskozl: Perl 6 regexes take some adjusting from PCRE, but it's definitely worth it | 21:07 | |
lue | m: say uniname($_) for <「 」> | ||
camelia | rakudo-moar 440739: OUTPUT«HALFWIDTH LEFT CORNER BRACKETHALFWIDTH RIGHT CORNER BRACKET» | ||
vaskozl | what are they caused by? | 21:08 | |
lue | vaskozl: Rakudo uses those corner brackets to surround the output, because they're the shortcut for Q[...] | 21:09 | |
(like how '' is the shortcut for q[...], and "" the shortcut for qq[...]) | |||
Q is basically a raw string: no backlashes or other fancy tricks work. | 21:11 | ||
vaskozl won't even pretend he understand | |||
21:11
bjz joined
|
|||
vaskozl | I don't get these with a simple perl -e 'say "hello"' | 21:11 | |
why are these annoying things there now? | |||
FROGGS | vaskozl: say in P6 does an output for human eyes | 21:12 | |
lue | r: my $foo; say "Double quotes: \\ $foo \""; say 'Single quotes: \\ $foo \''; say 「\\ $foo \」 # note I didn't bother with a second 」, to avoid a compiler error | ||
camelia | rakudo-{jvm,moar} 440739: OUTPUT«use of uninitialized value of type Any in string contextDouble quotes: \ "Single quotes: \ $foo '\\ $foo \» | ||
..rakudo-parrot 440739: OUTPUT«use of uninitialized value of type Any in string context in block at /tmp/tmpfile:1Double quotes: \ "Single quotes: \ $foo '\\ $foo \» | |||
lue | r: my $foo = 42; say "Double quotes: \\ $foo \""; say 'Single quotes: \\ $foo \''; say 「\\ $foo \」 # note I didn't bother with a second 」, to avoid a compiler error | ||
FROGGS | if you what an output that machines understand user either print, or say ~$x | ||
camelia | rakudo-{parrot,jvm,moar} 440739: OUTPUT«Double quotes: \ 42 "Single quotes: \ $foo '\\ $foo \» | ||
Mouq | vaskozl: You don't get them with perl6 -e 'say "hello"' either | 21:13 | |
vaskozl | I imagine the squares I'm seeing aren't supposed to be squares are they? | ||
Mouq | vaskozl: We output them so it's clear that it's a match | ||
vaskozl: No, they're not :) | |||
FROGGS | true, corner brackets do only appear around match objets | ||
objects* | |||
lue | vaskozl: they should look like corners, top left and bottom right respectively. | 21:14 | |
Mouq | vaskozl: www.fileformat.info/info/unicode/ch.../index.htm | ||
vaskozl: www.fileformat.info/info/unicode/ch.../index.htm | |||
Mouq is very distractable today | |||
21:14
Rotwang left
|
|||
Mouq ran the steeple chase at a meet yesterday | 21:15 | ||
it was a lot of fun and one the best physical challenges I've had in a while | |||
21:17
vaskozl left
|
|||
lue | Heh, I notice doc.perl6.org hasn't a page on quotes, perhaps I should write one in a bit :) | 21:17 | |
Mouq | lue: doc.perl6.org/language/terms | 21:18 | |
Oh, I never gen'd a new doc.perl6.org | |||
But please add to what we've started on it :) | |||
There, I updated it somewhat… | 21:19 | ||
lue | I almost think quoting construct could/should be a separate page (we got a separate page (at least kinda) for that Regex section, and I should think a sublang like Q deserves its own page :P) | 21:20 | |
Mouq | lue: Then do it :) | ||
lue | Perhaps later, I'm busy doing something else at the moment :) | 21:24 | |
Mouq | lue: Ok :) | ||
21:24
vaskozl joined
21:25
benabik joined
21:37
raiph joined,
benabik left
|
|||
dalek | c: fe92708 | Mouq++ | / (2 files): Use the TITLE for "Language Documentation", if possible moritz++ ( irclog.perlgeek.de/perl6/2014-04-26#i_8641084 ) |
21:38 | |
Mouq | Oh crap | 21:39 | |
The links now point to the wrong place -_- | |||
21:39
kl joined
21:40
bjz left
21:42
grondilu left,
hoverboard left
|
|||
raiph | .ask jnthn why do you have P5 code in your "reactive programming in perl 6" presentation ("while (!eof($fh)) { my $line = <$fh>; next if $line =~ /^\#/; # … }")? | 21:43 | |
yoleaux | raiph: I'll pass your message to jnthn. | ||
21:49
dmol left
|
|||
FROGGS | raiph: sometimes it is good to start with something what the audience knows, and then take them bit by bit to the thing you want to show | 21:57 | |
21:59
kl left
|
|||
avuserow | is DESTROY still a thing? I can only find two passing mentions of it in the specs, and one test that isn't in spectest.data | 22:00 | |
arnsholt | Destructors are tricky | 22:01 | |
avuserow | I don't need prompt destruction, just for it to happen eventually... | ||
arnsholt | With refcounting you get timely destruction and, more crucially, a known order of destruction | 22:02 | |
With many (most?) other GC algorithms, you can't even make guarantees for the order in which objects are destructed | |||
masak | I don't see the enthusiasm around DESTROY that would ever make it a useful feature, even if it were implemented. | 22:03 | |
arnsholt | Which makes DESTROY harder to implement (IIRC), and also a bit dangerous | ||
Cf. the thing in Java where a finalizer can revive objects if you screw up | |||
FROGGS | .tell daxim I have information about ß.uc... if you are interested please either read your privmsg or ping me | 22:04 | |
yoleaux | FROGGS: I'll pass your message to daxim. | ||
timotimo | Mouq: what is a steeple chase? | 22:05 | |
avuserow | yeah, I understand that destructors are difficult in this way. I guess I have to bubble up the free requirement from the native library to module users | ||
I noticed that after reading ~1100 files, this library stops working if I don't free its pointers | 22:06 | ||
FROGGS | timotimo: hürdenlauf | 22:07 | |
timotimo | ah | ||
vendethiel | :o) | ||
FROGGS | yay, $dayjob done, now I am tired :/ | 22:08 | |
Mouq | timotimo, FROGGS: not quite hürdenlauf, more like en.wikipedia.org/wiki/3000_metres_steeplechase (though this was only a 2000m steeplechase) | 22:09 | |
FROGGS | Mouq: that is hürdenlaufig enough for me :o) | 22:10 | |
timotimo | aye | ||
FROGGS | well, for somebody sitting on a couch anyway | 22:11 | |
timotimo | :D | ||
you do your steeple chase while you're sitting on a couch? | |||
that's a pretty amazing feat | |||
Mouq | FROGGS: Haha. The difference (other than distance) is that the barriers are shaped so that they can be stepped on and can't be knocked over, and there's a big ol' pit of water to jump off a barrier into | 22:13 | |
(The pit is deeper further in, so you try to jump as far out as possible. Jumping over completely is possible, but not really advised) | 22:14 | ||
22:14
molaf joined,
zakharyas joined
|
|||
timotimo | so combined running and swimming? :) | 22:15 | |
Mouq | timotimo: Thankfully not :) The pit is maybe 1.5+ m long | 22:17 | |
Oh | 22:18 | ||
FROGGS | 1.5m+ is enough for my wife to swim in there :o) | ||
Mouq | "The water jump consists of a barrier followed by a pit of water with a landing area 3.66 metres (12.0 ft) wide × 0.70 metres (2.3 ft). It then slopes upward from 700 millimetres (28 in) deep to level with the surface of the track." | ||
Mouq is only off by a factor of 2 | |||
grfx.cstv.com/schools/niu/graphics/...050909.jpg | 22:20 | ||
FROGGS | yeah, I don't even know how that is called here... | 22:22 | |
gnight all | |||
Mouq | 'gnight FROGGS :) FROGGS++ for the loop labels stuff, btw, I was super excited to see work on that | 22:23 | |
timotimo | aye! | ||
22:23
vaskozl left
|
|||
raiph | .tell jnthn I guess what I mean is that the PDF should at least mention that that first fragment is P5 code (though I'd prefer that the whole PDF was P6 code) so it works for folk who don't know or care about P5 | 22:26 | |
yoleaux | raiph: I'll pass your message to jnthn. | ||
masak | 'night, #perl6 | ||
raiph | night | ||
Mouq | night masak! | ||
dalek | c: ea7d720 | Mouq++ | / (2 files): Fix url creation for language documentation |
||
22:28
zakharyas left
22:29
vaskozl joined
|
|||
dalek | c: 4cadbce | Mouq++ | htmlify.pl: *Actually* fix url creation for language documentation |
22:39 | |
Mouq needs to make htmlify do caching so that it doesn't take 13 minutes to verify a simple commit | 22:40 | ||
s/Mouq/Someone/ | |||
:P | |||
22:42
colomon left
22:58
colomon joined
|
|||
dalek | kudo/nom: 46b38f7 | Mouq++ | src/core/Routine.pm: Make sure Routine.perl makes an EVALable string E.g. (sub {1+1}).perl would produce something like 'sub() { #`(Sub|4345502344) ... }', which will parse sub() as a function. This fixes Routine.perl to be more like 'sub () { #`(Sub|4345502344) ... }'. |
23:02 | |
avuserow | I think I'm going to do a non-NativeCall module for my next project | 23:03 | |
timotimo | have an idea yet? :) | ||
lue imagines an output for Routine.perl that reconstructs code from the AST, and unintentionally becomes a "this is how a REAL computer writes this sub" | |||
* a "this is ..." method | 23:04 | ||
avuserow | I have several | ||
many of them are from the most-wanted list | |||
I also would find it useful to have some sort of simple single-file cache for stuff like cronjobs | 23:05 | ||
in one of my P5 projects, I wanted to be able to keep track of state from the last 5 or so days | 23:06 | ||
so something that makes that easy is high on my list | |||
either that, or bindings to Last.FM's API :) | 23:07 | ||
timotimo | www.youtube.com/watch?v=HOfll06X16c - oh fun! | ||
23:11
rom1504 joined
|
|||
Mouq | ++avuserow | 23:13 | |
timotimo | that's how bugs get discovered :) | ||
i'm fond | |||
not necessarily fond of anything in particular. just fond. | 23:14 | ||
avuserow | oh or I could patch this: | ||
m: say Buf.new eq "" | |||
camelia | rakudo-moar 440739: OUTPUT«(timeout)» | ||
timotimo | oh! i recall i wanted to have a discussion with people with more knowledge about this topic | ||
avuserow | well I guess the other impls have a "better" infinite recursion message | 23:15 | |
p: say Buf.new eq "" | |||
timotimo | whether to introduce a candidate for eq for the Buf types on the lhs or rhs or whether to drop the does Stringy from class Buf | ||
camelia | rakudo-parrot 440739: OUTPUT«maximum recursion depth exceededcurrent instr.: 'print_exception' pc 146395 (src/gen/p-CORE.setting.pir:61588) (gen/parrot/CORE.setting:11337)called from Sub 'Stringy' pc 224364 (src/gen/p-CORE.setting.pir:92270) (gen/parrot/CORE.setting:1044)ca…» | ||
timotimo | yeah, moar doesn't have a finite stack size ;) | ||
23:15
spider-mario left
|
|||
timotimo | er | 23:15 | |
it doesn't have a limit to the exact number of stack frames | |||
avuserow | whoa, infinite stack? that's impressive :D | ||
:P | |||
timotimo | like a turing machine, but different | 23:16 | |
Mouq | timotimo: That video is really cool | 23:23 | |
lue | timotimo: if you ask me, Buf shouldn't do Stringy, but others may disagree :) | 23:25 | |
23:26
hoverboard joined,
btyler joined
|
|||
timotimo | lue: you're definitely more "in the know" when it comes to all the kinds of stringy things | 23:26 | |
but i do recall there was quite an argument last time :) | |||
lue | Heh :) My opinion boils down to the fact that Buf can handle more than Stringy (namely, non-textual data), and Perl 6 doesn't tend to define subset relations of that nature | 23:28 | |
r: say Int ~~ Rat # math would say True | 23:29 | ||
timotimo | that seems like a good point of reference | ||
camelia | rakudo-{parrot,jvm,moar} 440739: OUTPUT«False» | ||
23:29
BenGoldberg joined
|
|||
timotimo | avuserow: how about you prepare code and tests in a pull request (well, either a pull request to rakudo and a pull request to roast, or a pull request to rakudo and a gist that shows the problem/solution) | 23:30 | |
23:30
vaskozl left
|
|||
timotimo | since pull requests are a good way to get a discussion going | 23:30 | |
avuserow | sure | ||
lue | timotimo: What doesn't help the discussion is that, if you look at Rakudo, Stringy is literally nothing at the moment. | ||
timotimo | and the discussion is closer to the code (at least compared to irc) | ||
lue | So 'Buf does Stringy' serves only to cause things like that infinite recursion issue :) | 23:31 | |
(The biggest issue I see with detaching Buf and Stringy is that ~& etc. make sense for buffers, and not strings; yet the ~ impies stringiness, and I can't think of a good "this is a buffer" symbol in its place right now) | 23:33 | ||
timotimo | m: say "\c[SNOWMAN]" | 23:34 | |
camelia | rakudo-moar 46b38f: OUTPUT«☃» | ||
timotimo | always the correct answer | 23:35 | |
BenGoldberg | If you do $bufone ^ $buftwo ... what would be expected to happen? | ||
23:35
mtj_ left
|
|||
lue | BenGoldberg: a Junction appears :P | 23:35 | |
in seriousness, S03 talks about it. | 23:36 | ||
BenGoldberg | (or |, or &) | ||
23:36
vaskozl joined
|
|||
BenGoldberg bonks self on the head | 23:36 | ||
Ok, how about +|, +&, +^, then? | |||
lue | (And always say that ~^ etc. on C<Str>s is a likely design error, one that wouldn't exist if Buf didn't do Stringy *wink*) | ||
BenGoldberg ponders %|, %&, %^ | 23:37 | ||
Naah | |||
timotimo | that seems weird | 23:38 | |
timotimo looks at his keyboard | |||
lue | BenGoldberg: for ~&, for example: " does numeric bitwise AND on corresponding integers of the two buffers, logically padding the shorter buffer with 0 values." ... "This operator is distinguished from numeric bitwise AND in order to provide bit vectors that extend on the right rather than the left (and always do unsigned extension)." | ||
timotimo | how about Γ? | ||
BenGoldberg | .u Γ | ||
yoleaux | U+0393 GREEK CAPITAL LETTER GAMMA [Lu] (Γ) | ||
lue | timotimo: the way I see it, the acceptable buffer symbol would either be ` or something outside the ASCII range, with some sort of Texas equivalent then needed. | ||
timotimo | oh, ` i don't like | 23:39 | |
lue | (looking at my plain ol' US keyboard at least :P) | ||
timotimo | it tends to hide | ||
Ξ is a pretty letter :P | |||
lue | timotimo: yeah, but AFAICT ` is the only thing Perl 6 doesn't do anything with. Never said it was a good pick :) | ||
timotimo | hehe. | ||
BenGoldberg | How about we allow the user to use some sort of compile-time pragma, which says that, until the end of the scope, ^|& are all Buf ops, math ops, or junction ops. | 23:40 | |
timotimo | yikes | ||
i'm going to bed for today | |||
lue should write a blog post on his opinions before too long, so the inefficiencies of IRC for long explanations don't cause problems again | |||
avuserow | m: say [1, 3, 5] +| [2, 4, 6] | ||
camelia | rakudo-moar 46b38f: OUTPUT«3» | ||
timotimo | gnite and good luck :) o/ | ||
avuserow | oh right | ||
lue | ♞ timotimo o/ | ||
avuserow | o/ timotimo | 23:41 | |
BenGoldberg | Good night :) | ||
vendethiel | m: sub prefix:<Γ>(Bool $n) { return !$n }; sub infix:<Ξ>($a, $b){ $a == $b }; say Γ5 Ξ False; | 23:42 | |
camelia | rakudo-moar 46b38f: OUTPUT«===SORRY!=== Error while compiling /tmp/DZjK1OZU2AUndeclared routines: Γ5 used at line 1 Ξ used at line 1» | ||
avuserow | m: say [1, 3, 5] <<+|>> [2, 4, 6] | ||
camelia | rakudo-moar 46b38f: OUTPUT«3 7 7» | ||
vendethiel | m: sub prefix:<Γ>(Bool $n) { return !$n }; sub infix:<Ξ> is looser(&infix:<Γ>)($a, $b){ $a == $b }; say Γ5 Ξ False; | ||
camelia | rakudo-moar 46b38f: OUTPUT«===SORRY!=== Error while compiling /tmp/27JAzgYrXNMissing blockat /tmp/27JAzgYrXN:1------> n }; sub infix:<Ξ> is looser(&infix:<Γ>)⏏($a, $b){ $a == $b }; say Γ5 Ξ False; expecting any of: …» | ||
vendethiel | meh | ||
lue | I don't think Γ is a good choice, one might confuse it with the function so named (not likely, but still) | 23:43 | |
(besides, I'd prefer a symbol over a letter if at all possible) | |||
vendethiel | doesn't Γ usually mean "not"? | ||
or is it the middle one ? | |||
bcode | that'd be ¬ :) | ||
lue | vendethiel: Γ is the greek capital letter Gamma, no relation to that negation operator :) | ||
avuserow | m: say Buf.new(1, 3, 5) <<+|>> Buf.new(2, 4, 6) | ||
camelia | rakudo-moar 46b38f: OUTPUT«3» | ||
vendethiel | bcode: thanks ! | ||
.u ¬ | 23:44 | ||
yoleaux | U+00AC NOT SIGN [Sm] (¬) | ||
lue | m: say $_ for Buf.new(1,3,5) | ||
camelia | rakudo-moar 46b38f: OUTPUT«Buf:0x<01 03 05>» | ||
lue | m: say $_ for Buf.new(1,3,5)[0..*] | ||
camelia | rakudo-moar 46b38f: OUTPUT«135» | ||
avuserow | I have a few wishlist items for bufs (but who doesn't have some area they'd like to change) | ||
23:45
pippo left
|
|||
lue | heh, typing "buffer" into codepoints.net gave me this: ⎌ :) | 23:46 | |
vendethiel | .u ⎌ | ||
yoleaux | U+238C UNDO SYMBOL [So] (⎌) | ||
23:46
btyler left
|
|||
vendethiel 's bad eyesight makes him a unable to see most of these unicode shinies | 23:46 | ||
bcode | for me it's the font size, in this case | 23:47 | |
lue | same here, a lot of Unicode characters aren't always easily discernible at my usual font sizes. | ||
23:48
btyler joined
23:51
raiph left
|