»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! Set by moritz on 22 December 2015. |
|||
AlexDaniel | m: sub foo(@array ($first, @rest)) { say @rest }; foo <1 2 3> | 00:01 | |
camelia | rakudo-moar 641ee1: OUTPUT«cannot stringify this in sub foo at <tmp> line 1 in block <unit> at <tmp> line 1» | ||
AlexDaniel | yes, I know that it is *@rest | 00:02 | |
AlexDaniel rakudobugs it | |||
00:04
newbie1 left
|
|||
AlexDaniel | j: sub foo(@array ($first, @rest)) { say @rest }; foo <1 2 3> | 00:07 | |
camelia | rakudo-jvm cd19db: OUTPUT«__P6opaque__75@437a1841 in sub-signature of parameter @array in sub foo at <tmp> line 1 in block <unit> at <tmp> line 1» | ||
AlexDaniel | /o\ | ||
00:25
perlawhirl joined
00:45
rjt_pl left
00:47
tushar joined
00:50
itaipu left
00:51
_slade_ left
00:54
pierre_ joined
00:59
_slade_ joined
01:02
itaipu joined
|
|||
japhb | I see there was a big argument earlier about database categories, in which "what Google does" came up a few times. Unless they've actually worked for Google, it's likely that what any given person thinks Google does on the inside is probably at least missing some nuance, if not just plain wrong. There's a LOT more complexity than simple assumptions would indicate. I'd be willing to bet the same is true at the other top-tier tech companies. | 01:04 | |
01:05
petercommand left
01:06
petercommand joined
01:20
[1]ringer1 joined
01:23
ringer1 left,
theRegularPreten joined
|
|||
theRegularPreten | Good evening | 01:24 | |
It has been asked a million times already, I feel, but there I go: | |||
Is there a CodeCademy-like site that teaches Perl? | |||
01:29
itaipu left
01:31
nbrown joined,
itaipu joined
01:32
nbrown left,
MasterDuke joined
01:36
theRegularPreten left
|
|||
dalek | ateverable: 3cf1e29 | (Aleks-Daniel Jakimenko-Aleksejev)++ | build.p6: Build all tagged commits This way it will be possible to dig as far as you'd like, in the expense of building less than a hundred commits. Fixes issue #30 |
01:43 | |
01:45
ilbot3 left
|
|||
tushar | theRegularPreten, for Perl 5 Udemy has one or two courses. In addition, Dave Cross wrote a blog kind of thing for Udemy for Perl 5. For Perl 6, I have not seen anything yet. | 01:45 | |
01:45
pierre_ left
01:47
ilbot3 joined
01:49
pierre_ joined
01:51
tushar left
01:53
FROGGS__ joined
01:57
FROGGS_ left
02:01
MasterDuke left
02:10
MasterDuke joined
02:17
noganex_ joined
02:20
noganex left
|
|||
SmokeMachine____ | Hi! I am writing a constraint programming problem solver in perl6... if anyone get a time have any hint/comment, please? github.com/FCO/ProblemSolver | 02:21 | |
02:37
MasterDuke left,
bob777 left
02:40
bob777 joined
02:43
eliasr left
02:45
cyphase left
02:46
lambd0x left
02:50
cyphase joined
02:58
MasterDuke joined
03:07
pierre_ left
03:13
pierre_ joined
03:18
pierre_ left
03:21
itaipu left,
itaipu joined
03:29
itaipu left
03:45
El_Che left
03:49
khw left
04:07
perlawhirl left
04:09
pierre_ joined
04:17
skids left
04:25
mephinet left
04:30
skids joined,
skids left
04:34
wamba joined,
rgrinberg left
04:36
perlawhirl joined
|
|||
perlawhirl | so... | 04:37 | |
is irclog.perlgeek.de down for anybody else? | |||
tadzik | seems like it: isup.me/http://irclog.perlgeek.de/ | 04:38 | |
04:39
BenGoldberg left
|
|||
dalek | whateverable: 4d18cb4 | (Aleks-Daniel Jakimenko-Aleksejev)++ | / (2 files): | 04:39 | |
whateverable: Add special checks for exit code 125 | |||
whateverable: | |||
whateverable: Normally this should not happen, but a user may decide to skip some | |||
whateverable: commits manually by exiting with exit code 125. That's totally OK, but | |||
04:39
dalek left
|
|||
AlexDaniel | perlawhirl: it's not completely down | 04:40 | |
just a bit unstable | |||
at least that's how it was a few hours ago | |||
04:40
dalek joined,
ChanServ sets mode: +v dalek
04:42
mephinet joined,
pierre_ left
04:52
pierre_ joined,
Cabanossi left
04:56
Cabanossi joined,
pierre_ left
05:02
aries_liuxueyang left
05:03
aries_liuxueyang joined
05:10
Actualeyes left
05:12
FROGGS__ left
05:22
Actualeyes joined
05:38
pierre_ joined
05:42
cyphase left
05:43
pierre_ left
05:46
wamba left
05:47
pierre_ joined,
cyphase joined
05:50
_sfiguser left,
AlexDaniel left
05:51
pierre_ left
05:52
pierre_ joined
05:58
Guest64580 left
05:59
cyphase left,
Guest83809 joined
06:04
_sfiguser joined,
MasterDuke left,
cyphase joined
06:08
ponbiki left
06:13
domidumont joined
06:15
cyphase left,
domidumont left,
ponbiki joined
06:16
ponbiki is now known as Guest75687,
domidumont joined
06:19
domidumont left,
domidumont joined
06:20
cyphase joined,
domidumont left
06:22
domidumont joined,
firstdayonthejob joined
06:26
aries_liuxueyang left
|
|||
dalek | line-Perl5: c630c25 | niner++ | / (2 files): Pass Map as pure Perl 5 hashes Maps are immutable, i.e. we don't expect any writes to make it back to the Perl 6 object. So they are the perfect candidate for signalling that it can be safely copied to a Perl 5 hash with no ties to the original. |
06:27 | |
perlawhirl | I need to upgrade my Inline::Perl5... nine++ seems to have made a spree of optimisations in the past 24 hours | 06:30 | |
06:31
cyphase left
|
|||
perlawhirl | can panda update modules... or do i just... 'install --force' it | 06:33 | |
<trailing question mark> | |||
06:34
firstdayonthejob left
06:36
cyphase joined,
rindolf joined
06:41
aries_liuxueyang joined
06:44
wamba joined
06:45
aries_liuxueyang left
06:47
CIAvash joined
06:52
nadim joined
06:56
cyphase left
06:59
ufobat joined
07:00
gfldex left,
cyphase joined
|
|||
moritz | perlawhirl: panda --force install The::Module | 07:01 | |
(note that the --force must come before the 'install') | |||
07:08
wamba left
|
|||
nine | perlawhirl: panda install The::Module will install a new version. You need --force only if the version number is the same as the installed one's. | 07:12 | |
dalek | line-Perl5: ebba898 | niner++ | META.info: Version 0.12 |
07:13 | |
perlawhirl | cool | ||
nine | perlawhirl: while you're at it. Could you please try the following line with the old and new version? | 07:14 | |
git clone github.com/Tux/CSV.git && cd CSV && for i in $(seq 1 10000); do echo 'hello,","," ",world,"!"'; done > /tmp/hello.csv && time perl6 csv-ip5xs.pl < /tmp/hello.csv && time perl6 csv-ip5xs.pl < /tmp/hello.csv | |||
07:14
aries_liuxueyang joined,
zakharyas joined
07:15
jsimonet left
07:16
jsimonet joined,
pierrot left
07:17
pierre_ left
07:20
pierre_ joined
07:21
cyphase left,
darutoko joined
|
|||
perlawhirl | I already updated, but I can reinstall an old commit and test... though i warn you my 32-bit laptop ain't the fastest | 07:21 | |
nine | Just the number for the new version can help, too. | 07:23 | |
Trying to find out, why the 40 % improvement I see here does not show um on Tux++'s daily benchmark. | |||
07:25
cyphase joined
07:27
pierrot joined
|
|||
perlawhirl | So... I installed version 0.10 ran the test, then version 0.12, but it was more or less the same... ~8.85s. maybe I did it wrong, or maybe my 32-bit machine hit it's speed limit :D I will try on another box later. | 07:30 | |
07:34
perlawhirl left
|
|||
nine | perlpilot: thanks | 07:34 | |
Oops...wrong tab completion | 07:35 | ||
07:36
cyphase left
07:37
labster joined,
AndyBotwin joined
07:40
pdcawley joined,
cyphase joined
07:46
sammers left,
_slade_ left
07:47
bjz joined
07:53
cyphase left
07:55
dakkar joined
|
|||
nine | .tell perlawhirl note that just installing an older version when a newer one was already installed, won't make rakudo use that old version. If no :ver is specified in the use statement, we pick the newest version. | 07:57 | |
yoleaux | nine: I'll pass your message to perlawhirl. | ||
07:57
cyphase joined
08:03
Actualeyes1 joined,
Actualeyes left
08:04
bjz left
08:05
bjz joined,
bjz left
08:06
Guest83809 left,
El_Che joined
08:08
giraffe joined,
giraffe left
08:12
Cabanossi left,
Guest98158 joined,
pierre_ left,
mohae_ joined,
aries_liuxueyang left
08:13
ilbot3 left,
telex left,
cyphase left,
japhb left,
nowan left,
nowan joined
08:14
telex joined,
mohae left,
yeltzooo9 left
08:15
yeltzooo joined,
Cabanossi joined,
aries_liuxueyang joined
08:18
cyphase joined,
ilbot3 joined,
canopus left,
japhb joined
08:21
pierre_ joined
08:25
canopus joined,
pierre_ left
08:31
eliasr joined
08:37
RabidGravy joined
08:44
gfldex joined,
wamba joined
|
|||
masak | good antenoon, #perl6 | 08:45 | |
arnsholt | o/ masak | ||
DrForr | wow, almost afternoon here. I guess I'd better get something accomplished. | 08:46 | |
arnsholt has ordered more stuff for his new keyboard | |||
And read about SOAP | 08:47 | ||
DrForr | As keyboards normally *are* accessories, I assume this is of the all-keys-in-a-row variety? :) | 08:48 | |
masak | arnsholt: my heartfelt sympathy | ||
arnsholt | DrForr: Dampener rings to put under the keycaps | ||
It's a mechanical keyboard, and recent feedback from colleagues have indicated that a bit of soundproofing may be in order =) | 08:49 | ||
DrForr | Ah. | ||
masak | been there, done that :) | 08:50 | |
arnsholt | And a few custom keycaps while I'm at it: a red escape key and a pair of Portal keycaps to put on the Windows keys | ||
masak: I've only read a tiny bit, so I'm not scarred for life just yet | 08:52 | ||
And other people have implemented most of the SOAP stuff. Apparently, I'm supposed to implement MTOM (sending binary stuff in binary next to the XML, basically) in existing code | |||
jnthn so far today fixed 2 bugs and ate a plum | 08:53 | ||
I liked the plum more than the bugs. | |||
DrForr | I guess I'm one of the last people to not look at my keyboard when typing :) | ||
arnsholt | Yeah, I need to learn to touch type properly, really | ||
But the custom keycaps are mostly just bling =) | 08:54 | ||
jnthn was lucky enough to get typing lessons when he was young | 08:56 | ||
DrForr | Same here. | ||
arnsholt | We were supposed to learn it at school when I Was about 16, but at that point it was too late for me | ||
jast | it's never too late! | 08:57 | |
jnthn | Though I started on a typewriter. After a while of using the home computer's keyboard in a similar manner, I got told off for being too loud and busting the space bar. :P | 08:58 | |
DrForr | Drape a tea towel over your hands and start making errors. You'll learn very quickly where the backspace key is :) | ||
arnsholt | Yeah, it's mostly a question of time and being reluctant to go through the effort of breaking two decades of muscle memory of faking it | ||
jast | in my experience, muscle memory isn't that hard to change if you don't make a big deal out of it | ||
arnsholt | jnthn: I typed on a Model M clone for many years. I have been told similar things =) | ||
DrForr | On occasion I switch to Dvorak just for the hell of it. And pissing off anyone who tries to type on my laptops. | 08:59 | |
jast | it does take time, though, no argument there | ||
08:59
andrewalker joined
|
|||
jast | DrForr: I think colemak will confuse people much more because it's somewhat closer to QWERTY | 08:59 | |
09:01
wamba left
09:06
pierre_ joined
|
|||
El_Che | full disk. Arrg. Linux VM + zillion docker images takes space. Who would have thought it (I need to get rid of this $work Windows installation) | 09:11 | |
09:17
brrt joined
09:24
labster left
09:28
wamba joined
09:37
Unavowed joined
09:41
Unavowed_ left
09:48
_sfiguser left
09:51
TEttinger left
09:55
domidumont left,
notbenh left,
yoleaux left,
obfusk left,
yoleaux joined,
ChanServ sets mode: +v yoleaux
09:56
notbenh joined,
obfusk joined
09:57
ilbot3 left,
aries_liuxueyang left
10:00
aries_liuxueyang joined
10:04
ocbtec joined,
ilbot3 joined,
diakopter___ joined,
domidumont joined
10:05
domidumont left,
darutoko left
10:07
domidumont joined
10:13
lambd0x joined
|
|||
lambd0x | Hi everyone! | 10:13 | |
m: say 3//2; | 10:14 | ||
camelia | rakudo-moar 7e3506: OUTPUT«3» | ||
lambd0x | m: say 1//2; | ||
camelia | rakudo-moar 7e3506: OUTPUT«1» | ||
lambd0x | m: say -1//2; | ||
camelia | rakudo-moar 7e3506: OUTPUT«-1» | ||
lambd0x | how does the // operator work? | 10:16 | |
brrt | i think it is integer division | 10:17 | |
DrForr | docs.perl6.org/language/operators#infix_// | ||
lizmat | it returns the left side if it is defined, otherwise the right side | ||
brrt | oh… | ||
lizmat | nothing to do with division | ||
brrt | it's the same as perl | ||
hehe | |||
brrt was confused with python | |||
DrForr | You're maybe thinking of 'div'? | ||
brrt | m: -1 div 2 | ||
camelia | rakudo-moar 7e3506: OUTPUT«WARNINGS for <tmp>:Useless use of "div" in expression "-1 div 2" in sink context (line 1)» | ||
DrForr | (and I'm probably thinking of TT perl5) | ||
brrt | m: say -1 div 2; | ||
camelia | rakudo-moar 7e3506: OUTPUT«-1» | ||
lambd0x | lizmat: hm... when won't it for example be defined? | 10:19 | |
lizmat | m: my $a; say $a / 42 | ||
camelia | rakudo-moar 7e3506: OUTPUT«Use of uninitialized value of type Any in numeric context in block <unit> at <tmp> line 10» | ||
10:20
kaare__ joined
|
|||
lizmat | m: my $a; say $a // 42 | 10:20 | |
camelia | rakudo-moar 7e3506: OUTPUT«42» | ||
DrForr | When the left side is a variable that you haven't defined? | ||
lizmat | DrForr: s/defined/initialized/ ? | 10:21 | |
m: no strict; say $a // 42 | |||
camelia | rakudo-moar 7e3506: OUTPUT«42» | ||
lambd0x | DrForr: ahahah, I was just wondering if therefore u have a Int defined variable, by default it has a 0. So it's always defined. | ||
lizmat | :-) | ||
DrForr | 'declared' was probably a better word to use there :/ | 10:22 | |
lizmat | m: my Int $a; say $a # still undefined | ||
camelia | rakudo-moar 7e3506: OUTPUT«(Int)» | ||
lizmat | m: my $a; say 42 + $a; # acts as 0 with warnings | ||
camelia | rakudo-moar 7e3506: OUTPUT«Use of uninitialized value of type Any in numeric context in block <unit> at <tmp> line 142» | ||
lambd0x | lizmat: ok, that's nice :) | 10:23 | |
DrForr: yeah, sorry...just woke up haha. | |||
DrForr | Talking to myself, not you. | 10:25 | |
10:29
iH2O joined
10:30
user9 left,
pierre_ left,
pierre_ joined
10:38
user9 joined
|
|||
Woodi | hi #perl6 :) | 10:42 | |
10:43
dayangkun joined
|
|||
Woodi | I keep getting ===SORRY!===\nMissing block for: if $kh<milk> { line... any ideas ? | 10:43 | |
"This is perl6 version 2012.10 built on parrot 4.6.0 revision 0" | 10:44 | ||
10:45
pierre_ left
|
|||
moritz | Woodi: try using a perl 6 that' isn't nearly 4 yars old | 10:45 | |
Woodi | moritz: I can't. I'm on my way back in time and this prevents progress... | 10:47 | |
moritz | Woodi: then seing the code around it might or might not help | 10:49 | |
10:49
pmurias joined
10:51
bjz joined
|
|||
Woodi | here: github.com/slunski/caffeeExample/b...e.pl6#L203 | 10:52 | |
pmurias | arnsholt: vim in my experience is very good for learning to touch type, as it makes you keep your hands in proper position ;) | ||
Woodi | except that %kh is $kh to reach that point in time :) | ||
moritz | Woodi: we didn't have adverbs back than, I believe | ||
Woodi: so %kh.exists('milk') | 10:53 | ||
or check with .defined, if that's acceptable | |||
10:54
iH2O left
|
|||
Woodi | moritz: nothing changes. maybe just line numbersare off... | 10:55 | |
10:56
flexibeast joined
|
|||
moritz | Woodi: then I don't know | 10:57 | |
Woodi | moritz++ thanx anyway :) | 10:59 | |
11:05
dayangkun left
11:06
itaipu joined
11:07
bjz left
|
|||
Woodi | ok, problem was in 'next;' few lines above... btw. 'unless' still don't allows 'else' ? | 11:08 | |
masak | Woodi: doesn't allow it by spec. | 11:10 | |
Woodi: it's not like it's hard to implement so that it allows it. | |||
S04: "The C<unless> statement does not allow an C<elsif> or C<else> in Perl 6." | 11:11 | ||
11:11
matt_ left
|
|||
Woodi | masak: I wonder why ? natural language betterness ? | 11:14 | |
moritz finds unless + else confusing | 11:16 | ||
masak | Woodi: yes, you could call it that. | ||
Woodi | masak: oki :) | 11:18 | |
masak | Woodi: Perl 6 is pretty good at staying out of your preferences and letting you choose. | ||
Woodi: but in this case, the language makes the call that if you do `unless` followed by `else`... you're confused, and you should be told you're confused | 11:19 | ||
Woodi: maybe Perl 6 is a little bit better than Perl 5 at detecting and preventing "useless double negations". `unless` + `else` is one. `!!expr` is another -- Perl 6 has `?expr` | 11:20 | ||
(but in that latter case, doesn't enforce) | 11:21 | ||
m: say !!"OH HAI" | |||
camelia | rakudo-moar 4b1864: OUTPUT«True» | ||
Woodi | masak: realy I do not wanted unless-else, just mechanical try to replace 'next' discovered that :) | ||
11:21
bjz joined
|
|||
masak | I still think you got the nudge for the right reasons :) | 11:21 | |
11:22
matt_ joined,
matt_ is now known as Guest6820
11:23
Guest6820 is now known as matt_
|
|||
Woodi | ok, so I will do half city walk :) later | 11:25 | |
11:25
Ven` joined
|
|||
Ven` | o/ | 11:25 | |
masak | Ven! \o/ | 11:27 | |
11:28
domidumont left,
sammers joined
11:37
Ven` left
|
|||
ShimmerFairy | OK, how do I get a C++ style namespace thing going, where I can use abbreviated names inside and not outside? That is, module A { class B { ... }; class C { my B $.d; } }, and then anyone who 'use's the module has to use A::B etc.? | 11:38 | |
11:39
itaipu left,
itaipu joined
|
|||
lizmat | ShimmerFairy: -use- is compunit level, so the only thing you can use is the module A | 11:40 | |
11:40
domidumont joined
|
|||
lizmat | if you really want to support A::B, you would have to make that a separate compunit (file) which brings the problem of not being able to refer to B from C without prefixing A:: | 11:41 | |
hope I made sense ? | 11:42 | ||
ShimmerFairy | lizmat: huh, I could swear an our-scoped thing in a module got exported so that you could skip the A::, but apparently not? 'class B' apparently forces A::B, where I thought I need to do stuff like 'my class B is export' or such | ||
lizmat | you were asking about forcing people to have to say "use A::B" | 11:43 | |
you can only -use- a compilation unit (compunit) | 11:44 | ||
class B inside module A is part of the compunit in which it lives, you cannot -use- it by itself | |||
ShimmerFairy | lizmat: no I wasn't, I was asking about forcing people not to do things like 'use A; say B'. I was having that issue when I thought 'my class Foo is export' would do what I wanted. | ||
lizmat | aaaahhhhh | 11:45 | |
use ne -use- :-) | |||
ShimmerFairy | I don't know why, but I really hate and find it hard to wrap my head around how Perl 6 handles names and "namespaces" and such. C++'s 'namespace' approach is so much easier for me. | 11:46 | |
masak | I tend to not nest things in blocks so much nowadays. | 11:47 | |
I do things in separate compunits, like lizmat++ suggested. that seems to work for me. | |||
ShimmerFairy | masak: the problem is that I don't like typing out long names a bunch (e.g. class Really::Long::Name::B { has Really::Long::Name::A $.foo } ), and I'm not always a fan of a Java-esque "one class per file" approach. | 11:48 | |
lizmat | putting this in Foo.pm: module Foo { class A is export { } } | 11:49 | |
ShimmerFairy | If it's a big class, sure, but if I'm just writing up a bunch of AST node classes, one per file would be more annoying than helpful. | ||
lizmat | and then use Foo; makes Foo::A appear in scope | ||
ShimmerFairy: so adding "is export" to the class seems to do the trick, if I understand what you want | 11:50 | ||
ShimmerFairy | lizmat: except I (somehow) don't need the 'is export' even. I don't even know why. | ||
lizmat | ah, indeed... | 11:53 | |
I guess that's because classes are by default "our" rather than "my" | |||
if I change it to "my class A { }", it doesn't work, not even with "is export" added... | 11:54 | ||
which feels like a bug to me | |||
ShimmerFairy | lizmat: I could swear that before I discovered our-scoped things in a module would export as its short name, hence why I was trying something like "my class Foo is export" | 11:55 | |
lizmat | ShimmerFairy: not sure what to make of the current state, hope for some feedback from TimToady jnthn masak moritz | 11:59 | |
ShimmerFairy | lizmat: because I really, really dislike how names are handled at the moment. Like I said, C++'s ways are much easier and sensible for me. (I also like how 'namespace Foo { }' just means "put these things in a bucket called 'Foo'") | 12:01 | |
lizmat | well, that's 'package' for you in Perl | ||
ShimmerFairy | really, you're allowed to write 'package Foo' multiple times? I thought that was just as impossible as doing the same with 'module' and such. | 12:02 | |
moritz | our-scoped and "is export" are orthogonal | 12:03 | |
12:04
Ven` joined
|
|||
moritz | and several times "package" works because a package is the stub for more specialized packages, like classes, modules, roles, grammars | 12:07 | |
ShimmerFairy | I was wondering if I'd have to end up making a NamespaceHOW to have things done like I want :) | 12:08 | |
Ven` | p6: package a { sub f { 5 } }; package a { sub g { f - 2 } }; a::g | 12:15 | |
camelia | rakudo-moar 4b1864: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Undeclared routine: f used at line 1» | ||
dalek | line-Perl5: a46e341 | niner++ | lib/Inline/Perl5.pm6: Add missing Hash and Map methods to Perl5Hash |
12:16 | |
ShimmerFairy | Ven`: ah boo, looks like I would need to create a NamespaceHOW type thing then :P | ||
pmurias | what's the difference between nqp::fc and nqp::lc? | 12:21 | |
masak | pmurias: fc is for comparing case-insensitive | 12:22 | |
lizmat | nine: feels like those changes could do with a loop and some mop magic :-) | 12:23 | |
pmurias | masak: when do they behave differently? | ||
12:24
diakopter___ left
|
|||
avar | pmurias: p5 docs, but relevant: perldoc.perl.org/functions/fc.html | 12:24 | |
masak | avar++ | ||
I know the differences are minor, and maybe nonexistent for English | |||
nine | lizmat: better would be to give them real implementations. Right now each of those methods just create a Perl 6 hash to delegate to. method elems() for example could call hv_scalar to get the number of items. | 12:26 | |
lizmat | nine: ah, yes :-) | 12:27 | |
12:27
pierre_ joined
|
|||
nine | But that's or after my talk at the Dancer conference ;) | 12:27 | |
huf | how does casefolding deal with the turkish i problem? | 12:28 | |
ShimmerFairy | huf: the UCD has a couple of special cases for the turkish i, but in general I believe the CLDR is for region-specific stuff. | ||
moritz | m: say lc 'İ' | ||
camelia | rakudo-moar 4b1864: OUTPUT«i̇» | ||
lizmat | nine: confirm spectest now clean | ||
moritz | m: say fc 'İ' | ||
camelia | rakudo-moar 4b1864: OUTPUT«i̇» | ||
lizmat | afk& | 12:29 | |
huf | moritz: well that's broken :) | 12:30 | |
masak | m: say fc("Iİ") | ||
camelia | rakudo-moar 4b1864: OUTPUT«ii̇» | ||
masak | hm. | ||
moritz | huf: what do you think it should case-fold to? | ||
nine | lizmat: \o/ | 12:31 | |
moritz | huf: it's not like folding to lower-case i without dot would be a better answer :-) | ||
huf | moritz: i dont think a good solution exists | ||
but an i + a combining dot seems double wrong | |||
moritz | huf: I find the current answer quite satisfactory | ||
it just doesn't round-trip, but I'm used to that from the ß -> SS case | |||
huf | yeah, it's never going to roundtrip | 12:32 | |
12:32
rindolf left
|
|||
ShimmerFairy | www.unicode.org/Public/UCD/latest/u...olding.txt <-- grep for T; | 12:32 | |
huf | humans have messed up writing far too much for that :) | ||
moritz | so, what's the problem then? | ||
ShimmerFairy | Perl 6 doesn't handle anything locale-specific such as those Turkish special cases AFAIK. | 12:33 | |
huf | the combining dot looks wrong, but maybe that's just me | ||
i guess it makes casefolded dotted-capital-i distinct so it's cool | |||
ShimmerFairy | m: say "Unicode sez: \x0130 -> \x0069 and \x0049 -> \x0131 for turkish langs" | 12:34 | |
camelia | rakudo-moar 4b1864: OUTPUT«Unicode sez: İ -> i and I -> ı for turkish langs» | ||
huf | yeah, it's easy when you know the locale, but by that point you've already lost :) | 12:35 | |
12:35
smls joined
|
|||
masak | not sure "knowing the locale" ought to qualify as losing | 12:36 | |
ShimmerFairy | m: say "Unicode sez: \x0130 -> \x[0069,0307] and \x0049 -> \x0069 for others" | ||
camelia | rakudo-moar 4b1864: OUTPUT«Unicode sez: İ -> i̇ and I -> i for others» | ||
ShimmerFairy | really what we want are things like a CLDR module :) | ||
huf | masak: it means you cant treat strings uniformly and you get into messes like mixed-locale text | ||
how to casefold/capitalize a turkish sentence containing a foreign name or phrase, etc :) | 12:37 | ||
ShimmerFairy | Programs rendering mixed bidi text seem to manage that sort of thing decently enough :P | ||
huf | do they? | ||
ShimmerFairy | well, the good ones | ||
huf | i've always had lots of trouble with them :) | ||
moritz | translations face the same problem, mostly when words have different meanings in both languages | 12:38 | |
xiaomiao | The pressure takes place in Germany. | ||
(direct translation of "Der Druck findet in Deutschland statt" - printing, not pressure, same word in german) | |||
timotimo | :D | ||
huf | yeah, translation is | 12:39 | |
xiaomiao | seen in a contract for a multimillion-$ project | ||
huf | much worse | ||
timotimo | fortunately perl6 don't promises a vm-builtin for translating human language ... | ||
huf | :))) | ||
praise the lord | |||
timotimo | will we be offering nqp::turkishfc() ? | ||
ShimmerFairy | .oO("Oder wie wär's mit chicken ?" "Ich will nichts schicken! Ich will was essen!") |
||
moritz | xiaomiao: I mostly meant mixing in words from other languages that also have a meaning in your own | ||
timotimo | what's wrong, DHL? schicken? - nobody calls me schicken! | 12:40 | |
masak | yes, it's a pity that the world is too messy to fit in the neat little labeled boxes we've designed for it :P | ||
timotimo | the world needs a stern talking to by a group of comp sci nerds | ||
ShimmerFairy | How to be more like FORTRAN: A world that isn't so compli | 12:41 | |
xiaomiao | www.youtube.com/watch?v=yR0lWICH3rY | 12:42 | |
12:43
rindolf joined
|
|||
masak | even translating from Chinese (simp) to Chinese (trad) is a hard problem | 12:43 | |
xiaomiao | even translating german to german can be difficult ;) | 12:45 | |
smls | masak: Doesn't Wikipedia do that automatically though? | 12:47 | |
masak | perhaps they do. doesn't mean it's not hard, or that when they do it they don't make lots of mistakes. | 12:49 | |
I mean, Google Translate is at the same time fantastic and incredibly naïve when it translates | 12:50 | ||
12:51
bjz left
|
|||
moritz | I remember using it once to translate some poetry, and it translated a weird word order into a weird word order in the other language. Bug or feature? How to tell, even? :-) | 12:51 | |
12:51
darutoko joined
12:52
bjz joined
|
|||
xiaomiao | masak: google translate is roughly good enough to figure out the topic and intent of a foreign-language text | 12:52 | |
12:53
Sgeo_ left
|
|||
xiaomiao | it's like, say, reading dutch as a native english speaker | 12:53 | |
huf | only if the language is close to english | ||
or has received a lot of attention from someone | |||
i've never found the *<>hu translations any good | |||
tony-o | *<>hu ? | ||
huf | anything to hungarian | 12:54 | |
tony-o | ah | ||
timotimo | translate anything to huf | ||
huf | and i think gtranslate does generic a->b translations through english | ||
which introduces interesting artifacts | |||
timotimo | like "translation party" :) | 12:55 | |
huf | oh well, it's slave labor, we shouldnt expect good quality | 12:57 | |
moritz | the French <-> German <-> English triangle seems to work rather well | ||
huf | the "3 big ones" work better than the rest? shock! | 12:58 | |
Ven` | yeah, gtranslate uses english as a middleman | ||
ShimmerFairy | which is fair, considering 2n is usually much less than n! :) | 13:00 | |
13:00
Ven` left
|
|||
SmokeMachine____ | Hi there! I am writing a constraint programming problem solver in perl6... does anyone get a time to give me any hint/comment, please? github.com/FCO/ProblemSolver | 13:02 | |
13:02
itaipu left
|
|||
SmokeMachine____ | There's a EVAL on that project that I'd like to remove... but I can't find how... | 13:03 | |
tony-o | SmokeMachine____: what is the eval doing? | 13:04 | |
13:04
itaipu joined
|
|||
SmokeMachine____ | tony-o: creating a sub | 13:04 | |
No, a block | |||
13:05
mcmillhj joined
|
|||
SmokeMachine____ | With a variable number of input parameters... | 13:05 | |
Here's the EVAL: github.com/FCO/ProblemSolver/blob/...em.pm6#L67 | 13:07 | ||
13:07
wamba left
|
|||
timotimo | well, if it's not important that the arity of the sub is correct, you can just build the block with a *@a parameter | 13:08 | |
13:08
cdg joined
|
|||
SmokeMachine____ | timotimo: the problem is that it's important on that case... | 13:09 | |
tony-o | m: my $r = { say $_; }; $r(123); | ||
camelia | rakudo-moar 4b1864: OUTPUT«123» | ||
timotimo | hehe. | ||
in that case, here's a trick for you | |||
SmokeMachine____ | I put that on a array and grep by the signature... | 13:10 | |
timotimo | m: sub test(*@a) { say @a.elems } but role { method arity { 5 }; method count { 5 } }; (1..100).map(&test) | ||
camelia | rakudo-moar 4b1864: OUTPUT«1111111111111111111111111111111111111111111111111111111111111111…» | ||
timotimo | er, oops? | ||
oh, by the signature | |||
masak | m: my &foo = { say "OH HAI" }; foo | ||
camelia | rakudo-moar 4b1864: OUTPUT«OH HAI» | ||
timotimo | m: sub test(*@a) { say @a.elems } but role { method arity { 5 }; method count { 5 } }; &test.signature does role { method arity { 5 }; method count { 5 } }; (1..100).map(&test) | ||
camelia | rakudo-moar 4b1864: OUTPUT«1111111111111111111111111111111111111111111111111111111111111111…» | ||
timotimo | :( | ||
SmokeMachine____ | Yes, by the signature... | ||
:( | |||
And if some one have any comment about the code... I'd love to hear! | 13:12 | ||
Not only about the code... | 13:13 | ||
timotimo: I do: @funcs.grep: {%values ~~ .signature} | 13:15 | ||
13:15
prammer joined,
mcmillhj left
|
|||
timotimo | i see, ok | 13:16 | |
well, you can still create the signature declaratively | |||
installing it is possible to by mixing in a role that overrides the signature method | 13:17 | ||
here be dragons :) | |||
13:17
jonas2 left,
mcmillhj joined
|
|||
SmokeMachine____ | timotimo: interesting! | 13:17 | |
13:17
itaipu left
13:18
itaipu joined
|
|||
SmokeMachine____ | m: my $a = {say "ok"}; say {:bla} ~~ $a.signature; $a.signature = :(:$bla!); say {:bla} ~~ $a.signature | 13:21 | |
camelia | rakudo-moar 4b1864: OUTPUT«FalseCannot modify an immutable Signature in block <unit> at <tmp> line 1» | ||
SmokeMachine____ | say {:bla} ~~ $a.signature | ||
Sorry | |||
mst | timotimo: NuSQL? | ||
timotimo | yup | ||
like Nu Metal | |||
mst | timotimo: o/ since you never did a join in the first place / maybe it's time to have the tables turned / in the interests of all involved, we've got the scaling solved / and the verdict is postgres o/ | 13:22 | |
timotimo | i don't recognize those lyrics | ||
SmokeMachine____ | m: my $a = {say "ok"}; say {:bla} ~~ $a.signature; $a.signature does role {method signature{ :($bla!)}; say {:bla} ~~ $a.signature | ||
camelia | rakudo-moar 4b1864: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Missing blockat <tmp>:1------> 3e{ :($bla!)}; say {:bla} ~~ $a.signature7⏏5<EOL> expecting any of: postfix statement end statement modifier statement…» | ||
timotimo | oh, no, not like that | ||
now you're installing a signature method on the signature you get from .signature on the block | 13:23 | ||
mst | timotimo: then you don't know nu metal worth shit, that's from Spit It Out by Slipknot :D | ||
timotimo | so you'd get that from $a.signature.signature | ||
ah, sorry. i didn't slipknot at all during that time | |||
mst | slipknot, deftones, korn, systemofadown were basically -the- bands associated with the nu metal term first | 13:24 | |
13:24
lichtkind joined
|
|||
timotimo | i was an ignorant little kid back then :) | 13:24 | |
of those i only latched on to SoaD | 13:25 | ||
mst | google the spit it out lyrics and you'll find my filk fits pretty well | 13:26 | |
mst can rap out that entire song from memory in time to the track still | |||
I can sort of do the same for a few SoaD bits but they generally have tunes so I don't do it as often for the safety of other people's ears | 13:27 | ||
nine didn't know there was "nu metal" when listening to those bands | 13:28 | ||
timotimo | hehehe | 13:30 | |
13:32
dalek left,
dalek joined,
ChanServ sets mode: +v dalek
|
|||
RabidGravy | things I didn't expect to be doing on a Monday morning: upgrading a "live" MySQL installation :-\ | 13:33 | |
timotimo | oh wow | ||
13:44
mullagainn joined
|
|||
mullagainn | is there plans for a p6 equivalent to pythons asyncore | 13:45 | |
13:45
mcmillhj left
|
|||
timotimo | i don't remember what asyncore is about | 13:46 | |
we do have asynchronous I/O, though | |||
13:48
mcmillhj joined,
araujo_ joined,
tushar joined
|
|||
jnthn | That looks much like that the built-in IO::Socket::Async is for | 13:50 | |
13:50
araujo_ left
|
|||
jnthn | (if the first google hit is anything to go by... :)) | 13:50 | |
13:50
araujo_ joined
|
|||
timotimo | "Network servers are rarely processor bound, however." - unless your business logic is written in a slow language :P | 13:51 | |
13:52
araujo__ left
13:53
mcmillhj left
|
|||
timotimo | in principle a module could be written that gives you the same API as asyncore | 13:53 | |
except we can't "handle_expt" because moarvm doesn't support OOB data for TCP sockets | |||
mullagainn | yeah, that is what I am seeing. Also looking at the doc I cant see anything related to raw sockets. | 13:54 | |
timotimo | correct, we don't have raw socket support at the moment | ||
of course, if you really need it, you can NativeCall into libc for that | |||
mullagainn | at all or just within the Async module? | ||
timotimo | actually ... i don't know | ||
mst | surely you'd be better NCing into libuv | 13:55 | |
timotimo | we currently use libuv for sockets of all kinds (even synchronous) so maybe all it needs is to set a flag to some value and we'd get a raw socket instead of a tcp socket? | ||
mst | ... which I'm now sorely tempted to try at some point to see if I can get at unix sockets | ||
13:56
mcmillhj joined
|
|||
timotimo | :) | 13:56 | |
jnthn | ...alternatively, just patch IO::Socket::Async given it's based on libuv anyway :) | ||
timotimo | right | ||
i'm not sure what parts are needed to support unix domain sockets or raw sockets | |||
jnthn | The only reason it doesn't expose those things is nobody got around to it yet. | ||
timotimo | maybe it's super easy and doesn't even require code in moarvm | ||
jnthn | timotimo: Probably needs a bit | ||
13:56
prammer left
|
|||
timotimo | it'd likely require someone to write some failing tests first :) | 13:57 | |
mst | jnthn: well, yes, that's why I was suggesting NCing into libuv | ||
since hopefully I can manage to re-use at least -some- of the existing stuff that way | |||
timotimo | mst: do note that moarvm will not give you access to its _uv structs | ||
you also don't get access to MVMThreadContext structs from user code | |||
unless, you know, you dig through process memory for something that looks like it could be a TC | 13:58 | ||
like, if you read out the stack pointer you can surely find the TC | |||
mst | and then NativeCall into MoarVM | ||
it'll be fine | |||
jnthn | Is this your way to make me drop other stuff to do it properly? :P | ||
.oO( It worked for Devel::Declare... :P ) |
|||
Well, not on me, but :P | 13:59 | ||
mst GRINS | |||
the parallels were not lost on me | |||
brrt | mst: if you make sure it is JITted, you can access the threadcontext pointer from r14 | 14:01 | |
14:03
zoosha joined
|
|||
brrt | libuv is kind of aggressive about 'owning' sockets though | 14:05 | |
timotimo | a bit, yeah | ||
you'll probably want to create your own uv_loop struct and create the sockets on your own ;) | 14:06 | ||
pmurias | NativeCalling into MoarVM dependencies seems like inventing a more evil way to do XS ;) | 14:07 | |
timotimo | we can have "use VISHNUS-MULTI-ARMED-FORM;" and then "nqp::becomedeathdestroyerofworlds()" to get the current MVMThreadContext | ||
brrt | that seems like it'd satisfy mst just fine | 14:09 | |
pmurias refuses to implement getting the current MVMThreadContext on the js backend ;) | |||
14:10
zacts joined
|
|||
timotimo | :D | 14:11 | |
DrForr | Oh, package names in kebab-case work? I thought I had a problme with doing that. | 14:12 | |
timotimo | i think package names are CamelCase | ||
DrForr | (need to rewrite some things tonight then.) | 14:13 | |
14:13
jisnmm1 joined,
jisnmm1 is now known as mullagain,
mullagain left,
mullagainn left
|
|||
pmurias could look into adding unix sockets support to the MoarVM if it means stopping people from poking into VM internals | 14:14 | ||
mst | argh, you're not in #perl6-dev | 14:15 | |
timotimo | cool :) | ||
mst | which I just moved the conversation to as more appropriate | ||
timotimo | right | ||
without really announcing it, though? | |||
mst | I *thought* everybody that was likely to care was already in there | 14:16 | |
had not noticed the lack of pmurias | |||
timotimo | :) | ||
14:16
wamba joined
14:19
mullagain joined
14:20
cbk_ joined
14:22
mullagain left
14:24
_slade_ joined,
Ven` joined
14:26
rgrinberg joined
|
|||
pmurias | mst: joined #perl6-dev | 14:27 | |
mst | \o/ | 14:28 | |
14:30
mcmillhj left
14:32
pierre_ left
|
|||
RabidGravy | mst, I'd love you even more than I do now if you could do unix domain sockets :) | 14:36 | |
14:37
rgrinberg left
14:39
mohae joined,
_sfiguser joined
14:42
mohae_ left
14:46
mcmillhj joined
|
|||
masak .oO( roses are seven, violets are twelve, my love is isomorphic to a subset of itself ) | 14:47 | ||
timotimo | :D | 14:48 | |
Ven` | .oO( Wherefore art thou Russel ? ) |
||
mst | masak++ | ||
14:50
wamba left
14:59
rgrinberg joined
15:00
ptolemarch joined
15:04
Guest78798 is now known as Khisanth
15:06
Jolust joined
|
|||
Jolust | Is it correct to say that when @a».bar will be made auto-threaded that the compiler will figure out the best number of threads to use for the operation? | 15:07 | |
Or will it always use a specific number of threads | |||
timotimo | there's no guarantees about this :) | 15:08 | |
perlpilot | Jolust: it's correct to say "*magic happens*" :) | ||
15:09
khw joined
|
|||
Jolust | perlpilot: but what does it mean? What does it mean to "auto-thread"? Why is it useful? | 15:09 | |
what sort of magic | 15:10 | ||
jnthn | It'll use whatever logic .hyper and .race use by default. At the moment that's a fixed default value, but it'll likely move to be based on the number of cores in the shorter term, and to do some kind of hill-climbing algo or similar in the longer term | ||
brrt | it means that the compiler has the liberty to schedule it to run on multiple threads | ||
timotimo | rakudo may change how it decides how to automatically allocate threads for your task | ||
jnthn | Quite possibly with some per-callsite stats | ||
brrt | doesn't mean that it does, but it can, and it makes sense depending on how much individual time each of the operations take | ||
jnthn | So I'd expect it'll, on average, get smarter with thime. :) | 15:11 | |
*time | |||
Jolust | Alright. Thanks. | ||
timotimo | thime makes you smarter? damn | ||
timotimo raids kitchen drawers | |||
perlpilot | jnthn: but will it be manually tunable for those rare cases where you want to force a certain number of threads? | ||
brrt | i don't expect so perlpilot | ||
Jolust | perlpilot: you'd use a hyper/race for those cases, I'd think | 15:12 | |
timotimo | you can use .race and .hyper instead of .>> | ||
brrt | (question wasn't directed at me, i know) | ||
timotimo | yeah, those take two arguments that let you tune exactly how things go down | ||
jnthn | perlpilot: I think the >>.foo syntax will just pick the defaults, and what others have said for configuring it. | ||
timotimo | well, not *exactly*, it's really just two knobs, but it lets you decide enough, IMO | ||
you can potentially override the HYPER_* subs in your program scope? | 15:13 | ||
though probably not | |||
we might enable that, though | |||
perlpilot | Jolust, timotimo: I was thinking more along the lines of forcing some number of threads for all >>. operations. | 15:14 | |
in any case, my imaginary scenario is sated ;) | 15:15 | ||
jnthn | perlpilot: @a>>.foo is jsut short for @a.hyper.map(*.foo) | ||
15:15
zacts left
|
|||
jnthn | uh, .hypermap I guess | 15:15 | |
But anyway, it desugars, and you'd just call the thing it desugars to with options. | 15:16 | ||
15:16
mr-foobar left,
lichtkind_ joined
|
|||
perlpilot | jnthn: right ... in my imagination I'd already have a bunch of @a>>.foo and didn't want to rewrite them as .hypermap | 15:17 | |
timotimo | someone might introduce a slang that gives us >>o(10, 10)o>> syntax, or something :P | ||
perlpilot | But ... whatever, it wasn't a *real* problem (yet) :-) | ||
15:17
mcsnolte joined
15:18
brrt left
15:20
lichtkind left
15:29
mr-foobar joined
15:31
domidumont left
15:35
AlexDaniel joined
15:37
domidumont joined
15:40
skids joined
|
|||
harmil_wk | Damn, I keep trying to write "say for blah". It's my Perl 5 muscle memory... | 15:45 | |
timotimo | sorry about that :( | ||
harmil_wk | It's good. I'll get used to it eventually. But I just need to learn to double-check my code before sending out advice. | 15:46 | |
timotimo | oh, it was you on that mailing list | 15:47 | |
o/ | |||
15:52
domidumont left,
Ven` left
|
|||
Jolust | m: put for "blah" | 15:56 | |
camelia | rakudo-moar 4b1864: OUTPUT«» | ||
timotimo | oh, we probably want to add put to the list of things that will warn | 15:57 | |
Jolust | m: print for "blahg" | 15:58 | |
camelia | rakudo-moar 4b1864: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Unsupported use of bare "print"; in Perl 6 please use .print if you meant $_, or use an explicit invocant or argument, or use &print to refer to the function as a nounat <tmp>:1------> 3print7⏏5 f…» | ||
Jolust | aye | ||
timotimo | if you want to, you can send that as [email@hidden.address] or what the address is | ||
Jolust | I may just fix it :) | 15:59 | |
timotimo | that'd be cool, too | ||
16:01
wildnerd joined,
wildnerd left
|
|||
[Coke] ignores backscroll. Hallo, everyone. | 16:04 | ||
moritz | \o [Coke] | ||
timotimo | o/ | ||
16:05
pmurias left
16:09
Xliff_ joined
|
|||
dalek | osystem: 31eee22 | (Lee Johnson)++ | META.list: Add Geo::IP2Location::Lite to ecosystem see github.com/leejo/geo-ip2location-lite-p6 |
16:10 | |
16:13
Xliff left
|
|||
moritz | leejo++ | 16:14 | |
timotimo | cool | 16:15 | |
but the reverse, you know, only works if you write a visual basic gui to trace an ip. | |||
16:15
_slade_ left
16:16
zakharyas left
16:18
Xliff joined
16:19
wamba joined
16:21
Xliff_ left
16:22
rgrinberg left
|
|||
Jolust is having second thoughts about `put for "blah"` | 16:24 | ||
It's not Perl 5, so throwing X::Obsolete is a bit iffy, and it also disables put; with X::Comp::Group throwing | 16:25 | ||
timotimo | oh, we have a list of things that you could just add it to | ||
it'll do the error throwing properly for you | |||
it's inside either the Grammar.nqp or Actions.nqp | 16:26 | ||
Jolust | Yeah, that's what I'm talking about. | ||
timotimo | i don't know if put; is supposed to work, though? | ||
Jolust | This one: github.com/rakudo/rakudo/blob/nom/....nqp#L3224 | ||
16:26
dakkar left
|
|||
Jolust | Yeah, prints nl | 16:26 | |
timotimo | oh, you mean because it's not "from perl5", it's fine to not explode? | 16:27 | |
Jolust | s: &put, \() | ||
SourceBaby | Jolust, Sauce is at github.com/rakudo/rakudo/blob/4b18...ors.pm#L41 | ||
timotimo | OK | ||
Jolust | timotimo: more like it's not "obsolete" so throwing X::Obsolete doesn't make sense entirely. | ||
timotimo | yeah | ||
Jolust | And there's an option to treat it as perl6-ism, but then the error message doesn't include the "use .put to mean $_" | 16:28 | |
m: bag for 1 | |||
camelia | rakudo-moar 4b1864: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Function "bag" may not be called without arguments (please use () or whitespace to denote arguments, or &bag to refer to the function as a noun)at <tmp>:1------> 3bag7⏏5 for 1» | ||
Jolust | ^ you get that | ||
timotimo | oh | ||
Jolust | I'll just leave it as is. :) | ||
TimToady | we could add .bag to the message | 16:31 | |
timotimo | .bag it and .ship it | 16:32 | |
16:32
prammer joined
|
|||
Jolust | m: "blah".tclc | 16:33 | |
camelia | ( no output ) | ||
Jolust | m: "blah".wordcase | ||
camelia | ( no output ) | ||
Jolust | OK, I'll do that then | ||
16:39
nowan_ joined
16:41
nowan left
16:54
prammer left
17:12
imcsk8_ is now known as imcsk8
|
|||
[Coke] | anyone want to try to help the user who asked about pack on Jul 29 on perl6-users? | 17:14 | |
17:20
ocbtec left
|
|||
Jolust | m: CATCH {default {}}; Perl ~~ Cool… take note; | 17:20 | |
camelia | rakudo-moar 77a7a4: OUTPUT«Noted» | ||
Jolust | ^_^ | ||
timotimo | m) | 17:21 | |
17:26
Xliff_ joined
17:29
xinming left,
Xliff left,
xinming joined
|
|||
Jolust | m: say WHICH new Perl: is => Cool: | 17:32 | |
camelia | rakudo-moar 77a7a4: OUTPUT«Perl|58183408» | ||
Jolust downloads it | |||
17:32
Jolust left
17:38
poohman joined
|
|||
poohman | hello all, i have one question in Grammars, what will happen if I have multiple "makes" in a action method for a token?? | 17:40 | |
will token.made have the last make value?? | |||
17:41
domidumont joined
17:43
firstdayonthejob joined
|
|||
smls | poohman: As far as I know, yes. | 17:44 | |
harmil_wk | poohman: say grammar { rule TOP {.} }.parse("a", :actions(class { method TOP($/) {make "first"; make "second";} } )).made.perl | ||
m: say grammar { rule TOP {.} }.parse("a", :actions(class { method TOP($/) {make "first"; make "second";} } )).made.perl | |||
camelia | rakudo-moar 77a7a4: OUTPUT«"second"» | ||
harmil_wk | There you go | ||
poohman | thanks | 17:45 | |
17:54
domidumont left
18:02
prammer joined
|
|||
dalek | line-Perl5: cb1f745 | niner++ | / (2 files): Fix possible segfault when returning a single coderef from P5 retval was uninitialized and used as a pointer for some random corruption Version 0.13 |
18:06 | |
18:20
firstdayonthejob left
|
|||
lizmat | gfldex tbrowder are there things to mention for the P6W regarding documentation ? | 18:20 | |
m: my %h; sub a($a) { %h{$a}++ }; a(1|2|3|4|5); dd %h # how will this fail when autothreading becomes really multi-threaded? | 18:22 | ||
camelia | rakudo-moar 77a7a4: OUTPUT«Hash %h = {"1" => 1, "2" => 1, "3" => 1, "4" => 1, "5" => 1}» | ||
18:29
cdg left
18:32
domidumont joined
18:33
sjoshi joined
18:35
firstdayonthejob joined
18:41
sjoshi left,
flexibeast left
18:43
sjoshi joined,
eliasr left
18:46
dha joined
|
|||
tushar | I asked question yesterday about "grep-index" method for searching an index for a specific element of an array. Does that method exist? | 18:48 | |
timotimo | m: say <a b c d e f g>.grep({ Bool.pick }, :k).say | 18:49 | |
camelia | rakudo-moar 77a7a4: OUTPUT«(3 6)True» | ||
timotimo | oops, one .say too many | 18:50 | |
but this is what you want | |||
smls | m: say <a b c d e>.first("c", :k); # Or this | ||
camelia | rakudo-moar 77a7a4: OUTPUT«2» | ||
timotimo | well, .grep isn't the same as .first | ||
and grep-index is more like grep with :k than first with :k | 18:51 | ||
smls | timotimo: But they said "index for a specific element" | ||
timotimo | oh | ||
i skipped everything after "grep-index" ;) | |||
or maybe i read up to "searching an index" | 18:52 | ||
tushar | timotimo and smls, thanks for your input. | ||
masak | tushar: .grep-index used to exist, but got folded into .grep via the :k option | ||
it's nicely consistent with :k also working on .[] and .{} | 18:53 | ||
tushar | I am in love with chain operations of Perl 6.. You can many stuff in one code line.. At the same time it's very readable.. | ||
do* | |||
timotimo | masak: and also :kv and such :) | 18:54 | |
masak | m: my @a = "A".."Z"; say @a[14, 7, 0, 8]; say @a[14, 6, 0, 8] :k | ||
camelia | rakudo-moar 77a7a4: OUTPUT«(O H A I)(14 6 0 8)» | ||
masak | tushar: it's only readable because you're weird, like we are :P | 18:55 | |
*and now it's too late to turn back* | |||
mwhahaha | |||
18:55
optikalmouse joined
|
|||
TimToady thinks everyone is weird | 18:55 | ||
optikalmouse | ^ 1000x | ||
masak | weird is already here, it's just unevenly distributed | ||
tushar | masak: hahaha.. may be.. That's why I never lost my faith from Perl.. And never moved to Python.. ;) | 18:56 | |
masak | tushar: the Python people are far too normal, agree | ||
pathologically normal | |||
TimToady | yeah, it's really weird | ||
tushar | masak: hahha.. | ||
18:56
prammer left
|
|||
timotimo | i was never a perl person. i came straight from python to perl6 | 18:56 | |
masak | timotimo: it's because we're weird but classy | 18:57 | |
tushar | timotimo: great to hear that | ||
masak: true.. | |||
timotimo | masak: that, we are *adjusts monocle* | ||
masak adjusts the sea lion on his shoulder | |||
18:57
prammer joined
|
|||
timotimo | :D | 18:58 | |
raydiak wonders what the dress code is in this sort of establishment... | |||
optikalmouse | my only issue with perl6 so far is that there seems to be a lag in the startup time? | ||
I should time it but is that something usually happens or is it a problem specific to my crappy laptop? | |||
timotimo | raydiak: only dress in a way that makes you comfortable and doesn't make others uncomfortable on purpose? :) | ||
masak | optikalmouse: it probably gets exacerbated with a crappy laptop | ||
timotimo | optikalmouse: it starts in 0.1s | ||
masak | optikalmouse: but yes, it's there. it's not nearly as fast as Perl 5 | ||
optikalmouse | k will time when I get home | 18:59 | |
Xliff_ | \o #perl6 | ||
Still having issues with gist.github.com/Xliff/0f537c12b415...9484a25b1a | |||
timotimo | starting it multiple times in a row to make sure caches are warm is important | ||
Xliff_ | At this point, I do not know what to do about that. I don't even know what that error message means. | ||
19:02
itaipu left,
prammer left
19:07
itaipu joined
19:10
domidumont left,
dha left,
newbie1 joined
19:14
acrussell joined,
darutoko left
19:15
wamba left,
_sfiguser left
19:17
_sfiguser joined
19:20
brrt joined
19:27
diakopter___ joined
19:29
ufobat left
|
|||
lizmat | and another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2016/09/19/...he-robots/ | 19:30 | |
19:34
ptolemarch left
19:37
woolfy left
19:38
smls left,
ptolemarch joined
|
|||
harmil_wk | Saw the note about unicode radixes and so immediately tried: | 19:39 | |
ugexe | link for Algorithm::LBFGS is missing the username in the url | ||
harmil_wk | m: say :⒗<a> | ||
camelia | rakudo-moar 77a7a4: OUTPUT«5===SORRY!5===Argument to "say" seems to be malformedat <tmp>:1------> 3say7⏏5 :⒗<a>Confusedat <tmp>:1------> 3say :7⏏5⒗<a> expecting any of: colon pairOther potential difficulties: Unsupported…» | ||
19:39
woolfy joined
19:40
cbk_ left,
poohman left
|
|||
harmil_wk | So, only Unicode characters that represent decimal digits in radixes? | 19:41 | |
19:41
ptolemarch left
19:42
cpage_ left
19:43
robertle joined
|
|||
optikalmouse | this looks like a cool project to attempt in perl6: github.com/semantic-release/releas...-generator | 19:44 | |
lizmat: awesome :o | 19:45 | ||
19:45
Ivanushka joined
|
|||
Ivanushka | harmil_wk: I see no reason why that shouldn't work. Would you please rakudobug it and maybe ping MasterDuke about it, since they might be more familiar with that code path | 19:46 | |
lizmat | ugexe: fixed and thanks! | ||
Ivanushka | lizmat++ good weekly | 19:47 | |
19:48
ptolemarch joined
|
|||
Ivanushka | optikalmouse: yup. You should try to make it :) | 19:49 | |
optikalmouse | welcome to javascript -_- github.com/conventional-changelog that one tool imports this one but that one imports other deps :/ | 19:50 | |
bet I can use perl6 to whip something that's smaller + better. | |||
Ivanushka | Do it. Then add it to modules.perl6.org | ||
optikalmouse++ | |||
19:50
Ivanushka left
19:56
sufrostico joined
|
|||
robertle | hi folks, I am trying to understand how perl6 finds stuff that i "use". is my undertsanding correct that a .pm6 that gets properly installed (CompUnit::Repository::Installation), all contents are inspected and indexed, so it could contain two classes with different names and I could "use" them and they would be found. whereas if the .pm6 is "only" in a CompUnit::Repository::FileSystem, then the path and | 19:56 | |
filename are used to look up what I get? so if the contents of the file do not match the filename, then I can't "use" it? seems at odds... | |||
19:59
cdg joined
20:05
ptolemarch left
20:06
zacts joined
20:08
harmil_wk left
20:10
labster joined
20:11
girafe joined
20:15
setty1 joined
20:19
Ven_ joined
20:21
canopus left
20:22
kaare__ left
|
|||
timotimo | robertle: installed modules require a meta.json that has a "provides" section | 20:25 | |
20:25
optikalmouse left
|
|||
timotimo | the CU::R::FileSystem stuff is for when you use something like -Ilib or "use lib './foo/'" | 20:25 | |
(usually you'd just spell that "use lib 'foo'", but i thought i added path markers for clarity) | 20:26 | ||
20:26
ZoffixMobile joined
20:27
canopus joined
|
|||
robertle | timotimo: right, I got that. what I thought was surprising that a .pm6 that gets put into ::Installation has "provides" for anything in the file. e.g. | 20:28 | |
"provides" : { ... "SVG::Plot::AxisPosition" : { "lib/SVG/Plot.pm" : { ...} }, ... "SVG::Plot" : { "lib/SVG/Plot.pm" : { ...} ... | |||
timotimo | oh? | 20:29 | |
that's weird? | |||
robertle | so the file "lib/SVG/Plot.pm" provides both SVG::Plot::AxisPosition and SVG::Plot | ||
I tried, I can "use" both | |||
20:29
eliasr joined
|
|||
robertle | if I put a similar .pm6, with two types in it, into a "lib" irectory, then I can only "use" the filename, not what's inside | 20:30 | |
20:30
matt_ left
|
|||
ZoffixMobile | Yeah, I noticed that with IRC::Client too | 20:30 | |
timotimo | well, what you "use" refers to a Compilation Unit, which can be a class (you'd usually spell that "unit class") or a module or a grammar or whatever | ||
robertle | so as long as each .pm6 only contains a single type, and that type matches the filename/path the stwo behave the same | ||
timotimo | yeah, using stuff isn't supposed to be about types in files, it's about the compunit you want that has what you need in it | ||
that's how i understand it anyway | |||
robertle | I am trying to do some sort of "pluggable" thing... | ||
timotimo | but this is absolutely not my area of expertise | ||
20:31
acrussell left
|
|||
timotimo | ah | 20:31 | |
robertle | yeah, compunit would make sense... | ||
timotimo | github.com/tony-o/perl6-pluggable - like this | ||
20:32
cpage_ joined
|
|||
robertle | timotimo: I am working of just that, but it doesn't work (uses @INC and does not deal with CompUnit::Repository::Installation | 20:32 | |
trying to improve it | |||
timotimo | oh, damn | ||
that's very good! :) | |||
robertle | I totally need Pluggable, I abuse it in perl5 so bad it's not funny anymore | ||
tadzik | :) | 20:33 | |
ZoffixMobile | I think CURI lets you query installed stuff | ||
robertle | what's CURI? never heard of it... | 20:34 | |
timotimo | yup | ||
that's short for CompUnit::Repository::Installation | |||
robertle | ah, *that*! | ||
ok, I did see the .installed() method, but can't get it to work and can't understand it from looking at the code either | 20:35 | ||
20:36
poohman joined
|
|||
timotimo | i think you pass it a matcher or something? | 20:36 | |
nine | no arguments | ||
timotimo | ah | 20:39 | |
nine | oh, it's b0rked | ||
robertle | I tried that, but never get anything back. either Nil or "Method 'basename' not found for invocant of class 'Any'" | ||
nine | Classic Perl bug, too: method distribution($id) { InstalledDistribution.new(self!read-dist($_.basename), :prefix(self.prefix)) } | 20:40 | |
There's no $_ there | |||
timotimo | aaaah | ||
robertle | with that fixed Pluggable would et much shorter, and I would not have to do my own json file parsing, which is nice because I am only second-guessing the format of that file | 20:41 | |
but still need to search filesystem repo's, they don't have a "installed" | |||
nine | robertle: filesystem repos are also much simpler | ||
robertle | yeah, I do File::Find and that's it... | 20:42 | |
20:43
poohman left,
sjoshi left
|
|||
nine | robertle: fix pushed | 20:44 | |
robertle | awesome | ||
I need to switch to a HEAD perl6... | 20:45 | ||
timotimo | github.com/timo/cellular-automata-tests - anybody want to look into the performance of this script? | ||
nine | Yeah, too bad it just missed a release :/ | 20:49 | |
20:49
diakopter___ left
|
|||
timotimo | i think i could turn the inner arrays into native int arrays actually | 20:50 | |
hm, but the check for the values isn't a simple min any more | 20:51 | ||
hm, probably all(@neighbours) == any(...|...) | |||
lizmat | timotimo: in a hot loop, I wouldn't use given/when | 20:52 | |
at least not at this point in time | |||
20:53
rindolf left
|
|||
timotimo | oh? i didn't realize | 20:53 | |
lizmat | well, for one you're invoking smart matching | ||
timotimo | and given without when? | ||
lizmat | that I'm not so sure about | ||
robertle | I also have a syntax question, one that is kinda hard to google for: what's "$.method()" mean? I am confused about the "naked" dollar sigil... is it another way to say "self" ? | ||
timotimo | the only when i have is for SDL event, which ought to be very rare | ||
unless you wiggle your mouse about a whole lot | |||
lizmat | robertle: yes | 20:54 | |
timotimo | yes, it's a way to spell "self" | ||
it's mostly used for accessors | |||
lizmat | $.foo is the same as self.foo | ||
timotimo | because you write "has $.foo", so you can access $.foo, too | ||
(because perl6 generates an accessor method with the name of the attribute) | |||
robertle | great! looks more magic than it is | ||
timotimo | right | ||
a profile of that script i posted shows, that enqueue is the most expensive routine | 20:57 | ||
23.28% with the second place being the inner of the two dimensional loops with 12.93% | |||
20:57
espadrine joined
20:59
itaipu left
21:01
cpage_ left
21:06
Ven_ left
21:07
doc_ joined
21:08
Ven_ joined,
tushar left
21:10
mcmillhj left
21:12
_sfiguser left
21:16
CIAvash left,
Ven_ left
21:17
cibs left
21:18
doc_ left
21:21
Yeeb joined
21:23
rgrinberg joined
21:24
_sfiguser joined
|
|||
timotimo | i might get away with running the enqueue thing on a separate thread | 21:25 | |
21:25
cibs joined
21:28
robertle left
21:34
ZoffixMobile left
|
|||
timotimo | wow, holy hell, this is a biiiig bunch slower | 21:49 | |
21:50
TEttinger joined
|
|||
timotimo | it now calculates frames 2x faster than it renders 'em :\ | 21:51 | |
21:51
espadrine left,
Unavowed left,
Actualeyes1 left,
mephinet left,
lizmat left,
grondilu left,
dylanwh left,
sjn left,
ugexe left,
Glitchy left,
rmmm left,
sunnavy left,
salva left,
baest left,
sunnavy joined,
sjn joined,
rmmm joined,
grondilu joined,
dylanwh joined,
Unavowed joined,
Glitchy joined,
espadrine joined,
baest joined,
ugexe joined,
salva joined,
lizmat joined
21:53
mephinet joined
|
|||
timotimo | whoa. removing the whenever to just for-loop over the channel made it much, much, much faster | 21:53 | |
21:55
Actualeyes joined
|
|||
timotimo | very interesting. when the calculation thread finishes (after frame 500), the render thread becomes a *lot* faster | 21:57 | |
21:59
AndroUser2 joined
|
|||
timotimo | huh, it can apparently deadlock?! | 21:59 | |
ugh, 14.5% time in run_gc | 22:04 | ||
22:07
cpage_ joined
22:14
Sgeo joined
22:16
cyphase left
22:20
cyphase joined
22:21
newbie1 left
22:24
newbie1 joined,
_slade_ joined
22:27
aries_liuxueyang left
22:30
AndroUser2 left
22:31
poohman joined
|
|||
Xliff_ | m: my @foo := CArray[int].new; @foo = Bool.roll(100_000) | 22:35 | |
camelia | rakudo-moar 8be36b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Undeclared name: CArray used at line 1. Did you mean 'Array', 'array'?» | ||
Xliff_ | m: use NativeCall; my @foo := CArray[int].new; @foo = Bool.roll(100,000) | 22:36 | |
camelia | rakudo-moar 8be36b: OUTPUT«Potential difficulties: Leading 0 does not indicate octal in Perl 6. Please use 0o00 if you mean that. at <tmp>:1 ------> 3Array[int].new; @foo = Bool.roll(100,0007⏏5)Cannot resolve caller roll(Bool: Int, Int); none of these sign…» | ||
Xliff_ | m: use NativeCall; my @foo := CArray[int].new; @foo = Bool.roll(100000) | ||
camelia | rakudo-moar 8be36b: OUTPUT«Cannot modify an immutable NativeCall::Types::CArray[int] in block <unit> at <tmp> line 1» | ||
Xliff_ | s: use NativeCall; my @foo := CArray[int].new; @foo = Bool.roll(100000) | ||
SourceBaby | Xliff_, Ehhh... I'm too scared to run that code. | ||
Xliff_ | :P | ||
timotimo | Xliff_: apparently STORE isn't implemented for CArray yet? | 22:38 | |
i think i suggested to someone to implement that some time ago | |||
m: use NativeCall; my @foo := CArray[int].new but role { method STORE(|) { say "hi!" } }; @foo = 1, 2, 3, 4 | 22:41 | ||
camelia | rakudo-moar 8be36b: OUTPUT«CArray representation requires a typed array in any compose_repr at gen/moar/m-Metamodel.nqp line 1572 in any compose at gen/moar/m-Metamodel.nqp line 3104 in any generate_mixin at gen/moar/m-Metamodel.nqp line 1346 in any at gen/moar/m-Me…» | ||
timotimo | er, oops? | ||
m: use NativeCall; class StorableCIntArray is CArray[int] { method STORE(|) { say "hi!" } }; my @foo := StorableCIntArray.new; @foo = 1, 2, 3, 4 | 22:42 | ||
camelia | rakudo-moar 8be36b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Cannot resolve caller trait_mod:<is>(StorableCIntArray, NativeCall::Types::CArray, Array); none of these signatures match: (Mu:U $child, Mu:U $parent) (Mu:U $child, :$DEPRECATED!) (Mu:U $ty…» | ||
timotimo | m: use NativeCall; class StorableCIntArray does CArray[int] { method STORE(|) { say "hi!" } }; my @foo := StorableCIntArray.new; @foo = 1, 2, 3, 4 | ||
camelia | rakudo-moar 8be36b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>NativeCall::Types::CArray[int] is not composable, so StorableCIntArray cannot compose itat <tmp>:1» | ||
timotimo | nope. | ||
22:44
poohman left
|
|||
timotimo | the way that is done makes it a bit interesting | 22:44 | |
Xliff_ | timotimo: Yes. Me. And I've been looking into it, but I am still a bit sketchy on what I've implemented it. | 22:45 | |
Was reading blog and thought I could get SourceBaby to tell me if I was in the right place. :P | |||
timotimo | ah :) | ||
Xliff_ | Of course, I've also been more busy with trying to figure out gist.github.com/Xliff/0f537c12b415...9484a25b1a | 22:46 | |
However I haven't been able to get much help. | |||
timotimo | yeah, i have no idea what's wrong there :( | ||
Xliff_ | I'm at wits end over that. | ||
timotimo | have you already written a bit of code for CArray's STORE? | ||
Xliff_ | Yes. Nothing for public consumption. | 22:47 | |
Not even close. | |||
timotimo | oh | ||
any questions i can help with? | |||
22:47
firstdayonthejob left
|
|||
Xliff_ | Mainly because I am not sure if I should be linking into the typed roles, or into the class itself. | 22:48 | |
After several false starts with a role implementation (I used IntTypedCArray for starters) I think I might need to be doing it in the class. | 22:49 | ||
I haven't had near enough time recently to give it the attention it deserves. | |||
timotimo | it's good enough to put it into the main, but putting special methods into the roles might be an optimization for the future | 22:50 | |
22:50
mcmillhj joined
|
|||
Xliff_ | timotimo: I will get there. Just need a bit of patience. | 22:50 | |
timotimo | OK | ||
Xliff_ | (and I need a can of Wooo Saaaaa) | ||
timotimo: Ah! Well then that confirms I've been barking up the wrong codepath. | |||
Alright. Have to check on dinner. Have a good night. | 22:51 | ||
o7 | |||
timotimo | not necessarily the wrong one | ||
22:54
mcmillhj left
22:58
Yeeb left
|
|||
timotimo off to bed | 23:08 | ||
23:14
sufrostico left
|
|||
skids | anyone got any experience as to typical causes behind "zeroed thread in work pass" problems? | 23:15 | |
23:23
lambd0x left,
BenGoldberg joined
|
|||
timotimo | memory corruption, i think? | 23:24 | |
valgrind may help | |||
23:29
bob778 joined,
bob777 left,
bob778 is now known as bob777
23:35
_sfiguser left
23:36
a3r0 left,
a3r0 joined,
girafe left
23:39
cdg left
23:40
yoleaux left
23:42
Khisanth left,
Sgeo_ joined,
user9 left,
user10 joined
23:43
wtw left,
Sgeo left,
protium left,
eyck left
23:44
eyck joined
23:45
user10 is now known as user9,
Khisanth joined
23:46
protium joined,
wtw joined,
lichtkind_ left
23:47
_sfiguser joined
23:58
espadrine left
23:59
poohman joined
|