»ö« 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:00 cognominal joined 00:07 xragnar is now known as Guest45541, xragnar_ joined, Guest45541 left, xragnar_ is now known as xragnar
timotimo www.marshut.com/ixiwhw/perl6-problem.html - this just reached me via twitter 00:10
00:13 eternaleye left 00:15 panchiniak left 00:16 eternaleye joined
timotimo ah, this seems to be a web archive for mailing lists 00:17
i have no clue if my answer made it to the list, nor where to find that exact list >_>
00:18 anaeem1 left 00:23 jack_rabbit left 00:36 BenGoldberg joined
TimToady m: say grep { last when 10; $_ %% 2 }, 1..* 00:39
camelia rakudo-moar 851811: OUTPUT«2 4 6 8␤»
00:39 jack_rabbit joined
TimToady BenGoldberg: ^^ 00:39
00:41 bjz_ joined
TimToady so you can at least handle the eternally false case 00:41
a state variable is about the best you can do for eternally true 00:42
00:46 bjz_ left
BenGoldberg That's cool :) 00:50
TimToady well, (state $) ||= expr to be precise
one would need the connivance of grep's implementation in order to say "take the end of my list and make grep return that instead" 00:51
00:52 hoverboard left 00:55 jnap left
TimToady re irclog.perlgeek.de/perl6/2014-05-27#i_8779849 I'd suggest that we should probably find some way of making all access readonly by default from the inside of a start {} to the outside of it, much like parameters are readonly by default 01:00
that would catch a lot of attempts to modify something outside the thread 01:01
we don't just want to block all lexical access because a lot of stuff can usefully come in as either constant, or effectively readonly 01:02
we might need some kind of lock-free policy even for readonly access though 01:03
the threads spawned by feed operators would be similarly constrained 01:04
01:07 rindolf joined
TimToady might need some special dispensations for things like ==> my @queue to allow one thread to push and another to shift, if we don't want to force everyone through the channel syntax 01:08
or just make ==> my $channel work
01:09 Ben_Goldberg joined, BenGoldberg left, Ben_Goldberg is now known as BenGoldberg 01:17 panchiniak joined
TimToady
.oO(I am the very bodel of a bodern bajor general with a head cold) <-- only about 2 days behind on backlog
01:17
the other problem with marking ranges as "pure" is that you'll run into problems if you try to constant-fold ^1000000000000 01:19
unfortunately, memory allocation is a sort of side effect 01:20
dj_goku win list 01:22
TimToady Win 95, Win 98, Win 2000, Win XP ... * 01:23
01:27 bjz joined 01:34 FROGGS_ joined 01:38 Sqirrel left, FROGGS left 01:39 jnap joined 01:40 Su-Shee_ joined 01:43 prevost left 01:44 Su-Shee left 01:48 jnap left 01:54 klapperl_ joined 01:57 klapperl left, rindolf left 01:58 rindolf joined, hoverboard joined 01:59 hoverboard left 02:04 Pleiades` left 02:08 quillen joined, Pleiades` joined 02:11 thou left 02:13 quillen left 02:17 Sqirrel joined 02:34 ssutch joined 02:46 clkao left 02:50 SamuraiJack joined 02:51 rindolf left
TimToady doesn't see the need for infix:«<» on dates when before/after/cmp are probably adequate 02:57
to provide numeric comparators propagates the fallacy that dates are numbers :) 02:58
colomon +1
also, before and after are ideal for dates, no?
TimToady indeed 02:59
03:00 kurahaupo left
TimToady m: say +"aaaaaa".match(/aa/, :ov) 03:00
camelia rakudo-moar 851811: OUTPUT«5␤»
TimToady masak: ^^ note the :ov implies :g already 03:01
as does :ex
TimToady is caught up on backlog for the first time in a week, whew! 03:20
03:25 Alula left, dj_goku left 03:30 btyler joined 03:36 Alula joined, ssutch left 03:37 ssutch joined 03:48 atroxaper joined 03:55 hoverboard joined
atroxaper Hello, #perl6 ! 03:57
Does somebody can help me with R* installation issue on OS X? gist.github.com/atroxaper/b5a0ce8b746c34a2d88c 03:58
04:01 atroxaper left 04:03 atroxape_ joined 04:22 kaare_ joined 04:30 hoverboard is now known as moistcherry 04:42 atroxape_ left 04:49 atroxaper joined 05:02 BenGoldberg left 05:05 ssutch left 05:10 rurban1 joined 05:11 ssutch_ joined 05:13 rurban left 05:17 btyler left 05:25 moistcherry is now known as hoverboard 05:38 xinming left 05:40 xinming joined 05:43 baest left 05:45 denis_boyun joined 05:46 atroxaper left, atroxaper joined 05:49 denis_boyun__ joined
FROGGS_ atroxaper: that is a make bug on osx, just type 'make install' again 05:50
atroxaper: it should continue just fine
05:50 atroxaper left 05:51 denis_boyun left 05:53 araujo left 06:06 baest joined 06:15 silug left 06:18 atroxaper joined
atroxaper FROGGS_: It hapens when i use Configuration.pl. Not when make or make install 06:20
Configure.pl
make install 06:21
make: *** No rule to make target `install'. Stop.
06:22 araujo joined, baest left 06:23 hoverboard left
FROGGS_ hmmm, weird 06:23
ahh, can you cd into nqp, and then run make install again?
bbiab
atroxaper waiting... 06:24
06:26 rurban1 left 06:27 silug joined
atroxaper FROGGS_: Success. What next?) 06:30
FROGGS_: Ohh... Sorry. Urgent work. I'll ask here later again. Thank you for you responsive) 06:31
06:32 virtualsue joined 06:38 denis_boyun__ left 06:44 dmol joined 06:54 anaeem1 joined 06:57 rurban joined 06:58 zakharyas joined 07:00 FROGGS[mobile] joined 07:01 rurban left 07:06 anaeem1 left 07:07 fhelmberger joined
moritz atroxaper: run Configure.pl in rakudo again 07:08
07:12 virtualsue left, anaeem1 joined
atroxaper moritz: it said very fast that now i can make and make install 07:15
Without eny errors.
Trying make... 07:16
07:16 darutoko joined 07:18 darutoko- joined
moritz atroxaper: yes, configure itself is fast, it's just slow if it needs to build nqp (and possilby moar and parrot) for you 07:19
07:21 rurban joined, darutoko left
sergot morning o/ 07:22
07:23 darutoko joined 07:24 darutoko- left 07:25 darutoko- joined, rurban left 07:27 darutoko- left
dalek rlito: adb9662 | (Flavio S. Glock)++ | / (3 files):
Perlito5 - set '$]' to '5.020000'
07:27
07:28 darutoko left 07:32 panchiniak left 07:49 virtualsue joined
FROGGS_ the CPAN Perl 6 indexer works \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/ 07:51
08:04 ilogger2 joined, ChanServ sets mode: +v ilogger2 08:05 lee_ joined
masak antenoon, #perl6! 08:16
whoo, CPAN indexer! FROGGS++
FROGGS :D
masak ooh, :ov implies :g! makes sense. TimToady++
jnthn FROGGS: Hm, didn't you send me a .tar.gz before that I uploaded? 08:17
masak I... tentatively agree about the 'before' vs '<' of DateTime.
jnthn FROGGS: If you do that I will, though gotta disappear again for the day soon
FROGGS moritz: camelia is like 4 days behind
masak but I *do* think that either Date *and* DateTime should have '<', or none of them.
FROGGS jnthn: correct, but at that time the indexer had a bug which got fixed like 4 hours ago
jnthn FROGGS: Yes, but what should I upload? Same thing?
FROGGS jnthn: just log in, go to the 'force reindexing' and check the tarball 08:18
jnthn According to a request entered by Jonathan Worthington the 08:20
following files have been scheduled for reindexing.
$CPAN/authors/id/J/JO/JONATHAN/Perl6/NativeCall-v1.tar.gz
Hope that does it
FROGGS jnthn: it will, thank you :D
moritz FROGGS: yeah, seems like a 'git pull' hung due to uncommitted changes
FROGGS ahh
nice
m: say Compiler.build-date
camelia rakudo-moar 851811: OUTPUT«Cannot look up attributes in a type object␤ in method <anon> at src/gen/m-CORE.setting:2963␤ in block at /tmp/YM6wT3LQNC:1␤␤»
FROGGS m: say Compiler.new.build-date 08:21
camelia rakudo-moar 851811: OUTPUT«2014-05-26T22:18:22Z␤»
08:21 rurban joined
moritz now triggering a manual rebuild 08:22
FROGGS moritz++
masak uncommitted changes? 08:23
maybe the script should start by stashing everything away first? 08:24
moritz masak: #git would say that you shouldn't pull, but rather fetch && reset --hard @{u} 08:25
08:25 rurban left
masak there's something to be said for that too. 08:27
though my suggestion doesn't drop uncommitted changes into /dev/null
jnthn In the evalserver case, doubt they are ever needed. It's werid we got them at all... 08:28
dalek osystem: 149dbef | sergot++ | META.list:
HTTP::Cookies added
08:34
08:37 kaleem joined 08:42 dakkar joined 08:45 SamuraiJack joined, mr-foobar joined
jnthn away for the day & 08:46
masak o/ 08:49
FROGGS O7 08:52
err
o/
dalek panda/eleven: 3be5bd5 | (Andrew Egeler)++ | lib/Panda/Builder.pm: 08:57
panda/eleven: Remove old Build class when using Build.pm
panda/eleven:
panda/eleven: If two packages with Build.pm files were installed during the same panda
panda/eleven: run (example: "panda install MIME::Base64 Auth::PAM::Simple"), the
08:57 dalek joined, ChanServ sets mode: +v dalek 09:00 spider-mario joined 09:03 atroxaper joined 09:08 atroxaper left
masak I'm feeling generous today. 09:11
anyone who deserves an Amazon book gift?
:)
(self-nominations are accepted, I guess, but I'd rather see someone nominating someone else) 09:12
moritz would love to say "yes", but currently doesn't even get around to reading the ~10 books that are next to his bed
masak: I nominate FROGGS++ for mentoring sergot++ in gsoc, plus his other awesome work
masak oh good, I was going to suggest FROGGS++ too. 09:14
Timbus m: sub a {"foo"}; sub b {"bar"~callsame}; &a.wrap(&b); say a();
camelia rakudo-moar 90cd58: OUTPUT«foo␤»
09:14 jack_rabbit joined
masak um. 09:14
Timbus optimizer ate it 09:15
masak that would be my guess, too.
masak submits rakudobug
moritz not a bug
masak doesn't submit rakudobug
moritz iirc you need a special pragma if you want to replace lexials
masak oh.
Timbus that would, not be good for the test suite then
wait is that 'use soft;' 09:16
moritz m: use soft; sub a {"foo"}; sub b {"bar"~callsame}; &a.wrap(&b); say a();
camelia rakudo-moar 90cd58: OUTPUT«barfoo␤»
moritz Timbus: aye
most of our optimizations rely on the fact the lexicals are restricted in some ways at compile time
masak as they should. 09:17
nwc10 FROGGS: dakkar noticed this: metacpan.org/release/FROGGS/Inline-v1.1 09:18
suggests that metacpan isn't ignoring everything that it ought to be
specifically, I think it will need to be taught not to peek into the Perl6 directory
(is that case sensitive?)
masak +1
dakkar either that, or taught to understand the p6 distros (longer term) 09:19
09:19 denis_boyun_ joined
moritz ignoring as a first step is fine 09:19
nwc10 that feels like the longer term
09:20 atroxaper joined 09:21 grondilu joined
grondilu r: my @abc = ^10; my @ = @abc ... 4; say @abc; 09:22
camelia rakudo-jvm 90cd58: OUTPUT«(timeout)»
..rakudo-{parrot,moar} 90cd58: OUTPUT«5 6 7 8 9␤»
09:22 atroxaper left, rurban joined
grondilu was not expecting ... to have a side effect. 09:23
09:23 atroxaper joined
grondilu r: my @abc = ^10; my @ = Nil, @abc ... 4; say @abc; 09:23
camelia rakudo-{parrot,jvm,moar} 90cd58: OUTPUT«0 1 2 3 4 5 6 7 8 9␤»
grondilu r: my @abc = ^10; my @suba = Nil, @abc ... 4; say @suba; 09:24
camelia rakudo-{parrot,jvm,moar} 90cd58: OUTPUT«0 1 2 3 4␤»
masak grondilu: me neither. 09:26
grondilu: that seems... plainly wrong.
09:27 rurban left, atroxaper left 09:29 atroxaper joined 09:31 darutoko joined
grondilu in SEQUENCE (operators.pm), there is my @left := $left.flat; and later @left.shift, so maybe $left.flat.clone? 09:34
09:34 atroxaper left
grondilu or just my @left = $left.flat, forcing a copy. 09:35
09:35 atroxaper joined
masak that might fix it, but it might also be very expensive in the cases where there isn't a problem right now. 09:35
FROGGS nwc10: I discussed that yesterday with #metacpan folks... and it is not high priority since you cannot search for P6 modules 09:37
nwc10: you will only find them via recent uploads
grondilu then instead of while @left { my $value = @left.shift; ... } we could do for ^@left -> $i { my $value = @left[$i]; ... }
nwc10 FROGGS: but were they of the view that they didn't even want a pull request to ignore stuff in /Perl6/ ? 09:38
FROGGS nwc10: ohh, they certainly would accept that
grondilu (or just for @left -> $value { ... }) 09:40
grondilu tries 09:43
09:47 Psyche^_ joined
masak an Amazon gift of his choosing has now been sent to FROGGS++ 09:49
FROGGS \o/
masak (want to receive surprise gifts from people who like what you do? easy -- just be awesome, like FROGGS++) 09:50
FROGGS hehe
moritz wants a t-shirt wth "be like FROGGS"
grondilu $ perl6 -e 'my @abc = ^10; my @ = @abc ... 4; say @abc;'
0 1 2 3 4 5 6 7 8 9
moritz do the tests still pass?
grondilu not checked yet 09:51
FROGGS moritz: that reminds me of something... how likely is it that you will come to salzburg in october?
grondilu which ones should I try (don't want to test them all, do I?)
moritz grondilu: all in S03-sequence/
09:51 yoleaux joined, ChanServ sets mode: +v yoleaux
moritz FROGGS: not sure yet, have to talk to $wife 09:52
grondilu runs prove -e perl6 t/spec/S03-sequence/*
moritz grondilu: better: grep S03-sequence t/spectest.data > t/localtest.data; make localtest 09:53
grondilu: that preserves fudging etc.
grondilu does that
t/spec/S03-sequence/basic.rakudo.moar ........ Failed 9/129 subtests 09:54
t/spec/S03-sequence/limit-arity-2-or-more.t .. Failed 1/8 subtests
masak moritz: www.cafepress.com/cp/customize/prod...1307594076 09:55
moritz: (I put next to no effort into the design. but it *is* a t-shirt with "be like FROGGS", and it can be iterated on)
moritz masak: :-) 09:56
masak did... did Parrot get a release after Rakudo this month? 10:00
moritz yes
www.nntp.perl.org/group/perl.perl6....sg712.html
with... one new example in the changelog! 10:01
10:01 treehug88 joined
masak doesn't feel like making fun of Parrot in its death throes 10:07
Parrot was a noble, ambitious idea. it was also a good instance of a set of project and software development anti-patterns. 10:08
moritz and let's not forget that Parrot was our bootstrapping platform
FROGGS it still is the most reliable platform today 10:09
yoleaux 29 May 2014 22:25Z <jnthn> FROGGS: It looks weird. Not least becuase you've got a QAST::VarWithFallback - and dn't actually specify a fallback!
29 May 2014 22:25Z <jnthn> FROGGS: I guess the fallback should be to complain about the dynvar not existing...
FROGGS not the fastest though
errrm, welcome back yoleaux!
grondilu tries for 0 .. * -> $i { $value = @left[$i]; ... } 10:11
masak yes. Parrot has been very useful as our "plan to throw one away".
um, except that that wasn't the plan...
nwc10 which wasn't the plan. But no plan surives contact with the enemy
on the other hand, my plan is to get coffee 10:12
masak sounds like a nice, small, iterative step. 10:14
it's when your plan involves "be everything to everyone" that you should start worrying. 10:15
I remember someone (Alias? Ovid?) being excited about how one day, Parrot might enable people to run old COBOL (or Fortran?) code in the Parrot VM, and then successively have it interact with Perl 5, Perl 6, and other languages, and maybe even asset capture things into a moderner language. 10:16
10:16 atroxaper left
masak which is a very nice idea... and it might still happen. on some other VM. 10:16
10:17 atroxaper joined
moritz once we have COBOL.NET 10:17
masak or COBOL.Moar :P 10:18
10:21 atroxaper left 10:23 rurban joined 10:28 donaldh joined 10:29 rurban left
grondilu for @left -> $v { $value = $v; ... } # <= that works and passes all tests 10:31
grondilu submits a pull request
masak suggests involving someone with an eye for perf before merging the pull request 10:36
grondilu while @a { @a.shift } is probably faster than for @a -> $a { } but the side effect really was a nasty bug IMHO. I'm not sure the gain in performance is worth it. 10:37
grondilu acknowledges it's not to him to decide though 10:38
10:40 treehug88 left 10:47 mr-foobar left
masak no gain in perf is worth a bug, of course. 10:49
but that doesn't mean we should slow things down just to get the semantics right. maybe there is a third option.
grondilu: ooc, is there a commit that changes it from `for @a -> $a { }` to `while @a { @a.shift }` ? 10:50
10:51 rindolf joined 10:55 pecastro joined, anaeem1__ joined
grondilu masak: not sure what you mean. The commit I've made change while @a { @a.shift } to for @a -> $a { } 10:56
*changeS
github.com/rakudo/rakudo/pull/273/files 10:57
masak right. 11:02
my question is: was there a commit before yours that did the opposite change? 11:03
that's interesting data for deciding whether to merge the pull request, in my opinion.
grondilu I don't think so. Hard to check but it seems that the code has always been with while/shift 11:08
masak oki, good to know. grondilu++ 11:09
11:12 atroxaper joined
grondilu adds a commit to $value := $v instead of $value = $v. Should hopefully help with performance. 11:24
11:25 rurban joined 11:30 rurban left 11:33 rindolf left 11:34 rindolf joined
lizmat good *, #perl6! 11:35
lizmat has finally done this morning's chores, looks outside to a beautiful day for a change, and decides to go cycling soon 11:36
masak hi lizmat 11:38
sergot lizmat: o/
masak it's a beautiful day for cycling. :) 11:39
11:39 atroxaper left 11:40 atroxaper joined 11:41 mr-foobar joined 11:44 atroxaper left 11:59 colomon joined
timotimo it's a beautiful cycle for daying 12:00
masak beaut's a daily cycle for it-ing. 12:02
cognominal an happy day for cycling, or a day of epicycling?
lizmat www.infoq.com/articles/Java-8-Quiet...va_article # interesting read
timotimo i shouldn't be even asking whether or not to go see noam chomsky, right? 12:03
lizmat
.oO( we shouldn't even be answering that :-)
12:05
at 85, you won't have much chance in the future, I would think 12:06
jnthn: ^^^ specifically points 1,2,3 12:08
cycling& 12:13
masak not sure I see the connection between being 85 and being worth going to see... 12:14
I would go see Don Knuth in a heartbeat.
12:16 efg joined
efg yababbahhahab 12:17
uhm, hey TimToady - got a question for ya. How do you groom that mustache?
colomon Knuth, heck yes! 12:18
Timbus genetically engineered mice with baby hands gently caress each hair as he sleeps. he rewards them with food pellets every morning 12:19
yoleaux 29 May 2014 16:57Z <japhb> Timbus: Ah, cool, I'll take a look!
12:19 jnap joined
masak efg: I think the mustache is not actually there. it's an optical illusion, a kind of shared dream. 12:20
timotimo oooh, *that*'s why i see His moustache whenever I close my eyes 12:21
masak timotimo: no, that's just you :P 12:23
timotimo ... oh
never mind, then
12:26 Alina-malina joined, rurban joined
efg masak: that saddens me 12:30
12:31 rurban left
masak well, the universe doesn't distinguish between good or evil, right or wrong, mustache or no mustache. 12:38
this may gladden or sadden you, but in the end it's just a fact.
12:39 anno joined 12:43 anaeem1__ left
cognominal does someone know what is the coffeescript fork that is the most perlish? 12:44
12:44 anaeem1 joined
cognominal is that coco? 12:44
masak hm, I don't think the coffeescript family is that perlish to begin with... :) 12:45
anything with implicit locals feels rather un-perlish to me. 12:46
[Coke] is there a blog post about Perl 6 on CPAN?
dalek rlito: bb0befb | (Flavio S. Glock)++ | / (7 files):
Perlito5 - 'local' now works with subscripted variables
cognominal masak, ya, that's a recurrent complaint 12:47
masak as it should be. 12:48
cognominal Apparently, coco uses a let (why not my?) . github.com/satyr/coco/wiki/side-by...comparison 12:50
12:50 sqirrel_ joined
masak cognominal: maybe it uses `let` because the semantics is closer to ES6's `let` than to ES5's `var` ? (just a guess) 12:51
in the JavaScript/EcmaScript world, `my` is spelled `let`.
dalek kudo-star-daily: 70ae776 | coke++ | log/ (13 files):
today (automated commit)
[Coke] colomon: where can I report bugs on colomon/uri ? 12:57
colomon in github, I guess?
[Coke] nope. 12:58
looks like issues are not enabled.
cognominal masak, the first why in Coco Readme.md is [horrible variable scope](github.com/jashkenas/coffee-script/issues/712), 13:00
13:02 anno left
efg riiight 13:02
FROGGS [Coke]: not yet 13:03
13:03 rurban joined
FROGGS [Coke]: I do one when panda can handle cpan uploads 13:03
13:03 Pleiades` joined
masak cognominal: "Honestly, I reckon Ruby scoping rules are just wrong. It seems that they may change in Ruby 2.0" -- interesting. 13:05
does anyone have any more sources for Ruby scoping maybe changing with 2.0 ? 13:06
seems like a big breaking change.
[Coke] colomon: looking at the repo, you should see "settings" on the right hand side menu - click on that; under Features, insure that "Issues" is checked.
colomon: tl;dr - your module fails tests on rakudo-jvm 13:07
camelia: help
camelia [Coke]: Usage: <(rakudo-jvm|nqp-jvm|star-j|rakudo-moar|pugs|star-p|std|niecza|p5-to-p6|nqp-parrot|b|rakudo-parrot|nqp-moarvm|star-m|sp|nPr|rPn|Prn|j|Pnr|nqp-mvm|nr|p6|star|p56|nqp|r-j|rakudo|r-jvm|nqp-p|r-m|r-p|rp|nom|r|rnP|nqp-m|nqp-j|n|rm|perl6|rj|rn|P|m|sm|p|nrP)(?^::\s) $perl6_program>
[Coke] star-j: say 3 13:08
camelia star-j 2014.04: OUTPUT«Error occurred during initialization of VM␤Could not reserve enough space for object heap␤Error: Could not create the Java Virtual Machine.␤Error: A fatal exception has occurred. Program will exit.␤»
[Coke] *sadface*
13:11 denis_boyun_ left, denis_boyun___ joined
FROGGS m: say to-json [42, :ohh] # btw, one side effect of eleven landing 13:13
camelia rakudo-moar 90cd58: OUTPUT«[␤ 42,␤ {␤ "ohh" : true␤ }␤]␤»
moritz what?
where does that to-json come from? 13:14
FROGGS we use json to read our module database, and also the config where the CompUnitRepos are...
moritz is that JSON::Tiny? or a separate json implementation?
FROGGS so we needed a way to read and write json
JSON::Pretty
moritz that's core now? 13:15
FROGGS so it is JSON::Tiny + indentation
sort of... up for discussion
moritz well, currently it seems to be
FROGGS currently, yes
we need a way to have readable (and easily editable) config files 13:16
that is why I chosed that one
and since JSON gets the de facto std for many things, I do not worry to much tbh
too* 13:17
colomon [Coke]: done. 13:18
moritz just a bit surprised
FROGGS moritz: I expected some shock :o)
colomon oooo, pretty 13:19
masak I'm less shocked than I assumed I'd be. 13:22
then again, I believe *all* modern languages are going to standardize on JSON, so... 13:23
it's just too strong an attractor for most to resist.
FROGGS it feels a bit PHPish to put that in core :o) 13:26
13:27 bluescreen10 joined
[Coke] j: my $a; say $a // 3 13:28
camelia rakudo-jvm 90cd58: OUTPUT«3␤»
timotimo just hide the symbols from the user's program :P
[Coke] github.com/colomon/uri/blob/master...RI.pm#L160 - causing a NPE on rakudo-jvm 13:30
github.com/colomon/uri/issues/6
looks like this is the root cause of many of the java failures 13:31
13:32 sqirrel_ left 13:33 guru joined 13:34 guru is now known as Guest15631 13:36 Guest15631 is now known as ajr_ 13:37 BenGoldberg joined 13:38 bluescreen10 left 13:39 bluescreen10 joined 13:40 kaare_ joined 13:41 pecastro left 13:48 pecastro joined
masak TimToady: we do + and - on Date and Int. from that perspective it's quite silly to not have < and > work, too. 13:48
dalek rlito: b61854f | (Flavio S. Glock)++ | / (3 files):
Perlito5 - cleanup - duplicated code
13:49
masak TimToady: I have no trouble with before and after working. but I can also sometimes see people reaching for < and >. maybe that freedom is useful in this case.
13:50 btyler joined, clkao joined
colomon masak: …. actually, I think there's a good argument for not doing + and - on Date, based on exactly that. 13:52
BenGoldberg So what would be the interface instead of +-? $tommorrow = $today.add( day => 1 ); ? 13:54
colomon I dunno, but the math operations are supposed to be for numbers. 13:57
timotimo well, + is expected to coerce to number types 13:58
BenGoldberg Hmm... I forget, does a Date object refer to a specific instant in time, or a half-open range of instants, like: [midnight day X, midnight day X+1) 13:59
colomon I suppose you could make an argument for allow math operators to also work on "number with a unit"
14:01 thou joined
colomon but even that doesn't really map to a Date very well. for example, 3 * (4 meters) makes sense. 3 * (July 31st, 1975) doesn't 14:01
BenGoldberg If Dates were ranges, the multiplying a Date by 3 might result in a three-day-long range: July 31st, 1975 ... August 2nd, 1975 ... but I'm not sure if that really makes sense. 14:04
dalek rlito: d8d0a65 | (Flavio S. Glock)++ | / (3 files):
Perlito5 - implement '$;'
14:07
masak to be clear, the + and - that are allowed on Date are: (a) subtracting two Dates (getting an Int), and (b) adding a Date and an Int (getting another Date). 14:08
those two operations are well-defined and, in my view, useful.
colomon What is the meaning of the Int (in either case)?
14:08 go|dfish joined
masak oy, #perl6! 14:09
tadzik wow, bailador is bad on jvm
masak strangelyconsistent.org/blog/t4-rai...d-of-cubes
\o/ \o/ \o/ \o/
masak is very happy to *finally* get this post out 14:10
all it took was three Perl 6 days in one week to get me un-stuck!
(and I haven't had half of that for *months*)
colomon woah, that's for the January 2013 t4, right?
masak right.
the contest finished in January 2013. but it's *called* the p6c2012 because it started in December 2012. 14:11
colomon: the Int is the number of days in the interval between two Dates. 14:13
[Coke] -1 on supporting that. 14:16
masak ok, then what about $date.succ and $date.prev ? 14:17
[Coke] is it a date or a date-time ? 14:19
masak it's a date.
no time involved.
masak notices a link that was wrong in the blog post -- might want to refresh: strangelyconsistent.org/blog/t4-rai...d-of-cubes 14:20
[Coke] bleargh. if there's no time component, I guess moving back and forward by a day is acceptable... except that not all calendars have all days. which calendar are we using?
colomon wonders how Haskell does it
masak [coke]: (proleptic) Gregorian, if that's what you're asking. 14:21
I remember investigating lots of different languages/libraries back when I refactored S32/Temporal. Haskell was one of the libraries I looked at. 14:22
[Coke]: my point is that if we agree that moving back and forward by a day is acceptable/well-defined/useful... then why are we afraid of adding and subtracting an integral amount of days?
[Coke] masak: if we were adding days, that'd be fine. :) 14:23
but we're adding ints; that's my only ew. 14:24
also, isn't the gregorian calendar missing some days? do we know what happens when we try to cross that boundary?
masak "missing some days"? 14:25
that's what "proleptic" means -- it's been extended indefinitely backwards. 14:26
which works, but is kinda "use with caution".
colomon is willing to assume Date will get the details right, but is choking on the "Int means number of days" thing, and using math operators on non-numbers. 14:27
[Coke] colomon: well, it's an oracle standard, anyway.
(where sysdate+1 == tomorrow)
masak [Coke]: Wikipedia says the traditional proleptic calendar doesn't have a year 0, but that ISO 8601 does.
for some reason I'm fine with adding and subtracting Date objects, under the model "adding 5 is like .succ.succ.succ.succ.succ" 14:28
14:28 rurban left
masak a bit like scalar multiplication is defined for vectors, integer addition and subtraction is defined for dates. 14:29
efg can i run perl5 scripts on perl6 installs?
masak note that we never (need to) assume an origin in order to add and subtract. which I guess is why addition makes sense but multiplication doesn't.
colomon masak: surely we'd have at least .succ(5) 14:30
masak efg: well, there's 'use v5'
efg: but beyond that, no.
m: say 12.succ(5)
camelia rakudo-moar 90cd58: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤ in method succ at src/gen/m-CORE.setting:4087␤ in block at /tmp/j5XAkNkNTq:1␤␤»
efg so with use v5, it's work candy dandy
masak colomon: don't know where you got that API from.
colomon: .succ is how prefix:<++> works internally. 14:31
14:31 xenoterracide joined
masak colomon: it doesn't need an integer parameter. 14:31
colomon masak: right, but it could have one. we don't want to force people to do Peano arithmetic on dates.
masak colomon: but maybe you were mostly concerned about efficiency? I wasn't talking about efficiency, or how to implement stuff -- I was talking about semantics. 14:32
no, please don't add integer arguments to .succ :(
we don't need to go in and overcomplicate every single API we see
we've already done enough of that
colomon call it .add-days then, I don't give a fig 14:33
masak we already have .later(:days(5))
colomon fine
masak but I'm not aware we have anything to substitute for `$date2 - $date1`
which (IMO) reads very well. 14:34
[Coke] "overloaded operators suck"
(as a general thought, not solely about this suggestion) 14:35
colomon type-overloaded operators are fine. it's meaning-overloaded operators which suck.
and the problem is this is a borderline case.
and we need to figure out where the border should be. 14:36
masak yes, I agree about that problem specification.
also, the discussion should have moritz++ in it.
(because he spec'd most of Date)
colomon honestly, I'd be a lot happy with $date1 - $date2 if the result was an "Real with unit"
[Coke] If we support $date2 - $date1, do we need to a) overload every other operator so it does something useful, b) overload every other operator so it fails with something useful? 14:37
masak [Coke]: what? no.
that sounds like a slippery slope argument to me.
specifically, we already support $date2 - $date1, and no-one's complained so far.
we've had it for years at this point. 14:38
14:38 liztormato joined
[Coke] ok, but what does $date2+$date1 do? 14:38
masak good question.
[Coke] masak: we are not in a great state to say "no one has complained" is a reason to keep something.
masak m: my $date1 = Date.today; my $date2 = $date1.succ; say $date2 + $date1 14:39
camelia rakudo-moar 90cd58: OUTPUT«Cannot call 'Numeric'; none of these signatures match:␤:(Mu:U \v: *%_)␤ in sub infix:<+> at src/gen/m-CORE.setting:4245␤ in block at /tmp/SBDo1oi_Cf:1␤␤»
masak [Coke]: there's your answer. it doesn't work.
[Coke] m: my $date1 = Date.today; my $date2 = $date1.succ; say $date2 Z+ $date1
camelia rakudo-moar 90cd58: OUTPUT«Cannot call 'Numeric'; none of these signatures match:␤:(Mu:U \v: *%_)␤ in sub infix:<+> at src/gen/m-CORE.setting:4245␤ in block at src/gen/m-CORE.setting:17439␤ in block at src/gen/m-CORE.setting:7934␤ in block at src/gen/m-CORE.setting:…»
[Coke] m: my $date1 = Date.today; my $date2 = $date1.succ; say $date2 +| $date1
camelia rakudo-moar 90cd58: OUTPUT«Cannot call 'Numeric'; none of these signatures match:␤:(Mu:U \v: *%_)␤ in sub infix:<+|> at src/gen/m-CORE.setting:4328␤ in block at /tmp/_hsmE1_Sf5:1␤␤»
masak [Coke]: "no-one has complained" is not a very strong reason, no. I agree.
liztormato Wrt JSON:tiny. I'm not sure we want to expose it.
[Coke] perfect.
masak so, only the operators that make sense are defined. 14:40
colomon m: say sqrt(Date.today - Date.new("1-1-1")) 14:42
camelia rakudo-moar 90cd58: OUTPUT«Invalid Date string '1-1-1'; use yyyy-mm-dd instead␤ in method new at src/gen/m-CORE.setting:15658␤ in block at /tmp/u3XvQXdtPE:1␤␤»
colomon m: say sqrt(Date.today - Date.new("0001-01-01"))
camelia rakudo-moar 90cd58: OUTPUT«857.544167958712␤»
[Coke] m: say sqrt(Date.today); 14:43
camelia rakudo-moar 90cd58: OUTPUT«Cannot call 'sqrt'; none of these signatures match:␤:(Numeric \x)␤:(Cool \x)␤ in block at /tmp/sc62DZiRCl:1␤␤»
[Coke] colomon: mmm, that makes me unhappy.
dalek rlito/gh-pages: 0ebe35d | (Flavio S. Glock)++ | index.html:
Perlito - page - add a link to the Perl5-to-Perl6 compiler
colomon www.haskell.org/haskellwiki/Cookboo...s_And_Time 14:44
masak [Coke]: why? the square root of the difference (in days) between two dates *is* a well-defined operation. 14:45
14:45 treehug88 joined
[Coke] it's the conflation of ints and days again, that's all. 14:46
colomon right
masak well, that's much safer to to with Date than with DateTime.
we're not doing it with DateTime, mind.
moritz++ has a blog post somewhere about the dangers of restricting in-retrospect valid math operations on exotic values such as Interval, just because we didn't see a use case for it.
14:46 BenGoldberg left, xenoterracide left 14:49 rurban joined
colomon rakudobrew switch jvm 14:50
Sorry, I'm not sure if you mean:
jvm-HEAD
jvm-moar
errr… "jvm-moar" ?!?
14:51 BenGoldberg joined
masak re-reads strangelyconsistent.org/blog/perl6-...ld-as-perl and is happy to find we're doing better on all four of the "What remains?" bullet points than we were back in Feb 2013 14:54
colomon [Coke]: uri works fine un-compiled in java. :\ 14:56
jvm
tadzik colomon: um, you must have a jvm-moar directory in .rakudobrew :) 14:58
not sure why
colomon because that's how I roll. ;) 14:59
Woodi hallo today :) 15:00
[Coke] colomon: I figured you'd end up turning this into a rakudobug. :) 15:01
i was just lazy!
dalek rlito: 0985575 | (Flavio S. Glock)++ | ChangeLog:
Perlito - ChangeLog update
Woodi v_car1 = 50 km/h; v_car2 = 120km/h; v_collision = v_car1 + v_car2;
do v_collision have some usefull meaning ? eg. forces calculations ? 15:02
TimToady it's not a v unless you have a direction too
Woodi I assumed frontal collision :)
masak Woodi: you're talking about speed, not velocity.
Woodi: please go read up on the meaning of those terms in English ;)
15:03 zakharyas joined
Woodi ok, I will :) 15:03
masak (tl;dr: speed is a scalar, velocity is a vector)
colomon [Coke]: jvm's definitely having issues with compiling stuff, ABC also failed there last time I checked.
Woodi but Dates and other types like that are not types, they are domain specyfic objects. so $day +- 1 is domain specific operation 15:04
s/v/s/g and ok ?
and I like how $day + 1 looks :) 15:05
15:05 efg left
colomon [Coke]: actually, ABC fails in the build stage (on JVM) 15:06
masak Woodi: "Dates and other types like that are not types" -- but they are. not just that, they are types on which mathematical operations make some amount of sense. 15:08
to be precise, they are points on a scale, which can be compared with each other and translated in either direction.
...just like (discrete) scalars.
Woodi I think it's more physics :) but just they are different then Ints 15:09
15:10 grondilu left
Woodi also 5:10 PM + 1 is still 5:10 PM but thay later 15:10
BenGoldberg I don't think adding a time and an integer makes sense, unless we have a scoped pragma which says that integers can be converted to intervals. 15:11
colomon m: say Date.today + i
camelia rakudo-moar 90cd58: OUTPUT«Cannot call 'Numeric'; none of these signatures match:␤:(Mu:U \v: *%_)␤ in sub infix:<+> at src/gen/m-CORE.setting:4245␤ in block at /tmp/RdjzNxCq2u:1␤␤»
masak of course they are different from Ints.
Woodi, BenGoldberg: we are *not* talking about adding datetimes and numbers. 15:12
we are talking about adding dates and numbers.
BenGoldberg Hmm...
masak please don't strawman an already challenging discussion.
Woodi masak: I have no idea what difference between Dates and DateTimes. are both necessary ? 15:13
BenGoldberg Actually, I just thought of something: how hard would it be to create a lexically scoped specifiyer for how integers can be boxed to days/weeks/years?
15:13 treehug88 left
Woodi and I can look them in specs ! 15:13
:)
15:13 denis_boyun___ left
BenGoldberg Woodi, a Date is like today, or tommorroy, or June 4, 1977 15:14
colomon wishes someone else would write a Unit module, so he is not tempted.
BenGoldberg A DateTime is like Friday May 30, 2014 11:11 AM and 3.141592 seconds.
15:16 kurahaupo joined
masak Woodi: though not strictly necessary, Date is there for two very good reasons: 15:16
BenGoldberg Each Date object refers to a range of real-world times. One can probably write if( $some-date.contains($some-datetime) ), or something similar.
masak (a) Date allows operations that aren't well-defined in DateTime (see ongoing discussion)
(b) the creator of CPAN's DateTime said he regretter not having a separate Date object (for the (a) reason, but also for other reasons) 15:17
timotimo masak++ # t4 reviews
masak m: my $now = DateTime.now; my $today = Date.today; say $now ~~ $today
camelia rakudo-moar 90cd58: OUTPUT«False␤»
masak submits rakudobug
BenGoldberg: that's how you'd write it, IMO.
BenGoldberg Probably :) 15:18
Woodi I under
I *think* DateTime is just Time :)
BenGoldberg Kinda
masak um.
no.
TimToady what is Time? 15:19
BenGoldberg That is a deep philisophical question!
liztormato Fwiw, at former $work, I created a Date object that started on 28 dec 1999. Why? No dates before that. And mod 7 would give you the weekday
Woodi point in time ?
15:20 Rotwang joined
TimToady in P6-ese, that's an Instant, and has nothing much to do with what a calendar or clock says, unless it's atomic 15:20
liztormato What I'm saying is: people will always create their own Date objects when they reasly need to
masak errands &
TimToady Date and DateTime really differ on what they consider to be their fundamental unit, and guarantee some kind of well-behavedness at that fundamental unit 15:21
masak +1 15:22
TimToady Instant really has no fundamental unit, except insofar as everything is scaled to the second, but is arbitrary precision both up and down from there 15:23
BenGoldberg m: my $x = 1.5; say $x.succ
camelia rakudo-moar 90cd58: OUTPUT«2.5␤»
TimToady Instant really only breaks down where Einstein says it does 15:24
well, to be honest, Instant also has a civil component in that sense, since atomic time is really a consensus time for the planet, and probably doesn't even make sense for satellites 15:26
BenGoldberg Satellites's clocks have to make corrections due to relativity 15:27
BenGoldberg wonders if there's any perl code in space.
TimToady and clocks of sufficient accuracy will vary over the course of a day/night 15:28
we once had a perl mongers "group" at the south pole 15:29
quotes because it was one person, as I recall :)
[Coke] we've had monger groups across the world that clocked in at 1 member or less! 15:30
TimToady [Coke]: did you see my remarks about ~~ over on #moarvm?
15:31 zakharyas left 15:32 sqirrel_ joined, ajr_ left 15:33 guru joined, guru is now known as Guest57951, Guest57951 is now known as ajr_
[Coke] Yes, although I don't understand why. 15:37
TimToady 2 different dwims can't exist that close together, is all 15:38
[Coke] I was thinking that when the whatever closure was invoked, it was no longer a whatever at that point.
TimToady the interpretation of whatever is specifically left up to the operator, and only defaults to making a closure if the operator doesn't care 15:40
as it happens, ~~ is one of the operators that cares, along with ..
which is why 1..* doesn't make a closure 15:41
neither does * ~~ 42
m: say * ~~ Whatever 15:42
camelia rakudo-moar 90cd58: OUTPUT«True␤»
TimToady if it did make a closure, that wouldn't work
and we wouldn't be able to match with whatevers on the right side either
15:43 SamuraiJack left
TimToady hence *.narrow ~~ Int is always going to be false 15:43
it doesn't mean { .narrow ~~ Int } 15:44
and that's why those two lines work differently
Woodi hmm, cannot find <h1> Instant... and looks like DateTime and Instant are nearly the same 15:45
TimToady it's just one of those places where we can't have something both tighter and looser at the same time
Woodi: look in perlcabal.org/syn/S02.html#Immutable_types 15:48
DateTime is about civil time, and Instant is about time as an abstraction that avoids civil concepts entirely, except for the "atomic second" 15:50
15:51 liztormato left 15:52 rindolf left
TimToady Instants have no clue what a minute or an hour are, let alone a day or a month 15:53
15:53 rindolf joined
TimToady Instants don't care whether the current minute has 60 or 61 seconds 15:53
or the current month has 28 or 29 dys 15:54
DateTime has to worry about these things
(I am speaking in the abstract here; if the only clock your computer has available gives you civil time, Instant may have to backcompute the leapseconds to get something approximating linear time) 15:57
15:57 rurban left
japhb
.oO( Civil time isn't particularly civil ... )
15:59
masak TimToady: note that DateTime doesn't have seconds as its fundamental unit. (and thus, it doesn't allow $date.succ or $date + 5) 16:06
TimToady that seems reasonable 16:07
16:07 denis_boyun joined
TimToady nevertheless, it can add one second when it needs to, and can make some guarantees that it will succeed 16:07
whereas adding larger time units gets...sloppy... 16:08
.oO(civil as in war)
16:09
16:09 isBEKaml joined, tmn joined 16:11 kaleem left 16:14 atroxaper joined
TimToady seems to me that &a.wrap(&b); ought to fail if &a has been hardened at CHECK time, and that's the bug that masak++ should submit 16:14
16:23 Ben_Goldberg joined, BenGoldberg left, Ben_Goldberg is now known as BenGoldberg
atroxaper moritz: one more issue with R* installation. Error while a make phase. gist.github.com/atroxaper/af351cd7e62114e61d5b 16:23
moritz: can you help with that?)
16:25 Ben_Goldberg joined, BenGoldberg left, Ben_Goldberg is now known as BenGoldberg 16:26 Ben_Goldberg joined, BenGoldberg left, Ben_Goldberg is now known as BenGoldberg 16:28 denis_boyun left 16:29 donaldh left, denis_boyun_ joined, sqirrel_ left
flussence I've been pondering a Units module every now and then for a few years, then I actually think a bit about the problems it'd have to solve and give up again :) 16:31
16:31 bjz_ joined
flussence one of the ideas I had in mind were allowing arbitrary literals like «35 km/s²», or even just parsing them as strings. Turns out it's a fractal of work... 16:34
16:36 bjz_ left
flussence The other big problem is there's very few physical units we can even measure as absolutes. You have to pick relative reference points, and nobody can seem to unanimously agree on those. 16:42
16:42 kaare_ left 16:43 kaare_ joined
flussence (and that's not even accounting for things like special/general relativity. IIRC, GPS has to account for *both* :) 16:46
masak submits &a.wrap(&b) rakudobug 16:47
16:48 ajr_ left 16:51 treehug88 joined
[Coke] is shocked that dc opened an actual bug! 16:52
masak DC Comics?
[Coke] damian 16:53
... starting over.
masak oh!
moritz masak++ # t4
masak moritz: finally!
[Coke] marvels that DC opene3d an actual bug!
16:53 rindolf left
masak [Coke]: :P 16:53
moritz: I have good hopes about t5 arriving soon, too.
moritz masak: I thought of most of the edge cases you mentioned, and gave up pretty quickly when I couldn't come up with a model handled them all 16:54
16:54 rindolf joined, isBEKaml left
masak moritz: I'm really tempted to create a github repo where I correctly implement all the algorithms I know about, just to see what falls out of it. 16:54
moritz atroxaper: oh, make segfaulting; I guess you can try again, and hope for more luck
atroxaper: (trying "make install" again) 16:55
masak: please do that -- after t5 :-)
masak um. yes.
thanks for the reality check :)
there was one algorithm that I had foreseen that I didn't mention. it's the most reactive one of them all: start with an empty space. for each cube added, keep track of "tops" (of cubes) and waterfalls. update them in "real time" as each new cube is added. 16:56
it would be fun just to see how such a solution turned out.
atroxaper moritz: it was make. Not make install. But i am trying now to do make.
moritz masak: you mention five contestants, but the review lists only four solutions
17:03 dakkar left 17:05 atroxaper left 17:06 atroxaper joined 17:07 panchiniak joined 17:08 panchiniak left 17:09 panchiniak joined
vendethiel FROGGS+=5 # CPAN 6 17:09
timotimo masak: i wonder how quickly your website is generated with a current moarvm perl6 :) 17:12
masak timotimo: very quickly. 32 seconds, give or take. 17:17
timotimo that used to be a lot less fast, right? 17:18
masak moritz: oh! the correct number is four contestants, not five.
timotimo: yes. around a minute IIRC.
timotimo aaw, only a factor of 2? :( 17:21
we need to get better still!
[Coke] masak: you can add cubes in such a way that water could get in a space and then not. 17:24
17:26 btyler left 17:27 Vlavv joined
timotimo masak: could our horrible string join/concat performance be the reason why your website generator isn't faster? 17:27
vendethiel finally finished backlogging and read about coco and stuff 17:29
17:30 atroxaper left, atroxaper joined 17:31 sorear joined 17:33 bjz_ joined 17:34 guru joined, guru is now known as ajr_ 17:38 bjz_ left, atroxaper left 17:39 atroxaper joined, fridim_ joined 17:40 skids joined 17:49 treehug88 left 17:53 treehug88 joined 17:59 btyler joined
lizmat is back 18:00
perigrin lizmat: how new is your invention?
lizmat you mean my most recent one?
about 2 mins
18:00 NotJack joined
NotJack hey y'all. 18:01
lizmat NotJack perigrin o/
NotJack o/
I'm trying to interpret a perl6 snippet on RosettaCode
lizmat which one?
NotJack can anyone tel me what !?(arithmetic expression) does?
*tell
tadzik oh, yes 18:02
perigrin lizmat: www.azlyrics.com/lyrics/vanillaice/...ebaby.html ... :)
tadzik it's ! ?(foo)
NotJack Nautical bell. It has !?($minute + $hour % 4)
tadzik ? boolifies, then ! negates
so it's effectively "is this expr false"
lizmat which ! by itself would also do ?
NotJack and the boolification of an integer is 1 when > 0, and 0 when = 0 ?
tadzik and True if <0, methings, but yeah
lizmat: I would expect so, yes 18:03
atroxaper moritz: There is stable sigfault while make... gist.github.com/atroxaper/af351cd7e62114e61d5b
NotJack so basically !?($minute + $hour % 4) is 1 when minute + $hour % 4 is 0
and 0 when $minute + $hour % 4 is 1
(and the ? is superfluous) 18:04
yeah?
sorry, typo, I meant "0 when ... is > 0"
PerlJam NotJack: more like when ... is != 0 18:05
NotJack right, yeah (in this particular case, that expression is always nonnegative)
PerlJam m: ?-1
camelia ( no output )
PerlJam m: say ?-1
camelia rakudo-moar 90cd58: OUTPUT«True␤»
PerlJam (it's always good when the implementation conforms to your mental model ;)
perigrin m: say ?0 18:06
camelia rakudo-moar 90cd58: OUTPUT«False␤»
18:06 rindolf left
perigrin yay 18:06
NotJack m: say ?!(44)
camelia rakudo-moar 90cd58: OUTPUT«False␤»
NotJack m: say ?!(0)
camelia rakudo-moar 90cd58: OUTPUT«True␤»
lizmat m: say +False
camelia rakudo-moar 90cd58: OUTPUT«0␤»
18:06 rindolf joined
lizmat m: say +True 18:06
camelia rakudo-moar 90cd58: OUTPUT«1␤»
NotJack m: say True * False - False
camelia rakudo-moar 90cd58: OUTPUT«0␤»
lizmat m: say -True
camelia rakudo-moar 90cd58: OUTPUT«-1␤»
NotJack heh
m: say False^False 18:07
camelia rakudo-moar 90cd58: OUTPUT«one(False, False)␤»
perigrin NotJack: not even in perl6 can two wrongs make a right.
NotJack *cymbals* 18:08
PerlJam m: say ^False; # ;-)
camelia rakudo-moar 90cd58: OUTPUT«0..^0␤»
NotJack m: say: False .. True
camelia ( no output )
NotJack is it possible to create pragma saying "in an arithmetic context, always treat False=0 and True=1" without having to type ?s and !s everywhere? 18:09
tadzik yes
well, sort of
PerlJam NotJack: you don't need the ? and ! everywhere if you're doing arithmetic.
lizmat m: say True + True 18:10
camelia rakudo-moar 90cd58: OUTPUT«2␤»
PerlJam the arithmetic ops provide a numeric context.
tadzik things generally become what's expected of them :)
NotJack oh, neat
tadzik so if you do 5 + $a, $a becomes numified most of the time
flussence m: say $_ % 4 for ^8
camelia rakudo-moar 90cd58: OUTPUT«0␤1␤2␤3␤0␤1␤2␤3␤»
flussence m: say $_ %% 4 for ^8
camelia rakudo-moar 90cd58: OUTPUT«True␤False␤False␤False␤True␤False␤False␤False␤»
flussence seems like the ? may be redundant as well as the ! 18:11
NotJack I think what Nautical Bell is aiming at is signum()
don't know if P6 has a builtin for that, but ? serves
PerlJam redundancy is a good thing if it aids comprehension
flussence m: (2 + 2 % 4) # just checking 18:12
camelia ( no output )
flussence m: (2 + 2 % 4).say # just checking
camelia rakudo-moar 90cd58: OUTPUT«4␤»
timotimo i'm glad somebody actually tried out the gtk-simple stuff i came up with :3
NotJack m: "you don't".say
camelia rakudo-moar 90cd58: OUTPUT«you don't␤» 18:13
tadzik m: my @a = "hip" xx 2; say ~(@a, @a.WHAT.perl), "!"
camelia rakudo-moar 90cd58: OUTPUT«hip hip Array!␤»
lizmat m: <I Have A Therory>.say
camelia rakudo-moar 90cd58: OUTPUT«I Have A Therory␤»
lizmat
.oO( wish I could type without tpyo's )
18:14
NotJack m: say "in the butt".WHAT.WHAT
camelia rakudo-moar 90cd58: OUTPUT«(Str)␤» 18:15
18:17 panchiniak left
segomos what is the tilde for tadzik 18:17
nvm 18:18
PerlJam segomos: string context similar to how + is for numeric context or ? is for boolean context.
tadzik NotJack: you'll like FROGGS 18:19
NotJack why's that? 18:20
tadzik he introduced "what what in the butt" to us
NotJack I learned about it on some old episode of South Park. 18:22
TimToady is trying to imagine which rosettacode task could possibly cause $minute + $hour % 4 to make any kind of sense 18:23
NotJack rosettacode.org/wiki/Nautical_bell#Perl_6
maybe you can tell me what the "\b"x9 is all about. Why nine backspaces? 18:24
something to do with column alignment maybe? 18:25
TimToady looks to me like it's redundant to the \r above 18:27
er, no, it isn't
just a different way to do the same thing 18:28
I dunno why they used nine backspaces instead of a \r there
FROGGS tadzik: hehe, that is not true! *g*
TimToady \r woulda worked just as well, methinks
FROGGS I did not introduce "what what..." to anybody :o)
TimToady what what what/ 18:29
?
tadzik 'twas you!
FROGGS no
jnthn and masak knew before me what that is about
18:29 anaeem___ joined
lizmat feels old not knowing what 18:30
PerlJam second base!
;)
NotJack TimToady: THANKS
goddamn capslock
bane of the internet 18:31
TimToady just thought that NotJack++ was VERY thankful :)
tadzik FROGGS: oh well, maybe I'm mistaken, or my irclog is :)
FROGGS but (Sammy Rockwell)++ anyway, I've even watched the making of :P 18:32
18:32 anaeem1 left
tadzik making of Sammy Rockwell? :o 18:32
TimToady Is that more like the Cremation of Sam McGee, or the Shooting of Dan McGrew? 18:34
segomos m: ~(1,2,3).perl.say ; (~(1,2,3)).perl.say; 18:35
camelia rakudo-moar 90cd58: OUTPUT«WARNINGS:␤Useless use of "~" in expression "~(1,2,3).perl.say" in sink context (line 1)␤(1, 2, 3)␤"1 2 3"␤» 18:36
NotJack say >>~ (1,2,3); 18:38
m: say >>~ (1,2,3);
camelia rakudo-moar 90cd58: OUTPUT«===SORRY!=== Error while compiling /tmp/v712rQo75L␤Missing << or >>␤at /tmp/v712rQo75L:1␤------> say >>~⏏ (1,2,3);␤ expecting any of:␤ infix stopper␤ infix or meta-infix␤»
18:38 hoverboard joined
NotJack m: say ~>> (1,2,3); 18:38
camelia rakudo-moar 90cd58: OUTPUT«===SORRY!=== Error while compiling /tmp/9mXGsc9uAX␤Preceding context expects a term, but found infix ~> instead␤at /tmp/9mXGsc9uAX:1␤------> say ~>⏏> (1,2,3);␤»
TimToady m: say ~<< (1,2,3) 18:41
camelia rakudo-moar 90cd58: OUTPUT«1 2 3␤»
segomos m: ~<<(1,2,3)
camelia ( no output )
segomos m: ~<< (1,2,3)
camelia ( no output )
segomos m: say ~<<(1,2,3) #:)
camelia rakudo-moar 90cd58: OUTPUT«1 2 3␤»
xfix I like implicit .ws in rules. It lets you write languages without havng to bother about putting whitespace token everywhere which allows comments.
segomos TimToady: beat me
NotJack I would have expected "123"
or, wait
xfix I would have expected "1", "2", "3".
<< is list operator. 18:42
timotimo no, it's a hyperop :)
TimToady no it isn't
xfix What you are thinking of is [~] 1, 2, 3.
segomos it isn't
NotJack m: [~] (1,2,3)
camelia ( no output )
NotJack m: say [~] (1,2,3)
segomos say
camelia rakudo-moar 90cd58: OUTPUT«123␤»
NotJack ah
I thought [] meant infix
TimToady m: (1,2,3).join.say
camelia rakudo-moar 90cd58: OUTPUT«123␤»
xfix [] is reduce operator.
NotJack doesn't quite make sense to me with a prefix operator
PerlJam m: say (~<<(1,2,3)).perl # for xfix :) 18:43
camelia rakudo-moar 90cd58: OUTPUT«("1", "2", "3")␤»
TimToady ~ is an infix as well as a prefix
xfix Yes, it returns a list.
~ is prefix here.
NotJack oh, in infix mode it means "stringify, then catenate"?
xfix I understand the syntax.
18:43 Ben_Goldberg joined
TimToady hypers only operate on items that happen to have lists inside, but they are not listops 18:43
18:43 BenGoldberg left, Ben_Goldberg is now known as BenGoldberg
TimToady in some contexts, the return of a hyper can be used as a list though 18:43
xfix << and >> are some weird map operators IMO. 18:44
NotJack oh, I see, the << arrows point to where the operator *should go*
I thought they pointed *at the value*
xfix (there is something about "multithreading", but nothing implements that yet)
TimToady more importantly, they indicate a plurality of data on the open end
segomos NotJack: yea
m: say (1,2,3) »~
camelia rakudo-moar 90cd58: OUTPUT«===SORRY!=== Error while compiling /tmp/HnkgQpoJHk␤Two terms in a row␤at /tmp/HnkgQpoJHk:1␤------> say (1,2,3) »~⏏<EOL>␤ expecting any of:␤ postfix␤ infix stopper␤ infix or meta-…»
PerlJam NotJack: I tend to think of them as itemish thing on this side << listy thing on this side.
segomos m: say (1,2,3)>>~ 18:45
camelia rakudo-moar 90cd58: OUTPUT«===SORRY!=== Error while compiling /tmp/Ll7LfogxH9␤Preceding context expects a term, but found infix > instead␤at /tmp/Ll7LfogxH9:1␤------> say (1,2,3)>>~⏏<EOL>␤»
xfix m: say (1,2,3)»~
camelia rakudo-moar 90cd58: OUTPUT«===SORRY!=== Error while compiling /tmp/QvD0tQ0N6l␤Two terms in a row␤at /tmp/QvD0tQ0N6l:1␤------> say (1,2,3)»~⏏<EOL>␤ expecting any of:␤ postfix␤ infix stopper␤ infix or meta-i…»
xfix Oh, right.
segomos m: say (1,2,3)>>~;
camelia rakudo-moar 90cd58: OUTPUT«===SORRY!=== Error while compiling /tmp/So52XIiAQV␤Missing << or >>␤at /tmp/So52XIiAQV:1␤------> say (1,2,3)>>~⏏;␤ expecting any of:␤ postfix␤ infix stopper␤ infix or meta-infix␤»
xfix With >>, you activate postfix:<~>.
TimToady m: say 1 «+« (10,20,30)
camelia rakudo-moar 90cd58: OUTPUT«11 21 31␤»
NotJack PerlJam: but what if they're pre/post-fix? then you don't have a listy thing
segomos ic
xfix m: sub postfix:<~> { ~$_ }; say (1,2,3)»~
camelia rakudo-moar 90cd58: OUTPUT«Too many positional parameters passed; got 1 but expected 0␤ in sub postfix:<~> at /tmp/vin4GXc3w0:1␤ in sub flatmap at src/gen/m-CORE.setting:17669␤ in sub METAOP_HYPER_POSTFIX at src/gen/m-CORE.setting:17572␤ in block at /tmp/vin4GXc3w0:1␤␤»
xfix m: sub postfix:<~>($_) { ~$_ }; say (1,2,3)»~
camelia rakudo-moar 90cd58: OUTPUT«1 2 3␤»
xfix Isn't $_ implicit here?
TimToady not in a sub
xfix Oh, right.
PerlJam NotJack: if you don't have a listy thing, then you shouldn't be using << or >> :) 18:46
segomos m: start { sleep 50; };
camelia ( no output )
xfix I wasn't programming in Perl 6 for a long time.
dalek kudo/nom: 0db8ef4 | (Elizabeth Mattijsen)++ | src/core/ (2 files):
(Bag|Mix).pairs now return immutable Enums

