»ö« 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. |
|||
00:08
mcmillhj joined
00:14
ufobat left
00:16
mcmillhj left
00:25
b2gills left
00:30
lichtkind left
00:39
b2gills joined
00:42
lookatme joined
|
|||
lookatme | morning | 00:42 | |
00:47
daa joined
00:48
daa left
|
|||
zengargoyle | lookatme: evening :) | 00:52 | |
lookatme | +_+ | 00:53 | |
zengargoyle | .u + | 00:54 | |
yoleaux | U+002B PLUS SIGN [Sm] (+) | ||
zengargoyle | .u ÷ | 00:56 | |
yoleaux | U+00F7 DIVISION SIGN [Sm] (÷) | ||
zengargoyle thinks i need bigger/better fonts :P | |||
lookatme | .u @ | 01:01 | |
yoleaux | U+0040 COMMERCIAL AT [Po] (@) | ||
01:01
vendethiel joined
|
|||
zengargoyle | .u TAG COMMERCIAL AT | 01:04 | |
yoleaux | U+E0040 TAG COMMERCIAL AT [Cf] (<control>) | ||
zengargoyle | .u TAG DIGIT NINE | 01:06 | |
yoleaux | U+E0039 TAG DIGIT NINE [Cf] (<control>) | ||
01:06
Cabanossi left
01:07
Cabanossi joined
|
|||
zengargoyle has no clue what TAG XXX are. :) | 01:08 | ||
.u COMMERCIAL MINUS SIGN | |||
yoleaux | U+2052 COMMERCIAL MINUS SIGN [Sm] (⁒) | ||
zengargoyle | m: say 9 ⁒ 4; | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Confused at <tmp>:1 ------> 3say 97⏏5 ⁒ 4; expecting any of: infix infix stopper postfix statement end statement modifier state… |
||
zengargoyle | .u ﹫@ | 01:10 | |
yoleaux | U+FE6B SMALL COMMERCIAL AT [Po] (﹫) | ||
U+FF20 FULLWIDTH COMMERCIAL AT [Po] (@) | |||
zengargoyle | unicode is weird.... | 01:11 | |
m: my ﹫tiny = 1,2,3; | 01:12 | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Malformed my at <tmp>:1 ------> 3my7⏏5 ﹫tiny = 1,2,3; |
||
zengargoyle | m: my @tiny = 1,2,3; | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Malformed my at <tmp>:1 ------> 3my7⏏5 @tiny = 1,2,3; |
||
zengargoyle guesses there isn't a Unicode table that says @ == ﹫ == @ ;/ | 01:15 | ||
geekosaur | the parser still has to know about it | 01:17 | |
zengargoyle | yeah, i'm just goofing off. | 01:18 | |
had no clue it was COMMERCIAL AT... wtf is COMMERCIAL anyways? | |||
i guess it's not just an AT SIGN. | 01:20 | ||
geekosaur | that's the formal name of it | 01:22 | |
originated on bills of lading | |||
01:22
Resol left
|
|||
zengargoyle | yeah, but there's a COMMERCIAL {AT,MINUS SIGN} and {SMALL,FULLWIDTH} COMERCIAL AT and TAG COMMERCIAL AT. that's the limit of COMMERCIAL in /usr/share/i18ncharpaps/UTF-8.gz | 01:23 | |
geekosaur | and only some commercial usages match the common usage; it gets used in a number of contexts, and sometimes means 'as' or 'for' instead of 'at', etc. | ||
01:25
vendethiel left
|
|||
zengargoyle | it seems rather specific out of all of the symbols to have so few named with COMMERCIAL is all i'm going on about. :) | 01:25 | |
lookatme | m: my @array = []; | 01:27 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Malformed my at <tmp>:1 ------> 3my7⏏5 @array = []; |
||
zengargoyle | guess i'd have to go dig through the Unicode Consortium pages for any sort of insight or resolution... | ||
or ask samcv :) | 01:28 | ||
samcv | ask me what? | ||
zengargoyle | what TAG and COMMERCIAL mean in Unicode :) | ||
lookatme | some unicode staff | ||
samcv | commercial doesn't mean anything | ||
it's just what the @ character is called because its usage was usually commercial before technology came around | 01:29 | ||
lookatme | .u ℗ | ||
yoleaux | U+2117 SOUND RECORDING COPYRIGHT [So] (℗) | ||
lookatme | .u © | ||
yoleaux | U+00A9 COPYRIGHT SIGN [So] (©) | ||
lookatme | .u ® | ||
yoleaux | U+00AE REGISTERED SIGN [So] (®) | ||
samcv | like 4kg wheat @ $4.50 | ||
that's how it used to be used before computers. and that's why it's called commercial at sign | |||
geekosaur | wikipedia has a discussion of this, yes | 01:30 | |
samcv | u: tag commercial at | ||
geekosaur | commercial/mercantile | ||
unicodable6 | samcv, U+E0040 TAG COMMERCIAL AT [Cf] () | ||
zengargoyle | yeah, just seems a bit whimsical being only the AT and a MINUS get the COMMERCIAL treatment. | ||
samcv | unidump U+E0040 | ||
unidump: U+E0040 | |||
unicodable6 | samcv, gist.github.com/a887bae7c15ade221f...079744fedc | ||
01:30
reino4477 joined
|
|||
reino4477 | is there a decent http library in perl 6? | 01:31 | |
samcv | well the tag one you can use for flags | 01:32 | |
www.unicode.org/reports/tr51/tr51-1...Tags_Notes | |||
didn't know there was an @ tag | |||
lookatme | greppable6 http | ||
:( | 01:33 | ||
zengargoyle | i sorta took tags like Field separator / Record separator, those normally not visibly but meaningfull things. | ||
huggable: eco http | |||
huggable | zengargoyle, nothing found | ||
zengargoyle | huggable: eco curl | ||
huggable | zengargoyle, nothing found | ||
zengargoyle | names | ||
i know there's a libcurl http among the other http modules.... | 01:34 | ||
lookatme | huggable: Curl | ||
huggable | lookatme, nothing found | ||
samcv | well check unicode 3.1 i guess. that's when the tag charecters were added. i'd look it up but i have to go to dinner :) | ||
lookatme | modules.perl6.org/#q=HTTP | 01:35 | |
zengargoyle | np, thanks samcv++ :) | ||
huggable: eco dict | |||
huggable | zengargoyle, nothing found | ||
reino4477 | is there a decent http library in perl 6? | ||
lookatme | There two module binding to curl | 01:36 | |
zengargoyle thinks huggable may be out of commision ATM... | |||
lookatme | reino4477, How about libcurl binding | ||
reino4477 | lookatme: well, I'm asking about a decent and just what works somehow | 01:38 | |
zengargoyle | [#perl6] | ||
reino4477 | **not just | ||
zengargoyle | modules.perl6.org/?q=http#q=http | ||
reino4477 | I'm able to do a search | 01:39 | |
zengargoyle | for some reason a search for curl shows nothing.... :( | ||
01:40
pompomcrab joined
|
|||
zengargoyle | Net::Curl:ver('0.1.0'):auth('github:azawawi') | 01:40 | |
LibCurl:ver('0.5.1') | |||
01:41
colomon joined
|
|||
zengargoyle | `zef list | fgrep -i curl`... i don't know what's up with huggable/eco or search on the web page. | 01:41 | |
01:42
mcmillhj joined
|
|||
ugexe | case sensitivity? | 01:42 | |
zengargoyle | www.youtube.com/watch?v=YNls6sM8qJA | ||
reino4477: ^^ YAPC::NA talk on LibCurl for Perl6 | 01:43 | ||
huggable: eco LibCurl | |||
huggable | zengargoyle, nothing found | ||
zengargoyle | huggable: eco Net::Curl | ||
huggable | zengargoyle, nothing found | ||
ugexe | there is also `zef search curl` | ||
zengargoyle just thinks that was how to talk to huggable... | |||
lookatme | m: use HTTP::Client; | 01:44 | |
camelia | ===SORRY!=== Could not find HTTP::Client at line 1 in: /home/camelia/.perl6 /home/camelia/rakudo-m-inst-1/share/perl6/site /home/camelia/rakudo-m-inst-1/share/perl6/vendor /home/camelia/rakudo-m-inst-1/share/perl6 CompUnit… |
||
zengargoyle | hehe i did `zef search '*curl*' first. :) | ||
guess it's a little more liberal than i expected. | 01:45 | ||
ugexe | ah i see... has to be `zef search Curl` | ||
01:45
ilbot3 left
|
|||
zengargoyle | ugexe: i was just goint to complain that zef doesn't wrap output..... | 01:46 | |
01:46
kyan left,
mcmillhj left
|
|||
zengargoyle | 1 |Zef::Repository::Ecosystems<cpan>|zef:ver('0.1.15'):auth('github:ugexe')|... | 01:46 | |
vs | |||
1 |Zef::Repository::Ecosystems<cpan>|zef:ver('0.1.15'):auth('github:ugexe')|It's like [cpanm] wearing high heels with a tracksuit | 01:47 | ||
zengargoyle hates things that cut off info just because you're in a 80 col terminal... | |||
01:47
kyan joined
|
|||
ugexe | zef search Curl --wrap | 01:48 | |
01:48
ilbot3 joined,
ChanServ sets mode: +v ilbot3
|
|||
zengargoyle | *yay* | 01:48 | |
01:48
reino4477 left
|
|||
ugexe | or --wrap=666 to set the col width to use | 01:48 | |
zengargoyle | complaint retracted. :) | 01:49 | |
01:49
kyan left
|
|||
ugexe | it doesn't format good with the table though | 01:49 | |
zengargoyle | yeah, just like psql and many other things. it's probably not a make-everybody-happy-at-once sort of thing. | 01:52 | |
i'm probably a dinosaur for mostly keeping to 80x24 terminals. :) | 01:53 | ||
geekosaur | speed 38400 baud; rows 54; columns 105; line = 0; | 01:54 | |
even we've upgraded :p | |||
01:57
mcmillhj joined
|
|||
zengargoyle really wants 64x16 for 1k blocks and each 1 code block has a shadow block with 1k worth of documentation. | 01:58 | ||
but seriously, i have often wished for a shadow block like documentation. a split that's synced to the code on one side and doc on the other... not this inline comment stuff.. | 02:00 | ||
lookatme | show document in split windows | 02:06 | |
02:06
mcmillhj left
|
|||
zengargoyle | yeah, but auto synced so additions in the code included space in the doc. maybe sync'd on function name and a tag in the doc. | 02:07 | |
02:07
skids left
02:08
jast left
|
|||
zengargoyle | so page up/down or scrolling or edits in the code window still keep the doc window in the appropriate place automagically. | 02:08 | |
lookatme | write in single document, split them when show in terminal | ||
this like emacs buffer | |||
02:08
jast joined
|
|||
zengargoyle | i think you're missing the auto-sync bit. | 02:09 | |
lookatme | yeah, that's, Hmm | ||
zengargoyle | you can totally split and show code on one side and doc on the other, the trick is keeping them tied together seamlessly. | ||
02:10
colomon_ joined
|
|||
zengargoyle | old FORTH systems had 1k blocks of code, cool systems had 1k block of doc for each 1k block of code (whether you use it or not). | 02:10 | |
02:11
colomon left,
colomon_ is now known as colomon,
noganex_ joined
|
|||
lookatme | oh | 02:11 | |
02:13
gdonald left
|
|||
zengargoyle | just a little more transparent than an editor split. basically every line in code window had a line in doc window and they could be sync'd because every page was exactly 1k characters. | 02:13 | |
02:14
noganex left
|
|||
lookatme | Hmm | 02:14 | |
zengargoyle | 10 1k blocks for code + 10 1k blocks for doc, just load block 1 code and block 1 doc. it's not as obvious or simple to keep code and doc sync'd when it's just a stream of text. hence inline comments and docs intermixed with code. | 02:15 | |
02:15
skids joined
|
|||
zengargoyle | it was also nice to sorta force documentation without cluttering code with comments... | 02:15 | |
just another of my pipe dreams that the implementation is beyond my skills or patience. :) | 02:17 | ||
02:19
pompomcrab left
|
|||
zengargoyle | i might be possible in the future to write a p6 editor in p6 and introspect and keep pod/comments sync'd side by side instead of inline. | 02:21 | |
or i might be the only person who likes such an ides. :P | 02:22 | ||
02:25
gdonald joined
|
|||
lookatme | Hmm, at least I like your idea | 02:26 | |
AlexDaniel | dogbert17: hello? | 02:28 | |
greppable6: HTTP | 02:29 | ||
greppable6 | AlexDaniel, gist.github.com/f557d10e3bbfd1b0ee...de8e675b85 | 02:30 | |
AlexDaniel | greppable6: use.*HTTP | ||
greppable6 | AlexDaniel, gist.github.com/1be48cfc061ef3c92e...c287ef86cf | ||
lookatme | greppable6: Curl | 02:33 | |
greppable6 | lookatme, gist.github.com/1bf947bae880e8d789...741dc7d78c | ||
AlexDaniel | wow, a lot of irrelevant stuff :) | 02:37 | |
02:37
stmuk joined
02:39
stmuk_ left
02:45
sufrostico joined
|
|||
AlexDaniel | .tell dogbert17 I fully support your work on the ticket queue, sorry I had to reopen two tickets. It's just that besides “rejected” and “resolved” there's also “open - testneeded” status :) | 02:49 | |
yoleaux | AlexDaniel: I'll pass your message to dogbert17. | ||
02:49
mcmillhj joined
02:54
mcmillhj left,
cyphase joined
02:57
mcmillhj joined
02:59
pilne left
03:01
mcmillhj left
03:02
khw left
03:07
Cabanossi left
03:08
Cabanossi joined
03:14
bwisti joined
03:26
seatek left
03:40
astj joined,
astj_ left
03:46
wamba joined
03:52
Actualeyes left,
Cabanossi left
03:54
Cabanossi joined
03:55
sufrostico left
04:22
astj left
04:31
astj joined
04:36
AlexDaniel left
04:52
xtreak joined
04:58
skids left
05:01
astj_ joined,
astj left
05:04
|oLa| joined
05:08
wigner joined
05:09
|oLa| left
05:10
|oLa| joined
05:12
wigner left
05:14
sivoais left
05:18
ufobat joined
05:23
Actualeyes joined
05:24
sivoais joined
05:26
nadim joined
05:30
BenGoldberg left
05:39
dct joined
05:53
jast left
05:56
jast joined
06:01
bwisti left
06:05
wamba left
06:08
andrzejku joined
06:13
andrzejku left
06:21
domidumont joined
06:25
domidumont left
06:26
domidumont joined
06:29
andrzejku joined
06:32
xtreak left,
xtreak joined
|
|||
andrzejku | hi | 06:34 | |
lookatme | andrzejku, hi | 06:35 | |
andrzejku | lookatme, could you look on my code please? | ||
lookatme | what code ? | 06:36 | |
andrzejku | lookatme, github.com/damaxi/InterestRate/blo...ntRole.pm6 | ||
lookatme | What's the problem ? | ||
andrzejku | the @month_remainings_interests array in while scope | ||
differs from out which is out | 06:37 | ||
however as I check yesterday perl6 array works more like pass by value | |||
06:38
vendethiel joined
|
|||
lookatme | andrzejku, How do you used `calculateDecreasingInstallment`? | 06:38 | |
06:38
Cabanossi left
|
|||
andrzejku | lookatme, I extend InterestRate class with roles | 06:38 | |
06:38
xtreak left
|
|||
andrzejku | than call this method there | 06:39 | |
06:39
xtreak joined
|
|||
andrzejku | github.com/damaxi/InterestRate/blo...ulator.pm6 | 06:39 | |
06:39
Cabanossi joined
|
|||
andrzejku | it looks like it took only last value | 06:39 | |
like it was passed by reference | |||
lookatme | please try binding `($capital_part, @month_remainings_interests) := self.calculateDecreasingInstallment` | 06:40 | |
andrzejku | lookatme, wait I will check | 06:41 | |
lookatme | andrzejku, it probably what you need | ||
andrzejku | lookatme, perl6 is awesome however it is not gonna be easy when you code tired and you don't know syntax and pitfalls very well | 06:43 | |
lookatme | andrzejku, the document somewhere may be explain this. As I know binding is like parameter capture, and assign not | 06:44 | |
zengargoyle | AnnualInterestNumber? | 06:45 | |
andrzejku | lookatme, the problem is not there, I putted say for @month_remainings in while scope and outside and let me show how it looks | 06:48 | |
lookatme | ok | 06:49 | |
andrzejku | lookatme, pastebin.com/xY3iVty0 | ||
inside @month_remaining has correct values | 06:50 | ||
and outside all values change to default | |||
lookatme | oh | ||
wait | |||
andrzejku | $month is incremented | ||
lookatme | it's @month_remainings_interests ? | 06:51 | |
andrzejku | yeah | ||
lookatme | oh ok | ||
andrzejku | what about bindings as I know that creates a value read only and make performance impact | 06:52 | |
06:54
domidumont left
|
|||
lookatme | andrzejku, I don't know what happened. Is that code can run on my pc ? | 06:55 | |
andrzejku | it should | ||
try to clone it and for ex. perl6 main.p6 391000 1.77 30 | |||
lookatme | ok | ||
andrzejku | I will try to fast debug it ;d however it would be my first time | ||
lookatme | andrzejku, I think the variable reference one instance | 07:01 | |
I don't know what cause this | |||
07:02
wamba joined
|
|||
lookatme | I make a clone `@month_remainings_interests.push: ($month.clone, $remaining_capital.clone, $interest_part.clone);` and it work | 07:02 | |
andrzejku, try this | |||
zengargoyle | try: @month_remainings_interests.push: [$month, $remaining_capital, $interest_p | ||
lookatme | zengargoyle, what's different [ and ( | 07:03 | |
zengargoyle | try [] instead of () in the push. | ||
lookatme was not noticed that he always use `[]` | 07:04 | ||
zengargoyle | or just remove the () totally. @month_remainings_interests.push: $month, $remaining_capital, $interest_part; | ||
lookatme | :) | 07:05 | |
zengargoyle | oh, nevermind removing them.... | ||
not sure exactly why () is different than () in this case. | |||
not sure exactly why [] is different than () in this case. -- DOH! | 07:06 | ||
lookatme | remove the `()`, that's become a comma expression. | 07:07 | |
or ? | |||
zengargoyle doesn't know the interest maths. :) | |||
07:07
notostraca joined
|
|||
lookatme | yeah, comma expression | 07:07 | |
and [] works fine | 07:08 | ||
also, clone is work | |||
07:09
parv joined
|
|||
andrzejku | mm sorry I am dumb :P | 07:09 | |
zengargoyle | @month_remainings_interests.push( |($month, $remaining_capital, $interest_ | ||
part) ); | |||
andrzejku | I tried to create array of tuples | 07:10 | |
[(a, b), (b, c)] | |||
zengargoyle | the () are pushing on the container instead of the value inside for some reason.... so each ends up with final value. | ||
i do not know why. :) | 07:11 | ||
07:11
TEttinger left,
notostraca is now known as TEttinger
|
|||
zengargoyle | try also: @month_remainings_interests.append( ($month, $remaining_capital, $interest | 07:12 | |
_part) ); | |||
append seems to be different than push. | |||
lookatme | m: class A { method clone(*%_) { nextwith(|%_); }; }; my @a; my $c = A.new; my $d = A.new; @a.push: ($c, $d); @a.push: [$c, $d]; | ||
07:12
vendethiel left
|
|||
camelia | ( no output ) | 07:12 | |
andrzejku | zengargoyle, I will back to you in 5-10minutes | ||
lookatme | m: class A { method clone(*%_) { say "CALL ME"; nextwith(|%_); }; }; my @a; my $c = A.new; my $d = A.new; @a.push: ($c, $d); @a.push: [$c, $d]; | 07:13 | |
camelia | ( no output ) | ||
lookatme | m: class A { method clone(*%_) { say "CALL ME"; nextwith(|%_); }; }; my @a; my $c = A.new; my $d = A.new; @a.push: ($c, $d); @a.push: [$c, $d]; say @a[0].[0].WHERE; say @a[1].[0].WHERE; | 07:14 | |
camelia | 140036006626368 140036006626368 |
||
lookatme | m: class A { method clone(*%_) { say "CALL ME"; nextwith(|%_); }; }; my @a; my $c = A.new; my $d = A.new; @a.push: ($c, $d); @a.push: [$c, $d]; say @a[0].[0].WHERE; say @a[1].[0].WHERE; $c = A.new; say @a[0].[0].WHERE; say @a[1].[0].WHERE; | ||
camelia | 140308650411904 140308650411904 140308650458112 140308650411904 |
||
zengargoyle is just looking for $month to increase instead of stay the same. | 07:15 | ||
maybe @thing.push: ($var1, $var2) is a bug.... or maybe a feature :) | 07:16 | ||
lookatme | yeah | ||
07:17
domidumont joined
|
|||
zengargoyle | i have seen a similar thing in other code where a variable keeps last value. i do not know if it is related or different. | 07:18 | |
lookatme | have you solved that ? | 07:22 | |
07:24
zakharyas joined
|
|||
zengargoyle | lookatme: it is known and there is a bug report. it is a weird case with * magic and ~~ and regex. (where using 'eq' instead of '~~' works. | 07:26 | |
.push: ($month, ... ).Slip also seems to work. | 07:27 | ||
lookatme | oh | ||
zengargoyle | i would expect .push: ($month, ...) to work... | 07:28 | |
07:28
abraxxa joined,
leont joined
|
|||
lookatme | zengargoyle, yeah, .List also work | 07:28 | |
maybe a bug | 07:29 | ||
zengargoyle | maybe a differnece between .push and .append | ||
zengargoyle doesn't really understand the difference between .push and .append... :) | 07:30 | ||
moritz | m: my @a = 1, 2; @a.push: [3, 4]; @a.append: [5, 6]; say @a.perl | ||
camelia | [1, 2, [3, 4], 5, 6] | ||
moritz | that is the difference | 07:31 | |
lookatme | append works fine except it flat the list | ||
zengargoyle | i think .append does the .Slip thing. | ||
moritz | "append automatically slips you" :-) | ||
lookatme | :) | ||
I agree with you, .push: ($month, ... ) would be work | 07:32 | ||
zengargoyle | why does .push: ($foo, $bar) not push a list of 2 values, but pushes a ref/container/whatnot that ends up holding the last value of $foo, $bar? | 07:33 | |
my @f; for 1..3 { @f.push: ($_) }; say @f; | 07:34 | ||
m: my @f; for 1..3 { @f.push: ($_) }; say @f; | |||
camelia | [1 2 3] | ||
zengargoyle | hehe, watch it work here and not there... :P | ||
lookatme | m: my @f; for 1..3 { @f.push: ($_, ) }; say @f; | ||
camelia | [(1) (2) (3)] | ||
lookatme | m: my @f; my $a; for 1..3 { $a = $_; @f.push: ($a, ) }; say @f; | 07:35 | |
camelia | [(3) (3) (3)] | ||
zengargoyle | m: my @f; my $m=0; for 1..3 { $m+=1; @f.push: ($m) }; say @f; | ||
camelia | [1 2 3] | ||
lookatme | That's the problem | ||
moritz, do you know what the .push happened ? | |||
with a list | |||
zengargoyle | m: my @f; my $m=0; for 1..3 { $m+=1; @f.push: ($m,'foo') }; say @f; | 07:36 | |
camelia | [(3 foo) (3 foo) (3 foo)] | ||
zengargoyle | bingo! | ||
^^ | |||
m: my @f; my $m=0; for 1..3 { $m+=1; @f.push: |($m,'foo') }; say @f; | 07:37 | ||
camelia | [1 foo 2 foo 3 foo] | ||
07:37
domidumont left
|
|||
andrzejku | sorry for question? what a difference between [] and () | 07:37 | |
lookatme | m: say [].WHAT; say ().WHAT; | ||
camelia | (Array) (List) |
||
lookatme | It's different type | ||
andrzejku | oh okay | 07:38 | |
lookatme | And we don't know what that .push happened | ||
07:38
domidumont joined
|
|||
andrzejku | lookatme, so @arr can be list and array | 07:38 | |
zengargoyle | andrzejku: [] will almost surely create a new thing (an Array) where the values can be changed, so it makes a new thing. () makes a list that is not changeable so maybe it just copies the reference-like thing...?? | 07:39 | |
andrzejku | class Array is List {} | ||
lookatme | andrzejku, maybe a Seq or other things | ||
07:39
domidumont left
|
|||
zengargoyle | dd (1,2,3) | 07:40 | |
m: dd (1,2,3) | |||
camelia | (1, 2, 3) | ||
zengargoyle | m: dd [1,2,3] | ||
camelia | [1, 2, 3] | ||
07:40
domidumont joined
|
|||
zengargoyle | m: dd (1,2,3)[0].WHAT | 07:40 | |
camelia | Int | ||
zengargoyle | m: dd (1,2,3)[0] = 4 | ||
camelia | Cannot modify an immutable Int (1) in block <unit> at <tmp> line 1 |
||
zengargoyle | m: dd [1,2,3][0] = 4 | ||
camelia | 4 | ||
zengargoyle | m: dd (1,2,3)[0].HOW | 07:41 | |
camelia | Perl6::Metamodel::ClassHOW.new | ||
andrzejku | ou list are immutable | ||
lookatme | it's not a container | ||
07:41
robertle left
|
|||
lookatme | in list | 07:41 | |
But that's not the hint, I think | |||
andrzejku | lookatme, I think it is gonna be to complecated | 07:42 | |
zengargoyle | yes, () are things that are immutable... doing [] instead will force a new writeable container to be made and initialized. | ||
andrzejku | lookatme, how can I create an array of immutable sublists x) | ||
lookatme | zengargoyle, yeah, it's copied data and store them in another container | ||
andrzejku | lookatme, did someone think about performance when did that? | 07:43 | |
zengargoyle | it may just be that you need to |() or ().Slip things to do what you think it will do. :) | ||
lookatme | m: my @a = (1, 2, 3).Slip; @a[0] = 54; | 07:44 | |
camelia | ( no output ) | ||
lookatme | m: my @a := (1, 2, 3).Slip; @a[0] = 54; say @a; | ||
camelia | Cannot modify an immutable Int (1) in block <unit> at <tmp> line 1 |
||
07:44
wamba left
|
|||
zengargoyle | m: my ($x,$y,$z); my @a := ($x, $y, $z); @a[0] = 1; | 07:46 | |
07:46
astj_ left
|
|||
camelia | ( no output ) | 07:46 | |
zengargoyle | m: my ($x,$y,$z); my @a := ($x, $y, $z); @a[0] = 1; say @a[0]. | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Malformed postfix call at <tmp>:1 ------> 3a := ($x, $y, $z); @a[0] = 1; say @a[0].7⏏5<EOL> |
||
07:46
astj joined
|
|||
zengargoyle | m: my ($x,$y,$z); my @a := ($x, $y, $z); @a[0] = 1; say @a[0]; | 07:46 | |
camelia | 1 | ||
zengargoyle | the 1, 2, 3 are specially actual Int things.... | 07:47 | |
lookatme | andrzejku, I don't know, maybe a little effect performance, it's all integer, not object | ||
zengargoyle | yeah... | ||
Juerd | lookatme: Everything is an object, including Ints | ||
zengargoyle | m: my ($x,$y,$z); $x=1; my @a := ($x, $y, $z); @a[0]; $x=10; say @a[0]; | 07:48 | |
camelia | 10 | ||
zengargoyle | m: my ($x,$y,$z); $x=1; my @a := ($x, $y, $z); say @a[0]; $x=10; say @a[0]; | ||
camelia | 1 10 |
||
zengargoyle | m: my ($x,$y,$z); $x=1; my @a = ($x, $y, $z); say @a[0]; $x=10; say @a[0]; | 07:49 | |
camelia | 1 1 |
||
andrzejku | lookatme, I don't get how the array can extend list | ||
lookatme | If they do a optimizing on integer, it would be fine | ||
andrzejku | that weird | ||
lookatme | andrzejku, extend list ? | ||
andrzejku | lookatme, is a list | ||
zengargoyle | m: my ($x,$y,$z); $x=1; my @a.push: ($x, $y, $z); say @a[0]; $x=10; say @a[0]; | 07:50 | |
camelia | (1 (Any) (Any)) (10 (Any) (Any)) |
||
andrzejku | lookatme, array is continous container and list not so they cann't be equal but you can transform values via push | ||
lookatme | andrzejku, yeah that's right | 07:51 | |
andrzejku, oh I got what you mean, sorry | 07:52 | ||
andrzejku, here is what the document said what is an Array | 07:53 | ||
An Array is a List which forces all its elements to be scalar containers, which means you can assign to array elements. | |||
andrzejku | lookatme, :) | 07:55 | |
lookatme | andrzejku, is that clear ? | ||
i.e. Array is a subset of List | 07:56 | ||
andrzejku | lookatme, yeah I need to look for documentation but probably that issue before should clasified as bug or clarified in intro | ||
07:57
cosimo joined
|
|||
lookatme | andrzejku, I don't know :) | 07:57 | |
andrzejku | lookatme, the question is how to create an reference array | ||
zengargoyle | i'm starting to guess you just need to .Slip it. | 07:58 | |
lookatme | maybe when they wake up, I mean master from Europe | 07:59 | |
m: my @a; @a[0] := (1, 2, 3); dd @a; | 08:00 | ||
camelia | Array @a = [(1, 2, 3),] | ||
lookatme | m: my @a; @a[0] := (1, 2, 3); dd @a; @a[0][0] = 4; | ||
camelia | Array @a = [(1, 2, 3),] Cannot modify an immutable Int (1) in block <unit> at <tmp> line 1 |
||
lookatme | andrzejku, ↑ | ||
zengargoyle | since there is no \$var like in p5 to pass by reference, and everything is an object, the default is basically pass by reference. | ||
you are pushing a list with ($month) (the container) onto an array over and over... it's the same container you push each time unless you do something to make a new one. | 08:01 | ||
Zoffix | andrzejku: docs.perl6.org/language/containers | ||
andrzejku: everything's "default" is because you're pushing containers and reusing the same containers | 08:02 | ||
08:02
jonas1 joined
|
|||
lookatme | m: my @a = []; my $x = 10; @a.push($x); @a.push($x); @a[0] = 11; dd @a; | 08:02 | |
camelia | Array @a = [11, 10] | ||
zengargoyle | otherwise you need a way to tell that you want to push the container instead of the value inside. | ||
Zoffix | I showed you three ways to decont yesterday :/ | 08:03 | |
"perl6 is awesome however it is not gonna be easy when you code tired" It'd be much easier if you made proper objects instead of using generic datastructures to heap a bunch of variables together | 08:05 | ||
zengargoyle | it is one of the weirder things in p6 | ||
zengargoyle still has trauma from GLR | 08:06 | ||
i think the weird is that () sorta makes a closure keeping the container while [] deconts and gives you a 'copy' of sorts. | 08:09 | ||
08:11
xtreak left
|
|||
Zoffix | Not really. Arrays give containers to their elements. | 08:12 | |
It's on the Everybody Knows level to my mind... | |||
zengargoyle | but a list can contain containers. | 08:14 | |
Zoffix | Sure. | ||
And you can bind your own container to an Array element. | |||
With scalar it's my $x = 42; vs my $y := 42; It's not weird that you can $x++ but not $y++, is it? | 08:16 | ||
But you can bind a container to $y and ++ it | |||
lookatme | m: my $x = 42; my $y := 42; say ++$x; $y := $y + 1; say $y; | 08:17 | |
camelia | 43 43 |
||
lookatme | m: my $x = 42; my $y := 42; ++$y; | ||
camelia | Cannot resolve caller prefix:<++>(Int); the following candidates match the type but require mutable arguments: (Mu:D $a is rw) (Int:D $a is rw) The following do not match for other reasons: (Bool $a is rw) (Mu:U $a is rw)… |
||
zengargoyle | how would one actually push a list onto an array withoud falling into the trap? | 08:18 | |
08:19
xtreak joined
|
|||
Zoffix | Which trap? | 08:26 | |
zengargoyle | my $things; while not finished() { my $x = something(); my $y = somethingelse(); push @things, ($x,$y);} | 08:27 | |
all of @things will be the same ($x, $y) of the last interation. how to build AoL vs AoA? | 08:28 | ||
08:28
cschwenz joined
|
|||
zengargoyle | when you really want immutable tuples as the result. | 08:28 | |
Zoffix | m: my @things; for ^10 { my $x = rand; my $y = rand; push @things, ($x,$y) }; dd @things | ||
camelia | Array @things = [(0.931975587174624e0, 0.583947015097645e0), (0.483737273714957e0, 0.83258998935469e0), (0.65110229441697e0, 0.324162172008149e0), (0.549915124136017e0, 0.361200362298923e0), (0.110868149633726e0, 0.890485250549652e0), (0.333903291591087e… | ||
Zoffix | ?? | ||
Is that the code you're talking about? | 08:29 | ||
You're making a new container on each iteration. | |||
zengargoyle | my $things; my ($x,$y); while not finished() { $x = something(); $y = somethingelse(); push @things, ($x,$y);} | 08:30 | |
Zoffix | m: my @things; my $x; my $y; for ^10 { $x = rand; $y = rand; push @things, ($x,$y)»<> }; dd @things | ||
camelia | Array @things = [(0.801360592079413e0, 0.583388471035365e0), (0.0619285680005101e0, 0.62801428213172e0), (0.365400123176733e0, 0.145330942225848e0), (0.45931868256555e0, 0.444358687169692e0), (0.769759559638631e0, 0.372590153464904e0), (0.667568134711939… | ||
Zoffix | Here you decont from the containers you're reusing | ||
zengargoyle | that's what doesn't work in the original question.... | ||
Zoffix | I don't see any deconts in the original code | ||
zengargoyle | oh, missed the >><> | 08:31 | |
my bad. | |||
Zoffix | .oO( Jesus operator ) |
||
parv | what is that calles, fish operator? | ||
s/calles/called/ | |||
zengargoyle adds to my list of things | 08:32 | ||
Zoffix | Decont is the <> thing. The hyper just hypers it | ||
m: my @things; my $x; my $y; for ^10 { $x = rand; $y = rand; push @things, ($x<>, $y<>) }; dd @things # works too | |||
camelia | Array @things = [(0.96865598711853e0, 0.326676109900493e0), (0.172875834492312e0, 0.866172719751773e0), (0.379645722125719e0, 0.720606150984329e0), (0.299306893974122e0, 0.922439594680222e0), (0.588092109489506e0, 0.794310481296526e0), (0.061336769649142… | ||
Zoffix | Or just push an Array instead of a List | 08:33 | |
zengargoyle | yeah, i got he array bit. just curious about the case where you *really* want lists. (not sure why) | ||
parv | Zoffix, would you please call Perl 6 something else, if you must, other than the name of software that implements the Perl 6 spec? | 08:34 | |
zengargoyle backs away slowly... | |||
08:34
wamba joined
|
|||
Zoffix | parv: convince TimToady to pick a better extended name to prepend. | 08:35 | |
lookatme | m: my @a; my $x; for 1..3 { $x = $_; @a.push: ($x, )>><>; }; say @a; | 08:36 | |
camelia | [(1) (2) (3)] | ||
Zoffix | So far I seem to be the only core dev who thinks the name is problematic. Despite people acknowledging there's a marketing problem (but not because of the name) or that people who preach the Rakudo mantra get abused (we should just talk to people who like Perl) | ||
lookatme | m: my @a; my $x; for 1..3 { $x = $_; @a.push: ($x, )>><>; }; @a[0][0] = 32; | ||
camelia | Cannot modify an immutable Int (1) in block <unit> at <tmp> line 1 |
||
08:37
Cabanossi left
08:39
Cabanossi joined
|
|||
parv | Zoffix, do you know what is marketing problem other than due the name? | 08:40 | |
Zoffix | parv: to quote: "Sounds to me like what we're missing is some shiny, positive lighthouse use cases that create excitement. PHP had a couple of really nice, open web applications which pulled people in. Code was horrible, but they were user friendly." | 08:42 | |
zengargoyle | AKA Ruby | 08:43 | |
Zoffix | It's the whole "killer app" mantra. People think if they just make a great product, people will use it. PHP didn't have really nice, open web applications. They lead in category (CMS). | 08:44 | |
parv | Zoffix: (*argh* come on.) I think that is a weak argument. Perl 6 does not need to produce that. | ||
zengargoyle | nope, the lead in terrible ease of provisioning VPS servers that couldn't step on each other like mod_perl | 08:45 | |
PHP won because it was per-apache process unlike mod_perl which was whole apache process. | 08:46 | ||
08:47
ufobat left
|
|||
zengargoyle | try to put dozens (or mor) of (unrelated) users under a single apache with mod_perl vs the same under PHP. | 08:47 | |
PHP - Perl for Home Pages. | 08:48 | ||
stripped down to allow an interpreter per process. | |||
parv | Zoffix, in case [Rr]akudo would be the only implementation for forseeable future, then I don't have any reason to request not to name the language based on the name of implementation. | 08:49 | |
zengargoyle | i say just call it 'p6', less typing. | 08:51 | |
besides, Camel is 'rakuda' | |||
09:06
abraxxa left,
abraxxa joined
09:09
ribasushi left
09:16
robertle joined
09:17
ribasushi joined
09:22
Cabanossi left
09:24
Cabanossi joined
09:38
lookatme left
09:39
robertle_ joined,
parv left
09:46
robertle left
09:48
domidumont left
09:50
nadim left
09:53
Cabanossi left
09:54
Cabanossi joined
10:05
zakharyas left
10:07
zakharyas joined,
rindolf joined
10:09
zakharyas left
10:11
zakharyas joined
10:12
Actualeyes left
10:23
zakharyas left
10:26
zakharyas joined
10:35
TEttinger left
10:39
Zoffix left
10:40
Geth left,
buggable left,
huggable left,
SourceBaby left
10:56
domidumont joined
|
|||
perlawhirl | m: say bag(<A B>) ⊂ bag(<A B C>) # This should be a blocker for 2017.10 since it will end up in Star | 10:57 | |
camelia | False | ||
lizmat | huh>? | 11:01 | |
hmmm | |||
11:09
zakharyas left
11:11
zakharyas joined
11:18
ab6tract joined
|
|||
ab6tract | lizmat: I defined symmetric difference as ($a (-) $b) (+) ($b (-) $a) | 11:18 | |
This feels sound to me. | |||
However, I've gotten quite tired of having to constantly justify this behavior 3 times over the last two years as you have felt free to change the behavior that is provided in the tests | 11:19 | ||
11:21
zakharyas left
|
|||
ab6tract | .tell lizmat the order does not matter for symmetric difference of a pair of bags/mixes because it is symmetric for a pair of inputs | 11:21 | |
yoleaux | ab6tract: I'll pass your message to lizmat. | ||
lizmat | . | ||
yoleaux | 11:21Z <ab6tract> lizmat: the order does not matter for symmetric difference of a pair of bags/mixes because it is symmetric for a pair of inputs | ||
ab6tract | that does not make it transitive and i do not see how you can have setty like semantics for mixes/bags | 11:22 | |
brb | |||
lizmat | m: my $a = <a b c>.Set; my $b = <c d e>.Set; dd $a (^) $b; dd ($a (-) $b) (+) ($b (-) $a)) | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Unexpected closing bracket at <tmp>:1 ------> 3a (^) $b; dd ($a (-) $b) (+) ($b (-) $a)7⏏5) |
||
lizmat | m: my $a = <a b c>.Set; my $b = <c d e>.Set; dd $a (^) $b; dd ($a (-) $b) (+) ($b (-) $a) | ||
camelia | set("d","e","b","a") ("e"=>1,"d"=>1,"b"=>1,"a"=>1).Bag |
||
11:28
nadim joined
11:33
xtreak left
11:38
araraloren joined
11:39
Cabanossi left
|
|||
araraloren | evening | 11:39 | |
11:39
xtreak joined,
Cabanossi joined
|
|||
lizmat | araraloren /o | 11:40 | |
araraloren | ^_^ | ||
11:44
xtreak left,
Actualeyes joined,
xtreak joined
|
|||
nadim | someone seen azawawi lately? | 11:46 | |
11:48
xtreak left
11:49
xtreak joined
|
|||
[Coke] | .seen azawawi | 11:53 | |
yoleaux | 09:11Z <Zoffix> [Coke]: Looks like something busted with RT. I saw an email reply to RT#131722 yesterday and it had the 'bug follow up' address in it, but there's nothing on the ticket when vewing on Web | ||
synopsebot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=131722 | ||
yoleaux | I saw azawawi 27 May 2017 12:50Z in #perl6: <azawawi> jnthn: in Graphics::PLplot im aiming on providing Raw (native) and cooked with sugar API :) | ||
10:13Z <Zoffix> [Coke]: what's the usual timeframe to receive a check from TPF? Wondering if mine is lost or if it usually takes a long time. | |||
[Coke] | zoffix: email to RT can be slow, as it's possible to require a human to approve a message. | ||
zoffix: no idea, but will ping the treasurer. | 11:54 | ||
11:55
Geth joined,
Geth left,
Geth joined
|
|||
ab6tract | lizmat: I meant in terms of the reduce form of the operator | 11:58 | |
11:59
Zoffix joined,
raschipi joined
|
|||
lizmat | ab6tract: bit distracted atm, will get back to it :-) | 11:59 | |
fwiw, it was always my intent to 1. make things faster, and 2. fix things I found broken on the way | 12:00 | ||
perhaps the finding of brokenness was incorrect | |||
12:00
Geth_ joined,
ChanServ sets mode: +v Geth_
|
|||
leont | It seems my .travis.yml is outdated (still using panda installdeps). Anyone have a good example of how to do that now? | 12:00 | |
lizmat | and I know I introduced new brokenness along the way | ||
12:00
buggable joined,
ChanServ sets mode: +v buggable,
huggable joined,
ChanServ sets mode: +v huggable
|
|||
moritz | leont: I think you can zef install --verbose . | 12:00 | |
12:01
ZofBot joined,
ChanServ sets mode: +v ZofBot,
NeuralAnomaly joined,
ChanServ sets mode: +v NeuralAnomaly
|
|||
moritz | which installs dependencies, and run tests, and even installs your modules | 12:01 | |
ab6tract | lizmat: to me the question is, can this palindrome code be made to work as expected for a list of inputs vs just two: sub palindrome($a, $b) { return so $a.comb.Bag (^) $b.comb.Bag == bag() } | ||
moritz | s/s$// | ||
ab6tract | vs sub palindrome(@p) { return so [(^)] @p == bag() } | 12:02 | |
leont | Would I need a rakudobrew build-zef? Or can I assume it's already there? | ||
Geth_ | ecosystem: 06ea7cdb4c | (Zoffix Znet)++ | META.list Revert "Remove all my modules" This reverts commit 262da75685d591d4d5604fc54b4aec3e88167073. |
||
moritz | leont: yes, needs that | 12:03 | |
leont: github.com/moritz/Math-Model/blob/...travis.yml | |||
that's what I use right now | |||
ab6tract | erm, sub palindrome(@p) { return so [(^)] @p>>.comb.Bag == bag() } | ||
lizmat | ab6tract: whether all words are palindromes of each other ? | 12:04 | |
ab6tract | lizmat: sorry, brainfart -- not palindrome specifically, but whether the words are all composed of the same number of the same characters | 12:05 | |
lizmat | isn't that the definition of a palindrome ? | 12:06 | |
ab6tract | anagram | ||
lizmat | ah,. duh | ||
yup | |||
moritz | [eqv] @p.map(*.comb.Bag) # ? | ||
ab6tract | :) | ||
lizmat is still distracted | |||
ab6tract | moritz: i'm not looking for a specific answer, i'm saying that the symmetric difference operator should be able to extend from infix to reduce and maintain expectations | 12:08 | |
and note also that symmetric difference for lists of sets is not something i found documented somewhere, though maybe someone with serious math creds knows ones | 12:09 | ||
but especially for bags and mixes, there is not formal definition of symmetric difference that i have seen. | 12:10 | ||
*no | |||
12:12
xtreak left
|
|||
lizmat | well, In extrapolate from what you did for sets: basically include only the ones that occur once | 12:14 | |
ab6tract | but alas, i guess i've shot my own implementation down... | ||
lizmat: yeah, but that's easy for keys. when you have weights it gets a lot trickier | 12:15 | ||
perlawhirl | while not "official literature" multiset sym diff is mentioned here mathematica.stackexchange.com/ques...-multisets | ||
12:15
Dunearhp_ is now known as Dunearhp
|
|||
lizmat | well, I interpreted that as: all the elements that occur in only one Set | 12:15 | |
extrapolating that to Bags, it would mean the difference between the highest and second highest number of occurrences seen for an element | 12:16 | ||
perlawhirl | as a reference point, there is a multiset lib for python (not Collections, there is another called multiset) that implements a sym diff for bags | ||
ab6tract | right, but a different approach could be "all the elements that occur in only n-1 Sets" | ||
lizmat | perlawhirl: link and explanation of the algorithm used ? :-) | 12:17 | |
ab6tract | lizmat: seems reasonable and actually makes the infix/reduce behavior work | ||
that i outlined for anagrams | |||
lizmat | ab6tract: and extrapolating that to Mixes, works the same way | ||
except you can get positive weights from only negatives | 12:19 | ||
12:19
Geth left,
Geth joined
|
|||
lizmat | m: dd (a => -1).Mix (^) (a => -2).Mix | 12:19 | |
camelia | ("a"=>1).Mix | ||
perlawhirl | i did link the on on mathematica. the python module source is here: github.com/wheerd/multiset | ||
or more specifically: github.com/wheerd/multiset/blob/ma...et.py#L329 | |||
ab6tract | right but that's because it is recording the distance between the values of the keys | 12:20 | |
perlawhirl | I had a bunch of pages bookmarked. the reason I found this bug is because i am writing a multiset lib for p5, using p6 and python as references. | ||
ab6tract | i think your approach makes a lot of sense and certainly making the output indepentent of the order of inputs has a great deal of appeal | ||
perlawhirl | someone could ask the question on #math :D | 12:21 | |
raschipi | #math, not even once | 12:22 | |
12:22
FoxBot_ joined,
Cabanossi left
|
|||
perlawhirl | hah | 12:22 | |
ab6tract | lizmat: so consider me on board .. let me know once the details shake out and i will write the docs | 12:23 | |
perlawhirl | lizmat: oeis.org/wiki/Multisets | ||
lizmat: has a section called "Generalized set operations". last point mentions sym diff | 12:24 | ||
ab6tract | unless of course all of perlawhirl++'s links turn out something better | ||
12:24
Cabanossi joined
|
|||
perlawhirl | ab6tract: i failed math... so a lot of info i found just goes in one ear and out the other :D | 12:25 | |
www.cplusplus.com/reference/algorit...ifference/ | |||
There's a java lib as well, but i think that's enough links for now... i mainly used the term 'multiset' when i was searching cause it found more math-y type results | 12:27 | ||
the java one defines it as "The quantities of equal elements get subtracted from each other (maximum minus minimum)" | |||
lizmat | perlawhirl: is that for 2 or 2+ multisets ? | 12:29 | |
12:30
astj left
|
|||
perlawhirl | hmm. i'm not entirely sure... i was mainly concerning myself with binary operations... but i understand the point of contention here is with reduction. I'll let you know if i find something specific to 2+ | 12:31 | |
12:36
zakharyas joined
12:41
zazx898 joined
12:43
astj joined
12:46
Technaton joined
12:47
nicq20 joined
12:48
astj left
|
|||
perlawhirl | hrm... ok, so i dunno how authorative this video is, but it implies order or operations does matter: www.youtube.com/watch?v=PxffSUQRkG4 | 12:48 | |
ie. A Δ B Δ C =:= ( A Δ B ) Δ C | |||
12:48
mcmillhj joined
|
|||
perlawhirl | it's talking about sets.. but p6 sets don't act like this | 12:48 | |
do they/ | |||
? | |||
ab6tract | perlawhirl: the implementation i initially provided did this for sets and bags/mixes | 12:49 | |
but it conflicted with a test case in 6.c-errata | |||
so i fixed my patch to only use that behavior on bags/mixes | |||
nice to read some validation though :) | 12:50 | ||
perlawhirl | hmmm i'm not sure what i belive... wikipedia says The symmetric difference is commutative and associative | ||
wikipedia says: A Δ ( B Δ C ) =:= ( A Δ B ) Δ C | 12:51 | ||
12:51
Cabanossi left
|
|||
lizmat | but that all applies to Sets, not ti multisets/Bags ? | 12:52 | |
12:52
nadim left
12:53
nicq20 left
|
|||
perlawhirl | true... i'm just digging up what i can. i'm not sure it's helping | 12:54 | |
12:54
Cabanossi joined
12:58
nicq20 joined,
FoxBot_ left
|
|||
lizmat | bbiab | 13:01 | |
13:02
lizmat left
13:06
lizmat joined
13:10
lucasb joined
13:11
AlexDaniel joined
|
|||
ab6tract | perlawhirl: well, imo it does highlight that we are into "new frontier" territory with some of this behavior | 13:13 | |
13:14
nicq20 left
13:15
nicq20 joined
13:22
jonas1 left
13:24
andrzejku left
13:27
nicq20 left,
Zoffix left
13:29
skids joined
13:30
Geth left
13:31
Geth joined
|
|||
ambs | any [email@hidden.address] manager around? | 13:34 | |
araraloren | :) | 13:36 | |
What's that | |||
Juerd | A mailing list | 13:42 | |
mst | oh, wow, that still exsts? | 13:44 | |
13:49
eliasr joined
|
|||
ambs | I still get mails there, would like to change subscription, but can't send e-mail from the e-mail I am registered with. | 13:50 | |
timotimo | just fake your from address :D | 13:51 | |
araraloren | junk mail | 13:53 | |
13:54
ChoHag joined
13:57
perlpilot joined
14:04
bdmatatu joined
14:06
mcmillhj left,
kurahaupo joined
14:07
ChoHag left
14:09
ChoHag joined
14:10
wamba left
14:11
lucasb left
14:13
konsolebox joined
14:14
linuksz joined
|
|||
linuksz | why don't this work? | 14:15 | |
my @numbers = ( 'one', 'two', 'three', 'four', 'five', 'six', 'seven' ); | |||
my @selected = ( 'two', 'three', 'five' ); | |||
@numbers.grep({ $_ ~~ @selected}).say; | |||
i want it to print two three five | |||
araraloren | $_ (elem) @selected | 14:16 | |
this would be work | |||
14:17
mcmillhj joined
|
|||
linuksz | and why the smartmatch not? it isn't for it? | 14:18 | |
araraloren | Seems like not | 14:19 | |
docs.perl6.org/language/operators#infix_~~ | 14:20 | ||
raschipi | @numbers.grep({ $_ ~~ any(@selected)}).say; | 14:23 | |
linuksz | both works. thanks. | 14:25 | |
14:30
ab6tract left
14:33
ptolemarch left,
ptolemarch joined
14:39
Cabanossi left,
Cabanossi joined
14:45
domidumont left,
khw joined
|
|||
moritz | @numbers.grep(any(@selected)).say | 14:45 | |
grep does smart-matching on its argument already | |||
14:47
lucasb joined,
domidumont joined
14:55
nadim joined
14:57
ctilmes joined
14:59
zakharyas left
15:00
alimon joined,
zazx898 left
|
|||
araraloren | What's the mean of `inhandled Failure detected in DESTROY` | 15:11 | |
s/in/un/ | |||
timotimo | it means something failed and you threw the failure object away without inspecting or sinking it | 15:12 | |
moritz | DESTROY methods are called by the GC | ||
timotimo | m: sub fails { fail "oh no" }; for ^100 { my $ = fails; 1 } | ||
camelia | WARNINGS for <tmp>: Useless use of constant integer 1 in sink context (line 1) |
||
15:12
kerframil joined
|
|||
timotimo | m: sub fails { fail "oh no" }; for ^100_000 { my $ = fails; 1 } | 15:12 | |
moritz | so there is no ordinary Perl 6 code that can catch it | 15:13 | |
camelia | (timeout)WARNINGS for <tmp>: Useless use of constant integer 1 in sink context (line 1) WARNING: unhandled Failure detected in DESTROY. If you meant to ignore it, you can mark it as handled by calling .Bool, .so, .not, or .defined methods. The Failur… |
||
timotimo | m: use nqp; sub fails { fail "oh no" }; for ^100 { my $ = fails; nqp::force_gc; 1 } | ||
camelia | WARNINGS for <tmp>: Useless use of constant integer 1 in sink context (line 1) |
||
moritz | so the compiler produces that warning | ||
timotimo | hmm. | ||
moritz | timotimo: you missed the "in DESTROY" part | ||
m: class A { method DESTROY() { fail "foo" } }; $ = A.new for ^100; use nqp; nqp::force_gc(); say 42 | 15:14 | ||
camelia | 42 | ||
moritz | hm | ||
araraloren | github.com/araraloren/perl6-app-sn...in/snippet | ||
moritz | m: class A { method DESTROY() { die "foo" } }; $ = A.new for ^100; use nqp; nqp::force_gc(); say 42 | ||
camelia | 42 foo in method DESTROY at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
araraloren | sometimes it warning me that | ||
message | |||
not always | |||
line 10 | |||
15:15
ufobat joined
|
|||
araraloren | So is there a pretty way, get a name inside a module or class | 15:16 | |
github.com/araraloren/perl6-app-sn...ppet/C.pm6 | |||
This what I want use as a plugin | 15:17 | ||
15:20
buggable left
|
|||
araraloren | @_@ | 15:20 | |
15:21
cdg joined
15:22
cdg_ joined,
buggable joined,
ChanServ sets mode: +v buggable
15:23
dct left
15:25
cdg left
15:30
pierre_ joined
15:32
SourceBaby joined,
ChanServ sets mode: +v SourceBaby
15:34
flatwhite joined,
kerframil left,
flatwhite is now known as kerframil,
pierre_ left
15:37
Cabanossi left
15:39
Cabanossi joined
|
|||
robertle_ | is there a way to clear the precompiled modules cache? I have a (probably wrong) suspicion that it is not being updated when I re-install via zef... | 15:43 | |
15:46
wamba joined
15:56
gdonald left
15:57
bartolin joined
15:59
Skarsnik joined,
zakharyas joined
16:03
zakharyas left
16:05
zakharyas joined
|
|||
araraloren | rakudo report `No such symbol 'MyModule'` | 16:06 | |
16:06
mcmillhj left
|
|||
araraloren | What's that warning mean ? | 16:06 | |
16:08
zazx898 joined
16:09
gdonald joined
|
|||
[Coke] | You're referring to a class that wasn't defined. | 16:10 | |
class/type/module etc. | |||
16:12
domidumont left
|
|||
[Coke] | m: MyModule.new; say "alive" | 16:12 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared name: MyModule used at line 1 |
||
Skarsnik | Hello | ||
16:13
linuksz left
16:14
nicq20 joined
16:15
mcmillhj joined
16:18
troys joined
|
|||
raschipi | Oi Skarsnik | 16:20 | |
16:21
robertle_ left
|
|||
araraloren | [Coke], but I have required it | 16:22 | |
And it's a warning, not a error | 16:23 | ||
16:26
ggoebel joined,
lucasb left
|
|||
nicq20 | Are slangs still in flux? I have not checked in a while... | 16:27 | |
araraloren | It's no document, don't know | ||
16:29
abraxxa left
|
|||
nicq20 | Ok. I'll just have to fiddle around with it then. :) | 16:30 | |
timotimo | moritz: no, "in destroy" means that the destroy method of the failure is called | 16:32 | |
araraloren | Anyway, If any one interested, please check out this gist.github.com/araraloren/ea1bf8d...45f778fc43 | 16:36 | |
night 88 | |||
16:38
Cabanossi left,
araraloren left
16:39
Cabanossi joined
16:42
cschwenz left
16:43
setty1 joined
16:47
ggoebel left
|
|||
bdmatatu | p6: my $a = gather { take 1; take 5; take 42; } ; say join ', ', $a; | 16:51 | |
yoleaux | 7 Jul 2017 22:15Z <Zoffix> bdmatatu: yeah it's a bug in Range.int-bounds. It's supposed hang. 1e100 is a Num and there you have only 15 digits of precision, so the other 86 digits are all floating point noise. The buggy Range.int-bounds erroneously converts that 15 digits + 86 digits of noise into a Int, which is why you get the wrong sum. And the reason the fixed version hangs is because when failing to find .int-bounds, it'll | ||
camelia | 1 5 42 | ||
yoleaux | 7 Jul 2017 22:15Z <Zoffix> bdmatatu: fully reify the range to get the elements, but while doing that you're again hit with limited precision in the 1e100 and once the reification reaches 1e15, the next +1 to it would still end up a 1e15 (not enough precision for +1), so it'd loop at that point forever. We can probably improve that to give an error tho | ||
bdmatatu | I think this doc page is not quite right: docs.perl6.org/syntax/gather%20tak...ather_take | 16:52 | |
raschipi | m: my $a = gather { take 1; take 5; take 42; } ; say join ', ', @$a; | ||
camelia | 1, 5, 42 | ||
bdmatatu | Much better | 16:53 | |
raschipi | my $a = gather { take 1; take 5; take 42; } ; say join ', ', |$a; #works too | ||
m: my $a = gather { take 1; take 5; take 42; } ; say join ', ', |$a; #works too | 16:54 | ||
camelia | 1, 5, 42 | ||
bdmatatu | I noticed $a.List works, but not sure how the docs should look | ||
raschipi | It's because attribution is mostly eager. | ||
m: say join ', ', gather { take 1; take 5; take 42; } | 16:55 | ||
camelia | 1, 5, 42 | ||
raschipi | Since the need to list or slip comes from the attribution, and not from the gather/take, i think the last one would be better. | ||
timotimo | i might have written $a.join(', ') | 16:56 | |
16:56
domidumont joined
|
|||
raschipi | m: say (gather { take 1; take 5; take 42; }).join(', ') | 16:57 | |
camelia | 1, 5, 42 | ||
raschipi | m: my @a = gather { take 1; take 5; take 42; }; say join ', ', @a; | 16:59 | |
camelia | 1, 5, 42 | ||
raschipi | m: my @a = gather { take 1; take 5; take 42; }; @a.join(', ').say; #with timotimo's improvement | 17:01 | |
camelia | 1, 5, 42 | ||
17:01
ctilmes left
|
|||
timotimo | that's not an improvement, it's a question of taste | 17:01 | |
raschipi | Well, it sure is, but I like you's more, which is what I meant. | 17:02 | |
17:05
zakharyas left
17:07
zakharyas joined
17:17
zakharyas left
17:19
cosimo left
|
|||
Geth_ | doc: 145ae16db2 | (Brian Duggan)++ | doc/Language/control.pod6 Fix gather/take example |
17:36 | |
dalek | c: 145ae16 | (Brian Duggan)++ | doc/Language/control.pod6: Fix gather/take example |
||
17:51
pilne joined,
cosimo joined
17:52
troys is now known as troys_
|
|||
kybr | can we use regexes on Buf/Blobs? i want to make a grammar to decode a binary. found this: gist.github.com/smls/bc5d0fb42f199574e339 | 18:01 | |
yoleaux | 09:33Z <Zoffix> kybr: you should add yourself to CREDITS file, unless you want to be credited as all-lowercase "karl yerkes": github.com/perl6/doc/blob/master/CREDITS | ||
kybr | yoleaux: thanks. | ||
18:02
cosimo left
18:03
avalenn joined
|
|||
Geth | doc: ca4e4f5169 | (karl yerkes)++ (committed using GitHub Web editor) | CREDITS Update CREDITS |
18:04 | |
timotimo | huh dalek | 18:09 | |
18:13
andrzejku joined
18:15
nicq20 left
|
|||
zengargoyle | kybr: there's also this 'unpack' idea: gist.github.com/Juerd/ae574b87d40a66649692 | 18:17 | |
18:19
nicq20 joined
|
|||
zengargoyle | i'm just using pack/unpack but i expect that may go away in the future since it's so p5-ish. if you come up with something nicer, let me know. :) | 18:22 | |
18:24
travis-ci joined
|
|||
travis-ci | Doc build passed. Brian Duggan 'Fix gather/take example' | 18:24 | |
travis-ci.org/perl6/doc/builds/252095764 github.com/perl6/doc/compare/aebdc...5ae16db2f7 | |||
18:24
travis-ci left
|
|||
lizmat | zengargoyle: there's PackUnpack in the ecosystem | 18:27 | |
so it will stay, I would think | |||
fwiw, the module could use some love by people other than me :-) | |||
18:28
zazx898 left
|
|||
andrzejku | lizmat hey | 18:29 | |
lizmat | andrzejku hi! | ||
18:31
finley joined
|
|||
TimToady | nicq20: we haven't quite finished hooking up in-line slangs yet | 18:31 | |
m: BEGIN $?LANG.refine_slang('MAIN', role { token apostrophe { <[ - ' \\ ]> } }); my $foo\bar = 42; say $foo\bar; | |||
camelia | 42 | ||
TimToady | that's about as close as we can get so far | ||
18:32
finley left
|
|||
TimToady | the interesting bit will be getting quasi-quotes to work as actions without directly using QAST | 18:33 | |
nicq20 | TimToady: That's much nicer than what I had last seen! Is `use nqp` still needed? | 18:34 | |
TimToady | not for that | ||
as you can see by the fact that it worked | |||
or are you referring to QAST? that's nqp-land still | |||
nicq20 | Err, sorry. Yeah, I ment QAST. | 18:35 | |
18:35
lichtkind joined
|
|||
TimToady | as masak has been discovering over the last couple years, the syntax is not all that hard to deal with, but the semantics you attach can be "interesting" | 18:36 | |
18:54
travis-ci joined
|
|||
travis-ci | Doc build errored. karl yerkes 'Update CREDITS' | 18:54 | |
travis-ci.org/perl6/doc/builds/252105811 github.com/perl6/doc/compare/145ae...4e4f5169af | |||
18:54
travis-ci left
|
|||
buggable | [travis build above] ✓ All failures are due to timeout (1), missing build log (0), GitHub connectivity (0), or failed make test (0). | 18:54 | |
18:55
espadrine joined
18:57
domidumont left
19:02
dct joined
19:16
ksa_ joined,
zazx898 joined
19:19
ksa_ left
19:21
TEttinger joined
19:43
dwarring joined,
kerframil left
19:44
troys_ is now known as troys
19:48
zazx898 left
19:52
Cabanossi left
19:54
Cabanossi joined
19:57
ufobat left
20:03
bdmatatu left
20:09
Skarsnik left
|
|||
timotimo | TimToady: can you put the code that parses escape codes and such up somewhere so i don't have to reinvent the wheel? | 20:13 | |
20:14
dct left
20:21
nicq20 left
20:22
nicq20 joined
20:29
andrzejku left
20:34
cpage__ joined
20:35
cpage_ left,
cpage__ is now known as cpage_
20:40
troys is now known as troys_
|
|||
gfldex | m: my \a := lazy gather for 1..3 { .take }; say a.perl | 20:49 | |
camelia | Cannot .elems a lazy list in block <unit> at <tmp> line 1 |
||
20:56
grumble is now known as gurmble
20:57
troys_ is now known as troys
|
|||
gfldex | could a slang add a sigil today? (I'm found myself fancy a sigil that means Iterable.) | 20:57 | |
21:02
konsolebox left
21:04
konsolebox joined
21:10
mcmillhj left
|
|||
raschipi | m: say "New sigil will be:{(0..0xFFFF).pick.chr}" | 21:11 | |
camelia | Error encoding UTF-8 string: could not encode Unicode Surrogate codepoint 55894 (0xDA56) in block <unit> at <tmp> line 1 |
||
21:11
shlomif joined
|
|||
raschipi | m: say "New sigil will be:{(0..0xFFFF).pick.chr}" | 21:11 | |
camelia | New sigil will be:즇 | ||
21:12
shlomif left,
rindolf left
|
|||
lizmat | gfldex: isn't that what '@' is all about? | 21:15 | |
21:16
raschipi left
|
|||
geekosaur | @ is about Positional, not Iterable | 21:18 | |
21:19
ChoHag left
21:20
wamba left,
john51 left
21:21
skids left,
ChoHag joined,
john51 joined
21:23
john51 left
21:26
john51 joined
21:27
cosimo joined
|
|||
lizmat | and another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2017/07/10/...do-is-hot/ | 21:28 | |
21:29
lizmat left,
lizmat joined
21:36
Cabanossi left
|
|||
Geth | doc: 29e7f545bb | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/5to6-perlvar.pod6 Reword to clarify our autoflush behaviour |
21:38 | |
21:39
Cabanossi joined
|
|||
gfldex | m: sub s(*@i){ say @i.is-lazy }; s lazy (1,); | 21:42 | |
camelia | True | ||
gfldex | m: sub s(**@i){ say @i.is-lazy }; s lazy (1,); | 21:43 | |
camelia | False | ||
gfldex | is that doced? | ||
21:44
atweiden joined
|
|||
lizmat | gfldex: feels like a bug to me, that the **@a iterator is not passing through the state of its source iterator | 21:45 | |
but then again, I'm very tired so I should probably refrain from commenting now | |||
gfldex | it doesn't feel like one to me bacause one could call it with two lazy lists or a mix of lazy and non-lazy stuff | 21:46 | |
lizmat | as soon as one of the lists is lazy, shouldn't it be marked as lazy in total? | 21:47 | |
bed& | |||
21:48
raiph left
21:57
ChoHag left
21:58
hythm left
21:59
nadim left,
hythm joined,
hythm left
22:01
setty1 left
22:02
kerframil joined
22:05
jameslenz left
22:09
ChoHag joined
22:14
deep-book-gk_ joined
|
|||
TimToady | m: sub s(**@i){ say @i[0].is-lazy }; s lazy (1,); | 22:16 | |
camelia | True | ||
22:17
deep-book-gk_ left
|
|||
TimToady | you can have a non-lazy list of lazy lists | 22:17 | |
m: for (1...*),(1...*) -> $l { say $l.is-lazy } | 22:19 | ||
camelia | True True |
||
22:26
kurahaupo_ joined
22:29
kurahaupo left,
travis-ci joined
|
|||
travis-ci | Doc build errored. Zoffix Znet 'Reword to clarify our autoflush behaviour' | 22:29 | |
travis-ci.org/perl6/doc/builds/252181531 github.com/perl6/doc/compare/ca4e4...e7f545bb74 | |||
22:29
travis-ci left
|
|||
buggable | [travis build above] ✓ All failures are due to timeout (1), missing build log (0), GitHub connectivity (0), or failed make test (0). | 22:29 | |
22:33
cosimo left
22:38
Cabanossi left,
kurahaupo_ left
22:39
Cabanossi joined
22:54
samb1 joined
22:59
jferrero joined
|
|||
japhb | .ask skaji Are you the mi6 author? (#perl6-toolchain is guessing so.) If you are, I'd like to say THANK YOU. mi6 has greatly reduced my pain in pulling apart and re-namespace-ing a Perl 6 project that had become a big ball of mud. | 23:14 | |
yoleaux | japhb: I'll pass your message to skaji. | ||
23:19
kerframil left,
kerframil joined
|
|||
kybr | how do you call a method or your parent class? | 23:19 | |
23:20
lichtkind left
|
|||
kybr | aaah. i think i need multi | 23:20 | |
23:20
BenGoldberg joined
23:21
leont left
|
|||
timotimo | not necessarily | 23:24 | |
you can self.NameOfParentClass::name-of-method | |||
23:25
cdg joined,
cdg left
23:28
cdg_ left
|
|||
skaji | japhb: thanks!! | 23:39 | |
yoleaux | 23:14Z <japhb> skaji: Are you the mi6 author? (#perl6-toolchain is guessing so.) If you are, I'd like to say THANK YOU. mi6 has greatly reduced my pain in pulling apart and re-namespace-ing a Perl 6 project that had become a big ball of mud. | ||
Geth_ | ecosystem: 314cc8b727 | (Brian Duggan)++ | META.list Add WebService::AWS::S3 to ecosystem |
23:41 | |
23:48
dwarring left
|
|||
kybr | yay! somebody made vim understand symbols-with-dashes in my perl6 code. | 23:51 |