»ö« | perl6.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo: / pugs: / std: , or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend! Set by wolfe.freenode.net on 30 October 2009. |
|||
00:13
rgrau joined
00:16
_jaldhar_ joined,
_jaldhar_ left
00:17
dpuu joined,
_jaldhar_ joined
|
|||
dpuu | rakudo: (0,1).grep: 0==(*%2) | 00:17 | |
p6eval | rakudo db84bc: ( no output ) | 00:18 | |
dpuu | rakudo: say (0,1).grep: 0==(*%2) | ||
p6eval | rakudo db84bc: 0 | ||
dpuu | rakudo: say (0,1).grep: !(*%2) | ||
p6eval | rakudo db84bc:  | ||
dpuu | rakudo: say (0,1).grep: not(*%2) | 00:19 | |
p6eval | rakudo db84bc:  | 00:20 | |
dpuu | rakudo: say (0,1).grep: 1==(*%2) | ||
p6eval | rakudo db84bc: 1 | ||
dpuu | rakudo: say (0,1).grep: {!($^x%2)} | 00:22 | |
p6eval | rakudo db84bc: 0 | ||
00:23
alester left
|
|||
dpuu | rakudo: say (!(*%2)).perl | 00:26 | |
p6eval | rakudo db84bc: Bool::False | ||
dpuu | rakudo: say (0==(*%2)).perl | ||
p6eval | rakudo db84bc: { ... } | ||
00:27
IllvilJa joined
|
|||
colomon | Wacky. | 00:28 | |
rakudo: say (*%2).WHAT | |||
p6eval | rakudo db84bc: !whatever_closure | ||
colomon | rakudo: say (!(*%2)).WHAT | ||
p6eval | rakudo db84bc: Bool() | ||
colomon | So ! applied to a closure / code block returns false?! | 00:29 | |
dpuu | I think that the problem is that a closure is a true value for prefix:<!> operator | ||
colomon | ah, okay, I can see that. | ||
IllvilJa | Hello and happy new year! If I want to use modules in rakudo perl6, the current recommended way to do that is to ensure that I have PERL6LIB set to include those module's directories. Anyone knows of the 'best' way to set that variable for a CGI perl6 script on an Apache server? | ||
dpuu | rakudo: say (0==(*%2)).WHAT | 00:30 | |
p6eval | rakudo db84bc: !whatever_closure | ||
IllvilJa | Should I edit poor @*INC directly in my script (nooo!), tweak my apache config to let that env variable take effect or is there some other hackery recommended to get PERL6LIB being known by the .cgi script? | 00:31 | |
(This is basic stuff, I know...) | |||
mberends | IllvilJa: there is no hackery, the choices you describe are about all you can do. Proto edits directly using unshift, for example. Pick whatever suits you. | 00:34 | |
IllvilJa | mberends: Thanks. I think I'll resort to editing the web server config file then, mostly because I'm familiar with that approach ;-). | 00:36 | |
mberends | IllvilJa: right on! | ||
00:37
lestrrat is now known as lest_away
00:38
cdarroch left
00:47
zamolxes left
00:50
ruoso left
00:52
dpuu left
01:02
cotto_working joined
01:04
sbp left
01:16
RichiH left,
zibri left,
zykes- left,
Exodist left,
xinming_ left,
mj41 left,
sjohnson left,
pardunci1 left,
ssm left,
_jaldhar_ left,
cognominal left,
phenny left,
Patterner left,
eiro left,
idemal left,
lumi left,
payload left,
Juerd left,
sunnavy left,
bloonix left,
Guest72143 left,
cls_bsd left,
Tene left,
hugme left,
pugs_svn left,
mdxi left,
Infinoid left,
LionMadeOfLions left,
kcwu left,
cj left,
douglashunter left,
lichtkind left,
astinus left,
ashizawa_ left,
carlin left,
REPLeffect_ left,
dukelet0 left,
mtve left,
akl left,
silug left,
japhb left,
ShaneC left,
takadonet left,
Helios-- left,
cotto left,
mberends left,
cbk left,
PacoLinux left,
jrockway left,
baest left,
pnu left,
jjore left,
c1sung left,
youwin left,
Trey left,
allbery_b left,
p6eval left,
go|dfish left,
betterworld left,
omega__ left,
hatseflats left,
jho left,
mathw left,
rgrau left,
rachelBROWN left,
partisan left,
astrojp left,
xomas_ left,
justatheory left,
gbacon left,
BooK left,
PZt left,
Intensity left,
PerlJam left,
szabgab left,
szbalint left,
pmichaud left,
Ryan52 left,
spinclad left,
he_ left,
frettled left,
frew left,
Khisanth left,
hejki left,
hcchien left,
obra left,
Supaplex left,
ilbot2 left,
avar left,
literal left,
slavik left,
buubot left,
felipe left,
stepnem left,
r0bby left,
BinGOs left,
cotto_working left,
IllvilJa left,
orafu left,
Chillance left,
stephenlb left,
lest_away left,
Maddingue left,
kst left,
nbrown left,
araujo left,
revdiablo left,
constant left,
tomaw_ left,
jql left,
meteorjay left,
jan___ left,
yahooooo left,
perigrin left,
drbean left,
arthur-_ left,
pjcj left,
ascent left,
pnate left,
gfldex left,
xalbo left,
c9s left,
arnsholt left,
jnthn left,
rjh left,
jnthn joined,
presh_ joined,
ewilhelm left,
BinGOs joined,
avar joined,
literal joined,
slavik joined,
buubot joined,
irc.freenode.net sets mode: +v buubot,
kolibrie left,
buu left,
krunen left,
ewilhelm joined,
krunen joined,
nothingmuch joined,
cotto_working joined,
IllvilJa joined,
orafu joined,
Chillance joined,
stephenlb joined,
lest_away joined,
Maddingue joined,
kst joined,
nbrown joined,
araujo joined,
revdiablo joined,
constant joined,
tomaw_ joined,
jql joined,
meteorjay joined,
jan___ joined,
yahooooo joined,
perigrin joined,
drbean joined,
arthur-_ joined,
xalbo joined,
pjcj joined,
ascent joined,
pnate joined,
gfldex joined,
c9s joined,
arnsholt joined,
dalek left,
simcop2387 left,
nsh left,
rjbs left,
Lorn left,
athomaso1 left,
Gothmog_ left
01:17
xenoterracide left,
colomon left,
mberends joined,
lumi joined,
colomon joined,
simcop2387 joined,
nsh joined,
kolibrie joined,
r0bby joined,
rjh joined,
RichiH joined,
xenoterracide joined,
dalek joined,
gabiruh_ joined,
sbp joined,
_jaldhar_ joined,
rgrau joined,
cognominal joined,
japhb joined,
payload joined,
Exodist joined,
rachelBROWN joined,
partisan joined,
ShaneC joined,
astrojp joined,
xomas_ joined,
xinming_ joined,
phenny joined,
douglashunter joined,
justatheory joined,
mj41 joined,
lichtkind joined,
pardunci1 joined,
Patterner joined,
sunnavy joined,
Juerd joined,
gbacon joined,
astinus joined,
bloonix joined,
BooK joined,
takadonet joined,
Helios-- joined,
ashizawa_ joined,
ssm joined,
silug joined,
cotto joined,
szbalint joined,
carlin joined,
cbk joined,
zibri joined,
irc.freenode.net sets mode: +o mberends,
zykes- joined,
sjohnson joined,
eiro joined,
PZt joined,
REPLeffect_ joined,
Guest72143 joined,
cls_bsd joined,
jho joined,
Intensity joined,
dukelet0 joined,
Tene joined,
PerlJam joined,
hugme joined,
pugs_svn joined,
irc.freenode.net sets mode: +oovv sjohnson Tene hugme pugs_svn,
Infinoid joined,
mdxi joined,
kcwu joined,
cj joined,
LionMadeOfLions joined,
mtve joined,
akl joined,
szabgab joined,
PacoLinux joined,
betterworld joined,
omega__ joined,
hatseflats joined,
jrockway joined,
baest joined,
idemal joined,
go|dfish joined,
pnu joined,
jjore joined,
c1sung joined,
youwin joined,
Trey joined,
allbery_b joined,
pmichaud joined,
p6eval joined,
charsbar_ joined,
TimToady joined,
awwaiid joined,
IRSeekBot joined,
irc.freenode.net sets mode: +ovov pmichaud p6eval TimToady IRSeekBot,
yves joined,
elmex joined,
Grrrr joined,
cosimo joined,
krakan joined,
Caelum joined,
ingy joined,
diakopter joined,
irc.freenode.net sets mode: +o diakopter,
rhr joined,
huf joined,
moritz_ joined,
wolverian joined,
tarbo2_ joined,
mathw joined,
Ryan52 joined,
frettled joined,
irc.freenode.net sets mode: +oooo moritz_ wolverian mathw frettled,
frew joined,
Supaplex joined,
ilbot2 joined,
hejki joined,
spinclad joined,
obra joined,
Khisanth joined,
hcchien joined,
he_ joined,
irc.freenode.net sets mode: +vo ilbot2 spinclad,
_Jedai_ left,
lest_away is now known as lestrrat,
bigpresh_ left,
eternaleye left,
zamolxes joined,
|Jedai| joined,
nsh_ joined
01:18
Gothmog_ joined
01:19
cotto_w0rk left
01:22
dbrock left
01:24
lisppaste3 left
01:26
lisppaste3 joined
|
|||
diakopter | quite the netsplit. | 01:29 | |
cognominal | TimToady: it is a hassle for a rule composed of alternatives to write an #= somealternative for each alternative, a final {**}. for example should be the equivalent of writing them explictely. | 01:31 | |
somehow another HyperWhatever :) | |||
01:32
sjohnson sets mode: +o cognominal
|
|||
cognominal | I guess I should propose a patch now that I dig grammars | 01:33 | |
01:35
agentzh joined
01:39
xinming_ left
01:42
lichtkind left
01:47
japhb left
01:55
wolf2k_ubuntu joined
01:58
eternaleye joined
02:00
cotto_work joined
02:03
_jaldhar_ is now known as jaldhar
02:07
cotto_working left
02:13
lumi left,
lumi joined
|
|||
diakopter | std: use v7; # sweet! | 02:17 | |
p6eval | std 29460: ok 00:01 103m | ||
sjohnson | std: use v5; | 02:18 | |
p6eval | std 29460: ok 00:01 103m | ||
sjohnson | oh neet | ||
.ff | |||
oops | |||
diakopter | rakudo: use v6.0.0; say 'alive'; | ||
p6eval | rakudo db84bc: Confused at line 2, near ".0; say 'a"in Main (file <unknown>, line <unknown>) | ||
diakopter | rakudo: use v6; say 'alive'; | ||
p6eval | rakudo db84bc: alive | ||
Tene | std: us v777; | 02:19 | |
p6eval | std 29460: Undeclared routine: 'us' used at line 1ok 00:01 105m | ||
Tene | std: use v777; | ||
p6eval | std 29460: ok 00:01 103m | ||
02:25
douglashunter_ joined
|
|||
diakopter | std: use v999999999999999999999999999999999999999999999999999999999999999999999999999999999; | 02:29 | |
p6eval | std 29460: ok 00:01 103m | ||
02:30
aindilis joined
|
|||
diakopter | std: no v6; | 02:31 | |
p6eval | std 29460: ok 00:01 103m | ||
arnsholt | Are the semantics of that defined? | 02:32 | |
02:32
japhb joined
02:34
cognominal left
|
|||
diakopter | arnsholt: I don't know. | 02:34 | |
arnsholt | Doesn't look like S11 says anything about no at all | 02:36 | |
colomon is compiling C++ for $work, spectesting Rakudo master, and compiling Rakduo ng. | 02:43 | ||
arnsholt | Hooray for multicore? | 02:44 | |
colomon | more like hooray for patience, though I guess the MBP does have two cores. | 02:45 | |
arnsholt | Heh. Time for coffee in that case, sounds like =) | ||
colomon | Actually ng builds pretty quickly. | 02:46 | |
02:46
rgrau left
02:51
kst left,
kst joined
02:57
cognominal joined
|
|||
pugs_svn | r29461 | colomon++ | [t/spec] Refudged after log($base) patch. | 03:07 | |
dalek | kudo/ng: 93fa57e | (Solomon Foster)++ | src/core/ (3 files): Add log with $base functions. |
03:09 | |
colomon | If someone is ambitious, we could certainly use more tests in log.t. | 03:12 | |
For instance, log with base has three tests -- but there are more different versions of the function than that. (Complex with base, method forms, etc.) | 03:13 | ||
So that's patch RT #70105 applied to both master and ng. I'm not sure how to clean that up in RT... | 03:31 | ||
dalek | kudo/master: 3867ffd | (Solomon Foster)++ | src/setting/ (3 files): Add log with $base functions. |
03:32 | |
03:33
cls_bsd left
03:38
nsh left,
nsh_ is now known as nsh
03:40
wolf2k_ubuntu left
03:41
synth joined
03:42
felipe joined
03:48
patspam joined
03:51
xinming joined
03:53
cls_bsd joined,
cognominal left
03:54
cognominal joined
03:56
stephenlb left
|
|||
TimToady | cognominal: #= is going away entirely, I suspect; STD doesn't use it at all | 04:08 | |
diakopter | TimToady: do the Syn define 'no module_name;'? | 04:10 | |
TimToady | it's discussed at S01:27 :) | 04:12 | |
diakopter | o_- | 04:13 | |
+_+ | 04:14 | ||
TimToady | just so it's not x_x | 04:15 | |
diakopter | o_x arrrrr | ||
04:34
thowe joined,
soupdragon joined
04:41
ShaneC left
05:07
cognominal left,
cognominal joined
05:09
am0c joined
05:23
cognominal left
|
|||
pugs_svn | r29462 | diakopter++ | [sprixel] gbothlrs seems to be done, but buggy. | 05:26 | |
diakopter | o wait, it does work :) | ||
05:27
youwin left,
youwin joined
05:33
lumi left,
xinming_ joined,
lumi joined
|
|||
diakopter | std: no CORE; say 3; | 05:38 | |
p6eval | std 29461: ok 00:01 105m | ||
05:45
xinming left
05:49
gfx joined
05:52
meteorjay left
|
|||
pugs_svn | r29463 | diakopter++ | [sprixel] added geitherlrs | 05:53 | |
05:57
meteorjay joined
|
|||
pugs_svn | r29464 | diakopter++ | [sprixel] added gbeg[inning anchor] | 05:59 | |
diakopter | since it compiles parsers that use utf32 codepoints, the unicode categories will be straightforward to implement. | 06:03 | |
diakopter (said to no one in particular) | 06:04 | ||
06:04
lumi left
06:05
lumi joined
|
|||
pugs_svn | r29465 | lwall++ | [STD] emit better message when an intended reduce is interpreted as composer | 06:07 | |
diakopter | re Sinai lap, "this glittery water isn't too tasty" and "oh noes, his face, it glows" and "the new stone tablets; they're sturdier than the first ones" | 06:14 | |
06:29
kaare joined,
kaare is now known as Guest16754
06:40
meppl joined,
cognominal joined
06:43
douglashunter_ left
|
|||
cognominal | TimToady, how are actions called in STD? | 06:43 | |
06:44
justatheory left
|
|||
diakopter | which actions | 06:44 | |
cognominal | This is related to "<TimToady> cognominal: #= is going away entirely, I suspect; STD doesn't use it at all" | 06:45 | |
diakopter | there are actions in viv and 'actions' inline the patterns. | 06:46 | |
oh. what did #= mean | |||
cognominal | I wonder if the expliciting calling of actions methods within grammars is better than the current (*} #= scheme | 06:48 | |
*explicit | 06:49 | ||
pugs_svn | r29466 | lwall++ | [STD] improve detection of attempt to use postfix after whitespace | 06:52 | |
r29467 | lwall++ | [t/spec] catch bogus uses of \b | 07:07 | ||
07:08
buu joined
07:09
Su-Shee joined
07:14
agentzh left
|
|||
pugs_svn | r29468 | lwall++ | [STD] parse old embedded comment as line-end comment now | 07:28 | |
07:41
agentzh joined,
agentzh left
07:43
patspam left
07:44
patspam joined
07:46
Chillance left
07:51
lumi left
07:52
lumi joined
07:57
patspam left
08:02
thowe left
08:08
patspam joined
08:18
wjw joined
08:19
wjw left
08:24
lumi left,
lumi joined
|
|||
pugs_svn | r29469 | diakopter++ | [sprixel] gplus (plus of a deterministic pattern) working. now for gpluss. | 08:31 | |
08:43
payload left
08:44
rgrau joined
08:50
iblechbot joined
08:56
gfx left
08:57
patspam left
09:02
lumi left,
lumi joined
09:15
synth left
09:20
goksie joined
09:31
zloyrusskiy joined,
zloyrusskiy left
09:33
john joined,
john is now known as Guest61236
09:40
Guest61236 left,
bryan[c1] joined
09:42
ejs joined
09:45
zloyrusskiy joined
09:46
zloyrusskiy left
09:50
lestrrat is now known as lest_away
09:51
lumi left,
lumi joined
09:54
go|dfish left
10:00
payload joined
10:10
pdcawley joined
10:11
stepnem joined
10:14
meneldor joined
10:27
lumi left
10:31
ejs left
10:37
bryan[c1] left
10:40
cognominal left
10:52
eternaleye left
11:01
ruoso joined
11:05
eternaleye joined
11:15
broquaint joined
11:16
dakkar joined
11:19
payload left
11:20
patspam joined
11:21
patspam left
11:22
xinming joined
11:25
soupdragon left
11:26
xinming_ left
11:27
am0c left
11:34
ruoso left
11:36
Baggio_ joined
11:38
szabgab left,
szabgab joined
|
|||
mathw | o/ | 11:45 | |
mberends | \o | ||
Su-Shee | YOU'RE ALL ALIVE! | 11:46 | |
I was starting to think about bus accidents. | |||
mberends | yes, we've got to do stuff to improve bus numbers | 11:47 | |
colomon | o/ | 11:48 | |
11:48
Baggio_ left
|
|||
Su-Shee | all parties hard yesterday? ;) | 11:49 | |
partied | |||
mberends | I tried to contribute to wiki.perlito.org, and kept getting "Sorry! We could not process your edit due to a loss of session data". Finally succeeded with edit, copy, logout, login, paste, save :/ | 11:51 | |
Su-Shee | I feel with you. I'm hated by movable type and I don't know why. | 11:52 | |
11:55
szabgab_ joined
11:56
szabgab_ left
|
|||
mathw | Yesterday was my first day back in the office | 11:56 | |
There was no partying | |||
frettled | Party? But palindrome day was three days ago! | 11:57 | |
mberends | in Soviet Russia, every day is a Party day - Communist Party Day ;) | 11:58 | |
Su-Shee | (god, I love the threadless shirt.. :) | ||
frettled | Su-Shee: so it's all flat and Outlook-ish? | 12:01 | |
Su-Shee | frettled: the shirt or MT? ;) | ||
12:03
payload joined
|
|||
frettled | hee-hee :) | 12:03 | |
Su-Shee | I'm thinking about some firefox bug, because I can't log into _any_ MT properly. neither my own nor on blogs.perl.org | 12:05 | |
12:08
cognominal joined
12:09
ejs joined
12:19
rodi joined
12:23
SmokeMachine joined
12:25
rachelBROWN left
12:29
iblechbot left
|
|||
colomon | I cant decide whether to write my next bit of $work in Perl 5 or Perl 6. | 12:38 | |
szbalint | I'm going to dogfood P6 at $work, the only way I can learn. | ||
12:39
soupdragon joined
|
|||
colomon | my biggest worry doing that is that it would mean I'd need Rakudo installed on every machine I do work on. | 12:40 | |
colomon is kind of scared of the 64-bit vista machine.... | |||
szbalint | I'm writing quite a few one-shot scripts, that can be self-contained in ~, that makes it easier. | 12:41 | |
12:41
ruoso joined
|
|||
frettled | colomon: with good reason! | 12:41 | |
colomon | I've been doing one-shot p6 scripts for $work for about eight months now.... | 12:42 | |
frettled: that machine is actually the reason I have a MacBook Pro now. | 12:43 | ||
frettled | colomon: heh :) | ||
Hmm, that reminds me: today is blogging day again. | 12:44 | ||
I'll have to find something that's really quick and easy to blog about, since I don't really have time. Hmm! | |||
12:47
bluescreen joined
12:49
bluescreen left
12:50
bluescreen joined
|
|||
takadonet | morning all | 12:57 | |
hejki | is there a notation for: (1..10) X (1..10) X (1..10) X ... X (1..10) ? | 13:00 | |
syntactic sugar and to make stuff more.. dynamic :> | 13:01 | ||
rakudo: my @ar = (^3), (^4); for [X] @ar { .say } | 13:02 | ||
p6eval | rakudo 3867ff: 0323132303231323232313230323132313231323032313232323132303231323 | ||
mberends | hejki: not built in, but a user defined operator looks distinctly possible | 13:03 | |
hejki | hmm | ||
that ALMOST works :P | |||
Su-Shee | after I wrote this @{ $in_cc{$group->oid} } = grep { $_ == $group->oid; } @assigned; | 13:05 | |
hejki | hmm.. | ||
Su-Shee | today, I'd like the next project in perl 6 as well. | ||
hejki | mm.. | 13:07 | |
X has weird precedence | 13:08 | ||
rakudo: my @ar = (1..2) X (3..4) X (5..6); my @ar2 = (1..2) X (3..4); @ar2 = @ar2 X (5..6); if @ar eqv @ar2 { say "im rick james bit*h" } | |||
p6eval | rakudo 3867ff: ( no output ) | ||
hejki | rakudo: my @ar = ((1..2) X (3..4)) X (5..6); my @ar2 = (1..2) X (3..4); @ar2 = @ar2 X (5..6); if @ar eqv @ar2 { say "im rick james bit*h" } | ||
p6eval | rakudo 3867ff: im rick james bit*h | ||
hejki | i'm making "random number" generator which is supposed to lazily make every possible combination of a digit with given size and return one random | 13:10 | |
colomon | errr... you're lazily building the list of possibilities and then randomly choosing one of them? | 13:12 | |
hejki | you sense problems? | 13:14 | |
colomon | Well, I admit I don't understand laziness (in the context of programming, anyway) quite enough yet, but I don't see how you can easily choose one of a lazy list without actually generating much or all of it. | 13:16 | |
13:17
SmokeMachine left
|
|||
hejki | my @ar = gather { for ^Inf -> $i { take $i if $i % 2; } }; say "fifth even number: " ~ @ar[4]; | 13:17 | |
also is there some oddities required for a list of lists? | |||
colomon | hejki: but it has to calculate the first four even numbers to get the fifth one. | ||
hejki | rakudo: my @ar1 = (1..2); my @ar2 = (3..4); my @ar3 = @ar1, @ar2; say @ar3.elems | 13:18 | |
p6eval | rakudo 3867ff: 4 | ||
hejki | colomon: ye but that's better than generating all the possible choices and then selecting one of them? :) | 13:20 | |
13:20
SmokeMachine joined
|
|||
colomon | hejki: and if you asked it to, say, "pick" from your lazy list, then the first thing it does internally is call .elems on the list, which will generate all the elements on the list. | 13:20 | |
hejki | ofc | 13:21 | |
that's why i'm asking for a single value directly | |||
rakudo: my @ar = [1..2], [3..4]; say @ar.elems; @ar>>.say | 13:25 | ||
p6eval | rakudo 3867ff: 21 23 4 | ||
hejki | i need to enclose them all in brackets? :< | ||
colomon | Brackets make an array reference, not a list. | 13:31 | |
hejki | seeminglt | ||
y | |||
colomon | I don't know how to make a list of lists like that. | ||
13:34
ruoso left,
go|dfish joined
13:35
goksie left
|
|||
colomon is trying to build Rakudo from source on 32-bit XP... | 13:36 | ||
colomon and failing. | 13:38 | ||
hejki | rakudo: say (48..57,65..90,97..122).pick(12, :replace)>>.fmt("%c") | ||
p6eval | rakudo 3867ff: cgk6mAKf0NDj | ||
hejki | ahh the ease | ||
hmm.. i recall there being character ranges too? | |||
colomon | rakudo: say ('a' .. 'g').pick | 13:39 | |
p6eval | rakudo 3867ff: e | ||
13:40
am0c joined
|
|||
frettled | hejki: On average, generating like you suggest will, on average, result in saving 50% in time spent generating. | 13:40 | |
colomon | rakudo: say ('0' .. '9', 'a' .. 'z', 'A' .. 'Z').pick(12, :replace) | ||
p6eval | rakudo 3867ff: mFMs0l9iCV5s | ||
hejki | rakudo: say (1..10,'a'..'z','A'..'Z').pick(12, :replace) | ||
p6eval | rakudo 3867ff: YMZRY1D10fNN8 | ||
frettled | hejki: unless you manage to add some really nifty tricks | ||
hejki | yeh | 13:41 | |
13:41
ruoso joined
|
|||
hejki | heh.. | 13:41 | |
1..10 :) | |||
and it chose 10 \o/ | |||
13:43
plainhao joined
13:46
payload1 joined
13:48
soupdragon left,
soupdragon joined,
payload left
13:54
Baggiokwok joined
14:05
pmurias joined
|
|||
moritz_ | good localtime, gentle{men,women} | 14:11 | |
PerlJam | greetings moritz_ | ||
mathw | $emotion localtime() | 14:13 | |
colomon | \o | 14:16 | |
colomon is very sad to be programming in Perl 5 at the moment. | |||
takadonet | colomon: why? | 14:17 | |
colomon | takadonet: Because Perl 6 programming is coming more naturally to me these days. | ||
mberends does not mind working bilingually for a few years | 14:19 | ||
cognominal | modulo implementation current shortcomings, I agree with colomon | ||
takadonet | colomon: I been re writing some bioperl modules in Perl 6 and man.... it's so much cleaner! | ||
cognominal | say "ok" if 'a' eq any< a b> | ||
rakudo: say "ok" if 'a' eq any< a b> | |||
p6eval | rakudo 3867ff: ( no output ) | ||
cognominal | ng: say "ok" if 'a' eq any< a b> | ||
p6eval | ng 93fa57: get_pmc_keyed() not implemented in class 'Junction'current instr.: '_block14' pc 29 (EVAL_1:0) | ||
Su-Shee | mberends: I'm already at CSS, HTML, Perl 5 and JavaScript and SQL within one day, if I add Perl 6, I'll need a triple dose chocolate. | 14:20 | |
colomon | I'd be all over writing this code in Perl 6, despite current implementation shortcomings, but trying to build Rakudo on Windows gives me hives. | ||
cognominal | any anytime now... | ||
colomon | and I need this code working ASAP. | ||
mathw | mmm chocolate | ||
mathw has written no code at all today | |||
Su-Shee | but I have to admit, exactly today I would have had good use for many perl 6 features. | 14:21 | |
mberends | Su-Shee: if that's the excuse you need to have chocolate, help yourself! | ||
PerlJam | Why does anyone need an excuse for chocolate? :) | ||
Su-Shee | I was talking triple dose.. ;) | ||
mberends | :) serious chocolate, Lindt 88% | 14:22 | |
Su-Shee | bah, cheap stuff. ;) | 14:25 | |
(did I mention that I make chocolate truffles? :) | 14:26 | ||
mathw | I need to learn how to do that | ||
mberends | hmm, creamy truffles! | ||
mathw | A friend made some over Christmas and they were utterly superb | 14:27 | |
Su-Shee | mathw: it's a winter thing, but it's rather easy and absolutely _no_ comparison to the bought stuff. | ||
mathw | absolutely | 14:28 | |
Jen's were amazing | |||
They got eaten in quite short order | |||
Su-Shee | and I recommend "cluizel" cuverture. | ||
which reminds me, I need to buy forms. | 14:29 | ||
14:31
Woody2143 joined
|
|||
diakopter | I've gotten twitter fail whale several times in the past few minutes. over-capacity? at 9:30 EST? | 14:33 | |
mathw | it's been having a few problems recently | 14:34 | |
PerlJam | diakopter: same thing happened to me yesterday. | ||
it's all those people tweeting about the holidays :) | |||
diakopter | PerlJam: I suppose you're not /perljam on twitter | 14:35 | |
PerlJam | I'm generally perlpilot or duff on anywhere but IRC | 14:36 | |
diakopter | oh :) | ||
in that case I'm already following you, I think | |||
nope, not yet. | 14:37 | ||
I've been able to find neither the 2008 nor the 2009 State of the Onion talks (video, slides, transcript, audio, nothing) anywhere online..... does anyone know [with certainty] whether recordings of any form exist *anywhere*? | 14:40 | ||
14:42
somebody_ joined,
soupdragon left,
somebody_ left
14:43
soupdragon joined
|
|||
PerlJam | diakopter: they aren't linked at www.perlfoundation.org/perl6/index...._the_onion ? | 14:44 | |
14:44
Baggiokwok left
|
|||
jho | Is it intended behavior that (1,2,3)».say works, but (1,2,3) » .say, (1,2,3)» .say, and (1,2,3) ».say don't? | 14:44 | |
moritz_ | yes | 14:45 | |
PerlJam | jho: they all mean different things :) | ||
moritz_ | method calls don't allow spaces | ||
and adding a » or >> to a method call doesn't change that | |||
foo .bar would be parsed as foo($_.bar) | |||
PerlJam | (1,2,3) » .say would be an infix:<»> | ||
diakopter | PerlJam: no.. | ||
did you click it? | 14:46 | ||
jho | Oh, cool. I thought » as some kind of an infix operator like + and - instead of like that. Thanks. | ||
PerlJam | diakopter: No, but that's usually where they end up. | 14:47 | |
colomon has given up altogether on automatically generating this code for $work... | 14:48 | ||
14:52
ejs1 joined
15:01
payload1 left
15:05
ejs left
|
|||
Su-Shee | colomon: I have fixed my stuff, jippi! | 15:05 | |
colomon | \o/ | ||
Su-Shee | (this code has to go.) | 15:06 | |
15:10
spokebug_perl6 joined
|
|||
diakopter | spokebug_perl6: camelia? is that you? | 15:11 | |
15:11
ive joined
15:12
spokebug_perl6 left
15:15
mikehh joined
|
|||
mberends | it would have been wonderful if the spokesbug had spoken. a visitation. | 15:15 | |
PerlJam | indeed. | 15:16 | |
for a spokesbug, it sure was oddly quiet | |||
Su-Shee | wrong frequency for us humans to hear. | 15:17 | |
15:18
ive left,
ash_ joined
|
|||
PerlJam | must be | 15:19 | |
15:26
kst left,
ejs1 left,
kst joined
15:31
fridim_ joined
15:32
zamolxes left
|
|||
pmichaud | good morning, #perl6 | 15:38 | |
takadonet | pmichaud: morning, how are you? | ||
PerlJam | greetings pm | ||
pmichaud | doing well, after extended absence | ||
takadonet | great to hear! | ||
colomon | \o/ | 15:39 | |
moritz_ | looking for jobs and writing applications is a daunting task, somehow | 15:40 | |
moritz_ a bit depressed | 15:41 | ||
colomon | moritz_: it truly is. | ||
15:41
Exodist left
|
|||
slavik | moritz_: what area? | 15:41 | |
Su-Shee | moritz_: just list what you've done, mail what you know and what you done (but what you have to offer instead) and you'll be fine. | 15:42 | |
mathw | yeah it's a horrible task | ||
pmichaud | "Please describe your dream job." "I work on Perl 6, travel to conferences, and collect big paychecks." | ||
(direct deposit, of course) | |||
slavik | haha | ||
mathw | mmm that'd be nice | ||
Su-Shee | pmichaud: "travel to conferences in interesting places.." :) | ||
moritz_ | pmichaud: agreed :-) | ||
15:42
aindilis left
|
|||
slavik | pmichaud: if only all of us could do that ... | 15:42 | |
mathw | Su-Shee: travel to enough and they're bound to be in interesting places occasionally | ||
15:43
aindilis joined
|
|||
pmichaud | conferences don't typically get held in uninteresting places :) | 15:43 | |
slavik | and somewhere, someone will go on a rant and smash coffee cups ... | ||
pmichaud | at least, not the ones I'm interested in :) | ||
diakopter | there was Houston | ||
moritz_ | slavik: physics/engineering or programming (or obth) | ||
pmichaud | Houston is interesting if you know where to go :) | ||
slavik | hmm, no luck here then :( | ||
diakopter | :( I was there 18 years and only learned where not to go | 15:44 | |
pmichaud | (and if you have transportation to take you there) | ||
ash_ | i lived in Houston from 0..9 so i don't remember much of it that would be useful now | 15:45 | |
moritz_: good luck on the job hunt, i am banking on grad school so i don't have to look for a job yet | |||
Su-Shee | moritz_: aren't you in the south anyway? | 15:46 | |
Tene | Morning, pmichaud! | 15:47 | |
mathw | I had a very interesting invitation to Houston once | 15:48 | |
i was never able to accept it though | |||
Tene | ng: sub foo { fail "wtf" }; my $x = foo(); say "alive"; | ||
p6eval | ng 93fa57: sh: ./perl6: No such file or directory | ||
Tene | bah! | ||
mathw | So it would've been more interesting then than now | ||
It's all very subjective | |||
Tene | ng: sub foo { fail "wtf" }; my $x = foo(); say "alive"; | ||
p6eval | ng 93fa57: alive | ||
15:48
Psyche^ joined
|
|||
Tene | ng: use fatal; sub foo { fail "wtf" }; my $x = foo(); say "alive"; | 15:48 | |
p6eval | ng 93fa57: wtfcurrent instr.: '&fail' pc 14327 (src/builtins/Junction.pir:188) | ||
slavik | ng is the new rakudo? | ||
Tene | Yes. | ||
moritz_ | Su-Shee: yes. Erlangen/Nürnberg | 15:49 | |
slavik | k, how far is it along implementing things that rakudo had? | ||
fail == die? | |||
Tene | slavik: ng is the new development branch of rakudo. | ||
slavik | I see | ||
Tene | fail == "soft die", kinda. | ||
fail == return Failure.new(); | 15:50 | ||
failure objects throw exceptions if not handled properly, but don't necessarily die right away. | |||
pmichaud: How okay are you with me adding a "check $! for unhandled exceptions, and throw them if so" tail to every block? | 15:51 | ||
Su-Shee | moritz_: apply at suse. | 15:52 | |
moritz_ | Su-Shee: :-) | 15:53 | |
pmichaud | Tene: I'd like to see us map out all of the things that need to happen at the end of blocks | ||
instead of just adding them in piecemeal | |||
Tene nods. | |||
Su-Shee | moritz_: I would if I would live there. | ||
pmichaud | we need something to check return types, something to catch return exceptions, something to check $! for unhandled exceptions... etc. | ||
we also need LEAVE blocks | 15:54 | ||
as well as some way of handling NEXT/REDO/LAST | |||
PerlJam | there's also POST IIRc | ||
pmichaud | seems like we ought to figure out the generic mechanism for handling all of these | ||
15:55
pmurias left
|
|||
pmichaud waits impatiently for the gphone announcement | 15:55 | ||
Tene | pmichaud: So, how's the lists API refactor coming? :) | 15:56 | |
pmichaud | it's #2 on my todo list (have an $otherjob task atm) | 15:57 | |
Tene | I've got an $otherjob task all day. Just found out I was teaching this week right at the last minute late Sunday night. Again. | 15:58 | |
takadonet | Tene: what do you teach? | 15:59 | |
Tene | takadonet: linux sysadmin classes | ||
takadonet | Tene: cool | 16:00 | |
PerlJam | Tene: Last spring I found out I was teaching an all-day course on my in to work the day I was supposed to be teaching it (a scheduling snafu had me teaching about 2 days sooner than I expected, so I was fairly unprepared) | ||
slavik | what I want in a phone: hardware layout similar to sidekick with touchscreen, 480p resolution native, Linux and Blackberry connect. and hardware for OpenGL ES. :D | ||
Tene: do you do network security type stuff like ARP poisoning? | |||
Tene | pmichaud: I'm fairly comfortable with the Failure implementation so far. Let me know if there's anywhere else you'd like me to work on. | ||
slavik: Occasionally, but we get very few of those classes. | 16:01 | ||
I've only taught one of them. | |||
slavik | :( | ||
mberends | slavik: and enough CPU and memory to run Rakudo | ||
Tene | They're my favorite, of course. | ||
AFK; teaching. | |||
16:02
nihiliad joined
16:03
zamolxes joined,
cognominal left,
cognominal joined,
rachelBROWN joined
16:04
Patterner left,
Psyche^ is now known as Patterner
16:06
justatheory joined
16:07
eternaleye left
16:12
justatheory_ joined,
rodi left
16:15
pmurias joined
|
|||
szbalint | slavik: I just ordered a nokia n900, that should be able to do that :) | 16:23 | |
slavik | almost but no :P | 16:24 | |
szbalint | what is it missing? | ||
slavik | decent keyboard | 16:25 | |
slavik has e90 | |||
16:25
arthur-_ left,
KyleHa joined
|
|||
szbalint | well I guess if it would have a larger keyboard it'd be a tablet/netbook | 16:26 | |
16:26
justatheory left,
justatheory_ is now known as justatheory
16:27
arthur-_ joined
16:29
ashizawa_ left,
rodi joined
16:31
PZt left
16:33
eric256 joined
|
|||
eric256 | is there an idiom to replace while (<>) { } ? | 16:36 | |
PerlJam | eric256: for <>.lines { } # IIRC | 16:37 | |
eric256 | would $_ then be the current line? and does it need chomped or is it auto chomped? | 16:38 | |
TimToady | for lines() { } is suposed to work | ||
*supposed | |||
16:38
JohnDoe365 joined
|
|||
TimToady | chomping is auto in p6 | 16:38 | |
PerlJam | TimToady: should the empty string work though? | ||
TimToady | <> is not an empty string, and it doesn't work anyway | ||
oh, you mean in the line | 16:39 | ||
a for doesn't care if the values are true or false | |||
rakudo: for $*IN.lines { .say } | 16:40 | ||
p6eval | rakudo 3867ff: Land der Berge, Land am Strome,Land der Äcker, Land der Dome,Land der Hämmer, zukunftsreich!Heimat bist du großer Söhne,Volk, begnadet für das Schöne,vielgerühmtes Österreich,vielgerühmtes Österreich!Heiß umfehdet, wild umstrittenliegst dem Erdteil du inmitten,einem starken | ||
..Herz… | |||
TimToady | for now, that at least works | ||
eric256 | yea that appears to be working for me....code is just slow...mmmm | ||
diakopter | how big is the input | 16:41 | |
eric256 | its keyboard input, playing with converting my perlmonks conways game of life script over to perl6, not working yet and slow ;( lol | ||
any way to get rakudo perl6 to tell me which revision it is running? | |||
PerlJam | I don't think speed is a strong point of any Perl 6 implementation. | 16:42 | |
moritz_ | eric256: nope | ||
TimToady | (yet) | ||
PerlJam | yes, yet | ||
eric256 | well...that makes it hard to tell if i'm even running the version i think i am... | ||
diakopter | isn't there a *RAKUDO_VERSION or something | 16:43 | |
PerlJam thinks he needs to have his vision checked. | |||
I keep seeing something via my left eye that isn't there. | |||
diakopter | detached retina? large floater? | 16:44 | |
16:44
TimToady sets mode: +o PerlJam
|
|||
TimToady | does that help? :) | 16:44 | |
diakopter | could be a parasite clod | ||
Tene | HORRIBLE DEMON? | ||
TimToady | idiosyncratic migraine | ||
PerlJam | fuzzy verticalish line that moves when I move my head | ||
perhaps there's something on my contact | 16:45 | ||
Su-Shee | PerlJam: plainly "age"? ;) | ||
rodi | Or ague, as the case may be. | ||
16:46
JohnDoe365 left
|
|||
PerlJam | Su-Shee: heh, I was complaining about feeling old just a few minutes ago on another channel. | 16:46 | |
Su-Shee | PerlJam: see? ;) | 16:47 | |
PerlJam | A girl I graduated from high school with is about to become a grandmother. Granted her daughter is only 18 or so, but still when your peers have grandchildren ... | ||
eric256 | for $*IN.lines() { } waits until all the lines are loaded then loops over them | 16:48 | |
TimToady | PerlJam: if there's any chance it's a detached retina, you should get to an eye doc now | ||
any active sports or head bashes lately? | |||
PerlJam | eric256: lists aren't lazy yet | ||
TimToady: nah, I've been fairly inactive. | 16:49 | ||
eric256 | LHS substr working? | 16:50 | |
PerlJam | It was just weird that suddenly there was this thing in my vision that seemed to appear out of no where. | ||
TimToady | when it track your eye position exactly, or wander around? | ||
s/when/does/ #gah | 16:51 | ||
eric256 | my $x = "hello world";$x.say; substr($x,5,1) = "A"; $x.say; | ||
rakudo: my $x = "hello world";$x.say; substr($x,5,1) = "A"; $x.say; | |||
p6eval | rakudo 3867ff: hello worldhello world | ||
PerlJam | whatever it was, it's gone now (I just rubbed my eye a bit and it disappeared just as weirdly as it arrived) | 16:52 | |
16:52
Alias joined
|
|||
TimToady | well, that probably means you're not having a stroke, unless you're now developing left neglect | 16:53 | |
eric256 | anyway to do that substr with rakudo? guess i could split the string with two substrs and insert what i need in the middle.... | 16:54 | |
Su-Shee | "it's not lupus!" (House, M.D.) | ||
PerlJam | TimToady: I think you've just inadvertently made me feel not so old. (I just realized that I don't have the hard experience that would make me be so cautious. I still think things like "nah, whatever it was is gone, so I'm good" :) | 16:55 | |
16:55
meneldor left
|
|||
TimToady | well, hey, being ancient has to be good for somethin'... | 16:56 | |
diakopter | u iz who u iz? | ||
TimToady | but yeah, eyes are a particular hot button of mine | ||
PerlJam | Actually, I'll know I'm old when I'm like my grandfather just before he died (at age 89). All of his friends were dead and the people he tended to have conversations with were the sons or daughters of the people he knew) | 16:57 | |
Su-Shee | PerlJam: we will all end up drooling on our keyboards "look, pa, those old guys still use keyboards!" | 16:58 | |
ash_ | eric256: substr isn't fully functional yet | ||
TimToady | "a keyboard--how quaint" | ||
PerlJam | Su-Shee: I'm looking forward to some other form of input device that's better than a keyboard. I can't imagine what that will be, but whatever it is, it'll be awesome! :) | 16:59 | |
soupdragon | eye ooze speech two text four eye are see | ||
ash_ | rakudo: my $a = "hi"; $a = substr($a, 0, 1) ~ 'b'; say $a; | ||
p6eval | rakudo 3867ff: hb | ||
ash_ | substr can't do a replacement in rakudo at the moment, but it can return a part of a string | ||
diakopter | soupdragon: :) | ||
Su-Shee | PerlJam: well it won't be trying to write something on a tablet pc, that's for sure. | 17:00 | |
PerlJam | Su-Shee: you never can tell. | ||
17:00
cdarroch joined
|
|||
ash_ | eric256 that should be more like: substr($a, 1, 1, 'b') or substr($a, 1, 1) = 'b' but those aren't working yet | 17:00 | |
Su-Shee | PerlJam: think palm pilot scribbling a little more convenient. but not much more. or poking single letters on a displayed keyboard. ;) | 17:01 | |
PerlJam | Lately I've seen some pretty cool things with using thoughts to control devices. That technology may be mature in 20 years or so. | 17:02 | |
Su-Shee | PerlJam: ah. the time, when the word "alzheimer perl/code" shows up. | 17:04 | |
eric256 | ash i don't see the four argument form defined in S32...should it be? | 17:05 | |
PerlJam | eric256: heh, I was just looking at S32 and thinking the same thing. | ||
lisppaste3 | eric256 pasted "4 arg substr" at paste.lisp.org/display/93030 | ||
eric256 thinks "Hello"[5] = "A" should work too. lol ;P | 17:06 | ||
ash_ | eric256: i agree, the [ ] postfix does make sense | 17:07 | |
PerlJam | ash, eric256: and what units are the numbers within the [] ? | ||
ash_ | eric256: loop at t/spec/S32-str/substr.t it has the 4 argument version of substr in the tests | ||
eric256 | yea ash i saw the tests, just not the documentation | 17:09 | |
ash_ | PerlJam: i'd do it based off index's results, if i did my $a = "abc"; $a[$a.index('b')] = 'f'; | ||
i'd expect that to work, personally | |||
eric256 | ash...chars? | 17:10 | |
ash_ | i know with unicode you can't say 5 and expect it to be the exact same in every encoding | ||
eric256 | or PerlJam i mean. | ||
eric256 has no experience with unicode though...so dunno | |||
same units that substr uses? | |||
i can't even seem to find where substr is defined in the src.... | 17:11 | ||
PerlJam | eric256: are you on the ng branch? | 17:12 | |
eric256 | could i put the four arg version in settings/Str.pm | ||
no...should i use that instead? | |||
PerlJam | that's where I'd make any changes given that ng will become master soon | ||
eric256 | are there any directions on how to get it? | 17:13 | |
PerlJam | (pick your own units of time for "soon" :) | ||
eric256 is still a git newb after years | |||
PerlJam | eric256: git co ng | ||
ash_ | eric256: src/gen/core.pm (if your in master) | ||
line 757 | |||
PerlJam | oh sorry, I'm too used to the shortcuts ... git checkout ng | ||
src/core/Any-str.pm (in ng) | 17:14 | ||
eric256 | even that fails.... did not mach any files known to git | ||
eric256 surfs github | 17:16 | ||
rodi | PerlJam: is that all? | ||
PerlJam: meaning, once I git checkout ng, I'm on the other branch? | |||
PerlJam | rodi: if you already have a clone of rakudo, yes. | ||
(though git may complain if you have some unsaved changes in your working copy) | |||
oh, wait sorry again, I'm having a monday today, you need to make a local copy of the remote branch | 17:17 | ||
git checkout -b ng -t origin/ng | 17:18 | ||
that creates a new local branch called "ng" that tracks the remote branch "origin/ng" | |||
rodi | ah, okay, that makes sense, kind of ;) | ||
ash_ | PerlJam: the -b isn't really needed, you can do git checkout -t origin/ng | ||
and it makes a local branch called ng automattically | |||
or if you want to give it a specific name you can do -b and specify, but its not always required :P | 17:19 | ||
PerlJam | ash_: I did it the verbose way because it depends on which version of git you have as to whether it works properly | ||
ash_: in modern git, you can just say "git checkout -t ng" | |||
ash_ | ah, i didn't realize that only worked with newer git versions | ||
eric256 | git and forks and branches....arrrgg . lol | 17:20 | |
rodi | so once I'm switched to the branch, do I need to git pull or anything to synch up with the remote repo? | ||
PerlJam | rodi: you could, but if you've fetched recently, you shouldn't need to. | 17:21 | |
ash_ | it should be in sync already, when you do git pull it will automattically merge changes from origin/ng into your local ng and merge changes from origin/master into your local master | ||
17:21
iblechbot joined
|
|||
rodi | ah, interesting. | 17:21 | |
PerlJam | anyway, once you have a local branch, you can switch between them with "git checkout master" and "git checkout ng" | 17:24 | |
17:33
PZt joined
|
|||
pugs_svn | r29470 | diakopter++ | [sprixel] gplusb mostly done.. | 17:36 | |
17:37
dakkar left
17:45
colomon__ joined,
colomon left,
colomon__ is now known as colomon
|
|||
eric256 | okay...got the branch, added the method, made it...now is there a way to run just that test? | 17:50 | |
mberends | eric256: 'make testable', then ./perl6 t/spec/whatever/test.t | 17:51 | |
eric256 | thanks | 17:52 | |
i thought that directions for that used to be on rakudo.org but i'm not finding them... | |||
mberends | that means even if they are on the site, they're not where they should be.. | 17:53 | |
patches welcome ;) | 17:54 | ||
eric256 | yea ironicaly i think i'm the one who wrote them last time cause i couldn't figure it out. lmao | ||
mmmm this test has a block that doesn't parse and it has #?rakudo skip but its not skipping | |||
17:55
astrojp left
|
|||
eric256 | ./perl6 t/spec/S32-str/substr.t | 17:55 | |
mberends | that's because 'make spectest' does the fudging to create t/spec/S32-str/substr.rakudo which you should run | 17:56 | |
eric256 | ahhhh | 17:57 | |
leavin steps out on me! | |||
lol | |||
18:02
jaldhar left
18:05
ShaneC joined
|
|||
ash_ | eric256: i just realized there is also subst for doing string replacements | 18:05 | |
ng: my $a = 'hi'; $a.=subst('i', 'b'); say $a; | |||
p6eval | ng 93fa57: hb | ||
eric256 | yea but i'm doing positional replacements | 18:09 | |
18:09
colomon left,
colomon joined,
astrojp joined
|
|||
colomon | eric256: I think what you really want is "make t/spec/S32-str/substr.t" -- at least, that's what I use to run a single test... | 18:10 | |
TimToady | that doesn't make sense; a make target is a destination, not a source | 18:15 | |
maybe you want some kind of "prove" | |||
KyleHa | I do: perl t/harness --fudge --verbosity=1 t/spec/S32-str/substr.t | 18:16 | |
(That way I can specify my modified file off in ../pugs/t/spec... when I'm in the process of changing something.) | |||
pmichaud | 'prove' doesn't yet work reliably | 18:17 | |
schwern++ created a make target where the name of the test runs the test | |||
mberends | rakudo: "aaaaa".subst(/<?after .**2> (.)/,"b").say # for eric256, but replacing the 2 with a variable causes Null PMC Access | 18:18 | |
p6eval | rakudo 3867ff: aabaa | ||
pmichaud watches tweets of the nexus announcement :-| | 18:19 | ||
takadonet | hehe | 18:20 | |
TimToady | I would consider that an abuse of make... | ||
pmichaud | yes, it's an abuse of make | ||
TimToady | I'd rather see something like make t/spec/S32-str/substr.ok where it just forgets to create substr.ok | 18:22 | |
pmichaud | or even just leave off the .ok | 18:23 | |
TimToady | my tab reflex would probably take over inappropriately... | 18:24 | |
pmichaud | ...which I suspect is part of the reason we allow the .t :) | 18:25 | |
TimToady | make ought just stick out its tongue and tell you it already exists | ||
*oughta | |||
either that, or we should rename it dwim | 18:26 | ||
18:26
FCO joined
|
|||
pmichaud | eventually 'prove' should be able to handle it | 18:26 | |
TimToady | the problem is 'prove' is too long; we should write 'ok' instead | 18:27 | |
and 'prove' is nowhere close to a real theorem prover... | 18:28 | ||
PerlJam wonders if David Huffman twitches in his grave | |||
TimToady | I think most of the time it would be a very small twitch | 18:29 | |
diakopter | microexpression | ||
18:30
SmokeMachine left
|
|||
soupdragon | I hadn't heard of prove yet | 18:30 | |
18:32
payload joined
|
|||
mberends | soupdragon: perldoc prove # it's in Perl 5 | 18:32 | |
18:33
soupdragon left
|
|||
pmichaud | afk for a while # lunch | 18:34 | |
18:39
cognominal left
18:40
alester joined
18:45
tkr joined
|
|||
eric256 | that whole substr.t file doens't like me | 18:50 | |
lol | |||
even after make spectest it still has sections that i have to hand comment out | 18:52 | ||
arnsholt | eric256: If there are fudged tests, the file you're looking for is called substr.rakudo | ||
eric256 | yea its not fudging them all for some reason... | 18:53 | |
lunch time, then i'll see if i can't fix that file | |||
18:53
kst left
18:54
kst joined
18:59
takadonet left
19:08
IllvilJa left
19:11
justvisiting joined
19:12
justvisiting left
19:20
KyleHa left
19:30
ash_ left
19:33
ash_ joined
|
|||
ash_ | pmichaud: www.google.com/phone (i am sure you already found that link though) | 19:35 | |
PerlJam wonders how many people will pay $529 for that phoen. | 19:36 | ||
I can't wait until smart phones become more commodotized and thus cheaper | |||
Su-Shee | PerlJam: an iPhone was going for 600 euros over the table when it came out. and you know how many people got one.. :) | 19:39 | |
counter is this thing called. | 19:40 | ||
ash_ | i know someone that hack's their iphone, they bought it for $700 when the iPhone 3GS came out on ebay (a steal compared to most that were going at the time) | ||
PerlJam | Yeah, but I'm not sure the apple hype machine and the google hype machine are the same size. (I think apple's might be bigger for this market) | 19:41 | |
Su-Shee doesn't own a fancy phone and no apple lifestyle products. | |||
PerlJam: I don't know how extremely well done the UI and how incredibly super open source a phone would have to be until I pay those prices... | 19:42 | ||
19:42
mikehh left
|
|||
ash_ | i love my iPhone, i wouldn't bother with a fancy phone if it didn't do all the stuff my iphone does, (namely how it integrates with music itunes and can act as a gps and i can tether anywhere i have a cellphone signal) | 19:42 | |
19:42
mikehh joined
19:43
nihiliad left
19:44
clintongormley joined
|
|||
ash_ | i think iTunes is the only thing preventing me from using linux full time honestly... | 19:45 | |
Su-Shee | no, no apple products in this household :) | ||
19:45
nihiliad joined
|
|||
ash_ | which either says a lot about how much i listen to music, or how hard i am willing to try to find a replacement | 19:45 | |
Su-Shee | well I'm very much into graphics and I still don't own anything mac. :) | ||
ash_ shrug | 19:46 | ||
i have 3 operating systems on all of my computers and use the one i need when i need it, although windows is 90% a gaming thing and 10% stupid comp-sci homework that i have to do in some program on windows only | 19:47 | ||
Su-Shee | well open source is important to me so since 1995 I'm open source only at home and at work. | ||
19:48
pmurias left
|
|||
ash_ | i wish i could only use open source stuff but its hard for me, plus school almost requires it, but at least they give us student developer accounts to microsoft and apple so we don't have to pay for it | 19:50 | |
TimToady | std: 1 i | 19:54 | |
p6eval | std 29470: ===SORRY!===Postfix found where infix expected at /tmp/ne0ggwAJkz line 1:------> 1 ⏏i expecting any of: bracketed infix dotty infix or meta-infix infix stopper postfix standard stopper terminatorFAILED 00:01 107m | ||
TimToady | std: [say] 1,2,3 | 19:56 | |
p6eval | std 29470: ===SORRY!===Two terms in a row (preceding is not a valid reduce operator) at /tmp/k9gA3LQZVF line 1:------> [say] ⏏1,2,3 expecting any of: bracketed infix dotty infix or meta-infix infix stopper postfix standard | ||
..stopper statement modifier … | |||
TimToady | std: (1,2,3) ».say | 19:57 | |
p6eval | std 29470: ===SORRY!===Method call found where infix expected at /tmp/B2eh4qB92I line 1:------> (1,2,3) ».say⏏<EOL> expecting method argumentsFAILED 00:01 107m | ||
TimToady | those message probably save the world about a billion hours of debugging time over the next 100 years... :) | 19:58 | |
*messages | |||
20:00
mikehh left
|
|||
douglashunter | STD++ I like its messages so much I had to write about it: blogs.perl.org/users/douglas_hunter...stdpm.html | 20:01 | |
pugs_svn | r29471 | lwall++ | [STD] suggest omitting whitespace to get a postfix | 20:02 | |
douglashunter | Time to go upgrade STD [grin] | ||
TimToady | douglashunter++ | 20:03 | |
20:15
slavik left
|
|||
sjohnson | rakudo: say "mountain jeff".subst('jeff', 'geoff'); | 20:22 | |
p6eval | rakudo 3867ff: mountain geoff | ||
eric256 | for substr, the code handling too long or too short of start and length doesn't loop, so if its more than 1 times the length off it doesn't work... | 20:23 | |
20:24
KyleHa joined
|
|||
eric256 | if $len < 0 then $len -= $start;...i'm not sure i understand the why behind that | 20:24 | |
ash_ | substr("hello world", -4, -3); ? | 20:25 | |
rakudo: substr("hello world", -4, -3).say; | |||
p6eval | rakudo 3867ff: o | ||
eric256 | rakudo: substr("abcdefg",-4,-3).say; | 20:26 | |
p6eval | rakudo 3867ff: d | ||
sjohnson | TimToady: hi. is there a special $ENGLISH_VAR type thing to set the substitution params in a scope? for instance, if i could do something like $SUB_PARAM = "gi" so i didnt have to write if statements to be insensitive or not and have 2 substition statements | 20:27 | |
or something that accomplishes the same thing. only other trick i know is doing s/moo/cow/$args; | |||
ash_ | eric256: its specifying the range from -4 to -3, which is 1 | 20:28 | |
eric256 | so its start and end...instead of length | 20:30 | |
ash_ | in the negative case yeah | 20:31 | |
20:32
plainhao left
|
|||
eric256 | okay thats annoying. lol | 20:33 | |
20:33
kst left,
kst joined
|
|||
ash_ | if your doing positional offsets you can always just convert your string to a list of chars and work that way | 20:35 | |
rakudo: say ("hello world".split(*))[3..6]; | |||
p6eval | rakudo 3867ff: lo w | ||
ash_ | or you can always augment Str if you want to add your own str methods | 20:36 | |
20:38
Chillance joined
20:39
IllvilJa joined
20:42
clintongormley left
20:44
KyleHa left
|
|||
eric256 | so if the second argument is negative then we are assuming it is positional and if positive then it is length? and this isn't scary to anyone but me? | 20:45 | |
lol | |||
20:48
slavik joined,
KyleHa joined
|
|||
TimToady | negative cases should be done with *-$n now | 20:49 | |
eric256 | *-$n....i have no idea what that means | 20:50 | |
TimToady | *-1 really means { $_ - 1 } | ||
so you recognize a closure (actually, type WhateverCode), and call it with whatever the base number is, like the length | 20:51 | ||
same as @foo[*-1] gets the last element now | |||
then there are no accidental discontinuities | 20:52 | ||
and you just fail on a negative offset or length | |||
frettled | There should be a unicode character for *-1 :D | 20:53 | |
TimToady | but it probably needs some speccing | ||
but in general p6 shouldn't be using magical negatives like p5 does | |||
mberends | for consistency, is *+1 meaning { $_ + 1 } also valid ? | 20:54 | |
TimToady | certainly | ||
mberends | :) nice | ||
TimToady | rakudo: say (*+1)(2) | ||
p6eval | rakudo 3867ff: 3 | ||
20:54
cognominal joined
|
|||
TimToady | the point is to avoid discontinuities in the semantics of a continuous number line | 20:55 | |
whatevers are just a means to that end | 20:56 | ||
ash_ | rakudo: class Str is also { method postcircumfix:<[ ]> (*@slice) { say 't'; self.split(*)[1]; } }; my $str = "Hello"; say $str[1]; | ||
p6eval | rakudo 3867ff: ttttttttt | ||
ash_ | why does that turn into a recursive call? | 20:57 | |
frettled | @foo[*-1] could be @foo[Ω] :D | ||
TimToady | you defined [] in terms of [] | ||
20:57
lichtkind joined
|
|||
ash_ | but self.split(*) returns a list | 20:58 | |
so shouldn't it resolve to the list poscircumfix:<[ ]> ? | |||
20:58
bluescreen left
|
|||
TimToady | what the heck does .split(*) do? | 20:59 | |
ash_ | splits the string into a list of it characters | ||
"hi" = ('h', 'i') | |||
TimToady | first I've heard of that | ||
you should use .comb | |||
frettled | hmm. | 21:00 | |
ash_ | well more properly "hi".split(*) ~~ ('h', 'i') | ||
hmm | |||
k, i'll try comb | |||
frettled | rakudo: my Ω = *-1; # *twitch* | ||
p6eval | rakudo 3867ff: Malformed declaration at line 2, near "\u03a9 = *-1; #"in Main (file <unknown>, line <unknown>) | ||
frettled | phew | ||
arnsholt | rakudo: my $Ω = *-1; | 21:01 | |
p6eval | rakudo 3867ff: ( no output ) | ||
frettled | Oh, I managed to drop the sigil? Yay. | ||
TimToady | the first arg to split is the pattern to split on, anyway, and * is not a regex pattern | ||
frettled | arnsholt: that does it, no blogging for me tonight :D | ||
TimToady | std: my Ω = *-1; # *twitch* | 21:02 | |
p6eval | std 29471: ===SORRY!===Malformed my at /tmp/eljmYE4GqU line 1:------> my ⏏Ω = *-1; # *twitch* expecting any of: scoped declarator typenameFAILED 00:01 107m | ||
TimToady | std: constant Ω = *-1; # *twitch* | ||
p6eval | std 29471: ok 00:01 105m | ||
sjohnson | TimToady: plz2comment on my question? | 21:03 | |
21:03
bryan[c1] joined
|
|||
TimToady | s:g($global):i($insenstive)/// | 21:04 | |
sjohnson | thank you! | 21:05 | |
21:06
bluescreen joined
|
|||
frettled | TimToady: ah! | 21:07 | |
I'll pretend to be a genious somewhere else, then. | |||
rakudo: constant Ω = *-1; | |||
p6eval | rakudo 3867ff: ( no output ) | ||
frettled | woot. | ||
rakudo: constant Ω = *-1; my @l = <a b c d>; say @l[Ω]; | 21:08 | ||
p6eval | rakudo 3867ff: d | ||
frettled | \o/ | ||
TimToady | frettled++ | ||
rakudo: constant Ω = *-1; my @l = <a b c d>; say @l[-Ω]; | 21:09 | ||
p6eval | rakudo 3867ff: Use of uninitialized value | ||
TimToady | rakudo: constant Ω = *-1; my @l = <a b c d>; say @l[Ω-1]; | 21:10 | |
p6eval | rakudo 3867ff: c | ||
frettled | -Ω shouldn't really make any sense | 21:11 | |
sjohnson | cute symbol tho | 21:12 | |
TimToady | it's a horseshoe whose luck has run out | ||
ash_ | rakudo: class Str is also { method postcircumfix:<[ ]> (*@slice) { say 't'; self.comb."postcircumfix:[ ]"(@slice).join; } } my $str = "hello world"; say $str[2..8]; | 21:13 | |
p6eval | rakudo 3867ff: Confused at line 2, near "my $str = "in Main (file <unknown>, line <unknown>) | ||
ash_ | rakudo: class Str is also { method postcircumfix:<[ ]> (*@slice) { say 't'; self.comb."postcircumfix:[ ]"(@slice).join; } }; my $str = "hello world"; say $str[2..8]; | 21:14 | |
sjohnson | rakudo: my $点 = "tank"; say $点 | ||
p6eval | rakudo 3867ff: tllo wor | ||
rakudo 3867ff: tank | |||
slavik | sjohnson: rakudo handles kanji ... do we win? | 21:16 | |
TimToady | rakudo: constant 点 = "tank"; say 点; | ||
p6eval | rakudo 3867ff: tank | ||
sjohnson | i was gonna use the constant, but was afraid to try the "use" part like in p5 | ||
looks like it doesnt use the , / => either | 21:17 | ||
std: use v5; use constant MILK => 1; | |||
21:17
ruoso left
|
|||
p6eval | std 29471: Potential difficulties: Can't locate module constant at /tmp/OD5mbtNyaD line 1:------> use v5; use constant MILK => 1⏏;ok 00:01 105m | 21:17 | |
TimToady | it's completely unrelated | ||
frettled | slavik: it's even better, it handles _unicode_ rather well. :D | ||
sjohnson | much like the other p5 p6 differences :) | ||
slavik | hmm | 21:18 | |
sjohnson is hoping for the "use cute;" pragma someday | |||
frettled | rakudo: constant ⏏ = '⏏;'; say ⏏; | ||
p6eval | rakudo 3867ff: Malformed declaration at line 2, near "\u23cf = '\u23cf;\n';"in Main (file <unknown>, line <unknown>) | ||
frettled | oops, single quote-FU | ||
rakudo: constant ⏏ = "⏏;"; say ⏏; | 21:19 | ||
p6eval | rakudo 3867ff: Malformed declaration at line 2, near "\u23cf = \"\u23cf;\n\";"in Main (file <unknown>, line <unknown>) | ||
TimToady | has to be alphanumeric | ||
frettled | or was there another FU? Don't code while over-tired, folks, but only when over-tiered. | ||
TimToady: aha. | |||
TimToady: I forgot about that. | |||
sjohnson | std: use cute; | ||
p6eval | std 29471: Potential difficulties: Can't locate module cute at /tmp/4QoOLaT4mD line 1:------> use cute⏏;ok 00:01 103m | ||
TimToady | probably has to start alpha (including ideographs) | 21:20 | |
rakudo: constant 42 = 43; say 42 | |||
p6eval | rakudo 3867ff: Malformed declaration at line 2, near "42 = 43; s"in Main (file <unknown>, line <unknown>) | ||
frettled | rakudo: constant Ѡ = *-1; | 21:21 | |
p6eval | rakudo 3867ff: ( no output ) | ||
douglashunter | frettled: I didn't know that you could say "bootie" in unicode. | 21:22 | |
frettled | :D | ||
douglashunter: only in Cyrillic! | |||
sjohnson | wow, bending the rules of math with the 42 thing | ||
opens the door for some cool obfuscated code probably | |||
frettled | rakudo: constant æ = "œ"; say æ; | 21:23 | |
p6eval | rakudo 3867ff: œ | ||
TimToady | std: constant א₀ = Inf; | ||
p6eval | std 29471: ok 00:01 107m | ||
frettled | I think that ∞ should be a constant, too. | 21:24 | |
slavik | rakudo: constant пиздец = "блять"; say пиздец; | ||
p6eval | rakudo 3867ff: блять | ||
slavik | hmm, it works | 21:25 | |
TimToady | rakudo: sub term:<∞> () { return Inf }; say ∞ | ||
p6eval | rakudo 3867ff: say requires an argument at line 2, near " \u221e"in Main (file src/gen_setting.pm, line 2593) | ||
21:25
dduncan joined
|
|||
TimToady | std: sub term:<∞> () { return Inf }; say ∞ | 21:25 | |
p6eval | std 29471: ok 00:01 110m | ||
sjohnson | rakudo: say π | ||
p6eval | rakudo 3867ff: Could not find non-existent sub πin Main (file src/gen_setting.pm, line 324) | ||
frettled | perhaps it wants ∏ | 21:26 | |
;) | |||
slavik | П? | ||
sjohnson | rakudo: say ∏ | ||
p6eval | rakudo 3867ff: say requires an argument at line 2, near " \u220f"in Main (file src/gen_setting.pm, line 2593) | ||
frettled | rakudo: constant Ѡ = *-1; my @letters = 'a'..'z'; say @letters[Ѡ]; | ||
sjohnson | should they just work? or must i declare them first | ||
p6eval | rakudo 3867ff: z | ||
21:26
rachelBROWN left
|
|||
Tene | ng: constant Ѡ = *-1; my @letters = 'a'..'z'; say @letters[Ѡ]; | 21:27 | |
p6eval | ng 93fa57: Could not find non-existent sub &Ѡcurrent instr.: '_block14' pc 29 (EVAL_1:0) | ||
sjohnson | rakudo: say <pig COW mooSe>.lc | 21:29 | |
p6eval | rakudo 3867ff: pig cow moose | ||
frettled | rakudo: say pi; | ||
p6eval | rakudo 3867ff: 3.14159265358979 | ||
frettled | rakudo: constant π = pi; say π; | ||
TimToady | rakudo: say pi.WHAT | ||
p6eval | rakudo 3867ff: 3.14159265358979 | ||
rakudo 3867ff: Num() | |||
sjohnson | ahh thats a good way to get it | 21:30 | |
doing that increases the cuteness factor of simple circle code | |||
TimToady | perl6: say pi | 21:31 | |
p6eval | pugs: 3.141592653589793 | ||
..rakudo 3867ff: 3.14159265358979 | |||
..elf 29471: Undefined subroutine &GLOBAL::pi called at (eval 123) line 3. at ./elf_h line 5881 | |||
TimToady | pugs: say pi.WHAT | 21:32 | |
p6eval | pugs: Rat | ||
TimToady | pugs++ | ||
frettled | But that's just wrong! Pi is irrational! :D | 21:33 | |
TimToady | but pugs is telling the truth, unlike rakudo, which is lying :) | 21:34 | |
frettled | pugs is telling a false truth, while Rakudo is telling a true lie. | 21:35 | |
Is pi represented as a Num in Rakudo, or is it _really_ lying about itself? | |||
ng: say pi.WHAT | 21:36 | ||
TimToady | I'm sure it's represented as a Num, but the name "Num" is kinda lying | ||
p6eval | ng 93fa57: Could not find non-existent sub &picurrent instr.: '_block14' pc 29 (EVAL_1:0) | ||
frettled | aha | ||
TimToady | in CORE.setting we have: constant pi is export = 3.14159_26535_89793_238; # 46_26433_83279_50288; | ||
sjohnson | TimToady: you ever watch those guys like daniel temmett recipe Pi to a few thousand digits? | ||
TimToady | because that's what fits into a Rat64 | ||
sjohnson | it's pretty amazing | ||
recite* | |||
frettled | sjohnson: there's a recipe for that ;) | 21:37 | |
sjohnson | oops Tammet | ||
:) | |||
TimToady | hey, no swearing | ||
sjohnson | ... 22,514 digits in five hours and nine minutes | ||
i could probably recite it to about 9 digits after 5 hours of memorization | |||
TimToady | bbl & | 21:39 | |
frettled | There, blogified. | ||
sjohnson | & remembering pi digits :) | ||
frettled | TimToady++ for (once again) providing a solution to my blogging problem. | 21:40 | |
21:40
meppl left,
nihiliad left,
nihiliad joined
|
|||
frettled | Hmm, 42 Iron Man blog entries in 2009. Coincidence? I think not! :D | 21:40 | |
arnsholt | There was talk of some kind of workshop in Copenhagen a while back. Anything more come out of that? | 21:42 | |
sjohnson | frettled: :) | ||
21:44
kst left,
kst joined
21:53
FCO left
21:56
orafu left,
orafu joined
|
|||
sjohnson | frettled: is there a way to do a Super of $_ vars? | 22:05 | |
like, from the parent block? | |||
ash_ | $OUTER::_ or OUTER::<$_> | 22:08 | |
sjohnson | is this doable in p5? or new to p6 | ||
ash_ | thats how its speced in perl6, see S04, i don't know about perl 5 | 22:09 | |
sjohnson | ash_: how did you become so accustomed to the specs? | 22:10 | |
did you just read em one by one? or do you kinda know the cool features and which ones they're from by picking it up along the way | |||
ash_ | i have read them a few times and have to keep looking stuff up in them | 22:11 | |
mostly i try stuff, and when i find something that doesn't work, i find 'the right way' to do it by reading the specs or asking here | |||
sjohnson | cool | ||
i also like knowing the right way | |||
in case i do something drastic a few years down the road from a bad assumption | 22:12 | ||
ash_ | most of the time i try to do something, can't figure it out myself, then check the specs and learn something new, then someone asks about it later | 22:13 | |
22:13
slavik left
22:17
vorner joined
22:18
Guest16754 left
22:21
kst left,
kst joined
22:22
bluescreen left
22:26
iblechbot left,
bryan[c1] left,
slavik joined
22:27
mberends left
22:30
slavik left,
slavik joined
|
|||
sjohnson | rakudo: my $num; for (1..10) { $num += 0.1; }; if ($num == 1) { say "true"; } else { say "$num != 1"; } | 22:32 | |
p6eval | rakudo 3867ff: 1 != 1 | ||
22:32
Su-Shee left
|
|||
ash_ | thats odd sjohnson i am guessing its a number rounding problem | 22:37 | |
22:38
astrojp left
|
|||
frettled | rakudo: my $num; for (1..10) { $num += 0.1; }; if ($num == 1) { say "true"; } else { say "$num != 1"; } | 22:39 | |
p6eval | rakudo 3867ff: 1 != 1 | ||
frettled | arghle, copy+paste-FU | ||
rakudo: my $num; for (1..10) { $num += 0.1; }; if ($num == 1) { say "true"; } else { say "$num != 1"; say $num.WHAT } | |||
p6eval | rakudo 3867ff: 1 != 1Num() | ||
22:39
astrojp joined
|
|||
frettled | rakudo: my $num; for (1..10) { $num += 0.1; }; if ($num == 1) { say "true"; } else { say "$num != 1"; say $num.WHAT; say 1.WHAT; } | 22:39 | |
p6eval | rakudo 3867ff: 1 != 1Num()Int() | ||
ash_ | rakudo: my $num; for (1..10) { $num += 1; }; if ($num/10 == 1) { say "true"; } else { say "$num != 1"; say $num.WHAT } | ||
p6eval | rakudo 3867ff: true | ||
ash_ | its a rounding issue | 22:40 | |
.1 + .1 ... is .99999999999 internally, which isn't == 1 | |||
i thought they made rakudo keep all Num's as rationals internally though, which should avoid this problem | |||
frettled | rakudo: my $num; for (1..10) { $num += 1; }; if ($num/10 == 1) { say "true"; say ($num/10).WHAT; } else { say "$num != 1"; say $num.WHAT; say 1.WHAT; } | 22:41 | |
p6eval | rakudo 3867ff: trueRat() | ||
frettled | rakudo: my $num; for (1..10) { $num += 1; }; if ($num/10.0 == 1) { say "true"; say ($num/10).WHAT; } else { say "$num != 1"; say $num.WHAT; say 1.WHAT; } | ||
p6eval | rakudo 3867ff: trueRat() | ||
frettled | rakudo: my $num; for (1..10) { $num += 1/10; }; if ($num == 1) { say "true"; } else { say "$num != 1"; say $num.WHAT } | 22:42 | |
p6eval | rakudo 3867ff: true | ||
22:43
bryan[c1] joined
|
|||
frettled | IOW: mind how you do decimal math | 22:43 | |
22:43
slavik1 joined
|
|||
frettled | This is (perhaps) easier to grok for those of us who have had to work with float vs. int in other settings. :) | 22:44 | |
22:48
cognominal left
|
|||
frettled | rakudo: my $num; for (1..10) { $num += 0.1; }; if (round($num) == 1) { say "true"; } else { say "$num != 1" } | 22:48 | |
p6eval | rakudo 3867ff: true | ||
ash_ | this is a bad thing but: | 22:50 | |
rakudo: my $num; for (1..10) { $num += 0.1; }; if $num eq 1 { say "true"; } else { say "$num != 1" } | 22:51 | ||
p6eval | rakudo 3867ff: true | ||
ash_ | yea... that stringifies the values | ||
and compares them | |||
rakudo: my $num; for (1..10) { $num += 0.1; }; if $num cmp 1 { say "true"; } else { say "$num != 1" } | 22:54 | ||
22:54
racetam joined
|
|||
p6eval | rakudo 3867ff: true | 22:54 | |
ash_ | cmp also seems to get this one right | ||
although i am not really that familiar with cmp | 22:55 | ||
22:56
slavik left
|
|||
sjohnson | ash_: it's a classic binary problem | 23:01 | |
ahh i see u have figured it out :) | 23:02 | ||
best way is to use a rat obj imo | |||
1/10 | |||
23:02
BcaT joined
23:04
rgrau` joined
23:05
cognominal joined,
vorner left
23:09
KyleHa left
23:11
eric256 left
23:16
bryan[c1] left
|
|||
colomon | rakudo: say (10 cmp 1) | 23:17 | |
p6eval | rakudo 3867ff: 1 | ||
colomon | rakudo: say (1 cmp 10) | ||
p6eval | rakudo 3867ff: -1 | ||
23:17
fridim_ left
|
|||
ash_ | ah, its a -1, 0, 1 comparision | 23:17 | |
rakudo: say 10 leg 1; | |||
p6eval | rakudo 3867ff: 1 | 23:18 | |
ash_ | rakudo: say 1 leg 10; | ||
p6eval | rakudo 3867ff: -1 | ||
ash_ | whats the difference between leg and cmp ? | ||
dduncan | leg is string-specific, I think | ||
cmp is generic | |||
leg will cast its arguments as strings | 23:19 | ||
ash_ | ah, how can you tell if a string is 'greater than' another string? | ||
dduncan | eg, "$foo leg $bar" means "~$foo cmp ~$bar" I think | ||
ash_, how does one normally sort strings? its done that way | 23:20 | ||
if you mean that you want it to be affected by a collation then I don't know | |||
if $foo and $bar are already strings, then cmp and leg should have the same semantics | 23:21 | ||
but if say $foo and $bar are numbers, then cmp will do a num sort while leg will do a sort of their stringifications | |||
23:23
jan___ left
23:26
slavik joined
|
|||
sjohnson | ash_: gt | 23:29 | |
== greater than for strings | |||
> is for numeric | |||
23:31
jan_ joined
23:38
slavik1 left
|
|||
sjohnson | gt and lt | 23:42 | |
23:42
rachelBROWN joined,
racetam left
|
|||
ash_ | i gotta head home, cya | 23:48 | |
dduncan | oh, gt, that's what you were asking about | 23:55 | |
my bad | |||
23:58
PacoLinux left,
colomon left,
Khisanth left,
Khisanth joined
|