Which I could return a Parcel rather than a List as well, but this still seems out of reach :-(
NotJack PerlJam: from the pre/post-fx operator's POV, there are only itemish things
TimToady hypers are really for compositie objects, not lists
NotJack the list is broken apart by the arrow-guys
TimToady generally you want Z or X to do stuff to lists
18:46 brrt joined
NotJack (what are the arrow guys called as a family?) 18:46
TimToady *composite
PerlJam NotJack: who do you think is in the family? 18:47
xfix « and » are probably as hard to explain as reference stuff in Perl 5. Or not.
TimToady we just call 'em hypers
NotJack PerlJam: << and >> and their little french cousins
both alone and in pairs
PerlJam ok, yeah ... hypers 18:48
NotJack are X and Z also hypers?
xfix Hypers are strange. They use Unicode, when barely anything uses these (except for those weird Q quotes).
PerlJam was starting to get the impression that maybe ==> and <== might have been included in the "family" for some reason.
18:48 BenGoldberg left
xfix ==> and <== are unrelated to hypers, I think. 18:48
NotJack PerlJam: no, those are in the "weiners" family
PerlJam heh
18:48 brrt left
PerlJam xfix: right, but I didn't know that NotJack knew that ;) 18:49
xfix Also, <== is totally less than assign operator, except it's totally not.
NotJack I've never met ==> before. It looks like "greater than or equal, but PLEASE PLEASE be equal"
xfix For that, you have to write (<=)=...
TimToady which is illegal, even if you write it correctly as [<=]= 18:50
dalek rl6-roast-data: e4cd548 | coke++ | / (4 files):
today (automated commit)
PerlJam NotJack: you don't know about the feed operators?
18:50 BenGoldberg joined
NotJack nope 18:50
I just check in on P6 every few months, haven't really spent time studying it in detail
TimToady std: say $_ [<=]= 42
camelia std ec3d853: OUTPUT«===SORRY!===␤Cannot make assignment out of <= because chaining operators are diffy at /tmp/WoC9bKQQj4 line 1:␤------> say $_ [<=]=⏏ 42␤Check failed␤FAILED 00:01 124m␤»
xfix Actually, no, (<=)= is not a shorcut.
What does (<=)= do anyway?
18:50 kivutar joined
TimToady fails to parse 18:51
PerlJam NotJack: See S03:4003
synopsebot Link: perlcabal.org/syn/S03.html#line_4003
segomos lol
xfix r: my $x = 5; $x (<=)= 4; say $x;
camelia rakudo-{parrot,jvm,moar} 90cd58: OUTPUT«False␤»
TimToady oh, wait, it's a setop
xfix std: my $x = 5; $x (<=)= 4; say $x;
camelia std ec3d853: OUTPUT«===SORRY!===␤Confused at /tmp/4KOOMWUuWg line 1:␤------> my $x = 5; $x ⏏(<=)= 4; say $x;␤ expecting any of:␤ feed_separator␤ infix or meta-infix␤ infixed function␤ statement modifier loop␤Parse failed␤FA…»
NotJack oh, neato!
xfix Hm, interesting.
TimToady though it should probably be marked as diffy
NotJack though I wish you'd thought of them before all the good 1-character tokens were taken...
TimToady and fail to parse :)
[Coke] .seen au 18:52
yoleaux I haven't seen au around.
PerlJam NotJack: with unicode we have an endless supply of "1-character tokens" ;)
xfix But it's not a great idea to use them all.
NotJack was already googling "unicode pipe symbols"
segomos what does it do?
TimToady what does (<=)= do? 18:54
xfix Using entire Unicode only leads to languages like Sclipting.
esolangs.org/wiki/Sclipting
TimToady m: my $a = set <a b c>; my $b = set <a b c d>; say $a (<=) $b 18:55
camelia rakudo-moar 90cd58: OUTPUT«True␤»
TimToady set a is a subset of set b
timotimo and [<=] ? ;)
er
xfix Language even has crazy operators like delete fourth element of array (鉻).
.u 鉻'
yoleaux U+0027 APOSTROPHE [Po] (')
timotimo [<=]=
xfix Oops.
TimToady but anything that takes sets as args and returns Bool is by definition "diffy" and shoudn't allow the assignment op to be formed
xfix .u 鉻
yoleaux No characters found
xfix .u U+927B 18:56
yoleaux No characters found
TimToady when used as an infix, [<=] is identical to <=
xfix I assume it just doesn't know this character.
PerlJam TimToady: Is diffy in the glossary?
TimToady when used as a prefix, it's a reduction of an infix 18:57
beats me
xfix when used as a postfix, it just doesn't work
TimToady doesn't look like it
18:57 Ben_Goldberg joined, BenGoldberg left
TimToady because <= isn't a valid expressoin 18:57
18:57 Ben_Goldberg is now known as BenGoldberg
TimToady you might get by with a warning by using <=> instead though 18:58
xfix when used as a term, it gives True
TimToady well, probably fatal
m: say [1,2,3][<=>]
camelia rakudo-moar 90cd58: OUTPUT«Cannot call 'Real'; none of these signatures match:␤:(Mu:U \v: *%_)␤ in method Real at src/gen/m-CORE.setting:3778␤ in sub infix:<<> at src/gen/m-CORE.setting:4304␤ in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:2491␤ in block at /tmp/…»
TimToady looks pretty fatal 18:59
18:59 brrt joined
xfix How does Perl 6 disambiguate between reduction and array syntax anyway? 18:59
TimToady it's one of the two spots in the grammar where it can backtrack 19:00
and reductions do not allow whitespace, which helps
and most array literals use commas, whitespace, and/or sigils, all of which are uncommon in operators
xfix Hm, ok. Just wondering, what is the second spot where the grammar can backtrack? 19:01
TimToady the place where it decides to stop interpolating an expression has to end in some kind of brackets, but it can't know that till it tries
"$foo.bar.baz" vs "$foo.bar.baz()" 19:02
dalek ecs: c033551 | (Elizabeth Mattijsen)++ | S99-glossary.pod:
Add empty "diffy" lemma *nudge* *nudge*
19:02 tobiasvl left, pippo joined
PerlJam lizmat++ (less subtle than I ;) 19:02
xfix Ok. So, if I understand correctly, `[*]` gives 1, but `[* ]` gives array of one `WhateverCode.new()`.
19:03 treehug8_ joined
TimToady you probably want "iffy" and "fiddly" there too :) 19:03
xfix: correct
so would [*,]
or [$x] if $x contains * :) 19:04
pippo o/ #perl6
dalek kudo/nom: 5d88134 | (Elizabeth Mattijsen)++ | src/core/Set.pm:
Oops, forgot Set.pairs: it now also returns Enums
TimToady and presuming nobody has defined an infix:<$x>
xfix Doesn't look that bad. How often the arrays have one WhateverCode.new() without any whitespace either way.
infix:<$x> sounds rather evil. 19:05
19:05 treehug88 left
TimToady well, yes, but it's just a DIHWIDT 19:05
(pretty sure that one's in the glossary :)
xfix Hm, thanks.
(why Perl 6 website has two glossaries...) 19:06
vendethiel There is More Than One Way To Spell It.
pippo p6: my @a; @a.push: $("one,two,three".split(',')); say @a;
lizmat S99:289
synopsebot Link: perlcabal.org/syn/S99.html#line_289
camelia rakudo-parrot 90cd58, niecza v24-109-g48a8de3: OUTPUT«one two three␤»
..rakudo-{jvm,moar} 90cd58: OUTPUT«␤»
xfix vendethiel, that applies to everything, including Python.
vendethiel :) 19:07
Spelling is hard !
pippo Could somebody file a bug for this ? ^^
xfix Naming things is hard.
I'm sure that everything can be done in infinity ways in any programming language. 19:08
lizmat ah, but not all languages have this:
m: say 42.WHY 19:09
camelia rakudo-moar 90cd58: OUTPUT«Life, the Universe and Everything␤»
xfix For example, in Python you can print using print() or sys.stdin.write().
sys.stdout.write()
*
I'm totally not thinking about what I write. Why anybody would write to STDIN?
19:09 NotJack left
TimToady to see if it works? 19:09
xfix IOError: File not open for writing 19:10
It doesn't, at least in Python.
masak <[Coke]> masak: you can add cubes in such a way that water could get in a space and then not.
[Coke]: yes.
xfix But it seems to work in Perl 6... 19:11
masak [Coke]: I didn't assume that you'd always add static water under that model. sometimes you remove it.
xfix rn: $*IN.say: "lol"
camelia rakudo-jvm 90cd58: OUTPUT«This handle does not support print␤ in method print at gen/jvm/CORE.setting:13989␤ in method say at gen/jvm/CORE.setting:14000␤ in block at /tmp/tmpfile:1␤␤»
dalek ast: a5595df | (Elizabeth Mattijsen)++ | S02-types/ (3 files):
Tests about immutability of (Set|Bag|Mix).pairs
masak [Coke]: basically, each body of water needs to observe each empty cell in it, and be notified when it changes.
camelia ..rakudo-moar 90cd58: OUTPUT«Failed to write bytes to filehandle: bad file descriptor␤ in method print at src/gen/m-CORE.setting:14046␤ in method say at src/gen/m-CORE.setting:14057␤ in block at /tmp/tmpfile:1␤␤»
..niecza v24-109-g48a8de3: OUTPUT«Unhandled exception: Excess arguments to Mu.say, used 1 of 2 positionals␤ at /home/p6eval/niecza/lib/CORE.setting line 0 (Mu.say @ 1) ␤ at /tmp/tmpfile line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4595 (ANON @ 3) ␤ …»
camelia ..rakudo-parrot 90cd58: OUTPUT«IO PMC FileHandle is not in mode 2␤ in method print at gen/parrot/CORE.setting:13981␤ in method print at gen/parrot/CORE.setting:13979␤ in method say at gen/parrot/CORE.setting:13992␤ in method say at gen/parrot/CORE.setting:1059␤ in block…»
xfix Or not.
masak [Coke]: oh, I want to write that now :) but I will follow moritz++' sage advice.
TimToady for some strange definition of "seems to" :)
xfix Weird. It seems to work for me.
~ $ perl6 -e '$*IN.say("lol")' 19:12
lol
masak xfix: I wouldn't expect that to work.
flussence $*IN and $*OUT are both the /dev/tty* there.
xfix Perhaps it's because I run this in terminal emulator, or something.
19:13 darutoko left
flussence ~ $ echo lol > /dev/stdin 19:13
lol
xfix Because file handle reuse is the best way to go.
Who needs separate file handles for STDOUT and STDIN either way?
lizmat pippo: filing a bug is just as easy as sending an email to [email@hidden.address]
geekosaur masak: the typical startup for unix-style terminals, with error and sanity checking removed, is: open(/dev/tty), dup(), dup() 19:14
xfix In terminal emulator, /dev/fd shows that every file handle is /dev/pts/1.
In Linux terminal (tty1), every file handle is /dev/tty1.
lizmat pippo: usually an edited copy of the IRC conversation is enough (and a good Subject: of course) 19:15
geekosaur and it is opened O_RDWR and there are programs which rely on this (consider piping output to more / less)
pippo lizmat: thank you I'll do then. Do you agree it a bug?
lizmat yes
flussence stdout is standard output, stdin is non-standard output :)
lizmat the array receives an empty itemized list
that is wrong
pippo lizmat: OK. Filing... :-)
lizmat m: my @a;@a.push: $("one,two,three".split(",")); say @a.perl 19:16
camelia rakudo-moar 90cd58: OUTPUT«Array.new(().list.item)␤»
lizmat j: my @a;@a.push: $("one,two,three".split(",")); say @a.perl
camelia rakudo-jvm 90cd58: OUTPUT«Array.new(().list.item)␤»
xfix Hm, I closed my terminal by writing to /dev/fd/4.
fish shell crashes in this case, apparently.
geekosaur tsk
most shells should give you an error like "bad file descriptor" and a prompt 19:17
xfix But dev builds show 'Unknown wakeup byte 62 in iothread_service_completion' and 'Unknown wakeup byte 0a in iothread_service_completion', so I guess it's fixed. 19:18
geekosaur aha, it's using it internally, that would do it
19:18 brrt left, hoverboard is now known as moistcherry
xfix In current version, I get assertion failure. 19:22
But considering it's internal, it makes sense.
19:23 raiph joined
lizmat m: my @a;@a.push: $("one,two,three".map: * ~ "a"); say @a.perl # seems to do with map in an item context 19:25
camelia rakudo-moar 90cd58: OUTPUT«Array.new(().list.item)␤»
lizmat pippo: ^^
xfix Shouldn't it return Array.new("one,two,threea")? 19:26
lizmat yes, that's the bug pippo found 19:27
19:27 brrt joined
xfix Yes, `.map` with constant element is pointless, but this should be automatically used in list context. 19:27
And not empty list context. 19:28
lizmat xfix: my code is just a golf of the problem
19:28 erdic joined
xfix Still, it's a bug either way. 19:29
Even if it would affect only string constants.
PHP may have silly grammar which doesn't make sense, and gives errors for completely logical requests, but Perl 6 has higher standards for grammar. 19:30
lizmat indeed
[Coke] how is one,two,threea the wrong answer? you expect a comma separated string to magically be a list?
lizmat I also found it is not a spesh problem, or an optimization issue 19:31
xfix [Coke], the problem is that `.map` doesn't see "one,two,three".
lizmat (aka, running with MVM_SPESH_DISABLE=1 or --optimize=0 gives the same problem)
xfix Array.new("one,two,threea") is correct here.
masak FROGGS: jnthn knew about "what what" before I did, so he's likely the original contaminant^Wsource.
lizmat m: my @a;@a.push: ("a".map: * ~ "a"); say @a.perl # shorter golf
camelia rakudo-moar 5d8813: OUTPUT«Array.new("aa")␤»
lizmat m: my @a;@a.push: ("a".map: * ~ "a").item; say @a.perl # the .item makes the difference 19:32
masak .oO( jnthn, a frothy mix of puns and meta-object protocols )
camelia rakudo-moar 5d8813: OUTPUT«Array.new(().list.item)␤»
xfix r-m: say 0o9
camelia rakudo-moar 5d8813: OUTPUT«===SORRY!=== Error while compiling /tmp/1219rcwE4r␤Confused␤at /tmp/1219rcwE4r:1␤------> say 0⏏o9␤ expecting any of:␤ whitespace␤»
xfix PHP is completely fine with 09, and gives 0.
(not that it's a good language, or anything) 19:33
masak xfix: hint: the "and gives 0" part *is wrong*!
xfix That's PHP. It doesn't make sense.
19:33 BenGoldberg left
[Coke] hurls the-toast.net/2014/05/27/ayn-rands-...ers-stone/ for... masak? moritz? someone. 19:33
xfix ~ $ php -r 'var_dump(019);'
int(1)
masak [Coke]: saw it flash by today. you sayin' it's good? then I will peruse. 19:34
xfix Why do you think there are lots of articles against PHP.
masak I'd rather we stop talking about PHP :/
dalek ecs: bde9972 | (Elizabeth Mattijsen)++ | S99-glossary.pod:
Add lemma's for "golf" and "golfing"
xfix Hm, ok.
masak thank you.
I think I've pinpointed the reason why colomon and [Coke] were uneasy about adding integers to date objects.
is it because "first you numify both sides" doesn't seem to happen in this case? 19:35
and so it feels like an exception, or an abuse of the arith ops?
vendethiel pls php. 19:36
19:37 treehug8_ left, efg joined, atroxaper left 19:40 baest joined
lizmat m: my @a;@a.unshift: ("a".map: * ~ "a").item; say @a.perl # unshift suffers the same problem 19:41
camelia rakudo-moar 5d8813: OUTPUT«Array.new(().list.item)␤»
19:42 treehug88 joined 19:44 kivutar left
moritz [Coke]: thanks for the link, I had a good chuckle :-) 19:44
dalek ecs: 60d136b | masak++ | S99-glossary.pod:
[S99] also add empty 'fiddly', 'iffy' entries
19:45
masak writing explanations for diffy/fiddly/iffy now. 19:48
moritz is also writing an explanatino for iffy now 19:49
my current definition is: 19:50
Like an "if condition", that is, returns a C<Bool>, or something that can be
easily and intuitively interpreted as a boolean value
19:50 NotJack joined 19:53 kaare_ left, moistcherry is now known as hoverboard 19:57 kivutar joined 19:58 kivutar left, SevenWolf joined
dalek ecs: 42e6cd7 | masak++ | S99-glossary.pod:
[S99] explain diffy, fiddly, iffy
20:01
masak lizmat: ^
lizmat masak++
masak moritz: let me know if there's anything in those definitions you'd like to change.
moritz: I focused a bit on why we have those definitions, too. what they are for.
20:01 treehug88 left
efg wtf en.wikipedia.org/wiki/Why_the_lucky_stiff 20:03
20:03 treehug88 joined
masak efg: you're not being clear enough. 20:10
moritz: actually, I'm not sure we have any iffy operators any more that return something "like a Bool". infix:<%> used to be one, but we broke the boolean interpretation out into infix:<%%> (while also flipping it). 20:11
20:12 hoverboard is now known as cholby 20:13 nebuchad` joined 20:14 cholby is now known as hoverboard, beastd joined 20:15 spider-mario left, Psyche^ joined 20:16 brrt left 20:17 spider-mario joined
moritz masak++ # I really like your explanations 20:17
btyler is perl6's lack of -i ( as in, perl -pi -e) a deliberate omission, or just NYI? 20:19
moritz NYI
S19 says
Modify files in-place. Haven't thought about it enough to add yet, but 20:20
I'm certain it has a strong following. {{TODO review decision here}}
20:20 JimmyZ_ joined, Su-Shee_ joined, segomos_ joined, ponbiki_ joined, erdic_ joined 20:21 Psyche^_ left, erdic left, brother joined, djanatyn joined 20:22 apejens joined
btyler woo, cool. I was digging around for where that would get slotted in, but the command line flag parsing seems to be a bit spread out -- some things in src/Perl6/Compiler.nqp, some in src/Perl6/Actions.nqp. seems like Actions.nqp would be the right place, given that -n and -p are also implemented there 20:23
moritz btyler: src/main.nqp sets up the command line parser to accept options 20:24
20:24 anaeem___ left
moritz btyler: as you said, -n and -p are implemented in Actions.nqp, because they generate extra code; -i would need to go there too, I guess 20:25
btyler oh, jeez, need to work on my ack-foo, missed src/main.nqp 20:26
moritz not easy to find with ack/grep 20:27
20:28 vendethiel joined 20:30 erdic_ left, erdic_ joined, erdic_ is now known as erdic 20:31 anaeem1__ joined, rindolf left 20:35 bjz_ joined 20:40 bjz_ left
masak S19 certainly needs some love. 20:42
maybe some day I'll feel up to it. 20:43
I do have the interest/motivation.
lizmat pippo: did you submit the rakudobug yet ? 20:44
Ah, just seeing it come in: #121994 20:45
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=121994
lizmat great, I think I have a temporary fix
so I can write tests, commit the fix and refer to the ticket number :-) 20:46
masak: I guess moar's speed makes oneliners a more agreeable proposition 20:51
20:52 anaeem1__ left
masak lizmat: oh yes. 20:53
I already feel more inclined to use perl6 for oneliners.
I've done it several times today.
[Coke] r: "one,two,three".split(',').perl.say 20:54
lizmat I use this alias: alias 6='perl6 --ll-exception -MTest -e'
camelia rakudo-{parrot,jvm,moar} 5d8813: OUTPUT«("one", "two", "three").list␤»
[Coke] m: $("one,two,three".split(',')).perl.say
camelia rakudo-moar 5d8813: OUTPUT«("one", "two", "three").list.item␤»
pippo lizmat: Great! Lizmat++
20:55 hoverboard left
lizmat [Coke]: it goes wrong if there is a lazy list in an item as part of the push/unshift 20:55
[Coke] m: my @a; @a.push: qw<one two three>; say @a;
camelia rakudo-moar 5d8813: OUTPUT«one two three␤»
lizmat a .gimme(1) seems to fix it
[Coke] ^^ isn't that the same thing as the with the $(...) ? 20:56
20:56 raiph left
lizmat m: my @a;@a.push: ("a".map: * ~ "a").item; say @a.perl # the .item makes the difference 20:56
camelia rakudo-moar 5d8813: OUTPUT«Array.new(().list.item)␤»
lizmat [Coke]: you mean ^^^ ? 20:57
jnthn evening, #perl6
lizmat jnthn o/
dalek kudo/nom: 878fc98 | (Elizabeth Mattijsen)++ | src/core/List.pm:
Temporary (?) fix for #121994
20:58
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=121994
lizmat jnthn: you might want to look at ^^^ when there's time
$ 6 'my @a;@a.push: ("a".map: * ~ "a").item; say @a.perl' 20:59
Array.new(("aa",).list.item)
21:00 bluescreen10 left
jnthn lizmat: (Java 8 article) Hmm, that StampedLock thingy will need some care to use... Not one I'd like to see us nab. 21:01
lizmat I was more thinking of somehow using that under the hood 21:02
as part of some optimization
jnthn ah 21:03
pippo my @a; @a.push: $("one,two,three".split(',')); say @a; 21:05
m: my @a; @a.push: $("one,two,three".split(',')); say @a;
camelia rakudo-moar 5d8813: OUTPUT«␤»
jnthn m: my @a; @a.push: $(<one two three>); say @a; 21:06
camelia rakudo-moar 5d8813: OUTPUT«one two three␤»
jnthn m: say ("one,two,three".split(',')).DUMP
camelia rakudo-moar 5d8813: OUTPUT«(signal )use of uninitialized value of type Any in string context␤use of uninitialized value of type Any in string context␤use of uninitialized value of type Any in string context␤use of uninitialized value of type Any in string context␤»
lizmat jnthn: it only seems to happen if the inside of the .item is a lazy list
.split uses .map 21:07
jnthn That fix is almost certainly wrong.
lizmat I bet it is :-)
that's why I marked it as temporary :-)
jnthn m: say (my $ = "one,two,three".split(','))
camelia rakudo-moar 5d8813: OUTPUT«one two three␤»
jnthn hmmm
lizmat afaik, it's matching the single value .push candidate with an itemized lazy list 21:08
pippo lizmat: I tryed your patch... the result of the above is Array.new(("one",).list.item)
:-( 21:09
lizmat hmm... then maybe it needs a .gimme(*) after all
duh, of course
going to spectest that before committing :-) 21:10
pippo lizmat: :-)
I do not know if this could help debugging. But like this it works: 21:11
m: my @a; @a[0].push: $("one,two,three".split(',')); say @a.perl
camelia rakudo-moar 5d8813: OUTPUT«Array.new([("one", "two", "three").list.item])␤»
lizmat pippo: that's not what you originally had
pippo lizmat: mind the "@a[0]" 21:12
21:13 fridim_ left
lizmat anyway: that's a workaround, not a fix :-) 21:14
21:14 anaeem1_ joined
pippo lizmat: yes. I was only showing you in case it would help understand the reason for the bug. 21:15
lizmat since @a[0] is Any, you're actually doing an Any.push, which is another code path altogether 21:16
pippo lizmat: I am only increasing entropy. Sorry! :-)
lizmat nonono, don't worry :-) 21:17
pippo :-)
21:19 anaeem1_ left
dalek kudo/nom: b91eeb4 | (Elizabeth Mattijsen)++ | src/core/List.pm:
We need .gimme(*) to fix #121994 (temporarily)
21:19
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=121994
dalek ast: 6538a38 | (Elizabeth Mattijsen)++ | S02-types/lazy-lists.t:
Add tests for #121994
21:24
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=121994
pippo lizmat: compiled and tested OK on both -j and -m. Thank you! 21:26
lizmat yw :-) and thanks for reporting!
pippo lizmat: good night. :-)
lizmat good night, pippo!
21:26 pippo left 21:27 hoverboard joined
segomos_ what would be the proper way to do stuff with a socket in p6 without blocking? 21:28
timotimo we'll have supply-based async sockets in moar and jvm
i seem to recall on one of the backends we already have that
i think the only thing we're missing is binary socket stuff with supplies on moar 21:29
or something
lizmat we have async sockets on moar
IO::Socker::Async 21:30
21:30 Rotwang left
lizmat *Socket 21:30
timotimo neato!
segomos_ i'll check it out, thank you
21:31 spider-mario left
lizmat gist.github.com/jnthn/11126125 21:32
segomos_ ^^^ for an example 21:33
21:35 xenoterracide joined
segomos_ ty - that's probably easier than reading core :) 21:35
gist.github.com/tony-o/b11e87e582d56b1a1979 21:45
this is segfaulting when i run 'ab' against it or after a seemingly random number of requests 21:46
21:46 raiph joined
segomos_ perl6-j runs that p damn quickly, though which is cool 21:47
lizmat segomos_: I'm afraid you've run into a problem that's already high on jnthn's list of things to look into
segomos_ java.lang.IllegalStateException: Current state = RESET, new state = CODING_END
lizmat: ahh okay, thank you
lizmat it seems as soon as the number of scheduled tasks exceeds the number of threads
significantly, there is some race condition that corrupts memory 21:48
21:48 hoverboard left
lizmat jnthn assumes it is a Moar problem, but I wouldn't be surprised we're tickling something in libuv 21:48
segomos_ i got it to error out with perl6-j too after three 'ab' runs: -c 5 -n 100 21:49
lizmat you could try playing with $*SCHEDULER = Scheduler.new( :maxthreads(64) ) 21:50
or maybe a lower value
(default is 16_
)
hmmm... with JVM as well ? 21:51
hmmm....
segomos_ ahh okay - i'll screw around with it..i'm safe in thinking the syntax of IO::Socket::Async isn't going to change much?
yea JVM as well
21:53 ivanshmakov joined
lizmat segomos_: good question. At the moment I don't see a reason why it would change 21:54
but you *are* bleeding edge here :-) 21:55
21:56 ivanshmakov left, ivanshmakov joined
segomos_ i'm excited about it, i'm writing a simple REST type server to learn it 21:57
lizmat
.oO( note to self: should write IO::Socket::Async tests )
22:01
$ ack IO::Socket::Async t/spec
$
masak I just re-found blogs.perl.org/users/sawyer_x/2012/...-13th.html and had a good time writing a Haskell solution tonight.
here's the Haskell solution: gist.github.com/masak/8918fee408cf8368e405 22:02
I couldn't comment on the blog post itself. something is wrong with blogs.perl.org :/
masak finds SawyerX on Twitter instead
yay, Twitter seems to work, at least. 22:05
PerlJam I like SawyerX's comment about mortiz's perl6 one-liner. 22:08
"...how I thought of the solution I tried to code."
er, s/SawyerX/Aristotle/ 22:09
22:09 xenoterracide left 22:10 treehug88 left
masak yes, that's a great way to put it. 22:11
fwiw, that's how I felt when writing the Haskell solution too -- that I was expressing "the same" solution in a different medium.
22:11 jack_rabbit left
lizmat calls it a day... 22:13
gnight, #perl6!
masak 'night, lizmat
22:14 beastd left 22:17 panchiniak joined 22:24 nebuchad` is now known as nebuchadnezzar 22:25 Pleiades` left 22:29 hoverboard joined, ajr_ left, Pleiades` joined 22:32 jack_rabbit joined 22:37 bjz_ joined
masak hehe. the Python guy (who got upset about my handling of t3) is back. :) 22:40
he's upset about my handling of t4. :)
jnthn "It took forever, man!" :P 22:42
22:42 jack_rabbit left 22:43 bjz_ left 22:44 jnap left
dalek ecs: 668d386 | masak++ | S99-glossary.pod:
[S99] some more explanation on 'golf'
22:45
22:49 kurahaupo left
masak jnthn: no, he's upset because (a) no-one completely succeeded with the task, and (b) apparently he told me so, and (c) he finds the whole thing about air pressure to be making the problem much harder, even though I've asserted (in the task spec and to him directly) that air pressure doesn't enter into it 22:51
but on the whole, it's kind of nice to have a critic.
it's like, "yay! somebody actually reads my blog!" :P
22:52 NotJack left
masak 'night, #perl6 22:52
22:57 efg left
segomos_ do i need to explicitly accept connections from IO::Socket::Async ? 23:12
(server)
23:12 denis_boyun_ left 23:15 hoverboard left 23:18 FOAD joined, hoverboard joined 23:19 hoverboard left
jnthn segomos_: no 23:19
segomos_ jnthn: i can't seem to get the chars_supply.tap on the server to read data coming in 23:22
for an http requests
/s$//
jnthn Odd
I scribbled gist.github.com/jnthn/11127634 which served up pages at the time I wrote it... 23:23
The Async socket stuff needs some love yet, though...
jnthn knows of at least one race condition...
segomos_ are you binding to the char_supply tap to keep it alive ? 23:26
line#22
jnthn no, because I write too much NQP :P
It's kept alive by the lower level handler that feeds chunks into it having it referenced, though.. 23:27
That $tap is unused here, it seems
23:28 BenGoldberg joined
segomos_ gist.github.com/tony-o/e9ea977f97175042a66f 23:29
this one never says anything 23:30
presumed it would from line 6
jnthn How should done know when to trigger?
That can only really happen if the sender closes the connection.
segomos_ it doesn't -
yea i realized that a while ago, i haven't done anything with it yet though. I'm still trying to get it to even read the headers 23:31
jnthn You can't do it in "done", though. The client sends stuff, then waits for a response, and never does a close.
Thus why mine is looking through the headers in the "more", to find when a complete set of headers was received. 23:32
segomos_ i've updated the gist
jnthn @chunks.push; # that's a no-op? 23:33
segomos_ for right now, yea
i'd be happy with it just closing the socket on read at this point 23:34
23:34 sorear left 23:35 ponbiki_ is now known as ponbiki 23:37 sorear joined 23:38 btyler left
segomos_ i can get that to work for every other request 23:41
23:43 pecastro left
segomos_ your example does the same, guess i'll be patient and watch more of your talks jnthn 23:43
23:44 rurban joined 23:45 rurban left
jnthn segomos_: Well, don't think watching my talks will help when you're hitting an impl bug I'm aware of ;) 23:48
segomos_: I'll get to it soon, just tied up with some other things at the moment. :)
Should have more time for this stuff after the weekend. 23:49
sleep & 23:53
23:54 jnap joined