»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend! Set by masak on 12 May 2015. |
|||
00:00
jack_rabbit joined
|
|||
TimToady | .tell jnthn I think it would be sanest if submethods do not compose like methods, but have some mechanism for getting themselves all called at the same time as the corresponding class submethod in either build-ish or destroy-ish order as pseudo-parents located between this class and its actuall parents | 00:19 | |
yoleaux | TimToady: I'll pass your message to jnthn. | ||
00:36
Akagi201 joined,
Akagi201 left,
Akagi201 joined
00:39
AlexDaniel left
00:41
aborazmeh joined,
aborazmeh left,
aborazmeh joined
00:44
beastd left
00:45
laouji joined
00:58
aborazmeh left
01:21
BenGoldberg joined
|
|||
ugexe | my $proc = Proc::Async.new("echo","foo","bar"); $proc.stdout.tap(-> $v { print "Output: $v" }); say "Starting..."; my $promise = $proc.start; await $promise; say "Done"; | 01:40 | |
01:41
smls left
|
|||
ugexe | a recent change appears to make that stuck in await | 01:41 | |
in the last 24-36 hours i would guess | 01:42 | ||
zostay | is there a way to interrupt a thread in P6? say to cause a long running operation to timeout? | 01:43 | |
as you might do with a SIGALRM in P5 | 01:44 | ||
TimToady | ugexe: Proc::Async has been unstable for a long time, but a recent change to avoid spinlocks has exposed some failure modes | 01:45 | |
ugexe | ah. im not sure what a failure mode is, but it looks like the Promise just stays as Planned | 01:47 | |
TimToady | zostay: we don't actually deal directly with threads much in P6; work gets assigned to worker threads as needed; if you want to interrupt the execution of a promise, you can interrogate a supply (such as the Signal supply) for async events | 01:48 | |
well, "interrogate" is the wrong word... | |||
ugexe: otoh, the restart-concurrent test seems to be hanging consistently now, so maybe you're onto something... | 01:50 | ||
zostay | ok... i think what i want to know is if i can cause a blocking read to exit with EINTR | ||
TimToady | dinner & | 01:51 | |
zostay | (or blocking write or whatever system like call) | ||
01:53
Sqirrel left
02:07
llfourn joined
|
|||
gagalicious | hi i'm a hard core perl5 programmer. is there anything i u guys would like to tell me what i am missing here on perl6 which i cant do on perl5? | 02:08 | |
skids | gagalicious: are you a Moo/Moose user in P5? | 02:12 | |
gagalicious | nope | ||
what's that? | |||
skids | It's a module that adds a lot of OO niceness. | 02:13 | |
So you are mostly a perl5 core user, then, right? | |||
TimToady | what kind of data do you deal with, mostly? | ||
certain kinds of math are a lot nicer in P6 | 02:14 | ||
m: say 1, 1, *+* ... * | |||
camelia | rakudo-moar c2a57e: OUTPUT«1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 1346269 2178309 3524578 5702887 9227465 14930352 24157817 39088169 63245986 102334155 165580141 267914296 433494437 70140873…» | ||
TimToady | like there's a fibonacci series | ||
m: say [*] 1..10 | 02:15 | ||
camelia | rakudo-moar c2a57e: OUTPUT«3628800» | ||
TimToady | there's 10 factorial | ||
02:15
yqt left
|
|||
TimToady | p6 arguably has better Unicode support now, if you're into text processing | 02:15 | |
skids | There are better control structures and loop handling. | 02:16 | |
gagalicious | yeah perl5 me | ||
TimToady | there's more "everything is an object", if you're into OO, and if you're not into OO, you can still pretend numbers aren't objects :) | ||
it's also easier to do functional programming, if you're into that | 02:17 | ||
gagalicious | better unicode? i havent come across any major issues in perl5 | ||
i dont really like the reliance on object too much.. not everything for sure. | 02:18 | ||
02:18
vendethiel joined
|
|||
TimToady | well, the main thing is the runtime is never confused about whether a string is text or binary in p6 | 02:18 | |
02:18
jack_rabbit left
|
|||
TimToady | whereas p5 can get confused about that | 02:18 | |
but p6 also has better support for languages that use lots of diacritics | 02:19 | ||
this shows up more outside the typical latin-1 langauges though | |||
skids | m: for flat ^5 Z "a".."d" -> $a, $b { "$a $b".say }; # multiple loop control variables are easy | 02:20 | |
camelia | rakudo-moar c2a57e: OUTPUT«0 a1 b2 c3 d» | ||
TimToady | and most USians say "What's with these fancy accents? Why can't people just ASCII like normal people?" | ||
*use ASCII | |||
so we wouldn't tend to notice the internationalization support | 02:21 | ||
gagalicious: you also don't have to memorize so many things, like which functions take $_ for a default | 02:22 | ||
skids | m: say gather while (++$ < 4) { "HERE".say; take 42; "THERE".say }; # You can take results from the middle of loops like this | 02:23 | |
camelia | rakudo-moar c2a57e: OUTPUT«HERETHEREHERETHEREHERETHERE42 42 42» | ||
TimToady | p5 has 15 or so magical symbols like STDOUT that span all packages | ||
in p6 global symbols are specially marked | 02:24 | ||
$*OUT instead of STDOUT | |||
so that's another list you don't have to remember | |||
02:24
kurahaupo joined
|
|||
TimToady | p6 also tends to have better error messages, generally | 02:25 | |
02:25
[Sno] joined
|
|||
raydiak | don't forget the way more awesomer regexes | 02:25 | |
skids | m: say <jack queen king> X~ "of" X~ <diamonds hearts> # it is very easy to generate all sorts of things | ||
camelia | rakudo-moar c2a57e: OUTPUT«jackofdiamonds jackofhearts queenofdiamonds queenofhearts kingofdiamonds kingofhearts» | ||
02:25
][Sno][ left
|
|||
TimToady | raydiak: that too :) | 02:25 | |
raydiak | and grammars | ||
TimToady | p6 has better extensibility | 02:26 | |
m: sub postfix:<!>($x) { [*] 2..$x }; say 42! | 02:27 | ||
camelia | rakudo-moar c2a57e: OUTPUT«1405006117752879898543142606244511569936384000000000» | ||
TimToady | so it's easy to write your own operators, like factorial there | ||
and you'll notice the precision doesn't max out at 32 or 64 bits | |||
decommute & | 02:28 | ||
skids | m: multi sub f ( $x where * > 5 ) { "LOTS".say }; multi sub f ($x where 1 < *) { $x.say }; f(6); f(4); f(0); # you can separate up those subs that do different things based on input, and also get good error messages for out-of-domain arguments | 02:32 | |
camelia | rakudo-moar c2a57e: OUTPUT«LOTS4Cannot call f(0); none of these signatures match: (Any $x where { ... }) (Any $x where { ... }) in block <unit> at /tmp/5vQilEsxZS:1» | ||
skids | gagalicious: you can use as much or as little type-checking as you want for you particular purpose | 02:33 | |
02:35
rmgk_ joined,
rmgk left,
rmgk_ is now known as rmgk
|
|||
gagalicious | i thought type check is supposed to speed up an app... but i heard perl6 is slower than perl5. is that right/ | 02:35 | |
i like perl5 coz there's no type checking in the first place... if only perl6 built in a type check optimizer.. that'll make it better. | 02:36 | ||
skids | gagalicious: Currently perl6 is slower than perl5 but faster mostly than perl5+Moose so it depends what features you need. P6 is much faster than it was a month ago and keeps getting faster. Some of that is because the type-checking optimizations are starting to get impleented. | 02:38 | |
02:38
noganex_ joined
|
|||
skids | gagalicious: one of the first things new P6 users notice is much better error messages that help you correct mistakes faster. | 02:40 | |
m: sub foobar { 1 }; fooobar(); | 02:41 | ||
camelia | rakudo-moar c2a57e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ZCULqCYlKQUndeclared routine: fooobar used at line 1. Did you mean 'foobar'?» | ||
02:41
noganex left,
kaare_ joined
02:42
vendethiel left
|
|||
skids | And you can use type checking to help you find errors before the code is actually run, if you like. | 02:44 | |
m: sub do_dangerous_thing( Int $x ) { say "DANGER!" }; do_dangerous_thing("foo"); | |||
camelia | rakudo-moar c2a57e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/C1YqEaP_OdCalling do_dangerous_thing(str) will never work with declared signature (Int $x)at /tmp/C1YqEaP_Od:1------> 3rous_thing( Int $x ) { say "DANGER!" }; 7⏏5do_dangerous_thing("foo");» | ||
tony-o_ | is that color stuff new? | 02:47 | |
skids | Not super-new, did you change terminals/irc clients? | 02:48 | |
02:49
flaviusb joined
02:51
xargs joined
03:14
kurahaupo left
03:16
bin_005 joined,
xargs left
|
|||
zostay | m: Buf.new(0x31 .. 0x34) ~~ /2/ | 03:26 | |
camelia | rakudo-moar c2a57e: OUTPUT«Cannot use a Buf as a string, but you called the Str method on it in block <unit> at /tmp/pM4HwHFEjs:1» | ||
03:28
skids left,
skids joined
03:37
spider-mario left
03:38
spider-mario joined
|
|||
zostay | m: Buf.new(0x31 .. 0x34).decode('ascii') ~~ /2/ | 03:43 | |
camelia | ( no output ) | ||
zostay | m: (Buf.new(0x31 .. 0x34).decode('ascii') ~~ /2/).perl.say | ||
camelia | rakudo-moar c2a57e: OUTPUT«Match.new(ast => Any, list => (), hash => EnumMap.new(), orig => "1234", to => 2, from => 1)» | ||
03:54
laouji left,
bin_005 left
03:56
laouji joined
04:40
kurahaupo1 joined
04:44
flaviusb left
04:54
kurahaupo1 left
05:01
atweiden left
05:07
Sqirrel joined
05:13
kst` joined
05:15
kst left,
kst` is now known as kst
05:16
_mg_ joined
05:22
jack_rabbit joined
05:29
jack_rabbit left
05:31
eiro joined
05:33
sebm3 left
05:36
telex left
05:38
telex joined
05:41
gfldex joined
05:46
Psyche^ joined
05:50
Patterner left
05:59
Ben_Goldberg joined
06:02
BenGoldberg left
06:10
diana_olhovik joined
06:17
_mg_ left
06:19
meis joined
06:23
_mg_ joined
|
|||
masak | morning, #perl6 | 06:23 | |
06:23
Ben_Goldberg left
06:26
domidumont joined
|
|||
itz | www.youtube.com/watch?v=T4sZYSiXSgI | 06:26 | |
hi | 06:27 | ||
06:28
aborazmeh joined,
aborazmeh left,
aborazmeh joined
06:29
flaviusb joined
|
|||
masak | m: my $n = 1e0; $n /= 2 for ^1075; say $n | 06:30 | |
camelia | rakudo-moar c2a57e: OUTPUT«0» | ||
masak | m: my $n = -1e0; $n /= 2 for ^1075; say $n | ||
camelia | rakudo-moar c2a57e: OUTPUT«-0» | ||
06:30
skids left
|
|||
masak | underflow. this is a good way to explain why -0e0 can be useful. | 06:30 | |
m: my $x = 0e0; my $y = 0e0; say -($x - $y); say $y - $x # cannot assume -($x - $y)can be optimized to $y - $x, because of -0e0 | 06:34 | ||
camelia | rakudo-moar c2a57e: OUTPUT«-00» | ||
masak | m: say sqrt -0e0 | 06:35 | |
camelia | rakudo-moar c2a57e: OUTPUT«-0» | ||
meis | hum, morning :) | 06:38 | |
06:38
brrt joined
|
|||
masak | \o | 06:38 | |
meis | do you guys know how to generate a .class for jvm from perl6 in rakudo? | ||
i'm feeling silly, but I can't figure out how to do it.. | |||
06:42
RabidGravy joined
|
|||
masak | m: say sign NaN | 06:42 | |
camelia | rakudo-moar c2a57e: OUTPUT«1» | ||
masak submits rakudobug | |||
things you find from playing around :P | |||
06:44
FROGGS joined,
zengargoyle left
06:53
Woodi joined
06:58
brrt left
07:04
zengargoyle joined
07:09
domidumont left
|
|||
FROGGS | meis: are you talking about a .class file? | 07:12 | |
meis | FROGGS: yes, sorry, a .class file | 07:14 | |
FROGGS | meis: perl6-j --target=jar --output=foo.jar foo.pm | ||
though, it's a .jar then :o) | |||
meis | oh | ||
a jart works nice for me | |||
:D | |||
thank you, I'll try later! | 07:15 | ||
FROGGS | meis: if you need more information about Java interop please look at the tests in rakudo/t/03-jvm or ask psch | ||
meis | I'll do, thanks for the tip | 07:16 | |
07:16
domidumont joined
|
|||
FROGGS | rjbs: s/so maybe of of those/so maybe one of those/ | 07:17 | |
[Tux] | Inline::Perl5 IO is now broken (it worked yesterday): | 07:18 | |
csv-ip5xsio Cannot invoke null object | |||
in method invoke at lib/Inline/Perl5.pm6:479 | |||
in method invoke at lib/Inline/Perl5.pm6:471 | |||
in block at lib/Inline/Perl5.pm6:753 | |||
07:18
AlexDaniel joined
|
|||
FROGGS | rjbs++ # very good post | 07:22 | |
07:23
brrt joined
07:24
aborazmeh left
|
|||
FROGGS | [Tux]: what exactly do you mean by IO? | 07:24 | |
[Tux] | pass an IO object to perl5 | ||
FROGGS | ahh | ||
07:24
Ven joined
07:26
dayangkun joined
07:28
salva joined
|
|||
RabidGravy | morning | 07:34 | |
Ven | \o | 07:35 | |
07:40
amurf left
|
|||
FROGGS | morning | 07:40 | |
07:42
zakharyas joined
|
|||
brrt | morning | 07:43 | |
dalek | ake: ed35790 | arnsholt++ | t/def.t: Add test exercising default arguments. |
||
ake: ff21ab1 | arnsholt++ | t/def.t: Improve slurpy args test a bit. |
|||
ake: c66b97e | arnsholt++ | / (3 files): Implement list comprehensions. |
|||
ake: 8c1f4cf | arnsholt++ | src/Snake/Grammar.nqp: Comments have zero or more characters after #, not one or more. |
|||
ake: 8d2ef71 | arnsholt++ | src/ (4 files): The great object model refactor. This should bring us a lot closer to the correct way of handling classes and objects than we previously had. I've mostly kept unrelated stuff (like named arguments for nqp::ops) in separate commits, but some unrelated things may have snuck in. |
|||
ake: 1c66c8f | arnsholt++ | src/Snake/ (2 files): Some comment cleanup. |
|||
07:49
darutoko joined
07:53
aborazmeh joined,
aborazmeh left,
aborazmeh joined
07:58
gfldex left
08:01
SevenWolf left
08:05
lizmat joined
08:11
lizmat left
08:12
lizmat joined
08:18
xinming_ left
08:20
cschwenz joined
08:21
Ven left
08:26
larion joined
|
|||
itz | CFT++ # perl6 hacking | 08:26 | |
08:26
rba_ left
08:27
spider-mario left
08:29
fhelmberger joined
|
|||
lizmat | good *, #perl6! | 08:33 | |
hmmm... see some serious breakage in S17 related tests after MoarVM upgrade | |||
was MoarVM ready to be upgraded for nqp / rakudo? | |||
nwc10 | lizmat: there's a bug in MoarVM HEAD to do with async stuff that jnthn is aware of but hasn't fixe yet | 08:34 | |
he was busy with something over the weekend, as I understand it. | |||
(have seen a picture) | |||
08:35
laouji left
|
|||
lizmat | :-) | 08:35 | |
yeah, I was aware of his whereabouts last weekend | |||
nwc10 | verified in person, as I understand it. | ||
lizmat | yes :-) | 08:36 | |
dalek | kudo/nom: d5d93ad | lizmat++ | src/core/Numeric.pm: Make sign(NaN) return NaN Fixes RT's #124813 and #125317 |
08:37 | |
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=124813 | ||
08:38
itz is now known as _itz,
rindolf joined,
itz2 joined,
itz2 is now known as itz
|
|||
dalek | ast: de33725 | lizmat++ | S32-num/sign.t: Unfudge now passing test |
08:39 | |
FROGGS | lizmat: eww, I did not know that MoarVM HEAD would cause breakage :o( | 08:41 | |
lizmat | yes, quite serious | ||
with hangs and zombies | |||
nwc10 | test early, test often? | 08:42 | |
08:42
xinming joined
08:44
espadrine joined
|
|||
moritz | you could always revert the faulty commit(s), and move them to a branch | 08:45 | |
dalek | p: d195a71 | FROGGS++ | tools/build/MOAR_REVISION: Revert "bump moar (win build fix and nativecall fix)" MoarVM HEAD introduces problems in S17... rolling back. This reverts commit 07a9dc105e682a14651551fa25e7af11d03faea8. |
||
kudo/nom: 5e72201 | FROGGS++ | tools/build/NQP_REVISION: require newer nqp that uses older MoarVM |
08:46 | ||
lizmat | pulling, building and testing | ||
08:50
Ven joined,
RabidGravy left
08:52
Alina-malina left
|
|||
lizmat | hmmm... looks like it needs a nuke of the install dir :-( | 08:54 | |
elevensies& | |||
08:58
bin_005 joined
|
|||
FROGGS | ohh yeah, nqp wont downgrade moar | 09:00 | |
09:00
cognominal joined
|
|||
FROGGS | deleting the moar executable would work too | 09:01 | |
(and then reconfigure and rebuild) | |||
09:01
bin_005 left
09:02
bin_005 joined
|
|||
moritz | .u カスタ | 09:02 | |
yoleaux | U+30AB KATAKANA LETTER KA [Lo] (カ) | ||
U+30B9 KATAKANA LETTER SU [Lo] (ス) | |||
U+30BF KATAKANA LETTER TA [Lo] (タ) | |||
09:02
Ven left
09:08
xinming left
09:09
xinming joined,
kurahaupo1 joined
09:12
rindolf left
|
|||
brrt | uhm, hey, anything terrifyingly wrong with moar that we should fix? | 09:17 | |
lizmat | yes :-) | ||
brrt | ok, what is | ||
anything to do with /me merging the throwops | 09:18 | ||
since when did all go wrong :-) | |||
lizmat | no, afaik it's half finished work of jnthn wrt not using 100% CPU in a thread for timer related functions | 09:19 | |
hmmm... nuking install dir didn't fix it :-( | |||
FROGGS | lizmat: what is your moar --version? | 09:20 | |
lizmat | nothing anymore, I just nuked nqp dir | 09:21 | |
FROGGS | k | ||
brrt | hmm ok. i can see how that is painful | ||
09:24
laouji joined,
kurahaupo1 left,
laouji left
09:25
laouji joined
09:26
kurahaupo1 joined
|
|||
lizmat | hmmm... still breakage ??? | 09:27 | |
09:28
Alina-malina joined,
amurf joined
|
|||
lizmat | $ install/bin/moar --version | 09:29 | |
This is MoarVM version 2015.05-8-g41b5dd2 built with JIT support | |||
FROGGS | that's correct | ||
lizmat | $ install/bin/nqp-m --version | 09:30 | |
This is nqp version 2015.05-4-gd195a71 built on MoarVM version 2015.05-8-g41b5dd2 | |||
FROGGS | yes, this is what you basically had yesterday | ||
except the nqp revision, which was 2015.05 | 09:31 | ||
but there is nothing in the nqp commits that could hurt | |||
ohh wait... | 09:32 | ||
maybe the offending patches were in moar 2015.05 .. 2015.05-8-g41b5dd2 ? | |||
09:32
amurf left
|
|||
lizmat | ah, yes, the problem was *not* caused by your changes | 09:33 | |
just by changes that came along with your bump, afaik | |||
FROGGS | excatly | ||
lizmat | so maybe we need to revert Moar to 2015.05 ? | ||
FROGGS | yes, I think so | ||
hold on | |||
lizmat | I think 58226af4aad0d365 in Moar is the problem, really | 09:34 | |
dalek | p: afc10c9 | FROGGS++ | tools/build/MOAR_REVISION: roll back to MoarVM 2015.05 |
||
kudo/nom: 317d054 | FROGGS++ | tools/build/NQP_REVISION: require newer nqp that uses older MoarVM |
09:35 | ||
FROGGS | lizmat: can yuo now pull, unlink your nqp-m, and reconfigure+rebuild? | 09:36 | |
lizmat | will do | ||
FROGGS | or nuke install if you prefer that | ||
lizmat | trying your way first :-) | ||
FROGGS | :o) | 09:37 | |
lizmat | $ install/bin/moar --version | ||
This is MoarVM version 2015.05-8-g41b5dd2 built with JIT support | |||
:-( | |||
FROGGS | :o( | 09:38 | |
I guess it wont reconfigure nqp this way... | |||
lizmat | I unlinked moar as well now | ||
trying again | |||
FROGGS | gladly it does not take 10+ minutes as it used to take when you had to build parrot | 09:39 | |
lizmat | $ install/bin/moar --version | ||
This is MoarVM version 2015.05 built with JIT support | |||
:-) | |||
FROGGS | ohh, good to know | 09:40 | |
brrt | i'm a bit sorry about this discussion since i had hoped the jit throw ops merge to get some more exposure | ||
possible suggestion | 09:41 | ||
lizmat | brrt: afaik, it's only 58226af4aad0d365 that is causing the problem | ||
FROGGS | we can also move that commit to a branch in MoarVM | 09:42 | |
lizmat | brrt: maybe reverting that for now, will allow us to move forward ? | ||
brrt | we revert said commit on master, cherry-pick it onto a separate branch, and continue tracking moar master with nqp and rakudo | ||
aye | |||
consider it done | |||
in five minutes, at least ;-) | |||
FROGGS | brrt++ | ||
this will also help others, since you cannot downgrade moarvm using MOAR_REVISION | 09:43 | ||
as it happily accepts newer moars | |||
09:44
aborazmeh left
|
|||
lizmat | spectest confirmed clean now | 09:44 | |
afk for a bit& | 09:45 | ||
brrt | tis done | ||
FROGGS | I'll update nqp and rakudo (again :o) | 09:46 | |
brrt | :-) | 09:47 | |
dalek | p: 4344303 | FROGGS++ | tools/build/MOAR_REVISION: bump moar for fixing async stability |
||
kudo/nom: d39fe1c | FROGGS++ | tools/build/NQP_REVISION: bump nqp/moar for fixing async stability |
|||
FROGGS | now this should solve problems for all the ppl out there | 09:48 | |
brrt hopes it does | |||
09:50
domidumont left
|
|||
jnthn | Note that the patch didn't actually cause problems, it fixed one problem that turned out to make a bunch of others less likely. | 09:53 | |
yoleaux | 00:19Z <TimToady> jnthn: I think it would be sanest if submethods do not compose like methods, but have some mechanism for getting themselves all called at the same time as the corresponding class submethod in either build-ish or destroy-ish order as pseudo-parents located between this class and its actuall parents | ||
jnthn | The things that showed up with it are all possible to produce without it. | 09:54 | |
brrt | yeah, that's very much true :-) | 09:55 | |
the 'problem' - for me at least - was hanging spectests, by the way | |||
09:56
salva left
|
|||
jnthn | Yes, agree it created a nuisance. | 09:57 | |
lizmat | jnthn o/ | ||
jnthn | I'll try and work on a real fix today | ||
lizmat | jnthn: I would suggest you take it easy for a bit more... | 09:58 | |
it's safely stashed away in a branch now :-) | |||
we've been living with 100% CPU on a thread for quite some time now, a little more wouldn't hurt | |||
fwiw, spectest confirmed clean on This is MoarVM version 2015.05-35-gc4c7ebd built with JIT support | 09:59 | ||
really afk for a bit now& | 10:00 | ||
brrt | spectest burns the top of this imac | 10:01 | |
:-) | |||
10:05
bin_005 left
10:06
Akagi201 left
10:08
Ven joined
10:13
aborazmeh joined,
aborazmeh left,
aborazmeh joined
10:15
rindolf joined
10:16
rarara joined
10:18
Emeric joined
|
|||
Emeric | Hello World ! | 10:20 | |
brrt | hi Emeric | ||
anything we can help you with :-) | 10:23 | ||
10:24
rba_ joined,
Emeric left
10:26
Emeric joined
|
|||
Emeric | Did you use Perl6 for web projects ? | 10:27 | |
DrForr | Not sure how much of perl6.org is done in perl6 yet :) | 10:28 | |
10:29
rindolf left
|
|||
brrt | web is kind of broad these days. it used to be 'CGI scripts', today it may mean 'i want something like rails' or 'i want something like flask/sinatra', or even 'something like php' | 10:30 | |
as far as i know, not a lot of people are using perl6 in any of these capacities yet | |||
moritz | {doc,modules}.perl6.org is statically generated pages, and generated by Perl 6 scripts | ||
brrt | what people are doing is creating static site generators using perl6 | ||
moritz | as is strangelyconsistent.org | ||
brrt points out that the first real 'blogging engine' (movable type) in widespread use would now be called a static site generator with a web interface | 10:31 | ||
anyway, lunch & | |||
10:31
brrt left
10:32
dayangkun left,
laouji left
|
|||
Emeric | Thanks for the answer | 10:32 | |
10:33
itz left
10:34
_mg_ left
10:38
itz joined
10:40
itz left
10:41
smls_ joined,
rindolf joined
10:42
itz joined
10:43
rba_ left
10:45
rba_ joined
|
|||
Emeric | Sorry, I've may questions... :S Did you often use the OOP with Perl 6 ? | 10:47 | |
DrForr | Using it right now as it happens. | ||
hahainternet | Emeric: can i ask why you're asking these questions? they seem like a survey question more than a practical one | ||
moritz | Emeric: Perl 6 is an OO language at its very core | ||
ever non-trivial piece of Perl 6 code that I write is OO | 10:48 | ||
DrForr | And no need to use the past tense, it's very much alive. | ||
10:48
laouji joined,
rindolf left
|
|||
Emeric | I'm just trying to inform me about what is done with Perl. And sorry, I'dont speak english very well... | 10:50 | |
DrForr | Plenty of stuff, though if you're looking for large-scale implementation and huge websites, look at perl5. | ||
Emeric | And I hope it's still alive ! | ||
DrForr | At least for the moment :) | 10:51 | |
hahainternet | Emeric: in my uninformed opinion, Perl 6 currently occupies roughly the niche that Perl 5 does, but it is slowly expanding to support every relatively high-level niche i know of | ||
DrForr | Incidentally the perl6 ANTLR -> Perl6 converter is almost done. | ||
hahainternet | DrForr: fancy, there's EBNF too isn't there | 10:52 | |
that blew my mind | |||
DrForr | EBNF, ABNF, C++, Java... | ||
hahainternet 's head explodes | |||
DrForr | It mostly won't run without tweaking because ANTLR4 and Perl6 aren't an exact match, but it'll handle most of the constructs. | 10:53 | |
hahainternet | oh? i don't know the difference, haven't had much p6 time and no ANTLR time | 10:54 | |
DrForr | ANTLR4 is closer to yacc in that it lets you do code that messes with the parsing stack inline. | 10:55 | |
smls_ | Is there a way to get the function object &foo from the string "foo" without EVAL? | ||
10:56
smls_ is now known as smls
|
|||
moritz | smls: &::('foo') | 10:56 | |
smls | oh, right. | ||
DrForr | But it'll work well enough that you can take an ANTLR C# grammar, convert it and get something that looks like perl6 without faffing about. | ||
smls | does it work with operators too? | ||
m: say &::("infix:<~>") | 10:57 | ||
camelia | rakudo-moar c2a57e: OUTPUT«sub infix:<~> (Any |) { #`(Sub+{<anon>}+{Precedence}|50302512) ... }» | ||
smls | neat | ||
11:04
rarara left
|
|||
smls | is .WHY supposed to say something for built-ins? | 11:05 | |
m: say &say.WHY | |||
camelia | rakudo-moar c2a57e: OUTPUT«(Any)» | ||
moritz | smls: it would be neat the pod from doc.perl6.org could be made available from the setting somehow | 11:07 | |
smls: though including it in the source text of the setting is a no-go | |||
11:08
domidumont joined
11:09
g4 joined,
g4 left,
g4 joined
|
|||
rjbs | FROGGS: glad you liked it :) | 11:21 | |
FROGGS | rjbs: yes, please keep posting here when you blog | ||
rjbs | Well, that post is five years old. I better start posing the rest of my backlog... :-) | 11:23 | |
FROGGS | it ... is? | 11:24 | |
wow | |||
rjbs | FROGGS: the follow-up was rjbs.manxome.org/rubric/entry/1865 | 11:29 | |
FROGGS | thanks | 11:30 | |
11:32
aborazmeh left
11:35
yqt joined
|
|||
timotimo | o/ | 11:36 | |
Ven | \o timotimo | 11:37 | |
timotimo | FROGGS: the dresden.pm video recording of your talk ... the audio recording is ... ... | ||
11:39
domidumont left
11:40
smls_ joined
|
|||
AlexDaniel | is it possible to define a subroutine that will be visible from the outside? Like: if True { sub Test { say 'hello' } }; Test(); | 11:40 | |
11:40
smls left
|
|||
dalek | ake: 71b4bd1 | arnsholt++ | src/Snake/Metamodel/ClassHOW.nqp: Better stringification logic. |
11:40 | |
ake: a729dc1 | arnsholt++ | src/setting/builtins.py: Set correct type cache on `type` object. |
|||
ake: d8f82f8 | arnsholt++ | src/setting/builtins.py: Fix braino in MRO passed to ClassHOW.new_type from type(). |
|||
11:40
_mg_ joined
|
|||
moritz | AlexDaniel: sub Test is export { ... } | 11:40 | |
oh wait, then you still have to import it | 11:41 | ||
11:41
domidumont joined
|
|||
moritz | AlexDaniel: my &Test; if True { &Test := anon sub Test { say 'hello' } } | 11:41 | |
the "anon sub Test" construct is a subroutine that isn't automatically installed in the surrounding lexical scope ("anon"), but still knows its own name when introspected | 11:42 | ||
AlexDaniel | m: my &Test; if True { &Test := anon sub Test { say 'hello' } } | 11:43 | |
camelia | rakudo-moar c2a57e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/H3OlSeCCKeCannot use bind operator with this left-hand sideat /tmp/H3OlSeCCKe:1------> 3 &Test := anon sub Test { say 'hello' } 7⏏5}» | ||
AlexDaniel | moritz: how can I solve that error? | 11:44 | |
I don't really get it | |||
11:44
domidumont left
11:45
domidumont joined
|
|||
moritz | hm | 11:46 | |
m: my &Test; if True { &Test = anon sub Test { say 'hello' } } | |||
camelia | ( no output ) | ||
moritz | m: my &Test; if True { &Test = anon sub Test { say 'hello' } }; Test() | ||
camelia | rakudo-moar c2a57e: OUTPUT«hello» | ||
moritz | AlexDaniel: ok, use assignment instead | ||
though the error looks a bit fishy to me. Why shouldn't you be able to bind here? | |||
(if there's no extra container level, it should be assignment that's forbidden, not binding) | 11:47 | ||
AlexDaniel | moritz: well, if you think that it's an error than you should probably report it yourself, I don't think that I can phrase what is going on here :) | 11:48 | |
moritz | AlexDaniel: I probably should | ||
AlexDaniel | this is fun, but it does not satisfy my original crazy intent. I'm trying to change the grammar in run-time (have no idea if that is even possible), depending on something that is not available in compile-time. I have no useful intent but I'm just trying to see what is possible, so I took a simple example of sub postfix:<!> { [*] 1..$^n }; and tried placing it into some block after "if", but it seems like it is lexically scoped so it | 11:54 | |
does not really do what I want it to do. That anon thing, obviously, is not going to work, as far as I can see. Any ideas? | |||
11:55
Ven left,
][Sno][ joined
|
|||
FROGGS | timotimo: do you have a link? | 11:56 | |
11:56
[Sno] left
|
|||
AlexDaniel | I'm looking here, for example; github.com/tony-o/perl6-slang-sql/...g/SQL.pm6, but I wonder if there is any simpler example | 11:57 | |
FROGGS | timotimo: nvm, found it | ||
11:58
itz left
|
|||
FROGGS | bbl | 11:59 | |
12:00
FROGGS left
|
|||
moritz | AlexDaniel: you could try something like: module Foo { multi infix:<!>($x) { [*] 1..$x } }; BEGIN import Foo if True; | 12:01 | |
be careful not to introduce a new scope, of course :-) | |||
12:04
Emeric left
12:06
xfix joined,
xfix left,
xfix joined
|
|||
dalek | kudo-star-daily: 14b6f06 | coke++ | log/ (2 files): today (automated commit) |
12:19 | |
AlexDaniel | moritz: does not really work, hm | 12:20 | |
m: module Foo { sub postfix:<!> { [*] 1..$^n }; }; BEGIN import Foo; say 5!; | |||
camelia | rakudo-moar c2a57e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/s7c_T4CbPUNegation metaoperator not followed by valid infixat /tmp/s7c_T4CbPU:1------> 3*] 1..$^n }; }; BEGIN import Foo; say 5!7⏏5; expecting any of: infix infix stoppe…» | ||
dalek | kudo/nom: 0f627ce | lizmat++ | lib/Test.pm: Fix #125319 |
12:27 | |
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=125319 | ||
[Coke] | good morning, everyone. | 12:32 | |
lizmat | [Coke] o/ | 12:37 | |
12:39
rindolf joined
|
|||
dalek | kudo/nom: 276964e | lizmat++ | docs/ChangeLog: Add some more entries |
12:49 | |
12:50
xfix left
|
|||
jnthn | import is already BEGIN time | 12:50 | |
But the sub needs marking "is export" for it to work | |||
12:52
laouji left
|
|||
lizmat | Looking at making start { } take a blorst, but failing: gist.github.com/lizmat/3ad7ce1f0174013ec2eb | 12:53 | |
I guess I'm being too KISS :-) suggestions anyone? | |||
12:56
yqt left
|
|||
jnthn | lizmat: Got 15 mins more of errands to do, then I can take a look. But I was going to do it by calling Promise.start and getting rid of the start function entirely | 12:58 | |
lizmat | that was my plan also | ||
I just called it START in the interim, so I could compare start and START :-) | |||
hoelzro | morning #perl6 | 13:04 | |
13:06
amurf joined
|
|||
AlexDaniel | m: module Foo { sub postfix:<!> is export { [*] 1..$^n } }; BEGIN import Foo if True; say 5!; | 13:06 | |
camelia | rakudo-moar c2a57e: OUTPUT«120» | ||
AlexDaniel | m: module Foo { sub postfix:<!> is export { [*] 1..$^n } }; BEGIN import Foo if False; say 5!; | ||
camelia | rakudo-moar c2a57e: OUTPUT«120» | ||
AlexDaniel | module Foo { sub postfix:<!> is export { [*] 1..$^n } }; import Foo if True; say 5!; | ||
umm | 13:07 | ||
ah | |||
m: module Foo { sub postfix:<!> is export { [*] 1..$^n } }; import Foo if True; say 5!; | |||
camelia | rakudo-moar c2a57e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/4bBna1C9CsMissing semicolonat /tmp/4bBna1C9Cs:1------> 3 export { [*] 1..$^n } }; import Foo if 7⏏5True; say 5!;» | ||
smls_ | Is there an equivalent of &::($sub-name) for classes and roles? | 13:08 | |
i.e. look up a type from a string holding its name | |||
dalek | pan style="color: #395be5">perl6-examples: 0c93c1a | paultcochrane++ | t/categories/cookbook/ (2 files): [cookbook] remove temporary files created from scripts Some scripts generate temporary files that shouldn't be cleaned up in the script themselves (it wouldn't make sense in the context of the example). Nevertheless, this leaves temporary files lying around on the filesystem after running the test suite, thus the tests now clean these files up. |
13:09 | |
pan style="color: #395be5">perl6-examples: 713281b | paultcochrane++ | categories/euler/prob032-andreoss.pl: Purge trailing whitespace |
|||
timotimo | m: ::('Hash').new.say | ||
camelia | rakudo-moar c2a57e: OUTPUT«» |