»ö« 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. |
|||
00:04
lucas left
00:05
ajr_ left
|
|||
thou | Hmmm. I changed "class Template::Mustache" to "role Template::Mustache", and make test passes immediately. I wasn't expecting that. :) | 00:11 | |
00:15
dmol left,
gr33n7007h left
00:28
risou is now known as risou_awy,
risou_awy is now known as risou
00:32
beastd left
00:48
logie_ joined
00:53
BenGoldberg joined
01:09
FROGGS_ joined,
jnap joined
01:10
logie_ left,
woosley left,
Sqirrel_ joined
01:11
Su-Shee_ joined
01:12
Sqirrel left,
FROGGS left
01:14
klapperl joined,
Su-Shee left
01:15
Akagi201_ joined
01:16
bowtie left
01:17
klapperl_ left
01:20
SevenWolf left
01:30
ren1us joined
01:31
bowtie_ joined
|
|||
ren1us | what's the replacement for undef? Nil? | 01:33 | |
yoleaux | 24 Jun 2014 12:50Z <lizmat> ren1us: pushing to a hash key autovivifies | ||
24 Jun 2014 12:51Z <lizmat> ren1us: m: my %h; %h<a>.push: 1; say %h.perl | |||
24 Jun 2014 12:56Z <TimToady> ren1us: m: my %hash; not %hash{"test"}:exists; %hash{"test"}:!exists; # two other ways | |||
TimToady | std: undef | 01:37 | |
camelia | std 0f2049c: OUTPUT«===SORRY!===Unsupported use of undef as a value; in Perl 6 please use something more specific: an undefined type object such as Any or Int, :!defined as a matcher, Any:U as a type constraint, Nil as the absense of an expected valu…» | ||
ren1us | eh, Nil plus :!defined works for my purposes | 01:42 | |
01:49
molaf left
01:57
vendethiel- left
02:02
vendethiel joined
02:08
xiaomiao left
02:10
xiaomiao joined
02:12
jnap left
02:30
fhelmberger joined,
noganex_ joined
02:33
noganex left
02:35
fhelmberger left
02:36
raiph left
02:38
chenryn joined
02:46
geekosaur left
02:47
geekosaur joined
02:49
pochi left
02:51
pochi_ joined
02:53
simcop2387 left
02:54
simcop2387 joined
02:58
logie_ joined,
colomon left
02:59
colomon joined
03:04
thou left,
thou joined
03:06
molaf joined
03:11
petercommand joined
03:16
ren1us left
03:19
woosley joined
03:28
REPLeffect left
03:31
molaf left
03:33
woosley left
03:34
woosley joined
03:35
Alina-malina left
03:41
REPLeffect joined
03:52
atroxaper joined
03:56
[Sno] left
04:02
gfldex joined
|
|||
atroxaper | segomos_: Hello. Thank you for your yesterday message! Indeed it works if I use MoludeName::RoleName. It just strange for me why RakudoParrot works well and RakudoJVM and Moar isn't | 04:04 | |
04:08
kaare_ joined
04:09
BenGoldberg left
04:14
xenoterracide joined,
hoverboard left
04:18
rurban left
04:19
rurban joined
04:23
chenryn left
04:30
Alina-malina joined
04:31
logie_ left
04:32
chenryn joined
04:45
chenryn left
04:48
dayangkun joined
04:50
xenoterracide left
05:17
rindolf joined
05:25
rurban left
05:26
rurban joined
05:30
[Sno] joined
05:31
rurban left,
chenryn joined
05:34
thou left
05:39
rurban joined
05:44
Alina-malina left
05:45
Alina-malina joined
06:07
kaleem joined,
anaeem1_ joined
06:10
denis_boyun_ joined
06:18
dayangkun left
06:22
dayangkun joined
06:25
rurban left
06:36
igorsutton joined
06:42
kaleem_ joined
06:46
kaleem left,
kaleem joined
06:49
kaleem_ left,
brrt joined
06:52
kaleem_ joined,
denis_boyun_ left
06:53
zakharyas joined
06:55
kaleem left
06:57
denis_boyun_ joined
|
|||
brrt is reading the transcript of charlie ross' keynote on yapc::na | 06:59 | ||
masak too | 07:00 | ||
yoleaux | 24 Jun 2014 23:38Z <thou> masak: Thanks for the nudge, I just blogged about Template::Mustache: ode-to-camelia.tumblr.com/ | ||
masak | morning, #perl6 | ||
thou++ | |||
masak has a day of teaching ahead of him | 07:01 | ||
07:01
R0b0t1 joined
|
|||
R0b0t1 | If I were to compare perl5 and perl6 to say, python2 and python3, how wrong would I be? | 07:02 | |
07:02
virtualsue joined
07:03
dmol joined
|
|||
xiaomiao | R0b0t1: green | 07:04 | |
brrt | it would be wrong in the sense that python3 is supposed to be python2 cleaned | ||
and perl6 maybe was supposed to be that once, but its now a thing of its own | |||
R0b0t1 | What do yo- oh right. | ||
brrt | iirc perl6 is meant to be the language that programmers will use a hundred years from now | ||
R0b0t1 | brrt: I see. So what did it implement that isn't merely "cleaning?" | 07:05 | |
07:05
sftp left
|
|||
R0b0t1 | My, what lofty goals. | 07:05 | |
brrt | ok, to compare, python 3 cleaned: metaclasses and unicode | ||
iirc | |||
perl6 changed syntax, object system, meta-object system, string encoding, i.e. the whole works | 07:06 | ||
i think the right way to compare perl5 and perl6 is perhaps middle english and modern english? | |||
most of the same structures are superficially there, but most of what you'd count as 'fundamental' has changed | 07:07 | ||
07:07
woolfy1 left,
lizmat left
|
|||
R0b0t1 | Well some of those things sound like internals... that'd be more like changing the alphabet perhaps? | 07:08 | |
I mean I was going to take a look at the grammar in just a second | 07:09 | ||
07:10
lizmat joined
07:12
brrt left
07:13
darutoko joined
07:15
Ven joined
07:16
Akagi20__ joined
07:17
dmol left,
markov left
07:18
Akagi201_ left
07:21
virtualsue left
|
|||
FROGGS_ | R0b0t1: the syntax has not changed that much... it still looks like a Perl | 07:23 | |
07:24
woolfy joined
|
|||
Ven | .oO( Unless you don't want it to look like it :P ) |
07:25 | |
R0b0t1 | Ven: Howso? | ||
Ven | slangs | ||
FROGGS_ | I guess the most visible change is the dot for method calls, the ~ for string concat and the twigils | 07:26 | |
Ven | masak: ping | 07:27 | |
it's 9 am and I'm looking for a conversation about weird stuff :P | |||
moritz | there are enough conversations about weird stuff on the internet | 07:43 | |
shall I find one for you? | |||
Ven | moritz: depends. are there about macro and slangs together ? | 07:45 | |
moritz | cold fusion might be a good weird topic | ||
Ven | are they* | ||
moritz | forum.bodybuilding.com/showthread.p...=150749133 | 07:46 | |
Ven | I'm not clicking. | ||
moritz | no images (afaict) | ||
it does talk about macro and slangs | 07:47 | ||
so does books.google.de/books?id=5KXdKLDym2...mp;f=false | |||
08:07
ChoHag joined
|
|||
ChoHag | I have the code at gist.github.com/anonymous/1fab6c3c028192d89b31 to define a trait on an attribute. It uses apply_handles to create a wrapper around the attribute's accessor. | 08:08 | |
Line 22 fails with Cannot modify an immutable Any (or Str etc., if x is defined at foo.new time) | 08:09 | ||
Ven actually remembers that "but" is immutable and "does" is mutable because "shorter is better". eh ... | |||
ChoHag | Ah but works. | 08:10 | |
I remember skimming over the explanation of the difference. | |||
Ven | `but` gives back a copy. `does` modifies it in place, destructively | ||
08:24
virtualsue joined
08:27
fhelmberger joined
08:28
brrt joined
08:30
dakkar joined,
fhelmberger left
08:31
fhelmberger joined
08:40
spider-mario joined
08:46
Su-Shee_ is now known as Su-Shee
08:47
denis_boyun_ left
|
|||
sergot | o/ | 09:32 | |
atroxaper | sergot: o/ | 09:33 | |
09:37
brrt left
09:43
vendethiel left
09:44
kurahaupo joined
09:45
denis_boyun_ joined,
vendethiel joined
09:47
Psyche^_ joined
09:50
chenryn left
09:51
kivutar joined,
Psyche^ left
09:59
fhelmberger left
10:02
vendethiel left,
fhelmberger joined,
vendethiel- joined
10:11
anaeem1_ left
10:12
anaeem1 joined,
robinsmidsrod left
10:13
robinsmidsrod joined
10:16
virtualsue left,
chenryn joined
10:27
chenryn left
10:29
chenryn joined
10:30
telex left
10:32
telex joined
10:35
kurahaupo left
10:37
brrt joined
10:42
kivutar left
10:44
dmol joined
10:46
brrt left,
brrt joined
10:48
pecastro joined
10:50
vendethiel- left
10:51
vendethiel joined
10:52
virtualsue joined
10:55
salv0 left
10:58
Ven left
11:00
atroxaper left
11:01
atroxaper joined
11:02
brrt left
11:03
vendethiel- joined,
vendethiel left,
chenryn left
11:05
atroxaper left
11:06
uniejo joined
11:09
chenryn joined
11:13
salv0 joined
11:14
uniejo left
11:15
prevost joined
11:16
Akagi20__ left
11:22
molaf joined
11:23
psch joined
|
|||
psch | hi #perl6 o/ | 11:23 | |
11:24
brrt joined
11:25
brrt left
|
|||
moritz | \o | 11:29 | |
11:29
chenryn left
11:33
Alina-malina left
11:34
Alina-malina joined
|
|||
colomon | o/ | 11:44 | |
11:46
colomon left
11:47
Sqirrel_ left
12:02
brrt joined
12:05
colomon joined
12:06
Woodi left,
Woodi joined
12:09
jnap joined
12:13
anaeem1 left,
anaeem1 joined
12:14
brrt left
12:15
brrt joined
12:17
logie_ joined
12:29
fhelmberger_ joined
12:32
fhelmberger left
12:41
guru joined,
guru is now known as ajr_
|
|||
TimToady | rosettacode.org/wiki/Commatizing_numbers#Perl_6 <-- We pass up J again and get back into 4th place, at least briefly :) | 12:42 | |
12:43
logie_ left
12:45
colomon left
12:46
matija joined
12:54
anaeem1 left
13:05
Dan077 joined
13:06
Dan077 left
13:10
atta joined,
brrt left
13:12
colomon joined
13:13
atroxaper joined
13:18
atroxaper left
13:20
kivutar joined
13:31
anaeem1 joined
13:32
brrt joined
13:37
carlin joined
13:39
logie_ joined
13:45
carlin left
13:52
logie_ left,
kaleem_ left
13:53
kurahaupo joined
14:00
Alina-malina left,
Alina-malina joined
14:01
btyler joined,
treehug88 joined
14:03
carlin joined
14:09
atroxaper joined
14:10
psch left
14:11
psch joined
|
|||
hoelzro | morning #perl6 | 14:13 | |
timotimo | hey hoelzro :) | ||
14:15
cognominal left
14:16
anaeem1 left,
carlin left
14:17
psch left
|
|||
tadzik | hey hey | 14:21 | |
14:21
psch joined
14:24
kaleem joined,
cognominal joined
14:33
carlin_ joined
14:35
treehug88 left
14:36
kivutar left
14:39
thou joined
14:41
guru joined,
ajr_ left,
guru is now known as Guest26629,
Guest26629 is now known as ajr_
14:43
anaeem1 joined
14:45
anaeem1 left
14:46
lucas__ joined
14:49
atroxaper left
14:50
atroxaper joined,
anaeem1 joined
14:51
smls joined
14:54
atroxaper left
14:57
carlin_ is now known as carlin,
rurban joined
15:00
rurban left
15:04
igorsutton left
15:05
treehug88 joined
15:10
denis_boyun_ left
15:16
vendethiel- left
15:19
vendethiel joined
15:24
smls left
15:25
anaeem1 left
15:28
dayangkun left
15:32
brrt left,
logie_ joined
15:39
atroxaper joined
|
|||
colomon | anyone know where next year's YAPC::NA will be? | 15:43 | |
15:45
zakharyas left
15:53
logie_ left
15:55
fhelmberger_ left
|
|||
moritz | has it ever been in Canada? | 15:56 | |
15:57
ajr_ left
15:58
guru joined
15:59
guru is now known as Guest24446,
Guest24446 is now known as ajr_
16:00
lucas__ left
16:04
ajr_ left
16:06
ajr joined,
ajr is now known as Guest74749,
Guest74749 is now known as ajr_
|
|||
ajr_ | moritz: yes, 2005 IIRC (Toronto) | 16:07 | |
16:08
[Sno] left
16:09
cognominal left
|
|||
colomon | Toronto would be awesome. :) | 16:12 | |
ajr_ | Memory still functions: www.yapc.org/America/previous-years/2005/ | ||
16:14
Rotwang joined
|
|||
tadzik | what about Mexico? :) | 16:17 | |
16:21
anaeem1 joined
16:22
brrt joined
16:24
darutoko left
16:27
darutoko joined
16:29
molaf left
16:30
molaf joined
16:33
brrt left
16:41
ajr__ joined,
ajr_ left
16:43
treehug88 left,
anaeem1 left,
anaeem1_ joined
16:44
SamuraiJack_ joined
16:45
ajr__ left
|
|||
TimToady | I believe it'll be in Salt Lake City | 16:48 | |
16:48
sftp joined,
treehug88 joined
|
|||
jnthn | Another hot place. | 16:50 | |
jnthn , meanwhile, heads out into the arctic summer to find some dinner and, hopefully, hike the nearby hill thingy. | 16:51 | ||
16:53
treehug88 left
16:55
denis_boyun joined
16:57
smls joined
16:58
xinming joined
17:00
atroxaper left
17:01
xinming_ left
17:02
rurban joined
17:03
zakharyas joined,
bluescreen10 joined
17:04
SamuraiJack_ left,
dakkar left,
rurban1 joined,
btyler left
17:06
rurban left
|
|||
ChoHag | What does -> do? | 17:07 | |
And (where) is it documented? | |||
TimToady | lambda | ||
17:07
SamuraiJack joined
|
|||
timotimo | "->" <signature> <block> | 17:08 | |
ChoHag | How does that compare to sub <signature> <block>? | ||
timotimo | you mean "sub <name> <signature> <block>"? | ||
ChoHag | Ah right. | ||
TimToady | S06:Point_blocks | ||
timotimo | m: sub ($a, $b) { say $a } | ||
camelia | ( no output ) | ||
timotimo | ah, that does work | 17:09 | |
TimToady | S06:Pointy_blocks | ||
ChoHag | But: | ||
m: sub ($a, $b) { say $a }.(1,2) | |||
camelia | rakudo-moar a7b4cb: OUTPUT«1» | ||
TimToady | it's much like an anonymous sub, but return won't work | ||
because Blocks are transparent to return | 17:10 | ||
timotimo | ah, right | ||
that's a good point | |||
17:10
uniejo joined
|
|||
ChoHag | Right, so they're (-> and sub) essentially the same without the layer of scope which would catch the return? | 17:11 | |
17:11
uniejo left
|
|||
TimToady | that's the main difference you'll ee | 17:11 | |
*see | |||
technically, blocks are immutable, and routines aren't | |||
so you can .wrap a routine, but you can't .wrap a block | |||
17:12
Alina-malina left
|
|||
TimToady | of course, if you have a container, you can make it look mutable, as we do with string vars. | 17:12 | |
17:12
Alina-malina joined
17:13
pecastro left,
jnap left
|
|||
ChoHag | How can I .wrap a routine without affecting the mutability of the result of callsame/callwith? | 17:14 | |
17:16
uniejo joined
|
|||
ChoHag | I have $pkg.HOW.find_method($pkg, $accessor).wrap($routine) which I want to call the original accessor and fiddle with the result (and, if I can, the value going in). | 17:16 | |
17:16
Alina-malina left
|
|||
TimToady | generally you need to work with | and \ to keep things in terms of Captures and Parcels | 17:17 | |
don't use sigils for the intermediates | |||
ChoHag | Actually right now there isn't an intermediate. | ||
17:17
Alina-malina joined
|
|||
TimToady | and the wrapper might need to be declared 'is rw' as well | 17:17 | |
I doubt wrapping copies that for you. | 17:18 | ||
ChoHag | essentially: find_method(...).wrap({say "in accessor"; callsame}) | ||
How do I do that? I have the wrapper in a variable but it wasn't just "$r is rw" :( | |||
TimToady | sub (|) is rw { say "in accessor"; nextsame } | ||
if that's all you want to do | 17:19 | ||
you don't have to return to here with callsame unless you want to postprocess the args | |||
s/args/returns/ | |||
ChoHag | What does that mean "return to here"? | 17:20 | |
timotimo | "callsame" acts like a call | ||
"nextsame" acts like a goto | |||
ChoHag | Ah. | 17:21 | |
Right. Hence the s/// which I ignored. | |||
colomon | TimToady++ | ||
TimToady | timotimo++ :) | ||
ChoHag | Hmm well now it reports as read-only, which I guess is an improvement. | ||
17:22
brrt joined
|
|||
TimToady | de-elevating & | 17:23 | |
17:23
xfix left
|
|||
ChoHag | gist.github.com/ChoHag/e1a910d6ac454aadb7b3 | 17:23 | |
17:23
xfix joined
17:29
virtualsue left
|
|||
TimToady | <de-elevated> | 17:31 | |
17:31
guru joined
|
|||
ChoHag | Can you have a look at my gist? | 17:31 | |
And surely it should be delevevating? | 17:32 | ||
17:32
guru is now known as Guest54096
|
|||
ChoHag | delevating | 17:32 | |
TimToady | in a session right now | ||
ChoHag | Or devating maybe. | ||
17:32
Guest54096 is now known as ajr_,
[Sno] joined
|
|||
ChoHag | deviate. | 17:32 | |
17:32
beastd joined
|
|||
ChoHag | bah. For someone, this is an easy problem. | 17:33 | |
17:33
xfix left
|
|||
ChoHag | It's one of those obvious things I don't quite grok about the whole variable/container/object/instance magic. | 17:33 | |
17:34
xfix joined,
uniejo left
17:38
rurban1 left
17:39
xfix left,
xfix joined
17:42
darutoko- joined,
xfix left,
xfix joined,
xfix left,
xfix joined
17:44
darutoko left
17:47
SamuraiJack_ joined
17:50
SamuraiJack left
|
|||
smls | rant of the day: Why does the syntax for inline comments have to be so strange? | 17:51 | |
17:51
SamuraiJack__ joined
17:52
uniejo joined
|
|||
smls | Removing the backtick would be an improvement: #( bla bla ) | 17:53 | |
Wouldn't that work? | |||
TimToady | used to be, but it's problematic if you take a block and put # in front of each line | ||
you don't want end-of-line comments accidentally turning into nested | 17:54 | ||
FROGGS_ | I somehow like #* ... *# | ||
but I do not write comments anyway :P | 17:55 | ||
I mean, it is source code after all :o) | |||
17:55
SamuraiJack_ left
|
|||
smls | TimToady: Maybe it could be restricted to one type of brackets then? | 17:57 | |
So no curly braces (which would probably cause the most trouble) | 17:58 | ||
TimToady | other DSLs could have different issues | ||
and we're optimizing for extensibility | 17:59 | ||
and comments ought to stand out visually | |||
smls | Personally, I tend to always edit code in an editor with syntax highlighting, and for commenting whole lines/blocks I use an editor shortcur which does the right thing | ||
TimToady | you can make a slang with your own commenting scheme :) | 18:00 | |
vendethiel | how do slangs interact with macros ? | ||
18:00
SamuraiJack joined
|
|||
masak | very well ;) | 18:00 | |
TimToady | a macro is basically a mini-slang | 18:01 | |
vendethiel | masak: BZZT! wrong answer | ||
masak | macros are just routines. | ||
18:02
itz joined
|
|||
TimToady | macros are like an elephant | 18:02 | |
masak | if you can call them from your slang, you can interact with it. | ||
18:02
SamuraiJack__ left
18:03
virtualsue joined
18:04
uniejo left
|
|||
vendethiel | everytime I see nested stuff in perl 5, I go like "how do you remember that?". But I probably do the same all the time | 18:08 | |
18:08
kaleem left
|
|||
masak | "nested stuff"? | 18:09 | |
18:10
uniejo joined
|
|||
FROGGS_ | interpolated stuff in quotes or regexes I guess | 18:10 | |
vendethiel | masak: $a[0]->[0] or $a->[0][0] or $a[0][0] ? | ||
FROGGS_ | ahh | 18:11 | |
18:12
rurban joined
18:14
btyler joined
|
|||
masak | oh, that. | 18:14 | |
yeah. I can do it... but I prrefer not to :) | |||
smls | 1) sticking two postcircumfixes together is syntactic sugar for an arrow between them (so if you see [0][0], imaging [0]->[0]) | 18:15 | |
2) arrows dereference | |||
^^ really all you need to remember | |||
vendethiel | "dereference" ? | ||
Well, I'll learn about it with the book woolfy++ gave me at some point. | 18:16 | ||
FROGGS_ | yes, the array derefs | ||
vendethiel | I just don't really, uh, carry it out a lot; because it's heavy. | ||
FROGGS_ | $a[0] in P5 is about a variable @a | ||
smls | take a reference (which is a scalar value), and return the value that it points at (which can be any kind of scalr/array/hash/object) | ||
vendethiel | FROGGS_: that I know :) | ||
FROGGS_ | $a->[0] is about a variable $a that is an array reference | ||
18:17
brrt left
18:18
raiph joined
|
|||
vendethiel prefers p6's way | 18:18 | ||
ways* | |||
raiph | hi #perl6 | 18:20 | |
vendethiel | o/ | ||
18:20
uniejo left
|
|||
smls | vendethiel: yeah, although the Array/List/Parcel separation, container system, and dynamic flattening, add their own pitfalls & hidden complexities | 18:20 | |
raiph | did anyone come up with a nice way to demo concurrency using camelia? | ||
vendethiel | smls: oh, you can see me going on about how I dislike flattening often enough ;) | 18:21 | |
18:21
uniejo joined
|
|||
smls | :) | 18:21 | |
18:22
uniejo left,
rurban left
18:23
SamuraiJack left
18:27
rurban joined
|
|||
vendethiel | Ricardo is a good speaker, eh. | 18:27 | |
18:27
rurban left
|
|||
psch | gist.github.com/peschwa/661c66d89243b343ce20 # \o/ | 18:28 | |
running spectest now; i think i'll have to fix the existing tr/// tests | |||
i at least remember one having a bunch of whitespace that aren't reflected in the expected results | 18:29 | ||
18:29
zakharyas left
|
|||
smls | TimToady: You know what would be cool? Allow matching a grammar/regex against a *list* of strings, and have a syntax for "match a string boundary here" anchors inside the grammar | 18:30 | |
18:31
matija left
18:32
Sqirrel joined
|
|||
masak | don't the ^ and $ anchors already match a "string boundary"? | 18:32 | |
18:33
rurban joined
|
|||
masak | seems to me the only missing piece is the ability to keep matching after that. | 18:33 | |
smls | In Perl, I sometimes concatenate multiple strings with null-bytes, and then use a regex on the combined string (to leverage the power of the backtracking engine to solve my multi-string comparison/matching/selection problems for me) | 18:34 | |
vendethiel | uh. | ||
smls | but that feels dirty, is not always safe, and will probably not work in P6 (where strings are more hihg-level) | ||
The second solution at rosettacode.org/wiki/Find_common_di..._path#Perl (which I added today) is one example | 18:36 | ||
another use-case would the the parsing of command-line arguments which I talked about a while ago | |||
(since those already come in partially pre-tokenized) | |||
18:38
SamuraiJack joined
18:40
vendethiel left,
vendethiel- joined
18:42
hoverboard joined,
matija joined,
darutoko- left
|
|||
raiph | .tell thou Your blog says "Let me know" but I see no obvious way to comment. What I'm sure anyone reading it wants to know is what you found out about control of your grammar's backtracking. | 18:43 | |
yoleaux | raiph: I'll pass your message to thou. | ||
raiph | thou++ # for adding an excellent module to the ecosystem | 18:44 | |
thou++ # for blogging about it | |||
colomon | raiph: links? | 18:46 | |
18:47
SamuraiJack left
|
|||
smls | colomon: I believe raiph is referring to ode-to-camelia.tumblr.com/post/8980...-in-perl-6 | 18:48 | |
colomon | smls++ | ||
raiph | smls++ # for sweet doc.perl6.org design (and correct thou blog link) | 18:49 | |
18:50
uniejo joined
|
|||
smls | Mouq++ did (almost) all the work for that, though :) | 18:50 | |
18:52
Urchin[emacs] joined,
uniejo left
18:53
uniejo joined
18:54
woolfy left
18:56
virtualsue left
|
|||
dalek | ast: 43e2c18 | (Pepe Schwarz)++ | S05-transliteration/trans.t: Corrected one test for tr///, all spaces are important. |
18:56 | |
18:56
jnap joined
18:57
lizmat left,
pecastro joined
18:58
Emilper joined
19:05
uniejo left
19:06
Emilper left
19:10
logie_ joined,
emilper joined,
emilper left
19:11
emilper joined,
uniejo joined
19:14
Urchin[emacs] left
19:18
prevost left
|
|||
FROGGS_ | this is an awesome talk about 5.20!! www.youtube.com/watch?v=D1LHFKGHceY | 19:18 | |
ChoHag | Is it possible to get a list of the attributes in a class? | 19:20 | |
19:20
molaf left
19:21
molaf joined
19:22
molaf left
|
|||
FROGGS_ | m: sub foo($x, $y = return 0) { $x + $y }; | 19:24 | |
camelia | ( no output ) | ||
19:24
molaf joined
|
|||
FROGGS_ | m: sub foo($x, $y = return 0) { $x + $y }; say foo(1, 2) | 19:24 | |
camelia | rakudo-moar a7b4cb: OUTPUT«3» | ||
19:24
brrt joined
|
|||
FROGGS_ | m: sub foo($x, $y = return 0) { $x + $y }; say foo(1) | 19:24 | |
camelia | rakudo-moar a7b4cb: OUTPUT«Attempt to return outside of any Routine in block at /home/p6eval/rakudo-inst-2/languages/perl6/runtime/CORE.setting.moarvm:1 in sub foo at /tmp/LU1AeG4Hoh:1 in block at /tmp/LU1AeG4Hoh:1» | ||
FROGGS_ | m: sub foo($x, $y = return $x) { $x + $y }; | ||
camelia | ( no output ) | ||
FROGGS_ | TimToady: can we have that? | ||
TimToady | smls: see S05:4686 for the spec; please implment it. :) | 19:25 | |
synopsebot | Link: perlcabal.org/syn/S05.html#line_4686 | ||
segomos_ | jnthn: any hints as to why, if i exceed the number of max_threads in the $*SCHEDULER that it just stops processing? is there a way to just make it queue requests (or is that what it should do?) | ||
19:25
ingy joined
19:26
brrt left
|
|||
ChoHag | # Add to correct table depending on if it's a Submethod. Note, we | 19:26 | |
Metamodel/MethodContainer.nqp | 19:27 | ||
19:27
brrt_ joined,
brrt_ is now known as brrt
|
|||
TimToady | FROGGS_: arguably that's just a bug | 19:28 | |
FROGGS_ | TimToady: so it is meant to work? | ||
that's cool :o) | |||
19:28
xragnar is now known as Guest77077,
xragnar_ joined,
Guest77077 left,
xragnar_ is now known as xragnar
|
|||
smls | yes, very cool | 19:28 | |
19:29
uniejo left
|
|||
carlin | m: my $x = return 1; say 'alive' | 19:29 | |
camelia | ( no output ) | ||
smls | TimToady: On a related note (to the multi-string regex matching), can grammars be made to transparently operate on a stream of tokens supplied by an external lexer? | 19:34 | |
PerlJam | smls: what do you mean by "transparently"? | 19:35 | |
(because I'm pretty sure they're going to need to see each other to make that work :) | |||
smls | so you can refer to <foo> as if you had defined «token foo { ... }» in the same grammar | 19:36 | |
19:36
uniejo joined
|
|||
smls | but instead, the token definitions are left out of the grammar, and the input is a list of token tokens that know their names | 19:37 | |
Pairs, probably | |||
19:37
hoverboard left
|
|||
smls | TokenList.new( 'digit' => '5', 'digit' => '2', 'alpha' => 'x' ).match(/ <digit>* <alpha> /) # so that this would match | 19:39 | |
TimToady | that's one of those things that'll happen when someone decides to scratch their itch | ||
smls | or similar | ||
TimToady | but it's not on the critical path to 6.0, I suspect | 19:41 | |
timotimo | I would like to see that feature | 19:42 | |
jnthn | ChoHag: .^attributes gets you Attribute objects describing each attribute | 19:43 | |
19:43
itz left
|
|||
jnthn | segomos_: The only reason I can imagine it stopping processing is because something is "clogging" up all the threads | 19:44 | |
19:45
dayangkun joined
19:47
hoverboard joined
19:55
lizmat joined,
rurban left
19:56
rurban joined,
itz joined
20:00
uniejo left
|
|||
emilper | I am attempting to use libgsl (GNU GSL) with NativeCall, but libgsl it misses a function from libcblas, and libgsl is not linked with libcblas at all supposedly so executables using libgsl could link with alternatives ... what options do I have ? I tried wrapping the missing function from libcblas and I can use it, but I get a segmentation fault when one of the libgsl functions I need is ran | 20:01 | |
I am attempting to use libgsl (GNU GSL) with NativeCall, but libgsl misses a function from libcblas, and libgsl is not linked with libcblas at all supposedly so executables using libgsl could link with alternatives ... what options do I have ? I tried wrapping the missing function from libcblas and I can use it, but I get a segmentation fault when one of the libgsl functions I need is ran | |||
sorry, skype reflexes | |||
TimToady | we should definitely get that to work somehow | 20:04 | |
20:04
uniejo joined
|
|||
FROGGS_ | emilper: when you preload the libcblas, does it work then? | 20:05 | |
emilper | yes | ||
FROGGS_ | then you just need to find a way to do that programatically | ||
20:06
virtualsue joined
|
|||
emilper | .you mean find a way to compile libgsl linked with libcblas ? | 20:08 | |
20:09
LLamaRider joined
20:10
rindolf left,
pecastro left
|
|||
FROGGS_ | emilper: no, I was thinking that you preload the lobcblas from within rakudo | 20:11 | |
20:12
itz left,
pecastro joined
|
|||
PerlJam | this sounds hacky, but wouldn't something like: sub dummy is native('libcblas') {} # do it ? | 20:13 | |
lizmat | if dummy exists in libclas ? | 20:14 | |
and if not ? | |||
PerlJam | I'm not sure when it actually does the dlopen() | 20:15 | |
jnthn | Well, you'd have to try and call the dummy | ||
Since it will loadlib on the first call | |||
PerlJam | gotcha | ||
emilper | pastebin.com/gTq48n8J | 20:16 | |
FROGGS_ | jnthn: clearly NativeCall needs to expose a way to preload libs :o) | 20:17 | |
emilper | that is how I got the segmentation fault | ||
20:17
cosimo left
|
|||
jnthn | FROGGS_: Agree | 20:17 | |
FROGGS_ | on the other hand, loading a lib on first call is an awesome thing to have... no fights with DynaLoader at BEGIN time for example... | 20:18 | |
20:19
itz joined
20:22
uniejo left
20:24
cosimo joined
20:25
zengargo1le joined
20:28
zengargoyle left
20:30
smls left
20:31
itz left
20:32
smls joined,
timotimo left,
virtualsue left
20:37
dayangkun left,
timotimo joined
20:39
Rotwang left
20:41
brrt left
20:42
rurban left
|
|||
vendethiel- | m: my @a = (1, 2, 3); say @a.perl; say @a[*].perl | 20:43 | |
camelia | rakudo-moar a7b4cb: OUTPUT«Array.new(1, 2, 3)(1, 2, 3)» | ||
20:43
kaare_ left,
virtualsue joined
|
|||
lizmat | m: my @a = (1, 2, 3); say @a[].perl | 20:43 | |
camelia | rakudo-moar a7b4cb: OUTPUT«Array.new(1, 2, 3)» | ||
lizmat | m: my @a = (1, 2, 3); say "@a[]".perl | 20:44 | |
camelia | rakudo-moar a7b4cb: OUTPUT«"1 2 3"» | ||
20:45
vendethiel joined
|
|||
vendethiel | I don't really understand [*] and [], uh. | 20:45 | |
m: my $a = [1, 2]; say $a[*].perl | 20:46 | ||
camelia | rakudo-moar a7b4cb: OUTPUT«(1, 2)» | ||
vendethiel | okay, that one might be useful | ||
m: my $a = [1, 2]; say $a[].perl | |||
camelia | rakudo-moar a7b4cb: OUTPUT«Array.new(1, 2)» | ||
lizmat | S09:634 | ||
synopsebot | Link: perlcabal.org/syn/S09.html#line_634 | ||
vendethiel | I prolly just don't understand Array.new vs no Array.new | ||
20:46
rurban1 joined
|
|||
vendethiel | lizmat: yeah, that I know, but I don't know why it's useful | 20:46 | |
m: my @a = (1, 2, 3); say @a eqv @a[*]; | 20:47 | ||
camelia | rakudo-moar a7b4cb: OUTPUT«False» | ||
20:47
vendethiel- left
|
|||
lizmat | allows you to interpolate in a string :-) | 20:47 | |
vendethiel | m: my $a = [1, 2, 3]; say "$a".perl | ||
camelia | rakudo-moar a7b4cb: OUTPUT«"1 2 3"» | ||
20:48
vendethiel left,
vendethiel joined,
uniejo joined
|
|||
vendethiel | I'd do my test locally but I'm on 2014.03. Guess I'll whisper camelia | 20:48 | |
TimToady | .[] is a no-op | ||
whereas .[*] is a slice | 20:49 | ||
vendethiel | and, yeah, seems like [1, 2, 3] interpolates quite seamlessly in a string. Not sure WDYM lizmat? | ||
timotimo | i thought .[] is like .list? | ||
TimToady | and a normal slice returns everything *except* the array | ||
well, yes, it's like .list | |||
smls | m: my @a = 1, 2, 3; say "@a vs @a[]"; #vendethiel | 20:50 | |
camelia | rakudo-moar a7b4cb: OUTPUT«@a vs 1 2 3» | ||
vendethiel | TimToady: and what use does removing the array have ? | ||
TimToady | in interpolation it makes no difference | 20:51 | |
vendethiel | smls: yeah, yeah, but wrt [*] | ||
TimToady | m: my @a = 1,2,3; say @a[].WHAT | ||
camelia | rakudo-moar a7b4cb: OUTPUT«(Array)» | ||
TimToady | m: my @a = 1,2,3; say @a[*].WHAT | ||
camelia | rakudo-moar a7b4cb: OUTPUT«(Parcel)» | ||
TimToady | the original intent for .[] was to enable intepolation | 20:52 | |
the item/list distinction came later | 20:53 | ||
lizmat | m: my @a = 1,2,3; say (@a[]:v).WHAT # is this a pb ? | ||
camelia | rakudo-moar a7b4cb: OUTPUT«(Parcel)» | ||
vendethiel | I still don't see how it's useful | ||
20:54
pecastro left
|
|||
segomos_ | jnthn: what do you mean something by "clogging"? | 20:54 | |
re: threads | |||
timotimo | "reading the irclog" | ||
irc log -> irclog -> clog | |||
segomos_ | lol | 20:55 | |
vendethiel | (really ?) | ||
jnthn | segomos_: Like, something that hangs | ||
I mean, if you do start { loop { } } a bunch of times, for example, you exhaust the thread pool | 20:56 | ||
smls | vendethiel: With hashes, it's easier to see the difference: | 20:57 | |
m: my %a = <a 1 b 2>; say %a{}.perl; say %a{*}.perl | |||
camelia | rakudo-moar a7b4cb: OUTPUT«("b" => "2", "a" => "1").hash("1", "2")» | ||
vendethiel | yeah, alright; but what about arrays ? | ||
smls | Consistency, i guess. And [] is easier to type for interpolation. | 20:58 | |
vendethiel | i still mean [*], not [] | ||
I get that [] is useful for interpolation -- it indeed is :) | |||
20:59
molaf left
21:01
bluescreen10 left
|
|||
smls | .[*] and .values do seem to be synonymous | 21:03 | |
segomos_ | jnthn: ahh..i have checked for something hanging in the thread pool but my requests exit normally. so maybe i need to take a different approach from 'await' and use the .then functionality .. | ||
smls | but maybe the star-form is useful whe you don't know in advance what whether you want a full slice: | ||
m: my @indizes = 2, *; say @a[$_] for @indizes; | 21:04 | ||
camelia | rakudo-moar a7b4cb: OUTPUT«===SORRY!=== Error while compiling /tmp/4Dvby5_ddlVariable '@a' is not declaredat /tmp/4Dvby5_ddl:1------> my @indizes = 2, *; say @a[$_]⏏ for @indizes; expecting any of: postfix sta…» | ||
smls | m: my @a = 1, 2, 3; my @indizes = 2, *; say @a[$_] for @indizes; | ||
camelia | rakudo-moar a7b4cb: OUTPUT«31 2 3» | ||
21:06
logie_ left
|
|||
lizmat | re clogging: S99:222 | 21:07 | |
synopsebot | Link: perlcabal.org/syn/S99.html#line_222 | ||
jnthn | segomos_: Try that, yeah | 21:11 | |
segomos_: I plan to make await do something continuationy but didn't get to it yet. | |||
lue | I think "clogs" came about when in one of the #phasers channels the topic miswrote "IRC logs: location.com" as "IR Clogs: location.com" | 21:13 | |
21:13
gfldex left
|
|||
timotimo | logation, logation, logation. | 21:14 | |
21:16
uniejo left
|
|||
dalek | kudo-star-daily: ff92bb0 | coke++ | log/ (10 files): today (automated commit) |
21:16 | |
kudo-star-daily: 37ef2eb | coke++ | log/ (11 files): today (automated commit) |
|||
rl6-roast-data: 5e1fc9e | coke++ | / (5 files): today (automated commit) |
|||
rl6-roast-data: f236d46 | coke++ | / (5 files): today (automated commit) |
|||
[Coke] | jvm exploded; moar clean, parrot has one file with failures. | 21:17 | |
raiph | jnthn: what one liner would you write (preferably but not necessarily using camelia) to demo "a sub returning multiple values" where the multiple values are generated using a concurrent construct? | ||
(i'm working on a thorough reply to someone's questions about P6) | 21:18 | ||
[Coke] waves from montana, somewhere west of billings. | 21:19 | ||
21:20
rurban joined
21:21
rurban1 left
|
|||
vendethiel | m: my ($, $a) = do sub { return 1..* }; say $a | 21:23 | |
camelia | rakudo-moar a7b4cb: OUTPUT«(Any)» | ||
raiph | m: await do for ^10 { start { rand.sleep; .say } } # jnthn, here's what P6ers suggested yesterday but camelia somehow puts stuff back in order | 21:24 | |
camelia | rakudo-moar a7b4cb: OUTPUT«0123456789» | ||
PerlJam | camelia++ you're just too smart for raiph | 21:26 | |
21:26
Sqirrel left
|
|||
vendethiel | to be fair, she's probably too smart for all of us | 21:26 | |
PerlJam | indeed | ||
(Why does camelia output all of those numbers in order?) | 21:28 | ||
lee__ | perl6-m segfaults the second time i try to run that one liner | 21:29 | |
PerlJam | m: start { sleep 1; say "bob" }; start { sleep 3; say "hi" } | 21:30 | |
camelia | ( no output ) | ||
21:31
denis_boyun left
|
|||
PerlJam | m: await do { start { sleep 3; say "bob" }; start { sleep 1; say "hi" }; } | 21:31 | |
camelia | rakudo-moar a7b4cb: OUTPUT«bobhi» | ||
jnthn | um...what on earth... | 21:32 | |
timotimo | it should return those in order | 21:33 | |
er ... | |||
no, i misunderstood | |||
21:34
BenGoldberg joined
|
|||
lizmat | wrong scheduler ? | 21:34 | |
jnthn | It does seem to work locally | ||
No ideal what's going on with camelia there | |||
lizmat | does it also work correctly with the restricted setting locally ? | ||
21:34
virtualsue left
|
|||
jnthn | raiph: I'm not immediately sure what you mean with returning multiple values concurrently...other than await do for blah { start ... } | 21:34 | |
ChoHag | lizmat: You grok this stuff more than a sane person should. Perhaps you can help me. | ||
gist.github.com/ChoHag/e1a910d6ac454aadb7b3 | 21:35 | ||
jnthn | raiph: I did some examples of that in my climate data set talk at FOSDEM iirc | ||
lizmat | ChoHag: will look at it later, now watching YAPC::NA keynote | ||
ChoHag | Thankyou. It's short. | 21:36 | |
And simple, I think. | |||
21:37
uniejo joined
|
|||
raiph | jnthn: Thanks, I'll look at that. A P5er asked "Can you return multiple values from a sub?" I'm detailing some of the ways -- Positionals, Iterables. I was thinking a Supply (or .tap) or somesuch would be particularly interesting to a P5er. | 21:41 | |
[Coke] hopes YAPC::NA is -after- school gets out next year. :( | 21:46 | ||
21:46
uniejo left
|
|||
[Coke] | (well, and also that I can convince work to send me. :) | 21:46 | |
lizmat | blog.yapcna.org/2014/06/25/yapc2015...announced/ | ||
21:48
kivutar joined
|
|||
[Coke] | nope. earlier than ever. :( | 21:49 | |
lizmat | shutting down& | 21:51 | |
21:51
lizmat left
|
|||
[Coke] ~~ | 21:52 | ||
TimToady | o/ | ||
TimToady goes to the hallway to see if anyone is there who is too shy to have come up earlier... | |||
jnthn | raiph: Well, supplies are all about *not* returning, 'cus they're doing async... :) | 21:53 | |
Return values - and wait to have one - is basically the definition of synchronous programming : | 21:54 | ||
:) | |||
*waiting, even | |||
21:56
smls left,
cognominal joined,
kurahaupo left
22:00
rurban left
|
|||
[Coke] | looks like the eval server died on today's jvm run, but there's no error log for the eval server. last successful test was wwwroot/views/entity/pdf.cfm | 22:04 | |
er, was S32-io/IO-Socket-INET.t. | 22:05 | ||
22:06
rurban joined
22:07
btyler_ joined
22:08
btyler left
22:09
anaeem1_ left
22:12
btyler_ left
22:13
LLamaRider left
22:15
lizmat joined
22:16
lizmat left
22:17
rurban left
|
|||
jnthn finally got around to scribbling a small blog post, after months of being quiet :) | 22:21 | ||
And now, sleep...early flight... | |||
& | |||
timotimo | yays | ||
22:31
erkan left
22:32
dmol left
|
|||
segomos_ | is there a way to chain together an array of subs that return promises? for instance, a way to do @a = (sub { return Promise.new; }, sub { return Promise.new; }); @a[0].().then(@[1].().then ... etc | 22:32 | |
trying to find the right syntax (if there is one) and drawing blank | |||
22:32
zengargoyle joined
|
|||
segomos_ | also trying not use await ^ | 22:33 | |
22:36
zengargo1le left
22:38
kivutar left
22:39
SevenWolf joined
22:40
erkan joined,
lizmat joined
|
|||
lizmat | socializing& | 22:40 | |
22:44
simcop2387 left
|
|||
timotimo | segomos_: i don't get what you're trying to do | 22:45 | |
i mean, i kinda get what you want to do, but not what it'd be useful for | |||
22:46
ggherdov left
22:47
akagi201 left
|
|||
segomos_ | i guess maybe i need to do this differently..i was thinking that if i do chain sub calls with .then that i would avoid over promising and freezing the thread pool but this could happen anyway, just in a more linear fashion | 22:48 | |
22:49
Ben_Goldberg joined,
BenGoldberg left,
Ben_Goldberg is now known as BenGoldberg
22:50
ggherdov joined,
akagi201 joined
|
|||
segomos_ | not really sure how to handle overloading the thread pool and halting all execution | 22:55 | |
carlin | jnthn: in your blog post you say "we never actually get to specialize the loop code (because we never ." Think you missed a bit :) | 23:02 | |
segomos_ | especially with IO::Socket::Async adding items to the thread pool | ||
[Coke] | jnthn: reading blog post. confusing sentence near "(because we never." | 23:07 | |
carlin++ # Coke too slow! | |||
timotimo | segomos_: you're not thinking right about this stuff | 23:12 | |
Promise.new doesn't start or occupy a new thread | |||
start { ... } creates a promise and queues some code to be executed, which will fulfill or break the promise | |||
Promise.then takes a code block, not a promise | |||
23:13
carlin left
23:17
thilp left
23:22
[Sno] left
23:27
spider-mario left
23:29
erkan left
23:32
btyler joined
23:34
erkan joined
23:48
thilp joined,
beastd left
23:56
fhelmberger joined
|