»ö« | perl6.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo:, alpha:, pugs:, std:, or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend! Set by lichtkind on 5 March 2010. |
|||
ash_ | oh, yah, i can understand that | 00:00 | |
1e60 is big | |||
colomon | I've got it working in my project by simply skipping all the initial 0s, and expressing 1e60 as 10 ** 60, so that it gracefully switches to floating point. | 00:01 | |
00:10
[Coke] left
|
|||
sorear | There must be a cleverer algorithm out there somewhere | 00:12 | |
00:13
sorear sets mode: +o colomon
|
|||
colomon | sorear: probably in general, but I dunno about with the Perl 6 specific characteristics. (like 0.000001 should be a Rat, but 0.000000000000000000000000000001 a Num) | 00:14 | |
rakudo: say 3.14159265358979323846264338327950288 | |||
p6eval | rakudo 11cbd4: OUTPUT«===SORRY!===PAST::Compiler can't compile node of type BigInt» | ||
00:15
sorear sets mode: +vvvv dalek p6eval _ilbot2 IRSeekBot
|
|||
sorear | even just str2num conversion is a bit interesting | 00:16 | |
at one point the GHC parser converted strings to Num-equivalent through a FatRat-equivalent | |||
leading to much hilarity a few years later when some smartalec tried to use 1e-999999 in a program | 00:17 | ||
00:18
lestrrat is now known as lest_away,
[Coke] joined
|
|||
sorear | rakudo: foo(1,2,3; 4,5,6) | 00:19 | |
p6eval | rakudo 11cbd4: OUTPUT«===SORRY!===Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 11» | ||
sorear | std: foo(1,2,3; 4,5,6) | 00:20 | |
p6eval | std 31419: OUTPUT«===SORRY!===Undeclared routine: 'foo' used at line 1Check failedFAILED 00:01 112m» | ||
sorear | alpha: foo(1,2,3; 4,5,6) | ||
p6eval | alpha 30e0ed: OUTPUT«Confused at line 10, near "(1,2,3; 4,"in Main (file <unknown>, line <unknown>)» | ||
sorear | pugs: foo(1,2,3; 4,5,6) | ||
p6eval | pugs: OUTPUT«*** No such subroutine: "&foo" at /tmp/qbSAxXLWNk line 1, column 1 - line 2, column 1» | ||
colomon | sorear... huh. Actually, it occurs to me that a smart version of a naive conversion routine might automatically Do The Right Thing wrt Rat versus Num. | 00:22 | |
00:25
azert0x left
00:26
kensanata left
|
|||
colomon | okay, I'm not sure whether to be proud or ashamed of this code: | 00:32 | |
$int-part.Int + [+] $frac-part.comb.kv.map(-> $i, $d { $d eq '0' ?? 0 !! $d.Int / (10 ** ($i + 1) }); | |||
well, certainly mildly ashamed for the missing paren. | 00:33 | ||
00:35
micahjohnston joined
|
|||
colomon | rakudo: say ~("14159265358979323846264338327950288".comb(/. ** 1..4/)) | 00:36 | |
p6eval | rakudo 11cbd4: OUTPUT«1415 9265 3589 7932 3846 2643 3832 7950 288» | ||
00:36
micahjohnston left,
[Coke] left
00:40
masonkramer_ joined,
masonkramer left,
masonkramer_ is now known as masonkramer
00:51
\shade\ left
00:52
shade_ joined
|
|||
colomon | if a few people could pound on github.com/colomon/str2num, I'd appreciate it. I think I've got it basically working now. Not the most efficient algorithm for sure, but as far as I can tell (tired as I am) this version works pretty well. | 00:59 | |
writing more tests would be good. | 01:00 | ||
:) | |||
off to my in-laws' to get some sleep now.... | |||
01:03
cjk101010 left
01:05
colomon left
01:07
uniejo joined
01:13
japhb left
01:14
whiteknight left
|
|||
uniejo | perl6: role A { method a { say "a" } }; class B does A {}; B.new().a() | 01:17 | |
p6eval | rakudo 11cbd4: OUTPUT«Could not find sub &say in 'a' at line 11:/tmp/w7XZWIStA8 in main program body at line 11:/tmp/w7XZWIStA8» | ||
..elf 31419, pugs: OUTPUT«a» | |||
sorear | pugs: \(1,2,3; 4,5,6).WHAT.say | 01:26 | |
p6eval | pugs: OUTPUT«***  Unexpected "\\(" expecting program at /tmp/I4zvlSCKzd line 1, column 1» | ||
sorear | pugs: say WHAT \(1,2,3; 4,5,6) | ||
p6eval | pugs: OUTPUT«***  Unexpected "\\(" at /tmp/4EbqdDPmI5 line 1, column 10» | ||
diakopter | pugs: (\.(1,2,3; 4,5,6)).WHAT.say | 01:27 | |
p6eval | pugs: OUTPUT«*** Cannot cast from VUndef to Pugs.AST.Types.VCode (VCode) at /tmp/XHf5g0iSDN line 1, column 2-18» | ||
diakopter | O.o | ||
01:28
redicaps joined
01:33
felliott joined
01:37
plobsing joined
01:40
shade_ left,
shade_ joined
01:41
drbean_ is now known as drbean
01:50
japhb joined
01:52
snarkyboojum joined
01:55
ashleydev left
01:57
jaldhar joined
02:00
zorgnax joined
02:08
lest_away is now known as lestrrat
02:09
meppl left,
christine left,
nadim left,
tomaw left,
felipe left,
Gothmog_ left,
ingy left,
opx^away left
02:10
Grrrr left,
Grrrr joined,
meppl joined,
christine joined,
nadim joined,
tomaw joined,
Gothmog_ joined,
ingy joined,
opx^away joined,
card.freenode.net sets mode: +o ingy
02:11
uniejo left
02:14
shade_ left,
shade_ joined
02:16
x19290 joined
|
|||
x19290 | Question about Rakudo/Parrot: | 02:17 | |
When I | |||
$ perl6 --target=pir -o 123.pir -e 123.say | |||
and | |||
$ parrot 123.pir | |||
I get syntax errors. What's wrong? | |||
sorear | 1. using --target with -e is not working properly last I heard | 02:18 | |
x19290 | echo 123.say > 123.p6 | 02:19 | |
sorear | 2. you just tried to load 123.pir in a clean Parrot enviroment - Rakudo installs custom opcodes, which changes the assembly syntax | ||
x19290 | How to install the 'custom' opcode? | 02:20 | |
sorear | by running 'perl6' instead of 'parrot' | 02:21 | |
123.pir can only be loaded from inside a rakudo process | |||
x19290 | is there no easy way to run 123.pir? | 02:22 | |
sorear | I don't think there's /any/ way to run 123.pir | 02:23 | |
precompilation is not suitable for general use at this time | |||
it's only useful for bootstrapping | |||
x19290 | I think perl6 will have a compiler mode like javac | 02:24 | |
Is it wrong? | |||
sorear | our build system uses perl6 --target=pir to compile the standard library, then pastes the output into the compiler | ||
oh yes, it *will* | |||
plobsing | sorear: have you tried using PBC instead? dynops work in that medium (modulo load order issues) | ||
x19290 | you mean --target=pbc? | 02:25 | |
sorear | plobsing: 1. it's not possible to generate PBC from PCT-based compilers 2. even if it did work, it wouldn't, because rakudo needs to control its own initialization | 02:26 | |
02:26
ciphertext left
|
|||
sorear | getting AOT compilation to work in the general case is a GSoC-sized project | 02:26 | |
you're welcome to take it on now, but I'd wait till 2011 | |||
sorear is having trouble with slicels | 02:27 | ||
02:27
colomon joined,
sorear sets mode: +o colomon
|
|||
pmichaud | good evening, #perl6 | 02:27 | |
sorear | good evening, pmichaud | 02:28 | |
pmichaud: can you briefly explain how foo(1,2,3; 4,5,6) is expected to work? | |||
pmichaud | sorear: that's still a bit of speculation (more) | 02:31 | |
sorear: my plan at this point is that multiple statements in an arglist results in a slicel instead of a parcel | |||
frew | pmichaud: where do you keep your slides again? | 02:32 | |
pmichaud | and converting a slice to a Capture causes things to not collapse | ||
s/collapse/flatten | |||
frew is making links etc in blog post | |||
pmichaud | frew: pmichaud.com/2010/pres/ | ||
colomon | o/ | ||
frew | perfect | ||
thanks | |||
02:33
ciphertext joined
|
|||
frew | pmichaud: what are the keys for this? I see that space and enter go forward, what about backwards? | 02:34 | |
pmichaud | N and P work | ||
so should pgup and pgdn | |||
and there are links at the bottom, if you can make the window tall enough | |||
frew | ahhh | ||
I was wondering why I couldn't see those | |||
my laptop must be too short | 02:35 | ||
x19290 | sorear: I've learned that in somedayperl6 will have | ||
pmichaud | yeah, they're done with floating blocks in the HTML | ||
x19290 | a compiler mode like javac. Thank you. | ||
pmichaud | Spork has been really good for generating slides for my presentations; I have lots of things I'd like to do differently with it, but ENOTUITS | ||
(fixing the layout and navigation is one of them) | 02:36 | ||
frew | pmichaud: eh, that's how it goes. | ||
mine are using javascript etc and that has other issues | |||
pmichaud | one of my first significant Perl 6 projects (besides the compiler itself) is likely to be a WikiCreole to HTML translator, followed shortly by a slideshow presenter based on that :) | 02:37 | |
I sure wish those Perl 6 folks would hurry up and release something so that I can do that. :) :) | |||
frew | hahahaha | ||
shouldn't you be able to do that now? | |||
that's just a matter of tuits right? | 02:38 | ||
02:38
x19290 left
|
|||
pmichaud | yes, it's still ENOTUITS on that :) | 02:38 | |
frew | of course | ||
sorear | What day was -perl6? | 02:39 | |
pmichaud | although maybe I'll work on it during my plane trip in July. | ||
sorear wonders what good a hyperlink in a slide does | |||
pmichaud | It would be *really* cool if I could give a presentation that was labeled "powered by Rakudo Perl" :) | ||
frew | sorear: so you can follow doc at home? | ||
pmichaud | sorear: while giving a presentation, I can click on the link to jump to the site directly | 02:40 | |
and yes, what frew++ said | |||
frew | pmichaud: I'm actually pretty amazed at how easy it is to work on a plane, maybe because of the lack of distractions? | ||
I got 3 things that I'd been planning on doing for a couple months done on the flight up and down | |||
pmichaud | Sometimes working on a plane works for me, sometimes not. Often I'm just glad to have some time to rest :) | ||
frew | sure | 02:41 | |
pmichaud | but I've also been known to do some pretty significant branch work on a plane :) | ||
(much easier now that we have git) | |||
frew | indeed | ||
colomon | I've never had a seat / laptop combination I could comfortable open on a plane. :( | 02:42 | |
but I don't fly much. | |||
otoh, I get good work done when we're driving somewhere on vacation. | |||
frew | colomon: I find it interesting that just shaving a couple inches off my 13 inch laptop made it comfortable | ||
pmichaud | plane work is one of the (many) reasons I went for an ultra-small notebook. | 02:43 | |
sorear | Frighteningly, I don't think I've ever been on an airplane | ||
pugssvn | r31420 | lwall++ | [STD] differentiate dup prefix message from bad infix for bbkr++ | ||
pmichaud | afk for a moment, running up to my room to grab a dr pepper. They seem to be hard to find around here. | ||
TimToady never flew till he was 19 | 02:44 | ||
colomon | TimToady: don't know if you saw, I came up with a beautiful, terrible way to handle the decimal number issue: | 02:46 | |
sorear has a few months yet, then | |||
colomon | [+] $int-part.comb.reverse.kv.map(-> $i, $d { $d.Int * (10 ** $i) }) + [+] $frac-part.comb.kv.map(-> $i, $d { $d.Int / (10 ** ($i + 1)) }) | 02:47 | |
02:47
ciphertext left
|
|||
TimToady wonders if colomon has Tourette's... | 02:47 | ||
colomon | It works properly because **, *, /, and + do the Right Thing wrt to types. | ||
TimToady | yay (I think) | 02:49 | |
colomon | it's good news, but for sure we'll have to find a more efficient approach in the long run. | ||
possibly even the middle run. :) | |||
pmichaud | ...and maybe even in the short run. :) | ||
I'm not a fan of those **'s, though. | 02:50 | ||
colomon | ;) | ||
pmichaud | Seems like we should be able to do things incrementally. | ||
colomon | yeah, I'm sure we can. just lose the beautiful functional programming style of it if we do it the sensible way. | ||
*we just | |||
sorear | just as long as 1e-99999999 doesn't attempt to allocate a 12 megabyte integer | 02:51 | |
TimToady | well, the compiler should spot it and do strength reduction for us :) | ||
colomon | actually, there is a functional way to do it in p6: | ||
$int-part.comb.reverse Z 1, 10, 100 ... * -> $d, $pot { $d.Int *$pot } | 02:52 | ||
TimToady | \o/ | 02:53 | |
colomon | (that's untested, but it ought to work) | ||
pmichaud | I do like that form much better :) | 02:54 | |
TimToady | .comb(/\d/) unless you've removed _ | ||
colomon | TimToady: nice. that is a good way to remove it all right. | ||
does \d only match '0' .. '9'? | |||
pmichaud | matches any unicode digit | ||
colomon | (ie do we have to worry about funky unicode digits) | ||
pmichaud | we eventually have to worry about funky unicode digits | 02:55 | |
(iirc) | |||
sorear | Is there a simple, exact algorithm to parse C numbers? | ||
TimToady | but what do .Int do with it, is the Q | ||
sorear | Emphasis on the exact | ||
0.1 cannot be represented exactly as a Num; have fun parsing 0.123456789 | |||
colomon | well, I'm thinking once this works it should probably be used for .Int, too. | ||
sorear: 0.1 is a Rat in p6 | |||
02:56
Limbic_Region left
|
|||
colomon | TimToady: which is why I was wondering how to write a "single-digit to Int" algorithm. Easy enough for ascii digits... | 02:56 | |
TimToady | should be in the unicode tables | 02:57 | |
sorear | it's the NumericValue property | ||
colomon | do we have an easy way of getting at that? | ||
TimToady | blizkost to Perl 5? :) | 02:58 | |
pmichaud | colomon: no, not presently. | ||
colomon: I suspect ICU provides that property somewhere, but Parrot doesn't expose it yet. | |||
sorear | ICU? | ||
TimToady | you could borrow the tables that sorear++ came up with for STD | ||
colomon | oh, interesting. sorear++ | 02:59 | |
pmichaud | colomon: this is a place where I'd not have perfect become the enemy of good enough (for now) :-) | ||
colomon | :) | ||
TimToady | and if you grab those tables you can probably dump ICU, for the most part... | 03:00 | |
pmichaud | ...at the startup cost of initializing the tables | ||
unless they're in C...? | |||
TimToady | or implementing mmap | ||
pmichaud | or mmap might work | 03:01 | |
if they're in C we could make something work. | |||
colomon | rakudo: (1, 10, 100 ... *).munch(20).map({ .WHAT.say }).eager | ||
sorear | the STD tables are designed to be processed using a minimum number of PerlIO traps | ||
p6eval | rakudo 11cbd4: OUTPUT«Int()Int()Int()Rat()Rat()Rat()Rat()Rat()Rat()Rat()Num()Num()Num()Num()Num()Num()Num()Num()Num()Num()» | ||
03:01
pnate left
|
|||
sorear | they aren't quite properly aligned for mmap() | 03:01 | |
colomon | hmmm, not quite right yet. | ||
TimToady | yet | ||
03:01
pnate joined
|
|||
pmichaud | well, they're static, so we could certainly make a static C data structure for them, and some opcodes to do what we want. | 03:01 | |
sorear | also, they currently only contain Blank and GeneralCategory | 03:02 | |
pmichaud | That might in fact be a Big Win, rather than waiting for Parrot to figure out how it's going to handle things. | ||
03:02
snarkyboojum left
03:03
meppel joined
|
|||
sorear | ok, I'll do that soon | 03:04 | |
sorear loves designing data structures and has already worked out a nice format for this | |||
colomon | sorear++ | 03:06 | |
03:08
meppl left
03:10
Guest39268 left
03:17
snarkyboojum joined
03:18
agentzh joined
|
|||
colomon | 'night, all. | 03:22 | |
pmichaud | 'night, colomon++ | ||
colomon | pmichaud, TimToady: hope to see you in the morning for a bit. | ||
pmichaud | colomon: same here. I think we'll be in the union, either downstairs in the lobby area or in the BOF room | 03:23 | |
(but perhaps check on irc first, or if you're unable to find us) | |||
(cell # sent in /msg) | |||
03:35
molaf joined
03:46
skangas joined
03:49
snarkyboojum left
03:51
ashleydev joined
03:56
ciphertext joined
04:04
snarkyboojum joined
|
|||
sorear | Maybe we should just use ICU... I don't feel very good about stealing my STD data source hack for Rakudo | 04:11 | |
It involves die unless $] == 5.012001; and lots of scraping of files in @INC/unicore/lib | 04:12 | ||
04:13
JimmyZ joined
|
|||
dalek | meta: r342 | stefa...@cox.net++ | trunk/vicil/ (2 files): [vicil] Adopt Parrotish arguments model - native array + native hash. It's anyway. Also, it cuts the circularity issues involved in Parcel having methods which take arguments. |
04:21 | |
04:24
skids left
04:25
mjk joined,
shade_ is now known as shade\
04:26
ashleydev left
04:30
patspam left
04:36
skids joined
04:38
mjk left
05:00
molaf left
05:09
ash_ left
05:16
kaare joined
05:17
kaare is now known as Guest10194
|
|||
dalek | p-rx: 9157c78 | pmichaud++ | (2 files): Allow hyphens and single-quotes in subrule calls. |
05:32 | |
p-rx: f0bed9b | pmichaud++ | (2 files): Allow hyphen and single-quotes in NQP identifiers. |
|||
p-rx: a3d5c5b | pmichaud++ | build/PARROT_REVISION: Bump PARROT_REVISION to get debugging fix. |
|||
p-rx: ebaf06c | pmichaud++ | (2 files): Add ResizablePMCArray .delete and .exists . |
|||
p-rx: 4ee17c4 | pmichaud++ | src/stage0/ (4 files): Update bootstrap. |
|||
05:40
orafu left
05:42
orafu joined
05:57
tylercurtis left
05:59
meppel left,
Su-Shee joined
06:07
cjk101010 joined
06:09
jakk joined,
jakk left
06:11
nadim left
06:12
nadim joined
06:17
Su-Shee_ joined
06:21
Su-Shee left
06:25
nadim left
06:26
justatheory left
06:29
nadim joined
06:32
zorgnax left
|
|||
quietfanatic | rakudo: class A {our $.x = 4}; say A.new.x | 06:33 | |
p6eval | rakudo 11cbd4: OUTPUT«Method 'x' not found for invocant of class 'A' in main program body at line 11:/tmp/HfotnSJZki» | ||
quietfanatic | I'm gonna submit that as a bug. | ||
06:35
agentzh left
06:43
gfx joined
06:48
snarkyboojum left
06:49
Su-Shee_ is now known as Su-Shee
07:02
mberends joined
07:16
thepler left,
TiMBuS joined
07:28
Trashlord joined,
mberends left
07:33
quietfanatic left
07:42
mberends joined
07:55
kensanata joined
07:58
fridim joined
07:59
thepler joined
08:01
[particle] left
08:02
ejs joined
08:03
spinclad left
08:05
[particle] joined
08:06
tadzik joined
08:07
ejs left
08:08
ejs joined
08:13
thebird joined
08:20
skids left,
skids joined
08:24
JimmyZ left
08:29
stepnem joined
08:30
Su-Shee left,
Su-Shee joined
08:43
plobsing left
08:57
kensanata left
09:23
lestrrat is now known as lest_away
09:27
mjk joined
09:31
redicaps left
09:40
agentzh joined
09:46
masak joined
09:47
stepnem left,
fridim left
|
|||
mberends | new directions to the Belgian Perl Workshop: brussels.the-hub.net/public/contact.html | 09:48 | |
masak | o/ | 09:49 | |
mberends | o/ | ||
masak | I made moderate progress with the pls proof-of-concept yesterday. | 09:50 | |
found two bugs which I promptly saved away and ignored. | 09:51 | ||
09:51
pmurias joined
|
|||
mberends | at least the TDD finds the bugs, instead of the end user :) | 09:53 | |
masak | :) | ||
09:54
ciphertext_ joined,
ciphertext left,
ciphertext_ is now known as ciphertext
09:55
nsh left
09:56
nsh_ joined
|
|||
pmurias | sorear: re vicil is intended to be used together with perlesque or a standalone thing? | 09:57 | |
sorear | I don't know yet | 10:01 | |
it's more an exercise in clarifying the future than anything else | |||
10:01
ciphertext left
10:03
ciphertext joined
10:04
azert0x joined
|
|||
jnthn | morning o/ | 10:12 | |
moritz_ | \o | 10:13 | |
"morning" | |||
masak grins | |||
jnthn | It is still in my current timezone. :P | ||
11:23 or so here in England | |||
moritz_ | wow, England is UTC + 1:10 now! :-) | 10:14 | |
masak | moritz_: don't tease jnthn, he's just woken up... :P | ||
jnthn | :P | 10:15 | |
True. :P | 10:16 | ||
masak | jnthn: it's OK, I didn't wake up long ago either. :) | 10:17 | |
jnthn | :-) | ||
Yes, I seem to recall our preferred waking up times worked out very well last hackathon. :-) | 10:18 | ||
masak | not to mention our preferred going-to-bed times! | 10:19 | |
jnthn | :-) | 10:20 | |
masak | if I do `run("something that works") or otherwise()`, when is &otherwise called? | ||
jnthn | I forget what run returns... | 10:21 | |
rakudo: say &run.perl.signature | |||
p6eval | rakudo 11cbd4: OUTPUT«Method 'signature' not found for invocant of class 'String' in main program body at line 11:/tmp/gcljS5uMUl» | ||
jnthn | oh ffs | ||
I forget what run returns...! | |||
masak | coffee for jnthn! | ||
jnthn | rakudo: say &run.signature.perl | ||
p6eval | rakudo 11cbd4: OUTPUT«:(Any $commandline)» | ||
jnthn | That's not going to answer what I wanted anyway. | ||
masak | jnthn: it returns an Int but a Bool. | ||
jnthn | oh | 10:22 | |
Well, I guess or cares about truth? | |||
masak | I hope so. | ||
otherwise, what would be the point? | |||
jnthn | I'd imagine it does, in which case the answer is "when it's but True" | ||
10:22
mjk left
|
|||
jnthn | However, but True only started working very recenlty in Rakudo. | 10:22 | |
So run may be out of date with respect to that. | 10:23 | ||
masak submits rakudobug | |||
jnthn | oh huh, the Belgian Perl Workshop has moved?! | ||
mberends | o/ jnthn. yes, brussels.the-hub.net/public/contact.html | 10:24 | |
jnthn | moritz_: I plan to be at YAPC::EU before the conf | ||
moritz_: Some of the Monday, all of the Tuesday. | 10:25 | ||
mberends: Cool | 10:27 | ||
mberends: Don't suppose you have heard anything about any pre-conference meetup? | |||
10:28
agentzh left
|
|||
mberends | jnthn: no, we probably all received the same email | 10:28 | |
jnthn: but I'd be happy to meet up near there quite early | |||
jnthn | mberends: I more meant, night before the conference, for pivo ;-) | 10:29 | |
mberends | heh, jnthn is not and early-morning person :) | 10:30 | |
jnthn | omg cake van?! | ||
brb | |||
10:34
[Coke] joined
|
|||
jnthn | wow | 10:34 | |
The village my family lives in now has a van that drives around the village selling cake. :-) | |||
When I was a kid we only got ice-cream that way. :-) | 10:35 | ||
colomon | jnthn: when I was a kid, we lived far enough away from town that the ice-cream truck only came by a couple of times a summer. :) | 10:37 | |
jnthn | wow :-) | ||
colomon | so, I went to a quick talk on functional programming in Perl 5 yesterday. | ||
most everything they talked about is built-in / easier in p6. | 10:38 | ||
except, we don't have memoize yet! | |||
10:38
JimmyZ joined
|
|||
arnsholt | colomon: I'm sure that can be arranged =) | 10:38 | |
colomon | arnsholt: me too, I'm just trying to make sure that the Right People are thinking about it. | 10:39 | |
jnthn | colomon: I'm sur ethere's an is remembered or similar trait | ||
That you can put on a sub to get that effect | |||
I think it's in spec somewhere. | |||
colomon | seriously?! | ||
TimToady++ | |||
jnthn | Unless it was a bit of the spec I read in a dream. ;-) | ||
jnthn tries to find it | |||
colomon | hmmm, it's not "remembered" | ||
arnsholt | If it was in a dream we can always update reality to reflect that =D | ||
colomon | it seems like memoize should be easy to do in p6, whether it's a module or a trait we need to implement | 10:40 | |
jnthn | Found | 10:41 | |
is cached | |||
colomon | and given Rakudo's current speed, it seems like it would be very useful. ;) | ||
jnthn | In S06 | ||
If only we had .wrap working again, we could probably implement it already. :-)_ | 10:43 | ||
colomon | .wrap? | 10:44 | |
jnthn | colomon: aye | 10:45 | |
colomon: The thing that lets you wrap things around a routine | |||
Then it's just | 10:46 | ||
tadzik | rakudo: my @arr = (1, 2, 3, 4, 5); @arr ~~ 5 | ||
p6eval | rakudo 11cbd4: ( no output ) | ||
tadzik | rakudo: my @arr = (1, 2, 3, 4, 5); say 'ok' if 5 ~~ @arr | ||
p6eval | rakudo 11cbd4: ( no output ) | ||
tadzik | hrm, repl is more verbose | ||
rakudo: my @arr = (1, 2, 3, 4, 5); say 'ok' if @arr ~~ 5 | 10:47 | ||
p6eval | rakudo 11cbd4: OUTPUT«ok» | ||
jnthn | multi trait_mod:<is>(Routine $r, :$cached!) { $r.wrap(sub (|$c) { if is_cached($c) { ...retrun cached... } else { run and cache } }); } | ||
tadzik | what's the difference between this two? | ||
10:47
JimmyZ left
|
|||
colomon | @arr ~~ 5 converts @a to a scalar, the number of elements, ie 5 | 10:47 | |
jnthn | If you want to grep through an array for values, you want | 10:48 | |
@arry ~~ *,$value,* | |||
tadzik | looks weird, but I think I get it | 10:49 | |
jnthn | * menas "match anything" | ||
tadzik | how about 5 ~~ @arr, how does it work? | ||
jnthn | Puts 5 in list context, rendering a one-item list | ||
So it's true if @arr only contains one element and it's 5 | |||
Smart-match is not symmetric. | |||
tadzik | mhm | 10:50 | |
jnthn | The type of the thing on the right hand side always decides. | ||
10:54
cognominal left
10:56
cognominal joined
11:00
redicaps joined
11:01
cognominal left,
cognominal joined
|
|||
pugssvn | r31421 | pmurias++ | [smop] much faster handling of .ri files | 11:06 | |
11:09
gfx left
|
|||
colomon | loliblogged: justrakudoit.wordpress.com/2010/06/24/euler-2/ | 11:09 | |
11:11
stepnem joined
11:13
Intensity left
|
|||
jnthn afk for a bit | 11:17 | ||
tadzik | ~(1, 1, *+* ... 4000000) | 11:23 | |
I don't get it, the *+* part | |||
looks a bit like Camelia, but what does it do? | |||
colomon | tadzik: if * is used as a term in for an operator, it generates a closure. | 11:24 | |
so *+* is the same as { $^a + $^b } | 11:25 | ||
tadzik | hmm | ||
colomon | the same trick is used there with * !% 2 | ||
the only difference is the * + * closure takes two arguments, and the * !% 2 takes only one | 11:26 | ||
that's based on the number of *s in the expression. | |||
tadzik | alright, I get that one. But this *+*. In the closure you wrote, it gets the first one from the left and first from the right? | ||
redicaps | rakudo: grammar word {token TOP{\w+}}; word.parse("foo"); | ||
p6eval | rakudo 11cbd4: ( no output ) | ||
tadzik | no, that makes no sense | ||
redicaps | rakudo: grammar word {token TOP{\w+}}; word.parse("foo"); | ||
tadzik | how does it know to take the last two? | ||
p6eval | rakudo 11cbd4: ( no output ) | 11:27 | |
colomon | tadzik: the closure just takes two | ||
tadzik | hmm | ||
colomon | the series operator, if it has a closure with N arguments, takes the last N arguments that were generated | ||
tadzik | ah | ||
what is the series operator here? | |||
colomon | ... | ||
tadzik | mhm | 11:28 | |
at the first glance it looks more magical than Haskell to me | |||
masak | rakudo: grammar word {token TOP{\w+}}; say word.parse("foo"); | 11:29 | |
p6eval | rakudo 11cbd4: OUTPUT«foo» | ||
colomon | it's actually built out of very simple ideas, but it does take a while to get used to them. | ||
tadzik | it's magic anyway ;) | 11:30 | |
like bogosort. It's easy to understand, but it's magic | 11:31 | ||
masak | bogosort is magic? :) | 11:32 | |
tadzik | well, the wikipedia implementation is, at the first glance | ||
masak | rakudo: my @a = 3, 2, 1, 5, 4; @a.=pick until [<=] @a; say @a.perl | ||
p6eval | rakudo 11cbd4: OUTPUT«[3]» | ||
masak | uhm :) | ||
tadzik | especially when you see the Java solution below | ||
masak | rakudo: my @a = 3, 2, 1, 5, 4; @a.=pick(*) until [<=] @a; say @a.perl | ||
p6eval | rakudo 11cbd4: OUTPUT«[1, 2, 3, 4, 5]» | 11:33 | |
masak | \o/ | ||
tadzik | hmm | ||
arnsholt | masak: Bogowin! =D | ||
tadzik | rakudo: my @a = 3, 2, 1, 5, 4; @a.=pick * until [<=] @a; say @a.perl | ||
p6eval | rakudo 11cbd4: OUTPUT«Could not find sub &until in main program body at line 11:/tmp/FdJZ19PMQl» | ||
tadzik | there has to be () around *, hm? | ||
masak | tadzik: that's two-terms-in-a-row. | ||
tadzik | mhm | ||
masak | tadzik: and that's not allowed :) | ||
tadzik: so yes, method calls must have either the colon or parens. | |||
moritz_ | pick: * | ||
tadzik: either .pick(*) or .pick: * | 11:34 | ||
tadzik | hmm | ||
what kind of syntax is 'pick: *'? | |||
rakudo: my @a = 3, 2, 1, 5, 4; @a.=pick: * until [<=] @a; say @a.perl | |||
moritz_ | method call syntax | ||
p6eval | rakudo 11cbd4: OUTPUT«[1, 2, 3, 4, 5]» | ||
tadzik | yeah, but how it works? | ||
arnsholt | You put a colon after the method name instead of parens around the arglist | 11:35 | |
moritz_ | it takes the rest of the statement as argument list | ||
arnsholt | $obj.method: $a, $b, $c | ||
tadzik | nice | ||
moritz_ | with the exception of statement modifiers, which are not part of the argument list | ||
11:35
[Coke] left
|
|||
tadzik | even more TIMTOWDY | 11:35 | |
*towtdy | 11:36 | ||
masak | "Yt"? | ||
:) | |||
moritz_ | y. | ||
wow, just read about a wimbledon match | 11:37 | ||
that was aborted after ten hours because it got too dark | |||
score: 59:59 in the 5th set, not yet decided :-) | |||
masak | crazy. | ||
moritz_ | that's something I really admire, that none of the players gave up | 11:38 | |
after all even a standard 3 hours game of tennis is hard work | |||
masak | how can I do a MAIN sub which optionally accepts a --foo flag with no value, the presence of which translates into a Bool? | 11:40 | |
tadzik | (1..*).list.reverse.shift | ||
is reverse what breaks everything? | |||
moritz_ | masak: (Bool :$foo) | 11:41 | |
in the signature | |||
colomon | tadzil: yes | ||
*tadzik | |||
masak | tadzik: what do you expect that to return? :) | ||
moritz_ | reversing an infinite list is bound to cause problems | ||
colomon | you can't revers... what moritz_ said. | ||
11:41
ejs left
|
|||
tadzik | masak: and what do you think? :) pop didn't work either, so I tried shift :) | 11:41 | |
masak | tadzik: I'm asking because I don't know. :) | 11:42 | |
moritz_ | what's the last item of an infinite list anyway? | ||
masak | moritz_: that didn't work for me. Nominal type check failed for parameter '$foo'; expected Bool but got Any instead | ||
moritz_: that's when it's not supplied. | |||
I think there's an RT ticket for that. | |||
moritz_ | oh. | ||
I think there was a patch that was supposed to fix the case of --/value | 11:43 | ||
maybe that broke it | |||
rakudo: sub MAIN(Bool :$foo) { } | |||
p6eval | rakudo 11cbd4: ( no output ) | ||
moritz_ | works here when not present | ||
masak | hm. | ||
moritz_ | are you sure you didn't forget the : ? | 11:44 | |
masak | seems I get that error, but not there. | ||
rakudo: sub MAIN(Bool :$foo) { say $foo.WHAT } | |||
p6eval | rakudo 11cbd4: OUTPUT«Any()» | ||
masak | right. I tried to use it as a Bool() later, and it blew up. | ||
and that's what the RT ticket was about, too. | 11:45 | ||
so, nevermind. this is all workaroundable. | |||
moritz_ | urks | ||
is this specific to MAIN? | |||
masak | nope. | ||
moritz_ | ah | ||
masak | all non-supplied tyoed nameds. | ||
moritz_ | that explains why I wasn't aware of it | ||
11:47
[Coke] joined
11:51
envi^home joined
11:52
tadzik left
|
|||
takadonet | morning all | 11:58 | |
masak | takadonet: mroing! | 11:59 | |
takadonet | masak: how are u? | 12:00 | |
moritz_ | who is that mr. oing? | ||
masak | :) | ||
takadonet: I'm good. thankful for the relative efficiency of the climate control inside. :) | 12:01 | ||
takadonet: how are u? | |||
takadonet | masak: doing good, extremely busy lately | 12:02 | |
masak | takadonet: aye, same here. | 12:03 | |
12:05
felipe joined
|
|||
dalek | p-rx: a915b78 | bacek++ | (2 files): Add bitwise operators |
12:07 | |
masak | rakudo: say ~(1, 1 ... &[+])[^10] | 12:08 | |
p6eval | rakudo 11cbd4: OUTPUT«1 1 1 1 1 1 1 1 1 1» | 12:09 | |
moritz_ | huh. | ||
masak | closures bug? | ||
moritz_ | wait | ||
masak | or am I doing something wrong? | ||
moritz_ | that's old series syntax | ||
masak | rakudo: say ~(1, 1, &[+] ... *)[^10] | ||
p6eval | rakudo 11cbd4: OUTPUT«get_attr_str() not implemented in class 'Perl6MultiSub' in 'infix:<...>' at line 1 in main program body at line 11:/tmp/x5Trgy3XKZ» | ||
masak submits rakuodbug | |||
moritz_: if that's the old syntax, then I like the new syntax better. | 12:10 | ||
colomon | rakudo: say ~(1, 1, &[+] ... 50) | ||
p6eval | rakudo 11cbd4: OUTPUT«get_attr_str() not implemented in class 'Perl6MultiSub' in 'infix:<...>' at line 1 in main program body at line 11:/tmp/9OU1aHEom6» | ||
colomon | rakudo: say ~(1, 1, *+* ... 50) | ||
p6eval | rakudo 11cbd4: OUTPUT«1 1 2 3 5 8 13 21 34» | 12:11 | |
moritz_ | I guess it's related to &[+] referring to a multi | ||
colomon | moritz_: yes | ||
I'm not sure the &[+] can actually work here. | |||
masak | why not? | ||
colomon | ... needs to know how many arguments the closure takes. | ||
masak | ah. | ||
colomon | how many does &[+] take? | ||
masak | two. | ||
colomon | or zero | ||
masak | zero!? | 12:12 | |
colomon | rakudo: say infix:<+>() | ||
moritz_ | for [+] to return 0 | ||
p6eval | rakudo 11cbd4: OUTPUT«0» | ||
moritz_ | and for [*] to return 1 etc. | ||
the default values | |||
colomon | rakudo: say infix:<*>() | ||
masak | huh. | ||
p6eval | rakudo 11cbd4: OUTPUT«1» | ||
masak | well, the ... operator clearly chooses the two-args one here, no? | 12:13 | |
moritz_ | where? | ||
or for [~] to return an empty string, for that matter | |||
masak | moritz_: in the case of the ... series above. | ||
moritz_ | in which case? | ||
12:14
[Coke] left
|
|||
masak | 1, 1, &[+] ... * | 12:14 | |
colomon | looks to me like it doesn't know what one to choose | ||
masak | I mean, ideally. | ||
moritz_ | why? | ||
colomon | what's your rule for that? | ||
masak | that this isn't a zero-args case. | ||
moritz_ | what if there's another infix:<+> with three arguments? | ||
colomon | rakudo: say (1, 1, { rand } ... *).munch(10) | 12:15 | |
moritz_ | the general solution is probably known, and neither specced nor implemented | ||
p6eval | rakudo 11cbd4: OUTPUT«110.03712539919385450.5533102571881830.2906026487207280.5188719889966540.7733171349245680.4927070330798780.3392575986627760.39404857995979» | ||
masak | then choose that for all but the third element. | ||
this sounds a lot like ruoso++'s thinking around the reduce sub. | |||
moritz_ | and that is to do a partial binding, taking off as many elements of a list as can possibly used by the dispatch | ||
colomon | (ie, zero-arg closures are legal in series op) | ||
TimToady | &[+] is specced to choose the 2-arg case | ||
colomon | TimToady++ | 12:16 | |
masak | that settles it. thanks. | ||
colomon | there's the bug, then. :) | ||
TimToady | S03:4686 | 12:17 | |
shower & | 12:18 | ||
moritz_ | rakudo: multi sub a($a, $b) { $a + $b }; multi sub a(Int $a, Int $b) { $a + $b }; say ~(1, 1, &a ... *)[^10] | 12:19 | |
p6eval | rakudo 11cbd4: OUTPUT«get_attr_str() not implemented in class 'Perl6MultiSub' in 'infix:<...>' at line 1 in main program body at line 11:/tmp/UHpiQT8yte» | 12:20 | |
moritz_ | so it's not only the arity | ||
masak includes that in the ticket | 12:21 | ||
moritz_: $makefile.say("\tinstall -D $file ~/.perl6/$file"); | |||
that -D option is -d on Mac OS X. | |||
moritz_ | and -d means something completely different on linux | 12:22 | |
-d, --directory | |||
treat all arguments as directory names; create all components of | |||
the specified directories | |||
hilarity ensured | |||
masak | I see two options: | 12:23 | |
(1) mkdir -p | |||
(2) detect OS or, more specifically, the way `install` works. | |||
moritz_ | (1) is probably more straight forward | ||
masak | any objections to (1)? | ||
ciphertext | colomon: speaking of series, i had a few comments and questions the other day, because I had been working on a new patch (to replace the one i submitted that used a special 'scmp' operator) | 12:24 | |
phenny | ciphertext: 18 Jun 10:28Z <colomon> tell ciphertext I've paused for the moment (on series), but I still have a list of things that need doing and a notion that this is a pretty good time to be doing them. | ||
12:26
bluescreen joined,
bluescreen is now known as Guest89026
|
|||
colomon | ciphertext: yes? | 12:28 | |
masak | rakudo: say "abcdefabc".rindex("b") | ||
p6eval | rakudo 11cbd4: OUTPUT«Method 'rindex' not found for invocant of class 'Str' in main program body at line 11:/tmp/bKU9XHf9bg» | ||
masak | alpha: say "abcdefabc".rindex("b") | ||
p6eval | alpha 30e0ed: OUTPUT«7» | ||
masak submits rakudobug | |||
ciphertext | colomon: ok, first, i had a question about character series. Namely, how should something like 'A'...'DD' behave? should it be the same as 'A'...'D' or 'A'...'Z','AA'...'DD'? | 12:32 | |
colomon | it's almost the same as 'A'...'D' | ||
ciphertext | colomon: 'almost'? | ||
colomon | well, is the same, I suppose. | ||
ciphertext | ok | ||
colomon | it's 'A'...^'DD' that would be different from 'A'...^'D' | 12:33 | |
rakudo: say 'A' ... 'DD' | 12:34 | ||
p6eval | rakudo 11cbd4: OUTPUT«ABCD» | ||
12:34
bphillips joined
|
|||
ciphertext | second, i was going to point out that the current version doesn't support closures on the rhs (to determine endpoint). I actually have this done in my version (github.com/ciphertext/rakudo/blob/m....pm#L310), but there are a lot of other differences too. | 12:35 | |
colomon | there is a difference internally ... 'A'...'D' ends because the series hits 'D', while 'A'...'DD' ends because the next element ('E') is on the opposite side of 'DD' than 'D' is. | 12:36 | |
masak | \o/ first installed project with pls! | 12:38 | |
colomon | \o/ | 12:39 | |
slavik | o/ | ||
12:40
aCiD2 joined,
masonkramer left,
masonkramer joined
|
|||
TimToady | colomon: I suspect that for strings, anything other than exact match is going to be un-dwimmy | 12:41 | |
rakudo: say 'a' ... 'zzz' | 12:42 | ||
p6eval | rakudo 11cbd4: | ||
..OUTPUT«abcdefghijklmnopqrstuvwxyzaaabacadaeafagahaiajakalamanaoapaqarasatauavawaxayazbabbbcbdbebfbgbhbibjbkblbmbnbobpbqbrbsbtbubvbwbxbybzcacbcccdcecfcgchcicjckclcmcncocpcqcrcsctcucvcwcxcyczdadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzeaebecedeeefegeheiejekelemeneoepeqereseteuevewex… | |||
moritz_ | rakudo: say 26**3 | ||
p6eval | rakudo 11cbd4: OUTPUT«17576» | ||
slavik | perl6: say 2**64 | ||
p6eval | pugs: OUTPUT«18446744073709551616» | ||
..elf 31421, rakudo 11cbd4: OUTPUT«1.84467440737096e+19» | |||
slavik | grr | 12:43 | |
TimToady | commuting & | ||
slavik | TimToady: perfect person to ask :) | 12:44 | |
moritz_ | slavik: at least two implementations agree (though they are both wrong) | ||
slavik | moritz_: they are not 'wrong' but I would expect automatic bignum | ||
moritz_: or do you mean wrong in the sense of the 'not following spec' | 12:45 | ||
moritz_ | right | ||
wrong == different answer than specced | |||
rakudo: say (2**64).WHAT | |||
p6eval | rakudo 11cbd4: OUTPUT«Num()» | ||
slavik | moritz_: in rakudo's case, this has to do with parrot? | ||
moritz_ | slavik: that's one way to look at it. If parrot supported native bigints, rakudo would support it too | 12:46 | |
slavik | docs.parrot.org/parrot/1.9.0/html/s...m.pmc.html | ||
moritz_ | there are at least two caveats with this | 12:47 | |
three, I think | |||
slavik | do tell | ||
:) | |||
moritz_ | 1) bignum != bigint | ||
slavik | agreed | 12:48 | |
colomon | ciphertext: my quick impression looking at your version is that you've implemented some nice new stuff and broken some stuff at the same time. Is yours passing all the tests? (afk for a bit, getting ready to commute) | ||
moritz_ | 2) it's not "native" in the sense that an integer register can hold a bignum (or bigint, if it exists) PMC | ||
3) it's only available when people have GMP installed, and parrot's configure.pl detects it | |||
ciphertext | colomon: i don't think it passes everything, no... i haven't had a chance to work on it much in the last few days. | 12:49 | |
12:49
redicaps left
|
|||
slavik | moritz_: gmp? | 12:49 | |
ahh | 12:50 | ||
gnu bignum? | |||
moritz_ | slavik: the math library that parrot uses under the hood | ||
slavik | so if I have libgmp-dev installed, I should get bignum in perl6 and 2**64 in rakudo will output '18446744073709551616' ? | ||
moritz_ | nope; because of caveat 2) | 12:51 | |
parrot has this model of 'vtables' | |||
and there's one to coerce to integer | |||
12:52
pmurias left
|
|||
moritz_ | called get_integer, iirc | 12:52 | |
and it *has* to return a native parrot int | |||
which is broken design, if you consider bigints | |||
because "12244(many digits more)234234".Int boils down to a vtable call | |||
(it doesn't have to for Perl 6 objects, but if it doesn't, HLL interop is in danger) | 12:53 | ||
slavik | parrotbug? | ||
moritz_ | so coercions to int or num prevent us from just using big numbers | ||
slavik: parrot design bug, if you want | 12:54 | ||
slavik | ouch :( | ||
moritz_: any idea if they are working on a fix? | |||
12:54
redicaps joined
|
|||
moritz_ | I don't think it's high priorty for most parrot hackers | 12:54 | |
slavik | :( | ||
12:56
redicaps left
|
|||
colomon | ciphertext: will you have some availability for a long-distance hackathon over the weekend? | 13:02 | |
I think we can finish ... if we put our heads together. | |||
moritz_ | masak: I've tried to play with tcurtis' optimization framework, and promptly hit two show-stopper bugs (first one is already fixed) | ||
ciphertext | probably... what time(s)? | ||
moritz_ | it seems every project needs a user to keep 'em honest | ||
13:03
JimmyZ joined
|
|||
masak | moritz_: aye. | 13:03 | |
13:03
Guest10194 left
|
|||
colomon | ciphertext: what timezone are you in? | 13:05 | |
ciphertext | colomon: u.s. central (GMT-6) | 13:07 | |
colomon | I'm eastern. | 13:08 | |
maybe late morning or early afternoon? | |||
13:08
stepnem left
13:09
JimmyZ left
|
|||
colomon | may have to play it by ear around my son's napping schedule. :) | 13:09 | |
13:09
stepnem joined
|
|||
ciphertext | that should work. | 13:09 | |
colomon | in the meantime, we should try to think of test cases. :) | 13:10 | |
moritz_ | speaking of test cases | ||
colomon | remember that series doesn't have to work on just Strs and numbers. ;) | ||
moritz_ | I noticed that somebody re-vamped some of the series tests | ||
and changed file names | |||
somebody needs to adapt t/spectest.data accordingly at some point | 13:11 | ||
I'll try to do that tonight if nobody beats me to it | |||
colomon | looks like files were actually added? | 13:12 | |
moritz_ | added, and series-simple is gone it seems | ||
colomon | oh, right, that's just the .rakudo ghost in my ls | ||
pmichaud | good morning, #perl6 | 13:13 | |
colomon | I've gotta get a move on here, and my rakudo is out-of-date and dirty, anyway. but maybe later today.... | ||
o/ | |||
pmichaud: heading your way... | |||
pmichaud | colomon: we're in the hospitality suite, 2nd floor | ||
colomon | be there in about 30 | 13:14 | |
afk | 13:15 | ||
13:15
colomon left,
felliott left
|
|||
moritz_ | pmichaud: did you have a parrot BOF/metting/whatever? if yes, how did it go? | 13:15 | |
13:16
cjk101011 joined
13:17
cjk101010 left
|
|||
masak | morning, pm. | 13:17 | |
ok, I have now pushed a pls proof-of-concept. github.com/masak/proto/tree/pls | 13:18 | ||
moritz_ | and morning, right :-) | ||
masak | I'd be very happy to hear if people get the same results using it as I do. | ||
pmichaud | moritz_: there was a room reserved for parrot bof, and we had a couple of meetings there | 13:19 | |
mainly it was a meeting to brainstorm suggestions for parrot based on rakudo's experiences | 13:20 | ||
masak | to help me test it (1) check out/update the 'pls' branch from the 'proto' repo. (2) optionally run 'make' on it (3) run './proof-of-concept' and see JSON::Tiny fetch, build and test. the tests fail. (4) run './proof-of-concept --force'; the tests should run again, and then JSON::Tiny should install into ~/.perl6/lib. | ||
moritz_ | so you fetch it even though it's bundled? | 13:21 | |
masak | "it"? | ||
I don't understand the question. | |||
moritz_ | JSON::Tiny | ||
masak | ah, yes. sure. | ||
because pls makes no guarantees as to having the latest JSON::Tiny. | 13:22 | ||
it has the one it has. | |||
13:22
stepnem left
|
|||
moritz_ | I'll try as soon as my rakudo buid finishes | 13:22 | |
masak | cool. thanks. | 13:23 | |
kolibrie | TimToady: I found out that I do not have to leave for the airport until 11:00. Do you have time if I stop by for fifteen minutes some time before then to discuss the flow diagram from my talk? | ||
masak | the output is very verbose and confused right now. but that's because it's a proof-of-concept, not a finished product :) | ||
moritz_ | env PERL6LIB='/Users/masak/gwork/proto/lib' perl6 --target=pir --output=lib/JSON/Tiny.pir lib/JSON/Tiny.pm | 13:25 | |
===SORRY!=== | |||
Unable to find module 'JSON::Tiny::Actions' in the @*INC directories. | |||
masak shouldn't have committed Makefile | |||
moritz_ | does the Makefile properly declare dependencies? | ||
masak | remove it, ufo, and make again :) | ||
mathw | o/ | 13:26 | |
moritz_ | masak: ./proof-of-concept has a hardcoded perl6 path | ||
masak | no, Makefiles don't need to consider deps, because deps are already installed when the project tries to build. | ||
dalek | kudo: 18682c8 | pmichaud++ | build/PARROT_REVISION: Bump PARROT_REVISION. |
||
masak | moritz_: oh! | ||
masak checks | |||
moritz_ | masak: I mean dependencies inside the makefile, so that parallel make works | ||
masak | moritz_: the sheband one? | ||
moritz_: I couldn't get 'env' to work here. | 13:27 | ||
moritz_: I wouldn't know how to "declare dependencies" within a Makefile. | |||
moritz_ | what did you try? #!/usr/bin/envperl6 ? | ||
masak: foo: bar | |||
masak: only builds foo if bar is already built | |||
mathw | masak: When you can spare a moment, it's time for Form.pm to be abducted | ||
masak | mathw: sure. I can spare a moment. are there any questions? | 13:28 | |
moritz_: hm. | |||
moritz_: that would complicate the ufo script a bit, but otherwise it'd work. | 13:29 | ||
moritz_ | masak: proof-of-concept reports that json is already installed ... which it is not | ||
masak | moritz_: sounds like a bug. | ||
moritz_ | though I have an old project.state lying around | ||
masak | moritz_: did it create a poc-projects.state file for you? | ||
that shouldn't matter. | |||
moritz_ | yes | ||
$ cat poc-projects.state | |||
{ "json" : { "state" : "installed" } } | |||
masak | huh. | ||
moritz_: did the proof-of-concept script at least appear to install JSON::Tiny? | 13:30 | ||
mathw | masak: actually no, it seems to have worked perfectly | ||
moritz_ | masak: nope | ||
masak | mathw: \o/ | ||
moritz_: /o\ | |||
moritz_: what went wrong? | |||
mathw | \o/ | ||
mathw goes back to Haskell | 13:31 | ||
moritz_ | masak: nopaste.snit.ch/21536 | ||
masak | moritz_: rm poc-projects.state | ||
try again. | |||
moritz_ rms, and tries again | |||
masak | that's another file I shouldn't have pushed... | 13:32 | |
moritz_ | masak: nopaste.snit.ch/21537 | ||
13:32
Woody2143 left
|
|||
masak | I got that too at one point. | 13:33 | |
didn't investigate, but it seemed a "cd" in qx[] persisted to the next &run or something... | |||
moritz_: does cache/json/Makefile look OK? | |||
13:34
Intensity joined
|
|||
moritz_ | masak: yes, looks like a typical ufo generated Makefile | 13:34 | |
masak | moritz_: and cd-ing into cache/json and doing 'make' works, too? | ||
moritz_ | yes | 13:35 | |
masak | if you enter a debug line `say "cd $cwd && make" above line 234 in proof-of-concept, what does it say? | 13:36 | |
er, s:2nd/"/";`/ | |||
moritz_ | should I first remove poc-projects.state again? | ||
masak | not necessary. | ||
it should be at 'fetched' now, which only saves some time. | 13:37 | ||
moritz_ | cd /home/moritz/src/proto/cache/json && make | 13:38 | |
now it gets to the failing test | |||
masak | huh. | ||
so it didn't work the time it created the Makefile, but it worked the time after? | |||
ay ay ay. | |||
then there is indeed some cwd interference which I haven't patched. | 13:39 | ||
moritz_ | got to the test failure, reported status "built" | ||
13:39
plobsing joined
|
|||
masak | that's correct. | 13:39 | |
now try ./proof-of-concept --force | |||
moritz_ | and installed it with --force | ||
masak | \o/ | ||
thanks. | |||
moritz_ | how do I uninstall now? | ||
:-) | |||
\o/ indeed | |||
masak | not sure uninstall is even theoretically possible. | 13:40 | |
because of dependencies. | |||
13:40
skids left
|
|||
masak | and because what constitutes 'install' is up to the Makefile of the project. | 13:40 | |
moritz_ | right | ||
masak | I'll be happy if I get 'update' working :) | ||
the semantics of 'update' are only strange, not impossible. | |||
moritz_ | that's why linux distribution package managers install into local dirs first, built archives from that and install them under the control of the package manager | 13:41 | |
masak | they're "pretend for a moment that the project is absent, try to install it, and then reset the state to "installed" regardless of what happened'. | ||
moritz_ | e.g. dpkg-buildpackage installs into debian/$somewhere/ first, and creates a .deb from the contents of debian/$somewhere | 13:42 | |
masak | moritz_: I guess one could simply 'rm' all modules from ~/.perl6/lib that occur in the project's lib dir, and then remove the project from the cache, too. | 13:43 | |
TimToady | kolibrie: I'm just sitting here in the hostility room. | ||
masak | that could work. | ||
kolibrie | TimToady: okay, I'll be over in a bit | ||
TimToady | it's back on the 2nd floor | 13:44 | |
moritz_ | hostility? | ||
nice name for a room | |||
like, 101 in 1984 | |||
masak | "Hostility is Friendliness" | ||
moritz_ | :-) | 13:45 | |
TimToady | *hospitality | ||
Su-Shee | "hostility is fiendliness". easily corrected. ;) | 13:47 | |
moritz_ finds in funny that in English "host" can both mean somebody who lets you stay in your hous, and "army" (which sometimes drives you out of your hous) | |||
13:48
[Coke] joined
|
|||
sbp | "cleave" is another autoantonym | 13:57 | |
I think there are some others too. oh, "sanction" | |||
masak | it's a wonder we manage to communicate at all. | ||
sbp | most of the time we don't | ||
masak | :) | 13:58 | |
PerlJam | shared human experience does wonders for communication | ||
13:58
Guest23195 joined
|
|||
PerlJam | (we're really going to have problems when the aliens show up though) | 13:58 | |
moritz_ finds that he uses .pairs much more often that .kv to loop over hashes (and arrays, for that matter) | 13:59 | ||
s/that/than/ | |||
masak | make: *** No targets. Stop. | 14:00 | |
g'ah! I wish I knew why it says that. | |||
and then the next time, it works. | |||
OH! | |||
moritz_ | try to add a call to pwd before make | ||
masak tries closing the file handle | |||
14:01
colomon joined
|
|||
masak | moritz_: I had tried that already. it showed the proto dir. | 14:01 | |
now it works! | |||
moritz_ | \o\ | ||
masak | /o/ | 14:02 | |
pmichaud | .oO(those look an awful lot like TIE fighters to me...) |
||
14:02
[Coke] left
|
|||
TimToady | >ö< <-- X-wing | 14:02 | |
moritz_ | pmichaud: don't know if you had your "Cool Perl 6" talk yet... comb instead of split would be more idiomatic | ||
wouldn't that be |o| for the TIE fighters? :-) | 14:03 | ||
pmichaud | moritz_: I couldn't figure out how to do it with comb at the time (and was in a rush) | ||
PerlJam | (o) for Vader's | ||
14:03
rv2733 joined
|
|||
moritz_ | pmichaud: ok | 14:03 | |
pmichaud | sure, |o| is the TIE fighter when it's coming straight at you. \o\ looks like a tie-fighter as it's making a swooping pass at you. | ||
masak | :) | 14:04 | |
moritz_ | relatvisticly distorted TIE figher :-) | ||
colomon | |o| | ||
pmichaud | .oO( touchdown? ) |
14:05 | |
PerlJam | Next thing you know we're got ascii animation of the entire star wars end-of-movie fight scene | ||
s/we're/we've/ | |||
TimToady | )O( # TIE fighter in a convex mirror | 14:06 | |
PerlJam | www.asciimation.co.nz/ | ||
masak | :) | ||
14:07
rlb3 joined
|
|||
moritz_ | )O( |O| (O) |O| resonance! | 14:07 | |
14:07
rlb3 left
14:08
rlb3_ joined
14:11
rlb3 joined
14:12
ajs joined
|
|||
masak | now that the proof of concept works, it would be fun to see if Emmentaler can finally be built. | 14:14 | |
14:15
rlb3_ left
|
|||
dalek | kudo: bf5bbd4 | pmichaud++ | src/core/ (2 files): Turn Array.exists into List.exists, write it a bit cleaner. |
14:15 | |
kudo: 7e3ddca | pmichaud++ | src/core/EnumMap.pm: Redo EnumMap.exists . |
|||
colomon | rakudo: my @a = 'a'...'f'; say (@a[2..*]).munch(20) | 14:17 | |
p6eval | rakudo 11cbd4: ( no output ) | ||
moritz_ | that looks rakudobuggy | 14:18 | |
colomon | it is, I was trying to do it as an example for pmichaud++ | ||
(I talked in person for the other bits of the conversation... freaky!) | |||
moritz_ | woah there. Don't get used to it! | 14:19 | |
14:19
felliott joined
|
|||
colomon | moritz_: don't worry, I've got a few hours more. :) | 14:20 | |
moritz_ | :-) | ||
cono | munch == batch ? | ||
colomon | cono: yes | ||
moritz_ | munch = destructive batch | 14:21 | |
colomon | batch is going to be history. | ||
I think? | |||
moritz_ | yes | ||
cono | it's destruct aray? | 14:22 | |
moritz_ | yes, just like ship | ||
erm | |||
shift | |||
cono | @a[2..3].munch(2) - like splice in perl5 ? | ||
moritz_ | don't know if it works on array slices | 14:23 | |
splice exists too | |||
.munch(5) is calling .shift 5 times | |||
cono | ah, I got it, thanks :) | ||
batch - just copy? | 14:24 | ||
moritz_ | yes | 14:25 | |
.batch($x) was the same as .[^$x] | |||
pugssvn | r31422 | colomon++ | Intial version of new trig test support code. | ||
cono | "batch is going to be history" it means that it will be removed in next versions? | 14:26 | |
colomon | that was my understanding. but I could be wrong. | ||
moritz_ | and remoed from the spec | ||
cono | :( | ||
colomon | cono: as far as I know, .batch(N) is exactly the same as .[^N] | 14:28 | |
cono | ah, that's why | 14:29 | |
understand | |||
colomon | batch was defined on iterators, and we try not to expose iterators to the user now. | 14:30 | |
14:31
spinclad joined
|
|||
masak | both my talks were accepted for YAPC::EU. I didn't expect that :) conferences.yapceurope.org/ye2010/talk/2896 conferences.yapceurope.org/ye2010/talk/2898 | 14:31 | |
colomon | rakudo: my @a = 'a' ... 'z'; say @a[*/2] | ||
p6eval | rakudo 11cbd4: OUTPUT«n» | ||
masak | maybe I'll even have to finish one of them before the conference this time. | 14:32 | |
arnsholt | Congrats. Wish I could attend them | 14:33 | |
moritz_ should try to sneak in a lightning talk at least | |||
14:33
thebird left
|
|||
arnsholt | Especially the parsing one sounds cool | 14:33 | |
14:33
thebird joined
|
|||
masak | arnsholt: :) | 14:33 | |
pmichaud | masak: looks like you got more talks accepted than I did. :) | ||
masak | arnsholt: still need to implement some of the things for that talk. | ||
arnsholt | =D | ||
Now you have incentive ;) | 14:34 | ||
masak | pmichaud: huh. :) | ||
arnsholt: exactly! | |||
pmichaud | gee, it lookslike one of my talk submissions got lost | ||
hmmmmm | |||
oh well, I'm happy enough with just one. :) | 14:35 | ||
14:35
thebird left
14:39
thebird joined,
lest_away is now known as lestrrat
|
|||
pmichaud confirms his talk. | 14:39 | ||
14:39
plobsing left
14:41
lestrrat is now known as lest_away
14:43
lest_away is now known as lestrrat,
ash_ joined
14:44
estrabd_afk is now known as estrabd
|
|||
masak | std: my (@xxx, @yyy, @zzz); for @xxx; @yyy; @zzz -> $x; $y; $z { ... } | 14:44 | |
p6eval | std 31422: OUTPUT«===SORRY!===Missing block at /tmp/0Ied7MayNn line 1:------> my (@xxx, @yyy, @zzz); for @xxx⏏; @yyy; @zzz -> $x; $y; $z { ... } expecting any of: desigilname twigilParse failedFAILED 00:01 114m» | ||
masak thought so | 14:45 | ||
14:45
alester joined,
rlb3 left
14:46
lestrrat is now known as lest_away
14:50
[particle] left
|
|||
TimToady | masak: that is very ancient p6 | 14:52 | |
14:52
cygx joined
|
|||
masak | TimToady: it's from A04. :) | 14:52 | |
just checking that STD is saner than that nowadays. | 14:53 | ||
moritz_ | where A stands for Ancient :-) | ||
pmichaud worries about the notion of "ancient p6". | |||
masak | and S stands for "Sane" :P | ||
moritz_ | pmichaud: why? | ||
pmichaud | it's been around long enough that we can have things that are "ancient? | ||
" | |||
14:54
[particle] joined
|
|||
moritz_ | pmichaud: "ancient" is always relative. Talking about human history has a different notion of "ancient" than talking about creation of the universe | 14:54 | |
masak | pmichaud: I don't think there's something negative in the fact that Perl 6 has evolved during the past 10 years. | 14:55 | |
colomon | btw, try one at integrating the new str2num code into Rakudo: | ||
pmichaud | I forgot my smiley again. | ||
colomon | > say 3.14159_26535_89793_23846_26433_83279_50288 3.925520848 | ||
ooo, that paste doesn't work right here. | |||
> say 3.14159_26535_89793_23846_26433_83279_50288 | |||
3.925520848 | |||
rakudo: say 3.14159_26535_89793_23846_26433_83279_50288 | |||
p6eval | rakudo 7e3ddc: OUTPUT«===SORRY!===PAST::Compiler can't compile node of type BigInt» | ||
moritz_ | rakudo: say (3.92 - 3.14) / 3.14 | 14:56 | |
p6eval | rakudo 7e3ddc: OUTPUT«0.248407643312102» | ||
moritz_ | well, 25% error... | ||
masak | moritz_: if you arrive to Pisa on the 1st, make sure to see "Gioco del Ponte"! wikitravel.org/en/Pisa#Do | ||
14:57
Woody2143 joined
|
|||
colomon | take 2: | 14:57 | |
> say 3.14159_26535_89793_23846_26433_83279_5028 3.14159265358979 | |||
pmichaud | rather than get a bigger slice, colomon++ is trying to make a bigger pie. :-) | ||
colomon | 3.14159265358979 | ||
masak | moritz_: oh wait. "last sunday of June". nvm. | ||
would have been fun to see, though. :) | |||
moritz_ | masak: pity. But thanks for the link anyway | ||
cygx | hi | 14:58 | |
moritz_ | hi cygx | ||
masak | moritz_: it's the first link I find that says that there's more than the tower to see :P | ||
cygx | moritz_: any thoughts on github.com/moritz/try.rakudo.org/ra...ter/DESIGN | ||
masak | cygx! \o/ | ||
moritz_ | cygx: I've only glanced over it; looks sane so far | 14:59 | |
cygx: I'll have to defer detailed reading for a few hours due to external constraints | 15:00 | ||
cygx | moritz_: ;) | ||
moritz_: that's ok, as I had to defer implementing anything of that due to my lacking knowledge of perl5 | 15:02 | ||
15:02
[particle] left,
charsbar joined
|
|||
jnthn | pmichaud: Only one of mine got accepted to, fwiw. | 15:02 | |
*TOO | |||
cygx | moritz_: I'll push what I did so far to the repository; would be nice if someone could look at it and tell me if I did something completely retarded | 15:03 | |
moritz_ | cygx: if you have any Perl 5 questions, don't hesitate to ask in private message, or in #perlde on irc.perl.org if you speak German | ||
cygx: sure, will look at it (but also deferred to later tonight) | |||
15:04
lest_away is now known as lestrrat
|
|||
cygx | moritz_: will do; nothing urgent comes to mind, though - I'm good so far | 15:05 | |
15:05
[particle] joined
15:06
meppl joined
15:07
lestrrat is now known as lest_away,
rtward joined
|
|||
ash_ | you could cheat save yourself the db if you just keep the connection to the browser open | 15:07 | |
ash_ see comet, server push, long polling, hidden iframe | 15:08 | ||
cygx | ash_: there are a lot of things that can go wrong with that approach: timeouts, proxies,... | ||
moritz_ | accidentally closed browser windows | ||
etc. | |||
I'm find with a db | |||
it makes for a more traditional and easier to understand design | 15:09 | ||
ash_ | i'd image a closed browser would result in a new session anyway, unless your doing the sessions on remote ip's | ||
cygx | ash_: actually, long polls are used in case of blocking on rakudo output | ||
ash_ | (which can be bad for people behind a router) | ||
moritz_ | cygx: any preference for a db? | ||
(so that I can know what to set up) | 15:10 | ||
mysql, postgres, sqlite should all be fine | |||
and easy to install | |||
cygx | moritz_: not really - Postgres would most likely be the most robust solution | ||
moritz_ | ok | ||
15:12
skids joined
|
|||
colomon | started spectest, now have a bit of time to work on $work. :) | 15:13 | |
ash_ | if you need any help cygx i have a bit of experience with the web, i'd be more than happy to help out if you want help | 15:14 | |
colomon | [particle]: o/ | 15:15 | |
[particle] | hola, colomon | ||
pmichaud | \o/ particle++ | ||
moritz_ | so much for $work, he? :-) | ||
colomon | ;) | 15:16 | |
[particle] | howdy, pmichaud | ||
glad we had that chat yesterday | |||
pmichaud | same here :) | ||
[particle] | i'm downloading kubuntu 10.04 now, i'm gonna try developing there | ||
colomon | moritz_: it's so weird actually knowing people on the channel IRL. :) | 15:17 | |
guess I'm going to have to try to make it to Europe one of these days. | |||
pmichaud | colomon: who are you calling weird?!? ;-) | ||
moritz_ | colomon: right, i fealt the same after the Copenhagen Perl 6 hackathon with jnthn, masak, arnsholt, baest and others | 15:18 | |
masak | it's good for morale to meet at least once a year :) | ||
moritz_ | indeed | ||
masak | makes it so much real. | ||
cygx | ash_: I did some web-development as well, but not for several years and not in perl, so your help is appreciated | 15:19 | |
moritz_ | also for the climate | ||
pmichaud | looks like we'll have a Pisa hackathon on Aug 3. | ||
masak | and for the in-jokes :) | ||
moritz_ | it feels so much easier to yell at somebody you've never seen | ||
pmichaud: that's great | |||
colomon | moritz_: :) | ||
cygx | ash_: I'd like to give developing the frontend a shot, but I'll need some time to familiarize myself with perl; I'll remember to start bugging you when think start going wrong ,) | ||
masak | moritz_: or, flip-wise, it's harder to be empathic with someone you haven't. | ||
moritz_ | masak: right | 15:20 | |
masak | s/\./seen./ | ||
cygx | *think --> things ups ;) | ||
[particle] has to make a yapc::eu some day | |||
moritz_ | [particle]: where some day == Aug 2nd 2010 :-) | 15:21 | |
[particle] | ah, if only.... | ||
pmichaud | we should probably plan for a Rakudo Star BOF on Aug 4, too. | 15:22 | |
ash_ | cygx: alright, if your going to do the front end with javascript, for an interactive terminal, i'd suggest jquery, it will make your life a lot easier | ||
moritz_ | pmichaud: +1 | ||
www.perlmonks.org/?node_id=846326 I wonder how much of that is YAPC::NA inspired :-) | 15:23 | ||
colomon | I was just explaining to pmichaud and TimToady that I'm taking one more vacation on my own next month, and then I figure I don't get to go anywhere without my family for at least 11 months. | ||
masak likes that pmichaud++'s talk "Rakudo Star -- A usable Perl 6 release" is filed under the "Core Perl" track | 15:24 | ||
15:25
patch joined
|
|||
cxreg was poking around trying to make FakeDBD::Pg. even if someone else does it first it's fun | 15:26 | ||
15:26
kensanata joined
|
|||
moritz_ | cxreg: which route are you going? direct NCI, or use parrot's existing bindings? | 15:27 | |
cxreg: if you have a github account (or create one), I'm sure we can arrange commit access to FakeDBI for you | 15:28 | ||
hugme: list projects | 15:29 | ||
hugme | moritz_: I know about Math-Model, Math-RungeKutta, book, fakedbi, gge, hugme, ilbot, json, november, nqp-rx, nqpbook, perl6-examples, perl6-wtop, process-cmd-args, proto, pugs, rmp, star, svg-matchdumper, svg-plot, tardis, temporal-flux-perl6syn, try.rakudo.org, tufte, web, yapsi | ||
moritz_ | yes, fakedbi is in there | ||
15:29
moritz_ sets mode: +v hugme
15:32
Trashlord left
|
|||
cygx | ash_: I'll do the server-side part of the frontend first; until that's done, the client-side code currently in the repository should be sufficient | 15:33 | |
ash_: once the client-server communication has be worked out, switching to a Jquery solution might be a good idea to add some 'polish' | 15:34 | ||
cxreg | moritz_: NCI for now, i havent looked at parrot's bindings | ||
moritz_ | cxreg: if you're interested, here are the tests for them: svn.parrot.org/parrot/trunk/t/library/pg.t | 15:35 | |
ash_ | cygx: have you thought about doing it in perl6? (just curious) | 15:38 | |
15:38
kensanata left
|
|||
cygx | ash_: I have, but I think the first iteration should stay in perl5 | 15:42 | |
mberends | that epic tennis match has resumed at Wimbledon | 15:43 | |
moritz_ | mberends: continuation based tennis match :-) | ||
I guess it'll be over rather quickly | |||
mberends | lol | ||
11 hours, 68-68 in the final set | 15:44 | ||
masak | wow. | ||
ash_ | an 11 hour tennis match? o.0 thats crazy... | ||
cygx | ash_: the codebase shouldn't become too large and is fairly modular, so migrattion to p6 is definitely an option | 15:45 | |
moritz_ | my experience from table tennis is that if long-time tied games are interrupted for longer, they are usually decided pretty quickly after the interruption | ||
jnthn is watching Slovakia trying to hold on to a lead over Italy | |||
That'd be a lovely upset. :-) | |||
moritz_ | indeed | 15:46 | |
beating the world champion | |||
ash_ | cygx: i was thinking it might nice to see if rakudo was up to the task more to find out where its not up to the task so we can fix it :P | ||
real world examples of rakudo are always good test cases | |||
colomon | the problem with work is std::cout << "got here" << endl; instead of say "got here"; | ||
examples++ | |||
$work, I mean. | |||
moritz_ | ash_: It's pretty obvious to me that rakudo has many weaknesses in the areas of IO and IPC | 15:47 | |
ash_: I don't know if a real-life example is really needed to prove that | |||
jnthn: your time to say \o/ :-) | |||
*turn | 15:48 | ||
ash_ | yeah, but you could do most of the interactive console without IPC (i think) and the IO issues don't seem like a show stopper, it would have to have a slightly different design that doesn't involve threads, but i think it could work | 15:49 | |
moritz_ | I don't think the current design involves threads... or does it? if so, where? | ||
ash_ | blocking io causes a second thread in the strategy cygx described | 15:50 | |
cygx | moritz_: the controller has to listen to both the frontent and rakudo | 15:51 | |
*frontend | |||
moritz_ | cygx: I'd prefer async IO over threads there, but in the end it's the implementor's choice | ||
TimToady | std: #`〝 comment 〞 | 15:52 | |
p6eval | std 31422: OUTPUT«Use of uninitialized value in vec at CursorBase.pm line 548.ok 00:01 108m» | ||
TimToady | sorear: ^^ | ||
cygx | moritz_: async io is fine with me; the current design still has some 'issues' anyway | ||
colomon | TDD works much better if your tests are correct... | ||
wait! I need tests for the tests! | |||
moritz_ | colomon: :-) | ||
TimToady | sorear: I'll let you fix that one, since it's in the guts of the DFA | ||
moritz_ calls it a day | 15:53 | ||
colomon | oh wait, the test was correct, it's the code that's wrong. | 15:54 | |
pugssvn | r31423 | lwall++ | [tryfile] find uniprops in . | 15:55 | |
ash_ | who tests the tests? | ||
:P | |||
moritz_ | and who tests the tests that test the tests? | ||
colomon | who tests the testman? | ||
moritz_ proposes a meta-circular testing scheme where the tests test themselves | 15:56 | ||
colomon | "1 of 1 tests succeeded" | ||
\o | |||
\o/ | |||
see moritz_ -- $work! | |||
pugssvn | r31424 | lwall++ | [STDeco] remember $?LONGNAME of module; use that to form name of .syml file | ||
r31424 | (this fixes the bug where it puts Test::Util's .syml in the wrong dir) | |||
16:01
justatheory joined
|
|||
TimToady | rakudo: say '␍'.ord | 16:02 | |
16:02
Wolfman2000 left
|
|||
p6eval | rakudo 7e3ddc: OUTPUT«9229» | 16:02 | |
TimToady | darn | ||
rakudo: say ''.ord | |||
p6eval | rakudo 7e3ddc: OUTPUT«10» | ||
ash_ | is that right? | ||
colomon | ash_: yes | 16:03 | |
ash_ | i thought  was a unicode newline | ||
TimToady | I was hoping p6eval would also translate ␍ | ||
colomon | oh, I dunno. | ||
ash_ |  | ||
oh is its p6eval thats translating it? | 16:04 | ||
16:04
cdarroch joined,
cdarroch left,
cdarroch joined
|
|||
masak | yes. | 16:04 | |
TimToady | rakudo: say ' | 16:05 | |
p6eval | rakudo 7e3ddc: OUTPUT«===SORRY!===Confused at line 11, near "say '\x{16}"» | ||
TimToady | |||
jnthn | moritz_: Yes, \o/ indeed! Not so sure that Sunday will give me anything to \o/ about though. ;-) | ||
pugssvn | r31425 | colomon++ | [t/spec] Fudge hyper.t to work in Rakudo again. | 16:06 | |
pmichaud | jnthn: ping | 16:07 | |
16:07
ashleydev joined
|
|||
jnthn | pmichaud: pong | 16:07 | |
pmichaud | are you aware of anything that is currently using WHENCE in master? | ||
jnthn | pmichaud: Some of the BUILD code may be (more) | 16:08 | |
pmichaud: However, we don't have a way to make WHENCEs yet | |||
pmichaud: So we're not relying it even if it's there | |||
pmichaud | so I suspect it's not presently using it. | ||
okay, that's what I wanted to know. | |||
jnthn | *on it | ||
Yeah, afaik you can just rip out whatever's there and do it how you like | |||
pugssvn | r31426 | colomon++ | [t/spec] Fudge zip.t to work in Rakudo again. | ||
jnthn | Without any adverse effects | ||
pmichaud | I may (temporarily) remove the BUILD code (that's the piece I was looking at) | 16:09 | |
jnthn | pmichaud: Well, if you leave in the non-WHENCE bits, then yes | ||
Should be fine. | |||
pmichaud | right, that's what I meant. | ||
jnthn | OK :-) | ||
16:11
Ross joined
|
|||
colomon | rakudo: say ~(42, 24, * % * ... 0) | 16:12 | |
p6eval | rakudo 7e3ddc: OUTPUT«42 24 18 6 0» | ||
cognominal go for a movie not taxing my brain before switching to full masak mode. | 16:13 | ||
*goes | |||
masak | cognominal: enjoy! | ||
colomon | rakudo: say ~(42, 24, * % * ... 0)[*-2] | 16:14 | |
p6eval | rakudo 7e3ddc: OUTPUT«6» | ||
cognominal | A-Team abeilt dubbed. French suburbia... :( As it mattered for that kind of movie. | ||
colomon | rakudo: say ~(42, 23, * % * ... 0)[*-2] | 16:15 | |
p6eval | rakudo 7e3ddc: OUTPUT«1» | ||
colomon | rakudo: say ~(42, 23, * % * ... 0) | ||
p6eval | rakudo 7e3ddc: OUTPUT«42 23 19 4 3 1 0» | ||
colomon | rakudo: say ~(42, 1, * % * ... 0) | ||
p6eval | rakudo 7e3ddc: OUTPUT«42 1 0» | ||
colomon | I like. | ||
16:16
kst joined,
jaldhar left,
cjk101011 left
|
|||
colomon | www.perlmonks.org/?node_id=772778 | 16:16 | |
cognominal | Anyway I think I have found my problem | 16:17 | |
> my $tree = $_=["01"]; my @path=[0,1]; for @path.kv -> $i, $offset { when Array { die "offset $offset at position $i in path {@path.perl} for tree {$tree.perl} too large" if $offset >= +@($_); $_ = $_[$offset] ; }} | 16:18 | ||
pugssvn | r31427 | colomon++ | [t/spec] Refudge for Rakudo, and add a couple of tests which are variants on failing tests. | ||
cognominal | offset 0 1 at position 0 in path [[0, 1]] for tree ["01"] too large | ||
TimToady | sorear: also, the lexer doesn't seem to count ^M as whitespace | ||
cognominal | it seems that rakudo does not like $_ changed in a when. Needs to golf it further. | ||
colomon | rakudo: say ~(24, 42, * % * ... 0) | 16:19 | |
p6eval | rakudo 7e3ddc: OUTPUT«24 42 24 18 6 0» | ||
cognominal | don't know it is a bug or a misuse. | ||
afk& | |||
colomon | rakudo: say ~(1, 42, * % * ... 0) | ||
p6eval | rakudo 7e3ddc: OUTPUT«1 42 1 0» | ||
colomon | moritz_++ | 16:20 | |
masak | swimming & | 16:23 | |
16:23
masak left
|
|||
colomon | rakudo: (1, 1/2, 1/4, ... 0).[^5].map({.perl}).join(', ').say | 16:26 | |
16:26
Ross left
|
|||
p6eval | rakudo 7e3ddc: ( no output ) | 16:26 | |
16:27
Ross joined
|
|||
colomon | rakudo: (1, 1/2, 1/4, ... 0).[^5].say | 16:28 | |
p6eval | rakudo 7e3ddc: ( no output ) | ||
colomon | rakudo: (1, 1/2, 1/4 ... 0).[^5].say | ||
p6eval | rakudo 7e3ddc: OUTPUT«10.50.250.1250.0625» | ||
pmichaud | jnthn: ping | 16:29 | |
colomon | std: (1, 1/2, 1/4, ... 0) | 16:30 | |
p6eval | std 31422: OUTPUT«ok 00:01 110m» | ||
colomon | rakudo: (1, { 1 / ((1 / $_) + 1) } ... 0).[^5] | 16:33 | |
p6eval | rakudo 7e3ddc: ( no output ) | ||
16:33
aCiD2 left
|
|||
moritz_ doesn't know how he deserved colomon's last ++ | 16:33 | ||
colomon | perlmonks link above. | 16:34 | |
appears you came up with (42, 24, * % * ... 0)[-2] for finding the GCD | 16:35 | ||
TimToady just impressed Damian with it. :) | |||
[*-2], I mean. | 16:36 | ||
PerlJam | colomon++ that's cool | ||
moritz_ | colomon: ah, very old stuff | 16:37 | |
colomon | but still very worth a ++ for you. :) | ||
16:38
gbacon joined
|
|||
ash_ | std: my @a = 1; say @a[-1]; | 16:40 | |
p6eval | std 31427: OUTPUT«===SORRY!===Unsupported use of [-1] subscript to access final element; in Perl 6 please use [*-1] at /tmp/cwFRpYMiJz line 1:------> my @a = 1; say @a[-1]⏏;Parse failedFAILED 00:01 114m» | ||
jnthn | pmichaud: pong | 16:42 | |
16:42
mberends left
|
|||
pmichaud | jnthn: I have some questions about 'is copy' | 16:43 | |
16:43
Ross left
|
|||
pmichaud | jnthn: when doing something like sub abc(@foo is copy) { ... } | 16:43 | |
currently we create an ObjectRef to point to the cloned array. Any particular need/reason for the ObjectRef, as opposed to binding the array directly? | 16:44 | ||
jnthn | pmichaud: It may well date back to a pervious model of doing things. | 16:46 | |
er, previous | |||
pmichaud: oh | 16:47 | ||
Maybe constraints | |||
But...no probably not. | |||
pmichaud: I'd say make it look how things in the lexpad normally look for arrays. | |||
So if that involves getting rid of the ObjectRef that's probably fine. | 16:48 | ||
TimToady | rakudo: say ~(1,3,5...3) | ||
p6eval | rakudo 7e3ddc: ( no output ) | ||
TimToady | S03:1937 | 16:50 | |
16:51
Chillance joined
|
|||
pmichaud | jnthn: okay, and it's okay if I make the scalar "is copy" look like a scalar would? ;-) | 16:53 | |
jnthn | erm | ||
Probably | |||
The test suite will call you on it if not. ;-) | |||
Or masak. ;-) | 16:54 | ||
pugssvn | r31428 | lwall++ | [STD] worry about extra comma before series operator | ||
moritz_ | TimToady++ # that's something I often got wrong | ||
jnthn | pmichaud: I think there's some ticket about is copy and hashes also. | 16:55 | |
pmichaud | jnthn: okay. | ||
jnthn | Or something along those lines | ||
pmichaud | I'm likely to refactor that a bit (nothing huge) | ||
jnthn | I suspect the whole is copy thing is out of date with regard to current state. | ||
pmichaud | right | 16:56 | |
jnthn | I haven't updated it at all | ||
So unless you did, it'll be out of date. | |||
pmichaud | and since I'm cleaning up variables, whence, etc. | ||
it seems like a good time to address | |||
jnthn | Aye, go for it. | ||
Should be easy enough. | |||
colomon | rakudo: say ~(1, 1, -> *@a { [+] @a } ... 20000) | 16:57 | |
p6eval | rakudo 7e3ddc: OUTPUT«1 1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384» | ||
16:58
tomdbs98 joined
|
|||
colomon | TimToady: see? ;) | 16:58 | |
16:59
tomdbs98 left
17:00
macdaddy joined
|
|||
moritz_ | now that's evil stuff! | 17:00 | |
17:00
macdaddy is now known as Guest73864
17:01
envi^home left
17:03
Ross joined
|
|||
colomon | rakudo: say ~(1, -1/2, 1/4 ... 0).[^5] | 17:05 | |
p6eval | rakudo 7e3ddc: OUTPUT«1 -0.5 0.25 Any() Any()» | ||
TimToady | rakudo: say ~(2,3,5 ->*@a { my $n = @a[*-1]; repeat while $n !% any(@a) { ++$n } } ... 100) | 17:06 | |
p6eval | rakudo 7e3ddc: OUTPUT«===SORRY!===Confused at line 11, near "say ~(2,3,"» | ||
17:06
[Coke] joined
|
|||
colomon | rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1]; repeat while $n !% any(@a) { ++$n } } ... 100) | 17:06 | |
TimToady | : say ~(2,3,5, ->*@a { my $n = @a[*-1]; repeat while $n !% any(@a) { ++$n } } ... 100) | ||
p6eval | rakudo 7e3ddc: OUTPUT«Divide by zero in 'infix:</>' at line 3580:CORE.setting in 'infix:</>' at line 3245:CORE.setting in 'infix:<%>' at line 3250:CORE.setting in 'negate' at line 1 in <anon> at line 1 in 'Any::join' at line 718:CORE.setting in 'List::Str' at line 2373:CORE.setting | ||
..in ma… | |||
TimToady | : say ~(2,3,5, ->*@a { my $n = @a[*-1]; repeat while $n !% any(@a) { ++$n }; $n } ... 100) | 17:09 | |
pugssvn | r31429 | colomon++ | [t/spec] Fix typos, refudge for Rakudo. | ||
TimToady | rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1]; repeat while $n !% any(@a) { ++$n }; $n } ... 100) | 17:10 | |
p6eval | rakudo 7e3ddc: ( no output ) | ||
TimToady | rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1]; repeat while $n !% any(@a) { ++$n }; $n } ... 50) | ||
p6eval | rakudo 7e3ddc: OUTPUT«2 3 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50» | ||
17:11
meppl left,
rv2733 left
|
|||
TimToady | rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1]; repeat while $n % any(@a) { ++$n }; $n } ... 50) | 17:11 | |
p6eval | rakudo 7e3ddc: OUTPUT«2 3 5 30» | ||
17:12
xuser joined
|
|||
PerlJam | TimToady: don't you want an $n++ before the while loop? | 17:12 | |
TimToady | rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1] + 2; $n++ while $n !% any(@a); $n } ... 50) | ||
PerlJam | or that. | ||
p6eval | rakudo 7e3ddc: OUTPUT«2 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49» | ||
TimToady | PerlJam: it's a repeat, so it's supposed to do the ++$n first | 17:13 | |
colomon | rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1] + 2; $n++ while [||] ($n <<!%<< @a); $n } ... 50) | 17:15 | |
p6eval | rakudo 7e3ddc: OUTPUT«2 3 5 7 11 13 17 19 23 29 31 37 41 43 47» | ||
17:15
thebird left
|
|||
colomon | rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1] + 2; $n++ while [||] ($n <<!%<< @a); $n } ... 100) | 17:15 | |
p6eval | rakudo 7e3ddc: OUTPUT«2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97» | ||
colomon | rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1] + 2; $n += 2 while [||] ($n <<!%<< @a); $n } ... 100) | 17:16 | |
p6eval | rakudo 7e3ddc: OUTPUT«2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97» | ||
TimToady | rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1] + 2; $n++ while $n !% all(@a); $n } ... 50) | ||
p6eval | rakudo 7e3ddc: OUTPUT«2 3 5 7 11 13 17 19 23 29 31 37 41 43 47» | 17:17 | |
moritz_ | rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1] + 2; $n+=2 while $n !% all(@a); $n } ... 50) | 17:19 | |
p6eval | rakudo 7e3ddc: OUTPUT«2 3 5 7 11 13 17 19 23 29 31 37 41 43 47» | ||
pmichaud | rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1] + 2; $n+=2 while $n !% all(@a); $n } ... 50) | ||
p6eval | rakudo 7e3ddc: OUTPUT«2 3 5 7 11 13 17 19 23 29 31 37 41 43 47» | ||
pmichaud | rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1] + 2; $n+=2 while $n !% all(2..sqrt(@a)); $n } ... 50) | ||
17:19
pyrimidine joined
|
|||
p6eval | rakudo 7e3ddc: OUTPUT«2 3 5 7 9 11 13 15 17 19 23 25 29 31 35 37 41 43 47 49» | 17:20 | |
pmichaud | rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1] + 2; $n+=2 while $n !% all(2..sqrt(@a[*-1])); $n } ... 50) | ||
p6eval | rakudo 7e3ddc: OUTPUT«2 3 5 7 9 11 13 17 19 23 25 29 31 37 41 43 47 49» | ||
moritz_ | sqrt(@) is probably a dangerous assumptioin | 17:21 | |
pmichaud | moritz_: yes | ||
moritz_ | but I don't know enough number theory to prove it :-) | ||
pmichaud | it is dangerous :) | ||
rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1] + 2; $n+=2 while $n !% all(@a.grep( * < sqrt($n)); $n } ... 50) | |||
p6eval | rakudo 7e3ddc: OUTPUT«===SORRY!===Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 11» | ||
pmichaud | rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1] + 2; $n+=2 while $n !% all(@a.grep( * < sqrt($n))); $n } ... 50) | 17:22 | |
p6eval | rakudo 7e3ddc: OUTPUT«2 3 5 7 9 11 13 17 19 23 25 29 31 37 41 43 47 49» | ||
pmichaud | rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1] + 2; $n+=2 while $n !% all(@a.grep( * <= sqrt($n))); $n } ... 50) | ||
p6eval | rakudo 7e3ddc: OUTPUT«2 3 5 7 11 13 17 19 23 29 31 37 41 43 47» | 17:23 | |
jnthn afk for a while, noms and beers | |||
moritz_ | who did the md5 implementation via parrot recently? cosimo? or cognominal? (just remember it was a ^co guy :-) | 17:25 | |
ah, cosimo++ | |||
just found it on github | 17:26 | ||
17:26
stepnem joined
17:30
xuser left
17:35
patrickas joined
17:37
perlygatekeeper joined
|
|||
sorear | good morning #perl6 | 17:39 | |
moritz_ | oh hai sorear | 17:40 | |
patrickas | good evening #perl6 | 17:41 | |
:-) | |||
moritz_ | hi patrickas | ||
pugssvn | r31430 | moritz++ | [docs/feather] remove some outdated links | 17:43 | |
patrickas | hello moritz_ what's new in perl6land ? | ||
moritz_ | patrickas: lots of people have fun at YAPC::NA | ||
patrickas | so I heard :-) and YAPC::EU is getting close too ! | 17:44 | |
moritz_ | patrickas: I've tried to play with the new PAST optimization framework - but no luck so far :/ | ||
found two bugs in a row | 17:45 | ||
patrickas | :-) | ||
speaking of optimizations | |||
rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1] + 2; $n+=2 while $n !% all(2..sqrt($n)); $n } ... 50); | |||
p6eval | rakudo 7e3ddc: OUTPUT«2 3 5 7 11 13 17 19 23 29 31 37 41 43 47» | ||
pugssvn | r31431 | moritz++ | [docs/feather] remove another broken link | 17:46 | |
patrickas | seems to be strangly faster than pmichaud's (using @a.grep( * <= sqrt($n)) ) ... I suppose grep is really not optimized for such tasks | ||
maybe for big enough numbers the grepped version may be faster again | 17:47 | ||
moritz_ | yes, might be different | ||
PerlJam | patrickas: pm's version does O(N) sub calls per iteration, whereas 2..sqrt($n) does not | 17:50 | |
patrickas | PerlJam I don't think so ... | ||
moritz_ | PerlJam: define N :-) | ||
PerlJam | N==+@a | 17:51 | |
patrickas | pmichaud's version is cleaning all items form @a that are bigger than sqrt($n) before working on them | ||
so effectively it is O(sqrt(n)) too ... it is just the grep that is adding a small constant tot he time | 17:52 | ||
PerlJam | patrickas: The only difference between the two is one has 2..sqrt($n) and the other has @a.grep(* <= sqrt($n)), right? | 17:55 | |
patrickas | right | ||
moritz_ | the real interesting question is how big sqrt($n) is in comparison to @a | 17:57 | |
and how that changes for later values in the sequence | |||
TimToady | you could use 2,(3,5...sqrt($n)) to at least avoid dividing all the even numbers | ||
PerlJam | moritz_: yeah, at some point the calls to the anonymous sub (and possibly the recomputation of sqrt($n)) in the grep version will no longer swamp the time it takes to generate 2..sqrt($n) | 17:59 | |
18:01
bphillips left
|
|||
patrickas | TimToady: I must me missing something :-( | 18:02 | |
raudo: say ~(2,3,5, ->*@a { my $n = @a[*-1] + 2; $n+=2 while $n !% all(2,(3,5...sqrt($n))); $n } ... 50); #Is that what you mean ? | |||
TimToady | yes | ||
patrickas | rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1] + 2; $n+=2 while $n !% all(2,(3,5...sqrt($n))); $n } ... 50); | ||
p6eval | rakudo 7e3ddc: ( no output ) | 18:03 | |
patrickas | it is taking so much time I have not been able to calculate it for n = 10 yet :-) | ||
rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1] + 2; $n+=2 while $n !% all(2,(3,5...sqrt($n))); $n } ... 5); | |||
p6eval | rakudo 7e3ddc: OUTPUT«2 3 5» | ||
patrickas | rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1] + 2; $n+=2 while $n !% all(2,(3,5...sqrt($n))); $n } ... 10); | ||
p6eval | rakudo 7e3ddc: ( no output ) | 18:04 | |
patrickas | rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1] + 2; $n+=2 while $n !% all(2,(3,5...sqrt($n))); $n } ... 7); | ||
p6eval | rakudo 7e3ddc: ( no output ) | ||
PerlJam | throw in a little memoization and it should get much quicker :) | ||
TimToady | only if hashing two arguments and looking them up is faster than a simple modulus | 18:05 | |
patrickas | It's shocking that the ... operator is so slow! or is it something else I am not getting ? | 18:07 | |
pmichaud | it's not ... that is slow here, it's all() and *@a and stuff like that. | 18:08 | |
moritz_ | patrickas: I guess it's because ... has to handle so many different cases | ||
patrickas | pmichaud: but the only difference bwteen TimToady's version and mine is that his uses ... to get the odd numbers while mine uses .. to get them all | 18:09 | |
moritz_: Yes of course it should be slower but I would have expected some kind of a constant factor | |||
it times out while coputing the primes less smaller than 7 ... I would say there is a bug | 18:10 | ||
PerlJam | patrickas: you don't know that it's not a constant :) | ||
patrickas | maybe the ... is never termination ? because the end of the range is a real ? | ||
PerlJam | (a really big constant) | ||
I presume that all(2,3,5...sqrt($n)) forces the complete evaluation of the sequence? | 18:12 | ||
18:12
justatheory left
|
|||
PerlJam | er, with the proper syntax | 18:12 | |
pugssvn | r31432 | sorear++ | [Cursor] Re-special-case \r in \h; Perl/Blank doesn't cover it after all | 18:13 | |
TimToady | rakudo: say ~(2,3,5...50) | ||
p6eval | rakudo 7e3ddc: OUTPUT«Unable to figure out pattern of series in main program body at line 1» | ||
TimToady | rakudo: say ~(2,(3,5...50)) | ||
p6eval | rakudo 7e3ddc: OUTPUT«2 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49» | ||
TimToady | that why the extra parens | ||
patrickas | hehhe got it | 18:14 | |
rakudo: say (2,(3,5...sqrt(5))); | |||
p6eval | rakudo 7e3ddc: | ||
..OUTPUT«235791113151719212325272931333537394143454749515355575961636567697173757779818385878991939597991011031051071091111131151171191211231251271291311331351371391411431451471491511531551571591611631651671691711731751771791811831851871891911931951971992012032052072092112132152172192212232… | |||
PerlJam | patrickas: nice | ||
patrickas | it is never terminating :-) | ||
colomon | known bug. | 18:15 | |
patrickas | colomon now you tell me :-) | ||
TimToady | we were discussing it earlier :) | ||
colomon | :) | ||
I was hacking rather than IRCing. :) | |||
patrickas | hehe colomon++ someone's gotta do the work | 18:17 | |
slavik | wait ... | ||
rakudo: say 2**64 | |||
p6eval | rakudo 7e3ddc: OUTPUT«1.84467440737096e+19» | ||
slavik | aww :( | ||
patrickas | and TimToady-- for suggesting an "optimization" using a known bug being discussed earlier and confusing me :-) | ||
pugssvn | r31433 | sorear++ | [Cursor] Unused Unicode blocks should be initialized to "", not undef | ||
colomon | slavik: I'm figuring on taking a stab at proper bigints after R* | ||
sorear | TimToady: both bugs you told me in scrollback are now fixed. | ||
slavik | colomon: I will buy you a beer | ||
colomon | sorear++ | 18:18 | |
slavik | or vodka | ||
vodka is better imo | |||
18:18
rindolf joined
|
|||
rindolf | Hi all. | 18:18 | |
colomon | I prefer scotch | ||
or cider | |||
slavik | eww | ||
PerlJam | patrickas: you can always do 3,5...sqrt($n).Int | 18:19 | |
sorear | Hello rindolf | 18:20 | |
rindolf | sorear: hi. | 18:21 | |
TimToady | or .ceiling | ||
colomon | patrickas: 2, 3, 5 ... sqrt(50) should work fine, but if the end point is less than the last LHS value, you'll have trouble. | ||
patrickas | PerlJam TimToady nope :( | ||
colomon you are right | |||
PerlJam | I guess .Int truncates | 18:22 | |
patrickas | it's the fact that it is smaller than 5 not that it's a real | ||
PerlJam | ah | ||
colomon | sure, all Reals are well-ordered. ;) | 18:24 | |
patrickas | rakudo: say max(4,6); | ||
PerlJam | yeah, but that doesn't mean it wasn't the source of a bug :) | ||
p6eval | rakudo 7e3ddc: OUTPUT«Unable to handle non-closure Ordering yet in 'Any::max' at line 1362:CORE.setting in 'max' at line 1560:CORE.setting in main program body at line 11:/tmp/j0xtf8Q_mV» | ||
colomon | patrickas: you want | 18:25 | |
rakudo: say [max] 4, 6; | |||
or | |||
p6eval | rakudo 7e3ddc: OUTPUT«6» | ||
colomon | rakudo: say 4 max 6 | ||
p6eval | rakudo 7e3ddc: OUTPUT«6» | ||
patrickas | oh it's an operator! | ||
TimToady | $x max= $y | ||
patrickas | i wouldn't have guessed from the error message! | ||
colomon | the sub version of max wants a closure | 18:26 | |
sorear | I think I'm going to add to Sprixel/VICIL something like FORTH's CODE | ||
colomon | FORTH! | ||
sorear | a routine declarator, with lower-than-Perl6-level code in it | 18:27 | |
colomon | rakudo: say ([minmax] 2, 4, 5, 2, 3).perl | ||
p6eval | rakudo 7e3ddc: OUTPUT«2..5» | ||
sorear | this will make it possible to define the Scalar, Parcel, and Capture classes - they can't be defined in Perl 6 because the binder needs them | 18:28 | |
colomon | rakudo: say ([minmax] 2, 4, 5, 2, 3).bounds.perl | ||
p6eval | rakudo 7e3ddc: OUTPUT«(2, 5)» | ||
sorear | thoughts? | 18:29 | |
patrickas | rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1] + 2; $n+=2 while $n !% all(2,(3,5...(5 max sqrt($n)))); $n } ... 50); #So this seems to be fastest | 18:30 | |
p6eval | rakudo 7e3ddc: OUTPUT«2 3 5 7 11 13 17 19 23 29 31 37 41 43 47» | ||
patrickas | BTW is there a Benchmark.pm6 yet ? | ||
18:31
justatheory joined
|
|||
PerlJam | patrickas: I started github.com/perlpilot/benchmark | 18:31 | |
patrickas: there may be others. | |||
It looks like the spec says to return Nil in the 3,5...4 case, but for the prime problem, it looks like returning 3,5 would be more useful. | 18:33 | ||
colomon | I think it's supposed to return just 3 for 3, 5 ... 4 | 18:35 | |
? | |||
I'm sure I understand how 3, 5 would be more useful. so you don't have to say 5 max sqrt? | |||
PerlJam | yes, I was just thinking that. | 18:36 | |
18:36
[particle] left
|
|||
PerlJam | rakudo: say 3,5...5 max sqrt(100); | 18:38 | |
p6eval | rakudo 7e3ddc: OUTPUT«3579» | ||
PerlJam | interesting | ||
colomon | I think making the left hand the pattern and the right hand the limit works better. so that 3, 5 ... 4 would be 3 | 18:39 | |
PerlJam | colomon: S03:1937ish says ''if a supplied limit value is on the "wrong" side of the first of those values, Nil is returned'' | ||
colomon | "first" | 18:40 | |
this is the second. | |||
PerlJam | ah, yes. | ||
I'm a little slow today | |||
colomon | no worries. | ||
and I just spent an hour discussing this stuff with pmichaud and TimToady, because the tests had changed and I was trying to figure out if they were still correct. | 18:41 | ||
PerlJam | if the LHS is a list, the series op only cares about the last 2 values in the list right? | 18:42 | |
18:43
spinclad left
18:45
gbacon left
|
|||
PerlJam | colomon: I mean ... if 3,5...4 returns 3, what should this do? 1,3,5,7,9...4 | 18:46 | |
PerlJam reads the spec | |||
oh, yes. 1,3 is what I would expect and that's what the spec says | 18:47 | ||
TimToady++ | 18:48 | ||
18:48
[particle] joined
|
|||
colomon | dunno if that works yet, mind you. | 18:48 | |
rakudo: say 1, 3, 5, 7, 9 ... 4 | 18:49 | ||
p6eval | rakudo 7e3ddc: | ||
..OUTPUT«135791113151719212325272931333537394143454749515355575961636567697173757779818385878991939597991011031051071091111131151171191211231251271291311331351371391411431451471491511531551571591611631651671691711731751771791811831851871891911931951971992012032052072092112132152172192212232… | |||
18:49
patspam joined
|
|||
PerlJam | looks like not :) | 18:49 | |
colomon | so my new decimal number code is 8x slower than the old code. | ||
guess it's still too slow to incorporate. | |||
must optimize.... | |||
slavik | colomon: run it on top of ghc :P | 18:50 | |
PerlJam | rakudo: my @a = 13; 1,3...@a | 18:51 | |
p6eval | rakudo 7e3ddc: ( no output ) | 18:52 | |
PerlJam | rakudo: my @a = 13; say 1,3...@a | ||
p6eval | rakudo 7e3ddc: OUTPUT«135791113» | ||
18:52
gbacon joined
|
|||
moritz_ | it runs up to 13? | 18:52 | |
that's... kinda weird | |||
PerlJam | rakudo: my @a = 1,3,5,7; my @b = 25..35; say ~(@a..@b); | 18:57 | |
18:57
rtward_ joined
|
|||
p6eval | rakudo 7e3ddc: ( no output ) | 18:57 | |
18:57
rtward_ left
|
|||
PerlJam | rakudo: my @a = 1,3,5,7; my @b = 25..35; say ~(@a...@b); | 18:58 | |
p6eval | rakudo 7e3ddc: OUTPUT«1 3 5 7 9 11 13 15 17 19 21 23 25 26 27 28 29 30 31 32 33 34 35» | ||
19:00
rtward left
19:04
cono left
19:06
cono joined
|
|||
diakopter | shell out to perl | 19:07 | |
19:07
Mowah left
19:09
ashleydev left
|
|||
patrickas | is 1,1...2 supposed to return Nil? | 19:11 | |
19:11
rtward joined,
araujo left
|
|||
pmichaud | patrickas: what would the increment be in that case? I'm guessing it acts like an increment of zero. | 19:12 | |
colomon | increment of zero, yes | ||
moritz_ | so infinite number of 1s? | ||
patrickas | currently it returns an infinite lis of 1 | 19:13 | |
but | |||
colomon | moritz_: that's my understanding. | ||
patrickas | I could argue that 2 is on the wrong side :-) | ||
"if a supplied limit value is on the "wrong" side of the first of those values, Nil is returned" | |||
19:14
Ross left
|
|||
patrickas | since both sides .succ and .prec are the wrong sides :-) | 19:14 | |
1,1...1 would be an infinite list though | 19:15 | ||
not a theoretical question .... I am asking to see if I should fix it or not :-) | |||
colomon | no, it would be just 1 | ||
19:16
araujo joined,
TiMBuS left,
Fozo joined
19:17
Ross joined
|
|||
moritz_ | does anybody want to do next week's challenge? | 19:18 | |
I'm running out of ideas | |||
pmichaud | question: | ||
my $b = [1,2,3]; sub abc($x is copy) { $x[0] = 4; }; abc($b); | |||
does $b change? | |||
moritz_ | I fear it does | ||
pmichaud | my $b = [1,2,3]; sub abc($x is copy) { $x[0] = 4; }; abc($b); say $b.perl; | ||
(I'm asking what the spec says should happen, not what rakudo currently implements) | 19:19 | ||
moritz_ | my answer was about what the spec says | ||
or how I think I understand the spec | |||
19:20
meppl joined
|
|||
patrickas | colomon: which part of the spec is that? 1,1...1 is 1? | 19:20 | |
19:20
justatheory left
|
|||
pmichaud | (colomon just left) | 19:22 | |
19:22
colomon left
|
|||
PerlJam | patrickas: "If any value in the series is C<eqv> to the limit value, the series terminates, including that final limit value." | 19:23 | |
patrickas: S03:1812 | 19:24 | ||
patrickas | PerlJam: Thanks | ||
19:24
lue joined
|
|||
lue | Hello! | 19:24 | |
Fozo | hmmmm | 19:33 | |
pugssvn | r31434 | moritz++ | [feather/sccript] be more specific about where to find t/ | 19:34 | |
Fozo | HeLlO | ||
moritz_ | hi | ||
19:39
tylerni6 joined,
justatheory joined
19:42
tylerni7 left
|
|||
pugssvn | r31435 | moritz++ | [util] remove now unneeded logic from version_h.pl; replace it by somthing rather simple | 19:43 | |
19:44
gbacon left
19:45
stepnem left
19:54
patrickas left
|
|||
pugssvn | r31436 | moritz++ | [util] be more consistent with argument passing | 19:58 | |
moritz_ | I'm currently trying to run the generation of syn documents under a different user name | 20:00 | |
it's... not amusing | |||
info: 990 smartlinks found and 990 broken in 820 test files (227 test files had no links). | |||
so it seems to find not a single test file. Urks. | 20:01 | ||
lue | That's odd. | 20:04 | |
20:05
Psyche^ joined
20:08
whiteknight joined
|
|||
pugssvn | r31437 | moritz++ | [Text::SmartLinks] do not die when one file cannot be parsed | 20:08 | |
r31437 | | |||
r31437 | Since the default is to recursively find all .pod and .pm files, it kinda | |||
r31437 | makes sense to only warn if one of them is invalid, instead of dying horribly | |||
r31437 | and dragging everything else down. | |||
20:09
Su-Shee left,
Patterner left,
Psyche^ is now known as Patterner
|
|||
pugssvn | r31438 | moritz++ | [Text::SmartLinks] moritz-- cannot write Perl 5 code anymore | 20:09 | |
moritz_ | of course that doesn't fix the generation at all :( | 20:10 | |
20:12
rindolf left
|
|||
TimToady | std: 1,2,3, ... 10 | 20:13 | |
p6eval | std 31436: OUTPUT«Potential difficulties: Comma found before apparent series operator; please remove comma (or put parens around the ... listop, or use 'fail' instead of ...) at /tmp/sWXCl1l3VJ line 1:------> 1,2,3,⏏ ... 10ok 00:01 113m» | ||
PerlJam | TimToady++ | 20:14 | |
20:15
nimiezko joined
|
|||
moritz_ | hum, the problem seems to be elsewhere | 20:16 | |
it includes the .t files inline in the specs | 20:17 | ||
but still reports the smartlinks as broken | |||
20:21
Guest73864 left,
ashleydev joined
20:24
rtward left
|
|||
pugssvn | r31439 | moritz++ | [feather/script] synopsis htmls are now generated by the perlcabal user | 20:25 | |
20:26
Guest89026 left
|
|||
moritz_ | if anybody notices some rendering errors, 404s or so on perlcabal.org/syn/, please ping me | 20:27 | |
20:30
patspam left
|
|||
pmichaud | afk for a while # commuting | 20:34 | |
arnsholt | moritz_: The most important one for me (S05) works at least, so I'm not complaining =) | 20:35 | |
20:37
patspam joined
|
|||
sorear | moritz_: I wonder how hard it would be to get all the perlcabal .pm6 files and fragments run through STD_hilite | 20:37 | |
I debitrotted that with that in mind... | |||
20:38
Sanitoeter left
20:40
nimiezko left
|
|||
pugssvn | r31440 | lwall++ | [STD] also collect $?LONGNAME on module Foo {} form, if first declaration | 20:44 | |
20:47
gbacon joined
|
|||
pugssvn | r31441 | lwall++ | [t/spec] fix CR on two test files, add svn props | 20:49 | |
r31442 | lwall++ | [S03] qualify misleading assertion re 1,2,3...$n when $n < 3 | 20:55 | ||
20:55
cygx left
20:56
spinclad joined
|
|||
sorear | TimToady: What are we up to on snaptests? | 20:57 | |
20:57
patspam left
|
|||
TimToady | just running one right; should know in about 15 minutes, but I'm hoping for ~96% | 20:58 | |
*right now | |||
21:01
lest_away is now known as lestrrat
21:05
Chillance left
21:07
pyrimidine left
|
|||
sorear | After my A $x; my B $y; $x := $y; what values can I legally assign to $x? $y? | 21:09 | |
21:11
Guest23195 left
|
|||
TimToady | we're at 95.76% now | 21:14 | |
21:23
gbacon left
21:25
macdaddy joined
21:26
macdaddy is now known as Guest5815
21:31
Ross left
21:36
kensanata joined
21:44
Sanitoeter joined
21:45
lichtkind joined
|
|||
lue | afk | 21:45 | |
lichtkind | greetings | 21:46 | |
is end of june still the rakudo target? | 21:53 | ||
21:55
tylerni6 is now known as tylerni7,
tylerni7 left,
tylerni7 joined
|
|||
ash_ | which raukudo target? | 21:56 | |
lichtkind | target date | 21:57 | |
for star | |||
ash_ | to be released "by july 29" | 21:59 | |
rakudo.org/node/73 | |||
lichtkind | thank you very much | 22:00 | |
22:05
cj left,
skangas left
22:06
cj joined
22:08
d4l3k_ joined
22:09
dalek left,
d4l3k_ is now known as dalek
22:24
ash_ left
22:26
estrabd is now known as estrabd_afk
22:33
Sanitoeter left
22:35
quietfanatic joined
|
|||
TimToady | quietfanatic: o/ | 22:35 | |
quietfanatic | hey | ||
so I was wondering | |||
rakudo: class A {has $.x = rand}; say A.new.x | |||
p6eval | rakudo 7e3ddc: OUTPUT«Could not find sub &rand in <anon> at line 11:/tmp/rlUBmjp7Ec in main program body at line 11:/tmp/rlUBmjp7Ec» | ||
quietfanatic | Why don't we have rand during build time? | ||
22:35
Sanitoeter joined
|
|||
TimToady | beats me | 22:36 | |
rakudo: say rand | |||
p6eval | rakudo 7e3ddc: OUTPUT«0.692584724255966» | ||
TimToady | perhaps it's the same lexical scope problem in class blocks we've always had | 22:37 | |
if rand is in CORE | |||
rakudo: my $a = 42; class A { has $.x = $a; }; say A.new.x | |||
p6eval | rakudo 7e3ddc: OUTPUT«Lexical '$a' not found in <anon> at line 11:/tmp/XIEFY1zH5p in main program body at line 11:/tmp/XIEFY1zH5p» | ||
TimToady | that one | ||
quietfanatic | ah, I see | ||
There doesn't seem to be any workaround save for making a custom BUILD | 22:38 | ||
TimToady | rakudo: class A { has $.x = CORE::rand; }; say A.new.x | ||
p6eval | rakudo 7e3ddc: OUTPUT«Can not find sub CORE::rand in <anon> at line 1 in main program body at line 11:/tmp/ZIawOLSCLn» | ||
quietfanatic | Or passing a parameter to new instead | 22:39 | |
TimToady | rakudo: our sub foo { rand }; class A { has $.x = foo; }; say A.new.x | 22:40 | |
p6eval | rakudo 7e3ddc: OUTPUT«0.70248685786234» | ||
TimToady | there's a workaround | ||
pmichaud | dhmmmmm | ||
I'm a little surprised that plain rand didn't work. | |||
yes, it's likely the same bug. But this one is also more easily fixable. | |||
quietfanatic | I thought I tried that but I guess I didn't | ||
22:49
Patterner left,
pragma_ is now known as tits
22:50
tits is now known as pragma_
22:53
Psyche^ joined,
Psyche^ is now known as Patterner
|
|||
cxreg | en.wikipedia.org/wiki/Guillemets#Pr..._Languages | 23:10 | |
23:10
saaki left
|
|||
cxreg | that's either wrong or outdated, right? | 23:10 | |
TimToady | «» is more like shell quoting, but their example isn't exactly incorrrect | 23:12 | |
23:14
kensanata left,
rv2733 joined
23:15
saaki joined
23:23
felliott left
23:25
skids left
23:29
ash_ joined
23:35
justatheory left
23:39
azert0x left
23:41
Patterner left
23:42
rv2733 left
23:50
rgrau_ joined
23:51
Fozo left
23:53
justatheory joined
23:55
Psyche^ joined
23:56
Psyche^ is now known as Patterner
23:59
jrtayloriv joined
|