»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:02 keeth left 00:05 Moukeddar joined
sorear perl6: my $x = 999999; substr($x,2,2)++; say $x 00:08
p6eval rakudo 6ae3c9: OUTPUT«Cannot modify readonly value␤ in '&infix:<=>' at line 1␤ in main program body at line 7637:CORE.setting␤»
..niecza v4-79-g79a8315: OUTPUT«Unhandled exception: cannot increment a value of type Str␤ at /home/p6eval/niecza/lib/CORE.setting line 413 (CORE die @ 2)␤ at /home/p6eval/niecza/lib/CORE.setting line 23 (CORE Mu.succ @ 4)␤ at line 0 (ExitRunloop @ 0)␤ at /tmp/8sQatjnLEQ line 1 (MAIN mainline
..@ 1)␤ at /home…
..pugs: OUTPUT«9910099␤»
sorear perl6: my $x = 999999; substr($x,2,2) += 1; say $x
p6eval rakudo 6ae3c9: OUTPUT«Cannot modify readonly value␤ in '&infix:<=>' at line 1␤ in main program body at line 22:/tmp/lEttVy4EmT␤»
..pugs, niecza v4-79-g79a8315: OUTPUT«9910099␤»
00:14 uniejo_ left 00:17 [Coke] left 00:19 [Coke] joined 00:22 pothos left, y3llow left 00:25 Moukeddar left 00:26 Moukeddar joined 00:32 jaldhar joined 00:38 y3llow joined 00:46 bluescreen__ left 00:47 whiteknight left 00:48 justatheory left 01:00 mjreed joined 01:05 Moukeddar_ joined 01:06 Moukeddar left 01:11 mtk0 left, justatheory joined 01:12 Moukeddar_ left 01:13 fhelmberger joined
mjreed what's a good way to deal with pre-lexer passes in PGE? 01:14
I'm thinking of things that don't fit well at the tokenizing level. Things like C-style (as opposed to Lispy) macro expansion, or the way you can write "!" instead of "'." in INTERCAL, stuff like that. 01:16
01:18 apejens left 01:19 ascent_ joined, plobsing left, apejens joined, cxreg2 joined, plobsing joined, never_ joined, itz_ joined 01:20 mtk0 joined, Su-Shee_ joined, Trashlord left, PacoLinux left, never left, cxreg left, justatheory left, ggoebel left, Su-Shee left, itz left, patch_ left, sirmacik left, patch_ joined, justatheory joined, ggoebel joined, sirmacik joined, PacoLinux joined 01:22 Trashlord joined
sorear mjreed: modify the string before parsing it 01:26
mjreed: also, PGE is not maintained any more
mjreed so what are we supposed to write grammars in these days? 01:28
or, well, I assume we still write them as perl6 grammars... but what processes them if not pge? I thought pge was what rakudo used. 01:38
benabik mjreed: We still use p6 grammars, but it's not implemented with PGE anymore IIRC. 01:39
sorear mjreed: We use actual Perl 6 grammars these days
Using one of the Perl 6 subset implementations
rather than a specialized grammar processor like PGE 01:40
mjreed ok. docs says that rakudo *uses* pge as part of its implementation; guess that's out of date. 01:41
so I'll stop talking about PGE and just talk about perl 6 grammars/rules.
01:42 stkowski left
sorear mjreed: Rakudo hasn't used PGE since February 2010 01:42
and it was one of the last major users
01:51 woosley joined 01:59 cdarroch left 02:02 keeth joined 02:04 leprevost joined 02:20 keeth left 02:24 keeth joined 02:29 keeth left, nymacro joined 02:32 mjreed left 02:36 envi joined 03:04 hudnix left 03:10 agentzh joined
dalek ecza: 185c435 | sorear++ | Makefile:
Add a Makefile rule to build and test release tarballs
03:11
03:14 agentzh left 03:20 agentzh joined 03:23 cxreg2 is now known as cxreg, Su-Shee joined 03:24 Su-Shee_ left, agentzh left 03:32 agentzh joined 03:39 agentzh left 03:45 agentzh joined 03:53 agentzh left 03:56 ymasory left 03:58 agentzh joined 04:01 newbee joined
newbee hi all... 04:01
sorear Hello newbee. 04:02
Welcome to #perl6!
You might want to pick a more unique name. We've all been newbies at some time. :)
newbee oh, well, i started learning perl6 just 2 weeks ago :) 04:04
btw, im here with a question :)
sorear Excellent. We love those.
newbee how should i write something like this? class TimeOfDay { has $.hour { where 0 >= $.hour <= 23 }; } 04:05
sorear class TimeOfDay { has $.hour where 0..^24 } 04:06
if that doesn't work, try: subset Hour of Int where 0 ..^ 24; class TimeOfDay { has Hour $.hour }
newbee rakudo: class TimeOfDay { has Int $.hour where 0..23 }; 04:07
p6eval rakudo 6ae3c9: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 22␤»
sorear (either one will only work on Rakudo)
04:10 agentzh left
newbee subset Hour of Int where 0 ..^ 24; class TimeOfDay { has Hour $.hour }; my $tod = TimeOfDay.new(hour => 12); say $tod.hour; my $tod2 = TimeOfDay.new(hour => 25); say $tod2.hour; 04:11
rakudo: subset Hour of Int where 0 ..^ 24; class TimeOfDay { has Hour $.hour }; my $tod = TimeOfDay.new(hour => 12); say $tod.hour; my $tod2 = TimeOfDay.new(hour => 25); say $tod2.hour;
p6eval rakudo 6ae3c9: OUTPUT«12␤25␤»
04:12 satyavvd joined
newbee rakudo: class TimeOfDay { has Int $.hour where 0..23; }; 04:13
p6eval rakudo 6ae3c9: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 22␤»
newbee mmm it does not enforce the limit on "hour" :( 04:17
04:17 ymasory joined
sorear that's weird 04:18
rakudo: say 25 ~~ (0 ..^ 24)
04:18 agentzh joined
p6eval rakudo 6ae3c9: OUTPUT«Bool::False␤» 04:18
newbee rakudo: say 25 ~~ (0..^24) 04:20
p6eval rakudo 6ae3c9: OUTPUT«Bool::False␤»
newbee ok, is late here, good night and thanks :) 04:23
sorear no problem, and come again!
04:24 leprevost left 04:27 sunnavy left 04:28 newbee left 04:29 sunnavy joined 04:37 agentzh left
dalek ecza: 5fa26c5 | sorear++ | src/NieczaCompiler.pm6:
Remove outdated use of GetNow internal call
04:40
ecza: 4d3df1b | sorear++ | / (2 files):
Finish fixing up make reboot
sorear I now have a niecza-v5.zip sitting on my hard drive, but I seem to have broken the GitHub file uploader
04:42 agentzh joined 04:43 birdwindupbird joined 04:47 agentzh left 04:48 ymasory left 04:50 birdwindupbird left 04:55 agentzh joined 05:06 agentzh left, jon8 left
dalek ecza: becc5ce | sorear++ | docs/announce.v5:
Write v5 release announce
05:10
ecza: 506560a | sorear++ | FETCH_URL:
Update bootstrap URL
05:13 agentzh joined
sorear release announcement sent. 05:15
05:31 birdwindupbird joined 05:32 agentzh left 05:48 Mowah joined 05:49 sftp joined 05:50 agentzh joined 05:55 sftp left 06:02 miso2217 left 06:08 agentzh left
moritz sorear++ # v5 of v6 :-) 06:08
06:14 Vlavv_ left 06:23 agentzh joined 06:27 SHODAN joined 06:30 Vlavv_ joined 06:34 mj41 joined, birdwindupbird left 06:42 agentzh left, miso2217 joined 06:46 SHODAN left 06:49 aindilis left 06:58 beppu left, agentzh joined, beppu joined 07:02 donri joined 07:03 birdwindupbird joined, agentzh left, am0c left 07:19 noganex joined 07:20 Jdoneright joined 07:21 noganex_ left 07:24 noganex left, noganex joined 07:34 _twitch joined 07:38 agentzh joined 07:41 SHODAN joined
sorear out 07:43
07:45 agentzh left 07:49 birdwindupbird left 07:50 birdwindupbird joined, agentzh joined 07:54 agentzh left 07:59 wamba joined 08:02 agentzh joined 08:05 birdwindupbird left
tadzik it's almost like a real v6! :) 08:15
08:18 cotto left 08:20 wamba left 08:22 cotto joined 08:23 justatheory left, justatheory joined
snarkyboojum sorear: I'm amazed that "real multi dispatch" == "isn't as much cool new stuff as I'd like" - great release :) 08:23
08:27 justatheory left 08:29 agentzh left 08:33 cromartie-x182 joined 08:34 cromartie-x182 left 08:44 agentzh joined 08:58 _twitch left 08:59 mtk0 left 09:03 agentzh left 09:08 mtk0 joined 09:18 Mowah left 09:20 agentzh joined, Su-Shee_ joined 09:23 Su-Shee left 09:25 Su-Shee_ is now known as Su-Shee 09:35 noganex left, noganex_ joined 09:37 pernatiy left 09:39 woosley left 09:54 am0c joined 09:58 birdwindupbird joined, agentzh left 10:03 mikemol left 10:04 tylercurtis left, sivoais left, ruoso left, sunnavy left, TiMBuS left 10:13 agentzh joined 10:18 tzhs joined 10:21 amkrankruleuen left, amkrankruleuen joined 10:24 wamba joined 10:29 wamba left 10:39 REPLeffect left 10:48 woosley joined 10:54 tzhs left 11:03 Mowah joined 11:11 risou joined 11:35 risou left 11:40 agentzh left 11:41 tylercurtis joined, ruoso joined 11:46 risou joined 11:47 dakkar joined 11:48 mikemol joined 11:51 mikemol left, mtk0 left 11:52 Trashlord left 11:53 mikemol joined 11:56 mtk joined 11:59 mtk left 12:04 mtk joined 12:07 birdwindupbird left, pernatiy joined
moritz std: m:s/[a| ]/ 12:07
p6eval std 9f27365: OUTPUT«ok 00:01 113m␤» 12:08
moritz std: m/[a| ]/
p6eval std 9f27365: OUTPUT«===SORRY!===␤Null pattern not allowed at /tmp/VBaNc7c86G line 1:␤------> m/[a| ⏏]/␤ expecting any of:␤ quantifier␤ regex atom␤Parse failed␤FAILED 00:01 113m␤»
12:13 Moukeddar joined
takadonet morning all 12:15
12:18 SHODAN left
Moukeddar morning Sir 12:18
12:20 MayDaniel joined
moritz std: m/ / 12:24
p6eval std 9f27365: OUTPUT«===SORRY!===␤Null pattern not allowed at /tmp/Ablb1Ce4Mi line 1:␤------> m/ ⏏/␤ expecting quantifier␤Parse failed␤FAILED 00:01 113m␤»
moritz std: m:s/ /
p6eval std 9f27365: OUTPUT«ok 00:01 113m␤»
12:31 Patterner left, leprevost joined 12:33 Psyche^ joined, Psyche^ is now known as Patterner 12:35 birdwindupbird joined, risou left 12:36 MayDaniel left 12:38 mberends joined
mberends ++asparagus! 12:38
phenny mberends: 05 May 08:51Z <moritz> ask mberends if likes/fancies asparagus
mathw mmmm asparagus 12:39
mberends phenny, tell moritz yes, especially fresh in season
phenny mberends: I'll pass that on when moritz is around.
mberends (the home region in .nl is the local asparagus epicentre :) 12:41
moritz \o/
phenny moritz: 12:39Z <mberends> tell moritz yes, especially fresh in season
mberends afk & # shopping and eating
sorry moritz, gtg
moritz no problem
12:41 mberends left 12:44 risou joined
colomon asparagus++ 12:46
12:46 Moukeddar left 12:47 plainhao joined 12:48 risou left 12:50 hudnix joined
moritz indeed 12:51
12:53 wamba joined 12:54 pmurias joined
tadzik szparagi? 12:55
moritz spargel in german
so sounds vaguely correct
12:57 sunnavy joined
tadzik phenny: "szparagi"? 12:59
phenny tadzik: "asparagus" (pl to en, translate.google.com)
tadzik aye
13:02 satyavvd left, bluescreen10 joined
pmichaud good morning, #perl6 13:03
github.com/pmichaud/rakbench/blob/...051910.txt # latest benchmark timing runs 13:04
takadonet pmichaud: morning
13:08 bluescreen10 left 13:09 bluescreen10 joined
tadzik pmichaud: good morning. -pl indicates the bacek's wonderpatch? 13:10
pmichaud tadzik: yes. 13:12
I should probably add that to the report somewhere.
13:13 orafu left 13:14 orafu joined 13:15 wamba left 13:18 tty234_ left, sunnavy left 13:19 sunnavy joined, sunnavy left, sunnavy joined 13:21 plobsing left 13:23 plobsing joined 13:30 jaldhar left 13:35 Su-Shee_ joined 13:36 sftp joined 13:37 tty234 joined 13:38 icwiener joined 13:39 Su-Shee left, Su-Shee_ is now known as Su-Shee
colomon What's this about a wonderpatch? (I see the benchmarks have made a big jump forward!) 13:46
moritz colomon: lists.parrot.org/pipermail/parrot-d...05837.html 13:47
colomon huh. what does the patch do? (I mean, other than make rakudo faster.) 13:48
mathw what else does it need to do? :P 13:49
colomon What is the mechanism by which it makes rakudo faster? :p 13:54
BTW (reading threads) I'd argue that spectests are probably not ideal for benchmarking. 13:55
moritz agreed 13:57
13:57 am0c left
moritz more to the point, the only reason for using them is their availability 13:57
nearly none of them focus on exercising real world use patterns, nor do many of them exercise specific groups of features performance-wise 13:58
tadzik json tests are a real-world example 13:59
pmichaud colomon: why are spectests not ideal for benchmarking, ooc?
(I guess "what moritz++ said")
moritz also, they change
pmichaud I think it's a very useful tool... especially since that's the time sink that most of us developers see at the moment
not the ones used here
moritz they often produce rather much IO for a non-IO benchmark 14:00
pmichaud the benchmarks in that report are identical between 2011.01 and 2011.04
s/benchmarks/spectests/
the harness is only using the spectests that are unchanged since 2011.01
colomon The main reason I was thinking is that the usage patterns are probably nothing like real world tasks. 14:01
sorear good * #perl6
pmichaud well, we can easily add more benchmarks now :)
colomon for instance, how many of the numerical tests in spectest check their results using strings?
(the trig tests are an exception there, I think.)
moritz all that use is()
colomon moritz: right, that's what I was trying to suggest. :) 14:02
pmichaud sure, but string equality is a fairly common operation
it'd argue it's at least (or more) common and important than numeric equality anyway
colomon but it's not a fairly common numerical operation.
pmichaud but it's a fairly *common* operation
I'm not benchmarking numerical performance, I'm benchmarking overall performance
colomon look, I'm not saying we don't want the spectests to be fast.
pmichaud the fact that the numerical tests are using string equality doesn't make them any less representative of overall real world tasks 14:03
colomon I just think you'll get more interesting information if you have string benchmarks, numeric benchmarks, etc.
pmichaud feel free to submit some :) 14:04
github.com/pmichaud/rakbench
moritz I think string benchmarks are the only ones where you have a chance of the operations being slower than the calls involved (on the parrot level)
colomon I have been submitting benchmarks for over a year now.
pmichaud okay, feel free to let me know where they are :)
I guess they're in perl6/benchmarks? 14:05
moritz mashes some Oreos in preparation of a milk shake 14:06
frettled Will someone benchmark moritz pre- and post-milkshake?
colomon github.com/perl6/bench-scripts 14:07
pmichaud colomon: which ones would you like to see run?
("all of them" might take too long, so let's prioritize a bit)
colomon give me a moment.
pmichaud no rush 14:08
I won't be running any until later today anyway
right now I've got another set running to test gms performance versus ms2 performance
colomon justrakudoit.wordpress.com/2011/03/...k-results/ 14:09
looking at that, I'd suggest trans-sprintf.pl, prime.pl, and pick-words.pl -- they all seem to have suffered significant regressions over the last year. 14:10
pmichaud okay, great
colomon++
colomon It does make me think it might be worthwhile to sit down and write up simple benchmarks testing some common areas. the collection in bench-scripts is certainly pretty random right now. 14:12
pmichaud well, I'm hoping to organize this all a bit soon
since I have a nice harness now for running tests unattended over many different rakudo releases :)
14:13 frew joined
moritz frettled: my drinking performance seems highly dependent on the presence of milk shakes. Surprise, surprise :-) 14:14
frettled :D
14:22 woosley left 14:31 Jdoneright left 14:43 icwiener left 14:56 ymasory joined 14:57 Mowah left
pmichaud gist.github.com/959083 # results of rakbench on 2011.04 with gms and ms2 14:59
15:00 mj41 left, frew left, MayDaniel joined 15:03 kaare_ joined
pmichaud what machine/os information would be good to capture in these benchmark reports? 15:04
flussence the stuff `lscpu` outputs would be informative... 15:05
pmichaud oooooh, nice 15:06
didn't know that existed flussence++
I guess the output of "free" is helpful, too 15:07
moritz but please use free -m or so
15:07 benabik left
moritz I usually spend too much time counting digits otherwise :-) 15:07
pmichaud +1
so, not "free -b" then? ;-P 15:08
well, I'll probably have the log record "free -b", and the report can make it smaller 15:09
colomon hmmm... it would be great to actually figure the amount of memory used by the process. I don't know a good quick way of doing that, alas.... 15:10
pmichaud someday we could add an option to the perl6 binary (or HLL::Compiler) that dumps out the interpreter statistics just before exiting 15:12
that might tell us total allocations of pmcs, memory used, etc. 15:13
pmichaud eagerly awaits the arrival of his new hardware
15:13 orafu left
colomon that actually sounds like it would be really useful. is there any reason it's not possible to do something like that now? 15:13
pmichaud tuits :-)
it's definitely possible, just needs code 15:14
also, perhaps it should also be an option to Parrot :)
colomon but is it low tuit (just needs summary output) or high tuit (say, stats aren't actually kept yet)?
pmichaud stats are kept already
(looking)
15:15 orafu joined
pmichaud gist.github.com/959131 15:15
for example, GC_MARK_RUNS tells us how many mark runs have been performed :) 15:17
TOTAL_PMCS tells us how many PMC allocations occurred
etc.
15:17 am0c^ joined
colomon that seems like it might be drastically important for benchmarking / profiling / etc 15:17
pmichaud maybe I'll add something to nqp-rx then 15:18
won't help for previous releases, but could help for future ones
colomon would a nqp-rx fix potentially get lost when we land nom? 15:20
pmichaud I'm sure we'd port it or duplicate it in nom
colomon pmichaud++ 15:22
pmichaud really wishes he could see the gps location of the truck that is carrying his new machine 15:23
afk for a while, break 15:25
15:26 hercynium joined 15:29 s1n left 15:31 s1n joined 15:33 simcop2387 left, MayDaniel left 15:36 simcop2387 joined 15:42 sbp left, sbp joined 15:43 icwiener joined, phenny left 15:44 REPLeffect joined 15:45 phenny joined 15:46 justatheory joined 15:57 ymasory left 16:01 spq joined 16:05 noganex joined, noganex_ left 16:06 am0c joined
jnthn oh hai 16:06
weekend! \o/
colomon \o
hmmm.... Google Code Jam starts today. 16:07
pmichaud did we get the Google Code Peanut Butter already?
colomon mmmmm.... peanut butter ....
jnthn Ewww...I don't like that stuff. 16:08
sorear hello jnthn
jnthn o/ sorear
sorear v5 didya see? :0 16:09
jnthn Yes :)
pmichaud I saw. sorear++
jnthn I want to see how you unified protoregexes and protos.
That's...not something I'd really imagined doing.
pmichaud fwiw, I think it is something TimToady++ imagined :)
am0c oh hai all! 16:10
jnthn Yeah but...is it spec'd anywhere?
pmichaud makes a backup in preparation for his new machine arriving later today 16:11
16:12 benabik joined 16:15 leprevost left 16:18 am0c^ left
pmurias sorear: hi 16:20
sorear: what's faster niecza on mono or on .net?
16:23 justatheory left
sorear ask diakopter, I've never tried it on .net 16:23
16:24 noganex_ joined, noganex left 16:39 risou joined 16:41 pmurias left 16:44 keeth joined 16:46 mtk left 16:47 colbseton joined 16:50 mtk joined 16:52 dakkar left, colbseton left
colomon pmichaud: so, what are the specs on this new machine of yours? 16:54
16:54 Chillance joined 16:55 slavik2 joined, birdwindupbird left 16:56 slavik left 16:57 pernatiy left 17:01 leprevost joined 17:03 cdarroch joined, cdarroch left, cdarroch joined 17:09 ashleydev left 17:19 gbacon joined 17:20 nymacro left, Moukeddar joined
Moukeddar Hello 17:21
17:24 mkramer joined
takadonet Moukeddar: hey 17:25
Moukeddar how are you doing?
17:26 Vlavv_ left, Mowah joined 17:28 Vlavv_ joined
PerlJam buenos dias 17:30
sjohnson yo 17:31
jnthn hola 17:34
17:39 risou left 17:50 impious joined
sorear hello 17:51
takadonet sorear: hey 17:53
17:57 MayDaniel joined, fhelmberger left 18:00 mkramer1 joined 18:01 TiMBuS joined 18:04 mkramer left 18:09 fglock joined 18:10 Moukeddar left, MayDaniel left
tadzik hello 18:13
fglock tadzik: hi 18:15
18:17 mkramer1 left
colomon \o 18:20
18:21 araujo left 18:30 dual left 18:32 dual joined 18:44 masak joined
masak greetings, carbon-based life forms. 18:44
jnthn o/ masak 18:45
sbp what's the word on the street, masak and jnthn? 18:49
masak um... "hi"? ;) 18:50
18:50 impious left
flussence
.oO( "bus lane 07:30-09:00" )
18:50
sbp at least make up some news if there isn't any 18:51
imagine you woke up at a State of the Onion podium
masak there are news.
jnthn sbp: My trains to work AND home were on time.
sbp all those eyes watching you, expectantly
jnthn This is a shocking development.
flussence there's a patch that magically makes rakudo a bajillion (2-10) % faster!
sbp the track signals are probably being run from perl6 code now 18:52
flussence that's news to me.
sbp there we go, that's some news!
is that in Star? where's the patch on Github?
flussence it's on some mailing list thing, in the log 3-4 hours back 18:53
the numbers look promising though
masak things are still being investigated.
18:53 envi left
colomon and most of the speed up just compensates for recent slow downs in Parrot, as far as I can tell. 18:53
18:54 anazawa joined
masak it's a Red Queen's race, for sure. 18:54
plobsing colomon: we also suspect non-GC influences in the earlier regression and are attempting to track that down too. 18:56
colomon plobsing++
18:56 snearch joined
colomon prefers the "March of the Black Queen" 18:56
sbp they should form a coalition side 18:57
.g gms ms2 rakudo
phenny sbp: whiteknight.github.com/2011/04/16/i..._aftermath 18:58
19:15 justatheory joined 19:17 ymasory joined
colomon sbp: www.nntp.perl.org/group/perl.perl6....sg650.html 19:18
sbp ah, I heard about v5 earlier. grats sorear, and thanks colomon 19:20
19:20 jevin joined
colomon It feels like the news of the moment to me (other than the benchmarking stuff) :) 19:20
masak I'm planning to send off an email to p6l.
it's about base conversion.
jnthn Will it still belong to us after the conversion? 19:21
masak I assume that was a pun.
colomon all of it
masak ah. :)
jnthn colomon++
Tene I was super early to work yesterday, so I turned off the alarms on my phone so they didn't bother me while I was working. Of course, I forgot to turn them back on, so I slept in very late today. :)
That's my news for the morning, at least. 19:22
masak ;) 19:23
anyway. three questions: (1) if :2<1010> etc do the conversion *from* a base, what's the way to do the conversion *into* a base? (2) isn't :2<1010> just as ambiguous as bin('1010') (and 'oct' and 'hex') wrt conversion direction? (especially like this: :2($var)) 19:25
(3) what's a way to convert from a base that isn't a constant?
all of these questions have come up in problem-solving situations and, IMO, need addressing.
sbp I vote YES on Proposition 2 19:26
masak so... :2<1010> doesn't *really* solve any problems better than bin('1010') ...? 19:27
except for maybe eliminating three builtin subs and replacing them with literal syntax.
sbp well it genericises the problem 19:28
19:28 TSa joined
sbp just does it in a very anthropantagonistic way 19:28
masak how esquivalient. 19:29
colomon masak: well, clearly :2<1010> is easier to generalize than bin('1010'), for what that's worth.
Tene masak: 1) use fmt 19:30
iirc
masak yes, but to what end? now I can do :19<blah>? yippie.
that was for colomon. 19:31
Tene: do you have any spec on that?
Tene: that's a perfectly good solution if it's true.
benabik Are numeric adverbs supposed to be generic base conversion, or it it just for literals?
masak Tene: otherwise we should probably make it so :)
sbp well, flickr short links use base58 for example
strange bases aren't unheard of
masak benabik: depends what you mean. :4($n) works fine. :$b(42) doesn't.
sbp but it uses a strange lexical table anyway 19:32
benabik masak: I meant the first. And that seems slightly odd to me.
sbp which may be an issue, one that ought to be recognised
masak sbp: I guess my point is that I wouldn't cry blood if :58($flickr-url) were from-base(58, $flickr-url)
benabik It's much less ambiguous if it's only for literals.
sbp I'd prefer the latter. it's clearer
masak sbp: me too. 19:33
sbp perhaps allow the table as the third arg
which is '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ'
from-base(58, $number, $table)
masak sbp: hm, but that's sending in 58 twice.
sbp: that feels suboptimal.
sbp you'd want num or table as first arg, num from table length if it's a string? 19:34
masak that feels dangerous too.
Tene masak: where's the ambiguity in :2/&bin ?
sbp agreed
masak Tene: look at the perldoc for bin/oct/hex.
19:35 leprevost left
masak Tene: 'To present something as hex, look into "printf", "sprintf", or "unpack".' 19:35
19:35 orafu left
masak Tene: people often get the direction wrong, because the name of the builtin *doesn't say*. 19:35
sbp I thought of :Nary<...>, e.g. :2ary<1010> 19:36
and :base2<1010>
masak std: :base2<1010>
p6eval std 9f27365: OUTPUT«ok 00:01 112m␤»
Tene masak: that wouldn't have even occurred to me. Obviously if I wanted formatting into a string, I'd use fmt, sprintf, etc.
:2 is str->num, fmt is -> str 19:37
masak Tene: things look obvious on the path you're on. there are lots of paths. :)
sbp masak: what does (3) mean?
Tene nods.
19:37 araujo joined
sbp oh, nevermind, I understand 19:37
$myBase
masak sbp: the opposite of :2<1010>
sbp: and Tene says that's .fmt, but hasn't proved it yet. 19:38
sbp that was (1)
(3) was non constant bases
masak oh, sorry.
yeah.
(3) is :$b<123>
std: my $b = 5; say :$b<123>
p6eval std 9f27365: OUTPUT«ok 00:01 115m␤»
Tene masak: wait, you want facts and evidence from me, instead of rumours and superstition? I think you're thinking of a different Tene.
sbp that could use $_. my $b = 5; say :<123>... 19:39
er, my $_ = 5
masak Tene: truth is, I'm lazy and want someone else to go to the spec. :)
Tene I have no idea if the spec currently agrees with me; I just believe that it should.
masak Tene: fwiw, so do I.
Tene: could we also dream up a syntax before we confirm? :P
sbp that'd actually be kind of nice for when you're always doing something in a particular base
masak Tene: oh, and .fmt is just a thin veneer over sprintf 19:40
sbp any reason why there can't be adverbial AND functional forms? 19:41
masak ...because the adverbial form is just a more limited, confusing version of the functional form...? 19:42
Tene perl6: say 25.fmt("%2x")
p6eval niecza v5: OUTPUT«Unhandled exception: Unable to resolve method fmt in class Num␤ at /tmp/W9MgnE_xwr line 1 (MAIN mainline @ 3)␤ at /home/p6eval/niecza/lib/CORE.setting line 1311 (CORE C552_ANON @ 2)␤ at /home/p6eval/niecza/lib/CORE.setting line 1312 (CORE module-CORE @ 39)␤ at
../home/p6eval/niec…
..pugs, rakudo 6ae3c9: OUTPUT«19␤»
masak sbp: there's this general idea that we don't want to do things if they're bad... :)
Tene bleh, no, that already means something. 19:43
sbp masak: what if you're constantly using a particular base in some code and want to express it succinctly?
masak sbp: write a one-letter wrapping function.
sbp: doesn't get shorter than that. :)
put it in the smallest lexical scope possible. everyone wins. 19:44
colomon $*NUMERICAL_BASE = 15
masak Perl 6 allows you to locally mutate the language without harming anyone further away.
19:44 birdwindupbird joined
masak <snarkyboojum> sorear: I'm amazed that "real multi dispatch" == "isn't as much cool new stuff as I'd like" - great release :) 19:45
+1
sorear++
sbp yeah? how trivial is it to macroise numbers into trinary or something? 19:46
at some point, mutation isn't worth it
masak phenny: "sparris"?
phenny masak: "asparagus" (sv to en, translate.google.com)
sbp if the setup will exceed the benefit
masak sbp: with some appropriately twisted pragma, you could make what colomon++ suggested work. 19:47
except that it would probably have to be parsing at compile-time, since that's when literals are evaulated.
(so a dynamical probably isn't a great idea.) 19:48
colomon good point
masak but the general point holds. 19:50
we can mutate the Perl 6 grammar to accept anything as a numeric literal. 19:51
my $a = THIRTEEN AND A HALF;
sbp yeah, but again, you have to have the appropriate cost:benefit ratio 19:52
just because something is possible doesn't make it feasible or sensible
but you can make it feasible or sensible by changing the syntax to increase the cost:benefit ratio 19:53
masak right.
sbp which is why I was wondering how trivial it would be
masak Perl 6 will introduce real DSLs.
I'm looking forward to that.
sbp I can imagine people going quite mad with the DSLs :-) 19:54
19:54 f00li5h left
masak imagine a Prolog-like DSL in Perl 6. or a Constraint Programming one. or a DSL for making cute ASCII diagrams. 19:55
19:55 f00li5h joined
masak (I threw the last one in there because I don't want people to things that "DSL == cute sub/method names") :) 19:55
think*
ok. I'll write my email to p6l now. 19:56
thanks sbp and Tene and colomon for the input ;)
19:57 r0b86 joined 20:02 REPLeffect left
sbp a DSL for writing subs in befunge... 20:03
20:09 mkramer joined
masak yeah! 20:10
20:10 stkowski joined
masak "Use of the functional form on anything that is not a string will throw an exception explaining that the user has confused a number with the textual representation of a number. This is to catch errors such as a C<:8(777)> that should have been C<< :8<777> >>, or the attempt to use the function in reverse to produce a textual representation from a number." 20:12
that's S02:3276.
and that answers my question (2), I think. 20:13
Tene i.imgur.com/VZOiv.jpg -- Camelia cosplay? 20:22
20:25 REPLeffect joined 20:26 pmurias joined
sbp butterfly dressed up as a camel? could be 20:26
masak Tene: "expect to hear from us" -- O'Reilly lawyers :P
pmurias masak: re DSL is that necessarily a good thing? 20:27
masak pmurias: anything and everything can be overused. nothing new over the sun.
pmurias my impression of DSL is that they trade of flexibility for cute syntax 20:28
masak pmurias: but yes, I believe it can be used for good.
pmurias: they do.
pmurias: that's because they're domain-specific :P
point is, Perl 6 will be a general language with the extra ability to turn into expertly specialized languages. 20:29
20:29 snearch left, REPLeffect left
masak Tene: I thought you were going to post pic.plover.com/ :) 20:30
20:30 bluescreen10 left
Tene masak: that's supposed to represent perl 5 and 6? 20:31
masak Tene: those are mjd's daughters. 20:33
Tene I recognize plover.com as MJD, but I'm not seeing any other context for that image
Oh. Why did you expect that for "camelia cosplay", then?
masak dunno. they look colorful :)
and one of them floats in the air.
20:34 r0b86 left
masak actually, that image comes the closest to what I'd imagine a Camelia-hackergirl t-shirt looking like. 20:34
cool, well-drawn, happy and colorful :)
tadzik I'd wear that
though it will probably be recognised by even less people than the NLPW t-shirt :) 20:35
Tene masak: given the context you presented, it came across as "fancy magical powers => 6, carries a huge sword => 5" 20:37
tadzik I thought it carries a swiss army chainsaw 20:38
masak Tene: I like the analogy my lack of context forced your imagination to apply :)
Tene i remember a while back, my girl was drawing a stylized camelia-inspired anime girl, but I don't remember why, or where that ended up. 20:40
20:40 kaare_ left
masak as to the why, it was because I asked for one. :) 20:40
I'd love such a t-shirt.
tadzik masak: we can order some and sale/award them on the YAPC 20:42
and the zebra t-shirts of course 20:43
masak tadzik: I should try to draw up the girl-with-wings that I can envision. the polar bear has emboldened me somewhat. :) 20:44
Tene masak: apparently, nothing google knows about links to pic.plover.com; how did you run across it? 20:47
masak: polar bear?
masak Tene: mjd's twitter feed.
Tene: conferences.yapceurope.org/npw2011/
20:48 bacek left
masak what I'm imagining for the t-shirt is a girl, with the proportions of Lilo www.imdb.com/media/rm4283406592/tt0275847 , the perspective in "Head First Design Patterns" www.amazon.com/First-Design-Pattern...amp;sr=8-1 20:48
...and wings. round ones, like on a fairy or a butterfly. 20:49
and with the same "attitude" as mjd's daughters in the picture.
confident, playful, relaxed.
20:57 sjn left 20:58 benabik left 20:59 dolmen joined, donri left 21:00 stkowski left, wamba joined 21:03 birdwindupbird left, donri joined, anazawa left 21:04 bacek joined 21:06 donri left 21:12 Mowah left 21:17 cookys left
masak rakudo: sub phi { (1 + sqrt(5)) / 2 }; sub logphi { log($^n)/log(phi) }; for 2..20 -> $n { say floor($n + logphi( sqrt(5) * (logphi(sqrt(5) * $n) + $n) - 5 + 3/$n) - 2) } 21:20
p6eval rakudo 6ae3c9: OUTPUT«4␤6␤7␤9␤10␤11␤12␤14␤15␤16␤17␤18␤19␤20␤22␤23␤24␤25␤26␤»
masak an explicit formula for generating non-Fibonacci numbers.
arxiv.org/abs/1105.1127
21:23 REPLeffect joined, leprevost joined 21:25 spq left, hercynium left, miso2217 left 21:26 ggoebel left 21:30 miso2217 joined 21:31 dodododo joined 21:32 TSa left 21:33 leprevost left 21:34 ymasory left 21:38 dodododo left 21:42 dwnichols left 21:45 dodododo joined 21:47 pmurias left 21:52 dwnichols joined 21:54 wooden joined 21:57 icwiener left 22:06 plainhao left 22:07 fglock left, dodododo left 22:08 dwnichols left 22:13 dwnichols joined 22:19 orafu joined 22:24 dwnichols left, MayDaniel joined 22:33 ymasory joined 22:37 dwnichols joined 22:40 risou joined, MayDaniel left
TiMBuS Everything about this language sounds great. If I could make a small suggestion though -- I often find myself limited in C++ due to its inability to directly work with fractional indices and arrays. For instance, I should be able to do some_array[0.5] to access the second half of the first element of the array and the first half of the second. I know I could make a template for this but it really should be 22:53
a direct language feature.
I guess it's just one of those things the C++ guys didn't have enough foresight to put into the language when they first designed it.
masak er. 22:54
TiMBuS :D
masak the feature is actually *under*specified. 22:55
what does 'access the second half... and the first half...' mean?
plobsing unaligned accesses, I would guess. 22:56
jnthn There will be modules.
TiMBuS: augment class List { multi method postcircumfix:<[ ]>(Num $n) { ...stuff... } } # it's this easy ;-) 22:57
masak hm... Num, or Real? 22:59
maybe Num, actually.
jnthn I Really don't know...
masak :)
jnthn
.oO( Complex ;-) )
plobsing all this time, I've been wasting all this imaginary memory my machine has 23:00
TiMBuS all that space that you could have packed more ints into
memory page tetris 23:01
plobsing memory invaders
TiMBuS pack man 23:02
sorear I think I'll try and get the numerics hierarchy working in niecza next
masak \o/ 23:06
sorear is trying to work out details... 23:07
masak sorear: how's the Yapsi support going? I'm worrying about Yapsi fragmenting once it lands...
sorear "fragmenting"?
hrm, I thought I had numerics hierarchy listed under yapsi-required 23:09
masak I think Yapsi mostly uses Ints. 23:10
yes, well. fragmenting into a codebase that works on Rakudo and one that works on Yapsi, without any coordination between the two. 23:11
er, s/Yapsi/Niecza/
sorear ah.
jnthn: does Rakudo/NOM support "subset" yet? 23:12
jnthn sorear: rakudo/nom doesn't even compile yet!
masak so... no? :P
jnthn :P
Gee, people expect me to like, do stuff. :P
masak ("damnit, why can't he give us a straight answer!") :P 23:13
jnthn NO NO NO NO NO
masak /o\
jnthn :P
masak rakudo: sub rot13($_) { .subst("A..Z" => "N..ZA..M", "a..z" => "n..za..m") }; say rot13("hakank") 23:14
p6eval rakudo 6ae3c9: OUTPUT«hakank␤»
masak that's a bug, methinks.
masak submits rakudobug
jnthn huh...yes.
wait
did you mean .trans?
masak d'oh!
rakudo: sub rot13($_) { .trans("A..Z" => "N..ZA..M", "a..z" => "n..za..m") }; say rot13("hakank") 23:15
p6eval rakudo 6ae3c9: OUTPUT«unxnax␤»
masak I even had S05 up *reading* about .trans!
23:15 mtk left 23:16 awwaiid left
sorear looks at the ng implementation of subset 23:16
23:16 awwaiid joined
sorear is ng the canonical stable name for "Rakudo" between Feb10 and Jul11? 23:17
jnthn sorear: ng was the name of the branch that becamse master.
masak still calls it 'ng' sometimes
I was probably the last alpha holdout.
jnthn sorear: Generally I was delighted the branch was over and happy to forget the letters "ng". I'll probably feel the same about the "nom" branch once I get through it too.
masak ...and then we'll release Rakudo Starve. 23:18
jnthn Because people are hungry for the improvements? :P
masak om nom improvements 23:19
jnthn object model! new object model!
sorear wait, wait, seriously? The ng binder calls ACCEPTS to do all type chekcing? 23:20
jnthn sorear: Yeah. The nom one won't. :)
masak sorear: when you implement subtypes, please be aware of rt.perl.org/rt3/Ticket/Display.html?id=78322 :)
jnthn sorear: It's "trivially correct", I guess...
masak 'night, #perl6 23:21
jnthn sorear: Note it does a bit of caching too.
23:21 masak left
jnthn sorear: But nom will look quite different there. 23:21
Mostly because ACCEPTS should call some type checking primitive, not be the type checking primitive. 23:22
sorear jnthn: Can you explain the bug masak linked? 23:24
23:24 Moukeddar joined
jnthn looks 23:25
sorear: Ah, that one. It just says "verify the condition this subset is based on is true before checking this subset's extra where clause"
sorear: Confusingly, last I looked it *appeared* that's what Rakudo already seemed to be doing :/ 23:26
sorear jnthn: I mean I'm looking at the Rakudo sources and it's not making sense
jnthn sorear: In what way?
sorear The code looks like it should be working!
jnthn: How does perl6.ops:517 interact with nested subsets? 23:27
jnthn This sounds familiar :/
subtype_realtype should always point to a "nominal type" 23:28
e.g. it's not a pointer to the direct "parent"
Or at least, it's not meant to be.
yeah, looks like the code does the right thing with that. 23:29
sorear erm, doesn't that cause the intervening substype constraints to be ignored? 23:30
jnthn That's not used for the checking
It's used for working out what's the nominal type vs the constraint type.
sorear oh, it's using the subtype itself as the constraint
Even $x doesn't become Int $x where * %% 2; it becomes Int $x where Even 23:31
jnthn Right
sorear jnthn: Do you think that subsets need their own STables?
jnthn I plan to write a SubsetHOW.
(so yes)
Need to refactor the type cache a bit first. 23:32
Really the issue is that they need their own type object
And having an STable just follows on from that.
Suspect enums fall into the same category. 23:33
PerlJam If we keep them in a STable, can we call the HOrses?
jnthn :P 23:34
jnthn suspects he should sleep soonish
Want to actually do something this weekend
Like, hack on nom...and try to beat my Russian into less awful shape. :) 23:35
'night o/ 23:36
23:38 cdarroch left 23:39 risou_ joined 23:41 risou left
sorear learning Russian is a goal of mine too! 23:44
sjohnson cool
23:59 keeth left