»ö« 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:06
shinobicl left
00:08
Guest77349 left
00:09
shinobi-cl joined,
syntaxman joined,
syntaxman left,
syntaxman joined
00:11
comborico1611 left
00:13
Rawriful left
00:25
shinobi-cl left,
shinobi-cl joined
00:44
itaipu left
01:14
astj joined
01:16
markong left
01:20
ZzZombo left
01:25
aborazmeh joined,
aborazmeh left,
aborazmeh joined
01:31
MasterDuke joined,
itaipu joined
01:39
lookatme_q joined
01:42
lookatme_q left
|
|||
lookatme | :) | 01:42 | |
01:55
comborico1611 joined
02:03
itaipu left
02:10
itaipu joined
02:11
espadrine_ left
02:23
comborico1611 left
02:32
itaylor57 left
02:36
cdg joined
02:41
cdg left
02:45
ilbot3 left
02:58
ilbot3 joined,
ChanServ sets mode: +v ilbot3
03:08
itaipu left
03:14
Eddward left
03:27
aindilis joined
03:29
Eddward joined
03:35
itaipu joined
03:41
Eddward left,
aborazmeh left
03:42
itaipu left
03:53
cdg joined
03:54
cdg_ joined
03:55
cdg__ joined
03:58
cdg left
03:59
cdg_ left,
itaipu joined,
astj left
04:00
astj joined,
astj left
04:01
astj joined
04:05
astj left
04:12
itaipu left
|
|||
shinobi-cl | Hi all | 04:13 | |
I read that Junctions can not be instrospected, i think they can not even be typified. Makes sense. However, i want to do something like this: | 04:15 | ||
m: my Regex @rxs = (rx/3/, rx/2/); say @rxs.perl; my @L = (1, 2, 3, 10, 11, 12, 13, 21, 22, 23); my @F = grep { @rxs }, :v, @L; say @F.perl; | 04:16 | ||
evalable6 | Array[Regex].new(rx/3/, rx/2/) [1, 2, 3, 10, 11, 12, 13, 21, 22, 23] |
||
shinobi-cl | m: my Regex @rxs = (rx/3/, rx/2/); say @rxs.perl; my @L = (1, 2, 3, 10, 11, 12, 13, 21, 22, 23); my @F = grep { rx/2/ }, :v, @L; say @F.perl; | ||
evalable6 | Array[Regex].new(rx/3/, rx/2/) [2, 12, 21, 22, 23] |
||
shinobi-cl | m: my Regex @rxs = (rx/3/, rx/2/); say @rxs.perl; my @L = (1, 2, 3, 10, 11, 12, 13, 21, 22, 23); my @F = grep { all(@rxs) }, :v, @L; say @F.perl; | ||
evalable6 | Array[Regex].new(rx/3/, rx/2/) [23] |
||
shinobi-cl | cool, eh? But if i wanted to have this grep inside a sub, how should i put the parameter that is going to be inside the grep later? | 04:17 | |
04:17
astj joined
|
|||
shinobi-cl | m: my Regex @rxs = (rx/3/, rx/2/); say @rxs.perl; my @L = (1, 2, 3, 10, 11, 12, 13, 21, 22, 23); my @F = grep { any(@rxs) }, :v, @L; say @F.perl; | 04:21 | |
evalable6 | Array[Regex].new(rx/3/, rx/2/) [2, 3, 12, 13, 21, 22, 23] |
||
04:23
astj left
04:24
Cabanossi left
04:26
Cabanossi joined
|
|||
shinobi-cl | m: my Regex @rxs = (rx/3/, rx/2/); say @rxs.perl; my @L = (1 .. 23); sub search(Regex $r) { return grep { $r }, :v, @L}; say search( any(@rxs) ); | 04:27 | |
evalable6 | Array[Regex].new(rx/3/, rx/2/) (3 13 23) (2 12 20 21 22 23) |
||
04:31
astj joined
|
|||
shinobi-cl | the idea,, be able to pass either a single regex to the method, or a Junction, but this junction has to be made of Regexes | 04:32 | |
04:45
Zoffix joined
|
|||
Zoffix | m: my Regex @rxs = (rx/3/, rx/2/); my @L = (1 .. 23); sub search(Mu $r where Regex) { grep $r, :v, @L }; say search( any(@rxs) ); | 04:46 | |
evalable6 | (2 3 12 13 20 21 22 23) | ||
Zoffix | m: my Regex @rxs = (rx/3/, rx/2/); my @L = (1 .. 23); sub search(Mu $r where Regex) { grep $r, :v, @L }; say search( /3/ ); | ||
evalable6 | (3 13 23) | ||
Zoffix | m: my Regex @rxs = (rx/3/, rx/2/); my @L = (1 .. 23); sub search(Mu $r where Regex) { grep $r, :v, @L }; say search( any 42 ); | ||
evalable6 | (exit code 1) Constraint type check failed in binding to parameter '$r'; expected anonymou… | ||
Zoffix, Full output: gist.github.com/7cabce0fa5d69f1f84...c25fc59056 | |||
Zoffix | Mu stops Junction autothreading and smartmatching with `Regex` typechecks both Junction and non-Junction args to Regex types | 04:47 | |
04:48
Zoffix left
05:00
tokik joined
05:01
tokik left
|
|||
shinobi-cl | my Regex @rxs = (rx/3/, rx/2/); my @L = (1 .. 23); sub search(Mu $r where Regex) { grep $r, :v, @L }; say search( any(@rxs) ); | 05:02 | |
m: my Regex @rxs = (rx/3/, rx/2/); my @L = (1 .. 23); sub search(Mu $r where Regex) { grep $r, :v, @L }; say search( any(@rxs) ); | |||
evalable6 | (2 3 12 13 20 21 22 23) | ||
shinobi-cl | m: my Regex @rxs = (rx/3/, rx/2/); my @L = (1 .. 23); sub search(Mu $r where Regex) { grep $r, :v, @L }; say search( all(@rxs) ); | ||
evalable6 | (23) | ||
shinobi-cl | m: my Regex @rxs = (rx/3/, rx/2/); my @L = (1 .. 23); sub search(Mu $r where Regex) { grep $r, :v, @L }; say search( none(@rxs) ); | ||
evalable6 | (exit code 1) Died with X::TypeCheck::Binding::Parameter in sub search at /tmp/642Q3CxtaJ line 1 in block <unit> at /tmp/642Q3CxtaJ line 1 |
||
05:07
eliasr left
|
|||
shinobi-cl | m: my Regex @rxs = (rx/3/, rx/2/); my @L = (1 .. 23); sub search(Mu $r where Regex) { grep $r, :v, @L }; say search( one(@rxs) ); | 05:07 | |
evalable6 | (exit code 1) Constraint type check failed in binding to parameter '$r'; expected anonymou… | ||
shinobi-cl, Full output: gist.github.com/290ed9fd294916e8ab...98a01ba81f | |||
05:23
shinobi-cl left,
shinobi-cl joined,
Zoffix joined
|
|||
Zoffix | m: my Regex @rxs = (rx/3/, rx/2/); my @L = (1 .. 33); sub search(Mu $r where { -> Regex {}($_); True }) { grep $r, :v, @L }; say search @rxs.all; | 05:23 | |
evalable6 | (23 32) | ||
Zoffix | m: my Regex @rxs = (rx/3/, rx/2/); my @L = (1 .. 33); sub search(Mu $r where { -> Regex {}($_); True }) { grep $r, :v, @L }; say search @rxs.one; | ||
evalable6 | (2 3 12 13 20 21 22 24 25 26 27 28 29 30 31 33) | ||
Zoffix | m: my Regex @rxs = (rx/3/, rx/2/); my @L = (1 .. 33); sub search(Mu $r where { -> Regex {}($_); True }) { grep $r, :v, @L }; say search @rxs.any; | ||
evalable6 | (2 3 12 13 20 21 22 23 24 25 26 27 28 29 30 31 32 33) | ||
Zoffix | m: my Regex @rxs = (rx/3/, rx/2/); my @L = (1 .. 33); sub search(Mu $r where { -> Regex {}($_); True }) { grep $r, :v, @L }; say search any 42; | 05:24 | |
evalable6 | (exit code 1) Type check failed in binding to parameter '<anon>'; expected Regex but got Int (42) in block at /tmp/jGch8FWsy4 line 1 in sub search at /tmp/jGch8FWsy4 line 1 in block <unit> at /tmp/jGch8FWsy4 line 1 |
||
Zoffix | Basically threads it through an empty block constrained to Regex, which will explode if anything ain't a regex (giving failed typecheck) or pass and give True from the `where` | 05:25 | |
05:28
cdg__ left
|
|||
Xliff | m: my Regex @rxs = (rx/3/, rx/2/); my @L = (1 .. 33); sub search(Mu $r where { -> Regex {}($_); True }) { grep $r, :v, @L }; say search @rxs.none; | 05:31 | |
m: my Regex @rxs = (rx/3/, rx/2/); my @L = (1 .. 33); sub search(Mu $r where { -> Regex {}($_); True }) { grep $r, :v, @L }; say search @rxs.none; | |||
evalable6 | (1 4 5 6 7 8 9 10 11 14 15 16 17 18 19) | ||
Xliff | m: my Regex @rxs = (rx/3/, rx/2/); my @L = (1 .. 33); sub search(Mu $r where { -> Regex {}($_); True }) { grep $r, :v, @L }; say search one(@rxs.all, @rxs.none); | 05:32 | |
evalable6 | (1 4 5 6 7 8 9 10 11 14 15 16 17 18 19 23 32) | ||
shinobi-cl | m: my Regex @rxs = (rx/3/, rx/2/); my @L = (1 .. 33); sub search(Mu $r where { -> Regex {}($_); True }) { grep $r, :v, @L }; say search @rxs.one; | ||
evalable6 | (2 3 12 13 20 21 22 24 25 26 27 28 29 30 31 33) | ||
Xliff | Zoffix++ # Working with combined conjunctions. | 05:33 | |
shinobi-cl | hmm, i see... i created a ticket fo this... Do you think is worth of a ticket? or it was me, that was just using the wrong signature? | 05:34 | |
Xliff | shinobi-cl: Which ticket?? | ||
Zoffix | shinobi-cl: I don't see any tickets. What was it about? | 05:35 | |
shinobi-cl | it was about this specific issue, one and none junctions throwing an error | 05:41 | |
it was sent via email, [email@hidden.address] | |||
Zoffix | shinobi-cl: ah, ok, those take some time to show up on the site. FWIW we also have this alternative Issue tracker: github.com/rakudo/rakudo/issues | ||
shinobi-cl: and those worked as expected, I just didn't think of different types of junctions when I suggested it. `Mu $x where Regex` with a `one` Junction is basically equivalent to `$x ~~ Regex` or "where EXACTLY ONE thing is of type Regex" and you had two regex objects inside, so it was failing the typecheck | 05:43 | ||
m: say <a b c>.all ~~ Str | 05:44 | ||
evalable6 | True | ||
Zoffix | m: say <a b c>.one ~~ Str | ||
evalable6 | False | ||
Zoffix | m: say <a b c 42>.one ~~ Int | ||
evalable6 | True | ||
Zoffix | m: say <a b c 42 42>.one ~~ Int | ||
evalable6 | False | ||
05:50
curan joined
|
|||
tyil | can I send a raw IRC message using IRC::Client? I want to send an NS command (instead of using PRIVMSG NickServ) | 05:51 | |
05:56
wamba joined
|
|||
Zoffix | I think so... | 05:58 | |
tyil | in the source I see a send-msg that gets a raw command as arg, but it also gets a $server, so I'm not sure if I can use it as `method irc-connected($e) { $e.send-msg: 'NS identify ...' } | 06:00 | |
Zoffix | tyil: it's not documented, but try to use `send-cmd` method send-cmd ($cmd, *@args is copy, :$prefix = '', :$server) | ||
Ah | |||
You'd call it on IRC::Client object, not on $e (which is IRC::Client::Message) | 06:01 | ||
$e.irc.send-msg: 'NS blah blah' | |||
and don't provide the server | |||
tyil | ah | ||
that makes sense | |||
lemme try that :> | |||
Zoffix | FWIW on Freenode you can identify with NS by using server password (:password arg on instantiation of IRC::Client object) | 06:02 | |
tyil | heh | ||
but now I already took the effort to start a module for it, so I want to see if I can make it work :p | 06:03 | ||
in the least it could be good for the perl 6 module count I guess | |||
Zoffix | And I see send-cmd was meant to be documented, but was just missed, so it's safe to use it. github.com/zoffixznet/perl6-IRC-Cl.../issues/30 | 06:09 | |
tyil | sweet | ||
06:14
psch joined
06:15
khw left
|
|||
psch | o/ | 06:15 | |
there was a different VM than hack for irc clients on p6c.org, wasn't there..? | 06:16 | ||
cause my screens get nuked every two days, which i can deal with wrt coding, but with irssi it's a bit inconvenient | 06:17 | ||
Zoffix | irc.p6c.org IIRC | ||
shinobi-cl | m: my @a = (1,2,Nil,4); say @a.grep(rx/2/, :v); | ||
evalable6 | Use of uninitialized value of type Any in string context. Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful. (2) in block <unit> at /tmp/Bkkc3xiDLb line 1 |
||
psch | Zoffix: i actually tried that, my connection's getting refused | ||
Zoffix | m: my @a = (1,2,Nil,4); say @a.grep({defined and /2/}, :v); | 06:18 | |
evalable6 | (exit code 1) 04===SORRY!04=== Error while compiling /tmp/7SD_RyDJN5 Undeclared routine: and used at line 1. Did you mean 'rand', 'any', 'end'? |
||
Zoffix | m: my @a = (1,2,Nil,4); say @a.grep({.defined and /2/}, :v); | ||
evalable6 | (2) | ||
psch | m: my @a = (1,2,Nil,4); say quietly @a.grep(rx/2/, :v); | ||
evalable6 | Use of uninitialized value of type Any in string context. Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful. (2) in block <unit> at /tmp/ABR8BkAH_o line 1 |
||
shinobi-cl | m: my @a = (1,2,Nil,4); say @a.grep( {.defined and rx/2/}, :p); | ||
evalable6 | (1 => 2) | ||
shinobi-cl | m: my @a = (1,2,Nil,4); say @a.grep( {.defined and rx/4/}, :p); | 06:19 | |
evalable6 | (3 => 4) | ||
psch | m: my @a = (1,2,Nil,4); quietly say @a.grep(rx/2/, :v); | ||
evalable6 | (2) | ||
psch | there :s | ||
shinobi-cl | thanks :) | ||
Zoffix | m: my @a = (1,2,Nil,4); say @a.grep: * andthen /2/; | 06:20 | |
evalable6 | (exit code 1) (1 2 (Any) 4) No such method '!cursor_start' for invocant of type 'Bool' in block <unit> at /tmp/yZppJE0uVA line 1 |
||
Zoffix | no curry for andthen :( | ||
psch | m: my @a = (1,2,Nil,4); say @a.grep: { $_ andthen /2/ } | 06:21 | |
evalable6 | (exit code 1) No such method '!cursor_start' for invocant of type 'Int' in block <unit> at /tmp/C4YTH6huhY line 1 |
||
psch | m: my @a = (1,2,Nil,4); say @a.grep: { $^a andthen /2/ } | ||
evalable6 | (exit code 1) No such method '!cursor_start' for invocant of type 'Int' in block <unit> at /tmp/Nw8BcqCZoX line 1 |
||
psch | uhm | ||
Zoffix | Regex is Callable | ||
psch | but grep does take a Block..? | ||
oh the RHS isn't curried then, i see | |||
Zoffix | Yeah | 06:22 | |
m: /2/(4) | |||
evalable6 | (exit code 1) No such method '!cursor_start' for invocant of type 'Int' in block <unit> at /tmp/sUPpJus1Sf line 1 |
||
lookatme | m: rx/2/(4) | 06:24 | |
evalable6 | (exit code 1) No such method '!cursor_start' for invocant of type 'Int' in block <unit> at /tmp/CxmRSt11_A line 1 |
||
lookatme | m: rx/2/ .(4) | ||
evalable6 | (exit code 1) 04===SORRY!04=== Error while compiling /tmp/QtqpfOfXbB Malformed postfix call (only alphabetic methods may be detached) at /tmp/QtqpfOfXbB:1 ------> 03rx/2/ .08⏏04(4) |
||
psch | m: /2/(Match.new("2")) # uh huh | 06:25 | |
evalable6 | (exit code 1) Default constructor for 'Match' only takes named arguments in block <unit> at /tmp/rPqRxJm3KU line 1 |
||
psch | m: /2/(Match.new(orig => "2")) # uh huh | ||
evalable6 | |||
psch | yeah probably don't go there :) | ||
06:26
lookatme left
|
|||
Zoffix | psch: dunno, talk to [Coke] about irc.p6c.org. I can see the box is running in the hypervisor, but I don't have any logins for it and too get the "connection refused" thing. | 06:30 | |
Looks like there might be a problem actually. Based on logs, masak uses it. [Coke] probably too, but neither are connected right now | 06:32 | ||
psch | Zoffix: oh, i see, thanks for checking | 06:38 | |
06:42
Zoffix left
06:48
AlexDaniel left
|
|||
tyil | hmm | 06:50 | |
No such method 'send-msg' for invocant of type 'IRC::Client' in method irc-n376 | 06:51 | ||
psch | tyil: Zoffix mentioned send-cmd? | 06:52 | |
tyil | yes, Im trying to figure out how to use it properly in the current context | 06:53 | |
psch | oh, i was just confused 'cause your error mentions send-msg instead | ||
tyil | oh | ||
OH | |||
thanks psch ;~; | 06:54 | ||
psch | :) | ||
tyil | it all works as intended now | ||
guess I should get some breakfast before going on to the next project | |||
06:58
lowbro left
06:59
lowbro joined,
lowbro left,
lowbro joined
|
|||
buggable | New CPAN upload: IRC-Client-Plugin-NickServ-0.1.0.tar.gz by TYIL cpan.metacpan.org/authors/id/T/TY/...1.0.tar.gz | 07:05 | |
07:17
sena_kun joined
07:19
shinobicl joined
07:22
shinobi-cl left
07:23
noganex left
07:28
astj left
07:30
astj joined
07:31
noganex joined
07:34
abraxxa joined
|
|||
buggable | New CPAN upload: IRC-Client-Plugin-NickServ-0.1.1.tar.gz by TYIL cpan.metacpan.org/authors/id/T/TY/...1.1.tar.gz | 07:35 | |
tyil | hype | ||
psch | \o/ | 07:47 | |
07:51
domidumont joined
|
|||
psch | hrm, why does bluetoothctl tell me it's waiting for bluetoothd if the service is just called bluetooth.service :/ | 07:52 | |
07:58
parv joined
08:01
shinobicl left
08:03
darutoko joined
08:06
domidumont left
08:07
domidumont joined
08:19
astj_ joined,
astj left
|
|||
psch & | 08:24 | ||
08:29
cdg joined
08:30
parv left
08:34
cdg left
08:36
zakharyas joined
08:55
scimon joined
09:11
dogbert11 left
09:22
dakkar joined
09:30
itaylor57 joined
09:35
itaylor57 left
09:49
itaylor57 joined
09:52
rindolf joined
09:55
itaylor57_ joined
09:56
itaylor57_ left,
itaylor57 left,
itaylor57 joined
10:13
mingdao left,
zakharyas left
10:14
zakharyas joined
10:22
zakharyas left
10:26
mingdao joined
10:42
markong joined
|
|||
scimon | One thing the recent contretemps highlighted where a few beliefs about Perl6 that seem persistent but maybe be untrue. | 10:52 | |
For instance "Perl6 can't do https requests" which AFAIK should be "libssl isn't threadsafe" | |||
But another I saw is that Perl doesn't do DB stuff well. Now I know we don't have a go to ORM (but as I'm not a huge ORM fan this doesn't bother me hugely) but what is DBIish missing that people think it's not usable? | 10:54 | ||
Anyone? | |||
lizmat | it's not DBI | ||
sorry, am a bit cranky | 10:55 | ||
afaik, Cro does HTTPS | 10:56 | ||
scimon | Oh I know. | ||
lizmat | *and* HTTP/2.0 for that matter | ||
10:56
zakharyas joined
|
|||
scimon | And there are other modules that do HTTPS as long as you don't thread them. | 10:56 | |
(Because they are using libssl with NativeCall under the hood) | |||
lizmat | but Cro does them threaded, no ? | ||
ah, ok | 10:57 | ||
scimon | I'm mostly trying to put together a list of myths that need examined. | ||
lizmat | ++scimon | ||
scimon | Frankly DBIish is pretty close to DBI | ||
lizmat | yeah, considering taking it as the base of a CPAN Butterfly Plan DBI | 10:58 | |
but not today | |||
scimon | :) | ||
10:59
AlexDaniel joined
|
|||
scimon | I'll say it again you're doing amazing work with that. | 10:59 | |
El_Che sends some rainbows, unicorns and puppies-and-turtles-can-be-friends-video to lizmat for het crankiness | 11:02 | ||
lizmat: to be honest, the name implies subpar | |||
maybe time to change it or alias it? | |||
lizmat | well, that would be my point :-) | 11:03 | |
anyways, I'm preparing my last Perl 6 Weekly | |||
before I have some R&R :-) | |||
El_Che | last Perl 6? nowadays ships in the carabbean are safe ;) | 11:04 | |
lizmat | I'm more worried about things before getting onto the ship and after getting off the ship again :-) | 11:05 | |
El_Che | hehe | ||
DrForr | Unless you take Destination:Truth for...well, truth - I watched an episode over Xmas where spooky things. | 11:06 | |
* happened; | |||
jnthn | scimon: Cro has no problem with concurrent HTTPS requests | 11:07 | |
It uses IO::Socket::Async::SSL, which does the required locking | 11:08 | ||
El_Che | jnthn: maybe the cro sugar could be separated to a generic module? | ||
jnthn | IO::Socket::Async::SSL already is a separate module | 11:09 | |
And the Cro::HTTP module doesn't contain the tools, UI, etc. It's just the HTTP stuff. | |||
El_Che | jnthn: I haven't used it, but the socket part in the name make it sounds low level | ||
jnthn | I'm not really sure what you're asking for. | 11:10 | |
El_Che | I am not really sure what I am asking :) | ||
jnthn | :P | ||
I don't think installing Cro::HTTP in order to have a concurrent HTTP client is really a problem, though. | 11:11 | ||
Sure, there's server stuff in there too, but the server and client use the very same request/response objects and body parsing stuff. | |||
scimon | My point was that there's a myth that Perl6 can't handle SSL. Wheras the truth is rather more complex. | ||
11:11
wamba left
|
|||
El_Che | jnthn: I had this in mind as a slightly less higher abstraction than socket: golang.org/pkg/net/http/ | 11:12 | |
scimon | I was thinking of doing a bit of mythbusting in some form (blog or some such). | ||
tadzik | I guess what matters to some people is that the truth is complex rather than being a straight "yes" | ||
see also: "is perl6 fast?" | |||
El_Che | jnthn: if Cro::HTTP fits the bill, we need to advertise it | ||
jnthn | El_Che: Looks like it to me, glancing through that | 11:13 | |
DrForr | There are all sorts of Perl 6 myths that need busting. Where are Adam and Jamie when you need them? | 11:14 | |
El_Che | jnthn++ | ||
jnthn | The only "sugar" atop of that which is found in Cro::HTTP is Cro::HTTP::Router. | ||
Which accounts for probably 5% of the size of the distribution.# | 11:15 | ||
El_Che | my point is that many people will stay away from frameworks or thinking that they don't need microservices and don't look at Cro, while it solves the http(s) problem | ||
jnthn: kind of what Mojo does | 11:16 | ||
jnthn | I've never called it a framework :-) | ||
El_Che | at the moment, it's THE framework | ||
:) | |||
jnthn | But yeah, point taken, we can try to advertise "we have a nice HTTP client" better | 11:17 | |
scimon | So. Any thoughts on what problems people might have with DBIish? | ||
jnthn | Perhaps on the homepage could make HTTP Server and HTTP Client separate entries so it's obvious there are both | 11:18 | |
El_Che | yeah, having a good enough http client built-in on Go (and used a a based for more sugary implementations) helped that lang's popularity | ||
jnthn | That'd let us show off the HTTP client with some examles too. | ||
El_Che | a very well know module as the module-to-use is a good alternative | ||
jnthn: exactly | |||
jnthn | If I do it after this week's release I can even put in an example of working with HTTP/2 push promises on the client side :) | 11:19 | |
jkramer | Good news everyone! I fixed the ö/Ö talking script so it doesn't crash anymore and also made the code a bit nicer to look at :) gist.github.com/jkramer/2fa0e1d3fc...773c692a46 | ||
El_Che | jnthn++ | ||
jnthn | El_Che++ for feedback | ||
El_Che | jnthn: played just a little with it. Looking forward to write my first real project with it. I reserved some time for it | 11:21 | |
DrForr | I should have something interesting Cro-related to show at FOSDEM :) | 11:22 | |
11:22
itaipu joined
11:25
zakharyas left
|
|||
El_Che | DrForr: nice! Looking forward to it | 11:26 | |
11:26
zakharyas joined
|
|||
DrForr | I'd love to show it here but unfortunately the modules are too large to fit in the margin of my server :) | 11:26 | |
El_Che | margin of your server? | 11:27 | |
you rented a server in 1994? | |||
DrForr | 4Gb and I'm at 89Mb remaining, most of it's OS stuff. | 11:28 | |
And the problem children are node.js | |||
El_Che | wow | ||
lizmat | wow indeed | ||
I mean, my notebook has more RAM :-) | |||
El_Che | if you're paying around 5€ for that, I'll give you a friendly buy firm tick on the head | 11:29 | |
:) | |||
DrForr | It's a Linode server - I think I actually can get the drive upgraded if I can get the rest of the cr*p off it. | 11:30 | |
119M node_modules/ | |||
El_Che | DrForr: get a free (1 year) aws vm to show your perl stuff? | 11:31 | |
DrForr | Yeah, probably will today after I get one or two problems worked out. | 11:32 | |
Not trying to be a tease, trying to get stuff straightened out. | 11:33 | ||
El_Che | no worries | ||
just for the record, digital ocean smallest machines has a 25gb ssd disk. I probably have a $10 referal code in case you want to try it (but I need to check) | 11:36 | ||
jnthn bbl | |||
11:36
cdg joined
|
|||
DrForr | Sounds like linode is soaking me for a bit re: prices but I'll check later. I do want to keep this on a machine that doesn't have personal stuff on it though, so I can nuke it without any personal felings. | 11:38 | |
*feelings | |||
11:39
jeromelanteri joined
|
|||
El_Che | DrForr: actually, the only cloud machine I have at the moment is like that. Just an OpenVPN machine | 11:39 | |
moved it around a few times: aws, digital ocean, joyent. Whereever I had credit | 11:40 | ||
11:41
cdg left
11:42
eliasr joined
|
|||
DrForr | Aaand I just panicked MoarVM again - "use of invalid eventloop work item index -1" | 11:48 | |
Which can't be repeated... | 11:49 | ||
11:50
ZzZombo joined
|
|||
ZzZombo | m: my @a;for 1,2,3 { @a.push: class { has $.i is rw='a';submethod BUILD(:$!i='asd') {.say} } };@a[0].new.say | 11:50 | |
evalable6 | (Any) <anon|93934972633264>.new(i => "asd") |
||
ZzZombo | star: my @a;for 1,2,3 { @a.push: class { has $.i is rw='a';submethod BUILD(:$!i='asd') {.say} } };@a[0].new.say | 11:52 | |
moritz | huh, camelia is missing again? | 11:54 | |
ZzZombo | star: my @a;for 1,2,3 { @a.push: class { has $.i is rw='a' } };@a[0].new.say | ||
m: my @a;for 1,2,3 { @a.push: class { has $.i is rw='a' } };@a[0].new.say | |||
evalable6 | <anon|93855688941552>.new(i => "a") | ||
ZzZombo | m: my @a;for 1,2,3 { @a.push: class { has $.i is rw=$_ } };@a[0].new.say | 11:55 | |
evalable6 | <anon|94034808729584>.new(i => Any) | ||
psch | moritz: kinda "still," she fluttered off some 6+ hours ago i think | ||
ZzZombo | m: my @a;for 1,2,3 -> $v { @a.push: class { has $.i is rw=$v } };@a[0].new.say | ||
evalable6 | <anon|94070905553584>.new(i => 3) | ||
11:55
zakharyas left
|
|||
moritz | nine: the VM on which camelia resides seem to be having network trouble again :( | 11:56 | |
11:56
zakharyas joined
|
|||
moritz | camelia:~ # ping -c 5 perl6.org | 11:57 | |
PING perl6.org (213.95.82.53) 56(84) bytes of data. | |||
--- perl6.org ping statistics --- | |||
5 packets transmitted, 0 received, 100% packet loss, time 4032ms | |||
11:57
coverable6 left
11:58
nativecallable6 left,
coverable6 joined,
ChanServ sets mode: +v coverable6,
unicodable6 left,
nativecallable6 joined,
unicodable6 joined,
ChanServ sets mode: +v unicodable6
11:59
reportable6 left
|
|||
ZzZombo | m: my @a;for 1,2,3 { @a.push: class { has $.i is rw=$_ } };for @a {.new.say} | 11:59 | |
evalable6 | <anon|94682981474320>.new(i => Any) <anon|94682981474320>.new(i => Any) <anon|94682981474320>.new(i => Any) |
||
ZzZombo | m: my @a;for 1,2,3 -> $v { @a.push: class { has $.i is rw=$v } };for @a {.new.say} | 12:00 | |
evalable6 | <anon|94252978598592>.new(i => 3) <anon|94252978598592>.new(i => 3) <anon|94252978598592>.new(i => 3) |
||
ZzZombo | why all the classes are the same? | ||
12:01
reportable6 joined
|
|||
moritz | ZzZombo: because there is only one variable $v | 12:03 | |
and an "is rw" attribute binds to the container, not the value | |||
psch | m: for ^3 { class { }.WHICH.say } | 12:04 | |
evalable6 | <anon|94187547973360>|U94187527440800 <anon|94187547973360>|U94187527440800 <anon|94187547973360>|U94187527440800 |
||
psch | moritz: isn't it that the class decl is compile time and thus there's only one? | 12:05 | |
moritz: $.i being the same value is the container binding though | |||
moritz | psch: erm, you're right | ||
12:05
reportable6 left
|
|||
tobs | m: ("a".."g").rotor((1, 2, Inf), :partial)».join | 12:08 | |
evalable6 | |||
tobs | huh, it produces (a bc) here | ||
psch | tobs: ENOSAY | ||
tobs | m: say ("a".."g").rotor((1, 2, Inf), :partial)».join | ||
evalable6 | (a bc) | ||
tobs | my question was supposed to be if I can stop the rotor from rotoring, but Inf doesn't work | 12:09 | |
as in, (a bc defg) is what I'm after | 12:10 | ||
psch | m: say ("a".."g").rotor((1, 2, *), :partial)».join | ||
evalable6 | (a bc) | ||
tyil | jnthn: your fix works for me | 12:11 | |
psch | m: say ("a".."g").rotor((1, 2, Int), :partial)».join | 12:12 | |
evalable6 | (exit code 1) Invocant of method 'Bridge' must be an object instance of type 'Int', not a type object of type 'Int'. Did you forget a '.new'? in block <unit> at /tmp/h77LNqYdpd line 1 |
||
psch | pff | ||
tobs: seems to me like either Inf or Whatever should do what you want, but i'm not that deep into roto | 12:13 | ||
+r | |||
tobs | m: say ("a".."g").rotor((1, 2, .1), :partial)».join | 12:14 | |
evalable6 | (exit code 1) Rotorizing sublist length is out of range. Is: 0.1, should be in 1..^Inf; Did you mean to specify a Pair with => 0.1? in block <unit> at /tmp/xg8GMwnNU8 line 1 |
||
psch | tobs: you could supply the Int-coerced invocant as last argument i suppose... | ||
tobs | psch: I think so too, but ^ part of it knew that ^Inf is the limit | ||
psch | tobs: true, and that's a range excludiing Inf which means Inf itself could mean "all of the rest" | 12:15 | |
12:15
AlexDani` joined
12:17
AlexDaniel left
|
|||
tobs | welp, lunch break is over. I have to go. | 12:19 | |
12:23
zakharyas left
12:29
wamba joined
|
|||
lizmat has started on the P6W and it's going to be a monster one | 12:41 | ||
12:41
astj_ left
|
|||
stmuk | lizmat: I'm slacking a bit but hope to get R* out in the next few hours | 12:41 | |
El_Che | repeat with me: p6w is not an open letter | ||
12:41
astj joined
|
|||
El_Che | :P | 12:41 | |
lizmat | El_Che: no, it is not | 12:42 | |
the "monster" was referring to the size | |||
timotimo | no scary posts on the p6w ;) | ||
12:42
PrincipiaMa joined
|
|||
PrincipiaMa | How do I run many shell commands right after one another? | 12:43 | |
timotimo | PrincipiaMa: do you just need to start one when a previous one is finished, or do you want to shovel data in between the commands? | ||
tadzik | what about multiple shell() calls, one after another? :) | ||
PrincipiaMa | timotimo: I want it to start right after the last one is finished, so like go into a directory, then do something there | 12:44 | |
timotimo | using a shell call to change directories is not going to have the effect you want | ||
you're starting a shell to call cd, which changes the shell's directory, then the shell is finished and exits and no effect will be felt | |||
lizmat | stmuk: looking forward to announce Rakudo * | ||
PrincipiaMa | timotimo: Oh, okay. Would there be a better way to do what I'm trying to do? | 12:45 | |
timotimo | and since shell calls the shell, you can use the regular multiple-commands feature that a shell offers, for example by putting ; between the commands | ||
12:46
astj left
|
|||
timotimo | also, shell accepts a "cwd" named argument that you can use instead of calling cd in the shell itself | 12:46 | |
PrincipiaMa | timotimo: Using ";" between commands made it work now :D Thanks. | ||
12:47
wamba left
12:50
PrincipiaMa left
|
|||
El_Che | "&&" is the better choice most of the tim | 12:52 | |
e | |||
timotimo | oh, dang, that's true | ||
i'm a fish user, so i always do that with "; and" | |||
El_Che | I thought that shell users were lazy and wanted to minimize the typed chars :) | 12:53 | |
12:55
astj joined
13:00
astj left
13:01
reportable6 joined,
ChanServ sets mode: +v reportable6
|
|||
jnthn | tyil: Thanks for testing | 13:08 | |
tyil | np | 13:13 | |
timotimo | you know that feeling when you should be packing boxes for the move but instead you're disassembling an lcd monitor? | 13:18 | |
jnthn | I...I can't say I do! :P | 13:20 | |
I'm sure I've procrastinated packing boxing in other ways, though :) | |||
timotimo | anyway, yeah, here's a few capacitors that really wanted more freedom for their innards | 13:26 | |
El_Che | when you'll move you'll have a working lCD | 13:30 | |
(and probably no clothing) | |||
timotimo | the move starts in earnest tomorrow and i haven't really started packing boxes yet. which isn't a problem because i didn't unpack much since the last move (which was only 9 months ago; 6 months ago the new landlord told us we had to move out now so their kid could get the apartment) | 13:31 | |
lizmat wishes timotimo strength the coming weeks | 13:32 | ||
El_Che | timotimo: fuck that | ||
timotimo | ᕦ(° Д°)ᕤ | ||
fuck that indeed. unfortunately, i engaged 100% push-over unnecessarily-polite mode the day they came to tell us | 13:33 | ||
El_Che | replace the landlord with a small perl6 script | 13:34 | |
timotimo | he's an urologist; i'm not sure i'm sufficiently educated about the subject to implement his work in any programming language | ||
probably a bit like react { whenever $practice.accept -> $client { $client.say("here's some antibiotics"); $client.kick-out }; whenever Supply.interval(180) { $snacks.pop.eat } } | 13:36 | ||
El_Che | heh | ||
psch | timotimo: in my experience urologists always want you to pee in a cup first | ||
timotimo: also re super-polite mode, i don't think being angry changes anything about Eigenbedarf, which is a valid reason to terminate a lease | 13:37 | ||
timotimo | i should have consulted an attorney, because i'm pretty sure terminating a lease that early is at least not guaranteed to work | 13:38 | |
13:39
lizmat left,
wamba joined
13:40
lizmat joined
|
|||
Xliff | timotimo: react { whenever $practice.accept -> $client { $client.pee; $client.say("here's some antibiotics"); $client.kick-out }; whenever Supply.interval(180) { $snacks.pop.eat } } # Fix from psch | 13:50 | |
timotimo | more like my $cup = await $client.pee :) | ||
Xliff | LOL | ||
timotimo: my $quack = Landlord.new; react { whenever $practice.accept -> $client { my $cup = await $client.pee; $quack.say("here's some antibiotics"); $client.kick-out }; whenever Supply.interval(180) { $snacks.pop.eat } } # More fixes. ;) | 13:51 | ||
colomon | do we have a good idiom for returning (say) two hashes from a sub? | 13:54 | |
timotimo | i'd literally just return %foo, %bar | 13:55 | |
colomon | timotimo: …. how do you recieve those values on the other end? | ||
the point of the call, I mean | |||
colomon is apparently doing it wrong | 13:56 | ||
psch | m: sub f { { a => 1 }, { b => 2 } }; my (%a, %b) = f; say %a<a>, %b<b> | ||
evalable6 | 1(Any) | ||
psch | something something GLR was just a few months ago >_> | ||
13:56
itaipu left
|
|||
colomon | yes, I believe that’s what I’m seeing (though not quite how I did it) | 13:56 | |
psch | m: sub f { { a => 1 }, { b => 2 } }; my ($a, $b) = f; say %a<a>, %b<b> | ||
evalable6 | (exit code 1) 04===SORRY!04=== Error while compiling /tmp/npw_Ng65kT Variabl… |
||
psch, Full output: gist.github.com/e9b30d093468695629...6b46dfde22 | |||
psch | m: sub f { { a => 1 }, { b => 2 } }; my ($a, $b) = f; say $a<a>, $b<b> | ||
evalable6 | 12 | ||
colomon | psch++ timotimo++ | 13:57 | |
psch | m: sub f { $({ a => 1 }), $({ b => 2 }) }; my (%a, %b) = f; say %a<a>, %b<b> # probably not... | ||
evalable6 | (Any)(Any) | ||
psch | colomon: yeah, gotta itemize the assignment LHS it looks like | ||
moritz | m: sub f { { a => 1 }, { b => 2 } }; my (%a, %b) := f; say %b.perl | ||
evalable6 | {:b(2)} | ||
psch | ooh or bind, yes | ||
moritz++ | |||
13:58
cdg joined
|
|||
moritz | .oO( in the list to bind them ) |
13:58 | |
colomon | moritz++ | 13:59 | |
13:59
curan left
|
|||
colomon | moritz: though I wouldn’t have to ask here if I’d found it in Perl 6 Fundamentals. ;) | 13:59 | |
14:00
rindolf left
|
|||
colomon hasn’t actually read Perl 6 Fundamentals, which may have meant he didn’t know where to look in it | 14:00 | ||
moritz | :-) | ||
14:01
rindolf joined
|
|||
colomon | I have read about half of Parsing with Perl 6 Regexes and Grammars, and learned a bunch of useful stuff | 14:02 | |
moritz | there's not yet a comprehensive/complete book out^H^H^Hon Perl 6 out there | ||
i'm hoping for Andrew to write one :-) | |||
14:03
cdg left
|
|||
moritz | colomon: if you started from the beginning, the good parts are still ahead :-) | 14:03 | |
14:04
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
colomon | moritz: I did start from the beginning, so yay! | 14:04 | |
moritz | also, if you've liked it, a rating on amazon would be very helpful | ||
colomon | of course, that implies I do need to remember to read it! | ||
will keep amazon in mind | |||
moritz | thanks | ||
14:05
cdg joined
14:09
aborazmeh left
14:10
zakharyas joined
14:15
raschipi joined
|
|||
Xliff | moritz: One day I will get your book. Yeeees. | 14:15 | |
</gollum> | |||
www.youtube.com/watch?v=DOqKnInZov...pedjaffas1 | 14:16 | ||
stmuk | lizmat: at least 2 p6 videos from LPW2017 available, www.youtube.com/watch?v=os75uYTSnXU www.youtube.com/watch?v=oUGUgt-_0DA | ||
lizmat | stmuk++ | ||
stmuk | I thought there was supposed to be another but can't find it at a quick look ... maybe didn't make it up | 14:17 | |
act.yapc.eu/lpw2017/talks/tag/perl6 <=- don't see either the Proctor or Wicks ones | 14:18 | ||
maybe they will get uploaded soon | |||
lizmat hops | |||
*hopes rather :-) | |||
stmuk | not like a frog then :) | 14:19 | |
14:24
xaltotun left
|
|||
lizmat | although I must admit I have been hopping a few times the past weeks | 14:25 | |
stmuk | not much hops but I'm looking forward to Rochefort 8 and 10 at FOSDEM | 14:27 | |
lizmat | as long as you keep the consumption limited to Delirium :-) | 14:28 | |
stmuk | :) | 14:30 | |
14:31
MasterDuke left
14:33
Kyo91 left
|
|||
ZzZombo | how do I use a parametrized role in my class? The help only shows examples of autopunned roles. | 14:37 | |
timotimo | you would have it like class Bloop does Blah[1, "hi"] { } | 14:38 | |
14:44
KotH left
|
|||
buggable | New CPAN upload: IO-Socket-Async-SSL-0.6.1.tar.gz by JNTHN cpan.metacpan.org/authors/id/J/JN/...6.1.tar.gz | 14:45 | |
14:47
KotH joined
14:50
itaipu joined
14:54
traxex left
14:55
comborico1611 joined
14:58
Actualey` joined
14:59
Actualeyes left
15:00
MasterDuke joined
15:04
traxex joined
|
|||
lizmat notices that tbrowder is not in CREDITS ?? | 15:05 | ||
15:19
comborico1611 left
|
|||
lizmat | do we actually have a "most recent uploads" section on modules.perl6.org that I've missed somehow ? | 15:20 | |
15:31
zakharyas left,
zakharyas joined
15:34
itaipu left
15:39
rindolf left
|
|||
stmuk | rakudo.org/2018/01/29/announce-raku...e-2018-01/ | 15:39 | |
Geth | perl6.org: 2581447ccf | (Steve Mynott)++ | 2 files star 2018.01 |
15:42 | |
15:43
rindolf joined
15:49
zakharyas left
15:50
zakharyas joined
15:52
comborico1611 joined,
pmurias joined
|
|||
pmurias | rakudo.js update - blogs.perl.org/users/pawel_murias/2...fixes.html | 15:52 | |
moritz | stmuk++ # star release! | ||
stmuk | brought to by the power of Club Mate! | 15:53 | |
moritz | pmurias++ | ||
MasterDuke | pmurias: very cool. btw, "I have finally figured out a long standing bug with roles that has for long which now work." is missing something | 15:55 | |
stmuk | 94% of roast subset passing is pretty impressive | ||
moritz | PSA: irc.p6c.org seems to have a corrupt root file system :( | 15:56 | |
stmuk | not btrfs then? ;) | 15:58 | |
moritz | ext4 | ||
El_Che | irc is a shell server for irssi? | 15:59 | |
moritz | yes | ||
pmurias | stmuk: that's like ~73% of all roast tests | 16:00 | |
El_Che | moritz: so besides $HOME, nothing special? | 16:01 | |
pmurias | stmuk: I'll have to rerun everything instead of just running the subset ones to measure it accuratly | ||
moritz | El_Che: currently, there *is* something special about that system: Can't load '/usr/lib/x86_64-linux-gnu/perl/5.24/auto/re/re.so' for module re: /usr/lib/x86_64-linux-gnu/perl/5.24/auto/re/re.so: invalid ELF header at /usr/share/perl/5.24/XSLoader.pm line 96. | ||
16:04
troys joined
|
|||
pmurias | MasterDuke: thanks, fixed | 16:06 | |
El_Che | moritz: looks broken all right | 16:07 | |
16:08
lowbro left
16:10
traxex left
16:12
zakharyas left,
zakharyas joined
16:20
zakharyas left,
khw joined
|
|||
jkramer | I'm trying to implement a module from the most-wanted list but apparently I'm not very good at it. :( My module has a class with a method, a submethod and (outside of that class) a sub that can optionally be exported as shortcut. They all have the same name, but apparently that's not ok? | 16:20 | |
moritz | jkramer: submethod and method of the same name makes no sense | 16:21 | |
methods and submethods live in the same namespace | |||
AlexDani` | stmuk++ | ||
16:21
AlexDani` is now known as AlexDaniel
|
|||
timotimo | moritz: it kind of sort of does, though? you'd provide the method to be used by any derived classes and the submethod by that class itself? | 16:21 | |
jkramer | moritz: I want to provide Foo.do-it as shortcut for Foo.new.do-it | ||
AlexDaniel | m: say 42 | 16:22 | |
evalable6 | 42 | ||
jkramer | But maybe my understanding of what a submethod actually is is incorrect | ||
timotimo | what you want is not a submethod vs a method, but two multis with one candidate having a signature like (Foo:U: $args) | ||
moritz | jkramer: sounds like you want multi methods instead | ||
timotimo | and the other would have (Foo:D: $args) | ||
moritz | m: class A { multi method f(A:D:) { say "instance" }; multi method f(A:U:) { say "static" }}; A.f; A.new.f | 16:23 | |
evalable6 | static instance |
||
moritz | jkramer: ^^ | ||
jkramer | Oh ok, I'll try that :) Thanks! | ||
16:36
itaipu joined
|
|||
timotimo | u: ⋄ | 16:36 | |
unicodable6 | timotimo, U+22C4 DIAMOND OPERATOR [Sm] (⋄) | ||
16:37
pmurias left
16:42
raschipi left
|
|||
jkramer | m: class Foo { has Str @.optional; multi method bar(Foo:D: Str $text?) { say $text }; multi method bar(Foo:U: Str $text?, Str :@optional) { Foo.new(:@optional).bar("lol") } } ; Foo.bar("asd") | 16:42 | |
evalable6 | (exit code 1) Cannot resolve caller bar(Foo: Str); none of these signatures match: (Foo:D $: Str $text?, *%_) (Foo:U $: Str $text?, Str :@optional, *%_) in block <unit> at /tmp/QT04bEAEbs line 1 |
||
jkramer | Why does this not work? It works when I remove the Str constraint on @.optional | 16:43 | |
And in the method argument | 16:44 | ||
timotimo | jkramer: don't forget that unless you return the Foo.new you build from the one bar method, or else it'll disappear into the void | 16:45 | |
16:48
tankfeeder joined
|
|||
jkramer | timotimo: Yeah this is just for testing the problem with the mismatching signatures | 16:49 | |
Also is `run` asynchronous by default? | 16:52 | ||
16:52
zakharyas joined
|
|||
moritz | it's not | 16:53 | |
16:53
pmurias joined
|
|||
jkramer | Hmm, weird stuff happens sometimes when I do run 'vi', 'some-file'; | 16:54 | |
It seems like the script is dying/exiting while vi is still open | |||
timotimo | vi probably does fun things with tty and such | ||
16:56
abraxxa left
|
|||
jkramer | Yes that too, but before that happens the script that runs vi dies in the background | 16:57 | |
Hmmmmm does keyboard into still go to the p6 process which passes it through to the Proc? | 16:58 | ||
*keyboard input | 16:59 | ||
It seems like C-c in vi kills the script, which then makes vi go crazy and complain about "At EOF" forever | 17:00 | ||
17:00
zakharyas1 joined,
zakharyas left
|
|||
geekosaur | that's not likely to be keyboard input | 17:00 | |
the terminal driver converts control-C to a signal sent to the entire process group. process group members do not have to be reading the keyboard input to receive it | 17:01 | ||
typically, when running a program "in the foreground" you ignore SIGINT and SIGQUIT in order to prevent this problem | 17:02 | ||
17:02
ZzZombo left
|
|||
jkramer | I just tried system("vi", "foo") in P5 at it works just find, C-c doesn't do anything there | 17:02 | |
Try run('vi', 'foo'), but use a new terminal because it's gonna break it :) | 17:03 | ||
geekosaur | yes. problem is, in perl 6 Proc is actually Proc::Async with some automatic wait points added. those perhaps should ignore the signals I mentioned | 17:04 | |
jkramer | vim on the other hand seems to work just fine O? | ||
stmuk | depending on what you are doing you may find the ex(1) version of vim easier to script | 17:05 | |
jkramer | stmuk: I'm trying to implement the editor invoke module from the most-wanted list :) | 17:06 | |
stmuk | ah | ||
geekosaur | if vim disables "isig" then the signal thing doesn't come up. I don;t know what "vi" you are getting, or if it behaves differently | ||
jkramer | Also Proc.exitcode: Returns the exit code of the external process, or -1 if it has not exited yet. | 17:08 | |
What if a process exited with -1? | |||
How would I know the difference? | 17:09 | ||
moritz | exit codes are uints | ||
between 0 and 255, typically | |||
geekosaur | you can "do" exit(-1) but it will be treated as unsigned, yeh | ||
moritz | $ perl -e 'exit -1'; echo $? | ||
255 | |||
jkramer | Ah ok. | ||
geekosaur | also older commercial unixes may not always treat it as unsigned... and yes, this ends up being a portability pain point | 17:10 | |
17:16
tankfeeder left
17:21
setty1 joined
17:23
domidumont left
17:27
scimon left
|
|||
jkramer | Ok so now I added signal(SIGINT).tap({}) to work around the C-c problem, but is there a way to reverse that afterwards? In P5 I'd do `local $SIG{...}`, but how can I remove that signal tap in P6? | 17:30 | |
psch | jkramer: close the Tap returned by .tap i think | 17:33 | |
jkramer | psch: That seems to remove the tap I created, at least my sub is no longer executed. C-c seems to be ignored now though, I guess the default/internal handlers is not put back in place or something? | 17:36 | |
psch | jkramer: i'd guess this is like the default FDs -- if you mess with them, don't forget to put them back vOv | ||
well, assuming you want the default behavior back that is :) | 17:37 | ||
jkramer | Well yes I'd like to restore the original behavior, I wouldn't want a module to mess with signals and then not clean up afterwards leaving me with a weird unexpected stuff :) | 17:38 | |
17:39
wamba left
17:41
reportable6 left
|
|||
geekosaur | part of the problem here is I'm not sure how direct access there is to signals; they're probablyu managed by libuv | 17:43 | |
also, signals being process level complicates things a bit | |||
17:44
reportable6 joined
17:46
reportable6 left,
reportable6 joined,
reportable6 left
17:47
reportable6 joined,
ChanServ sets mode: +v reportable6
|
|||
jkramer | Hmm even after a react block with a "whenever signal(SIGINT)" inside, SIGINT behavior is not restored to normal | 17:47 | |
17:47
reportable6 left,
reportable6 joined,
dakkar left,
reportable6 left
17:48
reportable6 joined
17:49
reportable6 left
|
|||
jkramer | Hmm there isn't even a generic kill routine for making a test script :D | 17:53 | |
17:56
MasterDuke left
17:57
cdg left
|
|||
psch | m: say Signal::INT | 18:05 | |
evalable6 | (exit code 1) Could not find symbol '&INT' in block <unit> at /tmp/XGGSJNku1G line 1 |
||
psch | m: say Signal::SIGINT | 18:06 | |
evalable6 | SIGINT | ||
psch | i think this should maybe be a ticket? | 18:07 | |
i mean, the inability to restore default signal response | |||
18:07
sergot joined
|
|||
psch | assuming ++jkramer doesn't figure out how it works that is | 18:07 | |
jkramer | psch: I'm already writing a ticket, just preparing a test script to reproduce | 18:10 | |
psch | apparently i'm slow... :) | ||
jkramer | github.com/rakudo/rakudo/issues/1450 | 18:14 | |
Not sure if I should also write a ticket for run() not ignoring SIGINT while running the external program or if that's wanted behavior | 18:16 | ||
18:16
cdg joined
|
|||
timotimo | i don't think that would be a wise thing to do by default | 18:17 | |
geekosaur | bad if backgrounded, good if foregrounded | 18:18 | |
jkramer | Since `run` should be synchronous, I think it should ignore SIGINT. For Proc::Async it's a different thing | 18:19 | |
geekosaur | that is, if Proc is pretending to not be async, it should ignore terminal signals (INT, QUIT, possibly HUP and TSTP, possibly INFO on BSD) | 18:20 | |
run can be async though | |||
if you ask it to tap the process's stdin.stout/stderr | |||
18:20
chakli left
|
|||
timotimo | or feed its out or err into another process' in | 18:20 | |
18:20
chakli joined
18:22
bwisti joined
|
|||
jkramer | Hmm I'll wait how that other SIGINT ticket works out I guess. If that's fixed I'm fine with the current way it works | 18:24 | |
18:26
chakli left
18:42
darutoko left
18:48
zakharyas1 left
|
|||
comborico1611 | If I just did chown -R (folder) *, did I affect other permissions outside of folder? I checked and it looks like no, but i want to make sure. | 18:50 | |
18:52
wamba joined,
reportable6 joined,
ChanServ sets mode: +v reportable6
|
|||
psch | comborico1611: depends on wether $folder was a relative or absolute path, and the relation $CWD has to it, i' | 19:05 | |
d say | |||
like, "chown -R foo:bar ../different/directory *" should change more than the owner of ../different/directory | 19:07 | ||
19:15
cdg left
19:23
MasterDuke joined
|
|||
lizmat | and another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2018/01/29/...s-modules/ | 19:24 | |
psch | lizmat++ | 19:27 | |
19:30
john51 left
|
|||
psch | i should gather tuits for writing down some more thoughts on jvm-interop-goals.md, probably | 19:31 | |
19:31
john51 joined
|
|||
lizmat | ++psch | 19:31 | |
psch | 'cause i'm kinda stuck in some spots too, mostly wrt theoretical details really... :) | ||
the big downside is that explorative impl work is so tedious :/ | |||
19:31
itaipu left
|
|||
psch | well, "slow" really. what with 200+ second stage parse | 19:32 | |
lizmat | yeah, even in Moar I find 60 second stage parse slow :-) | 19:36 | |
part of jnthn's grant work should improve that, but most likely only on MoarVM :-( | |||
psch | i'd like to make the jvm faster there, but i have no real clue how i'd due that | 19:37 | |
s/due/do | 19:38 | ||
and well, heap profiling points at e.g. "20% of the heap are byte arrays," which we can't even really change | |||
'cause that's mostly runtime generated class files | 19:39 | ||
lizmat | perhaps bartolin (usev6) has some pointers ? | ||
19:39
comborico1611 left
|
|||
psch | one probably could kinda-sorta "shift" bits of the type hierarchy towards the jvm level -- i.e. have Cool actually be an interface on the jvm level -- but that seems slightly nuts | 19:39 | |
lizmat: maybe, but then bartolin's a fair bit less deep into the bytecode gen than i am afaik... | 19:40 | ||
lizmat: i'm probably gonna try at least :) | |||
19:41
comborico1611 joined
|
|||
psch | but then the few memory improvements i pushed recently were also outside of what bartolin regularly works on, so idk vOv | 19:41 | |
19:42
astj joined
|
|||
buggable | New CPAN upload: P5study-0.0.1.tar.gz by ELIZABETH cpan.metacpan.org/authors/id/E/EL/...0.1.tar.gz | 19:45 | |
lizmat | noop for the time being ^^ | ||
19:46
itaipu joined
19:47
astj left
19:48
rindolf left
19:49
sena_kun left
|
|||
jnthn | lizmat: Hm, I have a vague recollection that it's a no-op in contemporary Perl 5 also :) | 19:52 | |
19:52
rindolf joined
|
|||
lizmat | not according to my perldoc perlfunc, but that is 5.20 on my MBP | 19:53 | |
19:53
reportable6 left
|
|||
lizmat | ah, indeed | 19:54 | |
ok, full semantic equilibrium achieved :-) | |||
buggable | New CPAN upload: P5built-ins-0.0.4.tar.gz by ELIZABETH cpan.metacpan.org/authors/id/E/EL/...0.4.tar.gz | 19:55 | |
New CPAN upload: P5ref-0.0.2.tar.gz by ELIZABETH cpan.metacpan.org/authors/id/E/EL/...0.2.tar.gz | |||
MasterDuke | lizmat: slight correction, those were jit templates, not spesh | 20:09 | |
lizmat | MasterDuke++ # fixed | 20:12 | |
El_Che | lizmat++ for the weekly weekly :) | ||
MasterDuke | lizmat++ | 20:13 | |
20:18
Rawriful joined,
kolikov joined
|
|||
kolikov | Hi o/ | 20:19 | |
20:19
Praise- is now known as Praise
|
|||
psch | kolikov: hello :) | 20:23 | |
kolikov | I got some question concerning the routine move (IO). | ||
20:23
quotable6 left
20:24
quotable6 joined
|
|||
psch | kolikov: shoot | 20:24 | |
20:25
rindolf left
|
|||
kolikov | my $src = IO::Path.new('/home/zz.tar.gz'); my $dest = IO::Path.new('/home/temp/xx'); $src.move($dest); | 20:26 | |
And then when I run it : Failed to copy file: illegal operation on a directory | |||
20:27
rindolf joined
|
|||
kolikov | Both exist and are valid dir / file | 20:27 | |
psch | kolikov: the docs for move says rename is the one that works with directories: docs.perl6.org/routine/move | ||
kolikov: i'm not sure in how far the "if the files are on the same storage device" applies to renaming directories, but i'd assume you'd have to write your own recursive copy/delete for copying a directory including all files across storage devices | 20:28 | ||
kolikov: oh, but it might be that moving a file to a directory is the actual problem here | 20:29 | ||
kolikov | yes | ||
psch | kolikov: as in, your destination IO is a directory, and a file cannot be move so that it turns into an (existing) directory | ||
kolikov: yeah, that's lots simpler. change $dest to 'IO::Path.new("/home/temp/$target-filename")' and you're set :) | 20:30 | ||
kolikov: that is, as your $dest points at the directory *itself* you cannot move the file there -- overwriting a directory with a file isn't allowed. you need to specify the filename *in* the destination directory | 20:32 | ||
kolikov | That sounds awkward ... the methods .d and .f state valid dirs and file, why not make a multy instead of extracting src.basename to concat withe a path as soon as you know it ??? | 20:33 | |
Unoix cp and mv work just fine with those cases. | 20:34 | ||
AlexDaniel | “Is there a key for it on my keyboard though?” | 20:35 | |
like if people use different keyboards to type in different languages? | |||
never understood that logic really :S | |||
DrForr | kolikov: Because Perl 6 runs elsewhere than Linux. | 20:36 | |
El_Che | DrForr: walks | ||
:P | |||
psch | El_Che: rude | ||
how 'bout "flutters," eh? :p | 20:37 | ||
El_Che | psch: That's a non-rude way to describe me | ||
AlexDaniel | El_Che: it kinda jogs actually | ||
kolikov | I'll make a run 'mv' , '/toto/file.gz' , '/toto/tmp'; Then .... That's sad :-( | ||
AlexDaniel | like, compared to what it was previously | ||
El_Che | well, whenever it can jog in parallel is way faster! | ||
AlexDaniel | I remember the startup time being like several seconds at some point | 20:38 | |
El_Che | AlexDaniel: I remember the early days of Moose :) | ||
DrForr | kolikov: Just use 'move' and give it '/toto/file.gz' and '/toto/tmp/file.gz' as arguments and you're done, no need to resort to nonportable shell. | 20:39 | |
psch | AlexDaniel: '-e1' still is at 3+ seconds on hack -- oh wait, that's r-j ha haa | 20:40 | |
AlexDaniel | haha :D | ||
20:42
coverable6 left,
coverable6 joined,
ChanServ sets mode: +v coverable6
|
|||
kolikov | DrForr : I know that's a solution, the sad thing if that i must concat $src.basename as a string to a IO Object while IO::Path already knows directories from files .... Just LTA ... no fuss :) | 20:44 | |
psch | looking at IO::Path.move i don't see an immediate reason we couldn't have the suggested logic | 20:48 | |
well, except for the TODO comment maybe, checking on the VM level might be a bit more tedious | |||
but then there was something about torture and implementers and users i think..? :) | |||
kolikov | I don't want to give you pain ! | ||
El_Che | if it the addtion doesn't break stuff, add an issue? | 20:49 | |
20:50
coverable6 left,
coverable6 joined
|
|||
psch | "Larry: But, we recognize that that's how one person sort of suffers on behalf of someone else, vicarious suffering is the illogical term. Or, more humorously, what we say is that we torture the implementers on behalf of the users. Implementers are actually kind of proud of the fact that they are tortured on behalf of the users." | 20:50 | |
20:50
vike left
|
|||
psch | kolikov: the sentiment has been around a while -- that quote is from 2015 :) | 20:50 | |
20:50
bart__ joined
|
|||
kolikov | But if you insist :-p | 20:51 | |
psch | kolikov: i agree with El_Che++, maybe add an RFC issue on githuhb and see if someone else chimes in. you could even provide a propsitional patch :) | ||
20:51
bart__ is now known as brrt
20:53
_28_ria joined
|
|||
kolikov | Houch ! patching, that's out of my (coding) scope, but I sure can fill an issue if you don't bother. | 20:53 | |
DrForr | Please do. | 20:54 | |
kolikov | DrForr : here github.com/perl6/ecosystem ? | 20:55 | |
DrForr | I'd do it over on the main perl6 app, but psch might have a better suggestion since he's been paying more attention :) | 20:57 | |
psch | uh actually i was gone for over a year until about a week ago... :) | ||
my first instinct would have been RT, but that's kinda deprecated and annoying to use without an account | 20:58 | ||
MasterDuke | github.com/rakudo/rakudo/issues | ||
psch | so i *think* the right place is github... what MasterDuke++ said | ||
kolikov | Ok then, here I go, thanks a lot ( It's always welcoming here :-) ) | 21:01 | |
DrForr | And I must be off to bed as well... Hook up the display, ae some preliminary content and I should be ready to rock. | 21:02 | |
*make | 21:03 | ||
G'night. | |||
21:07
Kaiepi left,
nativecallable6 left,
nativecallable6 joined,
ChanServ sets mode: +v nativecallable6
21:08
Rawriful left
21:09
Rawriful joined,
nativecallable6 left,
nativecallable6 joined,
ChanServ sets mode: +v nativecallable6
21:10
Kaiepi joined
21:11
Rawriful left
21:12
Rawriful joined
21:19
cdg joined
21:25
pecastro joined
21:30
cdg left
21:31
cdg joined
21:32
domidumont joined
|
|||
kolikov | Wish-Issue submited : github.com/rakudo/rakudo/issues/1453 | 21:33 | |
21:33
domidumont left
|
|||
El_Che | kolikov++: | 21:42 | |
21:46
brrt left
21:50
woolfy joined
|
|||
woolfy | Hi folks, some time ago I used to come a bit more regularly! :-) <3 | 21:51 | |
Just got a question from somebody on the Perl6 page on Facebook, regarding the Rakudo Star 2018.01 release: " could anyone update the docker image? i think this is the one hub.docker.com/r/_/rakudo-star/ " | |||
moritz | \o woolfy | 21:52 | |
woolfy | So, I did my duty. :-) | ||
Hey moritz++ | |||
21:55
espadrine_ joined
21:56
_28_ria left
21:57
_28_ria joined
|
|||
woolfy | Congratulations to all for releasing a brand new Rakudo Star, and for increasing the speed of Perl 6 100x since Tuxx++ started test.t, and for being awesome alltogether. I hope you don't mind saying that I am still happy with Perl 6. I am. | 22:01 | |
22:02
_28_ria left,
vike joined
|
|||
Xliff | Hmmm.... | 22:07 | |
@aᵀ | |||
ooh! I want! | |||
tobs | I think I fixed the issue with rotor and whatever/Inf from 10 hours ago. Initial contact with nqp. Should I pastebin a .t file in the PR message and add it to roast later? | ||
or what's the ideal order of things? | |||
moritz | tobs: open two pull requests, mention in the roast that it should be merged after the rakudo one | 22:08 | |
tobs: and if you don't have commit access to roast yet, tell me your github username :-) | |||
kolikov | 'Night all \o/ | ||
tobs | moritz: I don't have access. The account is brand new and shiny, "taboege". | 22:09 | |
psch | tobs++ | ||
22:10
kolikov left
|
|||
moritz | tobs: you should have received an invitation by email. Have fun! | 22:10 | |
sleep& | |||
Xliff | [ ] only works with infix operators, yes? | 22:11 | |
22:12
reportable6 joined
|
|||
psch | Xliff: you're talking about reduce? then yes | 22:13 | |
Xliff: [ ] can also be used to turn a sub into an infix though | 22:14 | ||
which can get a bit silly, really... | 22:16 | ||
m: sub foo($, $) { say "fooedd" }; [[&foo]] 1, 2 | |||
evalable6 | Potential difficulties: Useless use of [[&foo]] in sink context at /tmp/26jUHIMsfu:1 ------> 03sub foo($, $) { say "fooedd" }; 08⏏04[[&foo]] 1, 2 fooedd |
||
psch | the sink warning seems wrong, but we got a few of those that seem somewhat wrong i think :/ | ||
m: say [[&infix:<+>]] 1, 2, 3, 4 # vOv | 22:17 | ||
evalable6 | 10 | ||
TimToady | the basic assumption is that infix operators are highly likely to not have side effects | 22:20 | |
psch | m: say &infix:<=> # :o | 22:21 | |
evalable6 | sub infix:<=> (Mu \a, Mu \b) { #`(Sub+{Precedence}|94770403733552) ... } | ||
TimToady | also, I actually said "vicarious suffering is the theological term", but it got mistranscribed illogically :) | ||
we know that = is mutating though | |||
psch | yes, it is likely *the* exception | ||
TimToady | well, and any op based on the = metaop | 22:22 | |
carefully avoiding == and === and <== | |||
there are spots where we look at 'is pure' declarations, but I'm not sure your [[&foo]] is one of them | 22:23 | ||
also, xx can be control flow | |||
so anything thunky is probably okayish | 22:24 | ||
errands | |||
psch | m: [=] (my $a), (my $b), 3, 4; say $a; say $b | ||
evalable6 | (exit code 1) Cannot modify an immutable Int (3) in block <unit> at /tmp/pHDYORjKB6 line 1 |
||
psch | m: [=] (my $a), (my $b), 3; say $a; say $b | ||
evalable6 | 3 3 |
||
psch | what a wonderfully chained assignment :o | ||
+convoluted | 22:25 | ||
i wonder if checking that one for (lack of) purity makes sense | 22:26 | ||
Xliff | Hah! | 22:29 | |
m: my($a, $b) = 3 xx 2; | 22:30 | ||
evalable6 | (exit code 1) 04===SORRY!04=== Error while compiling /tmp/c1hLiYjfJY Variable '$a' is not declared at /tmp/c1hLiYjfJY:1 ------> 03my(08⏏04$a, $b) = 3 xx 2; |
||
Xliff | WAT? | ||
m: my ($a, $b) = 3 xx 2; | |||
evalable6 | |||
Xliff | m: my ($a, $b) = 3 xx 2; $a.say; $b.say; | ||
evalable6 | 3 3 |
||
Xliff | Less typing. ;q | ||
psch | Xliff: i am aware, but then '2 + 3' is also less typing than '[[&infix:<+>]] 2, 3' ;) | 22:34 | |
the neat thing is creating custom inline infix-reduce operator though | 22:35 | ||
m: say [[&({$^a.uc ~ $^b.lc})]] "foo", "bar", "baz" | |||
evalable6 | (exit code 1) 04===SORRY!04=== Error while compiling /tmp/LaI90y4jv2 Two ter… |
||
psch, Full output: gist.github.com/492f4a7bd40e6b9b16...6817d4e241 | |||
psch | oh, but not quite like that haha | ||
...it is still neat in a "oh wow don't do that in prod please" way :S | 22:36 | ||
actually, i think that only works for infixes in the first place | 22:37 | ||
22:37
labster joined
|
|||
psch | m: say "foo" [&({$^a.uc ~ $^b.lc})] "BAR" | 22:37 | |
evalable6 | FOObar | ||
psch | anyway yeah, just lotsa "the things we allow" kinda stuff | ||
ahh | 22:38 | ||
clearly "two terms in a row" *actually* means "you have to not have spaces because those make it comprehensible" | |||
m: say [[&({($^a.uc)~($^b.lc)})]] "foo", "BAR", "baz" | |||
evalable6 | FOOBARbaz | ||
psch | i wonder if that TTIAR is actually wrong | 22:41 | |
maybe allowing pointy blocks in there works... | 22:49 | ||
it is still silly though; maybe a typed exception along the lines of X::Cannot::InlineDefineReduce or something makes sense... | 22:54 | ||
22:54
wamba left
22:57
pmurias left
|
|||
comborico1611 | psch: it was a relative adrrss. Thanks for help! | 22:59 | |
23:06
comborico joined,
comborico1611 left
|
|||
timotimo | "Timo Paulssen made some low level changes, that make entering and leaving optimized code sections faster." - i don't remember doing anything like that? damn, this moving stress is killing my brain | 23:18 | |
23:19
setty1 left
|
|||
lizmat | d6c2a3776c68780518500ce4f6 in moar | 23:20 | |
timotimo ^^^ | |||
23:20
cdg_ joined
|
|||
lizmat | almost 2 weeks ago | 23:21 | |
sleep& | 23:22 | ||
23:23
cdg left
23:25
cdg_ left
23:27
woolfy left
23:44
Voldenet_ joined
23:45
DarthGandalf left
23:46
Voldenet left,
Altreus left,
Juerd left,
a3f left,
renormalist left
23:47
yoleaux left
23:48
yoleaux joined,
ChanServ sets mode: +v yoleaux,
coverable6 left,
quotable6 left,
evalable6 left,
evalable6 joined,
quotable6 joined,
coverable6 joined,
greppable6 left
23:51
DarthGandalf joined,
Altreus joined,
Juerd joined,
a3f joined
|