»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:07 Cabanossi left 00:08 Cabanossi joined
jeromelanteri unless $!directory.IO.d [ mkdir $!directory or die "blabla"; } 00:12
what's wrong ?
error said: cannot look up attributes in a datas type object. ok... i not understand. 00:13
geekosaur sounds like you have an undefined instead of an object with a $!directory 00:14
("type object" is a typed "undef")
jeromelanteri strange, because i do class datas { has Str $.directory = %*ENC<HOME> ~ "/.vim/installer"; 00:16
timotimo do you also .new?
jeromelanteri so $.directory is declared has string
method.new(Str $filename) [... } yes
timotimo do you also call method new and use the result of that to call the method that has the $!directory in it? 00:17
jeromelanteri i'm going for paste my dirty code
timotimo, no, it is inside the class... a method call an other one
in the constructir, i use method (then i want to make private) for initialize things) 00:18
constructor
timotimo if by constructor you mean method new, then there's your problem
inside method new there is not yet a "self"
jeromelanteri yes, method new
timotimo that gets made with self.bless
jeromelanteri i do
timotimo as in, self.bless returns an instance of the class 00:21
jeromelanteri timotimo, so i need to bless ALL the class variables ?
timotimo er, huh?
can you show your code? 00:23
jeromelanteri i do it now, then message change... id o declare @.datas; then bless :@datas but he is not happy... he said that @datas is not declared, he ask if i want to said datas or @!datas
geekosaur jeromelanteri, actually one normally uses the default "new" and defines BUILDALL and/or TWEAK as needed. docs.perl6.org/language/classtut
and it sounds like you never create an *object*, you just work within the class definition
and think that is somehow an object of the class 00:24
er right, BUILD not BUILDALL
jeromelanteri geekosaur, i created one, but actually the class doesn't compil.
i'm not working on instance, but on method 00:25
timotimo in perl6, you can call methods on instances as well as the type itself
jeromelanteri gist.github.com/jerome-diver/a00c8...636d79dc37 00:26
timotimo well, yeah, you're passing $filename, @datas, $directory, $repo_dir, and $full_filename to bless
but out of those only $filename is defined
jeromelanteri timotimo, yes i understand, but is not what i mean... my nglish is poor.
timotimo when you don't assign the result of bless to a value or return it directly, the object gets lost & destroyed 00:27
jeromelanteri timotimo, ???
timotimo self.bless returns the instance
you're not doing anything with the instance in your method new 00:28
jeromelanteri yes
timotimo, it is an obligation to do thngs with them in new ?
timotimo, ok, i think i missunderstood this part. How to create a private instance variable ? 00:29
geekosaur the problem is that you assume that on entry to method new, "self" is a thing already 00:30
and you just invoke the bless method on it "for some reason"
jeromelanteri geekosaur, timotimo actually, when you read my little code, do you understand what 'im trying to do ? 00:31
geekosaur self .= bless( ... )
jeromelanteri i missunderstand the logic.
geekosaur self is *undefined* on entry 00:32
but the bless method is valid on that undefined, and produces an actual instance
jeromelanteri geekosaur, ho well. i just understand now what you tell me.
timotimo i don't think self can be written to by default
geekosaur hm, possible, then you'd need an undef var for that
my datas $inst .= bless( ... ); ...; return $inst; 00:33
doing things by defining "new" is doing them the hard way
take a look at the page I linked earlier
docs.perl6.org/language/classtut 00:34
jeromelanteri geekosaur, i don't know, i used to do things like that with C++: declare a structure of class, etc.. define my constructor(s), then inside my constructor, do initialize things... then create my other methods, privates or public as i need. 00:35
timotimo right, it works differently in c++
you must know that "method new" isn't special at all
jeromelanteri geekosaur, i looked that, but i need to initialmize things when new instance is created.
geekosaur C++ is not perl 6. most systems based around a meta-object protocol let you define a method new and do things all yourself, which means you also have to deal with any superclasses etc.
timotimo the only thing that makes methods a constructor is because you use "self.bless" inside
geekosaur but also provide convenience methods from the MOP that let you ignore the grotty details 00:36
timotimo anyway, i'm going to bed
geekosaur and it's preferred to use those and not have to worry what's going on underneath
C++ doesn't have a way to avoid the internals, you're forced to deal directly
(except... it also does a number of things for you --- and you lose if you need them to be done differently) 00:37
jeromelanteri then imagine my class datas is a container of repos list with a title and sorted by group, then saved inside a yaml file. Now when i create a new data, i need to check that directory contain file yaml exist (and create it if not), then creat ethe yaml file with gorup "default" inside, ...
timotimo, good night 00:38
00:38 Cabanossi left, Cabanossi joined
timotimo huh wtf the classtut doesn't mention TWEAK at all 00:39
geekosaur right, the point is you don't normally do that in new, that;s where the MOP machinery lives. most of what you would do in new() in C++, you'd do in submethod BUILD instead; the MOP's new will invoke that at the right point
jeromelanteri geekosaur, yes but how to just call actions for do initialize things when an instance is created then ?
timotimo github.com/perl6/doc/issues/1393
implement the TWEAK submethod
jeromelanteri submethod BUILD
timotimo BUILD will disable any defaults you have written next to your attributes
i.e. "has $.foo = 1234" will not assign 1234 any more 00:40
geekosaur but since TWEAK isn't there... :/
timotimo use TWEAK instead, it will let you keep the default values
jeromelanteri geekosaur, and declare in the same time i define my instance variable is maybe something wrong to ?
timotimo, ok
geekosaur jeromelanteri, the main difference from your point of view is that if you use new, you have to create the instance /ex nihilo/ including any superclasses, etc. 00:41
jeromelanteri i understand it should be easier to not define method new and use BUILD for call functions initializers
geekosaur if you use BUILD or TWEAK then you get a properly built but uninitialized object, and you do whatever. this is what C++ calls "new" 00:42
jeromelanteri ok
geekosaur (with some caveats because C++ rubs your nose in some internal details if you have superclasses...)
jeromelanteri yes
in fact i like perl6 when he has some similarity with C++
geekosaur, and also here (who is an official page for learn perl6) they directly teach to create constructor (what ever name new or other, this i understand well) docs.perl6.org/language/classtut 00:44
geekosaur there's lots of different ways one can do objects. C++ is kinda different from pretty much every other OOP setup, mostly because it's (a) ancient (b) didn't use the main existing OOP setup from that time, which is Smalltalk's OO. perl 6 is based around newer meta-object protocol setups, so it's a bit different also
jeromelanteri geekosaur, yes, it also totaly new for me. 00:45
geekosaur java does still different things. perl 5 and python native objects are both rather ad hoc and in many ways resemble C++ more than anything else
(although much modern perl 5 OO is based on the same MOP design that perl 6 is, via Moose)
jeromelanteri yes, in much more simple and far to be so precise than C++. But i see with perl6 we can be precise. 00:46
this new concept of contruction make me confuse, i need to let place for new concept in my little head... 00:47
zengargoyle heh, YAML.load is not yet implemented 00:48
geekosaur docs.perl6.org/language/objects#Ob...nstruction is a bit more detail about what is going on and how it fits together
jeromelanteri actually, on this point of curve learning, i feel this more complicate to undersatnd the logic than for learn haskell (just because of this constructor things mecanism). I really need to understand the constuctor mecanism for do precisely what i want to do.
zengargoyle, no, but i will use other module than this one (no have time do do... i'm stick on learn how to make a nice class object) 00:49
BenGoldberg If you wanted to write C++ code which behaved a little bit more like the majority of other OOP languages, you'd have to add "virtual" practically everywhere :) 00:50
jeromelanteri geekosaur, ha yes, i didn't read this part... i think it need to be on first of this tuto.
zengargoyle jeromelanteri: gist.github.com/20e1bcf9e8cb41a56e...b462701ca9
jeromelanteri ok, i think i should read this doc totaly first to do any thing more.
zengargoyle datas.new('myfile') -- datas.new(filename => "myfile", datas => Array[Array].new(), directory => "/home/zen/.vim/installer", repo_dir => "/home/zen/.vim/bundle", full_filename => "/home/zen/.vim/installermyfile") 00:51
jeromelanteri zengargoyle, ho thank you. i have to read the doc better. i absolutly want to understand this constructor and TWEK and BUILD story time...
thank you 00:52
zengargoyle jeromelanteri: i think... new is for when you don't want named parameters, BUILD is when you want to use different names when calling .new than you want to use inside of class, TWEAK is for when you need to do work after creation but before returning the object. 00:54
geekosaur the default BUILD is what handles setting default values, so if you have them you want to use TWEAK instead. 00:55
zengargoyle good to know. 00:56
jeromelanteri zengargoyle, ok, i keep it in mind. But my way to thinking is that if you really well understand what's happen, then you can act in full power and really do what you thinking (keep control). But if you do things because this one works one time you do it all the time... then sometimes, you go near something who should be better an other way. 00:57
zengargoyle is still mostly guessing from using Moo.
jeromelanteri geekosaur, ok, then new for bless variable and use them directly without invocation of hash key 00:58
BUILD for define default instance variable
and TWEK for send initializers things.
TWEAK
then in my code, it should also be better to put self.directory= $*ENV<HOM> 01:00
inside BUILD
geekosaur except you usually take the default one insted of defining yourself. if you really need to modify things at a low level, you can replace new, BUILDALL, BUILD, TWEAK --- from lowest level "do it all yourself by hand" to highest level "just make these changes to the default behavior" 01:01
zengargoyle jeromelanteri: the benefit of doing it the common way is that other things keep working. like inheritance and subclasses. so certain things happen in certain places and other people can subclass your class without fear.
jeromelanteri ok 01:03
i also miss the point on something: when i define class variables, i do has Type @.name is readonly; but when i call it i do @!name why "!" ? 01:05
geekosaur you _can_ change hpw they work. generally you shouldn't; it makes life harder for anyone else using your class. but sometimes it is justified, therefore it is possible
01:06 nadim left
geekosaur you should probably read docs.perl6.org/language/classtut as it goes through this 01:06
01:06 Actualeyes joined
jeromelanteri geekosaur, ok, but what is the signification of "!" in this particular situation ? 01:06
geekosaur when you define an attribute "has $.foo", it defines the actual attribute $!foo and an accessor method foo
the ! is a warning that the thing in question is private/internal 01:07
jeromelanteri ok, understand
geekosaur the accessor is by default read-write, so self.foo = whatever; works.
jeromelanteri geekosaur, but this ! private is for define time: has Str $!string; 01:08
geekosaur you can also have private methods as well as private attributes; you again use ! instead of . to invoke them (so, sometimes you will see e.g. self!foo)
zengargoyle $.foo creates ro access ($obj.foo()) $.foo is rw creates rw access ($obj.foo(), $obj.foo($newval)), $!foo makes no outside access.
jeromelanteri yes i read that to. then there is no way on my !method blah() {
my method !blah() { 01:09
method !blah {
"my" serve something ?
zengargoyle hrm... can you even have a my method? 01:10
geekosaur method !foo
jeromelanteri what the difference with my method foo and my method !foo ? 01:11
geekosaur I don't think so, that's in effect 'submethod'
zengargoyle *nods*
01:12 lookatme joined
geekosaur jeromelanteri, that makes a private method which you invoke with self!foo instead of self.foo; it can only be called within the class, or in classes that are marked as trusted 01:12
jeromelanteri maybe there is a clear way for just have a "private" and "protected" container for methods ?
lookatme morning
jeromelanteri and what do "my" ? lookatme, hello
the idea to be private... is to not be call by outside. 01:13
geekosaur class A { trusts B; method !priv { ... } }; class B { method pub { self!B::priv(); } }
er
class A { trusts B; method !priv { ... } }; class B { method pub { self!A::priv(); } }
lookatme my is lexical scope
geekosaur yes, but perl has always treated "private" as meaning "you need to try a bit harder"
jeromelanteri and the idea to be protected, is to be able to be call by an herited function in level 1 and stay private from outside. 01:14
geekosaur if you've ever read the Taltos books by Steve Brust, it's like locks in a Jhereg building :)
jeromelanteri so, what is protected for perl6 ?
lookatme, ok, and what lexical scope add more for a private method ? 01:15
zengargoyle my does not exist outside of containing { } (or file if not inside a { }) and only from the line it is defined onward (not before).
geekosaur: i'm like 3 books behind... :) 01:16
jeromelanteri geekosaur, ok. I'm sorry to push questions so far, it should be stupid for you to read kind of newbie perl6 user questions tag, but i really want to well understand precisely all what i can do or not.
geekosaur zengargoyle, the locks thing is from the first book
zengargoyle which was like 80's when i was in high school....
geekosaur something like "locks are meaningless in here as a way to keep people out, but an effective way to say "private""
jeromelanteri is there any ebooks from him ?
colomon probably hasn’t read Jhereg in a decade or two. 01:17
jeromelanteri and is there any books for design pattern on perl6 ?
geekosaur still a bit too new for there to be books available although several are in the process of being written as I understand it
jeromelanteri ok 01:18
well.. i'm going to learn from your two first links, thank you again.
geekosaur you really do want to sit down and study the OO tutorial and the object creation detail, it'll make things a lot clearer once you've had time to understand them 01:19
01:19 mingdao left 01:21 mingdao joined
zengargoyle jeromelanteri: reat the docs class tutorial page..... and then read design.perl6.org/S12.html 01:22
the design documents are way out of date, and may be wrong with what actually works. but they give a better view of what is intended to work. (this is probably bad advice, but i think you might pick up more details). 01:24
geekosaur they're missing things like TWEAK though. which is why I went with the object creation page, which is reasonably up to date 01:25
zengargoyle yeah, i just find the synopses to be more actually wordy with better descriptions than most of the docs pages. 01:26
and slightly better writing on the whole.
oh, jeromelanteri: the Taltos thing is a set of fantasy novels that have no relation to perl (but are pretty good :) ). 01:28
jeromelanteri oh... an other one thing... is there any kind of event listner in perl6 ? or a way to use instance variable that do things when change they change state (for exemple, if i change the filename of this instance, then the class of this instance should be able to automatically react and change the full filename, then maybe import/export things... 01:30
zengargoyle, ok
zengargoyle Brust and Banks are pretty much my goto enjoyable reading material.. :P
geekosaur I think we prefer Supplies for event based stuff, but if you need to do the low level watch-a-variable there are Proxies 01:32
jeromelanteri never mind, i have to read doc first.
zengargoyle jeromelanteri: lots of event stuff. jnth gave a talk recently (it is in the perl6 weekly post a few weeks ago). and things like Gtk::Simple for UI eventy like example.
jeromelanteri geekosaur, yes. I thank also something like Qt-5 does. 01:33
it is very powerfull
zengargoyle and file notification eventy things...
it's there, but i don't know it that well yet either... :) 01:34
jeromelanteri events should be able to handle all
zengargoyle jeromelanteri: www.youtube.com/watch?v=VqhLWgvIbz0 01:38
jnthn.net/papers/2017-perl6-concurrency-pcp.pdf -- slides 01:39
lookatme I think that video is private? (or something, I forgot it), maybe can not direct access ? 01:40
s/direct/directly/
01:46 ilbot3 left 01:51 ilbot3 joined, ChanServ sets mode: +v ilbot3 01:52 Cabanossi left 01:53 lookatme left 01:54 lookatme_ joined, Cabanossi joined 02:02 skids joined 02:04 noganex_ joined 02:06 noganex left 02:14 cdg joined 02:25 cdg left
jdv79 m: react whenever (^10).kv.Supply -> $i, $v { } 02:34
camelia Tried to get the result of a broken Promise
in block <unit> at <tmp> line 1

Original exception:
Too few positionals passed; expected 2 arguments but got 1
in block <unit> at <tmp> line 1
jdv79 i don't get the error there
02:36 Cabanossi left 02:38 Cabanossi joined 02:44 Sgeo left
jeromelanteri gist.github.com/jerome-diver/56971...a1ea8a86dc 02:47
then how to call function "group" from a module ? i do add::group($yaml) 02:48
it failed
i also add use add;
lookatme_ jdv79, right side, the parameters may be not correct
jeromelanteri i read this doc: docs.perl6.org/language/modules
but stay confuse
lookatme_ m: react whenever (^10).kv.Supply -> $i { say $i; }
camelia 0
0
1
1
2
2
3
3
4
4
5
5
6
6
7
7
8
8
9
9
02:50 Sgeo joined 02:52 alpha6 left, alpha6 joined
lookatme_ m: react whenever (^10).kv.Supply -> $i { say $i.WHAT; } 02:52
camelia (Int)
(Int)
(Int)
(Int)
(Int)
(Int)
(Int)
(Int)
(Int)
(Int)
(Int)
(Int)
(Int)
(Int)
(Int)
(Int)
(Int)
(Int)
(Int)
(Int)
02:52 mr-foobar joined
lookatme_ m: react whenever (^10).pair.Supply -> $i { say $i.WHAT; } 02:57
camelia Tried to get the result of a broken Promise
in block <unit> at <tmp> line 1

Original exception:
No such method 'pair' for invocant of type 'Range'. Did you mean any of these?
pairs
pairup
path
tail…
lookatme_ m: react whenever (^10).pairs.Supply -> $i { say $i.WHAT; }
camelia (Pair)
(Pair)
(Pair)
(Pair)
(Pair)
(Pair)
(Pair)
(Pair)
(Pair)
(Pair)
lookatme_ jdv79, I think you mean this ? ^^
jeromelanteri if i construct a sub EXPORT { '&group' => group(); } it failed because of signature for $yaml... and if i add $yaml inside group($yaml) then sure... perl6 is not happy because it said $yaml is not declared... but it is not something to declare... it is an argument to pass to sub group($yaml)... 02:58
i not understand and i nt see ant example for show this surrent situation.
curent
lookatme_ How do you use that module ? 03:01
It should be `use MyModule :MANDATORY;` 03:02
03:02 gdonald left 03:04 dugword joined 03:05 Aaronepower left
jeromelanteri lookatme_, i tryed this... same result. 03:06
and i read that :MANDATORY if for default, it should be load all the time.
lookatme_ m: module A { sub s() is export(:ax) { } }; import A :ax; say &s 03:08
camelia sub s () { #`(Sub|54552064) ... }
lookatme_ m: module A { sub s() is export(:ax) { } }; import A; say &s
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
s used at line 1
lookatme_ seems like no problem
jeromelanteri, ^^
jeromelanteri lookatme_, gist.github.com/jerome-diver/56971...a1ea8a86dc 03:09
same... error, same error.
sub pants is export(:MANDATORY) { ... } # objects with tag ':MANDATORY' are always exported 03:10
copied from there: docs.perl6.org/language/modules
m: unit module a { sub said($x) is export(:MANDATORY) { say 'hello $x';} use a; a::said("try"); 03:13
camelia 5===SORRY!5=== Error while compiling <tmp>
Cannot use 'unit' with block form of module declaration
at <tmp>:1
------> 3unit module a7⏏5 { sub said($x) is export(:MANDATORY) {
expecting any of:
generic role
jeromelanteri m: unit module a { sub said($x) is export(:MANDATORY) { say 'hello $x';} import a; a::said("try"); 03:14
camelia 5===SORRY!5=== Error while compiling <tmp>
Cannot use 'unit' with block form of module declaration
at <tmp>:1
------> 3unit module a7⏏5 { sub said($x) is export(:MANDATORY) {
expecting any of:
generic role
03:14 gdonald joined
jeromelanteri m: unit module a { sub said($x) is export(:MANDATORY) { say 'hello $x';} import a; a::&said("try"); 03:15
camelia 5===SORRY!5=== Error while compiling <tmp>
Cannot use 'unit' with block form of module declaration
at <tmp>:1
------> 3unit module a7⏏5 { sub said($x) is export(:MANDATORY) {
expecting any of:
generic role
jeromelanteri m: unit module a { sub said($x) is export { say 'hello $x';} import a; a::&said("try");
camelia 5===SORRY!5=== Error while compiling <tmp>
Cannot use 'unit' with block form of module declaration
at <tmp>:1
------> 3unit module a7⏏5 { sub said($x) is export { say 'hello $
expecting any of:
generic role
jeromelanteri m: module a { sub said($x) is export { say 'hello $x';} import a; a::&said("try");
camelia 5===SORRY!5=== Error while compiling <tmp>
Strange text after block (missing semicolon or comma?)
at <tmp>:1
------> 3ub said($x) is export { say 'hello $x';}7⏏5 import a; a::&said("try");
expecting any of:
infix
lookatme_ m: module a { sub said($x) is export { say 'hello $x';} }; import a; a::&said("try"); 03:16
camelia 5===SORRY!5=== Error while compiling <tmp>
Malformed lookup of ::&said; please use ::('&said'), ::{'&said'}, or ::<&said>
at <tmp>:1
------> 3xport { say 'hello $x';} }; import a; a7⏏5::&said("try");
lookatme_ m: module a { sub said($x) is export { say 'hello $x';} }; import a; &said("try");
camelia hello $x
lookatme_ m: module a { sub said($x) is export(:MANDATORY) { say 'hello $x';} }; import a; &said("try");
camelia hello $x
jeromelanteri lookatme_, ho... my module declaratiion should be inside {} ? 03:17
i not see what's wrong in my code... 03:18
lookatme_ I will try later
your code
jeromelanteri examples from doc doesn't put module declaration inside {}
lookatme_, ok, thank you
lookatme_ jeromelanteri, What is that `datas` ? 03:23
jeromelanteri lookatme_, datas.pm6 is a file container for class "datas". 03:25
also, if i call &group($yaml), it works
but add::group($yaml) not
if i want to keep first name module at call time, how can i do ?
lookatme_ Oh, I know what you mean
m: module a { sub said($x) is export(:MANDATORY) { say 'hello $x';} }; import a; say &a::("said"); 03:26
camelia No such symbol '&said'
in block <unit> at <tmp> line 1
lookatme_ m: module a { sub said($x) is export(:MANDATORY) { say 'hello $x';} }; import a; say a::("&said");
camelia 5===SORRY!5=== Error while compiling <tmp>
Combination of indirect name lookup and call not supported
at <tmp>:1
------> 3llo $x';} }; import a; say a::("&said")7⏏5;
expecting any of:
argument list
jeromelanteri it doesn't want i use syntax: add::group($x)
lookatme_ m: module a { sub said($x) is export(:MANDATORY) { say 'hello $x';} }; import a; say a::.keys;
camelia (EXPORT)
lookatme_ m: module a { sub said($x) is export(:MANDATORY) { say 'hello $x';} }; import a; say a::.keys.<EXPORT>; 03:27
camelia Type Seq does not support associative indexing.
in block <unit> at <tmp> line 1
lookatme_ m: module a { sub said($x) is export(:MANDATORY) { say 'hello $x';} }; import a; say a::.keys[0];
camelia EXPORT
jeromelanteri let me read and try to understand...
lookatme_ IDK
jeromelanteri what is IDK ? 03:29
m: IDK
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
IDK used at line 1
lookatme_ I think that `import` import the symbol to current scope 03:30
m: module a { sub a::said($x) is export(:MANDATORY) { say 'hello $x';} }; import a; say &a::said; 03:31
camelia (Any)
jeromelanteri and then i need to use import ? in my main .pl6 code i have to import <group repos>; ?
lookatme_ IDK = I don't know
jeromelanteri :)
i really would like to use the name of the module for the clearance of my code... (IDK if word "clearance" is english and has sens) 03:32
lookatme_ m: module a { sub a::said($x) is export(:MANDATORY) { say 'hello $x';} }; import a; say &("a::said");
camelia a::said
lookatme_ This way works
fine
jeromelanteri lookatme_, yes, but in the syntax, it is very dirty. 03:35
there is no other way ?
lookatme_ m: module a { sub said($x) is export(:MANDATORY) { say 'hello $x';} }; import a; say a.say;
camelia (a)
True
lookatme_ m: module a { sub said($x) is export(:MANDATORY) { say 'hello $x';} }; import a; say a.said; 03:36
camelia No such method 'said' for invocant of type 'a'
in block <unit> at <tmp> line 1
jeromelanteri and also, there is two times add... the module name, and the named function...
lookatme_ yeah
03:36 Cabanossi left
jeromelanteri it can not be possible that we can not call the module name first then the function next... 03:37
03:37 Cabanossi joined
jeromelanteri imagine you hav many modules with same fucntion names ? it should have cross things problems... 03:37
lookatme_ I don't know one can do that 03:38
yeah
jeromelanteri ok, thank you anyway for tryed to help me. 03:41
03:41 zoll left 03:42 BenGoldberg left
lookatme_ m: class a { method said($x) { say "hello"; }; }; import a; say a.said("uuu"); 03:43
camelia hello
True
lookatme_ jeromelanteri,
I think this is another way to do that 03:44
you can replace `unit module` with `unit class`
and use a method instead of sub
jeromelanteri lookatme_, yes, but a class is not a module...
lookatme_ Not found other way. Maybe others know 03:45
jeromelanteri and a method is not a function.
lookatme_, yes, i go ahead for search
lookatme_ jeromelanteri, it's no difference, I think..
jeromelanteri lookatme_, there is, a class make more things and you can nherit an instance. 03:46
a class create an object in memory too...
and then a unik object is (i think) a wrong design pattern. 03:47
lookatme_ maybe perl5 also does this wat
y
jeromelanteri yes, perl5 do that well, i think perl6 know also to do things simple like that to. 03:48
i read the doc 5 times now... can not see any relevant things about that.
ugexe m: module Foo { our sub foo { 42 } }; say Foo::foo()
camelia 42
jeromelanteri ugexe, OMG !! thank you 03:49
ugexe, it works fine... 03:50
03:55 cpage_ joined 04:11 pharv joined 04:14 khw left
pharv are there any web app frameworks that are gaining momentum besides Bailador? 04:26
i'd like to start using one that is far enough along that i can create some basic apps, but also one that is well-designed that i can start contributing to 04:27
04:35 unop left 04:38 cuonglm joined
cuonglm Hi, is there any way to know which candidate is exported in multi sub? 04:41
pikab.in/1b5d51ff5a
If I marked one of multi subs is export, then the other is shown up when I call .candidates
04:42 khw joined
cuonglm as I understand now, is export causing the name installed in symbol table, without its signature 04:42
pikab.in/1b5d51ff5a 04:43
Sorry, here's the link: pikab.in/1a456b2231
lookatme_ jeromelanteri, declare with our works fine. But I found it can do export stuff like my does 04:47
s/can/can not/
04:50 Cabanossi left 04:52 Cabanossi joined 05:11 Aaronepower joined 05:13 khw left 05:24 frylock joined 05:32 frylock left 05:36 AlexDaniel left, AlexDaniel joined 05:39 coetry joined
coetry p6: 'hello friends'.say 05:40
camelia hello friends
05:47 wamba joined
coetry has anyone else had issues with p6doc on mac os? 05:51
I can't seem to find documentation for anything. I installed rakudo-star via brew
06:05 Cabanossi left 06:07 Cabanossi joined 06:09 skids left 06:15 dugword left
nine Could someone please add an answer to stackoverflow.com/questions/451993...n-location that removing ~/.perl6 is absolutely not necessary when having different rakudo versions in use and that any issues should be reported? 06:16
Well I guess, I can do that as a guest
06:17 domidumont joined 06:19 domidumont left 06:22 coetry_ joined 06:24 audiatorix left, coetry left
nine .tell raiph Please never ever suggest rakudobrew as a "fix" to users. It will harm more than help. When users talk about precomp issues, we need those reported and then fix them. 06:24
yoleaux nine: I'll pass your message to raiph.
nine pharv: none that I'm aware of. And no framework at all really takes advantage of Perl 6' features like concurrency or multiple dispatch :/ 06:26
06:32 lowbro joined, lowbro left, lowbro joined 06:42 skf joined
stmuk_ coetry_: There was an issue with p6doc in Star 2017.04 fixed in yesterday's release 06:43
coetry_: you can also fix it by upgrading doc with zef 06:44
skf Hi! When I update to Rakudo Star 2017.07 (Win64, binaries), do I first have to uninstall the old version? 06:45
moritz that would be more robust, yes 06:46
skf Thanks!
06:47 domidumont joined, ufobat joined
skf Do I have to reinstall all modules again with zef after upgrading? 06:47
06:48 nadim joined
lookatme_ skf, no need 06:49
06:49 domidumont left 06:50 domidumont joined 06:56 darutoko joined
pharv nine: ok, thanks... guess i'll just play around with the individual HTTP::Server components for now then 06:58
07:02 cuonglm left
skf Thanks again :-) 07:02
nine pharv: I'd love to see something that really fits with Perl 6 :) Something that would allow for easy parallelization within a request for example. And something that makes use of Perl 6' features like traits for easy dispatch. 07:03
pharv: so far github.com/zostay/P6W has come closest to really try something 6y, but seems to still fall short. Why e.g. return 200, [ Content-Type => 'text/plain' ], [ $lucas-number[$n] ]; when we have OO baked so deeply into the language? 07:04
07:06 Cabanossi left, skf left 07:07 wamba left, Cabanossi joined 07:13 parv joined
jeromelanteri gist.github.com/jerome-diver/56971...a1ea8a86dc 07:15
07:15 dugword joined
jeromelanteri i'm trying to create a yaml file who contains an array of Hashes. Each hash should by { group => 'name_of_group', repos => [ {title => 'my first title', url 'my first url'}, {title => 'other title', url => 'other url'}]} 07:17
nine jeromelanteri: repos => [ ${ url => "", title => "" } ] 07:18
jeromelanteri in datas.pm6 file, the datas class at construction time start initializations, and from initialize_filename_data(), it creat the file and put inside default value. But this value created at line 28 doesn't give an array of hashes 07:19
nine, look at line 28 of datas.pm6
stmuk_
07:20 dugword left
nine jeromelanteri: that should be my @default = [ ${ group => "default", repos => [ ${ url => "", title => "" } ] } ]; 07:20
jeromelanteri yes 07:25
07:28 coetry_ left, cgfbee joined 07:29 coetry joined
jeromelanteri nine, that is correct, and how to make this file a yaml file ? 07:29
method dump should make it yaml compatible, yes ? 07:30
from perl5, the yaml file content is not the same.
07:32 dakkar joined 07:33 xtreak joined, abraxxa joined 07:34 gdonald left
lizmat clickbaits p6weekly.wordpress.com/2017/07/24/...h-produce/ 07:34
07:37 holyghost joined
lookatme_ lizmat, ++ 07:39
07:40 zakharyas joined 07:43 wamba joined 07:44 faraco_ joined
faraco_ hi guys, what is Inf? 07:44
nine faraco_: infinity 07:45
faraco_ camelia: say Inf;
nine m: say Inf
camelia Inf
faraco_ oh...why that is not documented?
nine faraco_: because no one wrote documentation for it so far :) 07:46
eater m: say 0..* == 0..Inf
camelia True
eater nice
07:47 gdonald joined
nine faraco_: for writing documentation one needs to actually know everything and at the same time recognize what others won't know. So maybe it just never occured to the doc writers that there are people who need docs for Inf 07:47
faraco_ I see. I'm just walking the doc issues, and stumbled upon zoffix's Inf documentation lacking. 07:48
07:52 holyghost left 07:53 FROGGS joined 07:56 rindolf joined, melezhik joined
melezhik Hi Perl6 gurus! 07:57
How can I pass array of array as function arguments ?
faraco_ m: say WHAT $*DISTRO; 08:00
camelia (Distro)
faraco_ m: say WHAT $*KERNEL; say WHAT $*VM; 08:01
camelia (Kernel)
(VM)
faraco_ what those even do?
08:01 emeric joined
faraco_ nevermind 08:02
08:04 jonas1 joined, TEttinger left
lookatme_ m: sub aa(@aa) { .perl.say for @aa; }; aa([ [1, 2,], [3, 4]]); 08:12
camelia $[1, 2]
$[3, 4]
lookatme_ m: sub aa(@aa) { say " => ", .perl for @aa; }; aa([ [1, 2,], [3, 4]]); 08:13
camelia => $[1, 2]
=> $[3, 4]
lookatme_ melezhik, ^^^
08:14 wamba left
melezhik thanks lookatme:, I thought it should be (,) :)) 08:15
lookatme_ m: say [].WHAT; say ().WHAT; 08:19
camelia (Array)
(List)
lookatme_ melezhik, ^^
melezhik yeah, I see 08:20
thanks
08:20 zakharyas left 08:22 coetry left, wamba joined
faraco_ any idea how this method operates? multi method tree(Any:D:nqp::istype(self, Iterable)?? self.map({ .tree }).item!! self} 08:25
08:28 wamba left
faraco_ m: say WHAT $*PERL; 08:32
camelia (Perl)
08:33 xtreak left 08:36 protium left 08:38 robertle joined 08:41 protium joined 08:51 cadz joined, FROGGS left
faraco_ hmm, just want to ask, why slurp is in this example ? docs.perl6.org/routine/spurt#Examples 08:51
cadz Hi perl6 im new 08:52
faraco_ cadz: welcome! :)
cadz @faraco_ are you a bot?
faraco_ cadz: nope, a human.
El_Che ^---- that's what it wants you to believe since it passed his turing test... 08:59
lookatme_ faraco_, what's your mean?
cadz, welcome o/
faraco_ lookatme_: I'm not sure why slurp routine is in spurt example. I don't think it is related to each other. 09:00
lookatme_ faraco_, It's common that show what the file contain after you write something to a file. 09:01
I think
faraco_ I see, then I'll add a comment on what it does there too. 09:02
lookatme_ For me, comment after that slurp is clear enough 09:03
faraco_ okay nevermind then. 09:04
lookatme_ Hmm, YW 09:06
faraco_ lookatme_++ 09:08
samcv so i have a bunch of objects in an array. and i want to pass the values through several functions, but have the changes to the objects i'm passing also take effect in the original array 09:09
gist.github.com/samcv/2b89269935ff...-L127-L155 so see here how i iterate @main-node -> $sub_node and pass $sub_node to another funcion 09:10
i make changes to $sub_node and need it to also take effect in the original array. is there any way for me to achieve this that doesn't include passing the array element through the functions (would not be as nice as i expand things) 09:11
lookatme_ It's like a `Perl6 on the rail`.
jnthn samcv: <-> instead of -> 09:14
samcv: And if you pass it to other subs just declare those parameters as "is rw" and you'll be able to write to the passed thing
lookatme_ my @a = " a", "b "; sub atrim(@a) { @a>>.trim }; sub aup(@a) { @a>>.uc; }; @a ==> atrim() ==> aup() ==> my @ups; say @ups; 09:15
m: my @a = " a", "b "; sub atrim(@a) { @a>>.trim }; sub aup(@a) { @a>>.uc; }; @a ==> atrim() ==> aup() ==> my @ups; say @ups;
camelia [A B]
lookatme_ m: my @a = " a", "b "; sub atrim(@a) { @a>>.trim }; sub aup(@a) { @a>>.uc; }; @a ==> atrim() ==> aup() ==> my @ups; dd @ups;
camelia Array @ups = ["A", "B"]
09:17 dugword joined
faraco_ I found the slurp example is not properly formatted - docs.perl6.org/routine/slurp 09:17
El_Che faraco_: I saw your PR for rakudo-pkg, will have a look later 09:19
thx
faraco_ El_Che: it is just a misc :P. but if you want to accept it, your welcome. :) 09:20
09:21 dugword left
faraco_ also in the slurp doc, how to fix that? github.com/perl6/doc/blob/master/d....pod6#L279 09:21
the code block begins with `for code :skip-test`.
09:23 wamba joined 09:26 mr_ron joined
El_Che faraco_: send a PR 09:26
cadz Can perl5 and perl6 run side by side?
faraco_ El_Che: Alright, I'll PR since I don't know what it will do if I direct push. 09:27
ilmari cadz: yes, they are completely independet
09:27 wamba left
ilmari cadz: but they can also interoperate, via Inline::Perl5 in perl6 and Inline::Perl6 in perl5 09:28
cadz what do you mean interoperate?
Like i can use perl6 in my perl 5 code?
ilmari and vice versa
lookatme_ yeah 09:29
ilmari metacpan.org/pod/Inline::Perl6 github.com/niner/Inline-Perl5
cadz This is good, cause I already have a web application running in perl5, and i want to try perl6, for up coming projects, is this advisable? 09:30
Geth doc: faraco++ created pull request #1423:
possible fix on reformatting the slurp example
09:35
09:37 xtreak joined 09:39 lookatme_ left 09:42 xtreak left 09:43 pmurias joined
samcv jnthn, i'm getting Parameter '$p6node' expected a writable container, but got p6node value now 09:43
09:44 wamba joined
pmurias does preprocessing the nqp.js/rakudo.js runtime to generate both an async/await and node.js specific variants seem sane? 09:44
samcv class p6node { has %.next is rw }; and it calls sub p6node-find-node to supply it with $p6node. so basically function(p6node-find-node); and sub p6node-find-node ($node) { $node.next{$cp} } 09:45
hmm i guess maybe i need to is rw that one too maybe :)
pmurias I plan to replace RETURN, AWAIT, ASYNC with either 'return', 'await', 'async' or ''
jnthn samcv: Yeah, you'll need `is rw` on the code paths where you're returning/passing things
samcv cool just gotta keep following the paths 09:46
09:59 mr_ron left
faraco_ quick question, what does concurrency in Perl 6 and Go's goroutines differs? 10:00
nadim m: "123".lines.map: { comb(8) } 10:01
camelia 5===SORRY!5=== Error while compiling <tmp>
Calling comb(Int) will never work with proto signature ($, $, $?)
at <tmp>:1
------> 3"123".lines.map: { 7⏏5comb(8) }
samcv jnthn, gist.github.com/samcv/ef80ff58b8fc...p6-L69-L71 this function. for some reason it's not returning a writable container but if i replace the function call with the same code, it works fine
any clue?
nadim m: "123".lines.map: { .comb(8) }
camelia ( no output )
nadim m: "123".lines.map: { .comb(8) }.say
camelia -> ;; $_? is raw { #`(Block|58367432) ... }
Cannot resolve caller map(Seq: Bool); none of these signatures match:
($: Hash \h, *%_)
(\SELF: &block;; :$label, :$item, *%_)
(HyperIterable:D $: &block;; :$label, *%_)
in block <unit> …
nadim m: ("123".lines.map: { .comb(8) }).say 10:02
camelia ((123))
nadim m: ("123456".lines.map: { .comb(3) }).say
camelia ((123 456))
nadim m: ("123\n456".lines.map: { .comb(3) }).say
camelia ((123) (456))
10:02 xinming joined
nadim m: ("123\n\n456".lines.map: { .comb(3) }).say 10:02
camelia ((123) () (456))
nadim m: ("123\n\n456".lines.map: { .comb(4) }).say 10:03
camelia ((123) () (456))
samcv faraco_, i don't know go
faraco_, but you might find a short blog post i wrote interesting cry.nu/perl6/multithreading-in-perl6/
and at the end there's a link to part 2 as well. gives you an intro to some of the perl 6 concepts 10:04
jnthn samcv: return-rw (or just implicit return)
samcv ah thanks!
nadim m: ("123\n\n456".lines.flatmap: { .comb(4) }).say
camelia (123 456)
10:05 xtreak joined
faraco_ samcv++ 10:06
nadim lizmat: thanks for the perl6 weekly again, looking forward to it every week. 10:08
samcv faraco_, let me know what you think 10:09
timotimo also might need to declare the sub itself "is rw"?
samcv timotimo, how do i do that? 10:11
i'm still having issues even after making everything returns-rw and such
timotimo sub foo (bar baz) is rw { ... } 10:13
and then either return-rw or last-statement-of-sub-returns-automatically 10:14
samcv argh still not working 10:17
timotimo it's possible that the .next{$cp} just isn't writable for some reason, like you bound a value in there rather than having a scalar container 10:18
you could try "note $p6node.next{$cp}.VAR.^name" and see if it says Scalar or not
samcv it's weird. one of the values in the object get written but the other doesn't 10:19
but i write them in the same function
10:20 pharv left
samcv and both are is rw in the object. both are Int's 10:20
but one gets altered the other not
10:20 wamba left
samcv yep it says Scalar 10:21
10:21 wamba joined
samcv ok and only one of them has collation_key_link set. the other only have collation_key_elems set 10:22
jeromelanteri i use term::choose and Prompt:Gruss, Term:: Choose is very nice (it clear the terminal by add a layout, very clean...), but Prompt::Gruff go back on console terminal emultaor line (who is not so nice than Term::Choose, but also make a big contrast of final render). So, do you know an other one (who works) module who ask for entry strin or yes/no question tag in the same presentation than Term::Choose does ? 10:34
10:40 faraco_ left
AlexDaniel camelia: help 10:49
camelia AlexDaniel: Usage: <(rakudo-moar|p5-to-p6|prof-m|star-m|debug-cat|nqp-js|rakudo-jvm|nqp-moarvm|nqp-jvm|nqp-q|r-j|sm|star|nom|nqp-m|p6|m|p56|rakudo|nqp-mvm|r-m|r-jvm|j|rj|perl6|rm|r|nqp)(?^::\s(?!OUTPUT)) $perl6_program>
10:51 akagi201__ joined, araujo left 11:00 mr-fooba_ joined 11:03 araujo joined, araujo left, araujo joined 11:04 mr-foobar left
Geth doc: 54cb7608b0 | faraco++ (committed by Aleks-Daniel Jakimenko-Aleksejev) | doc/Type/IO.pod6
possible fix on reformatting the slurp example (#1423)

  * possible fix on reformatting the slurp example
  * add :skip-test for slurp example
11:05
jeromelanteri what should be an equivalent for: my success = IPC::Run::run \@cmd, '>', \$stdout, '2>pty', \$stderr; ? 11:08
in perl6
timotimo what are $stdout and $stderr here?
jeromelanteri standard output and standard error 11:09
default variables for terminal output 11:10
never mind if i not have them... i just need to catch success output true or false 11:11
timotimo why do you even pass stdout and stderr if you just want to keep the default ones?
docs.perl6.org/language/ipc#index-...ms-running
jeromelanteri in perl5 you define these $stdout and $stderr empty, then it will put answer inside. 11:12
timotimo so you want to keep the output?
jeromelanteri timotimo, this IPC::Run:run method can do that, then i profit to try and see if an other one perl6 module does it same or at least... the minimum i need. 11:13
timotimo, if possible is better, but if just success connection it should be fine for me.
it is for check presence of a remote repo
timotimo the page i linked does what you need
jeromelanteri cmd would be git ls-remote my/remote/repo 11:14
oh fine, i dodn't see... thank you.
didn't (tired)
11:15 parv left 11:18 dugword joined 11:20 Cabanossi left 11:22 Cabanossi joined 11:23 abraxxa1 joined, abraxxa left, abraxxa1 left, abraxxa joined, dugword left 11:29 JimmyZ joined 11:33 xtreak left, xtreak_ joined 11:34 xtreak joined 11:35 xtreak_ left 11:39 bjz joined 11:54 unop joined 12:00 stmuk joined 12:03 stmuk_ left 12:12 raschipi joined 12:20 dugword joined 12:24 dugword left 12:25 cadz left 12:27 domidumont left 12:28 domidumont joined, itaipu joined 12:30 pmurias left, domidumont1 joined 12:32 pmurias joined 12:33 domidumont left 12:34 Cabanossi left 12:37 Cabanossi joined 12:40 pmurias left 12:43 coetry joined 12:45 coetry left 12:46 bjz left 12:51 araraloren joined 12:57 mcmillhj joined 13:01 donaldh joined, cosimo left, itaipu left 13:04 cosimo joined
zostay Feel free to raise the irc in an issue. The doc is not finished. 13:05
Stupid autocorrect, rfc, not irc
The was re @nine from earlier 13:07
There is a really good set of reasons for preferring tuples to an object though for the return values in P6WAPI 13:08
Simplicity, easy to coerce into it, there are lots of listy things you can use, etc. It does not require an Array, but anything that coerces to List 13:10
So return an object in the current spec if you like, just make sure it has a list method 13:11
13:20 dugword joined 13:25 dugword left, xtreak left, xtreak joined, donaldh left 13:26 wamba left
nine zostay: the list however is not self documenting, won't warn you if you're holding it wrong and is harder to extend in a backwards compatible way 13:27
zostay Make that argument in an issue and we can figure it out. So far I have had some interest, some complaining, but not much cooperation. 13:28
Those are all good points.
13:29 xtreak left, mcmillhj left, xtreak joined 13:32 cog_ joined 13:34 kst` joined 13:35 cognominal left, kst left 13:37 mr-fooba_ left, jeromelanteri left 13:38 stux|RC left 13:39 mr-foobar joined
nine zostay: I have a hard time coming up with a good subject for the issue. My beef is that P6W in general seems to ignore OO. For example: "&wrappee = wrappee(%config) if &wrappee.returns ~~ Callable;" looks quite magical to the uninitiated. $wrappee.config(%config); however looks very mundane (a default method config that does nothing can be provided by the P6W::App role) 13:40
zostay: die "WTF" if $p.result[0] != 200; is magic number soup while die "WTF" if $p.result.http-code != 200; points the casual reader at what's going on 13:41
13:42 mcmillhj joined
nine zostay: I love however that you use promises :) This has potential 13:42
13:46 xtreak left 13:47 stux|RC-only joined
zengargoyle .ask jnthn is that concurrency talk/slides supposed to be not shared around? 13:51
yoleaux zengargoyle: I'll pass your message to jnthn.
13:51 wamba joined 13:53 zakharyas joined 13:57 skids joined 13:58 rindolf left 13:59 zakharyas left, zakharyas joined 14:01 wamba left
zengargoyle gah, StackOverflow. i'm so not into playing reputation game again. 14:04
14:04 zakharyas left 14:05 Khisanth left
zengargoyle .ask raiph can you maybe augment the bib parser with like: my $kv-index = .<kv-pairs><kv-pair>.first({$_.<key> ~~ "title"}, :k); # so it doesn't just use .<kv-pairs><kv-pair>[0]<value> 14:06
yoleaux zengargoyle: I'll pass your message to raiph.
14:06 Cabanossi left 14:07 Cabanossi joined 14:08 wamba joined 14:10 espadrine joined 14:13 wamba left 14:14 wamba joined
tinita zengargoyle: load is actually implemented in github.com/yaml/yaml-perl6 14:14
feedback welcome 14:15
it just needs libyaml-perl6 at the moment
zengargoyle tinita: cool, that was just the one error i didn't feel like messing with. :)
14:16 rindolf joined
colomon Does anyone know the state of the various Git modules for p6? I was just thinking it would be nice to have a script to delete merged branches, and wondered if we had a module interface to git or if I should just call git commands directly myself. 14:16
tinita zengargoyle: just be aware that it's different from github.com/perl6-community-modules/yaml-pm6 14:17
14:17 perlpilot joined 14:18 Khisanth joined
zengargoyle tinita: i'll try and remember if/when i need to use a YAML module myself. 14:18
14:22 aindilis left 14:26 alimon left 14:28 alimon joined 14:30 wamba left 14:36 Cabanossi left 14:37 Cabanossi joined 14:38 cosimo left, FROGGS joined 14:39 cosimo joined 14:52 zakharyas joined
jnthn zengargoyle: Which talk? :) 14:53
The most recent one I did has already been posted publicly on YouTube and I tweeted about it :) 14:54
15:01 lowbro left
zengargoyle oh, maybe i have the link given from the p6weekly a few weeks ago and that video still says private... 15:02
15:02 zakharyas left
zengargoyle ah, i was going on lookatme's comment: 18:40 < lookatme> I think that video is private? (or something, I forgot it), maybe can not direct access ? 15:03
cool, guess it's actually been made public. 15:04
15:05 AlexDani` joined
zengargoyle it had that big red warning about being a private video when it was first in p6weekly. 15:06
jnthn Ah, OK
15:07 AlexDaniel left
zengargoyle .tell lookatme that video has been make public now, so it's all good. 15:08
yoleaux zengargoyle: I'll pass your message to lookatme.
15:09 AlexDani` is now known as AlexDaniel
perlpilot jnthn: Will there be some future syntax to encapsulate that compose routine from that video? It kind of made me want some syntax resembling ==> to join together the processing bits without the supply "boilerplate" 15:13
15:14 zakharyas joined 15:15 ChoHag left 15:18 someuser joined 15:22 dugword joined 15:24 dugword left 15:25 dugword joined 15:31 perlpilot left 15:32 perlpilot joined 15:38 zakharyas left 15:39 ChoHag joined 15:43 nhywyll joined 15:46 cdg joined 15:47 xinming left, Skarsnik joined 15:48 cdg_ joined
Skarsnik Hello 15:48
Was there a Qt app to see profile log from rakudo/moar?
[Coke] there was a builtin --profile that generated an html page. 15:49
ugexe or sql i think
there is some Qt profiler thing though 15:50
timotimo right in tadzik's github, Skarsnik
Skarsnik well all I remember from the html generated, it was like easily over 100MB and most brownser did not like that x)
timotimo also, the profiler can now spit out a .sql file that is compatible with sqlite 15:51
Skarsnik ah, that interesting
probably lighter than json to use them?
ugexe yeah tadzik told me the .sql output was to address that very problem
timotimo github.com/perl6/nqp/pull/354 - has a few sql queries to start you off with 15:52
15:52 cdg left
ugexe which reminds me i should actually try profiling zef again since it might be loadable now :) 15:52
timotimo the thing about json is that the qt json library we used would arbitrarily not support files above a certain size
15:53 domidumont1 left
timotimo we didn't have to try very hard to reach taht size 15:53
ugexe no other json library could be swapped in that *can* handle that size? 15:54
timotimo could be. is work, though
15:55 wamba joined 15:58 abraxxa left 16:00 perlpilot left, perlpilot joined 16:04 Cabanossi left 16:06 TeamBlast left 16:07 awwaiid left, awwaiid joined, perlpilot left, perlpilot joined, |oLa|1 joined 16:08 Cabanossi joined 16:09 |oLa| left 16:12 TeamBlast joined 16:14 mcmillhj left 16:15 perlpilot_ joined 16:16 cpage_ left, cpage__ joined, |oLa| joined, perlpilot left, Skarsnik_ joined, araraloren left, AlexDani` joined 16:17 |oLa|1 left, notbenh left, AlexDaniel left 16:19 Skarsnik left, notbenh joined 16:22 someuser left 16:23 AlexDani` is now known as AlexDaniel 16:24 someuser joined 16:25 Skarsnik_ is now known as Skarsnik 16:27 robertle left, mcmillhj joined 16:32 ChoHag left 16:35 TeamBlast left 16:38 TeamBlast joined 16:45 nadim left, Bucciarati left 16:48 jonas1 left 16:51 Bucciarati joined
Juerd Is there a way to introspect which library (version) an "is native" function resolved to? 16:51
16:52 itaipu joined
timotimo the native role applied to the thing has the original thing passed to the trait in it 16:55
m: use NativeCall; sub fprintf(Str, int32, int32) is native("that_library.so"); say &fprintf.^roles[0].perl 16:56
camelia 5===SORRY!5=== Error while compiling <tmp>
A unit-scoped sub definition is not allowed except on a MAIN sub;
Please use the block form.
at <tmp>:1
------> 0332, int32) is native("that_library.so");7⏏5 say &fprintf.^roles[0].perl
timotimo m: use NativeCall; sub fprintf(Str, int32, int32) is native("that_library.so") { }; say &fprintf.^roles[0].perl
camelia NativeCall::Native[Sub,Str]
timotimo it doesn't output that, eh?
Skarsnik why should it give you that? it's just the argument to the trait 16:57
Ho the role... hm 16:58
timotimo because the argument is put into the role directly
Skarsnik not sure you can access the data?
Zoffix m: use NativeCall; sub fprintf(Str, int32, int32) is native("that_library.so") { }; say &fprintf.^roles[0].^role_arguments 16:59
camelia (sub fprintf (Str $, int32 $, int32 $) { #`(Sub+{NativeCall::Native[Sub,Str]}|70456672) ... } that_library.so)
»
Zoffix m: use NativeCall; sub fprintf(Str, int32, int32) is native("that_library.so") { }; say &fprintf.^roles[0].^role_arguments.tail 17:00
camelia that_library.so
timotimo ah, nice.
my local rakudo seems broken at the moment, so couldn't try around manually
17:00 perlpilot_ left
Skarsnik m: use NativeCall; sub fprintf(Str, int32, int32) is native("that_library.so", v0.1) { }; say &fprintf.^roles[0].^role_arguments 17:01
camelia (sub fprintf (Str $, int32 $, int32 $) { #`(Sub+{NativeCall::Native[Sub,List]}|70812272) ... } (that_library.so v0.1))
Skarsnik m: use NativeCall; sub fprintf(Str, int32, int32) is native(sub {"foo"}) { }; say &fprintf.^roles[0].^role_arguments
camelia (sub fprintf (Str $, int32 $, int32 $) { #`(Sub+{NativeCall::Native[Sub,Sub]}|80132592) ... } sub () { #`(Sub|80132744) ... })
zengargoyle i was thinking if is native("libfoo.so") works can one tell that it's really libfoo.so :ver("0.1.0") that got loaded.
Skarsnik it's lost 17:02
because it's converted to a path to the lib
well you can get the argument like show previously
zengargoyle and maybe at compile time, a is native("libfoo.so") could be compiled with the actual version that was found so upgraging (changing libfoo.so link in the future) does not break ABI. 17:03
timotimo the lookup of the actual library only happens when you run it the first time
17:03 aindilis joined
zengargoyle so compile time phaser to do the lookup? 17:03
Skarsnik no
a method of the role is executed and do it at runtime 17:04
zengargoyle ah, ok, i've just been pondering ways to avoid libfoo.so changing between when it's built/tested and when it's run. 17:05
w/o specifing a specific version.
Skarsnik github.com/rakudo/rakudo/blob/nom/...l.pm6#L308
don't
I mean
libfoo.so should not be used
execpt for some shitty lib 17:06
zengargoyle libfoo.so often just links to the latest libfoo.1.0, libfoo.2.0, libfoo.2.1.0 that have been installed on the system.
Skarsnik if you look at bsd/linux doc about dynamic lib .so is a developper thing, that why debian provide them only in the -dev package
17:07 nadim joined
zengargoyle right, and ld when given libfoo.so actually embeds the libfoo.so.1.0.0 that it found when compiling so the prog doesn't fail if libfoo.so is changed. 17:08
Skarsnik That why I put a warning when no version was given to the native trait (but I think it was removed)
zengargoyle ah,,,, gotcha.
geekosaur :(
Skarsnik Idealy, a libit should be libnameoflib.ABIVERSION.so libnameoflibe.so is a developper thing 17:09
damn
geekosaur everyone wants to think that's the right thing and will always "just work"... have seen it cause a fair number of bugs (not just in perl 6; once had to diagnose a weird bug in (then Platform Computing) LSF that boiled down to it attaching a libfoo.so unversioned and the ABI had changed)
mst trade-offs, as usual
zengargoyle i guess maybe it can be left up to Build.pm script to sort things out at install time or something. 17:10
Skarsnik by like mysql does a mysql.version.so
even if there is no ABI change
timotimo the trade-off with not passing a version is that your program won't work on many user's systems unless they create that symlink as root or install some extra dev package
Skarsnik There more info on the ticket associed to the PR that add the version in the native trait 17:11
17:11 dakkar left
geekosaur and just to make things more annoying, the ELF shared object spec has one versioning mechanism, Mach-O has another, and Windows DLLs have none at all 17:12
Skarsnik it's still standardized for os X 17:13
zengargoyle i also wonder how to go about guessing library location/name at build time. i.e. find libfoo.so.1 given libfoo.so or libfoo or just foo.
like trying to get a list of searched paths out fo ld.so somehow and looking for candidates.
Juerd timotimo: Unfortunately, I don't need what was passed, but what was loaded. Specifically, 'readline' was passed, but it doesn't work if I pass that to cglobal. 'readline.so.6' works with cglobal, but on another box it uses 'readline.so.7'
I found a work-around: I use Readline.pm6 to set a value in readline, then brute force the values until I get the right value back. Then I know which version of readline.so was used by Readline.pm6 17:14
Skarsnik what? readline.so.6 work?
Juerd github.com/Juerd/shalog/commit/656...47dc820036
Er, libreadline.so.6 17:15
Skarsnik you probably to use an ENV variable if you want to be able to change it
and I can't type properly today
Juerd Well, I have something that works now, need it in production tomorrow :)
But was wondering if there's a supported way of doing this 17:16
Something less hacky :)
Skarsnik look like a special case like mysql, the .6 .7 is a version not an ABI version?
Juerd I have no idea. I never use C stuff normally :) 17:17
This entire thing with libreadline is a hack because I can't assign to rl_completion_entry_func to get tab completion :)
And I really need tab completion :) 17:18
zengargoyle i would think that there's a call somewhere in whatever clib/dynlib/ld.so loader thing that could resolve a libfoo.so and tell the actual version/filename/path of the resolved lib.
17:18 zakharyas joined
Skarsnik My though on this whole miss is github.com/rakudo/rakudo/pull/716 17:18
geekosaur not publicly, sadly 17:19
Skarsnik *mess
17:19 ChoHag joined
geekosaur there's a debug envar for linux's ld.so, a different one for solaris's, a different one for freebsd... 17:19
zengargoyle darn.
Skarsnik m: use NativeCall :ALL; guess_library_name("foo", v6.1).say;
camelia Too many positionals passed; expected 1 argument but got 2
in sub guess_library_name at /home/camelia/rakudo-m-inst-2/share/perl6/sources/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) line 205
in block <unit> at <tmp> line 1
geekosaur this stuff was designed for C, not for perl 6 17:20
Skarsnik m: use NativeCall :ALL; guess_library_name(("foo", v6.1)).say;
camelia libfoo.so.6.1
zengargoyle is there a standard symbol in the loaded lib that has the version so one could then try libfoo.so:ver<whatever> and see if it works?
geekosaur no
zengargoyle ah, i guess that's why it's hard. :) 17:21
Skarsnik The best solution is to cover the normal/general case in NC and have people build their own find lib stuff for specific case
zengargoyle yeah, i guess there's always just set an environment variable before building. 17:23
Skarsnik but the solution for that sucks (IMO) you need to give a sub to the trait and it will be executed for each routine marked with the is native trait
17:25 khw joined
zengargoyle maybe a Build.pm could find and make a Foo::NC::Library module with a constant in it. 17:26
Skarsnik constant is compile time
geekosaur actually this impinges on a different issue that has been brought up, which is that instead of making these things per-routine there should be a "global" (module level) operation to get a "handle" for a shared object and then the routines should reference that in "is native"
Skarsnik geekosaur, that what my pr is about actually, you give the is native trait a lib handle instead 17:27
so you are like my $handle = native-library-register-thing(blalblab); sub foo is native($handle) {}; 17:28
geekosaur that said, I continue to think NC is doomed in the long run because there isn't enough information in a shared object to do it right, you need source information as well (and even then C has that annoying ambiguity with respect to pointer vs. array) 17:29
zengargoyle Skarsnik: i think compile time is fine for me. if you remove the libfoo.so.1.0 that it actually found and compiled it then it should no longer work.
Skarsnik It does not work well with precomp for module. Like if you base on a env variable, it will be only at compile time (or the first time the module is compiled) then you find yourself unable to change this value at runtime later 17:30
like you do MYVAR=piko; perl6 -I foomodule/lib piko.p6; MYVAR=bar (first run); perl6 -I foomodule/lib piko.p6 it will keep the first MYVAR value 17:32
zengargoyle why would you everl load a different version at runtime and expect it to work? given libfoo.so, at compile find libfoo.so.1.0 and libfoo.so.1 and compile in libfoo.so:ver<1>
Skarsnik damn I missplaced the (first run)
17:33 mr-fooba_ joined 17:34 mr-foobar left
Skarsnik well if you want to try another version of lib. Think of a module (binding a lib) installed by an admin on a debian stable and an user want to try with a more recent version of the lib. He can't since it will be tied to the lib found at install time 17:35
zengargoyle right, but AFAIK..... libfoo.so.1 is a link to libfoo.so.1.latest and libfoo.so is a link to libfoo.so.latest. if you compile in libfoo.so.1 you will get libfoo.so.1.latest if you want libfoo.so.2 you need to recompile. 17:37
17:37 nhywyll left
geekosaur keep in mind that, when doing this in C, you use a SONAME 17:38
which is embedded in the shared object as read at link time
Skarsnik hm
libfoo.so.1 can be whatever the admin want x)
geekosaur so libfoo.so.1.2.127 will have in it an SONAME of "libfoo.so.1" typically
zengargoyle true... :) 17:39
17:39 zakharyas left
Skarsnik also thing of a module like DBIish 17:40
the test does not assume you have every SGDB installed so you can install DBIish without having mysql/sqlite/postgres/whatever 17:41
it can be installed without a lib
zengargoyle so at build, find the ones you can and make DBIish::NC::Library::Pq with a constant with the version. then try to require that at runtime, if it fails fallback to libpq.so 17:45
17:46 zakharyas joined
zengargoyle i guess i'm thinking along the lines of .PL files in p5. code that generates the .pm file at build. can suss out the actual library or just put in the generic case. 17:49
Skarsnik DBIish do weird stuff github.com/perl6/DBIish/blob/maste...veLibs.pm6
17:51 nhywyll joined 17:55 setty1 joined
Skarsnik unrelated, let see if rakudo/moar build on my chromebook x) 18:00
18:01 cdg__ joined, cdg_ left 18:02 ChoHag left 18:08 xinming joined
mspo with cruton? 18:14
Skarsnik hm 2 tests does not pass for NC, the one with the callbacks and another one with simple args 18:15
yes
zengargoyle unrelated, does anybody know of a good HOWTO for doing CI on Windows from GitHub (ala travis.ci) for somebody who knows almost nothing about Windows? 18:19
18:20 Cabanossi left
El_Che zengargoyle: install ubuntu on windows :) 18:21
jk
18:22 Cabanossi joined
Zoffix zengargoyle: I think "AppVeyor" is what the kids use for that purpose. We got one in rakudo, tho I've no idea about its setup or requirements 18:23
timotimo zengargoyle do you perhaps mean appveyor?
heh.
Zoffix zengargoyle: github.com/rakudo/rakudo/blob/nom/appveyor.yml
timotimo sign up on appveyor using your guthub user, create a "new repo" and select your project, then select branches and stuff 18:24
Skarsnik interesting
timotimo guthub? lol 18:25
Skarsnik gitgood
18:30 pharv joined
zengargoyle Zoffix: cool, i'll check it out. 18:31
geekosaur better than gitflub 18:33
ugexe timotimo: github.com/rakudo/rakudo/commit/02...44ca507R98 `-e '...'` this isn't windows friendly 18:34
geekosaur yeh, you should swap the 's and "s (thankfully nothing in there looks like a shell variable) 18:36
18:36 zakharyas left
ugexe yep, and im not sure `rm -f` if a windows command 18:37
well i guess its just using that as output
but i am getting failures on the quotes
geekosaur it's "not" but I think the build system may assume mingw / msys2 currently? if it needs to work with msvc then no
18:38 domidumont joined
geekosaur probably the right answer there is you're already using perl 6, use IO::Path methods instead of shelling out to rm 18:38
ugexe it is, i misparsed it since it does "say 'rm -f'"
geekosaur ah 18:39
ugexe ci.appveyor.com/project/ugexe/perl...0.10#L1025 here is the test failure for brevity
im really more confused at why i get that failure but rakudo org does not 18:44
ah i see, because appveyor for rakudo org does not do nmake install, just nmake test 18:46
18:46 Exodist left 18:47 Exodist joined 18:50 perlpilot joined
El_Che The .so discussion was interesting. Thx 18:53
18:53 itaipu left 18:56 mr-fooba_ left, Exodist left 18:57 Exodist joined, ufobat left 19:04 cdg__ left 19:05 Cabanossi left, domidumont left 19:06 Exodist left 19:07 Exodist joined, Cabanossi joined 19:08 pharv left 19:09 awwaiid left 19:10 awwaiid joined 19:19 Exodist left 19:20 mcmillhj_ joined
AlexDaniel m: use Test; my @expected = ‘hello’, /or/; my @got = ‘hello’, ‘lord’; cmp-ok @got, ‘~~’, @expected, ‘Lorem ipsum.’ 19:21
camelia ok 1 - Lorem ipsum.
AlexDaniel m: use Test; my @expected = ‘hello’, /or/; my @got = ‘hello’, ‘worm’; cmp-ok @got, ‘~~’, @expected, ‘Lorem ipsum.’
camelia ok 1 - Lorem ipsum.
AlexDaniel m: use Test; my @expected = ‘hello’, /or/; my @got = ‘hello’, ‘wrom’; cmp-ok @got, ‘~~’, @expected, ‘Lorem ipsum.’
camelia not ok 1 - Lorem ipsum.

# Failed test 'Lorem ipsum.'
# at <tmp> line 1
Regex object coerced to string (please use .gist or .perl to do that)
in sub cmp-ok at /home/camelia/rakudo-m-inst-2/share/perl6/sources/C712FE6969F786C9380D643DF17E85D06…
AlexDaniel this “Regex object coerced to string” warning… :| 19:22
and wrong ‘expected’ part also 19:23
19:23 mcmillhj left, Exodist joined
AlexDaniel is there any better way to do what I'm trying to do? Or am I seeing a bug? 19:23
19:25 nadim left, darutoko left, nadim joined
Skarsnik weird 19:25
tony-o m: use Test; my @expected = ‘hello’, q/or/; my @got = ‘hello’, ‘wrom’; cmp-ok @got, ‘~~’, @expected, ‘Lorem ipsum.’ 19:26
yoleaux 24 Jul 2017 14:29Z <Zoffix> tony-o: any idea why modules.zef.pm is puking a rainbow? modules.zef.pm/search?terms=HTTP%3A%3AUserAgent
camelia not ok 1 - Lorem ipsum.

# Failed test 'Lorem ipsum.'
# at <tmp> line 1
# expected: 'hello or'
# matcher: 'infix:<~~>'
# got: 'hello wrom'
Zoffix m: use Test; my @expected = ‘hello’, q/or/; my @got = ‘hello’, ‘wrom’; say @got ~~ @expected
camelia False
Skarsnik I don't get the '~~' part ^^ 19:27
tony-o Zoffix: i'm in the process of fixing it - the eco system finally exceeded the amount of space available on that machine
Zoffix Skarsnik: it's the op you give to cmp-ok routine
tony-o now i need to figure out a different way to version/browse file repository
AlexDaniel tony-o: not quite sure what are you trying to say by this 19:28
tony-o: I want it to match a regex
so yeah, if I'm not using a regex, then it works
19:29 Exodist left
Skarsnik m: my @expected = 'hello', /or/; say @expected.perl; 19:29
Zoffix m: my @expected = ‘hello’, q/or/; my @got = ‘hello’, ‘wrom’; say &infix:<~~>(@got, @expected)
19:29 dugword left
Skarsnik rip camelia x) 19:29
Zoffix y u do that?
camelia Resource temporarily unavailable
False
19:30 Exodist joined
Skarsnik m: my @expected = 'hello', /or/; say @expected.perl; 19:30
camelia ["hello", /or/]
Skarsnik hm, no output that tell the type of something?
Zoffix AlexDaniel: yeah a bug. It's using $expected as .Str
in here: github.com/rakudo/rakudo/blob/nom/...t.pm6#L245 19:31
AlexDaniel I wonder if .gist is going to work significantly better… 19:32
Zoffix and $got too 19:33
AlexDaniel right
Zoffix
.oO( (try .perl)//.gist )
19:34
Skarsnik I wonder if a dies-with in Test could be useful 19:35
dies-with sub {stuff}, X::FileNotFound;
AlexDaniel Zoffix: this will produce something like '"foo"' for strings… should we just omit outer quotes then? *shrug* 19:36
Zoffix Yeah, probably. Just noticing a bunch of other tests use .perl as output 19:37
Skarsnik: we already have it. It's called throws-like
Skarsnik Oooh 19:38
19:39 pierrot left
Zoffix It's a bit off, since it's Failure-blind and will report it as a throw. roast/packages/Test/Util (and Testo.pm6's future version) have fails-like to compensate 19:39
tony-o m: use Test; my @expected = ‘hello’, m/or/; my @got = ‘hello’, ‘wrom’; cmp-ok @got, ‘~~’, @expected, ‘Lorem ipsum.’
camelia Use of uninitialized value of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.
in block <unit> at <tmp> line 1
ok 1 - Lorem ipsum.
tony-o AlexDaniel: ah
Skarsnik Zoffix, hm, I don't get the diff x) 19:41
Zoffix m: my $x = +'a'; say "Look ma, no throwage!"
camelia Look ma, no throwage!
Zoffix m: use Test; throws-like { my $x = +'a'; say "Look ma, no throwage!" }, Exception, 'yeah, it totally throws' 19:42
camelia 1..2
Look ma, no throwage!
not ok 1 - code dies

# Failed test 'code dies'
# at <tmp> line 1
ok 2 - \# SKIP Code did not die, can not check exception
# Looks like you failed 1 test of 2
not ok 1 - yeah, it totally…
Zoffix Oh
nevermind, I guess I'm misremembering :)
m: use Test; throws-like { use fatal; my $x = +'a'; say "Look ma, no throwage!" }, Exception, 'yeah, it totally throws'
camelia 1..2
ok 1 - code dies
ok 2 - right exception type (Exception)
ok 1 - yeah, it totally throws
Zoffix Ah, right: throws-like can't detect whether a throw—as opposed to a Failure—happened, and that's what the fails-like solves. 19:43
19:49 ChoHag joined
AlexDaniel ok, RT #131797 19:52
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=131797
19:54 cdg joined 20:01 cdg_ joined
AlexDaniel m: my @got = ‘one’, ‘two three’; say @got 20:04
camelia [one two three]
AlexDaniel does not look like a useful gist, to be honest
well, .perl then 20:05
20:05 cdg left, Cabanossi left
timotimo how do i figure out what files a deb package with a given version and apt archive will give me? (i don't have a debian installation) 20:06
Zoffix heh. my phone also now shows n/l in logs as a question mark now
El_Che timotimo: packages.ubuntu.com/
Zoffix m: say "\n?\n?" 20:07
camelia
?
?
El_Che or you have deb file?
20:07 Cabanossi joined
AlexDaniel ∞×≤…«π✓✗ RT… 20:08
Zoffix: yep, new messages are broken
but old ones work fine: irclog.perlgeek.de/perl6/2017-07-22#i_14907056
and here's the same message: irclog.perlgeek.de/perl6/2017-07-25#i_14921142 20:09
timotimo huh.
geekosaur timotimo, a .deb is just an "ar" archive
ar t foo.deb
AlexDaniel moritz: ↑ do you know about this already? I think I mentioned it previously, but I'm not sure
timotimo our ZMQ binding asks for a libzmq.so.5, but ubuntu only has .1 or .3 20:10
El_Che data.tar.gz should have the files
geekosaur ("tv" if you want details)
timotimo oh, wait, trusty is comparatively old, isn't it?
geekosaur and depending on the version you will need data.tar.gz or data.tar.xz from it for the file content
El_Che 14.04
timotimo xenial has the version we're asking for 20:11
El_Che timotimo: it's still supported through: packages.ubuntu.com/
timotimo yes
how do i figure out if i can get this for trusty from backports?
does ubuntu even have the concept of backports?
geekosaur not really 20:12
El_Che e.g., it is what previous windows release provide as their linux subsystem (the latest moved to 16.04)
timotimo wait, there's updates and backports links on the ubuntu package search page
El_Che they do
20:12 Exodist left
El_Che help.ubuntu.com/community/UbuntuBackports 20:13
moritz AlexDaniel: lalala I can't hear you... :(
timotimo crap, trusty-backports doesn't have libzmq.so.5 anywhere
El_Che packages.ubuntu.com/trusty-backports/
geekosaur that's what I mean by "not really". some things may get backported. not everything, not reliably
El_Che geekosaur: yeah, it's handpicked 20:14
does debian backport everything?
timotimo ubuntu precise pangolin should be even older than trusty, right?
El_Che that's 12.04 20:15
timotimo dangit, that's the two things travis-ci apparently offers
El_Che can you wget the package and install in your test line? 20:16
20:18 Exodist joined
timotimo it looks like to build zmq you really only need build-essential 20:19
20:24 zakharyas joined 20:26 camelia left
El_Che timotimo: what about running docker? 20:27
docs.travis-ci.com/user/docker/
see the sinatra example: docker pull carlad/sinatra
do a docker pull ubuntu/debian/whatever
then docker run [...] <cmd to trigger the tests> 20:28
20:28 Exodist left, Exodist joined
timotimo if we already grab docker for this we might as well use one of the rakudo-containing images 20:28
btw, maybe if we had appveyor for many more of our modules we could have an easier time making a 32bit rakudo star release that works 20:29
El_Che sure
timotimo they do offer 32bit VMs to build stuff on
20:29 eater left
timotimo does anybody know what modules fail for rakudo star on a 32bit windows machine? 20:30
El_Che I am working on alpine rakudo pkgs (to create very small dockers images), but I am stuck on a ruby problem (I use fpm)
timotimo darn you, ruby :< 20:31
20:32 camelia joined, eater joined 20:33 ChanServ sets mode: +v camelia
El_Che more musl than ruby I suspect 20:35
timotimo okay, i don't know what that is :) 20:36
20:37 nhywyll left
geekosaur a different libc than the gnu libc normally used by linuxes 20:38
it's smaller and missing some things that all-the-world-is-x86ish-linux-gnu-gnome-* know are "always there" 20:39
timotimo oh, ok. the only one i know in that vein was dietlibc 20:40
20:42 robertle joined 20:44 FROGGS left 20:47 bjz joined 20:56 TEttinger joined 20:58 colomon left 20:59 mcmillhj_ left 21:04 zakharyas left 21:06 Cabanossi left 21:07 Cabanossi joined 21:09 pharv joined, raschipi left
stmuk timotimo: I think it was linenoise (which also doesn't or didn't work under MSVC) 21:15
21:17 gdonald left, sufrostico joined
stmuk oh and Inline is broken on all Windows (at least with mingw/gcc) 21:20
and there is quite a lot of io breakage 21:21
github.com/FROGGS/p6-Inline-C/issues/12 21:22
timotimo i wonder what uses Inline::C? 21:23
maybe it can be left out?
stmuk Inline itself isn't in R*
timotimo oh, OK 21:24
stmuk github.com/stmuk/Task-Star should have all the R* modules (unlike its upstream) 21:25
timotimo its upstream which doesn't exist any more? :)
can you set up appveyor for your fork of Task-Star? 21:26
stmuk its upstream which exists again :)
timotimo it does!
not on appveyor though :(
stmuk is there a appveyor example handy? 21:27
like github.com/tadzik/Task-Star/blob/m...pveyor.yml 21:28
:)
21:30 dugword joined
tadzik ...exists again? :o 21:30
21:30 gdonald joined
tadzik that's an apocryphe :o 21:30
stmuk ah you deleted from ecosystem only I guess 21:31
tadzik ah, all good then :)
21:34 dugword left
stmuk signs up for appveyor in an unsuccessful attempt to reduce his windows involvement :( 21:35
21:35 unop left 21:37 emeric left 21:39 pierrot joined 21:41 pierrot left 21:44 mcmillhj joined 21:45 pierrot joined
timotimo don't we all wish to have less involvement with windows ... 21:46
21:49 mcmillhj left 21:50 bjz left
nadim hi, I change subs and methods to accep a variable number of positional by using a *@list construct. I must have done something wrong since my test do not pass anymore and it even loops infinitely on a test. Could someone please have a look at the short diff and tell me what I did wrong? nopaste.linux-dev.org/?1160030 21:52
21:53 sufrostico left
timotimo if you're taking an *@ and a *%, you might as well just have |foo and pass it on with |foo 21:56
that will give both positionals and nameds
nadim ok
but the subs need them separately as they create an object with |% and then calls a methos with |@s 21:58
at line 48 one can see what I do to handle the arguments, right now I know that only one is passed as I have not changed the calls in the tests 21:59
but something gets seriously messed up, I get test errors and then it used 140% cpu for ever 22:00
22:00 mcmillhj joined
timotimo if you've used to pass a lazy list before as one single thing 22:03
that'll now be flattened
22:03 cpage__ left
timotimo which will take forever 22:03
in general, *@ slurpies might behave unexpectedly when things that get passed are lists themselves 22:04
m: sub test(*@a) { .perl.say for @a }; test(<a b c>, 9, 9, 9)
camelia "a"
"b"
"c"
9
9
9
timotimo see how it flattens that into six arguments?
nadim yes, the for ever test is probably one of the infinite sequences
timotimo m: sub test(**@a) { .perl.say for @a }; test(<a b c>, 9, 9, 9)
camelia $("a", "b", "c")
9
9
9
timotimo this is probably what you want 22:05
22:05 mcmillhj left
nadim I will try 22:05
22:05 rindolf left
nadim I have modified all those I could to use |foo too 22:06
22:07 cpage_ joined
timotimo when you have |foo you can get at the nameds and the positionals individually through its .list and .hash methods 22:07
nadim ah!
timotimo m: sub test(|foo) { foo.list.perl.say; foo.hash.perl.say }; test(1, 2, 3, <a b c>, [9, 9], :foo, :!bar) 22:08
camelia (1, 2, 3, ("a", "b", "c"), [9, 9])
Map.new((:!bar,:foo))
nadim that may be a better way than **@a
timotimo yup
22:09 bwisti left
nadim all the methods and subs eventually get to one single method, I guess that one can also use the |foo style, it's a bit weird i must admt but let's try this 22:10
Skarsnik I wonder if you can found arm travis like stuff 22:11
*find 22:12
22:12 bwisti joined 22:13 Skarsnik left, wamba left 22:14 pompomcrab joined 22:20 mcmillhj joined
nadim timotimo: surprisingly, sub xxx(|args) { class.new(args.hash).method(args.list) } method new(*%hash) { ... } says: Too many positionals passed; expected 1 argument but got 2 22:25
22:26 mcmillhj left
timotimo you will still want to |args.list 22:28
and |args.hash, too
nadim ah! 22:29
timotimo what you get is still just a regular list and a regular map (aka the immutable version of a hash) 22:30
so that'll want to be flattened again
stmuk hmm the problem with testing something like Task::Star is the CI doesn't get run if an included module is updated 22:33
nadim all the test pass but I wonder about two things: the method new(*%options), still has the *
timotimo: and the final get_dump_lines(**@list, *%options) had to have **@list 22:34
22:35 setty1 left 22:36 TimToady left
nadim timotimo: maybe I should replace that with get_dump_lines(|args) and use args.hash<key> instead 22:36
22:37 TimToady joined
timotimo stmuk: at least travis allows you to run your tests weekly even if nothing has changed in your repo 22:37
22:40 mcmillhj joined 22:42 bwisti left 22:43 bwisti joined 22:45 mcmillhj left 22:48 cpage_ left
Geth ecosystem: 174dd1232a | (Tony O'Dell)++ (committed using GitHub Web editor) | META.list
JSON Parsing middleware for HTTP::Server-s
22:50
22:53 mcmillhj joined 22:58 mcmillhj left 23:00 adu joined 23:02 sivoais left 23:09 mcmillhj joined 23:15 mcmillhj left 23:20 cpage_ joined, Cabanossi left 23:21 afdafsdaf joined 23:23 Cabanossi joined 23:25 mcmillhj joined
Geth_ perl6.org: 8e18188ab0 | (Steve Mynott)++ | source/downloads/index.html
rakudo doesnt build on cygwin
23:25
23:29 deep-book-gk_ joined 23:30 mcmillhj left 23:31 afdafsdaf left, adu left 23:32 deep-book-gk_ left 23:37 zoll joined 23:41 mcmillhj joined 23:45 Celelibi left 23:46 mcmillhj left 23:51 Cabanossi left 23:52 adu joined 23:53 Cabanossi joined 23:57 Actualeyes left 23:59 pharv left