Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-06-11

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:01 Voldenet jnthn: it's not hard, but when you're dealing with unix constants things get very variable between environments
00:02 Voldenet 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:10 MasterDuke joined #perl6
00:15 Cabanossi joined #perl6
00:19 BenGoldberg m: say 3 ¹⁺¹
00:19 camelia rakudo-moar 8b86b5: OUTPUT: «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…»
00:19 BenGoldberg m: say 3¹⁺¹
00:19 camelia rakudo-moar 8b86b5: OUTPUT: «3␤»
00:20 BenGoldberg m: say 3¹⁻¹
00:20 camelia rakudo-moar 8b86b5: OUTPUT: «0.333333␤»
00:20 BenGoldberg That is not the precedence I was expecting.
00:21 TEttinger is that... 3 to the 1 to the +1 in the first case?
00:21 TEttinger and (3 to the 1) to the -1 in the second case?
00:22 TEttinger definitely not mathy precedence...
00:22 TEttinger I mean, maybe?
00:22 TEttinger m: say 3(¹⁺¹)
00:22 camelia rakudo-moar 8b86b5: OUTPUT: «No such method 'CALL-ME' for invocant of type 'Int'␤  in block <unit> at <tmp> line 1␤␤»
00:22 TEttinger heh
00:22 TEttinger no idea how to type superscript parentheses
00:23 kurahaupo joined #perl6
00:32 geekosaur XCompose thinks it's <Compose> ^ ( resp. )
00:45 Cabanossi joined #perl6
01:08 mr-foobar joined #perl6
01:29 bioduds joined #perl6
01:29 bioduds hi, friends
01:30 raschipi diga lá
01:31 bioduds fala rafael
01:31 bioduds tudo joia?
01:31 bioduds I'm trying the tcp again
01:31 bioduds none is coming through
01:32 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
01:32 bioduds it shows when I use another computer in my LAN with postman
01:32 bioduds on port 5000
01:33 bioduds vc tá onde?
01:33 bioduds eu to em BH
01:33 raschipi Curitiba.
01:33 bioduds vc deve estar no sul
01:33 bioduds ah
01:33 bioduds explicado
01:33 bioduds entao, eu coloquei o postman no meu laptop pra mandar sinal na porta 5000 pro PC
01:34 bioduds eu clico e vejo chegando usando o tcptrack
01:34 raschipi So, it works across the network but fail when using the local address?
01:34 bioduds actually, I was expecting only my code to be able to read it
01:35 bioduds I did need to run tcptrack with sudo
01:35 raschipi Your code is the server?
01:35 raschipi tcptrack needs sudo to get raw packets.
01:36 bioduds yep
01:36 bioduds I'm not sure if my code is server or client
01:36 bioduds because I'm setting a P2P
01:36 mr-foobar joined #perl6
01:36 bioduds here's what I'm using https://gist.github.com/bioduds/01b17be1585fba3b8c16772b0af6ae23
01:37 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 https://docs.perl6.org/type/IO::Socket::Async and https://docs.perl6.org/type/IO::Socket::INET
01:38 bioduds SSL, you mean?
01:39 raschipi Yes, it was called SSL in older versions.
01:39 bioduds I think bitcoin does not use it, I'll see that in
01:40 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:41 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?
01:41 bioduds I am trying to set a p2p communication on TCP
01:41 bioduds like bitcoin does
01:42 bioduds so nodes can communicate data with each other
01:47 raschipi For your distributed judge system, right?
01:47 bioduds correct
01:48 ilbot3 joined #perl6
01:48 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:48 bioduds depois dessa "cagada" do Gilmar Mendes, fiquei mais na fissura de fazer esse sistema :D
01:48 bioduds justiça descentralizada!
01:50 bioduds I found this here https://github.com/jonathanstowe/CheckSocket
01:50 bioduds let me try it
01:51 raschipi bioduds: You need something like this: http://swarmjs.github.io/articles/papoc/
01:52 raschipi It uses well tested and state of the art best practices to do it. Are you well read on those?
01:53 setty1 joined #perl6
01:53 bioduds reading
01:57 bioduds I didn't find the source code
01:58 bioduds oh, got it
01:58 bioduds https://github.com/gritzko/swarm
01:58 bioduds it's javascript
01:58 bioduds I wanna make it FREE software
02:00 bioduds checking modules
02:01 bioduds https://github.com/jnthn/p6-test-io-socket-async
02:02 raschipi What's the problem with javascript?
02:04 bioduds according to Richard Stallman, not free software
02:04 bioduds I have nothing against it
02:04 bioduds I use it all the time
02:04 bioduds Just not for this project
02:04 bioduds this needs to be completely open
02:06 raschipi Well, I'm not saying to use exactly that, just to use something like it.
02:06 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:07 raschipi And you need to read Stallman better if you think any javascript isn't free software.
02:09 bioduds how so?
02:09 bioduds binaries are obfuscated, right?
02:09 bioduds Tried to get the result of a broken Promise
02:10 bioduds I'm being lazy actually
02:10 bioduds I need to read IO:Sockets through
02:11 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:13 bioduds understood
02:14 bioduds thanks for explaining to me
02:15 Cabanossi joined #perl6
02:18 bioduds so I'm misreading it
02:18 bioduds if I write it and run then it is free software
02:18 bioduds I'm ok with that
02:19 bioduds I got a reaction
02:19 bioduds in the code
02:21 bioduds this responds https://gist.github.com/bioduds/7d3d3f7e91e36b506f9e6e6254110929
02:21 bioduds I click the postman send signal and it dies
02:21 mr-foobar joined #perl6
02:21 bioduds it says Tried to get the result of a broken Promise
02:21 kurahaupo joined #perl6
02:22 bioduds I'm trying to understand this message
02:24 bioduds aha
02:24 bioduds got it
02:25 bioduds here: https://gist.github.com/bioduds/1171a1ab5cbda8af72a0550d2badee94
02:25 bioduds this works
02:27 bioduds I asked .WHAT and it said Async
02:27 bioduds but Async is not a primitive object, is it?
02:27 bioduds is it Proc::Async?
02:28 bioduds yes
02:28 MasterDuke m: class A::B {}; my $a = A::B.new; say $a.WHAT
02:28 camelia rakudo-moar 8b86b5: OUTPUT: «(B)␤»
02:28 bioduds thanks, raschipi :D
02:28 raschipi You called .WHAT and it returned an Async type.
02:29 raschipi If you want it to tell you what it is, call .^name.
02:31 bioduds let me
02:32 bioduds it says IO::Socket::Async
02:34 bioduds seems like it is reading a Blob
02:34 kurahaupo_ joined #perl6
02:35 raschipi Call .decode on a Blob to turn it into a Str.
02:37 bioduds let me try
02:38 noganex_ joined #perl6
02:38 kurahaupo_ joined #perl6
02:38 bioduds actually it is a Supply
02:38 bioduds Asynchronous data stream with multiple subscribers
02:40 bioduds I'm on the right track :D
02:40 bioduds going to sleep now
02:40 bioduds thanks, man
02:40 bioduds obrigado! :D
02:44 Cabanossi joined #perl6
02:52 Geth ¦ doc: antquinonez++ created pull request #1374: Improve readability, some grammar fixes.
02:52 Geth ¦ doc: review: https://github.com/perl6/doc/pull/1374
02:56 uberbaud joined #perl6
03:17 skids joined #perl6
03:28 Geth ¦ doc: 83681691ac | (Antonio Quinonez)++ (committed by Zoffix Znet) | doc/Language/functions.pod6
03:28 Geth ¦ doc: Clarify, streamline. (#1374)
03:28 Geth ¦ doc: review: https://github.com/perl6/doc/commit/83681691ac
03:40 uberbaud joined #perl6
03:48 cdg joined #perl6
03:48 uberbaud left #perl6
03:55 Cabanossi joined #perl6
03:59 uberbaud joined #perl6
04:00 tomdavis joined #perl6
04:00 tomdavis joined #perl6
04:06 tomdavis joined #perl6
04:19 travis-ci joined #perl6
04:19 travis-ci Doc build errored. Antonio Quinonez 'Clarify, streamline. (#1374)'
04:19 travis-ci https://travis-ci.org/perl6/doc/builds/241648677 https://github.com/perl6/doc/compare/c2de7ab667e2...83681691ac97
04:19 travis-ci left #perl6
04:25 uberbaud joined #perl6
04:46 kurahaupo joined #perl6
04:57 aborazmeh joined #perl6
04:57 aborazmeh joined #perl6
05:07 Sgeo_ joined #perl6
05:08 Geth ¦ ecosystem: 41aaed6c3b | (Jonathan Scott Duff)++ | META.list
05:08 Geth ¦ ecosystem: Add AI::FANN to ecosystem
05:08 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/41aaed6c3b
05:17 donaldh joined #perl6
05:25 Cabanossi joined #perl6
05:32 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 Xliff Previously, I could do this: for @($*REPO.repo-chain).grep({$_ ~~ CompUnit::Repository::FileSystem || $_ ~~ CompUnit::Repository::Installation }) -> $c { ... }
05:32 Xliff And do naughty things to $c.path-spec to accomplish what I need. Would that still work?
05:35 moritz Xliff: are you sure you need all that, and can't just look into %?RESOURCES ?
05:38 dalek joined #perl6
05:40 samcv i need my Proc object not to throw when i close stderr and stdout
05:40 samcv it's throwing if it gets a nozero exit code
05:40 moritz samcv: use it in a non-sink context
05:40 moritz $ = $proc.out.close
05:41 moritz (annoying, I know)
05:41 samcv moritz++
05:41 samcv cool
05:41 samcv a bit ;P
05:42 Xliff moritz: No. %?RESOURCES will not do it, since I hope people will start writing their own custom modules.
05:43 Xliff 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)
05:44 Xliff I wish. :P
05:55 zacts joined #perl6
06:01 rindolf joined #perl6
06:03 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 rakudo-moar 56e71d: OUTPUT: «((Pod::To::Text NativeCall::Types experimental newline NativeCall::Compiler::GNU NativeCall::Compiler::MSVC NativeCall CompUnit::Repository::Staging Test))␤»
06:04 ugexe also see https://github.com/ugexe/zef/blob/master/lib/Zef/Client.pm6#L664
06:14 timotimo joined #perl6
06:19 wamba joined #perl6
06:26 Cabanossi joined #perl6
06:26 ugjka joined #perl6
06:31 uberbaud joined #perl6
06:38 espadrine_ joined #perl6
06:40 zengargoyle_ is there a list somewhere of the [TAG] used in RT subjects or is it just an evolving convention?
06:45 Xliff ugexe: Wow, that's complex. Thanks!
07:01 Xliff ugexe: Only problem with that is it doesn't seem to recognize path additions with -I.
07:01 Xliff Which I really need. Thanks, though
07:02 Xliff (However, the way I was originally doing it, no longer works, either)
07:11 Cabanossi joined #perl6
07:40 nine Xliff: what exactly are you looking for?
07:41 Cabanossi joined #perl6
07:43 nine Xliff: are you really looking for files, or are you looking for modules?
07:43 mr-foobar joined #perl6
07:46 andrzejku joined #perl6
07:46 andrzejku hello perl6
07:46 andrzejku !
07:47 moritz \o andrzejku
07:48 donaldh joined #perl6
07:52 tadzik . o O ( andrzejku, jak Ci na imię? )
07:52 tadzik o/
07:52 andrzejku tadzik Andrzejek ;d
07:53 tadzik ;) I may have been reffering to https://www.youtube.com/watch?v=LmNed_cFRrw :P
07:55 andrzejku :D
08:15 dct joined #perl6
08:16 kaare__ joined #perl6
08:17 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:18 Voldenet I'd rather take something like: c99{extern int test() { return 42; }}
08:27 parv joined #perl6
08:42 mr-foobar joined #perl6
09:00 vendethiel joined #perl6
09:02 donaldh joined #perl6
09:11 mr-foobar joined #perl6
09:19 rindolf joined #perl6
09:20 nhywyll joined #perl6
09:26 Cabanossi joined #perl6
09:36 tadzik sounds like a job for a Macro
09:40 moritz or a slang
09:44 Voldenet but I'm not sure if I even can
09:44 Voldenet erm
09:46 mr-foobar joined #perl6
09:49 Voldenet I'm not sure how would I do this + the feature is experimental, so it might not stick
09:50 llfourn do we have a proper way of doing slangs now without modifying %*LANG?
09:51 llfourn s/%/$/
09:51 llfourn ah this might be it: https://github.com/bduggan/mosdef/blob/master/lib/Slang/Mosdef.pm
09:59 nhywyll joined #perl6
10:00 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:02 llfourn Voldenet: this looks like an interesting experiment. It does look like a job for a slang.
10:03 araraloren llfourn, looks like awesome. What is slang ?
10:03 llfourn araraloren: https://github.com/bduggan/mosdef/blob/master/lib/Slang/Mosdef.pm
10:04 llfourn It will probably be more complicated than that one though
10:04 araraloren Yeah, Is there any document about it ?
10:04 llfourn araraloren: nope
10:04 llfourn Voldenet: this one might be more helpful: https://github.com/tony-o/perl6-slang-sql/blob/master/lib/Slang/SQL.pm6
10:05 llfourn (though it uses the old/wrong way of introducing a slang)
10:05 Voldenet and I guess this might be of use: https://github.com/perl6/nqp-rx/blob/master/src/NQP/Grammar.pm
10:05 araraloren Awesome!
10:05 llfourn Voldenet: probably the Perl6::Grammar is more useful
10:05 llfourn I did write a huge slang once
10:06 araraloren I will have a look later.
10:06 llfourn which introduced custom method declarators and even rolled custom functions from QAST at runtime
10:08 araraloren I have seen that slang several times, but I dont' have a sense of it
10:08 llfourn https://github.com/LLFourn/gss/blob/master/lib/GSS/Slang/Actions.pm6 # just made it public again
10:08 llfourn Voldenet: it's a bit of a mess but might be helpful
10:09 llfourn araraloren: QAST code is hard to understand at first look :)
10:11 araraloren llfourn, yeah :)
10:11 Voldenet QAST looks a bit like C#'s expression, but more powerful
10:12 Geth ¦ doc: dc09106501 | (Jan-Olof Hendig)++ | doc/Type/Supply.pod6
10:12 Geth ¦ doc: Fixed some formatting issues
10:12 Geth ¦ doc: review: https://github.com/perl6/doc/commit/dc09106501
10:12 llfourn I've never seen C# :\
10:13 llfourn be warned that it's hard to debug at first
10:13 llfourn there's a dump method on QAST object iirc that dumps the tree into a string
10:15 nhywyll joined #perl6
10:16 mr-foobar joined #perl6
10:31 pmurias joined #perl6
10:36 bartolin joined #perl6
10:38 pmurias joined #perl6
10:38 pmurias what's the difference between prepend and unshift?
10:38 llfourn pmurias: I guess the same as .append and .push
10:39 llfourn which in my head is push is +@args and append is *@args
10:40 llfourn (but looking at the source it seems that's wrong)
10:41 llfourn push is **@
10:41 llfourn which I didn't even know existed
10:42 yqt joined #perl6
10:42 mr-foobar joined #perl6
10:42 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 llfourn TIL
10:44 pmurias the docs.perl6.org have 'multi method append(Array:D: **@values is raw) for append
10:45 llfourn that's wrong :o
10:45 nhywyll joined #perl6
10:47 llfourn multi method push(array:D:    **@values) { self.append(@values) }
10:47 llfourn multi method append(array:D:   *@values) { self.append(@values) }
10:47 llfourn multi method unshift(array:D: **@values) { self.unshift(@values) }
10:47 llfourn multi method prepend(array:D:  *@values) { self.unshift(@values) }
10:48 llfourn doh though in Array.pm multi method append(Array:D: **@values is raw)
10:49 llfourn :\
10:51 llfourn .push and .append implemenations on Array look exactly the same so I have no idea
10:51 lizmat llfourn: that might indicate a bug  :-)
10:53 llfourn m: my @a = <one two>; my @b; @b.push: @a; my @c; @c.append: @a; say @b; say @c;
10:53 camelia rakudo-moar 56e71d: OUTPUT: «[[one two]]␤[one two]␤»
10:53 llfourn looks like the native one is being hit in any case
10:54 llfourn m: my @a = ($*PERL,$*PERL); my @b; @b.push: @a; my @c; @c.append: @a; say @b; say @c;
10:54 camelia rakudo-moar 56e71d: OUTPUT: «[[Perl 6 (6.c) Perl 6 (6.c)]]␤[Perl 6 (6.c) Perl 6 (6.c)]␤»
10:54 nadim joined #perl6
10:55 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 rakudo-moar 56e71d: OUTPUT: «[[one two] [one two]]␤[[one two] [one two]]␤»
10:55 llfourn hmm ok, so they only behave the same with multiple arguments
10:58 llfourn I guess it was decided that append should only do one level of flattening
10:59 llfourn which tbh is probably desirable
11:00 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 rakudo-moar 56e71d: OUTPUT: «True␤False␤Array[IntStr].new(IntStr.new(1, "1"), IntStr.new(2, "2"))␤»
11:00 llfourn otherwise appending multiple lists onto an array of lists would be annoying
11:01 araraloren Is `Array[IntStr] ~~ Array[Int]` should true ? What's the mean of `Array[IntStr]` ?
11:02 travis-ci joined #perl6
11:02 travis-ci Doc build errored. Jan-Olof Hendig 'Fixed some formatting issues'
11:02 travis-ci https://travis-ci.org/perl6/doc/builds/241696657 https://github.com/perl6/doc/compare/83681691ac97...dc09106501f6
11:02 travis-ci left #perl6
11:03 donaldh joined #perl6
11:04 jameslenz joined #perl6
11:08 * llfourn is actually still slightly confused the append does the same thing as push with multiple arguments
11:11 Cabanossi joined #perl6
11:18 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:20 zengargoyle 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 .
11:21 araraloren I know that from wiki: https://en.wikipedia.org/wiki/Covariance_and_contravariance_(computer_science)
11:23 * zengargoyle backs away slowly....  having not thought that much about it besides going "hmmm, i can put IntStr in Array[int]". :)
11:24 araraloren m: my Int @array = 1, 2; my IntStr $a = 13; @array.push($a); say @array.perl;
11:24 camelia rakudo-moar 56e71d: OUTPUT: «Type check failed in assignment to $a; expected IntStr but got Int (13)␤  in block <unit> at <tmp> line 1␤␤»
11:36 bartolin joined #perl6
11:41 Cabanossi joined #perl6
11:44 mr-foobar joined #perl6
11:53 zakharyas joined #perl6
11:55 nadim joined #perl6
12:10 cognominal joined #perl6
12:14 eveo joined #perl6
12:15 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:16 eveo araraloren: that smartmatch is an alledged bug: https://rt.perl.org/Ticket/Display.html?id=128866#ticket-history
12:17 eveo Literally a subclass of both, with some sugar to handle which view to use: https://github.com/rakudo/rakudo/blob/nom/src/core/allomorphs.pm#L2-L22
12:17 mr-foobar joined #perl6
12:22 perlawhirl joined #perl6
12:41 eveo left #perl6
12:43 mr-foobar joined #perl6
12:45 pmurias joined #perl6
12:47 dudz joined #perl6
12:52 domidumont joined #perl6
12:56 khw joined #perl6
12:57 domidumont joined #perl6
13:11 Cabanossi joined #perl6
13:12 mr-foobar joined #perl6
13:12 aborazmeh joined #perl6
13:12 aborazmeh joined #perl6
13:12 pilne joined #perl6
13:15 lucasb joined #perl6
13:17 araraloren m: my Int @array = 1, 2; my IntStr $a = <13>; @array.push($a); say @array.perl
13:17 camelia rakudo-moar 56e71d: OUTPUT: «Array[Int].new(1, 2, IntStr.new(13, "13"))␤»
13:19 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,"?!
13:19 araraloren .tell eveo thanks, I just make a type mistake. It's fit what I thought.
13:19 yoleaux araraloren: I'll pass your message to eveo.
13:22 nowan joined #perl6
13:24 Praise joined #perl6
13:24 Praise joined #perl6
13:25 lucasb m: ().Seq
13:25 camelia rakudo-moar 56e71d: ( no output )
13:25 lucasb m: ().Seq.Seq
13:25 camelia rakudo-moar 56e71d: OUTPUT: «No such method 'Seq' for invocant of type 'Seq'. Did you mean 'Set'?␤  in block <unit> at <tmp> line 1␤␤»
13:25 lucasb is Seq.Seq a desired method to have?
13:26 wamba joined #perl6
13:30 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 #perl6
13:33 lizmat m: Seq.Array
13:33 camelia rakudo-moar 56e71d: OUTPUT: «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␤␤»
13:36 lizmat m: dd List.List
13:36 camelia rakudo-moar 56e71d: OUTPUT: «(List,)␤»
13:36 lizmat m: dd Array.Array
13:36 camelia rakudo-moar 56e71d: OUTPUT: «[Array,]␤»
13:36 lizmat m: dd Any.Any
13:36 camelia rakudo-moar 56e71d: OUTPUT: «No such method 'Any' for invocant of type 'Any'. Did you mean 'any'?␤  in block <unit> at <tmp> line 1␤␤»
13:36 nadim joined #perl6
13:40 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:41 Cabanossi joined #perl6
13:41 lucasb maybe for each case there's a reason, but I haven't grasped it yet :)
13:41 lucasb for the record, Int.Int, Num.Num, Complex.Complex all return the typeobject
13:41 lucasb Rat.Rat dies
13:41 lucasb Bool.Bool returns False (which is expected, I think :)
13:44 lizmat well, I think Seq.Seq should return a (Seq,).Seq
13:44 mr-foobar joined #perl6
13:44 lizmat aka a Seq with a Seq type object in it
13:45 lizmat 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,] ?
13:46 lizmat in my opinion, yes  :-)
13:47 lizmat m: Seq.list   # grr
13:47 camelia rakudo-moar 56e71d: OUTPUT: «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␤␤»
13:48 lucasb agreed, it's a consistent way to solve things :)
13:50 lucasb 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 lucasb for example
13:51 lucasb $concrete-seq.Array returns an array with the elements of the seq
13:52 lucasb $seq-typeobject.Array would return [(Seq),]
13:52 lucasb I mean, in the first case the return value is not [$concrete-seq,]
13:56 lizmat not sure I follow you
13:58 lucasb I'm not sure I follow myself either
14:00 lucasb sorry for the confusion. I'm having trouble putting things into words :)
14:04 domidumont joined #perl6
14:05 lizmat lucasb: https://github.com/rakudo/rakudo/commit/5c56e9e799
14:05 lizmat afk again&
14:08 lucasb lizmat++ nice
14:12 noganex joined #perl6
14:13 uberbaud joined #perl6
14:15 mr-foobar joined #perl6
14:15 b2gills .Seq on any singular value is a Seq with that value as its only value. Type objects are singular values
14:29 lucasb m: say [Seq]
14:29 camelia rakudo-moar 5c56e9: OUTPUT: «True␤»
14:30 lizmat m: say []; say [Int\   # number of elems
14:30 camelia rakudo-moar 5c56e9: OUTPUT: «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␤        …»
14:30 lizmat m: say []; say [Int]   # number of elems
14:30 camelia rakudo-moar 5c56e9: OUTPUT: «[]␤[(Int)]␤»
14:30 lizmat m: say []; say [Seq]
14:30 camelia rakudo-moar 5c56e9: OUTPUT: «[]␤True␤»
14:30 lizmat hmmm
14:31 lizmat not sure where that's coming from
14:33 lucasb ahhh, it's a meta op :)
14:33 lucasb S - serial
14:33 lucasb eq - string eq
14:34 zakharyas joined #perl6
14:36 lucasb s/serial/sequential/
14:37 lucasb but then, I don't think "S" is much used, so it may have accumulated bugs
14:37 lucasb m: say 'a' Req 'a'
14:37 camelia rakudo-moar 5c56e9: OUTPUT: «True␤»
14:37 lizmat ah, duh, now I see it :0(
14:37 lucasb m: say 'a' Seq 'a'
14:37 camelia rakudo-moar 5c56e9: OUTPUT: «No such method 'CALL-ME' for invocant of type 'Bool'␤  in block <unit> at <tmp> line 1␤␤»
14:37 lizmat m: say []; say [Seq,]
14:37 camelia rakudo-moar 5c56e9: OUTPUT: «[]␤[(Seq)]␤»
14:47 mr-foobar joined #perl6
15:01 uberbaud joined #perl6
15:07 sergot joined #perl6
15:09 ufobat joined #perl6
15:11 Cabanossi joined #perl6
15:15 ggoebel joined #perl6
15:15 mr-foobar joined #perl6
15:15 uberbaud joined #perl6
15:17 Geth ¦ doc: ed639884f3 | (Jan-Olof Hendig)++ | doc/Type/Supply.pod6
15:17 Geth ¦ doc: Remove bogus :expires param from squish. nine++
15:17 Geth ¦ doc: review: https://github.com/perl6/doc/commit/ed639884f3
15:17 Geth ¦ doc: 23e55ac12a | (Jan-Olof Hendig)++ | doc/Type/Supply.pod6
15:17 Geth ¦ doc: More formatting fixes
15:17 Geth ¦ doc: review: https://github.com/perl6/doc/commit/23e55ac12a
15:21 Sgeo joined #perl6
15:24 Xliff nine: Modules.
15:24 Xliff nine: But I don't know what they will be, beforehand. I just know they will be in a specific namespace.
15:27 geekosaur joined #perl6
15:31 kaare_ joined #perl6
15:31 nine m: say $*REPO.repo-chain.grep(CompUnit::Repository::Installable)>>.installed
15:31 camelia rakudo-moar 52d395: OUTPUT: «(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…»
15:33 nine Xliff: that's your starting point ^^^
15:33 nine Xliff: you can just look at the file system for CompUnit::Repository::FileSystem. That's what they are for after all.
15:34 nine 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 ?
15:35 nine simple paths passed via -I are turned into CompUnit::Repository::FileSystem which has a .prefix method
15:35 Xliff OK. That makes sense.
15:37 nine I wonder what a method for querying that would be called.
15:38 nine 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
15:39 Xliff Same project, actually.
15:39 Xliff nine++
15:39 ChoHag joined #perl6
15:45 mr-foobar joined #perl6
15:47 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 cyphase joined #perl6
15:47 ufobat and $name and $value are Str. how could i take care of the types
15:47 domidumont joined #perl6
15:48 ufobat for example if $name = "b" and $value = "5"
15:48 nine ufobat: what are you trying to solve with that?
15:49 Xliff ufobat: STORE?
15:51 ufobat_ joined #perl6
15:52 ufobat_ sorry my pc crashed in the right moment
15:52 nine ufobat: what are you trying to solve with that?
15:52 ufobat_ i'd try to "parse" variables from %*ENV
15:53 nine ufobat_: why not something like Myclass.new(|%*ENV)?
15:54 ufobat_ and i wanted to avoid if/elsif/else or given/when.
15:54 zengargoyle sounds like you need a dispatch table.
15:55 nine nine@sunshine:~> foo=1 bar=hello perl6 -e 'class EnvEater { has Int $.foo; has Str $.bar; }; dd EnvEater.new(|%*ENV)'
15:55 nine EnvEater.new(foo => IntStr.new(1, "1"), bar => "hello")
15:56 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
15:56 camelia rakudo-moar 52d395: OUTPUT: «((Pod::To::Text NativeCall::Types experimental newline NativeCall::Compiler::GNU NativeCall::Compiler::MSVC NativeCall CompUnit::Repository::Staging Test))␤»
15:57 ufobat_ there are several ways to set those settings so i'd prefere not to have it in .new()
15:58 cdg joined #perl6
15:58 ufobat_ a dispatch table could be a solution but that would grow as large as given/when
15:59 zengargoyle how are you going to ensure that the $name is an actual attribute of your class?
15:59 zengargoyle and not throw an error when $name isn't an attribute?
16:00 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 * zengargoyle has the feeling that a dispatch table golfs down rather nicely somehow.
16:01 ufobat_ https://github.com/Bailador/Bailador/blob/dev/lib/Bailador/Configuration.pm#L71
16:01 ufobat_ maybe my idea is just quite bad :/
16:02 MilkmanDan joined #perl6
16:03 ufobat_ is this a solution my $type = self."$name".WHAT; self."$name"() = $value."$type"()
16:03 ufobat_ ?
16:05 ufobat_ or something similar?
16:07 ufobat_ or how does the .new() actually create the IntStr from the |%*ENV?
16:07 travis-ci joined #perl6
16:07 travis-ci Doc build errored. Jan-Olof Hendig 'More formatting fixes'
16:07 travis-ci https://travis-ci.org/perl6/doc/builds/241749688 https://github.com/perl6/doc/compare/dc09106501f6...23e55ac12ac0
16:07 travis-ci left #perl6
16:11 zengargoyle m: class G { has $.a is rw; }; my $x = G.new; my $n="a"; $x."$n"()=4; say $x.perl
16:11 camelia rakudo-moar 52d395: OUTPUT: «G.new(a => 4)␤»
16:11 zengargoyle it actually looks like what you have works....?
16:12 mr-fooba_ joined #perl6
16:12 zengargoyle does it just break with self."$key"()?
16:12 uberbaud joined #perl6
16:16 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 rakudo-moar 52d395: OUTPUT: «H.new(a => 4)␤»
16:17 * zengargoyle must be missing something.
16:20 zengargoyle ah, type conversions.  totally missed that part.
16:21 ufobat_ yeah
16:21 ufobat_ my $type = self."$key"().WHAT.perl; works
16:21 ufobat_ i find it ugly but it works
16:23 zakharyas joined #perl6
16:25 setty1 joined #perl6
16:25 Actualeyes left #perl6
16:26 Cabanossi joined #perl6
16:28 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 rakudo-moar 52d395: OUTPUT: «Resource temporarily unavailable»
16:28 nine ufobat_: ^^^
16:31 ufobat_ nine!! :D thank you!
16:31 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:32 camelia joined #perl6
16:33 ufobat_ but there is a time when you set the configuration, isnt it?
16:34 ugexe why not do the type capture in the method signature?
16:34 ufobat_ what if set() is prohibited after baile() was called, wouldn't that make sense?
16:34 ugexe method set(::T $k, $v)
16:34 ugexe oh its the type of the attr
16:34 ufobat_ right
16:35 nine ufobat_: you set the configuration once (on startup) when creating the immutable Configuration object
16:35 nowan joined #perl6
16:36 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:41 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:42 nine Or ConfigurationLoader + Configuration for your bikeshed pleasure
16:44 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:47 zengargoyle 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 #perl6
16:49 ufobat_ thanks for the ideas and help
16:54 bioduds cool, I got this running https://gist.github.com/bioduds/629b1f88e1a778f13309f5651659319f
16:54 bioduds How do I respond?
16:57 zakharyas joined #perl6
17:02 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:03 evalable6 bioduds, Full output: https://gist.github.com/de7d18695399a06e8980c61e46b29991
17:03 evalable6 bioduds, rakudo-moar 52d39576f: OUTPUT: «(exit code 1) ===SORRY!=== Error while compiling /tmp/i4Wy0_8Jsz␤Variabl…»
17:03 bioduds that TCP?
17:17 BenGoldberg joined #perl6
17:34 zengargoyle openurl 7
17:34 zengargoyle openurl 8
17:35 zengargoyle doh!
17:35 ChoHag joined #perl6
17:38 Geth ¦ doc: 14b4816cee | (Jan-Olof Hendig)++ | doc/Type/Supply.pod6
17:38 Geth ¦ doc: Added a few code examples
17:38 Geth ¦ doc: review: https://github.com/perl6/doc/commit/14b4816cee
17:40 zengargoyle if you're listening to a socket on TCP, you are just getting the data that is sent over the connection.
17:41 zengargoyle eh, not sure what your asking... :)
17:44 domidumont joined #perl6
17:44 geekosaur bioduds, it's your stream in bytes, which starts as ASCII "GET / HTTP/1.1\r\n"
17:45 mr-foobar joined #perl6
17:45 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
17:45 bioduds lol
17:46 bioduds great, man. That is exactly what I need to create the communication protocol
17:46 bioduds but I still don't know how to respond to the caller
17:46 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.
17:46 bioduds why not?
17:47 bioduds why it is naive?
17:47 bioduds because of interceptions?
17:47 zengargoyle most net protocols are not utf-8
17:47 geekosaur k, so the other thing I said went flying overhead.
17:47 geekosaur [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
17:47 zengargoyle most are from the days of 8bit ascii
17:47 bioduds don't worry, be blunt tome
17:48 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? ;-)
17:48 bioduds how so? make it hard to read and write?
17:49 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
17:49 zengargoyle rindolf: i hope not, then you would have to kill me.
17:49 bioduds I don't need to talk "robot" when I can talk "human" since coding after the first bytes is my choice. That it?
17:50 bioduds "robot" being ASCII
17:51 rindolf zengargoyle: heh
17:51 geekosaur I'm guiessing you are used to frameworks which do the thinking for you
17:51 zengargoyle imagine that Buf is a reply:  it might be "200 OK" + "Content-Type: foo" + Content-Length: 50" + foo-data
17:52 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.
17:52 bioduds though I plan on doing it the Perl6 way
17:52 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 geekosaur the first two tell you how to decode the next chunk and the third tells you how long the chunk is
17:53 bioduds I got what you are saying now geekosaur
17:53 geekosaur you may also have to parse out more headers indicating if the stream is to be kept open for another chunk
17:54 zengargoyle which is why you usually don't do this yoursef. :P
17:54 geekosaur ^
17:54 zengargoyle bioduds: have you ever read any RFC's
17:55 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....
17:56 bioduds I learned to program in 2005 in Perl5
17:56 bioduds :D
17:56 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.
17:57 bioduds I can use Async for that, right?
17:57 bioduds instead of having to fork
17:57 bioduds also because of that article you sent me
17:58 bioduds 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.
17:58 bioduds also, this is node to node com, there may be no problem having linear process, I'll check on that
17:59 bioduds come do this with me then zengargoyle
18:00 bioduds 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.
18:01 zengargoyle 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
18:02 bioduds here's the github https://github.com/bioduds/escrowchain
18:02 zengargoyle 200 OK\nContent-Type: image/png\nContent-Length: 400"\n\n(400 bytes of PNG data)
18:02 bioduds missing a lot still
18:03 bioduds let me see how bitcoin does it
18:03 bioduds hang on
18:03 bioduds 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.
18:04 bioduds 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:05 bioduds So, it is TCP basics, right?
18:05 zengargoyle https://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.
18:05 bioduds or at least it seems
18:05 bioduds checking
18:07 zengargoyle i usually just google 'rfc tcp' or 'rfc http' and get close enough.
18:08 zengargoyle 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:09 PerlJam joined #perl6
18:09 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:10 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:12 zengargoyle lol, i almost brought up asn.1 as an example. :)
18:13 bioduds yes, thus the socket
18:13 bioduds lol, I think it is plain text only
18:14 uberbaud joined #perl6
18:14 bioduds it is a simple talk between nodes
18:14 bioduds saying hey, my version is this what is yours?
18:14 bioduds mine is this
18:14 bioduds ok, we can talk
18:14 bioduds send me your last block
18:14 bioduds here
18:15 bioduds ok, let's sync....
18:15 bioduds mostly is this that is happening
18:15 ChoHag joined #perl6
18:15 ugexe thats most every plain text tcp protocol, but notably ftp. lots of things you can learn from
18:16 zakharyas joined #perl6
18:16 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 mr-foobar joined #perl6
18:17 bioduds correct
18:17 bioduds no images and stuff being passed around
18:18 bioduds big chunks of data correspond to hashes corresponding for blocks of transactions
18:18 zengargoyle does p6 have the $line = <$socket> sort of thing:
18:18 bioduds being synchronized
18:19 ugexe yes its just STOMP with a merkle graph
18:19 bioduds correct ugexe
18:19 zengargoyle by syncronide do you mean talking to a single host at a time?
18:19 bioduds actually one of the beautys of it
18:19 bioduds actually 8 connections
18:20 bioduds max
18:20 bioduds every full node connects to other 8 max
18:22 nadim joined #perl6
18:23 skids joined #perl6
18:25 ugexe you can sync INET sockets now too
18:25 ugexe not in 2017.05 but in HEAD/nom you can
18:26 |oLa|1 joined #perl6
18:27 |oLa|1 joined #perl6
18:27 |oLa|1 left #perl6
18:28 ugexe which is what i think you were referring to when you said joining threads with INET
18:28 travis-ci joined #perl6
18:28 travis-ci Doc build errored. Jan-Olof Hendig 'Added a few code examples'
18:28 travis-ci https://travis-ci.org/perl6/doc/builds/241777607 https://github.com/perl6/doc/compare/23e55ac12ac0...14b4816cee0f
18:28 travis-ci left #perl6
18:39 |oLa| joined #perl6
18:42 mr-fooba_ joined #perl6
18:55 Skarsnik joined #perl6
18:55 uberbaud joined #perl6
19:08 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:09 TEttinger joined #perl6
19:10 espadrine joined #perl6
19:10 timotimo try something like nload perhaps
19:11 zengargoyle yeah, not really that importan or i'd break out wireshark or something. :P  just wondering about the mechanics of 'update'.
19:14 zengargoyle i end up doing `zef list > zef.list` and grepping because ATM it's painful to wait so long.
19:19 bioduds sorry, I had to leave shortly
19:19 bioduds let me read your advices
19:19 bioduds "you can sync INET sockets now too" you mean that problem that was preventing threads from being joined?
19:20 AlexDaniel joined #perl6
19:20 bioduds HEAD/nom?
19:21 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
19:21 bioduds yes
19:21 zengargoyle HEAD/nom is just the latest and greatest if you're using rakudobrew or such.
19:21 bioduds we're on the same page
19:21 bioduds oh, tx
19:22 zengargoyle or building from src vs downloading a rakudo dated release or distribution package manager and yeah, that.
19:24 * zengargoyle forgets why they changed 'master' to 'nom' as the main development branch in git. :)
19:24 zengargoyle it's probably punny....
19:25 geekosaur no, just historical artifact
19:25 geekosaur 'new object model'
19:26 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
19:27 geekosaur 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 BenGoldberg Naming anything "new" is almost never a good idea :P
19:28 geekosaur there's another project I work with that had a newnewnewnewnew... until they started cleaning up old branches
19:29 zengargoyle One of the miseries of life is that everybody names things a little bit wrong. —- Richard P. Feynman
19:31 geekosaur "there are only two hard problems in computing..."
19:31 * zengargoyle 's personal daemon
19:31 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"
19:31 BenGoldberg None of this "new" or "old" nonsense in my filenames.
19:32 * geekosaur is gradualkly moving to using vc for even small projects
19:32 BenGoldberg I ought to, but I'm lazy :P
19:33 * zengargoyle has a soft spot for RCS because it's single-file oriented.
19:34 zengargoyle none of this 'project' and 'directory' nonsense.
19:34 domidumont joined #perl6
19:34 AlexDaniel du… du hast…
19:35 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
19:35 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 zengargoyle plus, RCS has locking.
19:35 * AlexDaniel opens the window
19:36 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. :)
19:38 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.
19:38 geekosaur yeh, the configuration repo at $work[*-2] was like that
19:39 zengargoyle and locking the file before working on the switch kept people from stomping on each other.
19:39 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.
19:40 zengargoyle yeah, i put things in a private git just for the grep and blame and etc. magic.
19:41 jercos geekosaur: splitting a repo sounds like a job for git filter-branch with --index-filter
19:43 zengargoyle that's like extracting a transporter accident clone....  you can't really change the original withoout repercussions.
19:44 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.
19:45 geekosaur in the situation I suggested, you would not be sharing the initial repo, it's a private seed.
19:45 geekosaur anything to be shared must be split out first
19:47 zengargoyle yeah, as th only 'programmer' in my group in last job ... anything goes because nobody else even knows how to look. :)
19:48 geekosaur also you don't necessarily need to revert the history in the original repo, just clone it into a new one
19:49 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 zengargoyle yeah.
19:50 zengargoyle just a newer commit with fewer files.
19:55 * zengargoyle lol, Captain Picard drinking champagne from a sweaty shoe of a F1 winning driver.
19:56 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 ugexe that + people always want the latest version
19:57 ugexe you cant tell if something in the cache is the latest version
19:57 zengargoyle what's the update interval?
19:57 ugexe when you run it
19:57 zengargoyle oh. :)
19:58 zengargoyle i had a feeling is was my slow network.
19:58 zengargoyle picking your brains more... what about panda and Build.pm?
19:59 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.
19:59 ugexe i can almost guarentee it doesnt need panda
19:59 zengargoyle is there some way to remove that panda dependency?
19:59 ugexe look at various Build.pm in the ecosystem
20:01 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
20:01 zengargoyle but has 'class Build' ...
20:01 ugexe class Build { method build($workdir) { ... } }
20:01 zengargoyle yep.  'class Builc is Panda::Builder'
20:02 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
20:02 ugexe i.e. even Panda doesnt need it
20:02 zengargoyle cool, thanks much.
20:04 ugexe btw if you want you can enforce cache only search via `zef --/p6c --/cpan install ...`
20:05 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:06 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
20:07 ugexe no, butmostly because i havnet thought of how to generialize that feature so it works for the various repos
20:08 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
20:09 ugexe 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:10 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 yqt joined #perl6
20:10 * zengargoyle thinks will work better once things are CPAN'd
20:11 ugexe the other slow thing is loading the 800+ module ecosystem json file
20:11 ugexe from-json'ing it rather
20:12 ugexe the cache would exist even if zef did not use it as a source of modules
20:12 ugexe it also acts as zefs work dir (instead of .panda dir in cwd)
20:13 cono joined #perl6
20:14 cono is there anything likep 5's  "use locale" in p6?
20:14 cono 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("апХчиЕмаЁ")'
20:15 cono 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 #perl6
20:16 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?]]
20:16 yoleaux 9 Jun 2017 10:10Z <eveo> mscha: It now does. RE: https://irclog.perlgeek.de/perl6/2017-05-02#i_14518610
20:16 camelia rakudo-moar 52d395: OUTPUT: «[[1 2 3]]␤»
20:17 * 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?
20:18 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 rakudo-moar 52d395: OUTPUT: «[1, 2, 3]␤»
20:18 cono you are not flattening array
20:18 moritz that's how you prevent it
20:18 moritz but no it comes from? dunno :/
20:19 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 rakudo-moar 52d395: OUTPUT: «[1, 2, 3]␤»
20:19 cono m: sub foo { my $a = 42; my @b = 1,2,3; return $a, |@b; }; my ($y, @y) = foo; say @y.perl
20:19 camelia rakudo-moar 52d395: OUTPUT: «[1, 2, 3]␤»
20:19 cono TMTOWTDI :D
20:20 mscha Ah, I get it: @y gets the rest of the items in (42, [1,2,3]), i.e. ([1,2,3]).
20:21 mscha Thanks.
20:21 mscha m: sub foo { my $a = 42; my @b = 1,2,3; return $a, @b; }; my ($x, $y) = foo; say $y;  # This works too
20:21 camelia rakudo-moar 52d395: OUTPUT: «[1 2 3]␤»
20:21 zengargoyle um, doesn't foo return two thins and you get two things?
20:23 zengargoyle /thins/things/
20:23 moritz m: my @a = [1, 2, 3]; say @a
20:23 camelia rakudo-moar 52d395: OUTPUT: «[1 2 3]␤»
20:23 moritz the ways of the array are mysterious :(
20:24 zengargoyle heh
20:25 moritz .oO( what's "the way of the array" in Japanese? )
20:29 zengargoyle 配列道
20:30 zengargoyle 配列 [はいれつ] /array (e.g. in programming languages)/
20:31 BenGoldberg The strange seeming result is because the GLR affected return values from functions as well as things passed to functions.
20:33 BenGoldberg 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.
20:33 zengargoyle hairetsudou
20:33 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.
20:36 BenGoldberg Here's an explantion which describes it in terms of what is passed to a function: <https://docs.perl6.org/type/Signature#Single_Argument_Rule_Slurpy>, 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
20:43 moritz zengargoyle: fascinating, thanks
20:43 moritz time to get some sleep here :/
20:44 zengargoyle 配列道 is horribly (配 {distribute} {spouse} {exile} {rationing}), (列 {file} {row} {rank} {tier} {column}), (道 {road-way} {street} {district} {journey} {course} {moral} {teachings})
20:44 zengargoyle the way of distributing colums? :)
20:46 * zengargoyle does Japanese about like p6, not native, just haphazard investigations.
20:46 * zengargoyle over many many years.
20:59 MasterDuke cono: btw, you might want .fc instead of .lc
21:13 Geth ¦ doc: 557d5e49ae | (Jan-Olof Hendig)++ | doc/Type/Supply.pod6
21:13 Geth ¦ doc: Updated a few method signatures
21:13 Geth ¦ doc: review: https://github.com/perl6/doc/commit/557d5e49ae
21:22 Geth ¦ doc: bc2470c8e6 | (Jan-Olof Hendig)++ | doc/Type/Signature.pod6
21:22 Geth ¦ doc: Fixed erroneous example output and formatting
21:22 Geth ¦ doc: review: https://github.com/perl6/doc/commit/bc2470c8e6
21:26 Cabanossi joined #perl6
21:29 TEttinger areido
21:31 Geth Swapped META.info → META6.json in 1 dists in https://github.com/perl6/ecosystem/commit/867b3cdd84
21:53 travis-ci joined #perl6
21:53 travis-ci Doc build passed. Jan-Olof Hendig 'Updated a few method signatures'
21:53 travis-ci https://travis-ci.org/perl6/doc/builds/241821035 https://github.com/perl6/doc/compare/14b4816cee0f...557d5e49ae99
21:53 travis-ci left #perl6
22:11 raschipi joined #perl6
22:11 Cabanossi joined #perl6
22:12 travis-ci joined #perl6
22:12 travis-ci Doc build errored. Jan-Olof Hendig 'Fixed erroneous example output and formatting'
22:12 travis-ci https://travis-ci.org/perl6/doc/builds/241822859 https://github.com/perl6/doc/compare/557d5e49ae99...bc2470c8e69e
22:12 travis-ci left #perl6
22:20 raiph joined #perl6
23:08 BenGoldberg joined #perl6
23:09 zacts joined #perl6
23:41 Cabanossi joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo