»ö« 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! | tinyurl.com/p6contest
Set by moritz_ on 28 December 2010.
00:00 dorlamm left
jnthn Hope you'll excuse me for sleeping and not working on native attributes tonight. I have to write C to finish it up, and I already passed the Ballmer Peak. ;-) 00:01
00:03 nadim_ left 00:04 nadim_ joined
dalek ast: de5c0ff | (Kodi Arfer)++ | S03-metaops/reduce.t:
[reduce.t] Edited [^^] tests so RT #77442 isn't a prerequisite.
00:11
ast: 689122d | (Kodi Arfer)++ | S03-metaops/reduce.t:
[reduce.t] Added test for [^^] on an empty list (thundergnat++).
ast: 162829c | (Kodi Arfer)++ | S03-operators/short-circuit.t:
[short-circuit.t] Use isa_ok to test for types.
ast: 748c769 | (Kodi Arfer)++ | S03- (4 files):
Additions and unfudging for &infix:<^^> and &infix:<xor>.
ast: 58f71c5 | (Kodi Arfer)++ | S03-operators/short-circuit.t:
[short-circuit.t] Added some more-sensitive tests.
kudo: 549d2a9 | KodiB++ | src/ (5 files):
Fixed and extended &infix:<^^> and &infix:<xor>.

This resolves issues with return-value types (RT #72826), short-circuiting, assignment (RT #76820), reduction (RT #65164), and triangular reduction.
Whatever-currying is still broken. Fixing this would require, among other things, getting Actions.pm's &whatever_curry to work with PAST::Op nodes with more than two children.
00:15
00:17 f00li5h joined 00:20 Kodi left 00:21 orafu left, LoRe_ left
colomon Kodi++ 00:21
00:22 noganex_ left, noganex joined, orafu joined 00:28 cdarroch left 00:29 QinGW joined 00:37 cafesofie left, gimix joined 00:41 justatheory left 00:54 LoRe joined 01:01 wallberg left 01:18 Chillance left 01:19 vmspb left 01:28 mtk left 01:32 leprevost left 01:36 mtk joined 01:37 felipe left
sorear so, pmurias likes to talk to me without asking if I'm here 01:47
maybe I should just /part for the next 4 months
colomon just so he doesn't expect you to respond while you're not there... 01:48
01:53 justatheory joined
diakopter next time I see pmurias here I'll remind him to use phenny 01:57
[Coke] ... or you could use phenny and remind him now. 02:01
02:03 woosley joined 02:04 wooden left
sorear ... or I could just take advantage of the logs. 02:08
diakopter [Coke]: lol, heh, yes. (it's been a long day)
much learnings occurred 02:09
phenny: tell pmurias reminder: traffic here on #perl6 is comparatively high (to 6-10 months ago, I'd estimate), so people seem to tend to backlog less and rely on phenny's msg system to tell/ask particular claims/questions. sorear, in particular, might like to receive messages from you that way. :) 02:17
phenny diakopter: I'll pass that on when pmurias is around.
02:24 am0c joined 02:29 kst left 02:30 kst joined 02:31 cafesofie joined 02:45 arlinius joined 02:48 felipe joined 02:59 noganex_ joined 03:02 noganex left 03:04 aesop joined 03:08 getpwnam left 03:09 whiteknight left 03:16 kst left 03:20 kst joined
mberends wakes up at 4h30 for no reason and resumes hacking 03:39
sorear hi! 03:40
mberends hi sorear! 03:41
03:43 arlinius left 03:44 arlinius joined
dalek odel: 9a1bd42 | (Martin Berends)++ | java/compiler/ (2 files):
[java/compiler] refactor the generation of startup entry points
03:45
03:49 aesop left, QinGW1 joined 03:51 QinGW left
mberends sorear: does niecza implement `use A::B;` as reading from A/B.pm? And does niecza use @*INC? 03:51
03:54 QinGW1 left 03:56 cafesofie left
mberends czechs for himself. Ooh, a wget of niecza-1.51.zip! 03:56
there's time to hack on the 6model SignatureBinder while niecza builds :) 03:59
04:00 QinGW joined 04:01 cafesofie joined 04:08 am0c left
colomon rakudo: say chr(66) 04:10
p6eval rakudo 549d2a: OUTPUT«B␤»
mberends sorear: current niecza built ok, but `make test` died with: Unhandled exception: Unable to resolve method keys in class Array at boot/lib/SAFE.setting line 775 (SAFE keys @ 2) 04:12
sorear mberends: "class A::B" syntax isn't in Niecza yet (there are some dark corners I need to figure out first relating to the fairly common case where A:: is an imported lexical package) 04:16
as such, A/B.pm is unlikely to be useful even if it works
(which it probably won't, since I've never tested it)
mberends: Are you building from a clean checkout? 04:17
p6eval had that, but it went away when I did a clean build
mberends sorear: it was a refreshed checkout. I'll repeat with a fresh one.
sorear phenny: tell pmurias Do you want to write anything about -Bnam for docs/announce.v2 ? 04:18
phenny sorear: I'll pass that on when pmurias is around.
04:23 Su-Shee_ joined 04:26 QinGW left 04:27 Su-Shee left 04:28 justatheory left, kst left 04:29 kst joined, stifynsemons joined 04:30 stifyn joined
stifynsemons I tried out the <?DEBUG(1)> Rakudo feature for grammar debugging. I really like it. Externally, the output goes to stderr 04:35
is there a way to redirect it within the Perl program, for processing/filtering?
04:35 stifyn left
stifynsemons I guess I was double joining (new to IRC) 04:36
colomon I doubt there's a way to redirect it inside the program, but then, I didn't even know it was up and working yet. :) 04:37
sorear you might be able to do something using ParrotInterpreter.stdhandle(2, $obj) 04:38
stifynsemons Well, it works well enough for me -- but there is a lot of output - a single case can run 100 lines. But the grammar is complex.
I'm not familiar with ParrotInterpreter - I assume that redirects all the output of the parrot interpreter. Does it put it in $obj? 04:39
sorear ParrotInterpreter is a class 04:40
04:40 snarkyboojum joined
sorear the code you want to use is something like pir::getinterp().stdhandle(2, MyClass.new) 04:40
what you need to put in MyClass is beyond me
04:40 envi joined
plobsing MyClass depends on where you want to redirect that standard output 04:41
parrot has a builtin stringhandle class for instance, so you could redirect the output to string (but I suspect your RAM would explode)
stifynsemons Putting it in a string seems reasonable - it's about 1k now, so I wouldn't think size would be prohibitive - if I turn it on/off. 04:44
However using it as a filter would be more useful, as I still want the output to go to std out (or std err) anyway. 04:45
plobsing IIUC, any class should be useable as a replacement for stderr so long as it implements the puts() method 04:47
mberends sorear++: fresh checkout works, passed all 731 tests :) 04:48
plobsing that part of parrot is greatly underused and undertested at the moment, so my advice may or may not work
stifynsemons I'll keep it in mind, but I think it is beyond what I'm able to do today - I've only been playing with Perl6 for a week, after an absence of a few years, and still have a lot of basics to go over 04:52
brb 04:53
04:53 stifynsemons left 04:59 stifynsemons joined 05:00 felliott left
sorear mberends: pmurias has been playing with a clisp backend lately. Can I interest you in starting the Java backend? :) 05:01
[Coke] sorear: you looking at generate java or bytecode directly? 05:02
*ing
mberends sorear: yes, but only after 6model/java catches up to 6model/dotnet :)
05:03 felliott joined
sorear [Coke]: I'm not currently looking at either, but bytecode is probably the path of least resistance since the CLR backend does that 05:03
05:07 felliott left 05:10 felliott joined 05:13 felliott left 05:14 felliott joined 05:15 molaf joined 05:17 baest left 05:18 felliott left 05:21 QinGW joined, baest joined
dalek odel: 7681c75 | (Martin Berends)++ | java/ (2 files):
[java] add a Context parameter to SignatureBinder.Bind()
05:35
05:35 QinGW left
mberends time mono run/Niecza.exe -e 'say 2 + 2;' : 4 real 1m57.983s user 1m57.135s sys 0m0.448s on an Atom netbook 05:44
it looks like Camelia is not an Iron Butterfly, but one made of lead :( 05:45
TimToady see if it's faster the second time 05:46
mberends tries 05:48
sorear the path of least resistance involved lazily compling the setting the first time the compiler is used 05:49
mberends top shows mono growing to about 95MB virtual memory 05:50
user1m58.579s :( 05:51
05:51 getpwnam joined
TimToady goodness..runs in 2.5 seconds here... 05:51
mberends it's mono 2.4.4, that may be too old 05:52
diakopter wait wait
what are we timing 05:53
diakopter dying to try the sandy bridge
mberends mono run/Niecza.exe -e 'say 2 + 2;' # from niecza README.pod 05:54
diakopter hm, I already installed cygwin, now downloading mono
05:55 kaare_ joined
mberends I think I'll try adding a -e option to 6model/java for comparison 05:56
05:56 aesop joined
TimToady yes, that's way old 05:59
running 2.8.2 here
mberends there were some remarks heree recently about mono speed improvements 06:00
*here
diakopter watches niecza build blindingly quickly 06:03
sorear: build problems using .net... I'll try mono now 06:04
diakopter hears the cpu fan spin up 06:10
bah. 0m7.280s # first run 06:12
0m2.114s # second run
mberends :) 06:13
diakopter 3rd run identical
interestingly, the same run under .net took 0m26.722s 06:14
sorear mberends: 1m58s on the second run?
TimToady he's running mono 2.4.4 06:15
diakopter mem got up to 663MB on that last one
TimToady so I'd guess it's losing track of something cachey
diakopter under mono, it got up to only 60MB 06:16
06:17 QinGW joined
sorear wonders if it would use the same amount of memory if diakopter first removed half of the RAM 06:18
sorear wonders if there's a sane/easy way to test that
sorear suspects .net is opportunistically expanding the heap to fill all available space 06:19
Niecza generates quite a lot of garbage; switching from Boehm-D-M to the 2.9 native GC speeds up builds by a factor of 30-100%
(it's actually the 2.8 native GC, but at least in 2.8.1 it segfaults if you look at it wrong, so enabling it isn't a good idea) 06:20
TimToady wonders about 2.8.2 06:21
mberends sorear: would you recommend installing mono 2.8.2 or 2.9.1 on Ubuntu?
sorear I don't know what fixes went into 2.8.2, and I didn't know 2.9.1 existed? 06:23
sorear is currently running 2.11.6c34e3a
mberends oh sorry, I thought that was the newest development mono you were praising 06:25
sorear I praise the versions that work for me. I happen to mostly run monos from git. 06:26
mberends :) I'll git that 2.11.* after commuting
diakopter sighs and looks for a windows build of 2.11 06:27
sorear diakopter: Nothing I have said should be taken to imply 2.11 is required 06:28
I tested it under 2.8.2 fairly recently
older versions cannot be installed anymore :/
diakopter sorear: nothing I have said should be taken to imply that I inferred from you that 2.11 is required 06:29
sorear ok.
mberends commute & 06:30
06:30 mberends left
diakopter sorear: I'm timing a niecza build under mono 2.8.2 06:35
forgot to time it the first time
06:35 _jaldhar left, _jaldhar joined
sorear diakopter: also try running it with RUN_CLR=mono-sgen (and seeing if it crashes) 06:36
diakopter 1m30s 06:37
mono-sgen not found 06:38
diakopter tries mono --gc=sgen 06:39
sorear mono --gc=sgen works by exec(mono-sgen) 06:40
I'm suprised only the former works
06:40 orafu left
diakopter well 06:41
06:41 orafu joined
diakopter here, only mono --gc=sgen worked 06:41
yeah
TimToady RUN_CLR works here
though I was just using it on user code, not the build 06:42
diakopter 1m29.7s for the mono --gc=sgen build
TimToady sgen seems to chew up memory faster on the knapsack problem though
06:42 cafesofie left
TimToady it very quickly used up 2.7gigs 06:43
where I stopped it, since I only have 3
diakopter where's the code for that? I'd be curious to write a perlesque edition
the 01 one, or continuous? 06:45
diakopter (found the rosettacode)
oh.. bruteforce 06:46
06:47 am0c joined
TimToady see wall.org/~larry/knap01 for the one that runs under niecza 06:50
yeah, doesn't even do caching
but it does complete in rakudo...eventually...
06:51 cafesofie joined
TimToady course I coulda made a bonehead mistake translating it to niecza 06:51
06:55 wtw joined
diakopter starts porting 06:56
06:57 JimmyZ joined
sorear points out that knap is, uh, NP-complete... 06:57
oh, you're doing a *reasonable* instance 06:58
TimToady: line 10 possibly better written with = instead of binding directly to the parcel 07:01
hrm. there is no reasonable reason for this to not run in linear space 07:04
dalek ecza: fb07190 | sorear++ | docs/nam.pod:
[docs/nam.pod] Bring overview up to date with reality
07:07
ecza: a520fb3 | sorear++ | README.pod:
Add a few recent discoveries to README
07:07 cafesofie left
TimToady still thrashes my system with the = 07:07
07:08 drbean left
sorear tries to profile it 07:08
diakopter has 8GB, but ... I guess I could try it under the 64-bit .net :D 07:09
TimToady I dunno what my mono thinks of my 64-bit system
diakopter I'm pretty sure it doesn't emit amd64 yet 07:10
whoa 07:11
5.9GB
TimToady --version knows it's on the arch though
diakopter 6.1GB
then a GC
then right back up to 6.2 07:12
TimToady some kind of space leak maybe
diakopter 2000 Gen 0 collections, 684 Gen 1 collections, 20 Gen 2 collections
so far
07:13 Mowah joined
diakopter %time in GC, 41.10 07:13
oo... up to 6.9GB 07:15
07:16 JimmyZ left
diakopter wonders about making a multithreaded edition of knap01, since perlesque can do that 07:16
07:17 cafesofie joined
TimToady certainly there are many ways of improving the program :) 07:18
diakopter (since niecza is using only "12.5%")
sorear according to the heap profiler, after 66 seconds there are 308,714 live stack frames
this is... ahem... wrong.
diakopter sorear, I'll send you this Process Explorer performance graph when it's finished; it's pretty interesting 07:19
07:19 GinoMan joined
diakopter if it terminates properly 07:19
TimToady in an hour or two
diakopter hey, this is sandy bridge 07:20
sorear sandy bridge?
diakopter .g intel sandy bridge
phenny diakopter: en.wikipedia.org/wiki/Sandy_Bridge_...hitecture)
diakopter 7.4GB 07:21
07:21 QinGW left
diakopter (GCs are no longer effective) 07:21
sorear aha. There's no check to stop the recursion when @rest is empty
07:22 QinGW joined
diakopter looks around for the bonehead remover 07:22
sorear: where would that check go and what would be returned 07:23
TimToady perhaps you should retranslate from the RC example 07:27
07:34 cjk101010 joined
diakopter ok 07:34
sorear Value = 1030 07:35
Tourist put in the bag:
socks sunglasses note-case waterproof overclothes waterproof trousers suntan cream banana glucose sandwich water compass map
MAIN: NieczaBackendDotnet-run took 115.33654499054
diakopter gist your code?
sorear gist.github.com/798202 07:36
diakopter 45s 07:37
(coo!)
(cool!)
oh, that was .net64; trying mono sgen now 07:38
51s 07:39
07:43 JimmyZ joined 07:51 stifynsemons left
sorear gist.github.com/798221 # Optimized version, slightly over 4x faster, same results 07:56
sorear out 07:57
08:06 mberends joined 08:15 getpwnam left 08:16 getpwnam joined 08:22 Alias left 08:23 Alias joined 08:25 Su-Shee_ is now known as Su-Shee, QinGW left 08:30 wallberg joined 08:33 kst left, getpwnam left 08:34 kst joined 08:37 getpwnam joined 08:38 arthur-_ left 08:46 drbean joined 08:51 arthur-_ joined 09:09 snearch joined 09:11 daxim joined 09:12 agentzh joined 09:13 getpwnam left 09:16 mtk left 09:19 am0c left 09:20 Alias left 09:21 kensanata joined 09:24 mtk joined 09:25 pmurias joined 09:26 woosley left 09:28 pmurias left, timbunce joined 09:37 dakkar joined 09:42 cafesofie left 09:55 masak joined
masak hola, zebras. 09:55
09:56 zykes- joined
diakopter oi 09:56
zykes- perl6 say3
perl6: say3
hm
p6eval pugs: OUTPUT«*** No such subroutine: "&say3"␤ at /tmp/ErghEk2kmk line 1, column 1 - line 2, column 1␤»
..niecza v1-190-ga520fb3: OUTPUT«===SORRY!===␤␤Undeclared routine:␤ 'say3' used at line Any()1␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/SAFE.setting line 377 (SAFE die @ 2)␤ at /home/p6eval/niecza/src/STD.pm6 line 1174 (STD P6.comp_unit @ 71)␤ at
../home/p6eval/niecza…
..rakudo 549d2a: OUTPUT«Could not find sub &say3␤ in main program body at line 22:/tmp/oStsZhPy6x␤»
masak rakudo: say 3
p6eval rakudo 549d2a: OUTPUT«3␤»
masak zykes-: since 'say3' is a valid identifier, you need the space between 'say' and '3'. 09:57
zykes- rakudo sub {}
rakudo: sub {}
p6eval rakudo 549d2a: ( no output )
zykes- ah
09:59 timbunce left
masak rakudo: say sub {} 10:02
p6eval rakudo 549d2a: OUTPUT«_block124␤»
masak rakudo: say {}
p6eval rakudo 549d2a: OUTPUT«␤»
masak rakudo: say (sub {}).WHAT; say {}.WHAT
p6eval rakudo 549d2a: OUTPUT«Sub()␤Hash()␤»
mux this isn't really related to perl6, so feel free to ignore me, but do you guys know anything about "use charnames ':full';" breaking when "use strict;" is enabled? 10:03
masak rakudo: say (-> {}).WHAT
p6eval rakudo 549d2a: OUTPUT«Block()␤»
10:07 timbunce joined 10:08 cafesofie joined, tzhs joined, cafesofie left
diakopter whee. finally finished the knapsack port to perlesque 10:11
masak diakopter: how's perlesque going?
diakopter well, it's "done" fsdo "done" 10:12
well, for *my* definition of done .... i.e. what I need[ed] it for 10:13
(toy with primitive types & closures on the clr)
dalek rixel: a9bac02 | diakopter++ | sprixel/ (8 files):
slight fixes to some generic method generators; we'll see if they work in mono
10:15
masak diakopter: great!
diakopter :) 10:19
I figure if it can run a knapsack solver and the man-or-boy test, it's pretty decent 10:20
10:20 drbean left
masak that does sound decent. more than decent, in fact. 10:22
diakopter and the knapsack solver (for this particular problem) takes ~1 second 10:23
I just ported TimToady's code 10:24
took a bit
dalek rixel: 4a2998f | diakopter++ | sprixel/src/compiler/GenTypeGen.cs:
mono needs the modified returntype also
mux nevermind my previous question; it's a known bug in Perl 5.10.x (RT #72590) where if you have use strict enabled and have a compilation error, you only get a strange error from charnames.pm 10:26
if you use "use charnames ':full'" and \N{...} in a regexp
masak mux: good to know. no Perl 6 implementation has that issue :) 10:28
10:28 timbunce left
masak rakudo: use strict 10:28
p6eval rakudo 549d2a: OUTPUT«===SORRY!===␤Unable to find module 'strict' in the @*INC directories.␤(@*INC contains:␤ lib␤ /home/p6eval/.perl6/lib␤ /home/p6eval//p2/lib/parrot/3.0.0-devel/languages/perl6/lib␤ .)␤»
mux too bad I'm leaving this place where I work at next week; I'd have pushed for a perl6 move :-) 10:29
10:36 xabbu42 joined
jnthn morning, #perl6 10:38
masak jnthn! \o/
jnthn has actually been up and at $dayjob for a while :-) 10:40
masak right, right. :)
jnthn :P 10:41
jnthn got immediately taken to a meeting :)
ooh, it's pancake Thursday \o/ 10:42
masak \o/
10:45 kst left, kst joined
mathw pancake Thursday?? 10:47
masak it's a Swedish thing.
it's really the pea soup that's the deal with Thursdays, but pancakes go with the pea soup as dessert. 10:48
(possibly as a consolation for those who don't like pea soup, I dunno)
mberends jnthn: I belatedly wish you a happy birthday :) 10:50
mathw the only pea soup I don't like is the stuff that's not made very well
jnthn mberends: Thanks! :) 10:54
Yes, pancakes (and pea soup) on a Thursday is one of the Swedish traditions I like most :) 10:55
mberends: How's nqp-jvm going? :) 10:56
mberends jnthn: not even begun yet, still catching up in 6model/java...
jnthn Ah, OK :) 10:58
jnthn looks forward to when it passes the 299 tests that nqpclr does :)
10:59 pmurias joined
masak jnthn: 299 tests? did you omit writing one? :P 11:00
mathw: almost any pea soup is nice with a good mustard and some thyme. 11:01
pmurias tell sorear ok, i'll try to use phenny more from now on 11:03
phenny pmurias: 02:17Z <diakopter> tell pmurias reminder: traffic here on #perl6 is comparatively high (to 6-10 months ago, I'd estimate), so people seem to tend to backlog less and rely on phenny's msg system to tell/ask particular claims/questions. sorear, in particular, might like to receive messages from you that way. :)
pmurias: 04:18Z <sorear> tell pmurias Do you want to write anything about -Bnam for docs/announce.v2 ?
pmurias tell sorear re -Bnam you mean -Bclisp? 11:05
flussence whoa, spectest stuff is down to < 2 hours now 11:10
11:11 robinsmidsrod is now known as robins, robins is now known as robinsmidsrod 11:19 xabbu42 left 11:21 pmurias left 11:35 whiteknight joined 11:39 Mowah left 11:41 timbunce joined
moritz_ rakudo: say 1074 / 60 11:41
p6eval rakudo 549d2a: OUTPUT«17.9␤»
moritz_ less than 20 minutes on my machine :-)
(two cores, three jobs in parallel)
flussence the one I usually do it on's a single-core Atom... though it's not all that fast on my quad-core box either, half an hour or so :( 11:47
11:47 kst left 11:48 kst joined
moritz_ wants to read masak's p4 review 11:50
masak so here's the thing. 11:53
moritz_ I guess this review will be a bit trickier than the previous ones 11:54
masak I've willfully started on a bit of a yak shaving expedition in order to bring better images to the one or two explanation posts that I want to write before the p4 review post.
moritz_ ... and the yaks all ran away :-)
flussence
.oO( if a yak bumps into a mirror, does it become a kayak? )
11:55
11:56 drbean joined
jnthn flussence++ :D 11:58
masak to the yaks' credit, what little hacking I've done so far (two evenings ago) was very productive and promising. 11:59
first Perl 6 hacking I've done in a while, and it produced 3 rakudobugs :)
jnthn Are the yaks still hairy?
Or getting less so?
;)
masak the razors are sharp, and some of the yaks are less hairy. 12:00
jnthn :D
masak let's make a deal. I'll have the first pre-p4 post out by the end of the weekend, no matter what.
also, I'll make a small post today about moritz_++' post. I meant to do that anyway.
12:04 Alias joined 12:05 cogno joined 12:15 cafesofie joined 12:24 Kodi joined 12:32 cogno left
dalek p-rx: bffc552 | bacek++ | t/setting/01-resizablepmcarray.t:
Stylish change in test.
12:32
p-rx: 7809892 | bacek++ | / (3 files):
Revert "Comment out split() function for now; it causes the Parrot build to fail"

This reverts commit 5349f1795fb2dd7420a41be28c9d192c10cfb059.
p-rx: feb29e6 | bacek++ | / (2 files):
Use multi-dispatch to split on plain strings in setting
masak chromatic weighs in on EDSLs: www.modernperlbooks.com/mt/2011/01/...kholm.html 12:36
I presume that the "in Stockholm" bit is a reference to the Stockholm syndrome, coined after the Norrmalmstorg robbery in 1973 wherein hostages expressed positive feelings towards their captors. 12:37
12:38 am0c joined
arnsholt "You'd almost think someone had already created a language specific to the domain of describing relational data structures." Oh snap ^_^ 12:40
12:40 uniejo joined
arnsholt masak: Yeah, definitely Stockholm syndrome. Especially given the oblique Patty Hearst reference as well 12:41
dalek p-rx: 0bf82c9 | bacek++ | / (3 files):
Implement RPA.grep and rebootstrap setting.
12:43
12:45 agentzh left
masak arnsholt: huh. that's another hostage situation. 12:49
pmichaud good morning, #perl6 (briefly)
masak o/ pm
jnthn ohhai pmichaud
masak pmichaud: you're up early. 12:50
pmichaud I forgot to do the star release tuesday evening (got distracted with family stuff) -- will do it later this a.m.
I'm just online early :-)
I'm usually up every day at this time, but normally its for getting kids ready for school and the like :)
colomon \o
pmichaud (okay, I did get up 15 minutes earlier than normal today)
dalek ast: 510d9d2 | (Kodi Arfer)++ | S03-operators/short-circuit.t:
[short-circuit.t] Rearranged RT tags.
12:52
12:56 coldhead left
takadonet morning all 13:00
masak takadonet: \o
13:03 Tedd1 left, Tedd1 joined
pmichaud odd anecdote of the day: Wife's $job paged her at 3am when a system failed due to encountering an unexpected unicode character in the input: 13:04
rakudo: print chr(0x2620);
p6eval rakudo 549d2a: OUTPUT«☠»
13:04 tzhs left
masak :) 13:05
"System went ☠"
flussence rakudo: print 0x26.chr 13:06
p6eval rakudo 549d2a: OUTPUT«&»
gfldex rum is the cure in case you wonder
flussence (I wonder if there's something to do with urls there) 13:07
gfldex or was the system just missing parrot?
pmichaud .u 2620
phenny U+2620 SKULL AND CROSSBONES (☠)
colomon Unicode has a skull and crossbones character!?! 13:12
flussence unicode's a bit of a headache at my $dayjob, I took a while to find out the other day that DBD::Pg defaults to undef charset or something...
pmichaud It does. Otherwise we wouldn't be able to represent 17th century sea communications
13:13 woosley joined, xabbu42 joined
colomon now I want a ☠ operator for p6... 13:14
pmichaud rakudo: sub prefix:<☠>($x) { die $x; } # how's that? 13:15
p6eval rakudo 549d2a: ( no output )
flussence sub ☠ { !!! 'AVAST!' }
pmichaud rakudo: sub prefix:<☠>($x) { die $x; }; ☠ "ha ha ha"; # how's that?
p6eval rakudo 549d2a: OUTPUT«ha ha ha␤ in 'prefix:<☠>' at line 22:/tmp/rxrrfNGUMV␤ in main program body at line 22:/tmp/rxrrfNGUMV␤»
colomon :) 13:17
13:21 drbean left
masak any ideas how Perl 6 should provide the 'die-without-a-stacktrace' functionality? 13:28
people don't seem to be to keen on adding back the 'ends with "\n"' trick from Perl 5. 13:29
and the problem with :no-backtrace is that it's a negatively stated named parameter, somewhat of a design smell.
13:30 drbean joined
[Coke] sub { marine } 13:30
pmichaud die :!backtrace 13:32
it's still a positively stated parameter, with a negating metaop
masak pmichaud: oh, right that was the design smell.
;)
having named boolean params with True as default.
flussence sub die(Str, :s(:silent)) maybe
masak :silent, or :brief, or :message-only, or... 13:33
neither of them a very strong contender, IMO.
pmichaud shouldn't stacktrace be a lexical pragma or something?
masak that sounds like a good idea. 13:34
pmichaud rather than putting it on the individual 'die'? 'die' just throws an exception -- it's up to the handler to decide what to do with it
masak no die :stacktrace;
pmichaud then it becomes no stacktrace
masak shouldn't the pragma be named after the feature it affects?
pmichaud perhaps
could want stacktraces for warn and friends, too 13:35
masak ISTR reading that somewhere.
nod.
pmichaud anyway, it sounds to me like more of a candidate for lexically-scoped control
13:35 felliott joined
flussence or maybe a multi sub exit(Str $last-words, Int $return = 0) ? 13:36
pmichaud afk for a while 13:37
huf an exit() where the first param isnt the exit code? that'd be surprising
flussence that's what the multi is for :) 13:38
huf oh right
masak flussence: except that both the old and the new multi would take one parameter, so things like 'exit $retval' where $retval happens to be a Str will suddenly bind to your new multi... 13:41
flussence hm, I guess it'd have to be the opposite order then... 13:42
masak it feels like undly extending the role of &exit, though. 13:43
13:43 q0tw4 joined
flussence it seems sensible, to me anyway, to have die/$something in the same way there's warn/note. 13:44
13:47 FlyHeight joined
flussence
.oO( maybe &footnote )
13:52
13:58 felliott left 14:04 stifynsemons joined 14:05 FlyHeight left, kaare__ joined 14:06 kaare_ left, drbean left 14:07 plobsing left 14:09 mberends left, Kodi left 14:13 kst left 14:14 kst joined 14:16 felliott joined 14:22 bacek left 14:24 Mowah joined 14:35 bacek joined 14:37 fhelmberger joined 14:40 cafesofie left 14:42 Mowah left 14:43 leprevost joined 14:45 stifynsemons left 14:47 vmspb joined 14:49 VXZ left 14:55 woosley left 14:57 tzhs joined 15:04 menfou joined 15:06 menfou left, felliott left 15:07 Cyrus left
shortcircuit diakopter: "/me (found rosettacode)" ... That sounds disturbingly like a religious statement. :P 15:10
15:11 menfou joined 15:12 menfou left
masak "have you found rosettacode in your life?" 15:13
15:17 cafesofie joined 15:18 MayDaniel joined
moritz_ are you true rosettacode believer? :-) 15:18
masak What Would RosettaCode Do?
shortcircuit Actually, my face-to-face social groups are accustomed to me talking about RC to just about anyone I talk to. (It helps me set a perspective for analogy in discussion). It's gotten to be something of a joke, so I sometimes lead off with, "has anyone spoken to you about Rosetta Code?" 15:22
15:25 cjk101010 left 15:26 karupanerura joined
masak shortcircuit++ # RC 15:26
15:27 Patterner left 15:29 stifynsemons joined, plobsing joined 15:30 Psyche^ joined, Psyche^ is now known as Patterner 15:36 jevin joined, wtw left 15:38 am0c^ joined 15:40 am0c left
masak so, I thought I'd update S24 with signatures for &skip and &todo. which one should we change? :) 15:51
moritz_ perl 5's Test::More has a todo_skip $why, $how_many
masak good.
moritz_ so let's keep that order 15:52
masak I was just going to suggest ($reason, $count), which is the same.
a cursory read of Rakudo's Test.pm suggests it should be that way.
(becuase there's a todo($reason) and a skip($reason))
moritz_ maybe we can default $count to 1 15:53
flussence I found myself writing perl5 tests yesterday and wishing its Test.pm was as nice as Rakudo's.
masak moritz_: right, that's isomorphic to having a multi without the $count. 15:54
Rakudo already has it that way. 15:55
moritz_ flussence: you can most of the stuff with Test::More and Test::Exceptions or so 15:56
daxim which is all rolled into Test::Most for convenience
and I really hope you meant something modern Test::Builder-toolchain derived and not the actual ancient Test.pm 15:57
15:57 stifynsemons left 15:58 plobsing left 15:59 necrodearia left, necrodearia joined
flussence It was whichever one I found first. Seemed good enough to me so I went with it :) 16:00
(and besides, $dayjob is sorely lacking *any* TDD right now, anything's better than nothing) 16:04
16:05 fhelmberger left
daxim pffft, that's enough to flip the bozo bit srsly wtfbbq 16:05
16:05 Mowah joined
masak hugs daxim 16:12
16:12 tzhs left
daxim programming is serious business 16:12
16:12 leprevost left 16:13 leprevost joined, bacek left
masak daxim: according to the logs, you're the fifth person *ever* to use that metaphor on the channel. we don't flip that bit often in here :P 16:13
daxim that means the internet becomes better on the whole 16:14
masak (previous users: rgs, chip, PerlJam, Schwern, TimToady)
so, um, sixth. :)
16:14 q0tw4 left
masak daxim: either that, or we're all bozo-compatible in here :P 16:15
16:16 MayDaniel left 16:17 kst left, Alias left, kst joined
tadzik bozo bit? 16:23
16:23 envi left 16:26 felliott joined
TimToady morning bozebras 16:27
16:29 shi joined
tadzik so "flip the bozo bit" is "stop thinking"? 16:30
flussence just found out about `prove -e` 16:31
16:32 [Coke] left
colomon tadzik: no, it's more "conclude that the other guy is a bozo so I don't have to pay attention to him any more." 16:32
16:33 karupanerura left
masak right, one flips the bozo bit on the other person. 16:34
it's a metaphor which could only arise on the Intertubes in the first place.
TimToady masak: er, that is a bit inaccurate 16:37
considering I invented kill files for Usenet
which ran largely on uucp
gottreu Networks before the Internet are fantasy like dragons and leprechauns. 16:38
TimToady (though kill files started out to cancel uninteresting threads, they were quickly extended to search on most anything in the article, including author) 16:39
masak TimToady: I stand corrected. Usenet, yes, I've heard of it... :P
16:44 plobsing joined
diakopter phenny: tell sorear pmurias didn't quite use the right syntax for phenny: :) 05:05 < pmurias> tell sorear re -Bnam you mean -Bclisp? 16:49
phenny diakopter: I'll pass that on when sorear is around.
16:52 JimmyZ left 16:54 Mowah left 16:56 Axius joined
TimToady rakudo: exit note "Phooey" 16:59
p6eval rakudo 549d2a: OUTPUT«Phooey␤»
TimToady rakudo: say +(note "Phooey") 17:00
p6eval rakudo 549d2a: OUTPUT«Phooey␤1␤»
TimToady masak: ^^ die without a stacktrace 17:01
17:02 kensanata left
masak a variation on 'exit say'. cute :) 17:02
TimToady: what are the conditions under which a &say or a &note call might return False?
17:03 mtk left
masak (to $*OUT and $*ERR, respectively) 17:03
17:03 timbunce left
TimToady rakudo: sub prefix:<☠>($x) { exit note $x; }; ☠ "Avast!" 17:03
p6eval rakudo 549d2a: OUTPUT«Avast!␤»
masak TimToady: also, I might not want "exit", I might actually want to throw the exception.
TimToady generally you only get a failure on an IO error, such as disk full
masak TimToady: I recently encountered an anti-social (Java) library that did &exit rather than &die. 17:04
TimToady and maybe exit Failure should fail :)
masak :)
TimToady: so we meant to exit, but the program fails to produce the error message and continues? doesn't sound too great... :P
oh wait, it fails. 17:05
never mind. :)
17:05 leprevost left
TimToady actually, I'd exit anyway, but print the failure's message before exit 1 ing 17:05
colomon rakudo: sub infix:<☠>($x, $n) { exit note $x x $n; }; ☠ "Avast!"
p6eval rakudo 549d2a: OUTPUT«===SORRY!===␤Confused at line 22, near "\u2620 \"Avast!\""␤»
colomon rakudo: sub infix:<☠>($x, $n) { exit note $x x $n; }; "Avast!" ☠ 3 17:06
p6eval rakudo 549d2a: OUTPUT«Avast!Avast!Avast!␤»
TimToady but maybe we should reserve ☠ for our "nor" operator :)
diakopter evalbot control restart 17:07
17:07 p6eval left, p6eval joined, ChanServ sets mode: +v p6eval
masak TimToady: nevertheless, the 'exit note' pattern is cute, but it doesn't replace 'die "...\n"' in my opinion, because sometimes I want to CATCH. 17:07
TimToady and how come there's no composing enclosing flag character to put around ☠? 17:08
well, of course
'exit note' is for when you want to be antisocial
17:09 timbunce joined
diakopter perlesque: gist.github.com/798791 17:09
p6eval perlesque: OUTPUT«␤Unhandled Exception: System.MissingMethodException: Cannot find method GetRange in System.Collections.Generic.List`1[[knapsackItem, p6env_1, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]␤ at sprixel.TypeInfo.FindMethod (System.Type t, System.String name,
..sprixel.Operand…
TimToady it's like not giving your friends the chance to argue you out of killing yourself
diakopter p6eval now accepts gist urls 17:10
TimToady what could possibly go wrong...
17:11 mtk joined
dalek albot: dbdf383 | (Perl 6 Evalbot)++ | lib/EvalbotExecuter.pm:
give p6eval the ability to accept gist.github.com URLs
17:11
TimToady cool idea though 17:12
17:13 kst left
diakopter hey, it's my VPS :P 17:13
but really, what could go wrong that couldn't already go wrong
masak longer scripts, I guess.
diakopter heh
masak but that should be OK.
diakopter++
TimToady is waiting for the first quine that sends its invocation back to #perl6 recursively 17:14
diakopter I think au did that at one time, but made it terminate after a few 17:15
masak a script that logs in, posts itself to a p6eval, and logs out? :)
diakopter hah
17:16 kst joined
diakopter hm... stack frames *in* IRC 17:16
17:16 jimmy1980 joined
masak talk about computing in the cloud. 17:16
TimToady your mission is now to invent lexical IRC scoping
diakopter done. use new channels for activations, usernames hold values and reply when queried for value 17:18
17:18 jevin left
plobsing all you can do is send a message 17:18
TimToady it is enough 17:19
one could view the Game of Life as nothing but message sending, and it's turing complete 17:20
diakopter even the 1d edition? oh wait....
TimToady well, you have to be able to add and decide as well
TimToady imagines freenode as the first real AI 17:21
diakopter if adders/gates can be made in minesweeper, then surely in Life...
diakopter ponders maybe going to $work today 17:22
TimToady ponders the fact that he's not going to India today
(consulate is being dilatory)
17:23 wooden joined
diakopter TimToady: take a look at my gist above.. it's your prog, typo'd to perlesque 17:23
TimToady maybe they didn't like the fact that I've visited Norway
I note that it didn't work :P
diakopter it works on .net. a small matter of fixing a bug in the generics compiler 17:24
diakopter thinks 17:25
TimToady also, it's not Perl 6, so it's OT here... :P 17:27
17:28 daxim left
diakopter :( where'z that prog use non-kosher p6 subset? 17:28
oh, the attributes
wait, really? 17:29
I mean, obviously it's not *idiomatic* Perl 6 17:30
TimToady your last has is missing its semicolon, and Perl 6 doesn't come with a 'string' type
diakopter oo; easy to fix those 2 17:31
slavik TimToady: but it has string context ;)
unless I am wrong
diakopter hm, odd it allowed that missing ;
TimToady and it's not clear whether we'll have a List[] role or not 17:32
diakopter no, but just imagine there's a "use AllOfCLRBuiltins;" at the top (for string and List[]) 17:33
TimToady std: gist
p6eval std 625303c: OUTPUT«===SORRY!===␤Undeclared routine:␤ 'gist' used at line 1␤Check failed␤FAILED 00:01 117m␤»
TimToady TimToady 12
* Dashboard
* Inbox 0
* Account Settings
* Log Out
* New Gist
* My Gists
* Starred Gists
* All Gists
* Back to GitHub
Anonymous (owner)
Revisions
* cbf435 16 minutes ago
* fd1ff3 26 minutes ago
gist: 798791 Download_button fork star 17:34
public
Private Gist
All pages are served over SSL and all pushing and pulling is done over SSH. No one may fork, clone, or view it unless they are given this private URL.
Every gist with this icon (private) is private.
public
Public Gist
Anyone may fork, clone, or view it.
Every repository with this icon (public) is public.
Description:
dsaf
Public Clone URL: git://gist.github.com/798791.git
Give this clone URL to anyone.
git clone git://gist.github.com/798791.git gist-798791
Embed All Files: show embed
ddsaasdfsdaf #
embed
raw
1
diakopter hm
TimToady 2
3
4
5
6
7 17:35
8
9
10
11
12
13
14
15
16
17
takadonet ....
TimToady 18
19
20
21
22
23
24
25
26
27
28
29
17:35 Vlavv_ left
TimToady 30 17:35
31 17:36
32
33
diakopter wonders what happened to my #perl6 ops
TimToady 34
35
36
37
am0c^ tehee?
TimToady 38
39
40
41
42
43
44
45
46
am0c^ what's happening here?
TimToady 47
48
edenc larry's cat can count, how cute
masak halp, TimToady is malfunctioning! :(
TimToady 49
50
51
52
53
54
55 17:37
56
57
58
59
am0c^ meow
takadonet masak: no!!!
TimToady 60
17:37 mtk left
TimToady 61 17:37
masak diakopter: maybe you need to auth yourself with ChanServ or something?
TimToady 62
63
64
65
66
67
masak doesn't remember exactly what the procedure is...
TimToady
diakopter oh; I'm not?
TimToady class knapsackItem{
has string $!name; has int $!weight;has int $!unit
method ToString(-->string) {
17:37 MayDaniel joined
TimToady return self.name ~ ' ' ~ self.weight ~ ' ' ~ self.unit 17:37
}
}
sub makeItem(string $n, int $w, int $u --> knapsackItem) {
my $i = knapsackItem.new;
$i.name = $n; $i.weight = $w; $i.unit = $u;
am0c^ ..er..
TimToady return $i
} 17:38
sub func(List[knapsackItem] @a, int $w, int $v --> List[knapsackItem]){
#say($w ~ ' ' ~ $v);
if ($w == 0 || @a.Count == 0) {
my $z = List[knapsackItem].new();
$z.Add(makeItem('',0,$v));
masak on the right side, I probably never would have gotten to see this code otherwise... :P
TimToady return $z;
}
my @rest = @a.GetRange(1, @a.Count - 1);
17:38 ChanServ sets mode: +o diakopter
TimToady my $i = @a[0]; 17:38
my @skip = func(@rest,$w,$v);
if ($w >= $i.weight) { # next one fits
17:38 TimToady was kicked by diakopter (TimToady))
masak \o/ 17:38
am0c^ wow
diakopter heh
masak diakopter++
diakopter finally...
17:38 TimToady joined
diakopter I didn't realize I wasn't auth'd 17:38
TimToady it worked
gabiruh hail to ctrl+v followed by /kick 17:39
takadonet TimToady: what did?
TimToady the /kick :)
which diakopter++ owed me one of :)
masak :P
diakopter masak++ # figuring out me proglem 17:40
17:40 impious joined
masak just a stab in the dark ;) 17:40
TimToady std: gist.github.com/798791
p6eval std 625303c: OUTPUT«===SORRY!===␤Malformed has at /tmp/bGxmfunjtZ line 4:␤------> has ⏏string $!name; has int $!weight;has int ␤ expecting any of:␤ scoped declarator␤ typename␤Parse failed␤FAILED 00:01 119m␤»
diakopter oooo meaningful line numbers 17:41
17:41 jimmy1980 left
TimToady std: gist.github.com/1234567 # does this parse the error? 17:42
p6eval std 625303c: OUTPUT«===SORRY!===␤Confused at /tmp/zynlHXPOYX line 1:␤------> https:⏏//gist.github.com/1234567 # does this p␤ expecting any of:␤ coloncircumfix␤ signature␤Undeclared routine:␤ 'https' used at line 1␤Parse failed␤FAILED 00:01 119m␤»
TimToady std: gist.github.com/1234567
p6eval std 625303c: OUTPUT«===SORRY!===␤Whitespace is required between alphanumeric tokens at /tmp/Gq54AjWpVk line 4:␤------> l xmlns="www.w3.org/1999/xhtml" x⏏ml:lang="en" lang="en">␤Two terms in a row at /tmp/Gq54AjWpVk line 4:␤------>
..://www.w3.org/1999/xht…
TimToady heh
diakopter: ^^ 17:43
interesting that it got to line 4 17:44
diakopter teh heck
oh
evalbot control restart 17:46
17:46 p6eval left 17:47 p6eval joined, ChanServ sets mode: +v p6eval
diakopter std: gist.github.com/1234567 17:47
o__
p6eval std 625303c: OUTPUT«===SORRY!===␤Confused at /tmp/v_DxMoWWPv line 1:␤------> https:⏏//gist.github.com/1234567␤ expecting any of:␤ coloncircumfix␤ signature␤Undeclared routine:␤ 'https' used at line 1␤Parse failed␤FAILED 00:01 119m␤»
TimToady LTA
moritz_ what, that it doesn't fetch the gist automatically? 17:48
patches welcome :-)
diakopter moritz_: but it does. :)
moritz_ it didn't in the last instance, no? 17:49
17:49 jimmy1980 joined
diakopter that gist doesn't exist 17:49
TimToady the question is how it should report that
diakopter evalbot control restart
17:49 p6eval left
TimToady parsing as perl6 is LTA 17:49
moritz_ 404 gist not found
masak +1
17:50 p6eval joined, ChanServ sets mode: +v p6eval
diakopter had already added 'gist not found' 17:50
std: gist.github.com/1234567
p6eval std 625303c: gist not found
17:50 molaf left
diakopter "I couldn't catch your gist" 17:50
TimToady how 'bout passing the rest of the command as args?
diakopter ooo
well 17:51
TimToady seems no more abusable than the gist itself...
diakopter currently we build a shell call string
but yeah it could be saferified such that args could be passed much more cleanly
moritz_ rakudo: gist.github.com/1234567
p6eval rakudo 549d2a: gist not found
jnthn evening :) 17:52
17:52 Vlavv_ joined
moritz_ \o jnthn 17:52
diakopter er, not a shell call string, but just no escaping/sanitizing goes on.
moritz_ yes, we'd have to be very careful with shell metachars 17:53
TimToady Injections "Я" Us
diakopter gets to try out man-or-boy now 17:54
that didn't sound right 17:55
jnthn lol :)
moritz_ fwiw last time I check, niecza passed man-or-boy
diakopter actually we could also allow .t URLs in the roast repo...
17:56 ribasushi joined
colomon , 17:57
dalek albot: fea0755 | (Perl 6 Evalbot)++ | lib/EvalbotExecuter.pm:
fix unhandled case pointed out by TimToady++
TimToady you might as well allow just about any uri
moritz_ -1 17:58
17:58 kaare_ joined, kaare__ left
TimToady how is it different from allowing any gist? 17:58
moritz_ too easy to DoS
17:58 jimmy1980 left
diakopter cuz I could get my VPS banned/cancelled 17:58
if the wrong urls are entered 17:59
18:00 am0c^ left
diakopter hm, actually, there's one more broken/exploitable case... I'll let TimToady or others find it before I fix it 18:01
commute,ish&
18:02 GinoMan left 18:04 gaz_ joined 18:05 gaz_ left
moritz_ std: gist.github.com/798909 18:05
p6eval std 625303c: OUTPUT«===SORRY!===␤Undeclared routines:␤ 'b0rked' used at line 1␤ 'echo' used at line 1␤ 'href' used at line 1␤Check failed␤FAILED 00:01 121m␤»
diakopter moritz_ wins 18:06
feel free to fix it
(I know how I was going to fix it... but feel free to work on it too) 18:07
wait, no
that dtrt 18:08
but that's what I thought was broken
diakopter commute IRL 18:09
18:09 jimmy1980 joined 18:10 cdarroch joined, cdarroch left, cdarroch joined 18:12 dakkar left 18:25 timbunce left 18:30 jevin joined 18:32 timbunce joined 18:35 Axius left 18:39 Layla_91 joined
moritz_ diakopter: I guess the right URL is just earlier in the page 18:43
18:59 cafesofie left 19:03 xabbu42 left
jnthn pmichaud: ping 19:05
diakopter moritz_: yeah 19:07
19:07 diakopter sets mode: -o diakopter 19:08 Layla_91 left 19:18 cafesofie joined, klunky joined, cafesofie left 19:20 icwiener joined
cxreg does p6's given/when return a value like they're adding in 5.14? 19:21
or would you better wrap it in a gather
colomon they return a value 19:22
I don't know about 5.14
cxreg www.effectiveperlprogramming.com/blog/683
19:22 timbunce left
colomon rakudo: say given (1,2,3).pick { when 1 { 42; }; when 2 { 100; }; when 3 { -1; }; }; 19:22
p6eval rakudo 549d2a: OUTPUT«===SORRY!===␤Confused at line 22, near "say given "␤»
masak colomon: 'say do given' 19:23
colomon rakudo: say do given (1,2,3).pick { when 1 { 42; }; when 2 { 100; }; when 3 { -1; }; };
p6eval rakudo 549d2a: OUTPUT«100␤»
colomon masak++
rakudo: my $a = given (1,2,3).pick { when 1 { 42; }; when 2 { 100; }; when 3 { -1; }; }; say $a
p6eval rakudo 549d2a: OUTPUT«===SORRY!===␤Confused at line 22, near "my $a = gi"␤»
masak 'do given'
colomon rakudo: my $a = do given (1,2,3).pick { when 1 { 42; }; when 2 { 100; }; when 3 { -1; }; }; say $a
p6eval rakudo 549d2a: OUTPUT«42␤»
masak unlike 'gather', 'given' blocks do not form an expression on their own. 19:24
'do' is used to turn a statement into an expression.
tadzik so that it returns a value? 19:26
masak so that it parses. :)
tadzik -_-
masak the statement also returns a value.
colomon given blocks always return a value. but sometimes they don't parse without do.
tadzik but is not assignable?
moritz_ some constructs expect an expression 19:28
and 'do' turns a statement into an expression
for example if EXPR BLOCK
tadzik mhm
19:29 timbunce joined
moritz_ so you can write if do { for 1..3 { ... } } { ... } 19:29
masak rakudo: say if 42 { "OH HAI" } else { "OH NOES" } 19:30
p6eval rakudo 549d2a: OUTPUT«===SORRY!===␤Confused at line 22, near "say if 42 "␤»
masak rakudo: say do if 42 { "OH HAI" } else { "OH NOES" }
p6eval rakudo 549d2a: OUTPUT«OH HAI␤»
masak \o/
'do' is an statement-to-expression adapter.
s/an/a/
moritz_ 20:28 < moritz_> and 'do' turns a statement into an expression 19:31
that's what I meant :-)
flussence 'do' does stuff, 'given' *is* stuff 19:37
rakudo: say do if 1 { 2 } else { 3 }; 19:39
p6eval rakudo 549d2a: OUTPUT«2␤»
flussence (where 'stuff' means 'control structure')
tadzik rakudo: .say if 42 { "OH HAI" } else { "OH NOES" } 19:41
p6eval rakudo 549d2a: OUTPUT«===SORRY!===␤Confused at line 22, near ".say if 42"␤»
tadzik ah 19:42
flussence rakudo: .say.assuming do if True { False } 19:43
p6eval rakudo 549d2a: OUTPUT«===SORRY!===␤Confused at line 22, near ".say.assum"␤»
flussence aww
masak moritz_: <masak> 'do' is used to turn a statement into an expression. 19:44
moritz_: me too :)
flussence: what did you expect that to do? 19:45
flussence 0
:)
(oh wait, this isn't perl5)
s/0/Bool::False/
masak rakudo: .say given do if True { False }
p6eval rakudo 549d2a: OUTPUT«Bool::False␤»
19:53 plobsing left
moritz_ &say.assuming(do if True { False }).() 19:59
rakudo: &say.assuming(do if True { False }).()
p6eval rakudo 549d2a: OUTPUT«Bool::False␤»
20:00 icwiener left, justatheory joined
masak rakudo: .() given &say.assuming: do if True { False } 20:01
p6eval rakudo 549d2a: OUTPUT«Bool::False␤»
masak :)
20:09 [Coke] joined 20:11 whiteknight left 20:13 whiteknight joined 20:16 cognominal left 20:18 cognominal joined 20:21 whiteknight left 20:24 plobsing joined
moritz_ eventually comes to the conclusion that Perl 6 is mad 20:26
PerlJam we live in a mad world 20:27
tadzik heh, that reminds me of a quote I have from #moose 20:28
20:29 whiteknight joined, Vlavv_ left
tadzik "f*** this shit, I am going to Python. NO CHOICES MEANS YOU CAN NEVER BE WRONG!" 20:30
20:30 coldhead joined
slavik that makes no sense ... python in itself is wrong ... 20:30
so you can never be right ...
huf ssh, dont tell them that! we dont want the pythonist masses to have a collective breakdown
coldhead lol ssh
huf at least, i dont want to see crying hopeless people 20:31
20:37 bacek joined, Vlavv_ joined 20:51 nadim_ left 20:52 nadim_ joined 20:56 Vlavv_ left 20:59 Mowah joined 21:09 Vlavv_ joined 21:15 Vlavv_ left 21:25 gimix_ joined 21:26 Chat9492 joined, Layla_91 joined
dalek odel: efcb917 | (Martin Berends)++ | java/compiler/ (2 files):
[java] port changes from dotnet/ in PAST::Op compilation
21:27
21:27 Chat9492 left
masak Python seems to be an OK first language. 21:27
gimix_ hi, what are different between OOP of perl5.x and perl6? The OOP in perl6 will faster in prosessing?
masak gimix_: how do you mean, "faster in processing"?
maybe if you give an example of the aspect you care about...
21:27 whiteknight left 21:28 Vlavv_ joined
jnthn Layla_91: Привет! o/ 21:30
gimix_: There is a bunch more syntax related to OO stuff.
gimix_ masak:my team wrote two scripts: one for OOP style and another in procedure style in perl 5.1 (centos box). The result is procedure style give faster in load time
jnthn gimix_: It's a bit more declarative, but behind the scenes there's a meta-model, so a lot of the customizability is still there. 21:31
21:31 whiteknight joined
masak gimix_: ok. well, all I can say is that the balance might be a bit more even in Perl 6. 21:31
gimix_: then again, don't expect load times comparable to Perl 5 in any of the Perl 6 implementations currently. 21:32
Layla_91 jnthn: Здрасти! ^_^
jnthn In reality, OO is a kinda "level of indirection". You don't know where you're dispatching to until you ask the object.
gimix_ masak: jnth: OOP is built in perl6's core ? 21:33
masak gimix_: yes.
21:33 plobsing left
masak gimix_: Perl 6 is designed with OO in mind from the start. 21:33
jnthn In *some* cases you can work it out statically, as an optimization. But rarely.
masak jnthn: right, the idea with the level-of-indirection is to buy you dynamism. which means you sell a bit of efficiency. 21:34
jnthn Aye.
gimix_: Perl 6 is much more deeply OO than Perl 5.
masak OO all the way down. :)
slavik and we get object.blah().blah2().blah3().blah4().blah5() and that returns an excel spreadsheet made from an xmlrpc call :D
diakopter we have those. 21:35
21:35 plobsing joined
gimix_ thanks so much 21:35
jnthn I hope you implemented a custom meta-object to translate the blah call into a web service call. :P
diakopter generated by java in oracle's ebs
masak gimix_: you're welcome. we're happy to answer your questions!
slavik jnthn: obviously, that is exactly what blah() does, it's in the docs ;)
gimix_ jnthn: do you have sample about meta-object implement? 21:36
masak rakudo: class A { has $.b; has $.c }; say A.^attrs.perl
p6eval rakudo 549d2a: OUTPUT«Method 'attrs' not found for invocant of class ''␤ in main program body at line 22:/tmp/3sALODOe12␤»
masak rakudo: class A { has $.b; has $.c }; say A.^attributes.perl
p6eval rakudo 549d2a: OUTPUT«Method 'attributes' not found for invocant of class ''␤ in 'Mu::attribs' at line 1284:CORE.setting␤ in 'Mu::perl' at line 1293:CORE.setting␤ in main program body at line 1␤»
masak :/
slavik D: 21:37
masak consults the source code
slavik is parrot still sort of slow?
diakopter O_O_
tadzik isparrotfastyet.com/
slavik ooh
tadzik: what does that measure?
diakopter that's not much of a history
jnthn gimix_: Not quite there with custom meta-objects in Rakudo yet, but it's being worked on. 21:38
gimix_: But to get an idea, see github.com/perl6/nqp-rx/blob/nom/s...lassHOW.pm
21:38 justatheory left
jnthn gimix_: Which is a basic class implementation. 21:38
masak tadzik: I thought such sites would say either "YES" or "NO", not give numbers :P
Layla_91 tadzik: entire url devoted for bench marking.. nice :)
tadzik slavik: benchmarks of some oofib, rakudo build time or spectests, iirc, and the bench scripts from "IsRakudoFastYet" :)
gil.di.uminho.pt/users/smash/rakudo-bench.html 21:39
slavik ty
woah!, dice.p6 got really fast ... quicker rand() functions?
tadzik , proudly: 21:40
YES!
plobsing unfortunately that info hasn't been updated for months :(
tadzik yeah
colomon smash was trying to teach the rest of us how to do it. I should have paid more attention. :( 21:41
slavik is there a doc on how to do it?
plobsing use the source: gil.di.uminho.pt/users/smash/run_bench.pl.html 21:42
jnthn goes to hack on native attrs a little more... :) 21:46
plobsing jnthn++ # adding a t to naive attrs 21:47
jnthn :P 21:48
plobsing: I already did those. My naivety cost me allocating two GCables per attribute access. :) 21:49
masak oh the naïvety
:)
jnthn I know, it drives me dotty.
masak :P 21:50
"I remember when I was young and naïf. the whole experience cost me two GCables! per attribute access!"
just let inflation have its course, and soon you'll be paying 10 GCables for a carton of milk... 21:51
diakopter What's a GameCubable
masak I thought it was a kind of Cable. 21:52
21:52 Alias joined
masak maybe Clark Gable's evil twin, Glark Cable... 21:52
21:55 MayDaniel left 21:58 stkowski joined
rokoteko Gargabe Collectables, ie. stuff that need to be carbage collected? 21:59
masak correct.
diakopter is suddenly reminded of trading Garbage Pail Kids trading cards at age 10 22:00
masak "Each sticker card featured a Garbage Pail Kid character, with some comical abnormality and/or suffering some terrible fate, and a humorous, word play-rich character name, such as Glandular Angela." 22:01
masak lols at the word play-rich character name "Glandular Angela" 22:02
22:03 timbunce left
colomon plobsing: thanks for digging up the source. 22:03
diakopter vaguely remembers actually watching the movie at some point
22:04 justatheory joined 22:09 frikinz left, timbunce joined
sjohnson /j perl 22:17
oops
masak sjohnson! \o/ 22:18
sjohnson hi masak
looks like i got busted trying to go to a perl 5 channel 22:19
sjohnson slaps his own wrist
i should be looking to the future
masak sjohnson: dude, I have no problem with you using Perl 5. I use it myself, it's a nice Perl version.
jnthn Perl 5 has a future too, y'know. :P 22:20
22:20 Mowah left
colomon I just used it to solve a practical problem last night / this morning. 22:21
colomon needed pack / unpack.
masak makes a note of that 22:22
colomon what is the current state of pack / unpack in Rakudo? 22:23
Tene At work, we had some MySQL replication needs that MySQL couldn't handle, so we wrote our own replication using Perl 5, that uses pack/unpack.
masak colomon: barely existing. I have some plans for how to implement more of them.
much of pack/unpack can be implemented in Perl 6. some of it, the parts having to do with Str/Buf, need a bit more thought. 22:24
22:25 Layla_91 left 22:26 pmurias joined
pmurias sorear: hi 22:26
22:27 shi left
colomon masak: let us know if there's something we can do to help with pack / unpack. They don't have to be very powerful to be very useful... 22:29
masak colomon: yes, there is. a prioritized wishlist would go a long way in helping. 22:30
22:34 kaare_ left, shi joined
colomon afk # noms 22:38
22:40 dju left 22:46 dju joined 22:49 Trashlord left 22:52 klunky left 22:56 jevin left 22:59 wallberg left, timbunce left 23:04 pmurias left, jimmy1980 left 23:08 plobsing left 23:11 MayDaniel joined 23:12 snearch left, pmurias joined, jimmy1980 joined
diakopter pmurias: hi :) 23:20
pmurias diakopter: hi
colomon back 23:22
masak: I used "S>", "I>", "A4", and "f>" last night. 23:24
pmurias diakopter: how's your plan to add native types to niecza? 23:25
masak colomon: excellent. get a gist started and get people to weigh in :)
colomon: ISTR we have A already. 23:26
23:26 shi left, cafesofie joined 23:28 gimix_ left 23:43 whiteknight left 23:45 impious left 23:49 Intensity joined 23:53 plobsing joined
dalek p-rx/nom: 2cf0a78 | jonathan++ | src/ (7 files):
Drop the _hint variants of get and set attr - just fold it into one variant that handles the case where no hint is passed. Add slots to hold the native type variants, though they're not implemented or used anywhere yet.
23:53
p-rx/nom: 111559c | jonathan++ | src/metamodel/reprs/ (5 files):
Implement the native attr get/bind in the various REPRs. Of course, a bunch of them don't actually support attributes, so the only interesting code is in P6opaque. Missing a attribute type check still.
p-rx/nom: 155b951 | jonathan++ | src/ops/nqp.ops:
Ops for getting and binding native attrs.
23:53 dju left 23:58 dju joined, dju left, dju joined