»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! Set by moritz on 22 December 2015. |
|||
kalkin-_ | ohh nevermind | 00:00 | |
skids | kalkin-_: maybe you are just looking for a dynamically scoped variable? | ||
kalkin-_ | skids: you mean $*FOO? | 00:01 | |
skids | right. Does not have to be uppercase. uppercase is usually for builtin stuff. | ||
00:05
pierre_ joined
00:07
IRCBot1465147004 left
00:09
kurahaupo left
00:12
dalek joined,
ChanServ sets mode: +v dalek
00:17
kurahaupo joined
00:20
kid51 left
00:22
kid51 joined
00:23
gorgonzola left
00:29
kurahaupo left
00:30
labster joined
00:34
raiph joined
00:37
mr-foobar joined,
retupmoca joined
00:38
Herby__ joined
|
|||
Herby__ | Evening, everyone! | 00:38 | |
emdashcomma | Hi__ | 00:39 | |
Herby__ | o/ | ||
00:41
kurahaupo joined
00:42
bisectable left,
bisectable joined
00:44
kurahaupo left,
Zoffix joined
|
|||
AlexDaniel | .tell Zoffix try your .wut snippet again. I thought that only I would throw in a code that produces non-zero exit code on a good commit, but since you've done it too I decided to cover it as well | 00:44 | |
yoleaux | AlexDaniel: I'll pass your message to Zoffix. | ||
Zoffix | Any idea why this program works with `echo` but not with `perl`, even though if I start the perl script alone it produces output? gist.github.com/zoffixznet/0ec1c2f...a7804d4103 | 00:45 | |
yoleaux | 00:44Z <AlexDaniel> Zoffix: try your .wut snippet again. I thought that only I would throw in a code that produces non-zero exit code on a good commit, but since you've done it too I decided to cover it as well | ||
AlexDaniel | mmm… | ||
yoleaux: great job! | |||
Zoffix | AlexDaniel, no idea what .wut snippet you're talking about | ||
AlexDaniel | bisect: class A { has $.wut = [] }; my $a = A.new; $a.wut = [1,2,3]; $a.wut.say | ||
bisectable | AlexDaniel: exit code on a “good” revision is 1 (which is bad), bisecting with inverted logic | ||
AlexDaniel: (2016-03-02) github.com/rakudo/rakudo/commit/fdd37a9 | |||
Zoffix | It wasn't mine. Don't care about :/ | 00:46 | |
retupmoca | .botsnack | ||
synopsebot6 | om nom nom | ||
yoleaux | :D | ||
Zoffix | Pissed off that I'm constantly fighting with things that aren't primary code writing. Like this proc stuff | ||
AlexDaniel | bisect: for ‘q b c d’.words -> $a, $b { } | ||
bisectable | AlexDaniel: exit code on a “good” revision is 1 (which is bad), bisecting with inverted logic | ||
AlexDaniel: (2016-03-01) github.com/rakudo/rakudo/commit/1b6c901 | |||
AlexDaniel | but look how great it is now! | 00:47 | |
Zoffix | The docs don't say how the .tap'ed stdout is chunked. Is it by new lines? Does it buffer and waits? *sigh* | ||
00:49
Herby__ left
|
|||
AlexDaniel | Zoffix: it may be the buffering in 01-basic.pl itself | 00:49 | |
Zoffix | It prints fine when I run it from command line. | 00:50 | |
I tried now with a small perl script that prints a few lines and sleeps and I'm getting nothing from the tap | |||
AlexDaniel | Zoffix: what if you run it piped to | cat ? | ||
geekosaur | remember that programs buffer output not to terminals, usually in 4k or 8k chunks | ||
on linux you can use stdbuf to defeat this | 00:51 | ||
AlexDaniel | or just turn on autoflush | ||
in 01-basic.pl | |||
geekosaur | oh, yeh, probably doesn't defeat perl's since it's doing its own buffering (p5 via the perlio stuff, rakudo via libuv) | 00:52 | |
whereas stdbuf uses a backchannel into glibc's buffering code | |||
AlexDaniel | somehow all buffering problems I experienced were associated with perl5… hmm… | 00:53 | |
sometimes it feels like it is overdoing it | |||
Zoffix | AlexDaniel++ thanks, adding $|++ fixed it | 00:54 | |
Perl5-- | |||
AlexDaniel | a bunch of code is not commited… :P gonna get some sleep | 00:58 | |
01:05
AlexDaniel left
01:09
ssotka left
01:11
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
BenGoldberg | m: say &x | 01:13 | |
camelia | rakudo-moar 85682a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/hwvFiF6jOtUndeclared routine: x used at line 1» | ||
BenGoldberg supposes that the x operator is a syntactically wossname, not a subroutine. | 01:14 | ||
m: (say 2) xx 1; | |||
camelia | rakudo-moar 85682a: OUTPUT«2» | 01:15 | |
BenGoldberg | m: (say 2) xx 0; | ||
camelia | ( no output ) | ||
geekosaur | m: say &infix:<xx> | ||
camelia | rakudo-moar 85682a: OUTPUT«sub infix:<xx> (Mu $, $, *%) { #`(Sub+{Precedence}|43087568) ... }» | ||
01:15
finanalyst joined
|
|||
BenGoldberg | m: sub postfix:<twice> (Mu $lhs) { lhs xx 2 }; (say 'a') twice; | 01:17 | |
camelia | rakudo-moar 85682a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/IpmyXCbgE8Two terms in a rowat /tmp/IpmyXCbgE8:1------> 3twice> (Mu $lhs) { lhs xx 2 }; (say 'a')7⏏5 twice; expecting any of: infix infix stopper statement end…» | ||
BenGoldberg | m: sub postfix:<twice> (Mu $lhs) { $lhs xx 2 }; (say 'a') twice; | ||
camelia | rakudo-moar 85682a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/4fVDA6M5WMTwo terms in a rowat /tmp/4fVDA6M5WM:1------> 3wice> (Mu $lhs) { $lhs xx 2 }; (say 'a')7⏏5 twice; expecting any of: infix infix stopper statement end…» | ||
geekosaur | m: sub postfix:<twice> (Mu $lhs) { $lhs xx 2 }; (say 'a')twice; | ||
camelia | rakudo-moar 85682a: OUTPUT«a» | ||
geekosaur | m: sub postfix:<twice> (Mu $lhs) { $lhs xx 2 }; (say 'a')\ twice; | ||
camelia | rakudo-moar 85682a: OUTPUT«a» | ||
geekosaur | it's a bit peculiar that way | 01:18 | |
Zoffix | You're not using the result of of `say` | ||
BenGoldberg | Ok, but now how do I make it actually run it's argument twice, the way xx does? | ||
Zoffix | It doesn't | 01:19 | |
timotimo | not possible without a slang (or macros) at the moment, as far as i know | ||
Zoffix | m: (say 42) xx 1; | ||
camelia | rakudo-moar 85682a: OUTPUT«42» | ||
Zoffix | m: (say 42) xx 2; | ||
camelia | rakudo-moar 85682a: OUTPUT«4242» | ||
Zoffix | never miknd | ||
geekosaur | xx likely gets to cheat. user subs don't get to do that, they always receive something already evaluated | 01:20 | |
BenGoldberg | m: macro postfix:<twice> (Mu $lhs) { quasi { {{{ $lhs }}} x 2 } }; (say 'a')twice; | ||
camelia | rakudo-moar 85682a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/sVLyzPmmGUUse of macros is experimental; please 'use experimental :macros'at /tmp/sVLyzPmmGU:1------> 3macro7⏏5 postfix:<twice> (Mu $lhs) { quasi { {{{» | ||
gfldex | is infix:<xx> meant to be eager? | 01:21 | |
BenGoldberg | m: use experimental :macros; macro postfix:<twice> (Mu $lhs) { quasi { {{{ $lhs }}} x 2 } }; (say 'a')twice; | ||
camelia | rakudo-moar 85682a: OUTPUT«Weird node visited: QAST::BVala» | ||
BenGoldberg | m: use experimental :macros; macro postfix:<twice> (Mu $lhs) { quasi { {{{ $lhs }}} xx 2 } }; (say 'a')twice; | ||
camelia | rakudo-moar 85682a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/mtWb0FEkTAUnknown QAST node type QAST::Unquoteat /tmp/mtWb0FEkTA:1» | ||
gfldex | m: my @a := (say 42) xx 2; dd @a; | ||
camelia | rakudo-moar 85682a: OUTPUT«4242(Bool::True, Bool::True)» | ||
gfldex | m: my @a := (say 42) xx 2; say 'ello'; dd @a; | 01:22 | |
camelia | rakudo-moar 85682a: OUTPUT«4242ello(Bool::True, Bool::True)» | ||
01:22
araujo__ joined,
kalkin- joined
01:25
molaf left
|
|||
BenGoldberg does not yet sufficiently grok macros. | 01:25 | ||
gfldex | neither does Rakudo :) | ||
01:25
araujo_ left
01:30
araujo_ joined
01:35
araujo__ left,
colomon left
|
|||
timotimo | that.s right | 01:35 | |
01:36
araujo__ joined
01:37
molaf joined
01:39
araujo_ left
01:43
aborazmeh left,
Actualeyes joined
01:47
ilbot3 joined,
colomon joined
01:49
colomon left
01:53
kid51 left,
FROGGS_ joined
01:56
FROGGS left
|
|||
Zoffix | Well, I'm gonna disappear for a week+. Burning out.... I do remember that I'm meant to release Rakudo on 18th and I will. So, don't worry, I remember :) | 02:16 | |
\o | |||
02:16
Zoffix left
02:23
colomon joined,
mr-foobar left
02:25
mr-foobar joined
02:26
pierre_ left
02:30
user9 joined
02:34
pierre_ joined
02:37
Zoffix joined
02:38
colomon left,
colomon joined,
noganex joined
|
|||
Zoffix | This will sound weird, but... My brain just won't shut up that my .seen message would be the wave and not the actual last message, so... | 02:38 | |
Well, I'm gonna disappear for a week+. Burning out.... I do remember that I'm meant to release Rakudo on 18th and I will. So, don't worry, I remember :) | |||
02:38
Zoffix left
02:42
gorgonzola joined,
colomon left,
colomon joined
02:49
user9 left
02:54
huggable left
03:01
gorgonzola left
03:06
finanalyst left
03:12
khw left
03:13
yqt left
03:37
TEttinger joined
03:39
khw joined
03:47
finanalyst joined
04:07
ssotka joined
04:14
xinming joined
04:22
khw left
04:25
Cabanossi joined
04:45
pierre_ left
04:48
pierre_ joined
04:51
pierre_ left
04:52
pierre_ joined
05:01
sno joined
05:02
BenGoldberg left
05:03
araujo__ left
05:09
_nadim left
05:10
_nadim joined
05:18
user9 joined
05:22
user9 left
05:43
sno left
05:52
FROGGS_ left
05:57
mr-foobar left
06:01
salv0 left
06:18
girafe joined
06:19
pierre_ left
06:24
jrusso joined,
firstdayonthejob joined,
jrusso is now known as MadcapJake
06:26
pierre_ joined
06:28
pierre_ left,
pierre_ joined
06:37
mtj_ joined
06:39
pierre_ left
06:40
firstdayonthejob left
06:41
pierre_ joined
06:48
aries_liuxueyang left
06:50
aries_liuxueyang joined
06:54
huggable joined
06:55
sno joined
06:58
RabidGravy joined
07:01
darutoko joined
|
|||
RabidGravy | BOOM! | 07:08 | |
07:11
ssotka left
07:21
pierre_ left
07:22
girafe left,
rurban joined
07:24
zakharyas joined
07:41
bjz joined
07:45
bjz left
07:49
g4 joined
07:50
rindolf joined
07:51
Humdai joined
|
|||
RabidGravy | I just have to say that among all the cool and fabulous things in Perl 6, the combination multi of dispatch and the richness of signature declaration is racing ahead as my favourite thing | 07:53 | |
s/multi of/of multi/ | |||
moritz | that is indeed a very powerful combination | 07:54 | |
and it nudges you in the direction of writing small routines | |||
07:55
bjz joined
|
|||
RabidGravy | yeah, for a long while now I have aspired to making routines with the minimum possible complexity and removing all the logic surrounding determining what the arguments are and branching accordingly to a langiage feature leaps forward into that | 07:59 | |
08:01
ocbtec joined,
user9 joined
08:08
dakkar joined
08:10
azawawi joined
|
|||
azawawi | hi | 08:10 | |
RabidGravy: github.com/azawawi/gtk-simple/blob...ar.pl6#L32 # Feedback please :) | |||
RabidGravy: github.com/azawawi/gtk-simple/blob...ox.pm6#L13 | 08:11 | ||
pasteboard.co/1tyObr6M.png # Screenshot of the above example after GTK::Simple::Box.new change | 08:12 | ||
RabidGravy | looks good matey | 08:14 | |
if it passes the tests and the rest of the examples continue to work as before then it's good to go :) | 08:15 | ||
08:16
cosimo joined
08:24
wamba joined
08:25
sdsdfsd joined
|
|||
azawawi installs homebrew on macbook pro :) | 08:25 | ||
DrForr | RabidGravy: I might have a working wiki to show @ YAPC, I did most of the heavy lifting last night. | 08:29 | |
RabidGravy | cool, WordPress replacement next ;-) | 08:31 | |
DrForr++ # making stuff | |||
DrForr | Oh, I've got *other* plans as well, they might earn a LT mention if I can get the REPL module to behave the way I want it. | ||
RabidGravy | I've been sidetracked for days trying to make something that does what SQL::Abstract does | 08:32 | |
08:33
araujo joined,
sdsdfsd left
|
|||
DrForr | I almost let myself get distracted by factoring out a MediaWiki grammar before realizing what a headache that actually was. | 08:34 | |
08:36
zakharyas left
|
|||
gregf_ | morning Perl6! | 08:37 | |
DrForr | Mornin'. | ||
08:38
zakharyas joined
|
|||
RabidGravy | MARNIN | 08:39 | |
right, I'm going to use this window of fine weather opportunity to do some stuff in the garden | 08:40 | ||
literal | m: time | 08:44 | |
camelia | ( no output ) | ||
08:44
araujo_ joined
|
|||
literal | m: say time | 08:44 | |
camelia | rakudo-moar 85682a: OUTPUT«1465202659» | ||
literal | how do I get the epoch time in milliseconds? | ||
moritz | m: say now | 08:45 | |
camelia | rakudo-moar 85682a: OUTPUT«Instant:1465202791.008717» | ||
moritz | m: say now.tai | 08:46 | |
camelia | rakudo-moar 85682a: OUTPUT«1465202818.009479» | ||
08:47
ufobat joined,
araujo left
|
|||
literal | I see | 08:51 | |
Woodi | Zoffix: gl with resting! don't worry, be truly yourself :) | 08:54 | |
ufobat | morning :) | ||
Woodi | hallo :) | 08:56 | |
08:59
azawawi left,
araujo_ left
|
|||
arnsholt | DrForr: IIRC, MediaWiki's language is implemented as a cascade of regex search-replace routines, which results a context-*sensitive* language | 09:12 | |
So implementing a grammar for it is likely quite hard | 09:13 | ||
09:13
finanalyst left
|
|||
arnsholt | Besides, you want MarkDown ;) | 09:13 | |
09:13
xinming left,
iH2O joined
09:14
xinming joined
|
|||
dogbert17 | o/ #perl6 | 09:16 | |
iH2O | hi Dagobert | ||
dogbert17 | ashello iH20 | ||
s/ashello/hello/ | |||
iH2O | is the final / really needed? | 09:17 | |
dogbert17 | iH20, I always put it there for some reason :) | 09:18 | |
jast | in perl? yes. in sed? yes. in IRC? depends on who is parsing your expression ;) | ||
dogbert17 | :) | ||
does anyone have a minute to review my attempt to document List.categorize at gist.github.com/dogbert17/c0b286f9...f431f22d30 ? | 09:20 | ||
arnsholt | It's optional in vi, as long as you don't need any modifiers =) | ||
09:21
bjz_ joined
09:22
bjz left
|
|||
jast | dogbert17: I found the first paragraph a little hard to follow, here's my attempt to simplify: gist.github.com/jast/45e6533056692...a0e83b62df | 09:30 | |
might be a matter of taste, I don't know | 09:31 | ||
dogbert17 | jast: I like it an will change :) | ||
*and | |||
running it through htmlify.p6 atm | 09:32 | ||
09:39
rindolf left
09:44
g4 left
|
|||
dalek | c: 0937200 | (Jan-Olof Hendig)++ | doc/Type/List.pod: Added docs for List.categorize. jast++ for making the text easier to understand |
09:45 | |
09:46
rindolf joined
09:48
iH2O left
10:11
Hor|zon joined
10:23
kaare_ joined
10:25
labster left
10:27
jack_rabbit joined,
kid51 joined
10:45
mr-foobar joined
10:46
DHAD05 joined,
DHAD05 left
10:47
TEttinger left
10:50
araujo joined
10:54
huggable left,
huggable joined
|
|||
literal | m: say "abc".split("", :skip-empty) | 11:11 | |
camelia | rakudo-moar c4b3fa: OUTPUT«(a b c)» | ||
literal | is there a shorter way of splitting a string into characters? | ||
lizmat | m: dd "abc".comb | 11:12 | |
camelia | rakudo-moar c4b3fa: OUTPUT«("a", "b", "c").Seq» | ||
literal | ah, nice | 11:13 | |
lizmat | literal: in Perl 6, you usually want to use comb instead of split | ||
literal | alright | 11:14 | |
11:22
rurban1 joined
11:29
rurban left
|
|||
jast | I used comb in one of my very first Perl 6 programs: say [Z](Q%`sd`Kbmsotj7!nrd!Quusidi!%.comb.map({chr(ord($_)+^1)}).rotor(5)).reverse>>.join.join | 11:31 | |
11:31
rurban joined
|
|||
moritz | m: say [Z](Q%`sd`Kbmsotj7!nrd!Quusidi!%.comb.map({chr(ord($_)+^1)}).rotor(5)).reverse>>.join.join | 11:32 | |
camelia | rakudo-moar a64607: OUTPUT«Just another Perl6 hacker» | ||
moritz | starting with an obfu, you fit right in here :-) | 11:33 | |
jast | I wanted to play with the fancy operators as soon as possible :} | ||
moritz | m: say [Z](Q%`sd`Kbmsotj7!nrd!Quusidi!%.comb.map({chr(ord($_)+^1)}).rotor(5)).reverse>>.join.join | ||
camelia | rakudo-moar a64607: OUTPUT«Just another Perl6 hacker» | ||
moritz | m: say [Z](Q%`sd`Kbmsotj7!nrd!Quusidi!%.comb.map({chr(.ord+^1)}).rotor(5)).reverse>>.join.join | ||
camelia | rakudo-moar a64607: OUTPUT«Just another Perl6 hacker» | ||
moritz | m: say [Z](Q%`sd`Kbmsotj7!nrd!Quusidi!%.comb.map((*.ord+^1).chr).rotor(5)).reverse>>.join.join | 11:34 | |
camelia | rakudo-moar a64607: OUTPUT«Just another Perl6 hacker» | ||
jast | dang :) | ||
moritz | m: say [Z](Q%`sd`Kbmsotj7!nrd!Quusidi!%.comb.map((*.ord+^1).chr).rotor(5)).reverse.flat.join | ||
camelia | rakudo-moar a64607: OUTPUT«Just another Perl6 hacker» | ||
moritz | m: say [Z](Q%`sd`Kbmsotj7!nrd!Quusidi!%.ords.map((*+^1).chr).rotor(5)).reverse.flat.join | 11:35 | |
camelia | rakudo-moar a64607: OUTPUT«Just another Perl6 hacker» | ||
jast | no fair, I didn't know about that function ;) | ||
moritz | jast: it's not meant as competition, just as playing (and potentially education) | ||
jast | (btw I used Q% instead of ' because it looks stranger, even though it's slightly longer) | 11:36 | |
yeah, sure, it's all good, clean fun :) | |||
moritz | m: say [Z](<`sd`Kbmsotj7!nrd!Quusidi!>.ords.map((*+^1).chr).rotor(5)).reverse.flat.join | 11:37 | |
camelia | rakudo-moar a64607: OUTPUT«Just another Perl6 hacker» | ||
moritz | 'nother option | ||
jast | right. I still prefer Q%...% because fewer people would think of it as matching pairs | ||
obfuscation is applied psychology, right? :) | 11:38 | ||
moritz | aye | 11:40 | |
I've never been good at that :-) | |||
11:41
kid51 left
11:48
dontaki joined
11:53
samb1 joined
11:54
rurban1 left,
rurban1 joined,
cessna joined
12:01
rurban1 left
12:02
dontaki left
12:08
zakharyas left
|
|||
gregf_ | m: ("!".ord-1).chr | 12:11 | |
camelia | ( no output ) | ||
gregf_ | m: ("`".ord-1).chr | 12:12 | |
camelia | ( no output ) | ||
gregf_ | m: say ("`".ord-1).chr | ||
camelia | rakudo-moar a64607: OUTPUT«_» | ||
dogbert17 | m: my $i = 1; say ($i %% 2 ?? "even" !! "odd", "prime" if $i.is-prime) # stupid question, why doesn't this return a one element list? | 12:13 | |
camelia | rakudo-moar a64607: OUTPUT«()» | ||
gregf_ | that post if messes things up i guess | 12:17 | |
or rather, gets the parser confused :| | |||
m: my $i = 1; say $i.is-prime *smiles* | 12:19 | ||
camelia | rakudo-moar a64607: OUTPUT«5===SORRY!5=== Error while compiling /tmp/3MLiAeGcOWMissing required term after infixat /tmp/3MLiAeGcOW:1------> 3my $i = 1; say $i.is-prime *smiles*7⏏5<EOL> expecting any of: prefix term» | ||
gregf_ | m: my $i = 1; say $i.is-prime #*smiles* | ||
camelia | rakudo-moar a64607: OUTPUT«False» | ||
psch | m: my $i = 1; say ($i %% 2 ?? "even" !! "odd", ("prime" if $i.is-prime)) # | ||
camelia | rakudo-moar a64607: OUTPUT«(odd)» | ||
psch | m: my $i = 3; say ($i %% 2 ?? "even" !! "odd", ("prime" if $i.is-prime)) # | ||
camelia | rakudo-moar a64607: OUTPUT«(odd prime)» | ||
gregf_ | m: (^10).map(*.is-prime.say) | 12:20 | |
camelia | rakudo-moar a64607: OUTPUT«FalseFalseTrueTrueFalseTrueFalseTrueFalseFalse» | ||
dogbert17 | psch: and why does that work? | ||
psch | dogbert17: parenthesis change precedence | ||
dogbert17: statement_mod if modifies the whole statement | |||
dogbert17 | so gregf_ was right the post if messes things up | ||
psch | dogbert17: infix:<,> is part of that statement | ||
dogbert17: it doesn't "mess anything up", it does exactly what it's suppose to do :) | |||
gregf_ | dogbert17: no, prime says 1 is not a prime. my $i = 3; say ($i %% 2 ?? "even" !! "odd", "prime" if $i.is-prime) # run this | 12:21 | |
dogbert17 | psch: ah, thanks for the explanation, it sure messed with my brain :) | 12:22 | |
psch | m: my $i = 1; say (do if $i.is-prime { $i %% 2 ?? "even" !! "odd", "prime" }) # without parens, it's equivalent to this | 12:23 | |
camelia | rakudo-moar a64607: OUTPUT«()» | ||
psch | m: my $i = 1; say ($i %% 2 ?? "even" !! "odd", do if $i.is-prime { "prime" }) # with parens, it's equivalent to this | ||
camelia | rakudo-moar a64607: OUTPUT«(odd)» | ||
dogbert17 | psch: that definitely makes things clearer | 12:24 | |
gregf_: indeed this 'odd' problem showed itself when is-prime returned false | |||
12:25
perlpilot joined
|
|||
dogbert17 | psch: do you remember discussing an async bug a few days ago, an example running 'hexdump'? | 12:25 | |
pscg: and a missing error message | 12:26 | ||
psch | dogbert17: i remember talking about it, yeah. not sure what - if any - came of it though | ||
dogbert17 | psch: nothing came of it, should we report it, perhaps it interests jnthn? | ||
psch | ...i thought that was already ticketed? | 12:27 | |
dogbert17 | psch: not by me, but perhaps it had been reported earlier | ||
psch | in any case, yes, if there is no ticket there definitely should be | 12:28 | |
dogbert17 | psch: how would I search for it in RT | ||
psch | dogbert17: i usually use google, with "site:rt.perl.org" and well, keywords i hope that match :) | 12:29 | |
the rt search isn't bad, but a bit unwieldy | 12:30 | ||
dogbert17 | psch: thx, I should have figured that out myself :( | ||
12:32
rindolf left
|
|||
dogbert17 | can't find anything on RT so either it isn't there or my keyword(s) were bad | 12:33 | |
12:35
Possum joined
12:39
sammers left
|
|||
dogbert17 | ok, I'll try to rakudobug it then | 12:39 | |
12:47
sufrostico joined
12:54
brrt joined,
Sgeo_ left
12:56
zakharyas joined
13:09
Emeric joined
13:10
yqt joined
13:16
rurban2 joined,
azawawi joined
|
|||
azawawi | hi | 13:16 | |
masak | \o | 13:18 | |
brrt | good hi masak azawawi | ||
masak | hìíìí | 13:19 | |
azawawi | github.com/perl6/gtk-simple/pull/46 | ||
مرحبا # hi in Arabic :) | 13:20 | ||
masak | irssi shows it all backward :) | 13:23 | |
masak .oO( íìíìh ) | |||
azawawi | m: say "مرحبا".reverse; | 13:24 | |
camelia | rakudo-moar a64607: OUTPUT«(مرحبا)» | ||
psch | looks the same in irssi as on the clog for me | ||
...and reverse *still* looks the same | |||
masak | m: say "مرحبا".flip | 13:27 | |
camelia | rakudo-moar a64607: OUTPUT«ابحرم» | ||
azawawi | i was searching for that .flip :) | ||
masak | :) | ||
psch | i find it really hard to tell where one letter begins and another ends | 13:28 | |
masak .oO( always useful to be flippant on channel ) | |||
psch | but i suppose that'd be the same for cursive for anyone who never learned the latin alphabet | ||
masak | psch: that's how you know you're not seeing it reversed ;) | ||
psch | masak: well, it's both - flipped and non-flipped - that look very... connected, for lack of a better word :) | 13:29 | |
azawawi | if you need to specify unconnected arabic letters, you can use en.wikipedia.org/wiki/Arabic_Prese...on_Forms-B btw | 13:30 | |
13:30
cdg joined
|
|||
azawawi | connected = line on the left/right | 13:30 | |
en.wikipedia.org/wiki/Arabic_script_in_Unicode # to be exact all blocks | 13:31 | ||
13:31
skids joined
13:36
rurban left,
stevieb joined
|
|||
azawawi | pasteboard.co/1tUpg8C8.png # GTK::Scintilla Editor Demo :) | 13:42 | |
azawawi starts wrapping developer.gnome.org/gtk3/stable/Gt...utton.html | |||
13:44
brrt left
13:45
brrt joined
|
|||
dalek | osystem: f923b67 | titsuki++ | META.list: Add Algorithm::NaiveBayes to ecosystem See github.com/titsuki/p6-Algorithm-NaiveBayes |
13:55 | |
osystem: 03ddc2c | titsuki++ | META.list: Merge pull request #216 from titsuki/add-naive Add Algorithm::NaiveBayes to ecosystem |
|||
13:59
girafe joined
|
|||
azawawi | any feedback on github.com/perl6/gtk-simple/pull/46 ? | 14:01 | |
timotimo | doesn't look bad at first glance | 14:06 | |
azawawi | going to merge it then since it provides the ability to do this pasteboard.co/1tUpg8C8.png :) | 14:10 | |
dalek | k-simple: 611a180 | azawawi++ | lib/GTK/Simple/Box.pm6: Introduce the idea of an array of hashes or objects to Box.new(@packees) |
14:12 | |
k-simple: f9cc80a | azawawi++ | / (2 files): Use the new Box expand attribute |
|||
timotimo | yeah | ||
k-simple: e17ffa9 | azawawi++ | / (2 files): More typing |
|||
k-simple: ea78db1 | azawawi++ | / (2 files): Merge pull request #46 from azawawi/master Expose more Box API to fine tune layout |
|||
14:17
khw joined
14:26
pullphinger joined
14:28
rindolf joined
|
|||
azawawi | github.com/perl6/gtk-simple/pull/47 # File Chooser Button :) | 14:46 | |
masak | m: my ($x1, $x2) = 5, 3; $x1 = .min, $x2 = .max given minmax $x1, $x2; say ($x1, $x2).perl | ||
camelia | rakudo-moar bf099b: OUTPUT«(3, 5)» | ||
azawawi | pasteboard.co/1tYxawu0.png # screenshot | ||
masak | is there a nicer way to do the above? | ||
14:46
AlexDaniel joined
14:47
sherwool joined
|
|||
timotimo | masak: yes! | 14:47 | |
m: my ($x1, $x2) = 5, 3; ($x1, $x2) .= sort | |||
camelia | ( no output ) | ||
arnsholt | .=sort perhaps? | ||
timotimo | m: my ($x1, $x2) = 5, 3; ($x1, $x2) .= sort; say ($x1, $x2) | ||
camelia | rakudo-moar bf099b: OUTPUT«(3 5)» | ||
arnsholt | Yeah, that =) | 14:48 | |
timotimo o/⁵o arnsholt | |||
brrt | oh, wow, that is nothing if not awesome | ||
and evil | |||
masak | ooh, .sort | ||
Juerd | .= on a list of lvalues... oh my. | 14:49 | |
brrt | indeed | ||
masak | yeah, that's magical | ||
Perl 6 is fairly alone in doing that kind of thing | |||
gregf_ | m;say 5,4,100 .=min | 14:50 | |
m: say 5,4,100 .=min | |||
camelia | rakudo-moar bf099b: OUTPUT«Cannot modify an immutable Int in block <unit> at /tmp/dZoFm_Ca7o line 1» | ||
jnthn | First class l-values are both awesome and such a PITA as an implementer I'm not sure I'd ever include them in a language I designed :P | ||
yoleaux | 5 Jun 2016 21:44Z <AlexDaniel> jnthn: Here is the ticket: rt.perl.org/Ticket/Display.html?id=128325 (gnull++) | ||
brrt | i suppose an array doesn't do that | ||
masak | gregf_: need to store it in variables first | ||
gregf_ | hmm, lists are immutable | ||
AlexDaniel | . | ||
masak | jnthn: I wonder if the same effect could be had through just-sweet-enough syntactic sugar | ||
arnsholt | I hadn't thought of doing it that way, actually | ||
jnthn | masak: Not sure :) | ||
Juerd | m: my $foo = "foo"; my $bar = "bar"; ($foo.substr-rw(1), $bar) .= sort; say $foo; say $bar | ||
camelia | rakudo-moar bf099b: OUTPUT«fbaroo» | ||
timotimo | haha | 14:51 | |
masak | m: my ($a, $b, $c) = 4, 100, 5; ($a, $b, $c) .= sort; say ($a, $b, $c).perl | ||
camelia | rakudo-moar bf099b: OUTPUT«(4, 5, 100)» | ||
brrt | m: my ($x1, $x2) = 5,3; [$x1,$x2] .= sort; say $x1, $x2; | ||
camelia | rakudo-moar bf099b: OUTPUT«53» | ||
brrt | thought as much | ||
masak | brrt: no, because the array has already de-<mumble>d the lvalues | ||
docont'd | 14:52 | ||
decont'd* | |||
Juerd | Are there any more interesting lvalue methods like substr-rw? | ||
timotimo | yeah, array is a list of scalar containers. unless you bind the originals, you'll end up with new ones | ||
Juerd: just grep the core setting for Proxy.new :) | |||
literal | m: class Foo { has $.val handles <AT-POS EXISTS-POS elems end iterator>; }; my $f = Foo.new(val => [5,6]); say $f[1], $f[*-1] | 14:53 | |
camelia | rakudo-moar bf099b: OUTPUT«65» | ||
literal | am I missing some method in 'handles', since it's getting the wrong size of the array for '*' ? | 14:54 | |
arnsholt | No, it's just that *-1 is the last but one element | ||
brrt | m: my @a = (1,2,3); @a .= sort; say @a; | ||
camelia | rakudo-moar bf099b: OUTPUT«[1 2 3]» | ||
brrt | eh... | ||
literal | m: my $f = [1,2]; say $f[1], $f[*-1] | ||
camelia | rakudo-moar bf099b: OUTPUT«22» | ||
14:54
huggable left
|
|||
literal | arnsholt: see --^ | 14:54 | |
brrt | m: my @a = (3,2,1); @a .= sort; say @a; | ||
camelia | rakudo-moar bf099b: OUTPUT«[1 2 3]» | ||
14:54
huggable joined
|
|||
brrt | m: my @a = (3,2,1); say @a.WHAT; | 14:55 | |
camelia | rakudo-moar bf099b: OUTPUT«(Array)» | ||
arnsholt | Or wait, am I confused again? Could be | ||
I thought @arr[*] was the last element | |||
brrt | m: my @a := (3,2,1); say @a.WHAT; | ||
camelia | rakudo-moar bf099b: OUTPUT«(List)» | ||
timotimo | no, @arr[*] is the last-plus-one element | 14:56 | |
arnsholt | Right, I was confused | ||
In that case it's a weird thing | 14:57 | ||
perlpilot | sounds like everyone is confused to me. | ||
m: my @foo = 1,2,3; say @foo[*]; | |||
camelia | rakudo-moar bf099b: OUTPUT«(1 2 3)» | ||
arnsholt | m: class Foo { has $.val handles *; }; my $f = Foo.new(val => [5,6]); say $f[1], $f[*-1] # I wonder | ||
camelia | rakudo-moar bf099b: OUTPUT«Index out of range. Is: 1, should be in 0..0 in block <unit> at /tmp/Qycq4lTWvE line 1Actually thrown at: in block <unit> at /tmp/Qycq4lTWvE line 1» | ||
arnsholt | Oh, no that won't work | 14:58 | |
That'll eat .new too | |||
timotimo | hehehe | 14:59 | |
moritz | and .val, for that matter | ||
psch | m: class A { has $.val handles * }; say A.new(:2val).perl | ||
camelia | rakudo-moar bf099b: OUTPUT«A.new(val => 2)» | ||
timotimo | hm, interesting. | 15:00 | |
psch | afaik it doesn't do anything currently | ||
m: say *() | |||
camelia | rakudo-moar bf099b: OUTPUT«No such method 'CALL-ME' for invocant of type 'Whatever' in block <unit> at /tmp/V6oqL2AqBL line 1» | ||
psch | $target.set_handles($thunk()); # $thunk is Whatever, in this case | ||
15:01
get_drunk joined
|
|||
literal | doc.perl6.org/language/subscripts ==> "In other words, @alphabet[*-1] becomes @alphabet[@alphabet.elems - 1]." | 15:01 | |
get_drunk | good morning smart people | ||
perlpilot | get_drunk: don't start asking too many random questions here :) | ||
literal | since "elems" is in "handles", why doesn't it work? | ||
get_drunk | that is a premature assumption | ||
psch | so i'd think that the handles call just gets Whatever-curried and not actually applied..? | 15:02 | |
literal | but it is applied. $f.elems returns the correct value | 15:03 | |
psch | m: class A { has $.val handles * }; say A.new(:2val).^attributes[0].handles | ||
camelia | rakudo-moar bf099b: OUTPUT«*» | ||
literal | psch: I wasn't using "handles *", that's just something arnsholt mentioned | ||
psch | m: class A { has $.val handles * }; say A.new(:2val).succ | 15:05 | |
camelia | rakudo-moar bf099b: OUTPUT«3» | ||
literal | m: class Foo { has $.val handles <AT-POS EXISTS-POS elems end iterator>; }; my $f = Foo.new(val => [5,6]); say "elems: {$f.elems}, second: $f[1], last: $f[*-1]" | ||
camelia | rakudo-moar bf099b: OUTPUT«elems: 2, second: 6, last: 5» | ||
15:05
ssotka joined
|
|||
literal | second and last should be the same there | 15:05 | |
llfourn | I think it's because it's [*-1] is calling SELF[^SELF.cache.elems]; | 15:07 | |
not .elems | |||
see array_slice.pm | |||
psch | m: class Foo { has $.val handles <cache AT-POS EXISTS-POS elems end iterator>; }; my $f = Foo.new(val => [5,6]); say "elems: {$f.elems}, second: $f[1], last: $f[*-1]" | 15:08 | |
camelia | rakudo-moar bf099b: OUTPUT«elems: 2, second: 6, last: 6» | ||
llfourn | or is that only for slices? | ||
psch | well, anyway, 'handles *' (and 'handles **') does a lot currently actually | ||
llfourn | nvm that's just for slicing with *, but it might be the same problem | 15:09 | |
psch | i'll blame my statements about that yesterday on being too tired to read the source properly then vOv | ||
same for my statement just now, which was informed by my insufficient reading yesterday :S | |||
llfourn | m: class Foo { has $.val handles <cache AT-POS EXISTS-POS elems end iterator>; }; my $f = Foo.new(val => [5,6]); say $f[1], $f[*-1] # yup it's because it calls .cache.elems internally | 15:11 | |
camelia | rakudo-moar bf099b: OUTPUT«66» | ||
llfourn | kinda annoying | ||
psch | it probably would be nice to have something convenient hanging around that makes delegating all Positional (or Associative, for that matter) methods to an Attribute | 15:15 | |
llfourn | I agree. | ||
psch | not sure i have a sane way to do that though - someone did something with .^methods and grep a few days back, but i don't recall the specifics | ||
llfourn | then we could have spectests to make sure that at least works | ||
that was me I think | 15:16 | ||
but it wouldn't have worked I rkn | |||
m: say ?Array.^methods.first(*.name eq "cache") | 15:17 | ||
camelia | rakudo-moar bf099b: OUTPUT«False» | ||
llfourn | m: say ?Array.^methods(:all).first(*.name eq "cache") | ||
camelia | rakudo-moar bf099b: OUTPUT«True» | ||
llfourn | maybe if you did that :S | ||
but you are starting to get into evil territory with that | |||
psch | m: say Array.^methods(:all).grep(* !(elem) Mu.^methods)>>.name # not quite it... | 15:18 | |
camelia | rakudo-moar bf099b: OUTPUT«(iterator from-iterator new is-lazy STORE reification-target shape pop shift splice name of default dynamic flat List AT-POS ASSIGN-POS BIND-POS DELETE-POS push append unshift prepend perl gist WHICH iterator STORE pick Slip perl fmt unshift item EXISTS-PO…» | ||
llfourn | I'm going to RT this because it would probably be easy to implement and would be a great feature. | ||
b2gills | perlpilot: Your last comment could easily be taken the wrong way by people new to #perl6. ( In fact it seems as if it was ) | ||
psch | well, the easiest thing i could think of is just something like Rakudo::Internals::ListOfPositionalMethods | 15:19 | |
although it'd probably be in the wrong spot in Rakudo::Internals | |||
llfourn | there should simply be a role which is a coathanger for all positionaly methods | 15:20 | |
perlpilot looks to see what his last comment was ... | |||
llfourn | then you can do handles ThatRole; | ||
psch | llfourn: i don't think that's particularly sensible, because then you'd have to stuff Iterator in there too | ||
llfourn: or you don't get cache | |||
wait, Iterable i think actually? | 15:21 | ||
perlpilot | b2gills: oh, I was just giving get_drunk a hard time because he was asking questions about P6 in #perl before he came here. | ||
llfourn | I think the implementors will have to worry about that :) | ||
what about $.a handles @; | |||
get_drunk | it was a joke b2gills | ||
about chat in another channel | |||
so it sorta seems bad but it is not in the context that it was meant in | |||
llfourn | but that probably won't be ok because handles is just a trait hmmm | 15:22 | |
psch | llfourn: as an (on and off...) implementor, i don't think compromising internal interface sanity for a feature is a good idea :) | ||
FSVO "internal" - Iterator and Iterable can be implemented outside of CORE... | |||
oh, but maybe i'm thinking bad again | |||
psch steps away from hard programming thoughts | 15:23 | ||
perlpilot | get_drunk: though ... you were strangely silent here after all that activity in #perl ... | ||
psch | it's definitely too warm for that o/ | ||
llfourn | the role would be purely superficial just there a way of tagging methods that make postcircumfixes work as intended | ||
get_drunk | i am observing | ||
llfourn | I don't know how it could make things more complex interanally? | ||
perlpilot | get_drunk: you didn't even re-try your "wildly successful" question, which might have gotten some different answers here (though I doubt it :) | 15:24 | |
get_drunk | this is my wildly cautious side | ||
i feel like I should learn both though | |||
15:25
ChanServ sets mode: +o mst
|
|||
llfourn | anyway I'll RT the general problem and this convo can be continued there if need be :) | 15:25 | |
15:26
mst sets mode: -q *!*@90-156-117-46.internetia.net.pl
|
|||
mst | whyyyyy do we have a quiet for lambdabot2 | 15:26 | |
when there's not been one in here for ... aaages | 15:27 | ||
15:27
mst sets mode: -q lambdabot2!*@*,
mst sets mode: -o mst
|
|||
mst | I'm going to assume that wasn't helping anything | 15:27 | |
perlpilot | mst: because no one has been keeping up with channel maintenance in that regard? | ||
mst | (also that first -q was buharin; apparently I did remember) | ||
dalek | k-simple: 66bf155 | azawawi++ | / (4 files): Add File Chooser Button |
||
k-simple: 063388c | azawawi++ | / (4 files): Merge pull request #47 from azawawi/master Add File Chooser Button |
|||
mst | perlpilot: I was just looking while I was there | 15:28 | |
argh, and all our bans are timed by netsplat | 15:29 | ||
b2gills | perlpilot get_drunk: Fair enough. Just trying to keep this an inclusive community, I see that it was a false positive ( or is that false negative, whatever ) | 15:32 | |
get_drunk | ok | 15:33 | |
mst | b2gills: he did ask a metric fucktonne of random questions in #perl which I think triggered the comment | ||
b2gills | At least it wasn't an Imperial fuckton | 15:34 | |
get_drunk | i only ever asked two questions | 15:35 | |
gregf_ | m: 2 == 'metric ****tonne' | 15:37 | |
camelia | rakudo-moar bf099b: OUTPUT«WARNINGS for /tmp/oGbr3bcjD1:Useless use of "==" in expression "2 == 'metric ****tonne'" in sink context (line 1)Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5metric ****tonne' (indicated by ⏏) …» | ||
gregf_ | get_drunk: what were your questions *if i may ask* that did cause an uproar? *sorry, dont want to flood this channel* | 15:41 | |
get_drunk | they were dumb | ||
gregf_ | you'll proly get 2 to-the-point answers on here ;) | ||
or more.. lol | 15:42 | ||
mst | there wasn't an uproar, they were just random | 15:44 | |
wtf is it with everybody assuming everything was more drama than it aactually was | |||
literal | m: my $f = Q{b\ar}; $f .= trans(Q{\} => Q{\\}); say $f | 15:45 | |
camelia | rakudo-moar bf099b: OUTPUT«b\ar» | ||
mst | b2gills, gregf, please calm down and stop imagining drama where none exists so we can get back to our regularly scheduled scaring newbies with awesome language features | ||
gregf_ | quotemeta? | ||
jast | mst: but drama is so much fun :((( | ||
get_drunk | agreed | ||
literal | m: my $f = Q{b\ar}; $f .= trans(Q{\} => Q{_}); say $f | ||
camelia | rakudo-moar bf099b: OUTPUT«b_ar» | ||
literal | how come \\ doesn't work as a replacement? | 15:46 | |
mst | jast: go join a local theatre group then, they're usually awesome :D | ||
get_drunk | blegh | ||
jast | that's the boring kind of drama | ||
get_drunk | actually | ||
if it was a bunch of perl hackers I'd do it | |||
jast | ideally nobody actually enjoys it. there's a residual risk of enjoyment in theatre | ||
mst | jast: you've clearly never been backstage during a performance of wyrd sisters that was going wrong | ||
15:46
Humdai left
|
|||
get_drunk | interdisciplinary perling could be a thing | 15:46 | |
jast | you've got me there | 15:47 | |
literal | or is trans() only for single-char replacements? | ||
jast | literal: AFAICT, yes. just like most transliterate features in various languages. | 15:48 | |
get_drunk | depends on their gender | ||
jast | but I'm wrong \o/ | ||
get_drunk | same | ||
jast | based on skimming the docs, maybe try this: ... .trans([Q{\}] => [Q{\\}]) | 15:49 | |
(I always forget about the bot and so don't try it myself :)) | |||
sufrostico | /clear | 15:50 | |
jast | now I want to know | 15:52 | |
m: my $f = Q{b\ar}; say $f.trans([Q{\}] => [Q{\\}]) | |||
camelia | rakudo-moar bf099b: OUTPUT«b\\ar» | ||
15:52
Humdai joined
15:59
_nadim left
16:01
_nadim joined
16:06
azawawi left
16:07
Emeric left
16:08
Emeric joined
|
|||
llfourn | psch: RT #128330 | 16:10 | |
synopsebot6 | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128330 | ||
16:12
setty1 joined
16:14
nadim joined
16:17
_nadim left
16:18
_mg_ left
16:19
silug left,
vike joined
16:21
sno left
16:27
kurahaupo joined
16:29
notbenh joined
16:34
silug joined
16:44
yqt left
16:50
brrt left
16:55
dha joined
16:56
zakharyas left
16:59
Humdai left
17:06
TreyHarris joined,
telex joined
17:12
kurahaupo left
17:13
firstdayonthejob joined,
dakkar left
17:22
zakharyas joined,
grondilu joined
17:25
domidumont joined
17:26
mr-foobar left
17:44
rurban2 left
17:54
girafe left
|
|||
masak | m: class A::B {}; class C { has A::B $.ab = A::B.new }; say "alive" | 18:10 | |
camelia | rakudo-moar 3156a9: OUTPUT«alive» | ||
masak | m: class A::B {}; class C { has A::B $.ab .= new } | ||
camelia | rakudo-moar 3156a9: OUTPUT«===SORRY!===Could not locate compile-time value for symbol A::B» | ||
perlpilot | that one seems familiar. I bet there's already a ticket for it. | 18:11 | |
masak | yes, that's from RT #126975 | 18:18 | |
synopsebot6 | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=126975 | ||
18:18
spider-mario joined
|
|||
masak | just found it in some 007 code, and wanted to check if it's still alive and kicking :) | 18:19 | |
dha | James Bond does Perl? | ||
masak | oh, he's at the cutting edge of Perl | 18:20 | |
perlpilot | oh | ||
masak | dha: it's the Q department, providing Mr Bond with all the latest futuristic tech | ||
finest secret Britain can produce | |||
dha | Rule Brittania! | 18:21 | |
Wait, is it the *real* Q giving him this stuff or that new 12 year old? | |||
masak | that's... a surprisingly apt slogan for the Bond movie franchise | ||
TimToady | why do you think MI-6 and such are illegal identifiers? | ||
masak | dha: it's the real Q | ||
dha | whew. | ||
TimToady++ | |||
masak | yeah, just becase Perl 6 is a 15-year-old doesn't mean it'd trust a 12-year-old to produce its stuff | 18:22 | |
arnsholt once read a spy thriller where MI6 had been mangled into M16 | |||
TimToady | no, we want the 7-year-olds, not the 12-year-olds | ||
arnsholt | Not sure if it was copy-editing or the translator's fault | ||
TimToady | by 12 they start to develop a conscience | ||
18:23
rurban joined
|
|||
TimToady realizes his recent utterances could be taken the wrong way, and shuts up... | 18:24 | ||
timotimo | what, monkeys? | ||
masak | TimToady: haha | ||
timotimo | .o( it's not even called cont, it's called context! ) | ||
masak | TimToady: it's already too late -- that one is already in *someone's* quote file :P | ||
TimToady blames camelia | 18:25 | ||
18:25
jack_rabbit left,
sno joined
|
|||
literal | is there a shorthand to perform all substitutions according to some %hash? | 18:25 | |
on a string | |||
TimToady | with which semantics? | 18:26 | |
18:26
rurban left
|
|||
literal | build up an alternation (LTM I suppose) of all the keys, do a global subst on the string with the values as replacements | 18:26 | |
TimToady | with or without overlap after substitution? | 18:27 | |
probably without, most people would expect | |||
literal | without | ||
basically the equivalent of this in Ruby: string.gsub!(Regexp.union(myhash.keys), myhash) | |||
TimToady | if trans were up to original spec, it would work for this | ||
since trans was specced to to LTM on left-sides longer than a character | 18:28 | ||
AlexDaniel | m: ‘a123b123c’.trans(‘23’ => ‘’, :delete); | ||
camelia | ( no output ) | ||
AlexDaniel | m: say ‘a123b123c’.trans(‘23’ => ‘’, :delete); | ||
camelia | rakudo-moar 3156a9: OUTPUT«a1b1c» | ||
TimToady | oohie | ||
maybe it'll work | |||
perlpilot doubts | 18:29 | ||
literal | I tried trans but it wouldn't insert replacements that were longer than 1 character | ||
AlexDaniel | m: say "a123b123c".trans(‘23’ => ‘X’, ‘a’ => ‘Z’, :delete); | ||
camelia | rakudo-moar 3156a9: OUTPUT«Z1Xb1Xc» | ||
AlexDaniel | m: say "a123b123c".trans(‘23’ => ‘LONGER’, ‘a’ => ‘Z’, :delete); | ||
camelia | rakudo-moar 3156a9: OUTPUT«Z1LOb1LOc» | ||
AlexDaniel | WTF? | ||
TimToady | bug, I say | ||
perlpilot | trans needs some love looks like | ||
18:30
zakharyas left
|
|||
TimToady | literal: so yeah, trans does that, it just doesn't do it right :) | 18:30 | |
18:30
yqt joined
|
|||
literal | alright | 18:30 | |
18:31
FROGGS joined
|
|||
AlexDaniel | m: say "abCDEe".trans(‘CDE’ => ‘LONGER’); | 18:31 | |
camelia | rakudo-moar f0f1d4: OUTPUT«abLONe» | ||
AlexDaniel | :DD | 18:32 | |
okay | |||
literal | I guess it just replaces the character positions it matched and no more | 18:33 | |
FROGGS | o/ | ||
18:33
girafe joined
|
|||
AlexDaniel | oh | 18:34 | |
look | |||
m: say "abCDEe".trans(/CDE/ => ‘LONGER’); | |||
camelia | rakudo-moar f0f1d4: OUTPUT«abLONGERe» | ||
literal | huh | ||
FROGGS | O.o | ||
AlexDaniel | wait… | ||
m: say "DabCDEe".trans(/CDE/ => ‘LONGER’); | |||
camelia | rakudo-moar f0f1d4: OUTPUT«DabLONGERe» | ||
AlexDaniel | m: say "DabCDEe".trans(‘CDE’ => ‘LONGER’); | ||
camelia | rakudo-moar f0f1d4: OUTPUT«OabLONe» | ||
masak | why am I getting this error: ? | ||
Missing or wrong version of dependency '/home/masak/ours/007/lib/_007/Parser/Syntax.pm (_007::Parser::Syntax)' (from '/home/masak/ours/007/lib/_007/Parser/Actions.pm (_007::Parser::Actions)') | |||
FROGGS | one of these must be wron, no? | 18:35 | |
masak | (I just changed Syntax.pm) | ||
FROGGS | masak: whipe /home/masak/ours/007/lib/.precomp | ||
AlexDaniel | FROGGS: uh, not really… I'm not sure | ||
masak | FROGGS: just did, reflexively | ||
FROGGS: but I don't think the error message should ever happen | |||
AlexDaniel | ‘CDE’ => ‘LONGER’ means ‘C’ => ‘L’, ‘D’ => ‘O’ and so on | 18:36 | |
FROGGS | masak: something uses X which uses Syntax.pm, and that isnt handled right it seems | ||
masak: aye | |||
masak: from my weekend experience it does not seem to happen if you only have one level of dependency | |||
AlexDaniel | m: say "CabCDEe".trans( ‘CDE’.comb => [‘LONGER’, ‘heh’, ‘test’]); | 18:37 | |
camelia | rakudo-moar f0f1d4: OUTPUT«LONGERabLONGERhehteste» | ||
18:37
sno left
|
|||
AlexDaniel | so it does work | 18:37 | |
it's just that it anti-dwim a little bit | 18:38 | ||
is* | |||
masak | FROGGS: not sure how to count my levels of dependency, but 007 is a pretty multi-layered project | ||
AlexDaniel | literal: I believe that you can use it today | ||
FROGGS | I guess this is not enough: rakudo/src/core/CompUnit/PrecompilationRepository.pm:121: return False if $modified > $since; | 18:39 | |
AlexDaniel | so there's no bug :) | 18:41 | |
literal | AlexDaniel: yeah | ||
18:41
labster joined
|
|||
AlexDaniel | I find the current behavior a little bit weird but… it does the job if you play by its rules | 18:41 | |
m: say ‘abc’.trans(‘b’ => ‘hello’) | 18:43 | ||
camelia | rakudo-moar f0f1d4: OUTPUT«ahc» | ||
AlexDaniel | ok, so, why no warning? | 18:44 | |
m: say ‘abc’.trans(‘bc’ => ‘h’) | |||
camelia | rakudo-moar f0f1d4: OUTPUT«ahh» | ||
masak | g'ah, had to blow lib/.precomp again... :( | ||
AlexDaniel | ok, that I can understand | ||
FROGGS | masak: every time :/ | ||
masak: let me try to actually golf it | 18:45 | ||
masak | FROGGS: much appreciated | ||
18:45
zakharyas joined
|
|||
dalek | osystem/MARTIMM-patch-1: f712c39 | (Marcel Timmerman)++ | META.list: Add Config::DataLang::Refine to ecosystem See github.com/MARTIMM/config-datalang-refine but pod file is better |
18:53 | |
18:54
huggable left
18:57
_nadim joined
|
|||
dalek | osystem: f712c39 | (Marcel Timmerman)++ | META.list: Add Config::DataLang::Refine to ecosystem See github.com/MARTIMM/config-datalang-refine but pod file is better |
18:59 | |
osystem: d9aebe1 | (Zoffix Znet)++ | META.list: Merge pull request #217 from perl6/MARTIMM-patch-1 Add Config::DataLang::Refine to ecosystem |
|||
18:59
nadim left
|
|||
dalek | osystem/MARTIMM-patch-1: 9cd1e6f | (Zoffix Znet)++ | META.list: Remove unwanted empty line |
18:59 | |
19:01
nadim joined
19:03
_nadim left
19:06
revdiablo joined
19:08
andreoss joined
19:15
tbrowder joined
|
|||
tbrowder | m: say 'hi' | 19:15 | |
camelia | rakudo-moar f0f1d4: OUTPUT«hi» | ||
yoleaux | 30 May 2016 10:50Z <Zoffix> tbrowder: any word on merging this? I recall you received positive feedback on adding a new tab: github.com/perl6/doc/compare/maste...perl6-docs | ||
FROGGS | masak: it is not just a A-uses-B-uses-C problem | ||
masak | FROGGS: ok... | ||
tbrowder | Zoffix: I'm still working on it, but advice helpful; issues for me before any merge: (1) be able to sort input pod docs by file name, not internal title | 19:17 | |
(2) figure out a way to work around the "table row with leading hyphen issue (#128221) | 19:18 | ||
synopsebot6 | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128221 | ||
FROGGS | huh | 19:19 | |
when C was changed, it tries to precompile A and fails, then B and fails, then C, continues, and then fails that D has an outdated dependency on C | 19:20 | ||
so it is more about a diamond dependency relationship | |||
tbrowder | in the meantime, I may have found another bug: by my reading of the docs, this should be a valid scalar: "$issue-1234-fixed" but I'll try it: | ||
m: my $issue-1234-fixed = False; | |||
camelia | rakudo-moar f0f1d4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/DXfR9HBMMDPreceding context expects a term, but found infix = insteadat /tmp/DXfR9HBMMD:1------> 3my $issue-1234-fixed =7⏏5 False;» | 19:21 | |
19:21
araujo_ joined
|
|||
tbrowder | m: my $issue-N1234-fixed = False; | 19:21 | |
camelia | ( no output ) | ||
tbrowder | note adding a letter in front of the numbers quells the problem | ||
m: my $issue-_1234-fixed = False; | |||
camelia | ( no output ) | ||
perlpilot | tbrowder: pretty that's how it's supposed to be. | 19:22 | |
tbrowder | m: my $issue-1234_fixed = False; | ||
camelia | rakudo-moar f0f1d4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/aZXEhWC44DConfusedat /tmp/aZXEhWC44D:1------> 3my $issue-12347⏏5_fixed = False;» | ||
perlpilot | i.e. the thing immediately after a - must match <.alpha> | ||
[Coke] | tbrowder: where in the docs? (I can't even find "identifier" in the index) | 19:23 | |
tbrowder | Coke: that's another doc bug; the def is found here: <doc.perl6.org/language/syntax#Identifiers> | ||
AlexDaniel | m: sub test { 42 }; my $hello = 69; say $hello-10-test | ||
camelia | rakudo-moar f0f1d4: OUTPUT«17» | ||
AlexDaniel | tbrowder: ↑ I think that this is why it is not valid | 19:24 | |
perlpilot | yep | ||
19:24
araujo left
|
|||
perlpilot | (at least that seems right to me) | 19:24 | |
19:24
domidumont left
19:25
zakharyas left,
darutoko left
|
|||
tbrowder | well the def in the docs doesn't agree (but I haven't checked the synopses) | 19:25 | |
19:26
andreoss left
|
|||
AlexDaniel | I see no tests at all: github.com/perl6/roast/blob/ab7476...ntifiers.t | 19:27 | |
19:27
telex left
|
|||
AlexDaniel | ah no, that's S15 | 19:27 | |
dalek | k-simple: baec00c | azawawi++ | examples/12-frame.pl6: Add a seperate frame demo |
||
k-simple: 99cc705 | azawawi++ | /: Merge remote-tracking branch 'upstream/master' |
|||
k-simple: 81d43c7 | azawawi++ | / (5 files): Add initial Places sidebar example |
|||
k-simple: 46499b1 | azawawi++ | / (3 files): More documentation and name fixes |
|||
k-simple: 27e0315 | azawawi++ | / (3 files): More fixes |
|||
k-simple: 7522fd8 | RabidGravy++ | / (6 files): Merge pull request #48 from azawawi/master Separate Frame widget example + Places Sidebar + Documentation fixes |
|||
AlexDaniel | here github.com/perl6/roast/blob/ab7476...entifier.t | 19:28 | |
dha | Actually, the description of identifiers says that that should be valid, but I think the examples don't necessarily agree. the first example of a NON-valid identifier is "with-numbers1234-5" which seems to agree with the description. | ||
19:28
sno joined,
telex joined
|
|||
avalenn_ | the def and the examples in the doc don't agree with each other | 19:28 | |
design.perl6.org/S02.html#Names_and_Variables | 19:29 | ||
An identifier is composed of an alphabetic character followed by any sequence of alphanumeric characters. The definitions of alphabetic and numeric include appropriate Unicode characters. Underscore is always considered alphabetic. An identifier may also contain isolated apostrophes or hyphens provided the next character is alphabetic. | |||
dha | Well, the design docs are pretty much considered historical at this point. | ||
perlpilot | avalenn_++ | ||
grondilu | m: say my $apostroph'attempt | 19:30 | |
camelia | rakudo-moar f0f1d4: OUTPUT«(Any)» | ||
grondilu | TIL | ||
perlpilot | m: my $foo't-gun; | ||
camelia | ( no output ) | ||
dha | Ah, so the design document has that right, and the user docs have it wrong. | ||
(apparently) | |||
avalenn_ | examples in the language documentation agree with design doc | ||
AlexDaniel | dha: what's right about it? | ||
ah | 19:31 | ||
didn't read the last few words… | |||
dha | the last bit about what follows the hyphen or quote needing to be alphabetic. | ||
tbrowder | But the S02 definition clarifies that each portion delimited with a leading hyphen or comma must start with a alphabetic character--that's what's missing in the docs | 19:32 | |
AlexDaniel | but also note that there's no test for that | ||
dha | If we're agreed that that's the problem, I'm happy to add that. | ||
oop. Then there should be a test for that. :-) | |||
tbrowder | dha: and change the docs | ||
AlexDaniel | dha: didn't you just say that you'd be happy to add a test? | ||
perlpilot | AlexDaniel: I think he was talking about the docs | 19:33 | |
AlexDaniel | perlpilot: shhh | ||
dha | Nope. I'd be happy to add docs. :-) But I'm willing to take a whack at the test as well. | ||
[Coke] | assuming that's the desired behavior, aye. A pull request on the docs requesting someone verify that's the desired behavior (and/or on the spec test suite) appreciated. | ||
dha | If someone would just tell me where said test should be put, I'll see what I can do. | ||
AlexDaniel | [Coke]: well, keep in mind that the only thing that is out of sync is the docs | 19:34 | |
[Coke] | so we don't run afoul of pmichaud's concerns about the defacto implementation becoming spec. | ||
AlexDaniel | [Coke]: both the speculations and the implementation does it “right” | ||
[Coke] | AlexDaniel: no, if there's no tests, then there's no spec. | ||
AlexDaniel | [Coke]: ok, indeed | ||
[Coke] | the speculations help drive it, but post-christmas, we shouldn't assume they are right. | ||
AlexDaniel | dha: S02-names/identifier.t | ||
perlpilot | [Coke]++ for keeping things in perspective. | 19:35 | |
[Coke] | that said, I think they are, and pre-emptively vote +1 on this. :) | ||
dha | ok. Will take a shot at it. | ||
AlexDaniel | ah wait | ||
“foob-4 is not a valid identifier (not alphabetic after hyphen)";” | |||
how did I miss that | |||
dha | Where's that? | ||
AlexDaniel | github.com/perl6/roast/blob/ab7476...fier.t#L25 | ||
so yeah, *everything* is right except the docs | 19:36 | ||
perlpilot | so there *are* tests | ||
one less thing for dha to do :) | |||
AlexDaniel | I'm probably blind, not sure how I missed it | ||
dha | perlpilot - but not for the hyphen. | ||
AlexDaniel | dha: github.com/perl6/roast/blob/ab7476...fier.t#L28 | ||
dha | oh. how did I miss that. | 19:37 | |
bleah. | |||
ok, so the doc just needs to change | |||
AlexDaniel | yep | ||
as simple as that | |||
OH COME ON. Who is “as”?? | |||
lizmat | m: my $foo = 666; say $foo-42 # we probably don't want to lose this functionality | 19:38 | |
camelia | rakudo-moar 055ca1: OUTPUT«624» | ||
dha | Ok. I'll add the aphabetic thing. | ||
lizmat - being able to subtract? Yeah, I'm sure *someone* needs that. | 19:39 | ||
:-) | |||
lizmat | subtract without whitespace, was my point :-) | ||
tbrowder | of course (slaps forehead hard)! | ||
dha | Yes. | 19:40 | |
perlpilot | yeah, there are lots of examples I think that do that. | ||
lizmat | I think that's the only reason... if we would force whitespace for an infix:<->, then we could have $foo-42 | ||
tbrowder | I've just been enjoying kebab case too much... | ||
lizmat | but I think that's too alienating for people coming from p5 | ||
tbrowder | but us non-typists love it, even coming from p5! | 19:41 | |
(no shift key!!) | |||
19:42
rindolf left
|
|||
perlpilot | just make sure you don't have variables named $A, $A-B and a constant named B that you want to subtract ;) | 19:43 | |
dha | How's this for wording: You can also embed dashes C<-> or single quotes C<'> in the middle, but not two in a row, and only if followed by an alphabetic character. | ||
perlpilot | dha: maybe add the word "immediately" for emphasis | 19:44 | |
dha | ok. | ||
lizmat | m: my $a = 42; my \b = 666; say $a-b # perlpilot: I think LTM will take care of that | ||
dha | Anything else before I submit? | ||
camelia | rakudo-moar 055ca1: OUTPUT«5===SORRY!5=== Error while compiling /tmp/0xaTKAlml2Variable '$a-b' is not declaredat /tmp/0xaTKAlml2:1------> 3my $a = 42; my \b = 666; say 7⏏5$a-b # perlpilot: I think LTM will ta» | ||
19:46
_nadim joined
19:49
nadim left,
_nadim left,
_nadim joined
|
|||
perlpilot | m: my $a-b = 42; my $a = 39; my \b = 7; say $a-b; # oops, I wanted 32 | 19:52 | |
camelia | rakudo-moar 055ca1: OUTPUT«42» | ||
dha | Grr... I really need to figure out how to create a pull request for JUST one commit instead of EVERY commit I've done since I last made a pull request. | ||
perlpilot | lizmat: what I was saying is that (under those contrived circumstances), you wanted to subtract, but the compiler thought otherwise. You've just made a new footgun for yourself. | 19:53 | |
dha: you can do that by making a branch for just the one commit. | |||
lizmat | true, hence perhaps we should emphasize longest token match at this place in the documentation ? | ||
FROGGS | masak: do you ex-/import tags in the packages the packages that fails with "Missing or wrong version of dependency"? | 19:54 | |
dha | perlpilot - that sounds like a HORRIBLE solution... :-/ | ||
FROGGS | masak: do you have* | ||
perlpilot | dha: eh, branches are cheap. I make them all the time. | ||
lizmat: I haven't the words, but certainly a word or two of caution could be put in the docs there. | 19:55 | ||
lizmat is currently busy with words for the P6W | 19:56 | ||
dha | Ok, I can't remember the last time I did a branch. Will probably have to look that up now... | ||
19:56
Zero_Dogg left,
Zero_Dogg joined,
Zero_Dogg left,
Zero_Dogg joined
20:01
sno left
20:02
TEttinger joined
20:06
sufrostico left
20:08
sufrostico joined
|
|||
geekosaur | branches are very cheap in git, and they're how it keeps track of this stuff | 20:09 | |
it's not like svn or cvs where a branch is effectively a repo copy | |||
mst | dha: ideally, you'd use a branch for each unit you'll later PR | 20:10 | |
dha | It's times like this I wish I were an actual developer. :-| | 20:11 | |
mst | because sungo and I are so more happy go lucky, yeah :P | 20:12 | |
dha | Well, it's not like I'm so happy go lucky to begin with, and were I a developer, I'd probably actually understand git better. So, result. | 20:13 | |
20:13
rurban joined
20:14
_mg_ joined
|
|||
RabidGravy | nobody understands git,they just use it | 20:15 | |
20:15
rurban_ joined
|
|||
dogbert17 | git happens ... | 20:16 | |
RabidGravy | :) | ||
mst | dha: most important thing I ever learned about git | 20:17 | |
(cd ..; cp -a MyRepo MyRepo.bak73) | |||
before I do anything clever | |||
RabidGravy | I've lost count of the version control systems I've used, but they all do the same thing | ||
20:17
[particle] joined
|
|||
dha | I... wouldn't have thought that trying to do a pull request on a single commit would be considered "clever" | 20:18 | |
Hm. Looks like I need to figure out cherry-pick to make this work. | 20:19 | ||
b2gills | Considering you can force push a branch to change a PR, how would doing a PR on a single commit work? | 20:20 | |
20:22
rurban_ left
|
|||
dha | Uh... I'm sure that means something, but apparently I'm too dim to know what that is. :-( | 20:22 | |
The great irony here is that I'm just adding a few words, and I actually have commit rights on the actual doc repository, so I *could* do it directly. But experience tells me that that way lies unpleasantness... | 20:23 | ||
[Coke] | dha: once you great the branch and are on it, "git cherry-pick sha-of-one-commit-you-care-about" | ||
s/great/create/ # huh | 20:24 | ||
dha | :-) | ||
yeah, I'm seeing that's what I should do. I'm just not clear on what cherry-pick actually *does*. but that doesn't mean it wouldn't work, even if I have no idea what's going on. | 20:25 | ||
lizmat | PSA: does anybody have something in the Perl 6 world that "defined" the past week ? | 20:26 | |
stmuk_ | lizmat: I think there are new videos at www.youtube.com/channel/UCMDEevWdp...JId-bPyReg since the last P6W | 20:27 | |
dha | eek. I cherry-pick'ed and now it's... saying things. | ||
stevieb | dha: here's how I create PRs with an individual commit (or numerous commits related to one thing): gist.github.com/stevieb9/8b40e992e...0e9a387735 | ||
TEttinger | lizmat: something something jon snow | 20:28 | |
I don't watch game of thrones, but apparently it's popular recently | |||
TEttinger is unhelpful | |||
dha | m: say 'hodor' | ||
camelia | rakudo-moar 055ca1: OUTPUT«hodor» | 20:29 | |
stmuk_ | actually maybe those videos did go in the last p6w (just) | ||
lizmat | stmuk_: yeah, they did :-) | ||
I think | |||
stmuk_ | the last day's video aren't out yet | 20:30 | |
FROGGS | masak: I filed it as RT #128332 | 20:32 | |
synopsebot6 | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128332 | ||
AlexDaniel | lizmat: bisectable bot is now more user-friendly | 20:33 | |
bisect: class A { has $.wut = [] }; my $a = A.new; $a.wut = [1,2,3]; $a.wut.say | |||
bisectable | AlexDaniel: exit code on a “good” revision is 1 (which is bad), bisecting with inverted logic | ||
AlexDaniel: (2016-03-02) github.com/rakudo/rakudo/commit/fdd37a9 | |||
20:34
ocbtec left
|
|||
AlexDaniel | bisect: good=2016.03 bad 2016.02 say (^∞).grep({ last })[5] | 20:34 | |
bisectable | AlexDaniel: exit code is 0 on both starting points, bisecting by using the output | ||
AlexDaniel: “bisect run” failure | |||
AlexDaniel | bisect: say (^∞).grep({ last })[5] | ||
bisectable | AlexDaniel: exit code is 0 on both starting points, bisecting by using the output | ||
AlexDaniel: (2016-03-18) github.com/rakudo/rakudo/commit/6d120ca | |||
AlexDaniel | and so on | ||
FROGGS | gnight | 20:35 | |
20:35
FROGGS left
|
|||
lizmat | gnight freeze | 20:35 | |
grrr | |||
AlexDaniel | yeah, most importantly this: | ||
bisect: exit 42 | |||
bisectable | AlexDaniel: on both starting points the exit code is 42 and the output is identical as well | ||
20:36
sufrostico left
20:38
jonadab joined
|
|||
dha | Ok, cherry-pick'ing did *not* remove the unwanted commits from my pull request. I think I need to murder github. | 20:44 | |
jnthn | bisect: say $*VM.version | ||
20:44
tbrowder left
|
|||
bisectable | jnthn: exit code is 0 on both starting points, bisecting by using the output | 20:44 | |
jnthn: “bisect run” failure | |||
jnthn | o.o :) | ||
20:44
kaare_ left
|
|||
AlexDaniel | that's very interesting… | 20:46 | |
jnthn | I didn't expect it to do anything sensible, fwiw. I was mostly curious what it would do (and hoping "nothing too bad" :)) | ||
[Coke] | dha: you need to make sure you have a clean place to branch from; branch; cherry-pick; push; then PR that branch. | 20:47 | |
AlexDaniel | jnthn: it shouldn't've failed | ||
dalek | sectbot: 72d52f5 | (Aleks-Daniel Jakimenko-Aleksejev)++ | / (3 files): Garbage in, rainbows out This commit includes a lot of changes to how problematic cases are handled. The basic idea is that first the code snippet is tested on good and bad revisions (git is not doing that by default), and further behavior is adapted according to that. Also, 2015.12 is now used instead of v6.c. |
20:48 | |
20:50
inokenty joined
|
|||
lizmat | and another Perl 6 Weekly hits the net: p6weekly.wordpress.com/2016/06/06/...bisecting/ | 20:51 | |
20:51
patrickz joined
|
|||
jnthn | AlexDaniel: btw, bisectbot is a really great idea :) | 20:51 | |
AlexDaniel | jnthn: yea, thanks :) | 20:52 | |
vendethiel | lizmat++ :D | ||
20:52
get_drunk left
20:53
dha left
|
|||
[Coke] | AlexDaniel++ for sure | 20:53 | |
20:54
dha joined
|
|||
masak | FROGGS++ # rt.perl.org/Public/Bug/Display.html?id=128332 | 20:56 | |
AlexDaniel | jnthn: gist.github.com/AlexDaniel/0f90c29...1b4b13435f | ||
20:56
_28_ria joined
|
|||
dha | [Coke] - define "clean place to branch from" | 20:56 | |
AlexDaniel | jnthn: seems like you was just a bit unlucky | ||
dha | Also, unless I've done something wrong, git cherry-pick seems to have actually worsened the issue at hand. | 20:57 | |
mst | yes, for pulling a single commit | ||
AlexDaniel | jnthn: there are like 15 revisions where the build process fails, so there's no perl6 executable. Such commits are skipped | ||
mst | once it gets merged you'll want to rebase your stack o' commits branch onto master | ||
and it should just re-order itself | |||
dha | Well, the branch and the master didn't actually differ in the first place, although cherry-picking probably has changed that. | 21:00 | |
21:01
cpage_ joined
|
|||
mst | dha: right, I said *once it gets merged* | 21:01 | |
i.e. after the PR is accepted into master | |||
[Coke] | dha: are you working in a fork? | 21:02 | |
dha | ah. But in the meantime, the problem I was trying to solve by making a branch (i. e. only have one commit be used in the pull request) persists. | ||
[Coke] - yes. | |||
[Coke] | if so, then rebase your master so it include's the upstream's master commits. | ||
21:03
wamba left
|
|||
[Coke] | then branch off your clean master that doesn't have any of your other commits. | 21:03 | |
21:03
Emeric left
|
|||
[Coke] | *includes | 21:03 | |
AlexDaniel | what's the idea behind MONKEY-WRENCH and MONKEY-BARS ? | ||
mst | [Coke]: I think you've omitted about the first six steps from dha's point of view there | ||
dha: so, if you keep a stack of commits in a wip branch atop master | 21:04 | ||
[Coke] | dha, mst: yes, well, not knowing how off-kilter his fork is, hard to tell. And feel free to jump in with any missing steps. | ||
mst | dha: you can PR one via 'git checkout master; git checkout -b some_name; git cherry-pick <the commit from wip>; git push origin some_name' | ||
and then PR some_name | |||
if currently your local master *is* your wip | 21:05 | ||
then 'git checkout master; git checkout -b wip; git checkout master; git reset --hard origin/master' | |||
dha | define "wip" | ||
work in progress? | |||
mst | (remember that I said about 'cp -a' first before being clever though) | ||
yeah. I mean, if you're more comfortable generating a pile of commits in a single branch | |||
then teasing them out one at a time to PR | |||
you can use a wip branch like that | |||
if they're completely independent commits, I'd give 'em a branch each up front | |||
git branches are basically a symlink to a commit, they're dirt cheap | 21:06 | ||
mst resists urge to try and write Yet Another Git Tutorial | |||
dha | To be clear, what's going on on this end is: I forked the perl6/doc repo some time back. As of the beginning of this whole mess, it was up to date with the upstream repo. | ||
mst | ... wait, I think I might have a really easy way to get you a chance to 'redo from start' without losing any work | 21:07 | |
[Coke] | note that if you have commit bits on the original repo, you can skip the fork entirely and put your branches to be merged in the original repo and PR from those branches. | 21:08 | |
dha | But, there have been merges along the way from the upstream repo, so as to keep my fork in sync. Those commits are *all* showing up when I make a PR. | ||
[Coke] | (to cut this knot going forward) | ||
21:08
pullphinger left
|
|||
[Coke] | dha: you shouldn't be working in master in your fork if you're doing PRs | 21:08 | |
mst | so, 'git format-patch origin/master' will turn each of your local commits into its own .patch file | ||
dha | Ah. That's probably what I missed. | ||
[Coke] | which doesn't help you clean up what you have today. | ||
21:08
skids left
|
|||
mst | at which point, I would expect you can start again with a completely fresh fork | 21:09 | |
dha | No. no it doesn't. I think at this point I should just shoot myself and avoid the christmas rush. | ||
mst | dha: yeah, GH workflow is fork, clone, 'git checkout -b mything', add comits, submit mything branch as PR, git checkout master, repeat | ||
[Coke] | how many commits are we talking about? if you made one huge PR and someone reviewed it... | ||
21:09
geraud joined
|
|||
dha | Yep. I missed the branching part of that. | 21:09 | |
mst | yes but (1) that would be a waste of a perfectly good bullet (2) we need your doc patches | 21:10 | |
(3) after bothering to try and explain it to you, clearly you owe me finishing the job, because the 10 minutes I spent totally give me the right to control your volunteer efforts, honest | |||
dha | [Coke] - I imagine that, if I put the pull request through, someone could certainly weed out the crap. But I was going to *try* to avoid that. | ||
perlpilot | lizmat++ | ||
stmuk_ | github.com/perl6/doc/compare/maste...dha:master ? | 21:11 | |
mst | dha: the other key problem is that you merged rather than rebasing, which makes for some untangling | ||
though not that much | |||
honestly, cherry picking each of your real commits into its own branch | |||
then blowing away your current master | |||
dha | mst - please. I've been dealing with comic book fans lately. your claims to privilege over me pales in comparison. :-) | ||
mst | seems like it'd work fine to me | ||
RabidGravy | well "the crap" just makes it difficult to review, it won't mess up the target | ||
dha | stmuk_ - yes, that would be my fork | ||
mst | dha: bah. I'll try and up my game next time. | 21:12 | |
dha goes to read up on rebasing | 21:13 | ||
21:14
TeTpaAka joined
|
|||
stmuk_ | what is the actual problem? | 21:14 | |
[Coke] | dha: stackoverflow.com/questions/724432...repository | ||
mst | stmuk_: basically he wants to take his single master with assorted patches | ||
and turn it into one PR per patch | |||
without the mess | |||
I think | |||
dha: correct? | |||
[Coke] | top answer on how to do the rebase from upstream. (you might need a clean master to do that.) | 21:15 | |
dha | Well, most of the commits I don't want to PR at all, but, basically, yes. | ||
[Coke] - thanks. Do they also have a "how do I clean my master" entry? :-) | |||
[Coke] | you could probably programmatically find the commits you have that upstream doesn't have and do a per-branch commit for each one with a shell script. | ||
21:16
cpage_ left
|
|||
[Coke] | if it's 100 commits, that might be worth it. If it's 10... eh. | 21:16 | |
heading out. g'luck. | |||
dha | thanks | ||
21:17
cpage_ joined,
cpage_ left
|
|||
dha | I'm actually trying to PR *one* commit. I just can't figure out how to not PR all the other crap. | 21:17 | |
21:18
cpage_ joined
|
|||
stmuk_ | just delete the branch and change the few lines again? | 21:18 | |
and in future "git pull --rebase" if you care (and most people don't bother but then most would only git pull once before committing) | 21:19 | ||
mst | dha: I thought you managed that with cherry-pick | ||
hm. do you have a remote for upstream? | |||
dha | Nope. cherry-pick just added the relevant commit *again* | 21:20 | |
I believe so. | |||
mst | dha: er, yes, you need to do the cherry pick on a fresh branch that contains only the perl6 repo's master | ||
dha: do you have a remote for upstream? | 21:21 | ||
dha | I believe so. Yes. Alternately, I am totally misunderstanding you. | ||
mst | ok, what's it called? | ||
21:22
_mg_ left
|
|||
mst | (origin is presumably your fork, not the perl6/doc repo itself) | 21:22 | |
dha | yes. | 21:23 | |
mst | so, what's the remote for perl6/doc called? | ||
dha | git tells me I have origin, perl6 and upstream | ||
mst | AHA | ||
dha | aha? | ||
mst | except that now I dunno whether perl6 or upstream is the real one | ||
which one have you been merging from? | |||
perl6/master or upstream/master ? | 21:24 | ||
21:24
TeTpaAka left
|
|||
mst | dha: ? | 21:25 | |
dha | I should note that the urls for perl6 and upstream are the same. | ||
mst | ok | ||
so it probably doesn't matter | |||
RIGHT, let's see if this works then | |||
dha | Oh, I'm at the point where *nothing* matters anymore... | ||
mst | git checkout perl6/master; git checkout -b this_is_msts_fault; git cherry-pick <commit goes here>; git push origin this_is_msts_fault; | ||
and then see if the PR button on origin looks like it's going to PR the commit you wanted it to | 21:26 | ||
dha | it doesn't like "git checkout perl6/master" | ||
masak | 'night, #perl6 | 21:27 | |
dha | night masak | ||
mst | dha: "doesn't like" ? | ||
dha | error: pathspec 'perl6/master' did not match any file(s) known to git. | ||
mst | it'll do some complaining about 'detached head' | ||
ok. try 'upstream/master' | |||
there must be one somewhere in here | |||
dha | oh. wait. i did something wrong. | ||
mst | the idea was that appart from <commit goes here> | 21:28 | |
you could actually copy-paste what I said into IRC | |||
thereby reducing ti to 'mst did something wrong' | |||
dha | ok, now I'm getting the detached head thing. | ||
mst | that's fine | 21:29 | |
git checkout -b this_is_msts_fault | |||
dha | sorry about that. I tried to checkout in the wrong window before. | ||
mst | # now you're in a new branch from that | ||
git cherry-pick <commit> # cherry pick it | |||
21:29
stevieb9 joined
|
|||
mst | git push origin this_is_msts_fault # push just this new branch to origin | 21:29 | |
21:29
patrickz left
|
|||
dha | ok.... let me cherry-pick... | 21:29 | |
RabidGravy | I'm your ch-ch-ch-cherry bomb! | 21:30 | |
literal | is there a way to do an exact type check against a typename, analogous to «$foo.^name eq 'Hash'»? comparing against .WHAT seems to cause warnings, and smartmatching is too lax | 21:31 | |
dha | ok, picking of cherry achieved. | ||
dha pushes | |||
Now which branch am I trying to do the PR from? | 21:32 | ||
mst | this_is_msts_fault | ||
stevieb9 | the one you just pushed | ||
21:32
setty1 left
|
|||
mst | to perl6/doc/master | 21:32 | |
dha | \o/ | 21:33 | |
It's now just the one commit. | |||
mst++ | |||
stevieb9 | after you've submitted the PR, don't forget to switch back to master, or you'll add more commits to the branch (and the PR) | 21:34 | |
mst | right, at this point you can do 'git checkout master' to get back to your own master-with-stuff | ||
then do 'git checkout -b this_went_horribly_wrong' to make a copy of it | |||
then 'git checkout master' to go back to your master | 21:35 | ||
then 'git reset --hard perl6/master' to force it to look like the upstream master | |||
and then you can start from fresh | |||
and cherry pick out anything else you want from this_went_horribly_wrong later | |||
dha: oh, and before you do any of this, do a 'cp -a' in case it goes even more horribly wrong - I did those all the time while learning git | 21:36 | ||
dha | ok, done. | 21:37 | |
Thanks! | |||
mst | when it goes well, git is amazing. once you get into a mess, it's about as fun to escape as "I'm not sure what shape my undo tree in vim is but I am sure I can't find the state I wanted anymore" | 21:38 | |
hence the 'cp -a' every so often while you learn | |||
dha | *nod* | ||
mst++ | |||
mst grins | 21:39 | ||
dha | is there any point to putting this_went_horribly_wrong up to github? | 21:40 | |
stevieb9 | when we switched over to git from svn at work last year, there wasn't enough training, and those new to git caused all sorts of mayhem. Not fun | ||
mst | dha: backup, and being able to link it to other people later, and being able to clone it on another machine to steal more bits later | 21:41 | |
and if anybody judges you negatively on the contents of a branch with *that* name, I think they can safely be ignored | |||
dha | ok. :-) | ||
AlexDaniel | literal: what do you mean by smartmatching is too lax? | ||
dha | now I just have to remember how to do that. | ||
stmuk_ | there is actually one commit anyway .. github PR would have worked | ||
mst | dha: wait | ||
dha waits | |||
mst | stmuk_: no, we spent a long time unfucking to get to having only one commit. | 21:42 | |
stmuk_: that was the entire conversation | |||
dha: to get this_went up to GH: | |||
stmuk_ | the rest are just merges | ||
mst | dha: git checkout this_went_horribly_wrong; git push origin this_went_horribly_wrong; | ||
dha: then to get your rest master back up to GH | |||
dha: 'git checkout master; git push --force origin master' | |||
stmuk_ | so there is no point in saving anything | ||
dha | ok. | 21:43 | |
mst | oh, the only commit with any contents at all is the one already PRed now? | ||
dha | pretty much. | ||
mst | then, yeah, who cares | ||
git branch -D this_went_horribly_wrong; # and don't bother pushing it to origin | 21:44 | ||
mst was doing belt-and-braces lets-not-lose-anything | |||
dha | eh. already pushed | ||
mst | without ever actually looking at the repo, because I was trying to achieve 'dha at least can pretend he knows what's going on' as well as things being sorted | ||
stevieb9 | having issues installing Inline::Python today. Started on FreeBSD, so when I got home I tried Ubuntu in hopes it was my box. Travis is not enabled, so I can't see if this is a global problem. Can someone please have a look to see if I'm missing something? gist.github.com/stevieb9/6e8afa08c...5d4bfac03b | ||
mst | dha: I mean, I can't magically teach you to understand all of git | ||
dha: but, like, a delusional sense of warm fuzziness? that's a doabla goal :D | 21:45 | ||
stevieb9 | I'm installing the module per the CONTRIBUTING doc | ||
for perl6/doc | |||
stmuk_ | this is clear from the url I gave at 2111 above | ||
dha | Hm. I checked out master and it's telling me I'm behind by 382 commits, and it can be fast-forwarded. It also says I can use git pull to update my local branch. | ||
Should I do that, or is there something else I should do that will not screw up everything again? | 21:46 | ||
Also, I'm happy to be deluded in a fuzzy manner. | |||
mst | dha: yeah, if it says 'it can be fast-forwarded' then a pull shouldn't break anything | 21:47 | |
dha | ok. things have been pulled. I assume I should now push? | 21:48 | |
mst | I tend to always specify a branch to push | ||
so 'git push origin master' | |||
dha | ah. ok. | ||
mst | (this means that, have I screwed up another branch, I don't accidentally propagate that without noticing) | ||
stevieb9 | very good habit to get into for sure... | 21:49 | |
mst | "if git was a physical tool, it would have black and yellow stripes" | ||
dha | Apparently everything is up to date. | ||
...so it would be a bumblebee? | |||
mst | I don't know, it's rjbs' excuse for dzil having sharp edges | ||
stmuk_ | you should have made the whitespace changes in another commit really :) | 21:50 | |
dha | Oh. sorry. | ||
dalek | c: f97fc88 | (David H. Adler)++ | doc/Language/syntax.pod: Added alphabetic-after-hyphen-or-quote restriction to Identifier |
||
c: 7bb0eff | (Steve Mynott)++ | doc/Language/syntax.pod: Merge pull request #563 from dha/this_is_msts_fault Added alphabetic-after-hyphen-or-quote restriction to Identifier |
|||
mst | dha: later, we can talk about "how to hate yourself while turning one commit into two" | 21:51 | |
but right now it's 22:51 UK time | |||
and i'm thinking it's time to start drinking | |||
dha | I don't actually need lessons on how to hate myself. | ||
ooh. drinking. | |||
I don't think I'm doing that until wednesday. | |||
mst | dha: no, but doing it *and* getting two working commits afterwards takes a little extra knowledge | 21:52 | |
you provide the generalised self hatred, i'll provide the git specific self hatred | 21:53 | ||
SYNERGY! | |||
dha | deal. | ||
stmuk_ | | gist.github.com/stevieb9/6e8afa08c...5d4bfac03b | 21:55 | |
oops | |||
AlexDaniel | mst: just nuke this commit, and then add -p ? | ||
mst: assuming that it's the last commit | 21:56 | ||
stmuk_ | stevieb9: are you using python from ports/pkg? if so you need to recompile your own with -fPIC | ||
mst | AlexDaniel: read through the past hour of backlog, then tell me again that you think dha's at a level where 'just' is a word that's even remotely sensible to use for explaining that | 21:57 | |
AlexDaniel | I think that dha was doing great :) | ||
dha | Aw... thanks. | ||
mst | yes. but I wouldn't describe unwinding and re-assemblin a commit as 'just' for ... oh never mind | ||
RabidGravy | just drink beer and it will be fine | 21:58 | |
dha | FWIW, I think I understand what you're suggesting, but not certain I would be able to actually implement it. | ||
RabidGravy - that's your answer to everything. | |||
mst | dha: which is precisely why I was offering to talk you through it rather than the offhand 'just' | ||
that's because it's a GOOD answer | 21:59 | ||
dha | And I thank you for it. | ||
22:00
cpage_ left
|
|||
stmuk_ | stevieb9: BTW Inline::Python is optimal for perl6/doc (athough building HTML is a lot slower under pygments) | 22:01 | |
s/optimal/optional | 22:02 | ||
optimal as well | |||
22:02
cpage_ joined,
_28_ria left
|
|||
stevieb9 | stmuk_: I did compile with --enable-shared, but I'm doing a new build now as perhaps the new python wasn't being used. | 22:03 | |
lizmat | good night, #perl6! | 22:05 | |
dha | night lizmat | 22:06 | |
stmuk_ | stevieb9: its probable noone has tried this under clang either | 22:07 | |
stevieb9 | stmuk_: I'll rebuild on my fbsd box tomorrow if this works here on my ubuntu laptop now. If it still won't work on fbsd, I'll open a ticket | 22:09 | |
stmuk_ | stevieb9: some stuff assumes gmake too | ||
maybe not perl6/doc I forget | 22:10 | ||
22:10
kurahaupo joined
22:11
cpage_ left,
cpage_ joined
22:12
tbrowder joined
22:14
kid51 joined
22:27
sftp joined,
skids joined
22:28
labster left
22:29
tomboy64 joined
22:30
Sgeo_ joined
22:32
bjz_ left
22:34
tbrowder left
22:36
_nadim left
22:41
sufrostico joined
22:47
mr-foobar joined,
_28_ria joined
22:48
cdg left
22:53
bjz joined
22:54
huggable joined
22:55
dha left,
dha joined
22:57
firstdayonthejob left
22:59
firstdayonthejob joined
23:03
mohae_ joined
23:04
rurban left,
bjz left
23:06
mohae left
23:11
firstdayonthejob left,
labster joined,
kurahaupo left,
kurahaupo joined
23:13
kurahaupo_ joined
23:16
captain-adequate joined,
kurahaupo left
23:18
girafe left
23:20
RabidGravy left
23:25
jack_rabbit joined
|
|||
Hotkeys_ | is there a way to bind to a class attribute | 23:27 | |
say I have some class Foo { has $.attr } and I want to bind some $bar = "bar" | |||
to some $foo.attr | 23:28 | ||
but I want $foo.attr to change if I change $bar | |||
how would I do that? | |||
Juerd | I don't know how, or if it's even possible. | 23:29 | |
Why do you want this? | |||
Hotkeys_ | I'm just curious really | ||
since you can bind to regular variables | |||
awwaiid | m: class Foo { has $.attr; method bindit($v is rw) { $!attr := $v } } ; my $x = 5; my $f = Foo.new; $f.bindit($x); say $f.attr; $x = 42; say $f.attr | 23:35 | |
camelia | rakudo-moar f80cc7: OUTPUT«542» | ||
yoleaux | 5 Jun 2016 20:35Z <DrForr> awwaiid: It seems that lrepl only lets you invoke one middleware layer at a time, is this by design? | ||
raydiak | w | ||
wrong terminal | 23:36 | ||
though while I'm here...hi #perl6 \o | 23:37 | ||
awwaiid | DrForr: The intent, iirc, is for middleware to work very much like PSGI (rack, ring, wsgi,...) middleware -- each layer calls filters the data and invokes the next, and then can filter again on the way back out | ||
23:37
spider-mario left
|
|||
Hotkeys_ | oh | 23:38 | |
thanks awwaiid | |||
idk why i didn't think of that | |||
awwaiid | Hotkeys_: ya. It told me the left-hand-side couldn't be bound, so I figured wrapping it into a method so that the left-hand-side was more boring would work | ||
23:39
wamba joined
|
|||
awwaiid | I don't know WHY you'd want to do that though :) | 23:45 | |
Juerd | Binding at a distance sounds like a bad idea. | 23:49 | |
23:51
_28_ria left
23:53
_28_ria joined
|