»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋 Set by Zoffix on 25 July 2018. |
|||
00:29
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
discord6 | <Rogue> I'm getting a very strange error when trying to initialize a class | 00:30 | |
<Rogue> I have something like class Pixel { has ($.x, $.y) is required; has ($.r, $.g, $.b) is required; } | 00:31 | ||
<Rogue> when I try to initialize it like Pixel.new(:0x, :0y, :0r, :0g, :0b); is says $!r is required but I did not provide a value | 00:32 | ||
<Rogue> Ah, it compiles when there is no type constraint on $!, $!g, and $!b | 00:33 | ||
<Rogue> $!r * | 00:34 | ||
<Rogue> Why would uint8 not work there? | |||
<Rogue> Looks like github.com/perl6/nqp/issues/446 is the same issue, but I'm on Moar, not JVM | 00:36 | ||
01:00
nadim_ left
01:15
farcas82regreg joined
01:39
noisegul_ joined
01:40
dustinm` joined
|
|||
holyghost | I'm going to do an example using Boltzmann-Hawking Models for Game::Bayes | 02:29 | |
the meaning is to approximate the Boltzmann function using Hawking temperature with conditional probabilities and Bayesian Statistics | 02:30 | ||
or vv. | 02:32 | ||
02:36
aborazmeh left
|
|||
holyghost | Boltzmann-Hawking models, I invented myself, the approximations are functions on the net | 02:37 | |
02:51
cpan-p6 left
|
|||
holyghost | One could also use Gaussian Support Vector Machine functionaility | 02:52 | |
The Boltzman function can be used to predict a gambling machine, so can the Bayesian Statistics in Game::Bayes | 02:56 | ||
The temperature T = 10 is a good run for the Boltzmann function | 02:57 | ||
Using Hawking temp, you gain more energy or entropy | |||
The prediction is what it's somewhat about in decision theory. Hence Game::Bayes | 02:58 | ||
02:58
cpan-p6 joined,
cpan-p6 left,
cpan-p6 joined
03:24
perlbot joined
03:25
simcop2387 joined
03:55
aindilis joined
04:14
Xliff joined
|
|||
holyghost | hi Xliff | 04:18 | |
Xliff | \o | 04:23 | |
lizmat: gist.github.com/Xliff/c6db1e84e9ff...8d60921233 | |||
holyghost | Xliff, I'm going to refactor pagan somewhat (the game gfx system I'm writing) then after that I send you a mail for debugging the gfx backend | 04:45 | |
_If_ you find some time | |||
m: my $l = <0,1,2,3>; if 0..^$l.elems.rand; | 04:48 | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Missing block at <tmp>:1 ------> 3my $l = <0,1,2,3>; if 0..^$l.elems.rand7⏏5; expecting any of: block or pointy block |
||
holyghost | ^^ I guess this is not a bug ? | ||
m: my $l = <0,1,2,3>; 1 if 0..^$l.elems.rand; | 04:50 | ||
camelia | WARNINGS for <tmp>: Useless use of constant integer 1 in sink context (line 1) |
||
holyghost | etc | ||
elems vs. | 04:51 | ||
Xliff | m: my $l; $l = <0,1,2,3>; 1 if 0..^$l.elems.rand; say $l; | ||
camelia | WARNINGS for <tmp>: 0,1,2,3 Useless use of constant integer 1 in sink context (line 1) |
||
Xliff | m: my $l; $l = <0,1,2,3> if 0..^$l.elems.rand; say $l; | ||
camelia | 0,1,2,3 | ||
Xliff | m: my $l; $l = <0,1,2,3> if 0..^$l.elems.rand; say $l; | ||
camelia | 0,1,2,3 | ||
Xliff | m: my $l; $l = <0,1,2,3> if 0..^$l.elems.rand; say $l; | 04:52 | |
camelia | 0,1,2,3 | ||
Xliff | m: my $l; $l = <0,1,2,3> if 0..^$l.elems.rand; say $l; | ||
camelia | 0,1,2,3 | ||
Xliff | m: my $l; $l = <0,1,2,3> if 0..^$l.elems.rand; say $l; | ||
camelia | 0,1,2,3 | ||
Xliff | m: my $l; $l = <0,1,2,3> if 0..^$l.elems.rand; say $l; | ||
camelia | 0,1,2,3 | ||
Xliff | m: my $l; $l = <0,1,2,3> if 0...^$l.elems.rand; say $l; | ||
camelia | 0,1,2,3 | ||
Xliff | m: my $l; $l = <0,1,2,3> if 0...^$l.elems.rand; say $l; | ||
camelia | 0,1,2,3 | ||
Xliff | m: my $l; $l = <0,1,2,3> if 0...^$l.elems.rand; say $l; | ||
camelia | 0,1,2,3 | ||
Xliff | m: my $l; $l = <0,1,2,3> if 0...^$l.elems.rand; say $l; | ||
camelia | 0,1,2,3 | ||
Xliff | Gnolly, what are you trying to do, there? | ||
I thought I could figure it out, but now that I think about it... it doesn't make sense. | 04:53 | ||
holyghost | Xliff, I guess it's abit ambiguous | ||
Xliff | You absolutely do NOT want to make a my declaration conditional. | ||
Not unless you are doing something really strange. And if that's the case, the my declaration should be in its own scope. | 04:54 | ||
So... | |||
holyghost | It's from for (my $i = 0; $i < $l.elems.rand; $i++) { ... } | ||
Xliff | if $condition { my $var ... } | ||
OK. | |||
holyghost | using $i < $l.elems.rand | ||
Xliff | So. | ||
holyghost | I mean $i < 0..^$l.elems.rand | ||
Xliff | for ^$l.elems.pick { | 04:55 | |
Or... | |||
for ^($l.elems).pick { | |||
holyghost | ok I see, thanks | ||
still the syntax does not work or might mention pick | |||
Xliff | my $l = <0 1 2 3>; say (^$l.elems).pick | ||
evalable6 | 3 | ||
Xliff | my $l = <0 1 2 3>; say (^$l.elems).pick | ||
evalable6 | 1 | ||
Xliff | my $l = <0 1 2 3>; say (^$l.elems).pick | ||
evalable6 | 2 | ||
Xliff | Yes. Pick is a member of List and Range | 04:56 | |
docs.perl6.org/routine/pick | |||
holyghost | The meaning is not to pick but stop the for loop randomly | 05:02 | |
with or without $i++ in the for loop | |||
so just $i < $l.elems.rand then | |||
Xliff | NO | 05:04 | |
Gnolly, it's the SAME THING. | 05:05 | ||
.pick selects a random number out of the Array. | |||
yoleaux | Xliff: You must provide at least two options. | ||
Xliff | .pick selects a random number out of the Array. | ||
holyghost | ok, Xliff++ | 05:06 | |
Xliff | my @l = |('a'...'z'), |('A'...'Z');say @l.pick xx 10 | 05:07 | |
evalable6 | (j N X p s D C J i n) | ||
Xliff | my @l = |('a'...'z'), |('A'...'Z'); say (@l.pick xx 10).join | ||
evalable6 | GkWxtHVWpi | ||
Xliff | ^^ Easy random string value. | 05:08 | |
holyghost | coolness | ||
05:18
evalable6 joined
05:25
xi| joined
05:28
masak left,
eseyman joined,
tinita joined
|
|||
moritz | m: my @l = |('a'...'z'), |('A'...'Z'); say @l.pick(10).join | 05:28 | |
camelia | AatRpPrlVk | ||
05:33
masak joined,
masak is now known as Guest69029,
epony joined
05:34
jmerelo joined
|
|||
jmerelo | releasable6: status | 05:38 | |
releasable6 | jmerelo, Next release in ≈1 day and ≈13 hours. 3 blockers. 257 out of 628 commits logged (⚠ 3 warnings) | ||
jmerelo, Details: gist.github.com/327f5bed0e3aae8bdb...7f73fb3557 | |||
holyghost | jmerelo, Game::Bayes is progressing, needs to compile still, though the applications for it are great :-) | 05:40 | |
I'm totally cool about the features | 05:41 | ||
05:41
sauvin joined
|
|||
holyghost | I have several Loss functions for decision theory, about 3 Bayesian | 05:42 | |
I'm developing the examples as the test directory grows | |||
It's basically taking risks in games, Bayesian Learning, Bayesian Inference and loss functionality for that | 05:44 | ||
05:48
Cabanossi left
05:58
Cabanossi joined
|
|||
holyghost | ok, I'm a bit AFK, I worked this night | 06:00 | |
m: "123" flip | 06:02 | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Two terms in a row at <tmp>:1 ------> 3"123"7⏏5 flip expecting any of: infix infix stopper statement end statement modifier statement mo… |
||
holyghost | m: 123 flip | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Two terms in a row at <tmp>:1 ------> 031237⏏5 flip expecting any of: infix infix stopper statement end statement modifier statement mod… |
||
holyghost | I would need a procedure that flips an Int ... ? | ||
so 123 becomes 321 | |||
ZzZombo | m: '123'.flip.say | ||
camelia | 321 | ||
holyghost | thanks | ||
ZzZombo | m: 123.flip.say | ||
camelia | 321 | ||
holyghost | It's for bringing approximations of probabilities between [0,1] | 06:03 | |
1000,1347589560 flip twice for a % 100 percent | |||
I'll make it a perl6 script in the examples | 06:04 | ||
thanks ZzZombo | |||
ZzZombo | So, in the meanwhile, was there anything released for making games, even simple 2D ones, in P6? | ||
NP! | 06:05 | ||
holyghost | I'm working on github.com/theholyghost2/pagan which is Cairo/SDL/SDL2 backends for games, see my TODO.txt there | ||
I mean, I have to debug the gfx backend, move to other game backendsd later on | |||
It needs to be refactored though due to several gfx options | 06:06 | ||
Maybe later on, me and Xliff will do EGL and GLX interfaces | |||
Xliff | Zzombo: Gnome's Clutter can be used for games. | 06:08 | |
See github.com/Xliff/p6-Clutter | |||
It's an interface library. | |||
06:16
adu left
06:17
ravenousmoose joined
06:22
domidumont joined
06:30
jmerelo left
06:35
nadim joined
06:49
reach_satori joined
06:51
yyo joined,
yyo left
07:04
nadim left
07:09
patrickb joined
07:18
discord61 joined,
discord61 left,
discord61 joined
|
|||
lizmat | Files=1275, Tests=108113, 209 wallclock secs (26.93 usr 7.33 sys + 2904.65 cusr 282.01 csys = 3220.92 CPU) | 07:20 | |
07:21
cpan-p6 left,
discord61 left
07:26
discord6 joined
07:27
synopsebot_ joined,
tyilanmenyn joined
07:28
discord62 joined
07:29
discord62 left
07:34
cpan-p6 joined,
cpan-p6 left,
cpan-p6 joined,
Geth joined
|
|||
cpan-p6 | New module released to CPAN! App::MoarVM::ConfprogCompiler (0.0.3) by 03TIMOTIMO | 07:35 | |
lizmat | .tell Xliff commented on your gist: gist.github.com/Xliff/c6db1e84e9ff...8d60921233 | 07:37 | |
yoleaux | lizmat: I'll pass your message to Xliff. | ||
Xliff | lizmat: But the point is to have a separate task watching the memory, not the task itself. | 07:38 | |
yoleaux | 07:37Z <lizmat> Xliff: commented on your gist: gist.github.com/Xliff/c6db1e84e9ff...8d60921233 | ||
Xliff | More to the point, I thought it was a great example of a Perl6 one-liner that could be converted to a quick-n-dirty script. | 07:40 | |
Your point is well taken, but a bit off the mark from my intent. | |||
lizmat | you could make it into a module, like snapper | ||
which you could load externally | 07:41 | ||
Xliff | I could. That wasn't the point of the gist, though. :) | ||
lizmat | ok, sorry if I didn't get it :-) | ||
Xliff | Was just something I thought might be nice for the weekly. | ||
I was thinking about making an addendum of getting it to work on Windows. Needless to say, the Windows version would be a lot less cleaner. | 07:42 | ||
lizmat: Replies to your comments. TIA for the discussion! :) | 07:49 | ||
07:50
dolmen joined
07:57
rindolf joined
08:13
nadim joined
08:14
xxoo joined
08:16
aborazmeh joined,
aborazmeh left,
aborazmeh joined
08:28
ravenousmoose left
08:30
ravenousmoose joined
08:36
dominix joined
08:40
dakkar joined
08:44
pecastro joined
08:50
missy joined,
missy is now known as Guest24278
08:54
Guest24278 left
09:13
dominix left
09:14
ChoHag left
09:29
xxoo left
09:30
kensanata joined
09:38
aborazmeh left
09:41
sena_kun joined
|
|||
nine | .tell pmurias In general we hold the top level script/program or even it's caller responsible for setting up the required repository chain. A "use lib" in a script doesn't hurt. | 09:54 | |
yoleaux | nine: I'll pass your message to pmurias. | ||
09:59
reach_satori left
10:06
scimon joined
10:12
domidumont left
10:13
ravenousmoose left
|
|||
Geth | ¦ problem-solving: AlexDaniel assigned to jnthn Issue %0 and &0 should probably be syntax errors github.com/perl6/problem-solving/issues/44 | 10:28 | |
10:35
aborazmeh joined,
aborazmeh left,
aborazmeh joined
10:42
kensanata left
|
|||
scimon | www.khanate.co.uk/blog/2019/06/19/p...llenge-13/ : Wroted a thing. | 10:47 | |
10:52
xinming joined
|
|||
sena_kun | .weekly www.khanate.co.uk/blog/2019/06/19/p...llenge-13/ | 10:55 | |
hmm... | |||
.note www.khanate.co.uk/blog/2019/06/19/p...llenge-13/ | |||
hmmmmm... | |||
weekly: www.khanate.co.uk/blog/2019/06/19/p...llenge-13/ | 10:57 | ||
notable6 | sena_kun, Noted! | ||
11:02
aborazmeh left
11:06
AlexDaniel left
|
|||
Xliff | o/ | 11:08 | |
xinming | releasable6: status | 11:10 | |
11:10
dolmen left
|
|||
releasable6 | xinming, Next release in ≈1 day and ≈7 hours. 3 blockers. 257 out of 628 commits logged (⚠ 3 warnings) | 11:10 | |
xinming, Details: gist.github.com/d6ffa13953c4a55862...1933f479f5 | |||
11:28
lasse joined
11:33
gfldex joined
|
|||
Geth | ¦ problem-solving: AlexDaniel self-assigned Ecosystem issues and a corresponding dev github.com/perl6/problem-solving/issues/45 | 11:37 | |
11:38
veesh joined
11:41
dolmen joined
11:47
veesh left
11:51
veesh joined
12:09
vrurg left
12:10
ravenousmoose joined
12:13
[particle]1 left
12:19
[particle]1 joined
12:35
xinming_ joined
12:36
ravenousmoose_ joined
12:37
xinming left
12:38
ravenousmoose left
12:45
vrurg joined
12:47
AlexDaniel joined
12:53
reach_satori joined
12:55
xinming_ left
12:56
xinming_ joined
12:58
ravenousmoose_ left
|
|||
cpan-p6 | New module released to CPAN! Term::TablePrint (1.4.9) by 03KUERBIS | 13:08 | |
13:10
robinsmidsrod joined
|
|||
Xliff | Can you do a BEGIN block in a class definition? | 13:20 | |
m: class A { BEGIN say ::CLASS.^name }; A.new | |||
camelia | 5===SORRY!5=== Error while compiling <tmp> No such symbol 'CLASS' at <tmp>:1 ------> 3class A { BEGIN say ::CLASS7⏏5.^name }; A.new |
||
Xliff | m: class A { BEGIN say ::?CLASS.^name }; A.new | ||
camelia | A | ||
13:27
[particle]2 joined
13:29
[particle]1 left
13:31
dakkar left
13:32
dakkar joined
|
|||
Xliff | m: class A { BEGIN say $*CLASS.^name }; A.new | 13:34 | |
camelia | Failure | ||
Xliff | m: class A { BEGIN say $?CLASS.^name }; A.new | ||
camelia | A | ||
13:36
discord6 left,
discord6 joined
|
|||
Xliff | m: class A { BEGIN say ::?CLASS.WHAT.^name }; A.new | 13:36 | |
camelia | A | ||
Xliff | What's the best way to refer to a class if it is the only thing defined in a compunit? | 13:40 | |
timotimo | refer to? from what context? | 13:43 | |
is there something like UNIT:: perhaps? | |||
Xliff | Well, I think I did it. | ||
Let me test and commit so I can show you. | |||
13:46
debprav joined,
veesh left
|
|||
Xliff | timotimo: github.com/Xliff/p6-Amazon-AWS-EC2...ribute.pm6 | 13:48 | |
Note the BEGIN block at the bottom. | |||
I'm trying to make it so that BEGIN block can be applied to all Action classes without change. | 13:49 | ||
Even if it means using the unusual class declaration at the top. | |||
Is there a better way to accomplish this? | |||
timotimo | maybe an EXPORTHOW could be of use here | 13:50 | |
13:51
veesh joined
|
|||
Xliff | It looks like that constant hack does the job, though. | 13:51 | |
timotimo | if you're guaranteed to have a BUILD submethod, you can search for a class in ::.values or whatever that has a code location of "current filename" for its BUILD submethod :) :) | 13:53 | |
Xliff | Wouldn't that be $?FILE? | 13:54 | |
Er... $?FILE <interrogative> | |||
timotimo: That's a thought, but wouldn't that be more of a hack than using myclass? :) | 13:55 | ||
timotimo | possibly | 13:56 | |
13:56
vrurg left
|
|||
timotimo | but maybe it'd let you only put something at the end, not have to put something at the front as well | 13:56 | |
Xliff | Good point. But for now, myclass is easier to understand. ;) | ||
timotimo | sure | 13:57 | |
AFKBBL | |||
13:59
[particle]1 joined
14:00
[particle]2 left
|
|||
Xliff | BBLAFKBLT | 14:00 | |
14:01
jeromelanteri joined,
sena_kun left
14:06
[particle]2 joined
14:07
[particle]1 left
14:10
lucasb joined
14:11
aindilis left
14:13
MilkmanDan joined
14:19
MilkmanDan left
14:20
lasse left,
vrurg joined
14:21
MilkmanDan joined
14:23
kent\n joined
14:31
majensen joined
14:41
MilkmanDan left
14:43
MilkmanDan joined
14:48
Cabanossi left
14:53
Cabanossi joined
14:55
MilkmanDan left
14:57
MilkmanDan joined
15:00
majensen left
15:08
ravenousmoose_ joined
15:12
vrurg left
15:16
discord6 left,
discord6 joined
15:17
Black_Ribbon left
15:20
MilkmanDan left
15:22
MilkmanDan joined
15:26
nadim left
15:27
discord6 left
15:28
discord6 joined,
discord6 left,
discord6 joined
15:29
MilkmanDan left
15:30
MilkmanDan joined,
reach_satori left
15:31
patrickb left
15:39
nadim joined
15:40
jeromelanteri left
15:54
vrurg joined
16:01
molaf joined
16:03
discord6 left,
discord6 joined
16:09
nadim_ joined
16:10
nadim left
16:11
vrurg left
16:17
debprav left
|
|||
timotimo | more opportunities for hilarious results: python's "strip" method takes a string that it interprets as a list of characters. any series of only those characters are removed from the start and end | 16:18 | |
except of course python doesn't get characters right | |||
so if you put in aeioü (and the ü is in NFD) then it will remove aeiou as well as all of those with diaeresis on top | |||
16:18
antoniogamiz joined
16:20
nadim_ left,
veesh left
16:23
veesh joined
16:25
jmerelo joined
|
|||
jmerelo | squashable6: status | 16:28 | |
squashable6 | jmerelo, Next SQUASHathon in 15 days and ≈11 hours (2019-07-06 UTC-14⌁UTC+20). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day | ||
jmerelo | releasable6: status | ||
releasable6 | jmerelo, Next release in ≈1 day and ≈2 hours. 5 blockers. 257 out of 629 commits logged (⚠ 3 warnings) | ||
jmerelo, Details: gist.github.com/d7c0c2dd6980e0f233...615237274d | |||
16:30
scimon left
16:32
nadim_ joined
16:35
reach_satori joined
16:38
dakkar left
16:42
discord6 left,
discord6 joined,
discord6 left,
discord6 joined
|
|||
timotimo | oh? repl.it has a "multiplayer" mode? has anybody given that a try? | 16:44 | |
oh, no perl6 in there | 16:45 | ||
i could have sworn... | |||
16:55
MilkmanDan left
16:56
MilkmanDan joined
17:01
MilkmanDan left
17:02
MilkmanDan joined
17:06
antoniogamiz left
17:10
lucasb left
17:18
mowcat joined
17:20
discord6 left,
MilkmanDan left,
discord6 joined
17:22
MilkmanDan joined,
tyilanmenyn is now known as tyil
17:25
rindolf left,
ChoHag joined
17:31
kylese joined
17:34
rindolf joined
17:35
fvox joined
17:42
MilkmanDan left
17:43
cwilson joined
17:44
MilkmanDan joined,
vrurg joined
17:48
dolmen left,
kent\n left
17:49
dolmen joined
17:56
kent\n joined
18:03
dolmen left
18:14
adu joined,
AlexDaniel left
18:15
AlexDaniel joined
18:25
sauvin left
18:33
vrurg left
|
|||
jmerelo | Anyone at #TPCiP? | 18:42 | |
18:48
vrurg joined,
|oLa| joined
18:53
HarmtH joined
18:56
|oLa| left
19:00
jmerelo left
19:01
aindilis joined,
|oLa| joined
19:15
vrurg left
19:17
Manifest0 joined
19:24
Manifest0 left,
cpan-p6 left
19:25
vrurg joined
19:27
cpan-p6 joined,
cpan-p6 left,
cpan-p6 joined
19:31
Manifest0 joined
19:37
Manifest0 left
|
|||
cpan-p6 | New module released to CPAN! ProcStats (0.1.0) by 03LEMBARK | 19:40 | |
ugexe | if only we had that built in | 19:41 | |
oh wait | |||
19:44
|oLa| left,
Manifest0 joined
|
|||
timotimo | it's not quite the same as Telemetry | 19:48 | |
19:49
mowcat left
|
|||
ugexe | just use the nqp::getrusage directly like the module does | 19:49 | |
19:50
dha joined
|
|||
timotimo | nqp::getrusage doesn't give you the labels for free, and doesn't handle the first four entries really being 2 entries | 19:51 | |
ugexe | maybe it should have a better api then instead of having an api tailored to just telemtry | 19:54 | |
timotimo | it has ProcStats now | 19:57 | |
20:01
antoniogamiz joined,
noisegul_ left
20:34
antoniogamiz left
20:35
fvox left
20:41
fvox joined
20:50
dolmen joined
20:55
Manifest0 left
|
|||
cpan-p6 | New module released to CPAN! ProcStats (0.1.1) by 03LEMBARK | 20:57 | |
20:58
dha left
21:00
Manifest0 joined
|
|||
ugexe | sure, but thats now how any other api is treated | 21:02 | |
s/now/not/ | |||
21:03
vrurg left
21:20
Sgeo joined
21:32
Manifest0 left
|
|||
lizmat | weekly: dev.to/antoniogamiz/gsoc-2019-1k1h | 21:36 | |
notable6 | lizmat, Noted! | ||
21:38
Manifest0 joined
21:40
vrurg joined
21:48
Cabanossi left
21:55
Manifest0 left
21:56
Cabanossi joined
21:58
perryprog joined
|
|||
perryprog | Hello hello! | 21:58 | |
timotimo | greet greet | 22:00 | |
22:01
Manifest0 joined
22:10
Manifest0 left
|
|||
guifa | is there any way to get [X+] to NOT act upon receiving a single list? | 22:11 | |
e.g. | |||
[X+] (1,2,3) xx $foo | |||
22:12
vrurg left
|
|||
guifa | Things are peachy for $foo > 1; but $foo == 1 just sums 1,2,3 | 22:12 | |
MasterDuke | guifa: that's a known "thing". pretty sure there's a rakudo or problem-solving issue about it | ||
guifa | Ah, is it considered a bug? | 22:13 | |
guifa is asking for code golf :-) | |||
MasterDuke | github.com/rakudo/rakudo/issues/2025 i think | 22:14 | |
22:15
Manifest0 joined
22:28
Manifest0 left
22:29
vrurg joined
22:33
Manifest0 joined
|
|||
timotimo | perryprog: what can we do for you today? :) | 22:34 | |
perryprog | Just saying hi :). I'm slowly stepping into the ocean of perl6 since it seems really nice for miscellaneous tasks. | 22:35 | |
Currently I've just been reading various entries from rosettacode.org/wiki/Category:Perl_6 | 22:36 | ||
timotimo | cool | 22:38 | |
i'm pretty proud of the "galton board" one i made :) :) | |||
perryprog | Yeah I've heard great things about the author of that one. | 22:39 | |
;) | |||
22:42
adu left
|
|||
guifa | MasterDuke: codegolf.stackexchange.com/a/187124/30284 | 22:47 | |
Something makes me happy being able to do a brute force that still beats everyone who is doing fancy formulae fro compressed values and everything — and beating a lot of the golf specific languages too | |||
22:53
dolmen left
22:54
Manifest0 left
22:59
Manifest0 joined
23:03
Manifest0 left
23:10
Manifest0 joined
|
|||
timotimo | perryprog: oh, that's a nice thing to say :) | 23:16 | |
TreyHarris | This feels like an FAQ, but I don't see it documented in any of the 5to6 docs... In Perl 5, a pretty common usage pattern for *nix systems programming was to write a program with an infinite loop, using "head" or closing the pipe on input. I can't figure out how to do this in Perl 6 without getting a nasty multiline backtrace starting with "Broken pipe". I tried catching SIGPIPE, and I can, but even if I exit | 23:19 | |
0 in the handler I still get the backtrace | |||
*s/using "head"/breaking tho look using "head"/ | 23:20 | ||
er, "the loop" even... | |||
I also tried a catch-all catch in the body of the loop and the scope immediately outside the loop, with the same result as handling SIGPIPE | 23:22 | ||
timotimo | can you paste the output, maybe including your command and how exactly to run it? | 23:25 | |
23:27
epony left
|
|||
TreyHarris | For the simplest example, here's an attempt at reimplementing the Unix 'yes' command: gist.github.com/489a71a643511895ac...963eecc973 | 23:28 | |
The Perl 5 equivalent runs without complaint | |||
perryprog | oh timotimo, have you seen the Julia galton board entry? It's super elegant. rosettacode.org/wiki/Galton_box_animation#Julia | 23:33 | |
23:35
Manifest0 left
|
|||
perryprog | Yours is quite nice as well of course, albeit a bit over my head. | 23:37 | |
23:37
pecastro left
23:39
Manifest0 joined
23:42
epony joined
|
|||
timotimo | mhm, it's a lot more code, but not only does it animate the falling balls in half steps for more smoothness, but it also has multiple balls on the board at the same time and supports abritrary sizes of boards | 23:47 | |
oh, cool, someone took the perl 6 version and built a perl 5 version out of it | 23:49 | ||
23:49
rindolf left
|
|||
leont | perryprog: can't you just catch that exception? | 23:50 | |
TreyHarris | I'm looking at the IO types and not finding anything that will help me here... not without just creating a new problem of deadlock | 23:51 | |
leont: were you meaning to direct that to me? | |||
nadim_ | TreyHarris: you need to catch SIGPIPE | ||
leont | Erm, yeah. Sorry | ||
TreyHarris | nadim_: As I said, I tried that; the handler ran, but the backtrace was still printed. Perhaps I did it wrong? Let me Gist that version. | 23:53 | |
timotimo | annoyingly, when it's got "| head" attached to it, it isn't as straightforward to gdb-debug | 23:54 | |
even if you catch the exception from the "say" and sigpipe, there's still an exception from trying to write bytes to stdout that gets output on stderr | 23:55 | ||
but that's also an exception that gets thrown regularly | |||
it could very well be that it's coming from the machinery that makes MAIN work, which you can't easily put an exception handler around | 23:56 | ||
nadim_ | is MAIN needed? | ||
leont | An unhandled SIGPIPE should kill the process. Or is perl6 doing something odd there? | 23:57 |