»ö« 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:00
mcmillhj left
00:15
evalable6 left,
evalable6 joined,
ChanServ sets mode: +v evalable6
00:17
HoboWithAShotgun left
00:26
astj joined
00:28
thou joined
00:31
astj left
00:32
P6Bot joined
00:33
P6Bot left
00:45
troys is now known as troys_
00:47
cgfbee left
|
|||
thou | Is Cat / cat() (lazy Str interface) gone away? | 00:47 | |
any replacement I ought to know about? | 00:48 | ||
00:53
Cabanossi left
|
|||
Geth_ | synopsebot: deec85bc50 | (Zoffix Znet)++ | 4 files First draft That doesn't seem to work on my local box :/ Gonna try another one |
00:53 | |
00:56
Cabanossi joined
00:58
Zoffix joined
|
|||
Zoffix | thou: it's yet to be implemented | 00:58 | |
thou | Zoffix, OK, thanks. For some reason I imagined using it in the past, but probably it was just a dream. | ||
01:01
P6Bot joined
01:02
P6Bot left
01:08
Rawriful left
01:23
Cabanossi left
01:26
Cabanossi joined
01:29
P6Bot joined
01:30
P6Bot left
|
|||
thou | m: dd "nosuchfile".IO.open; # Why isn't this X::IO::DoesNotExist error instead of X::AdHoc? | 01:32 | |
camelia | Failure.new(exception => X::AdHoc.new(payload => "Failed to open file /home/camelia/nosuchfile: No such file or directory"), backtrace => Backtrace.new) | ||
Zoffix | thou: it's yet to be implemented | 01:33 | |
^_^ | |||
thou | :-) | ||
Zoffix | thou: there's actually a stale PR for that: github.com/rakudo/rakudo/pull/894 | ||
01:34
committable6 left,
committable6 joined,
ChanServ sets mode: +v committable6
|
|||
thou | Thank you again | 01:35 | |
01:35
committable6 left
01:36
committable6 joined,
ChanServ sets mode: +v committable6
01:37
bisectable6 left,
bisectable6 joined,
ChanServ sets mode: +v bisectable6
01:40
releasable6 left,
nativecallable6 left,
quotable6 left,
wamba left,
bisectable6 left,
bisectable6 joined,
ChanServ sets mode: +v bisectable6
01:44
ryn1x joined
01:45
ilbot3 left
01:49
ryn1x left
01:54
quotable6 joined,
ChanServ sets mode: +v quotable6,
nativecallable6 joined,
ChanServ sets mode: +v nativecallable6,
releasable6 joined,
ilbot3 joined,
ChanServ sets mode: +v ilbot3
01:56
synopsebot joined
01:57
synopsebot6 left,
basket left
02:04
synopsebot left,
synopsebot joined
02:05
synopsebot left
02:08
unicodable6 left,
unicodable6 joined,
ChanServ sets mode: +v unicodable6
02:13
cdg joined
02:17
ryn1x joined
02:18
cdg left
02:21
ryn1x left
02:25
cdg joined
02:28
Ven`` joined
02:31
japhdc joined
02:34
vendethiel- joined
02:35
Ven`` left
02:39
vendethiel- left
02:42
japhdc left
02:48
noganex_ joined
02:52
noganex left
02:54
Cabanossi left
02:55
Cabanossi joined
02:57
piojo joined
03:12
evalable6 left,
evalable6 joined,
ChanServ sets mode: +v evalable6
03:18
japhdc joined,
japhdc left
03:19
japhdc joined
03:21
Cabanossi left
03:22
BenGoldberg left
03:23
mcmillhj joined
03:24
Cabanossi joined
03:28
mcmillhj left
03:31
piojo left
03:38
mcmillhj joined
03:41
headcase_ joined
03:44
mcmillhj left,
headcase left
03:48
synopsebot joined,
ChanServ sets mode: +v synopsebot,
Zoffix is now known as geth
03:49
geth is now known as Zoffix
03:52
synopsebot left,
synopsebot joined,
ChanServ sets mode: +v synopsebot
03:55
mcmillhj joined
04:01
aborazmeh joined,
aborazmeh left,
aborazmeh joined
04:03
lizmat left
04:04
lizmat joined,
mcmillhj left
04:11
khw left,
mcmillhj joined
04:14
Geth joined
04:16
mcmillhj left
04:19
ryn1x joined
04:22
cdg left
04:30
mcmillhj joined,
japhdc left
04:35
mcmillhj left
04:38
japhdc joined
|
|||
Geth_ | Inline-Python: 1c3839e1e8 | (Zoffix Znet)++ (committed using GitHub Web editor) | META6.json Add missing prereq |
04:40 | |
Inline-Python: 0df7fe03de | niner++ (committed using GitHub Web editor) | META6.json Merge pull request #25 from zoffixznet/patch-2 Add missing prereq |
|||
04:41
japhdc left
04:42
japhdc joined
04:51
ryn1x left
05:05
AnotherNick joined
05:08
mcmillhj joined
05:10
virtualsue left
05:11
virtualsue joined
05:12
troys_ is now known as troys
05:15
mcmillhj left
05:18
HoboWithAShotgun joined
05:24
mcmillhj joined
05:27
japhdc left
05:28
aborazmeh left,
mcmillhj left
05:31
aborazmeh joined,
aborazmeh left,
aborazmeh joined
05:33
ChoHag left
05:34
troys left
05:35
mcmillhj joined
05:40
mcmillhj left,
ChoHag joined
05:42
ruoso___ left
05:48
mcmillhj joined
05:49
skids left
05:53
mcmillhj left
06:03
mcmillhj joined,
HoboWithAShotgun left
06:06
aborazmeh left
06:08
mcmillhj left
06:13
ChoHag left
06:14
headcase_ left
06:20
mcmillhj joined
06:21
llfourn joined
06:22
cdg joined
06:25
ChoHag joined,
mcmillhj left
06:26
Todd joined,
domidumont joined
06:27
cdg left
|
|||
Todd | Hi All, I am having a head scratcher on a loop within a loop test. vpaste.net/lkFkN Would one of our intrepid heros mind seeing what I screwed up, this time? | 06:27 | |
06:30
wamba joined,
domidumont left,
domidumont joined
06:36
mcmillhj joined
|
|||
Todd | I changed line 26 to | 06:38 | |
say "LineKey = <$LineKey> key = <$key> LineValue = <$LineValue> value = <%x<$key>>"; | |||
evalable6 | (exit code 1) 04===SORRY!04=== Error while compiling /tmp/FstvIsfEW1 Variabl… |
||
Todd, Full output: gist.github.com/783f10fc72bea08614...4828fc01f9 | |||
Todd | but the last `say %x` still comes out screwy like before | ||
what is meant by that gist link you sent me? | 06:39 | ||
06:45
headcase joined,
mcmillhj left
06:48
ryn1x joined
06:50
headcase left
06:51
Cabanossi left
06:54
Cabanossi joined,
mcmillhj joined
|
|||
Todd | actually, thiws one liner does not work | 06:55 | |
perl6 -e ' my %x = ( "a" => "A", "b" => "x", "c" => "C" );my $y="b"; %x<[$y]>="BB"; say %x;' | |||
{[$y] => BB, a => A, b => x, c => C} | |||
is added an element to the hash instad of modify %x<b> I think I do not know the proper syntax to put a variable in place of a key | 06:56 | ||
06:59
mcmillhj left
07:06
AnotherNick left
|
|||
TEttinger | Todd: evalable6 is a bot, it sadly cannot explain the gist, only post the link | 07:09 | |
07:09
thou left
|
|||
TEttinger | m: my %x = ( "a" => "A", "b" => "x", "c" => "C" ); my $y="b"; %x<[$y]>="BB"; say %x | 07:10 | |
07:10
mcmillhj joined
|
|||
camelia | {[$y] => BB, a => A, b => x, c => C} | 07:10 | |
Todd | My problem boils down to me not knowing how to access an element in a hash with a variable as the key. %x<$y> is what is messing me up. | ||
TEttinger | yeah I don't even know perl 6 | ||
but it seems a lot of the channel is asleep, though the european crowd should be active soon | 07:11 | ||
Todd | %x<[$y]>="BB" got added to the hash | ||
TEttinger | m: my %x = ( "a" => "A", "b" => "x", "c" => "C" ); my $y="b"; %x<$y>="BB"; say %x | ||
camelia | {$y => BB, a => A, b => x, c => C} | ||
Todd | $y => BB got added to the hash | ||
TEttinger | yep | ||
07:12
setty1 joined
|
|||
TEttinger | so [] is some other syntax that doesn't seem to apply to changing a hash | 07:12 | |
maybe the learn perl 6 in y minutes can help | |||
Todd | [] is just me trying everything I can think of | ||
TEttinger | m: my %x = ( "a" => "A", "b" => "x", "c" => "C" ); my $y="b"; %x{$y}="BB"; say %x | 07:14 | |
camelia | {a => A, b => BB, c => C} | ||
TEttinger | hooray | ||
m: my %x = "a" => "A", "b" => "x", "c" => "C" ; my $y="b"; %x{$y}="BB"; say %x | 07:15 | ||
camelia | {a => A, b => BB, c => C} | ||
Todd | Yippee !!!! | ||
Thank you! | |||
TEttinger | so {} is used like [] in C for arrays, or in Lua for stuff like this | ||
m: say "abcd"{3} | |||
camelia | Type Str does not support associative indexing. in block <unit> at <tmp> line 1 |
||
TEttinger | ha, the tutorial seems to be wrong there | 07:16 | |
oh they had declared a thing | 07:17 | ||
m: sub postcircumfix:<{ }>(Str $s, Int $idx) { $s.substr($idx, 1); } say "abcd"{3} | |||
camelia | 5===SORRY!5=== Error while compiling <tmp> Strange text after block (missing semicolon or comma?) at <tmp>:1 ------> 3tr $s, Int $idx) { $s.substr($idx, 1); }7⏏5 say "abcd"{3} expecting any of: infix infix stoppe… |
||
TEttinger | m: sub postcircumfix:<{ }>(Str $s, Int $idx) { $s.substr($idx, 1); }; say "abcd"{3} | ||
camelia | d | ||
TEttinger | yay | 07:18 | |
07:18
mcmillhj left,
nadim left,
nadim joined
07:21
ryn1x left
07:24
darutoko joined
|
|||
Todd | bye bye and than you again for the help! | 07:26 | |
07:28
andrzejku joined,
mcmillhj joined,
Todd left
07:32
jeromelanteri joined
07:33
headcase joined,
mcmillhj left
07:37
headcase left
07:38
mcmillhj joined,
Cabanossi left
07:39
headcase joined,
Cabanossi joined
07:40
jeromelanteri left
07:41
rindolf joined
07:42
jeromelanteri joined
07:43
mcmillhj left
07:48
headcase left
07:51
mcmillhj joined
07:53
headcase joined
07:56
mcmillhj left
07:57
headcase left,
ChoHag left
08:02
headcase joined
08:03
eliasr joined
08:06
headcase left
08:07
mcmillhj joined
08:11
domidumont left,
headcase joined
08:12
mcmillhj left
08:17
espadrine joined
08:18
headcase left
08:19
hankache joined
08:22
mcmillhj joined,
Cabanossi left
08:23
headcase joined
08:24
Cabanossi joined
08:27
mcmillhj left,
headcase left
08:30
espadrine left
08:34
mcmillhj joined,
headcase joined
08:38
mcmillhj left
08:42
hankache left
08:44
headcase left
08:47
mcmillhj joined
08:50
ufobat joined
|
|||
ufobat | hi | 08:50 | |
08:50
gfldex_work joined
08:51
gfldex_work left
|
|||
ufobat | is it zef that causes scripts to be generated such as $HOME/.rakudobrew/moar-2017.09/install/share/perl6/site/bin/bailador? those are wrapper scripts that invoke CompUnit::RepositoryRegistry.run-script("bailador", :dist-name<Bailador>, :$name, :$auth, :$ver) | 08:52 | |
github.com/Bailador/Bailador/issues/265 | |||
08:52
mcmillhj left
|
|||
ufobat | is this a zef bug? | 08:52 | |
or what do i need to do that passing parameters to my binary would work? | 08:53 | ||
08:53
lancew joined
08:58
headcase joined
09:03
headcase left,
atroxaper joined
09:04
margeas joined
09:05
atroxaper left,
atroxaper joined
|
|||
timotimo | "don't use --name" :\ | 09:06 | |
it's not great that --name, --auth, and --ver are taken by the CUR system | 09:07 | ||
atroxaper | Hello! I have two questions. Firstly I remember github repo 'coke/perl6-roast-data'. As I understand it is not supported now. Is there some replacement? | ||
And second question. Why? | 09:09 | ||
m: {'3' => 'str', 3.Int => 'int'}.elems | |||
camelia | ( no output ) | ||
atroxaper | m: say {'3' => 'str', 3.Int => 'int'}.elems | ||
camelia | 1 | ||
09:10
leont joined
|
|||
timotimo | because it's not an object hash | 09:12 | |
m: say :{'3' => 'str', 3.Int => 'int'}.elems | |||
camelia | 2 | ||
ufobat | timotimo, but the other parameters in %* and @_ are passed, are they? because i dont see it being passed | 09:13 | |
timotimo | they should, but name is already taken, isn't it? | ||
ufobat | right | 09:16 | |
09:17
Ven`` joined,
lancew left,
lancew joined
|
|||
ufobat | i am just wondering how are all the other parameters passed? | 09:18 | |
timotimo | potentially @*ARGS | ||
lancew | hi, is anyone here able to do invites for the Bailador slack? | ||
ufobat | me | 09:19 | |
lancew | :-) | ||
09:21
TEttinger left
09:23
Cabanossi left,
ryn1x joined
09:24
Cabanossi joined
|
|||
atroxaper | timotimo: wow. Will go and read about it :) | 09:27 | |
And for first question? | |||
09:39
evalable6 left,
evalable6 joined,
ChanServ sets mode: +v evalable6
|
|||
timotimo | oh, huh, python got a totally new distribution format: wheels | 09:47 | |
"Avoids arbitrary code execution for installation. (Avoids setup.py)", nice. | |||
"Installation of a C extension does not require a compiler on Windows or macOS." - i wonder how they do this | |||
teatime | is it new? | 09:49 | |
timotimo | the PEP for it has been created in 2012 it looks like | 09:50 | |
09:52
andrzejku left
09:57
ryn1x left
10:02
Pilu left
|
|||
Zoffix | atroxaper: that sounds like [Coke] might now about it. I've no idea what was in that repo | 10:02 | |
yoleaux | 04:18Z <nine> Zoffix: added your user to the camelia VM where geth is running | ||
Zoffix | \o/ | 10:03 | |
atroxaper | Zoffix: there was information about night runs of all Perl 6 implementation on roast. For know which implementation has troubles. Or now all implementation (moar and jvm) pass roast all time? | 10:05 | |
10:07
ufobat left
|
|||
Zoffix | atroxaper: moar does and it's the only one actively developed, so I'm not surprised that repo's gone. jvm is kinda limping along, but it might be failing some newer tests | 10:07 | |
10:08
zakharyas joined
|
|||
Zoffix | m: say :{'3' => 'str', 3 => 'int', <3> => 'IntStr'}.elems | 10:08 | |
camelia | 3 | ||
atroxaper | Zoffix: even we have 'only' moar, I think, it is useful to know how stable current nom is. Ok. | 10:09 | |
leont | timotimo: in perl5 we're also considering codeless installation, but ETUITS | ||
atroxaper | Zoffix: Yeah. timotimo++ already tell me about 'object hashes'. | ||
Zoffix | atroxaper: it passes all tests | 10:10 | |
atroxaper | Zoffix: glad to hear :) | ||
Zoffix | atroxaper: well, the past couple of days it failed a few, but that's a rarity and IMO isn't something that we should be actively be doing as it makes it more difficult for other core devs to figure out if their changes break anything | 10:12 | |
10:12
kurahaupo left
|
|||
Zoffix | I think sprintf.t is still failing now | 10:12 | |
So the docs say "Threads should be considered, for all intents, largely un-managed and their direct use should be avoided in user code" | 10:14 | ||
What's a good contruct for stuffing a value into a set and then a few minutes later removing it via a promise? I wrote this, but it's a bit bulky and still has a race in the lookup: github.com/perl6/synopsebot/blob/m...m6#L10-L22 | 10:15 | ||
Seems like 2 locks would be much easier to use | |||
.oO( write a module Set::Timed ) |
10:19 | ||
meh | |||
atroxaper | Zoffix: I think some times that we want concurrent collection like in Java (I am a Java programmer). In that case is would prefer to wrap all interaction with %recent under Lock. | 10:25 | |
Zoffix | That brings me to my first point that docs say Locks are low-level and should be avoided. | 10:27 | |
10:27
evalable6 left,
evalable6 joined
|
|||
atroxaper | Can we have a wrapper under some object to calculate something before and after any of original methods? | 10:28 | |
10:29
cdg joined,
kurahaupo joined,
kurahaupo left
10:30
kurahaupo joined
|
|||
atroxaper | Zoffix: yes. I think a Lock is not sooo low-level to avoid it. imo. | 10:30 | |
10:30
kurahaupo left
|
|||
Zoffix | You can wrap methods | 10:30 | |
m: Str.^lookup("say").wrap: -> |c { put "about to say {c.gist}"; callsame; put "done" }; "meow".say | |||
camelia | about to say \("meow") meow done |
||
Zoffix | atroxaper: um, do you mean in Java or in this language? | ||
10:30
kurahaupo joined
|
|||
atroxaper | In Perl 6. | 10:30 | |
I imaging some wrapper that can transfigurate any object into Monitor (github.com/jnthn/oo-monitors) | 10:33 | ||
10:33
cdg left
|
|||
atroxaper | And we can use methods of the object safety. | 10:34 | |
Zoffix | It's probably as simple as `use OO::Monitors; my %recent := monitor :: is SetHash {}.new` and both the Channel and the Locks won't be needed | 10:35 | |
atroxaper | Is it works now like that?! | 10:36 | |
Or it would be cool? | |||
Zoffix | I'd've thought it'd work, but doesn't seem to: | 10:41 | |
$ perl6 -e 'use v6.d.PREVIEW; use OO::Monitors; my %recent := monitor :: is Hash {}.new; await ^1000 .map: { slip (start { sleep rand; %recent.AT-KEY("foo")++ }), start { sleep 1+rand; %recent.AT-KEY("foo")-- } }; say %recent' | |||
{foo => 7} | 10:42 | ||
Oh right | |||
The ++ itself happens outside the monitor | |||
MasterDuke | maybe the atomic cas op? | 10:45 | |
Zoffix | it only works with atomic ints doesn't it? | 10:46 | |
atroxaper | atomic is not what we want :) | ||
Zoffix | it'd work for my current usecase tho | ||
10:48
evalable6 left
10:49
evalable6 joined
|
|||
Zoffix | m: use v6.d.PREVIEW; my %recent := :{:foo(my atomicint $)}; await ^500 .map: { slip (start { sleep rand; %recent<foo>⚛++ }), start { sleep 2+rand; %recent<foo>⚛++ } }; say %recent | 10:49 | |
camelia | Type check failed in binding; expected Associative but got Block (-> ;; $_? is raw { #`...) in block <unit> at <tmp> line 1 |
||
MasterDuke | is this for keeping count of recently seen RT #s for the new synopsebot? | ||
Zoffix | Block? o'cmon | ||
MasterDuke: yeah | |||
atroxaper | Zoffix: The 'my %recent := monitor :: is Hash {}.new' and solve problem with concurrent autovivification (docs.perl6.org/language/concurrenc..._Concerns) | ||
Zoffix | m: use v6.d.PREVIEW; my atomicint $foo; my %recent := :{:$foo}; await ^500 .map: { slip (start { sleep rand; %recent<foo>⚛++ }), start { sleep 2+rand; %recent<foo>⚛++ } }; say %recent | ||
camelia | MoarVM panic: Could not spawn thread: errorcode -11 | 10:50 | |
Zoffix | heh | ||
Actually it won't work for my usecase, since I don't pre-know the RT number | 10:51 | ||
"Expected a modifiable native int argument for '$target'" but that's what I gave it :/ | 10:53 | ||
Oh well | |||
Zoffix goes to do @other-things | |||
And yeah, second atomic should be ⚛-- | |||
Well, this I'd've thought to work: use v6.d.PREVIEW; use OO::Monitors; my %recent := monitor :: is Hash { method bump ($k) { self{$k}++ }; method debump ($k) { self{$k}-- } }.new; await ^500 .map: { slip (start { sleep rand; %recent.bump: "foo" }), start { sleep 2+rand; %recent.debump: "foo" } }; say %recent | 10:58 | ||
But dies with ":Invocant of method 'unlock' must be an object instance of type 'Lock', not a type object of type 'Lock'. Did you forget a '.new'?" | |||
11:01
lancew left
|
|||
Zoffix | works: use v6.d.PREVIEW; use OO::Monitors; my $recent := monitor { has %!stuff = {}; method d { %!stuff }; method bump ($k) { %!stuff{$k}++ }; method debump ($k) { %!stuff{$k}-- } }.new; await ^500 .map: { slip (start { sleep rand; $recent.bump: "foo" }), start { sleep 2+rand; $recent.debump: "foo" } }; say $recent.d | 11:01 | |
MasterDuke | cool | 11:02 | |
11:02
leont left
11:04
TimToady left
11:05
cdg joined
11:06
TimToady joined
11:10
cdg left
|
|||
Zoffix | "Unsupported use of C++ constructor syntax; in Perl 6 please use method call syntax" are you kidding me >:O | 11:14 | |
I never used C++ in my life. | |||
jnthn | Apparently you'd be decent at it :P | ||
Zoffix | m: class Foo {}; say new Foo: | 11:15 | |
camelia | Foo.new | ||
Zoffix | m: say new class Foo {}: | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Unsupported use of C++ constructor syntax; in Perl 6 please use method call syntax at <tmp>:1 ------> 3say new class 7⏏5Foo {}: |
||
Zoffix | Oh well | ||
Ended up with this for synbot: github.com/perl6/synopsebot/commit/895a6adf03 | 11:17 | ||
Cleared up the code nicely too | 11:18 | ||
jnthn | Nice use of OO::Monitors :) | ||
And the "send a message to yourself in the future" pattern :) | |||
11:19
synopsebot left
|
|||
Zoffix | \o/ | 11:19 | |
11:19
synopsebot joined,
ChanServ sets mode: +v synopsebot
|
|||
jnthn | not $recently.seen: $^rt # cute :) | 11:20 | |
Zoffix | :D | ||
AlexDaniel | squashable6: status | 11:28 | |
squashable6 | AlexDaniel, Next SQUASHathon in 5 days and ≈22 hours (2017-10-07 UTC-12⌁UTC+14) | ||
11:29
leont joined
11:35
zakharyas left
11:38
Cabanossi left
11:39
Cabanossi joined
11:40
lancew joined
11:55
evalable6 left,
evalable6 joined
11:56
ryn1x joined,
cdg joined
12:01
cdg left
12:07
BenGoldberg joined
12:11
Ben_Goldberg joined,
BenGoldberg left,
Ben_Goldberg is now known as BenGoldberg
12:18
kaare_ left
12:22
Zoffix left
12:25
Rawriful joined
12:27
ryn1x left
12:31
llfourn left
12:35
leah2 left
12:38
HoboWithAShotgun joined
12:40
epony left
12:41
lancew left
12:44
ShalokShalom_ joined
12:46
ShalokShalom left
12:50
ChoHag joined
12:51
leah2 joined,
Cabanossi left
12:54
Cabanossi joined
|
|||
atroxaper | jnthn: Hello. Can you help me with the Monitor? Why I got that exception? gist.github.com/atroxaper/0f435d29...543f0c550d | 13:00 | |
I try to implement Java-style ConcurrentHashMap. | |||
I prefer to inherit a hash instead of aggregate for support map, grep and so on. | 13:01 | ||
13:09
evalable6 left,
evalable6 joined,
ChanServ sets mode: +v evalable6
|
|||
jnthn | atroxaper: Probably because Hsah cheats on construction | 13:14 | |
atroxaper: Also, inherited methods won't be protected | 13:15 | ||
atroxaper | :( | ||
jnthn | Even if they were, grep and map return Seq | ||
Those are lazy | |||
So their working would not be protected anyway | |||
atroxaper | Good point. | ||
Then I have to use lock directly when need. | 13:16 | ||
jnthn | ConcurrentHashMap in Java probably is a lot more sophisticated than a hash that auto-locks | ||
13:17
cdg joined
|
|||
atroxaper | Agree. | 13:17 | |
jnthn | Worse, assignment takes place outside of a hash | ||
In the general case | |||
So AT-KEY returns a Scalar, and upon assignment to it it is bound into the Hash | |||
atroxaper | Many thanks for describe. I have to change my mind after Java :) | 13:19 | |
jnthn | I used to teach .Net concurrency stuff, and I spent some time there on the fact that things like Stack/Queue and ConcurentStack/ConcurrentQueue had quite different APIs, because the things that make a convenient non-concurrent API don't usually make a good concurrent one. | 13:21 | |
(For example, you can't check if something is empty, and then pop from it, because it might become empty between the two) | 13:22 | ||
13:22
dogbert2 left
|
|||
atroxaper | jnthn: One more think. In Java reading volatile variable (or enter/exit synchronized block) clears local case and thread can see changes of another thread. What about Perl 6 vision of another thread's changes? Is there some point in code when I can be sure that I load fresh value. Not 'actual', but fresh at least. | 13:23 | |
local cache* | 13:24 | ||
jnthn | lock/unlock work out the same as enter/exit synchronized blocks; you can use the atomic fetch/assign operations otherwise to ensure values are published | 13:28 | |
Alternatively, to ensure all changes up to that point are, there's a memory barrier | |||
See docs.perl6.org/routine/full-barrier and docs.perl6.org/type/Scalar#Atomic_..._on_Scalar for more info | 13:29 | ||
There's also operator forms just below the routines | 13:30 | ||
Which I find make the operators stand out nicely, and look alright if you have a font that doesn't decide to render them with a hot pink background :P | |||
13:33
skids joined
|
|||
atroxaper | Does atomic fetch/assign clear _all_ local cache or just read/write actual data of the Scalar? | 13:34 | |
jnthn | Just of that Scalar | 13:36 | |
full-barrier clears all | |||
ah, hang on | 13:38 | ||
jnthn actually checks | |||
atroxaper | brilliant! Thank you. Gonna implement cache like Guava's CacheLoader (github.com/google/guava/wiki/Cache...d#example) | 13:39 | |
13:40
abraxxa joined
|
|||
jnthn | github.com/MoarVM/MoarVM/blob/mast...oar.h#L241 | 13:40 | |
So they are actually doing full barriers | |||
I'd misremembered that | |||
github.com/ivmai/libatomic_ops/blo..._ops.h#L82 is the relevant bit | 13:41 | ||
I guess if there's demand that we can use operator adverbs to provide a way to get the weaker forms in the future | 13:42 | ||
s/that/then/ | |||
13:44
abraxxa left
|
|||
atroxaper | "they are actually doing full barriers" they == scalars' fetch/assign? | 13:44 | |
jnthn | Yes | ||
atroxaper | As Java volatiles, ok. | 13:45 | |
jnthn | They use the MVM_store/MVM_fetch that I linked to, and the second link is where the things they are #define'd to are defined with a bunch of explanation | ||
atroxaper | And they use AO_ | 13:46 | |
I see now. | |||
13:50
llfourn joined
|
|||
ab5tract_ | o/ #perl6 | 13:57 | |
yoleaux | 15 Oct 2016 03:43Z <japhb> ab5tract_: I've got a pile of changes I'd like to make to Terminal::Print (some cleanup, some speedup, some API extensions, etc.). How granular would you like PRs? Or would you rather I just maintained my own fork? | ||
15 Oct 2016 08:08Z <japhb> ab5tract_: I've sent you a PR with my first 11 commits (they're all very small, just minor cleanups/tuneups/fixes). After that I'm probably going to have to expand the API for further improvements. | |||
15 Oct 2016 08:41Z <japhb_> ab5tract_: What exactly is examples/clock.p6 trying to draw? It looks overcomplicated to be just a circle, and it appears to be halfway through a rewrite. I'd fix it but I don't know what it's trying to do. | |||
16 Oct 2016 18:57Z <japhb> ab5tract_: Thank you for the Terminal::Print PR merge. :-) | |||
7 Nov 2016 14:56Z <viki> ab5tract_: I had to revert your PR #911 as it broke 6.c-errata. See github.com/rakudo/rakudo/pull/911#...-258854543 | |||
ab5tract_ | been a long time since i've had a nick tail, apparently! | 13:58 | |
is it currently possible to disable buffering for stdout ? | 13:59 | ||
13:59
abraxxa joined
14:07
Cabanossi left
14:09
Cabanossi joined
|
|||
tbrowder | \o #perl6 | 14:09 | |
MasterDuke | ab5tract_: can you reopen it with :!buffering? | 14:10 | |
tbrowder | Is there any way to use Test* modules to give an alternate description string for failures? | 14:11 | |
14:15
zakharyas joined
|
|||
ab5tract_ | hmm, interesting thought. I'll give that a try, MasterDuke | 14:16 | |
though I can't seem to find much about buffering in the docs | 14:18 | ||
just this tantalizing bit here: "Using getc to get a single keypress from a terminal will only work properly if you've set the terminal to "unbuffered"." | 14:19 | ||
14:20
lancew joined
|
|||
MasterDuke | jnthn: recently made some changes to the default buffering behavior | 14:20 | |
ab5tract_ | I'm asking because I've made some changes to Terminal::Print that I expected to have a larger impact on FPS | 14:21 | |
removing a lot of introspection and objects along the way | |||
MasterDuke | i think the tldr is that output attached to a tty is now buffered by default | 14:23 | |
ab5tract_ | but the performance runs about as well as the previous version. | ||
jnthn | MasterDuke: Nope, buffering is explcitly not enabled for TTYs | 14:25 | |
*explicitly | |||
It's for non-TTYs only | |||
So for output to one of those, there was no change | |||
14:26
skids left
|
|||
MasterDuke | whoops, i got it backwards. ab5tract_ ^^^ | 14:26 | |
ab5tract_ | jnthn: interesting.. i guess we've gotten the costs of object instantation and instrospection way down! | 14:27 | |
jnthn | lizmat++ recently did some changes to speed up instantiation | 14:28 | |
14:35
broquain1 joined
14:36
lancew left,
khw joined,
HoboWithAShotgun left
14:44
leah2 left
14:45
leont left
14:51
abraxxa left,
HoboWithAShotgun joined
15:00
zakharyas left
15:02
leah2 joined
15:03
leont joined
15:06
cdg left
15:07
cdg joined
15:12
cdg left
15:20
kaare_ joined
15:31
synopsebot left
15:32
synopsebot joined,
ChanServ sets mode: +v synopsebot
15:38
virtualsue left
15:39
virtualsue joined
15:44
leont left
|
|||
ab5tract_ | jnthn: so if tty is no longer buffered, would that make setting stdout to makeraw via termios redundant? | 15:47 | |
jnthn | It never was buffered | 15:48 | |
15:48
leah2 left
|
|||
jnthn | So if you had to before, then you'll still have to | 15:48 | |
I don't know what setting stdout to makeraw does/means, so no idea on that part :) | 15:49 | ||
15:49
Aaronepower left
15:53
ryn1x joined
15:54
Aaronepower joined
|
|||
timotimo | nadim: i wonder why Terminal::Print isn't in the dependencies of Data::Dump::Tree? | 15:55 | |
15:57
ryn1x left
|
|||
sjn | o7 | 15:59 | |
sjn is playing around with perl6-docs today o/ | |||
16:01
timotimo left
16:02
leah2 joined
|
|||
ab5tract_ | jnthn: it means that "all output processing is disabled" | 16:04 | |
whatever that means ;) | |||
something about carriage returns and baudrates, if I understand the manpage correctly | 16:05 | ||
16:08
cdg joined
16:09
troys joined
16:10
nadim left
16:12
domidumont joined
16:13
Aaronepower left,
ryn1x joined
16:14
cdg left
16:15
timo joined,
timo is now known as Guest97022,
Guest97022 is now known as timotimo
16:28
chakli joined
|
|||
chakli | hey, can someone try this and tell me if something is wrong here, in HTTP::UserAgent if i do say $response.content i get just the content but if i do say "$response.content" i get the header too | 16:34 | |
ugexe | "$response.content" isn't calling .content is it? | 16:36 | |
it'd have to be "$response.content()" or "{$response.content}" | 16:37 | ||
otherwise you are getting `my $str = $response.Str ~ ".content"` | |||
chakli | ok, thanks got it | 16:40 | |
16:42
Rawriful left
16:46
Rawriful joined
17:01
evalable6 left,
evalable6 joined,
ChanServ sets mode: +v evalable6
17:02
troys is now known as troys_
17:04
Rawriful left
|
|||
HoboWithAShotgun | so i used zef locate to see where a module file is, but after i changed it, i don't see my changes when i run it | 17:04 | |
17:04
Rawriful joined
|
|||
HoboWithAShotgun | is there a precompiled cache or somethng i need to clear? | 17:04 | |
timotimo | you're not supposed to change files in the compunitrepo | 17:07 | |
they ought to be immutable | |||
HoboWithAShotgun | you're not supposed to call private methodes either :) i just want to check if a variable contains what i think it does | 17:08 | |
17:10
cdg joined
17:11
yht left
17:12
yht joined
|
|||
timotimo | the safest way is to grab the source of the distro you're looking at, modify it, and either install it or use -I for it | 17:12 | |
17:14
Aaronepower joined
17:15
cdg left
17:19
kaare__ joined
17:22
kaare_ left
17:30
timotimo left,
timo joined,
HoboWithAShotgun left,
timo is now known as Guest59997
17:31
Guest59997 is now known as timotimo,
cdg joined
17:36
cdg left
17:38
kaare_ joined
17:41
kaare__ left
17:44
releasable6 left,
releasable6 joined
|
|||
Geth | whateverable: 62953b6285 | (Aleks-Daniel Jakimenko-Aleksejev)++ | services/whateverable@.service Add missing .precomp Otherwise the bot won't start if Whateverable.pm6 was changed. |
17:47 | |
whateverable: 6b1507476f | (Aleks-Daniel Jakimenko-Aleksejev)++ | services/whateverable@.service Be a bit more forgiving about starting new processes Otherwise IRC::Client module does not seem to work… not that this usage is intended, but sometimes it is useful. |
|||
whateverable: 45e09f4827 | (Aleks-Daniel Jakimenko-Aleksejev)++ | sandbox/answer Add sandbox folder It will take more work to get stuff chdir-ed there, but this is good enough for now. |
|||
17:49
itaipu joined
17:50
chakli left
17:57
Ben_Goldberg joined,
BenGoldberg left,
Ben_Goldberg is now known as BenGoldberg
18:01
quotable6 left,
quotable6 joined,
ChanServ sets mode: +v quotable6
18:02
HoboWithAShotgun joined
|
|||
HoboWithAShotgun | tx timotimo i will do as told | 18:02 | |
18:07
kybr joined
18:09
ken joined
18:10
ken is now known as Guest82646
|
|||
mst | github.com/nikomatsakis/rayon#rayon is interesting | 18:12 | |
18:25
evalable6 left,
evalable6 joined
18:28
telex left
18:29
telex joined
18:32
cdg joined
18:33
chakli joined
18:34
Zoffix joined
18:37
cdg left
18:42
atroxaper left,
Zoffix left
18:45
atroxaper joined
18:47
Zoffix joined
18:48
kurahaupo left
|
|||
Zoffix | A while back I was asking how to disable part/join notifications in weechat's "hotlist" bar... Finally figured out. /set weechat.look.buffer_notify_default message weechat.org/files/doc/devel/weecha...fy_default | 18:48 | |
18:49
Zoffix left,
Zoffix joined
18:51
atroxaper left
18:53
Cabanossi left
|
|||
Zoffix | .ask teatime how's the regex range thing going? | 18:53 | |
yoleaux | Zoffix: I'll pass your message to teatime. | ||
18:53
darutoko left
18:54
Cabanossi joined,
ryn1x left
19:04
eroux joined
|
|||
HoboWithAShotgun | m: $*SPEC.join("foo/bar").say; | 19:05 | |
camelia | Too few positionals passed; expected 4 arguments but got 2 in block <unit> at <tmp> line 1 |
||
HoboWithAShotgun | m: $*SPEC.join("foo", "bar").say; | ||
camelia | Too few positionals passed; expected 4 arguments but got 3 in block <unit> at <tmp> line 1 |
||
HoboWithAShotgun | m: $*SPEC.join($, "foo", "bar").say; | ||
camelia | foo/bar | ||
Zoffix | HoboWithAShotgun: don't use $*SPEC | ||
m: say 'foo'.add: 'bar' | |||
camelia | No such method 'add' for invocant of type 'Str' in block <unit> at <tmp> line 1 |
||
Zoffix | m: say 'foo'.IO.add: 'bar' | 19:06 | |
camelia | "foo/bar".IO | ||
19:06
silug joined
|
|||
Zoffix | docs.perl6.org/language/io-guide#L...SPEC_Alone | 19:06 | |
HoboWithAShotgun | i see | ||
19:12
ShalokShalom_ is now known as ShalokShalom
19:14
chakli left
19:18
lichtkind joined
|
|||
Geth | doc: a917d93624 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/io-guide.pod6 De-villify $*SPEC a bit Since some methods don't got an alternative in IO::Path |
19:18 | |
synopsebot | Link: doc.perl6.org/language/io-guide | ||
Geth | doc: d152a22fc9 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/io-guide.pod6 Link to devnull from all IO::SPECs |
19:19 | |
synopsebot | Link: doc.perl6.org/language/io-guide | ||
19:33
geekosaur left,
cdg joined
19:37
cdg left
19:43
geekosaur joined
19:51
wamba left
19:52
synopsebot left,
Ven`` left
19:53
synopsebot joined,
ChanServ sets mode: +v synopsebot
19:54
kurahaupo joined
20:08
wamba joined,
HoboWithAShotgun left
|
|||
teatime | Zoffix: to answer your question: i0.kym-cdn.com/photos/images/facebo...65/b7e.jpg | 20:19 | |
yoleaux | 18:53Z <Zoffix> teatime: how's the regex range thing going? | ||
Zoffix | teatime: does it mean I am free to fix it or do you still want to fix it? :) | 20:20 | |
20:21
Cabanossi left
|
|||
teatime | help yourself. | 20:21 | |
I will be interested to see the right answer. | 20:22 | ||
Zoffix | \o/ | ||
20:22
TEttinger joined
|
|||
Zoffix | Some time tomorrow. I think I'm done coding for today :) | 20:22 | |
teatime | it would be easy enough to duplicate the logic from elsewhere, but that can't be the right thing | 20:23 | |
20:24
Aaronepower left,
Cabanossi joined
|
|||
teatime | also do note this doesn't error but doesn't actually work either | 20:26 | |
m: 'xx' ~~ / 'x' ** 0.9..2 / | |||
camelia | ( no output ) | ||
teatime | m: say 'xx' ~~ / 'x' ** 0.9..2 / | 20:27 | |
camelia | Nil | ||
20:27
gigavinyl joined,
gigavinyl left
20:28
troys_ is now known as troys
20:29
HoboWithAShotgun joined
|
|||
geekosaur | teatime, that one is known/expected, there are parse ambiguities. use braces around the range | 20:30 | |
teatime | hmm | 20:31 | |
20:33
epony joined,
domidumont left
20:34
cdg joined
20:38
cdg left,
Aaronepower joined
20:51
Cabanossi left
|
|||
HoboWithAShotgun | is there a method to dump out the interface (methods etc) of $something ? | 20:52 | |
geekosaur | that lives in the MOP | ||
m: dd Int.^methods | 20:53 | ||
camelia | (method new (Int $: | is raw) { #`(Method|30631008) ... }, method Int (Int $: *%_) { #`(Method|30631160) ... }, method Num (Int:D $: *%_) { #`(Method|30631312) ... }, method Rat (Int:D $: $?, *%_) { #`(Method|30631464) ... }, method FatRat (Int:D $: $?, … | ||
20:54
ryn1x joined
|
|||
Zoffix | m: dd Int.^methods».name | 20:54 | |
camelia | ("new", "Int", "Num", "Rat", "FatRat", "abs", "Bridge", "chr", "sqrt", "base", "polymod", "expmod", "is-prime", "floor", "ceiling", "round", "lsb", "msb", "narrow", "Range", "atanh", "sign", "asech", "sin", "tan", "atan2", "acosech", "truncate", "asinh",… | ||
20:54
Cabanossi joined
|
|||
Zoffix | m: dd Int.^methods(:all)».name | 20:54 | |
camelia | ("new", "Int", "Num", "Rat", "FatRat", "abs", "Bridge", "chr", "sqrt", "base", "polymod", "expmod", "is-prime", "floor", "ceiling", "round", "lsb", "msb", "narrow", "Range", "atanh", "sign", "asech", "sin", "tan", "atan2", "acosech", "truncate", "asinh",… | ||
Zoffix | (:all includes those from Any and Mu as well)( | 20:55 | |
20:55
geekosaur left,
rindolf left
20:59
geekosaur joined
21:06
BenGoldberg left
21:11
cpage_ left
21:12
cpage_ joined
21:15
Guest82646 left
|
|||
HoboWithAShotgun | how do i instantiate a class whichs name i have in $classname? | 21:15 | |
timotimo | you grab the type object from your lexical environment using ::($classname) and call your favourite constructor method on it, for example .new | 21:16 | |
21:19
Ven`` joined
|
|||
Zoffix | m: class Meows { method mew { say "\c[CAT]" } }; my $what = "Meows"; my $do = "mew"; ::($what)."$do"() | 21:22 | |
camelia | 🐈 | ||
21:25
ryn1x left
21:31
thou joined
21:35
cdg joined
21:39
cdg left
|
|||
HoboWithAShotgun | ok, this works: hastebin.com/uvoqiyufez.pl | 21:42 | |
any red flags? | |||
21:43
nadim joined
21:44
thou left
|
|||
HoboWithAShotgun | with all these flexibility, does it even make sense to speak about idiomatic perl6? | 21:44 | |
21:44
atroxaper joined
|
|||
gfldex | HoboWithAShotgun: The idioms might actually be build in. | 21:45 | |
21:47
kyan joined
|
|||
gfldex | HoboWithAShotgun: you may want to be careful with `.pl`. That will bite you on Windows. | 21:47 | |
HoboWithAShotgun | that's just the paste site doing that | 21:48 | |
the actual file is called Vision.pm6 :) | |||
21:49
atroxaper left,
troys is now known as troys_
|
|||
gfldex | HoboWithAShotgun: you may want to give gist-paste a try manpages.org/gist-paste | 21:50 | |
grondilu | m: say { a => pi } (+) { a => -pi } | 21:53 | |
camelia | Bag(a(3)) | ||
grondilu | is that how (+) is supposed to behave with hashes? | ||
m: say { a => pi } (+) { a => "foo" } | |||
camelia | Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5foo' (indicated by ⏏) in block <unit> at <tmp> line 1 |
||
grondilu | m: say { a => 2 } (+) { a => 1 } | 21:54 | |
camelia | Bag(a(3)) | ||
21:54
nhywyll joined
|
|||
grondilu | m: say { a => pi } (+) { a => -1 } | 21:54 | |
camelia | Bag(a(3)) | ||
grondilu | m: say { a => pi }.Mix (+) { a => -1 }.Mix | ||
camelia | Mix(a(2.14159265358979)) | ||
grondilu | m: say { a => pi }.Mix (+) { a => -pi }.Mix | 21:55 | |
camelia | Mix() | ||
22:00
char_var[buffer] left
|
|||
Zoffix | grondilu: yup | 22:02 | |
Bags don't have negative weights, so the -pi one is like zero, and Bags have integer weights, so the pi gets coerced into Int, hence Bag(a(3)) | 22:04 | ||
grondilu | but why should Bags prevail other Mixes? | ||
I mean shouldn't { a => -pi } be cast into a Mix instead of a Bag? | |||
Zoffix | grondilu: unsure. You should ask lizmat. She hammered down all of these semantics a few months ago | 22:05 | |
22:06
Mrofnet left
22:07
Mrofnet joined
22:09
setty1 left
22:24
evalable6 left,
evalable6 joined,
ChanServ sets mode: +v evalable6,
DerAlex joined
22:31
epony left
22:35
cdg joined
22:36
epony joined
22:40
cdg left
22:42
ryn1x joined
22:47
hoffentlichja joined
22:49
atroxaper joined
22:52
DerAlex left
|
|||
HoboWithAShotgun | can i have lazy attributes? say class f { has $x; has $o = Some::Thing.new($x); } now x might not be known when the object is constructed | 22:52 | |
22:52
Cabanossi left
|
|||
HoboWithAShotgun | can i make that lazy so the the S::T.new gets called when o get accessed ? | 22:53 | |
22:53
atroxaper left
|
|||
HoboWithAShotgun | and not when the object is constructed | 22:53 | |
22:54
Cabanossi joined
22:55
ryn1x left,
ryn1x joined
|
|||
grondilu | HoboWithAShotgun: do it in the BUILD submethod | 22:55 | |
or rather the TWEAK | |||
22:56
hoffentlichja left
|
|||
grondilu | oh wait, you mean when accessed | 22:56 | |
not constructed, my bad | |||
22:56
hoffentlichja joined
|
|||
samcv | how do you get a module's version number from inside the module's code? | 23:00 | |
23:03
eroux left
23:07
nadim left
23:12
headcase joined
23:23
ryn1x left
23:25
Ven`` left
23:26
Ven`` joined
23:27
ryn1x joined
23:30
Rawriful left
23:36
cdg joined
23:41
cdg left
23:47
headcase_ joined
23:49
TreyHarris left
23:51
headcase left,
headcase_ left
23:55
headcase joined
23:56
ryn1x left
23:58
atroxaper joined
|