»ö« 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.
Voldenet jnthn: it's not hard, but when you're dealing with unix constants things get very variable between environments 00:01
and at some point, you just have to compile a lot of it - generating a one-liner .so file is a lot easier than trying to create headers 00:03
00:07 MasterDuke left 00:10 MasterDuke joined 00:13 Cabanossi left 00:15 Cabanossi joined
BenGoldberg m: say 3 ¹⁺¹ 00:19
camelia 5===SORRY!5=== Error while compiling <tmp>
Confused
at <tmp>:1
------> 3say 37⏏5 ¹⁺¹
expecting any of:
infix
infix stopper
postfix
statement end
statement modifier
stat…
BenGoldberg m: say 3¹⁺¹
camelia 3
BenGoldberg m: say 3¹⁻¹ 00:20
camelia 0.333333
BenGoldberg That is not the precedence I was expecting.
TEttinger is that... 3 to the 1 to the +1 in the first case? 00:21
and (3 to the 1) to the -1 in the second case?
definitely not mathy precedence... 00:22
I mean, maybe?
00:22 kurahaupo left
TEttinger m: say 3(¹⁺¹) 00:22
camelia No such method 'CALL-ME' for invocant of type 'Int'
in block <unit> at <tmp> line 1
TEttinger heh
no idea how to type superscript parentheses
00:23 kurahaupo joined
geekosaur XCompose thinks it's <Compose> ^ ( resp. ) 00:33
00:41 lucasb left 00:42 Cabanossi left 00:45 Cabanossi joined 01:00 bioduds left 01:05 mr-foobar left 01:08 mr-foobar joined 01:29 bioduds joined
bioduds hi, friends 01:29
raschipi diga lá 01:30
bioduds fala rafael 01:31
tudo joia?
I'm trying the tcp again
none is coming through
raschipi Tá frio pra diabo só, fora isso tudo bem. 01:32
bioduds I installed tcptrack and I can see the traffic I'm testing is coming through
it shows when I use another computer in my LAN with postman
on port 5000
vc tá onde? 01:33
eu to em BH
raschipi Curitiba.
bioduds vc deve estar no sul
ah
explicado
entao, eu coloquei o postman no meu laptop pra mandar sinal na porta 5000 pro PC
eu clico e vejo chegando usando o tcptrack 01:34
raschipi So, it works across the network but fail when using the local address?
bioduds actually, I was expecting only my code to be able to read it
I did need to run tcptrack with sudo 01:35
raschipi Your code is the server?
tcptrack needs sudo to get raw packets.
01:36 mr-foobar left
bioduds yep 01:36
I'm not sure if my code is server or client
because I'm setting a P2P
01:36 mr-foobar joined
bioduds here's what I'm using gist.github.com/bioduds/01b17be158...2b0af6ae23 01:36
raschipi If you want to ensure just trusted code can get the messages, you'll need to set up TLS. 01:37
bioduds some pieces of code from the perl6 tutorials docs.perl6.org/type/IO::Socket::Async and docs.perl6.org/type/IO::Socket::INET
SSL, you mean? 01:39
raschipi Yes, it was called SSL in older versions.
bioduds I think bitcoin does not use it, I'll see that in
raschipi Why are you wever using raw sockets? There are plenty frameworks that can give you messages in the way you want. Just use those and concentrate on the meat of the problem. 01:40
bioduds on perl6? 01:41
raschipi Are you trying to deal with networking problems or actually trying to implement something on top of a network?
bioduds I am trying to set a p2p communication on TCP
like bitcoin does
so nodes can communicate data with each other 01:42
raschipi For your distributed judge system, right? 01:44
bioduds correct 01:45
01:46 ilbot3 left
bioduds I took the challenge of building the first blockchain in Perl6 01:46
and I wish to do a decentralized justice system
to start, an escrow blockchain
raschipi Right, just write bindings into an existing p2p comm lib and use that to build your application on top. 01:47
01:48 lichtkind left, ilbot3 joined, ChanServ sets mode: +v ilbot3
bioduds depois dessa "cagada" do Gilmar Mendes, fiquei mais na fissura de fazer esse sistema :D 01:48
justiça descentralizada!
I found this here github.com/jonathanstowe/CheckSocket 01:50
let me try it
raschipi bioduds: You need something like this: swarmjs.github.io/articles/papoc/ 01:51
It uses well tested and state of the art best practices to do it. Are you well read on those? 01:52
01:53 setty1 joined
bioduds reading 01:53
I didn't find the source code 01:57
oh, got it 01:58
github.com/gritzko/swarm
it's javascript
I wanna make it FREE software
checking modules 02:00
github.com/jnthn/p6-test-io-socket-async 02:01
raschipi What's the problem with javascript? 02:02
bioduds according to Richard Stallman, not free software 02:04
I have nothing against it
I use it all the time
Just not for this project
this needs to be completely open
raschipi Well, I'm not saying to use exactly that, just to use something like it. 02:06
02:06 mr-foobar left
raschipi If you go down the rabbit hole of writing p2p network messaging, you'll never get time to build something actually useful on top of it. 02:06
And you need to read Stallman better if you think any javascript isn't free software. 02:07
bioduds how so? 02:09
02:09 setty1 left
bioduds binaries are obfuscated, right? 02:09
Tried to get the result of a broken Promise
I'm being lazy actually 02:10
I need to read IO:Sockets through
raschipi Most javascript sent through the web comes without source and therefore isn't free software. That has nothing to do with running a local application in your own computer. 02:11
02:13 Cabanossi left
bioduds understood 02:13
thanks for explaining to me 02:14
02:15 Cabanossi joined
bioduds so I'm misreading it 02:18
if I write it and run then it is free software
I'm ok with that
I got a reaction 02:19
in the code
02:20 kurahaupo left
bioduds this responds gist.github.com/bioduds/7d3d3f7e91...6254110929 02:21
I click the postman send signal and it dies
02:21 mr-foobar joined
bioduds it says Tried to get the result of a broken Promise 02:21
02:21 kurahaupo joined
bioduds I'm trying to understand this message 02:22
aha 02:24
got it
here: gist.github.com/bioduds/1171a1ab5c...0d2badee94 02:25
this works
I asked .WHAT and it said Async 02:27
but Async is not a primitive object, is it?
is it Proc::Async?
yes 02:28
MasterDuke m: class A::B {}; my $a = A::B.new; say $a.WHAT
camelia (B)
bioduds thanks, raschipi :D
raschipi You called .WHAT and it returned an Async type.
If you want it to tell you what it is, call .^name. 02:29
bioduds let me 02:31
it says IO::Socket::Async 02:32
seems like it is reading a Blob 02:34
02:34 kurahaupo_ joined
raschipi Call .decode on a Blob to turn it into a Str. 02:35
bioduds let me try 02:37
02:38 noganex_ joined, kurahaupo_ left, kurahaupo_ joined
bioduds actually it is a Supply 02:38
Asynchronous data stream with multiple subscribers
02:38 kurahaupo left
bioduds I'm on the right track :D 02:40
going to sleep now
thanks, man
obrigado! :D
02:41 noganex left 02:43 Cabanossi left 02:44 Cabanossi joined
Geth doc: antquinonez++ created pull request #1374:
Improve readability, some grammar fixes.
02:52
02:56 uberbaud joined 03:05 BenGoldberg left 03:17 skids joined 03:18 khw left
Geth doc: 83681691ac | (Antonio Quinonez)++ (committed by Zoffix Znet) | doc/Language/functions.pod6
Clarify, streamline. (#1374)
03:28
03:39 uberbaud left 03:40 uberbaud joined 03:48 cdg joined, uberbaud left 03:54 Cabanossi left 03:55 Cabanossi joined 03:59 uberbaud joined 04:00 tomdavis joined, tomdavis left, tomdavis joined 04:01 tomdavis left, Util left 04:06 tomdavis joined, tomdavis left 04:12 cdg left 04:18 uberbaud left 04:19 travis-ci joined
travis-ci Doc build errored. Antonio Quinonez 'Clarify, streamline. (#1374)' 04:19
travis-ci.org/perl6/doc/builds/241648677 github.com/perl6/doc/compare/c2de7...681691ac97
04:19 travis-ci left 04:25 uberbaud joined 04:33 ChoHag_ left 04:46 kurahaupo_ left, kurahaupo joined 04:53 uberbaud left 04:57 aborazmeh joined, aborazmeh left, aborazmeh joined 05:00 pilne left 05:07 Sgeo_ joined
Geth ecosystem: 41aaed6c3b | (Jonathan Scott Duff)++ | META.list
Add AI::FANN to ecosystem
05:08
05:09 Sgeo left 05:13 aborazmeh left 05:17 donaldh joined 05:24 Cabanossi left 05:25 Cabanossi joined
Xliff OK, I am trying to search through the P6 equivalent of @INC to see if there are files installed in a specific directory (ie namespace) 05:32
Previously, I could do this: for @($*REPO.repo-chain).grep({$_ ~~ CompUnit::Repository::FileSystem || $_ ~~ CompUnit::Repository::Installation }) -> $c { ... }
And do naughty things to $c.path-spec to accomplish what I need. Would that still work?
moritz Xliff: are you sure you need all that, and can't just look into %?RESOURCES ? 05:35
05:38 dalek joined, ChanServ sets mode: +v dalek, sergot left, synopsebot6 left
samcv i need my Proc object not to throw when i close stderr and stdout 05:40
it's throwing if it gets a nozero exit code
moritz samcv: use it in a non-sink context
$ = $proc.out.close
(annoying, I know) 05:41
samcv moritz++
cool
a bit ;P
Xliff moritz: No. %?RESOURCES will not do it, since I hope people will start writing their own custom modules. 05:42
So if I don't know what they are going to write ahead of time, how will %?RESOURCES? 05:43
moritz Xliff: maybe it's smarter than you :-) (just kidding)
Xliff I wish. :P 05:44
05:46 zacts left 05:55 zacts joined 06:01 rindolf joined
ugexe m: $*REPO.repo-chain.grep(*.?prefix.?e).map(*.prefix.IO.child("dist")).grep(*.e).map(*.IO.dir.grep(*.IO.f).Slip).map({ Rakudo::Internals::JSON.from-json(.slurp) }).map({.<provides>.keys }).say 06:03
camelia ((Pod::To::Text NativeCall::Types experimental newline NativeCall::Compiler::GNU NativeCall::Compiler::MSVC NativeCall CompUnit::Repository::Staging Test))
ugexe also see github.com/ugexe/zef/blob/master/l...t.pm6#L664 06:04
06:14 timotimo left, timotimo joined 06:19 wamba joined 06:23 Cabanossi left 06:26 Cabanossi joined, ugjka joined, rindolf left 06:31 uberbaud joined 06:38 espadrine_ joined, uberbaud left
zengargoyle_ is there a list somewhere of the [TAG] used in RT subjects or is it just an evolving convention? 06:40
06:41 zengargoyle_ is now known as zengargoyle
Xliff ugexe: Wow, that's complex. Thanks! 06:45
ugexe: Only problem with that is it doesn't seem to recognize path additions with -I. 07:01
Which I really need. Thanks, though
(However, the way I was originally doing it, no longer works, either) 07:02
07:09 Cabanossi left 07:11 Cabanossi joined 07:22 raschipi left 07:26 cgfbee left 07:27 donaldh left 07:39 Cabanossi left
nine Xliff: what exactly are you looking for? 07:40
07:41 mr-foobar left, Cabanossi joined
nine Xliff: are you really looking for files, or are you looking for modules? 07:43
07:43 mr-foobar joined 07:46 andrzejku joined
andrzejku hello perl6 07:46
!
moritz \o andrzejku 07:47
07:48 donaldh joined
tadzik . o O ( andrzejku, jak Ci na imię? ) 07:52
o/
andrzejku tadzik Andrzejek ;d
tadzik ;) I may have been reffering to www.youtube.com/watch?v=LmNed_cFRrw :P 07:53
andrzejku :D 07:55
08:15 dct joined 08:16 kaare__ joined 08:17 kaare_ left
Voldenet Can one implement quoting operators? I'm making yet another inline C in perl 6 and using "c q{extern int test() { return 42; }}" looks a bit ugly 08:17
I'd rather take something like: c99{extern int test() { return 42; }} 08:18
08:23 kaare__ is now known as kaare_ 08:27 parv joined 08:34 donaldh left 08:41 mr-foobar left 08:42 mr-foobar joined 09:00 vendethiel joined 09:02 donaldh joined 09:09 mr-foobar left 09:11 mr-foobar joined 09:19 rindolf joined 09:20 skids left, nhywyll joined 09:24 Cabanossi left 09:26 Cabanossi joined 09:28 parv left, dct left 09:29 donaldh left
tadzik sounds like a job for a Macro 09:36
moritz or a slang 09:40
09:41 mr-foobar left
Voldenet but I'm not sure if I even can 09:44
erm
09:46 mr-foobar joined
Voldenet I'm not sure how would I do this + the feature is experimental, so it might not stick 09:49
llfourn do we have a proper way of doing slangs now without modifying %*LANG? 09:50
s/%/$/ 09:51
ah this might be it: github.com/bduggan/mosdef/blob/mas.../Mosdef.pm
09:59 nhywyll left, nhywyll joined
Voldenet the syntax i'm going to try building will be something like this (but i'm not expecting wonders, it's fun to fail once in the while though): class x is gcc-compiled('-x', 'c') { extern char* some_c_method(){ return "test"; } }; void x.some_c_method(); 10:00
llfourn Voldenet: this looks like an interesting experiment. It does look like a job for a slang. 10:02
araraloren llfourn, looks like awesome. What is slang ? 10:03
llfourn araraloren: github.com/bduggan/mosdef/blob/mas.../Mosdef.pm
It will probably be more complicated than that one though 10:04
araraloren Yeah, Is there any document about it ?
llfourn araraloren: nope
Voldenet: this one might be more helpful: github.com/tony-o/perl6-slang-sql/...ng/SQL.pm6
(though it uses the old/wrong way of introducing a slang) 10:05
Voldenet and I guess this might be of use: github.com/perl6/nqp-rx/blob/maste...Grammar.pm
araraloren Awesome!
llfourn Voldenet: probably the Perl6::Grammar is more useful
I did write a huge slang once
araraloren I will have a look later. 10:06
llfourn which introduced custom method declarators and even rolled custom functions from QAST at runtime
araraloren I have seen that slang several times, but I dont' have a sense of it 10:08
llfourn github.com/LLFourn/gss/blob/master...ctions.pm6 # just made it public again
Voldenet: it's a bit of a mess but might be helpful
araraloren: QAST code is hard to understand at first look :) 10:09
araraloren llfourn, yeah :) 10:11
10:11 nadim left, mr-foobar left
Voldenet QAST looks a bit like C#'s expression, but more powerful 10:11
Geth doc: dc09106501 | (Jan-Olof Hendig)++ | doc/Type/Supply.pod6
Fixed some formatting issues
10:12
llfourn I've never seen C# :\
be warned that it's hard to debug at first 10:13
there's a dump method on QAST object iirc that dumps the tree into a string
10:14 nhywyll left 10:15 nhywyll joined 10:16 mr-foobar joined 10:27 espadrine_ is now known as espadrine, bartolin_ left 10:31 pmurias joined, pmurias left 10:36 bartolin joined 10:38 pmurias joined
pmurias what's the difference between prepend and unshift? 10:38
llfourn pmurias: I guess the same as .append and .push
which in my head is push is +@args and append is *@args 10:39
(but looking at the source it seems that's wrong) 10:40
10:41 mr-foobar left
llfourn push is **@ 10:41
which I didn't even know existed
10:42 yqt joined, mr-foobar joined
llfourn "Slurpy parameters declared with two stars do not flatten any iterable arguments within the list, but keep the arguments more or less as-is" 10:42
10:42 TEttinger left
llfourn TIL 10:42
pmurias the docs.perl6.org have 'multi method append(Array:D: **@values is raw) for append 10:44
llfourn that's wrong :o 10:45
10:45 nhywyll left, nhywyll joined
llfourn multi method push(array:D: **@values) { self.append(@values) } 10:47
multi method append(array:D: *@values) { self.append(@values) }
multi method unshift(array:D: **@values) { self.unshift(@values) }
multi method prepend(array:D: *@values) { self.unshift(@values) }
10:47 jameslenz left
llfourn doh though in Array.pm multi method append(Array:D: **@values is raw) 10:48
:\ 10:49
.push and .append implemenations on Array look exactly the same so I have no idea 10:51
lizmat llfourn: that might indicate a bug :-)
llfourn m: my @a = <one two>; my @b; @b.push: @a; my @c; @c.append: @a; say @b; say @c; 10:53
camelia [[one two]]
[one two]
llfourn looks like the native one is being hit in any case
m: my @a = ($*PERL,$*PERL); my @b; @b.push: @a; my @c; @c.append: @a; say @b; say @c; 10:54
camelia [[Perl 6 (6.c) Perl 6 (6.c)]]
[Perl 6 (6.c) Perl 6 (6.c)]
10:54 nadim joined
llfourn m: my @a = <one two>; my @b; @b.push: @a,@a; my @c; @c.append: @a,@a; say @b; say @c; 10:55
camelia [[one two] [one two]]
[[one two] [one two]]
llfourn hmm ok, so they only behave the same with multiple arguments
I guess it was decided that append should only do one level of flattening 10:59
which tbh is probably desirable
araraloren m: say IntStr ~~ Int; say Array[IntStr] ~~ Array[Int]; my IntStr @array = Array[IntStr].new(<1>, <2>); sub f(Int @array) { say @array.perl; }(@array); 11:00
camelia True
False
Array[IntStr].new(IntStr.new(1, "1"), IntStr.new(2, "2"))
llfourn otherwise appending multiple lists onto an array of lists would be annoying
araraloren Is `Array[IntStr] ~~ Array[Int]` should true ? What's the mean of `Array[IntStr]` ? 11:01
11:02 travis-ci joined
travis-ci Doc build errored. Jan-Olof Hendig 'Fixed some formatting issues' 11:02
travis-ci.org/perl6/doc/builds/241696657 github.com/perl6/doc/compare/83681...09106501f6
11:02 travis-ci left 11:03 donaldh joined 11:04 jameslenz joined
llfourn is actually still slightly confused the append does the same thing as push with multiple arguments 11:08
11:08 Cabanossi left 11:11 Cabanossi joined 11:14 donaldh left
zengargoyle araraloren: i noticed the IntStr thing a few days ago. it's like where "4" can either be an Int or a Str depending. 11:18
and yep, Array[Int] can have IntStr and Array[IntStr] can have Int i would think. 11:20
araraloren Yeah, I mean a IntStr is a Int, and what about Array[IntStr] and Array[Int]. They called that Covariance .
I know that from wiki: en.wikipedia.org/wiki/Covariance_a...r_science) 11:21
zengargoyle backs away slowly.... having not thought that much about it besides going "hmmm, i can put IntStr in Array[int]". :) 11:23
araraloren m: my Int @array = 1, 2; my IntStr $a = 13; @array.push($a); say @array.perl; 11:24
camelia Type check failed in assignment to $a; expected IntStr but got Int (13)
in block <unit> at <tmp> line 1
11:28 nhywyll left 11:32 bartolin left 11:36 bartolin joined 11:39 Cabanossi left 11:40 mr-foobar left 11:41 Cabanossi joined 11:44 mr-foobar joined 11:45 wamba left 11:53 zakharyas joined 11:54 nadim left 11:55 nadim joined 12:10 cognominal joined 12:12 salv0 left, mr-foobar left 12:14 eveo joined
eveo IntStr (and other allomorphs) are just subclasses of Int *and* Str. They don't "become one depending...". A typecheck for IntStr won't accept plain Int or plain Str 12:15
araraloren: that smartmatch is an alledged bug: rt.perl.org/Ticket/Display.html?id...et-history 12:16
Literally a subclass of both, with some sugar to handle which view to use: github.com/rakudo/rakudo/blob/nom/....pm#L2-L22 12:17
12:17 mr-foobar joined 12:21 perlawhirl left 12:22 perlawhirl joined, dudz left 12:24 nadim left 12:25 kaare_ left 12:39 pmurias left 12:40 mr-foobar left 12:41 eveo left 12:43 mr-foobar joined 12:45 pmurias joined 12:47 dudz joined 12:52 domidumont joined 12:56 khw joined 12:57 domidumont left, domidumont joined 13:03 domidumont left 13:08 Cabanossi left 13:10 mr-foobar left 13:11 Cabanossi joined 13:12 mr-foobar joined, aborazmeh joined, aborazmeh left, aborazmeh joined, pilne joined 13:13 yqt left 13:15 nowan left, lucasb joined
araraloren m: my Int @array = 1, 2; my IntStr $a = <13>; @array.push($a); say @array.perl 13:17
camelia Array[Int].new(1, 2, IntStr.new(13, "13"))
araraloren .tell eveo, thanks, I just make a type mistake. It's fit what I thought. 13:19
yoleaux araraloren: What kind of a name is "eveo,"?!
araraloren .tell eveo thanks, I just make a type mistake. It's fit what I thought.
yoleaux araraloren: I'll pass your message to eveo.
13:22 nowan joined 13:23 Praise left 13:24 Praise joined, Praise left, Praise joined
lucasb m: ().Seq 13:25
camelia ( no output )
lucasb m: ().Seq.Seq
camelia No such method 'Seq' for invocant of type 'Seq'. Did you mean 'Set'?
in block <unit> at <tmp> line 1
lucasb is Seq.Seq a desired method to have?
13:26 wamba joined 13:29 nowan left
lizmat yeah 13:30
MasterDuke hm. you can do some types (e.g., List.List, Array.Array, Hash.Hash, Int.Int) but not all (e.g., Scalar.Scalar, Any.Any, Cool.Cool)
13:32 nowan joined
lizmat m: Seq.Array 13:33
camelia Invocant of method 'iterator' must be an object instance of type 'Seq', not a type object of type 'Seq'. Did you forget a '.new'?
in block <unit> at <tmp> line 1
lizmat m: dd List.List 13:36
camelia (List,)
lizmat m: dd Array.Array
camelia [Array,]
lizmat m: dd Any.Any
camelia No such method 'Any' for invocant of type 'Any'. Did you mean 'any'?
in block <unit> at <tmp> line 1
13:36 nadim joined 13:38 Cabanossi left
lucasb when called with an typeobject as invocant, some coercion methods either returns a new defined object, or returns the typeobject itself, or dies because it was expecting an instance, not a typeobject 13:40
13:41 Cabanossi joined
lucasb maybe for each case there's a reason, but I haven't grasped it yet :) 13:41
for the record, Int.Int, Num.Num, Complex.Complex all return the typeobject
Rat.Rat dies
13:41 mr-foobar left
lucasb Bool.Bool returns False (which is expected, I think :) 13:41
lizmat well, I think Seq.Seq should return a (Seq,).Seq 13:44
13:44 mr-foobar joined
lizmat aka a Seq with a Seq type object in it 13:44
and Seq.Seq.Seq would also return (Seq,).Seq on account of .Seq on a definite Seq is self 13:45
lucasb should Seq.Array return [Seq,] ?
lizmat in my opinion, yes :-) 13:46
m: Seq.list # grr 13:47
camelia Invocant of method 'iterator' must be an object instance of type 'Seq', not a type object of type 'Seq'. Did you forget a '.new'?
in block <unit> at <tmp> line 1
lucasb agreed, it's a consistent way to solve things :) 13:48
but on the other hand, when you have $something.Type and the behavior is very different if $something is an instance or is a typeobject, it feels a little strange 13:50
for example
$concrete-seq.Array returns an array with the elements of the seq 13:51
$seq-typeobject.Array would return [(Seq),] 13:52
I mean, in the first case the return value is not [$concrete-seq,]
lizmat not sure I follow you 13:56
lucasb I'm not sure I follow myself either 13:58
13:59 zakharyas left
lucasb sorry for the confusion. I'm having trouble putting things into words :) 14:00
14:04 domidumont joined
lizmat lucasb: github.com/rakudo/rakudo/commit/5c56e9e799 14:05
afk again&
lucasb lizmat++ nice 14:08
14:12 mr-foobar left, noganex joined 14:13 uberbaud joined 14:15 mr-foobar joined, noganex_ left
b2gills .Seq on any singular value is a Seq with that value as its only value. Type objects are singular values 14:15
14:19 void1 left, domidumont left
lucasb m: say [Seq] 14:29
camelia True
lizmat m: say []; say [Int\ # number of elems 14:30
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in array composer; couldn't find final ']'
at <tmp>:1
------> 3say []; say [Int\ # number of elems7⏏5<EOL>
expecting any of:
statement end
lizmat m: say []; say [Int] # number of elems
camelia []
[(Int)]
lizmat m: say []; say [Seq]
camelia []
True
lizmat hmmm
not sure where that's coming from 14:31
lucasb ahhh, it's a meta op :) 14:33
S - serial
eq - string eq
14:34 zakharyas joined
lucasb s/serial/sequential/ 14:36
but then, I don't think "S" is much used, so it may have accumulated bugs 14:37
m: say 'a' Req 'a'
camelia True
lizmat ah, duh, now I see it :0(
lucasb m: say 'a' Seq 'a'
camelia No such method 'CALL-ME' for invocant of type 'Bool'
in block <unit> at <tmp> line 1
lizmat m: say []; say [Seq,]
camelia []
[(Seq)]
14:42 mr-foobar left 14:47 mr-foobar joined 15:01 uberbaud left, uberbaud joined 15:02 ggoebel left 15:07 sergot joined 15:08 zakharyas left 15:09 aborazmeh left, Cabanossi left, ufobat joined 15:10 Sgeo_ left 15:11 uberbaud left, Cabanossi joined, mr-foobar left 15:15 ggoebel joined, mr-foobar joined, uberbaud joined
Geth doc: ed639884f3 | (Jan-Olof Hendig)++ | doc/Type/Supply.pod6
Remove bogus :expires param from squish. nine++
15:17
doc: 23e55ac12a | (Jan-Olof Hendig)++ | doc/Type/Supply.pod6
More formatting fixes
15:18 uberbaud left 15:21 Sgeo joined
Xliff nine: Modules. 15:24
nine: But I don't know what they will be, beforehand. I just know they will be in a specific namespace.
15:27 geekosaur left, geekosaur joined 15:28 pmurias left 15:31 kaare_ joined
nine m: say $*REPO.repo-chain.grep(CompUnit::Repository::Installable)>>.installed 15:31
camelia (Nil (CompUnit::Repository::Installation::InstalledDistribution.new(prefix => IO::Path.new("/home/camelia/rakudo-m-inst-2/share/perl6/site", :SPEC(IO::Spec::Unix), :CWD("/home/camelia")))) () (CompUnit::Repository::Installation::InstalledDistribution.new…
nine Xliff: that's your starting point ^^^ 15:33
Xliff: you can just look at the file system for CompUnit::Repository::FileSystem. That's what they are for after all.
Xliff: I wouldn't mind if we add a proper interface for querying this information to CompUnit::Repository though. Or maybe another role as not all repos can know what modules they support. 15:34
Xliff Will that pick up modules that are found via -I ?
nine simple paths passed via -I are turned into CompUnit::Repository::FileSystem which has a .prefix method 15:35
Xliff OK. That makes sense.
nine I wonder what a method for querying that would be called. 15:37
And it feels like we have actually been working on this a year or two back. 15:38
Xliff Yeah. I tried this for the first time about a year ago
Same project, actually. 15:39
nine++
15:39 ChoHag joined 15:42 mr-foobar left, cyphase left 15:45 mr-foobar joined
ufobat assuming i have a class with has Str $.a has Int $.b and Bool $.c; and i'd like to set the parameters by name like: self."$name"() = $value; 15:47
15:47 cyphase joined
ufobat and $name and $value are Str. how could i take care of the types 15:47
15:47 domidumont joined
ufobat for example if $name = "b" and $value = "5" 15:48
nine ufobat: what are you trying to solve with that?
Xliff ufobat: STORE? 15:49
15:51 ufobat left, ufobat_ joined
ufobat_ sorry my pc crashed in the right moment 15:52
nine ufobat: what are you trying to solve with that?
ufobat_ i'd try to "parse" variables from %*ENV
nine ufobat_: why not something like Myclass.new(|%*ENV)? 15:53
ufobat_ and i wanted to avoid if/elsif/else or given/when. 15:54
zengargoyle sounds like you need a dispatch table.
nine nine@sunshine:~> foo=1 bar=hello perl6 -e 'class EnvEater { has Int $.foo; has Str $.bar; }; dd EnvEater.new(|%*ENV)' 15:55
EnvEater.new(foo => IntStr.new(1, "1"), bar => "hello")
zengargoyle { "b" => sub ($x) { self.b = $x } } or something similar, then you look in table by variable name and execute the sub that's ther. 15:56
ugexe m: $*REPO.repo-chain.grep(*.?prefix.?e).map({ .prefix.IO.child("dist").e ?? .prefix.IO.child("dist").map(*.IO.dir.grep(*.IO.f).Slip) !! .prefix.parent.child("META6.json") }).flat.grep(*.e).map({ Rakudo::Internals::JSON.from-json(.slurp) }).map({.<provides>.keys }).say; # does /lib as well, if you insist on doing this as a single thing
camelia ((Pod::To::Text NativeCall::Types experimental newline NativeCall::Compiler::GNU NativeCall::Compiler::MSVC NativeCall CompUnit::Repository::Staging Test))
ufobat_ there are several ways to set those settings so i'd prefere not to have it in .new() 15:57
15:58 cdg joined
ufobat_ a dispatch table could be a solution but that would grow as large as given/when 15:58
zengargoyle how are you going to ensure that the $name is an actual attribute of your class? 15:59
and not throw an error when $name isn't an attribute?
ufobat_ if it isnt a attribute, i am going to store it in a different hash. but i am figuring this out via: self.^can($name) 16:00
16:00 MilkmanDan left
zengargoyle has the feeling that a dispatch table golfs down rather nicely somehow. 16:00
ufobat_ github.com/Bailador/Bailador/blob/...ion.pm#L71 16:01
maybe my idea is just quite bad :/
16:02 MilkmanDan joined 16:03 andrzejku left
ufobat_ is this a solution my $type = self."$name".WHAT; self."$name"() = $value."$type"() 16:03
?
or something similar? 16:05
or how does the .new() actually create the IntStr from the |%*ENV? 16:07
16:07 travis-ci joined
travis-ci Doc build errored. Jan-Olof Hendig 'More formatting fixes' 16:07
travis-ci.org/perl6/doc/builds/241749688 github.com/perl6/doc/compare/dc091...e55ac12ac0
16:07 travis-ci left
zengargoyle m: class G { has $.a is rw; }; my $x = G.new; my $n="a"; $x."$n"()=4; say $x.perl 16:11
camelia G.new(a => 4)
zengargoyle it actually looks like what you have works....?
16:12 mr-fooba_ joined
zengargoyle does it just break with self."$key"()? 16:12
16:12 uberbaud joined 16:13 mr-foobar left
zengargoyle m: class H { has $.a is rw; method set($k,$v) { self."$k"()=$v; }}; my $x = H.new; $x.set("a",4); say $x.perl 16:16
camelia H.new(a => 4)
zengargoyle must be missing something. 16:17
16:20 ChoHag left
zengargoyle ah, type conversions. totally missed that part. 16:20
ufobat_ yeah 16:21
my $type = self."$key"().WHAT.perl; works
i find it ugly but it works
16:23 zakharyas joined, Cabanossi left 16:25 setty1 joined, Actualeyes left 16:26 cdg left, Cabanossi joined 16:28 araraloren left
nine m: class Config { has Int $.a is rw; has Str $.b is rw; method set($k, $v) { my $type = self."$k"().^name; self."$k"() = $v."$type"(); } }; my $c = Config.new; $c.set("a", "3"); $c.set("b", 4); dd $c; 16:28
camelia Resource temporarily unavailable
nine ufobat_: ^^^
ufobat_ nine!! :D thank you! 16:31
16:31 camelia left, titsuki left
nine That said, I really don't like this way to go about it. We're talking about configuration data. That's by definition read only. So using rw attributes just seems utterly wrong. 16:31
16:32 domidumont left, camelia joined, nowan left
ufobat_ but there is a time when you set the configuration, isnt it? 16:33
ugexe why not do the type capture in the method signature? 16:34
16:34 ChanServ sets mode: +v camelia
ufobat_ what if set() is prohibited after baile() was called, wouldn't that make sense? 16:34
ugexe method set(::T $k, $v)
oh its the type of the attr
ufobat_ right
nine ufobat_: you set the configuration once (on startup) when creating the immutable Configuration object 16:35
16:35 nowan joined
ufobat_ or within the web-app.pl file, no? of course not within the code of the routes 16:36
nine That's run as part of startup, isn't it?
16:37 zakharyas left
zengargoyle or have class Configuration do the load from file or env or array and return a class ConfigurationObject that is .new'd by class Configuration. 16:41
nine Or ConfigurationLoader + Configuration for your bikeshed pleasure 16:42
zengargoyle and export a multi get-config() with args like ( from => $file ), ( :env ) , ( from => @array ) that do the unpacking. or differently named config-from-file($file), etc. 16:44
or take array of pairs as args and then be able to load from array then file then env.... or file, env, array depending on your taste. :) 16:47
ufobat_ *nod*
16:48 zakharyas joined
ufobat_ thanks for the ideas and help 16:49
16:49 nadim left 16:51 zakharyas left
bioduds cool, I got this running gist.github.com/bioduds/629b1f88e1...651659319f 16:54
How do I respond?
16:57 zakharyas joined
bioduds say $buf gives me: Buf[uint8]:0x<47 45 54 20 2f 20 48 54 54 50 2f 31 2e 31 0d 0a 48 6f 73 74 3a 20 31 39 32 2e 31 36 38 2e 31 2e 31 30 36 3a 35 30 30 30 0d 0a 43 6f 6e 6e 65 63 74 69 6f 6e 3a 20 6b 65 65 70 2d 61 6c 69 76 65 0d 0a 43 61 63 68 65 2d 43 6f 6e 74 72 6f 6c 3a 20 6e 6f 2d 63 61 63 68 65 0d 0a 61 6e 79 74 68 69 6e 67 3a 20 68 65 72 65 0d 0a 55 73 65 72 2d 41 67 65 6e 74 3a 20 4d 6f 7a 69 6c 6c 61 2f 35 2e 30 20 28 58 31 31 17:02
evalable6 bioduds, Full output: gist.github.com/de7d18695399a06e89...1e46b29991 17:03
(exit code 1) 04===SORRY!04=== Error while compiling /tmp/i4Wy0_8Jsz
Variabl…
bioduds that TCP?
17:10 uberbaud left 17:17 BenGoldberg joined 17:24 zakharyas left 17:25 ufobat_ left
zengargoyle openurl 7 17:34
openurl 8
doh! 17:35
17:35 ChoHag joined
Geth doc: 14b4816cee | (Jan-Olof Hendig)++ | doc/Type/Supply.pod6
Added a few code examples
17:38
zengargoyle if you're listening to a socket on TCP, you are just getting the data that is sent over the connection. 17:40
eh, not sure what your asking... :) 17:41
17:44 domidumont joined, mr-fooba_ left
geekosaur bioduds, it's your stream in bytes, which starts as ASCII "GET / HTTP/1.1\r\n" 17:44
17:45 mr-foobar joined
bioduds how do I translate it geekosaur to human? 17:45
geekosaur unless you are using a library tha handles it for you, you now need to start keeping track of the differences between network octets (no intrinsic encoding; HTTP protocol can be treated as ISO8859-1 although it's actually a bit more nuanced) and whatever your data encoding is
bioduds lol
great, man. That is exactly what I need to create the communication protocol 17:46
but I still don't know how to respond to the caller
geekosaur what you can't do is what you might naïvely think you want to do, which is just slap a UTF8 decoder on top.
bioduds why not?
why it is naive? 17:47
because of interceptions?
zengargoyle most net protocols are not utf-8
geekosaur k, so the other thing I said went flying overhead.
[11 17:45:31] <geekosaur> unless you are using a library tha handles it for you, you now need to start keeping track of the differences between network octets (no intrinsic encoding; HTTP protocol can be treated as ISO8859-1 although it's actually a bit more nuanced) and whatever your data encoding is
zengargoyle most are from the days of 8bit ascii
bioduds don't worry, be blunt tome
geekosaur they are not the same. dependiing on what you're doing with it, blind UTF8 will trash data 17:48
rindolf zengargoyle: hi! Do you have the Buddha nature? ;-)
bioduds how so? make it hard to read and write?
zengargoyle in that Buf, only the first N-bytes are ascii, the rest might be something else. you have to know to extract chunks and deal with them seperately 17:49
bioduds Let me see if I'm getting what you are saying
zengargoyle rindolf: i hope not, then you would have to kill me.
bioduds I don't need to talk "robot" when I can talk "human" since coding after the first bytes is my choice. That it?
"robot" being ASCII 17:50
rindolf zengargoyle: heh 17:51
geekosaur I'm guiessing you are used to frameworks which do the thinking for you
zengargoyle imagine that Buf is a reply: it might be "200 OK" + "Content-Type: foo" + Content-Length: 50" + foo-data
bioduds I didn't yet see how Bitcoin does it. I am following the model 17:52
zengargoyle you have to know to do ascii for a few newlines (which i forgot to put in :/) and then know how many bytes of Buff are left that might just be raw 8bit PNG image.
bioduds though I plan on doing it the Perl6 way
geekosaur the point is you parse the HTTP header in what you can treat as ISO8859 (if you decode this as UTF8 you will have problems with anything over 0x80, although you technically need additional decoding to get that in the first place). this continues up to \r\n\r\n at which point you must examine the headers and look for Content-Type, Content-Encoding, ad Content-Length 17:53
the first two tell you how to decode the next chunk and the third tells you how long the chunk is
bioduds I got what you are saying now geekosaur
geekosaur you may also have to parse out more headers indicating if the stream is to be kept open for another chunk
zengargoyle which is why you usually don't do this yoursef. :P 17:54
geekosaur ^
zengargoyle bioduds: have you ever read any RFC's
bioduds no 17:55
zengargoyle or done Perl5? the Perl5 docs in places have some decent client-server examples that aren't Perl6 but maybe....
bioduds I learned to program in 2005 in Perl5 17:56
:D
zengargoyle i.e. you accept a connection and then fork to handle that connection and your main thread goes back to waiting for another connection.
bioduds I can use Async for that, right? 17:57
instead of having to fork
also because of that article you sent me
telling there is a problem with thread joins on INET, right? 17:58
zengargoyle nevermind, i haven't done any INET stuff in p6 yet.
bioduds also, this is node to node com, there may be no problem having linear process, I'll check on that
come do this with me then zengargoyle 17:59
I'm climbing Everest here, lol 18:00
zengargoyle on the TCP thing, it's just like a file. with network protocols you generally read ASCII (or ISO whatever) lines (up to \n) one at a time.
until you know that the next thing is N-bytes of raw data of some sort. 18:01
bioduds ok, I'll run some tests
here's the github github.com/bioduds/escrowchain 18:02
zengargoyle 200 OK\nContent-Type: image/png\nContent-Length: 400"\n\n(400 bytes of PNG data)
bioduds missing a lot still
let me see how bitcoin does it 18:03
hang on
Bitcoin uses a simple broadcast network to propagate transactions and blocks. All communications are done over TCP. Bitcoin is fully able to use ports other than 8333 via the -port parameter. IPv6 is supported with Bitcoind/Bitcoin-Qt v0.7.
To connect to a peer, you send a version message containing your version number, block count, and current time. The remote peer will send back a verack message and his own version message if he is accepting connections from your version. You will respond with your own verack if you are accepting connections from his version. 18:04
So, it is TCP basics, right? 18:05
zengargoyle www.rfc-editor.org/rfc-index.html -- maybe check out FTP and HTTP and SNMP to get a feel for how most TCP things work.
bioduds or at least it seems
checking
zengargoyle i usually just google 'rfc tcp' or 'rfc http' and get close enough. 18:07
a TCP session is a 2-way pipe of data between two endpoints. it's just like you typing to a program and the program responding. mostly. 18:08
18:09 PerlJam joined
zengargoyle i don't know bitcoin, it *may* just send things over plain text and there's not much to worry about in your case. 18:09
geekosaur you can at least hope it's not using asn.1 as a framing protocol. (if it is, just bind to someone's C implementation. you do NOT want to enter that rat's nest.) 18:10
zengargoyle lol, i almost brought up asn.1 as an example. :) 18:12
18:12 mr-foobar left
bioduds yes, thus the socket 18:13
18:13 ChoHag left
bioduds lol, I think it is plain text only 18:13
18:14 uberbaud joined
bioduds it is a simple talk between nodes 18:14
saying hey, my version is this what is yours?
mine is this
ok, we can talk
send me your last block
here
ok, let's sync.... 18:15
mostly is this that is happening
18:15 ChoHag joined
ugexe thats most every plain text tcp protocol, but notably ftp. lots of things you can learn from 18:15
zengargoyle yeah, if it's ASCII (or iso-whatever) and data is like hashes or base64 or whatever, it's basically just a file that you can read and write to. 18:16
18:16 zakharyas joined, mr-foobar joined
bioduds correct 18:17
no images and stuff being passed around
big chunks of data correspond to hashes corresponding for blocks of transactions 18:18
zengargoyle does p6 have the $line = <$socket> sort of thing:
bioduds being synchronized
ugexe yes its just STOMP with a merkle graph 18:19
bioduds correct ugexe
zengargoyle by syncronide do you mean talking to a single host at a time?
bioduds actually one of the beautys of it
actually 8 connections
max 18:20
every full node connects to other 8 max
18:22 uberbaud left, nadim joined 18:23 skids joined 18:24 mieko is now known as tyil
ugexe you can sync INET sockets now too 18:25
not in 2017.05 but in HEAD/nom you can
18:26 |oLa|1 joined 18:27 |oLa|1 left, |oLa|1 joined, |oLa|1 left 18:28 |oLa| left
ugexe which is what i think you were referring to when you said joining threads with INET 18:28
18:28 travis-ci joined
travis-ci Doc build errored. Jan-Olof Hendig 'Added a few code examples' 18:28
travis-ci.org/perl6/doc/builds/241777607 github.com/perl6/doc/compare/23e55...b4816cee0f
18:28 travis-ci left 18:29 nadim left 18:39 |oLa| joined 18:40 espadrine left 18:42 mr-fooba_ joined 18:44 mr-foobar left 18:54 zakharyas left 18:55 Skarsnik joined, uberbaud joined
zengargoyle ugexe: does zef actually use cached repo information? it's sorta slow on some things and i don't know if it's just p6 is slow or i'm on DSL which is sorta slow. 19:08
19:09 TEttinger joined 19:10 espadrine joined
timotimo try something like nload perhaps 19:10
zengargoyle yeah, not really that importan or i'd break out wireshark or something. :P just wondering about the mechanics of 'update'. 19:11
19:13 domidumont left
zengargoyle i end up doing `zef list > zef.list` and grepping because ATM it's painful to wait so long. 19:14
bioduds sorry, I had to leave shortly 19:19
let me read your advices
"you can sync INET sockets now too" you mean that problem that was preventing threads from being joined?
19:20 AlexDaniel joined
bioduds HEAD/nom? 19:20
zengargoyle i think he's probably refering to the jnth article i pointed out a bit ago. 19:21
bioduds yes, it is what I understood from the article zengargoyle showed me
yes
zengargoyle HEAD/nom is just the latest and greatest if you're using rakudobrew or such.
bioduds we're on the same page
oh, tx
zengargoyle or building from src vs downloading a rakudo dated release or distribution package manager and yeah, that. 19:22
zengargoyle forgets why they changed 'master' to 'nom' as the main development branch in git. :) 19:24
it's probably punny....
geekosaur no, just historical artifact 19:25
'new object model'
zengargoyle heh :) 19:26
geekosaur and then people switched to working in it exclusively, before it went 'live', and afterward it was just too much trouble/forcing people to switch stuff around to either merge it to master or rename it
and everyone's afraid to find out what tools will break (git won't, but who knows what else might) if they remove master 19:27
19:27 ChoHag left
BenGoldberg Naming anything "new" is almost never a good idea :P 19:27
geekosaur there's another project I work with that had a newnewnewnewnew... until they started cleaning up old branches 19:28
zengargoyle One of the miseries of life is that everybody names things a little bit wrong. —- Richard P. Feynman 19:29
geekosaur "there are only two hard problems in computing..." 19:31
zengargoyle 's personal daemon
BenGoldberg When I'm working on a small project and can't be bothered to use "proper" revision control, just before editing a file I copy it to something like "$original_base.$date.$extention"
None of this "new" or "old" nonsense in my filenames.
geekosaur is gradualkly moving to using vc for even small projects 19:32
BenGoldberg I ought to, but I'm lazy :P
zengargoyle has a soft spot for RCS because it's single-file oriented. 19:33
none of this 'project' and 'directory' nonsense. 19:34
19:34 domidumont joined
AlexDaniel du… du hast… 19:34
geekosaur that's great until you need multiple synchronized files 19:35
geekosaur should find out if git can extract version history of one or more files into a separate repo
AlexDaniel who would have known that once I move in here, Rammstein is going to give a concert a few kilometers away… :D
19:35 uberbaud left
zengargoyle plus, RCS has locking. 19:35
AlexDaniel opens the window
geekosaur which would mean (probably with an appropriate wrapper) you could start stuff in one common repo and move it out later 19:36
zengargoyle likes Rammstein but doesn't understand a word. :)
AlexDaniel wow, I can even hear the crowd singing :o 19:38
zengargoyle yeah, one might think that 1000 switch configuration files are a 'project', but they're really not.... rcs was cool, git was a pain.
geekosaur yeh, the configuration repo at $work[*-2] was like that
zengargoyle and locking the file before working on the switch kept people from stomping on each other. 19:39
19:39 domidumont left
geekosaur although I did have a tool that symlinked everything into a fake CVS repo so I could use CVS tools for reporting (only) 19:39
zengargoyle nice workflow.
yeah, i put things in a private git just for the grep and blame and etc. magic. 19:40
jercos geekosaur: splitting a repo sounds like a job for git filter-branch with --index-filter 19:41
zengargoyle that's like extracting a transporter accident clone.... you can't really change the original withoout repercussions. 19:43
geekosaur that depends on how you are using it 19:44
zengargoyle temporal prime directive, rewriting history is *very* bad and may destroy your universe.
geekosaur in the situation I suggested, you would not be sharing the initial repo, it's a private seed. 19:45
anything to be shared must be split out first
zengargoyle yeah, as th only 'programmer' in my group in last job ... anything goes because nobody else even knows how to look. :) 19:47
geekosaur also you don't necessarily need to revert the history in the original repo, just clone it into a new one 19:48
zengargoyle but you could split out some part into it's own repo and then change the original to 'use' the new repo and delete all of the things. 19:49
yeah.
just a newer commit with fewer files. 19:50
zengargoyle lol, Captain Picard drinking champagne from a sweaty shoe of a F1 winning driver. 19:55
ugexe zengargoyle: yes zef uses the cache, but it also has auto-update enabled in the config by default (which was changed as default because no one does zef update) 19:56
that + people always want the latest version
you cant tell if something in the cache is the latest version 19:57
zengargoyle what's the update interval?
ugexe when you run it
zengargoyle oh. :)
i had a feeling is was my slow network. 19:58
picking your brains more... what about panda and Build.pm?
ugexe what about them? 19:59
zengargoyle i have one module that requires some panda stuff to build a .so library and such via Buils.
ugexe i can almost guarentee it doesnt need panda
zengargoyle is there some way to remove that panda dependency?
ugexe look at various Build.pm in the ecosystem
zengargoyle ok, mine was ages ago and uses Panda::Common and Panda::Builder. probably cut-n-paste. 20:01
ugexe are you using panda to do anything other than declare some class a Panda::Builder? because thats not neccesary
zengargoyle but has 'class Build' ...
ugexe class Build { method build($workdir) { ... } }
zengargoyle yep. 'class Builc is Panda::Builder'
ugexe is Panda::Builder doesn't do anything other than prevent it from working with zef 20:02
zengargoyle cool, just drop the is. :P
ugexe i.e. even Panda doesnt need it
zengargoyle cool, thanks much.
ugexe btw if you want you can enforce cache only search via `zef --/p6c --/cpan install ...` 20:04
zengargoyle i was used to panda update and eh, debian user and 'apt update' and sorta get the update if you really want what wasn't there yesterday bit. :) 20:05
ugexe i have a copy of the ecosystem json on github too, and zef can point at it which uses git pull to sync (so much faster) but then I was always explaining why something in the ecosystem hosted on p6c.org may not be in my mirror yet 20:06
zengargoyle can you turn the update off via some config or %ENV
ugexe no, butmostly because i havnet thought of how to generialize that feature so it works for the various repos 20:07
zengargoyle cool, maybe i'll alias the `zef --/p6c --/cpan install ...` 20:08
ugexe you can disable p6c and cpan in the zef config so that they are default too
you can put a copy of zef config in ~/.zef if you don't want to mess with the installed one (or edit it before installing) 20:09
zengargoyle how do you think it would work with a caching proxy? i have a cpanm-proxy on my local network and all my cpan things go through it and everything ever is cached and things go faster. 20:10
20:10 yqt joined
zengargoyle thinks will work better once things are CPAN'd 20:10
ugexe the other slow thing is loading the 800+ module ecosystem json file 20:11
from-json'ing it rather
the cache would exist even if zef did not use it as a source of modules 20:12
it also acts as zefs work dir (instead of .panda dir in cwd)
20:13 cono joined
cono is there anything likep 5's "use locale" in p6? 20:14
I want the same result in p6 for this type of code: perl -Mutf8 -Mlocale -le 'sub f{join"",sort{lc$a cmp lc$b}pop=~/./g}; print f("апХчиЕмаЁ")'
but this perl6 -e 'sub f{$^x.split("").sort(*.lc).join};f("апХчиЕмаЁ").say' gives result the same as in p5 w/o "use locale" 20:15
zengargoyle i haven't really looked but sorta heard about pluggable things... would it be possible to make github/cpan/url point to local location somehow?
20:16 mscha joined
zengargoyle i.e. if i git clone the exosystem and update on a regular basis could i make zef use my copy? 20:16
mscha m: sub foo { my $a = 42; my @b = 1,2,3; return $a, @b; }; my ($x, @y) = foo; say @y; # [[huh?]]
yoleaux 9 Jun 2017 10:10Z <eveo> mscha: It now does. RE: irclog.perlgeek.de/perl6/2017-05-02#i_14518610
camelia [[1 2 3]]
zengargoyle disk is cheap, DSL is slow. :P 20:17
mscha Where does that extra level of array come from, and how do I prevent it?
moritz m: sub foo { my $a = 42; my @b = 1,2,3; return $a, @b; }; my ($y, @y) := foo; say @y.perl 20:18
camelia [1, 2, 3]
cono you are not flattening array
moritz that's how you prevent it
but no it comes from? dunno :/
cono m: sub foo { my $a = 42; my @b = 1,2,3; return $a, @b; }; my ($y, @y) = foo.flat; say @y.perl 20:19
camelia [1, 2, 3]
cono m: sub foo { my $a = 42; my @b = 1,2,3; return $a, |@b; }; my ($y, @y) = foo; say @y.perl
camelia [1, 2, 3]
cono TMTOWTDI :D
mscha Ah, I get it: @y gets the rest of the items in (42, [1,2,3]), i.e. ([1,2,3]). 20:20
Thanks. 20:21
m: sub foo { my $a = 42; my @b = 1,2,3; return $a, @b; }; my ($x, $y) = foo; say $y; # This works too
camelia [1 2 3]
zengargoyle um, doesn't foo return two thins and you get two things?
/thins/things/ 20:23
moritz m: my @a = [1, 2, 3]; say @a
camelia [1 2 3]
moritz the ways of the array are mysterious :(
zengargoyle heh 20:24
moritz
.oO( what's "the way of the array" in Japanese? )
20:25
zengargoyle 配列道 20:29
配列 [はいれつ] /array (e.g. in programming languages)/ 20:30
BenGoldberg The strange seeming result is because the GLR affected return values from functions as well as things passed to functions. 20:31
If you write: return @foo; # This is a single item consisting of an array. It gets flattened similar to perl5 20:33
zengargoyle moritz: that's just a guess from looking at a 'computer language in japanese' dictionary and tacking the 道 on the end.
hairetsudou
BenGoldberg If you write: return 1, @foo; # This is not a single item. It does not get flattened. Instead, you are returning a list of two items, the integer 1, and the array @foo.
Here's an explantion which describes it in terms of what is passed to a function: <docs.perl6.org/type/Signature#Sing...lurpy>, but the same thing happens to return values too. 20:36
zengargoyle or hairetsudô or hairetsudō depending on your favorite flavo(u?)r or romanization. :P
moritz zengargoyle: fascinating, thanks 20:43
time to get some sleep here :/
zengargoyle 配列道 is horribly (配 {distribute} {spouse} {exile} {rationing}), (列 {file} {row} {rank} {tier} {column}), (道 {road-way} {street} {district} {journey} {course} {moral} {teachings}) 20:44
the way of distributing colums? :)
zengargoyle does Japanese about like p6, not native, just haphazard investigations. 20:46
zengargoyle over many many years.
MasterDuke cono: btw, you might want .fc instead of .lc 20:59
21:00 mscha left 21:06 Skarsnik left, yqt left 21:12 BenGoldberg left
Geth doc: 557d5e49ae | (Jan-Olof Hendig)++ | doc/Type/Supply.pod6
Updated a few method signatures
21:13
doc: bc2470c8e6 | (Jan-Olof Hendig)++ | doc/Type/Signature.pod6
Fixed erroneous example output and formatting
21:22
21:24 Cabanossi left 21:26 Cabanossi joined
TEttinger areido 21:29
Geth Swapped META.info → META6.json in 1 dists in github.com/perl6/ecosystem/commit/867b3cdd84 21:31
21:53 travis-ci joined
travis-ci Doc build passed. Jan-Olof Hendig 'Updated a few method signatures' 21:53
travis-ci.org/perl6/doc/builds/241821035 github.com/perl6/doc/compare/14b48...7d5e49ae99
21:53 travis-ci left 21:58 rindolf left 22:08 Cabanossi left 22:11 raschipi joined, Cabanossi joined 22:12 travis-ci joined
travis-ci Doc build errored. Jan-Olof Hendig 'Fixed erroneous example output and formatting' 22:12
travis-ci.org/perl6/doc/builds/241822859 github.com/perl6/doc/compare/557d5...2470c8e69e
22:12 travis-ci left 22:19 raiph left 22:20 raiph joined 22:24 setty1 left 22:25 zacts left 23:02 bioduds left 23:08 BenGoldberg joined 23:09 zacts joined, raschipi left 23:28 lucasb left 23:31 espadrine left 23:35 wamba left 23:38 Cabanossi left 23:41 Cabanossi joined