»ö« 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 Zoffix on 25 May 2018.
00:00 Xliff joined
Xliff m: "class GObject" ~~ / 00:00
camelia 5===SORRY!5===
Regex not terminated.
at <tmp>:1
------> 3"class GObject" ~~ /7⏏5<EOL>
Regex not terminated.
at <tmp>:1
------> 3"class GObject" ~~ /7⏏5<EOL>
Unable to parse regex; couldn't find final '/'
at <tmp>:1
--…
Xliff m: my rule c { 'class' \w+ }; "class GObject" ~~ /<c>/; $/.gist.say 00:01
camelia 「class GObject」
c => 「class GObject」
Xliff m: my rule c { 'class' [\w+]* % '::' }; "class GObject" ~~ /<c>/; $/.gist.say
camelia 「class GObject」
c => 「class GObject」
Xliff m: my rule c { 'class' [\w+]* % '::' }; "class GObject::A::C" ~~ /<c>/; $/.gist.say
camelia 「class GObject::A::C
c => 「class GObject::A::C
00:04 entonian left 00:05 hami left
kjk Zoffix: I see. thanks 00:06
hmm, maybe that (False or Empty is returned for the cases not covered by a conditional construct) should be added to the traps section in the doc? 00:20
Xliff If I have a rule definition, and I do _not_ want the auto whitespace behavior to work for a time, is there a way I can block that?
Zoffix ¯\_(ツ)_/¯ you got the commit bit to the docs repo, right?
timotimo Xliff: yes, you can use :!s for that or :!sigspace 00:21
Zoffix Xliff: it's :!s
00:24 sarna left
Xliff And would ":s" be enough to turn sigspace back on? 00:26
timotimo yes
Xliff That doesn't seem to be working.
timotimo can you demonstrate?
i'm not tip top on my sigspace, i tend to not use it at all to be honest 00:27
Zoffix Xliff: scope the :!s
m: say "a b c def g e h" ~~ /:s a b c [:!s "d" "e" "f" ] g e h/
camelia 「a b c def g e h」
00:35 markoong left 00:37 rindolf joined 00:46 zachk left 01:06 SCHAPiE joined 01:08 Kaiepi left 01:09 ufobat_ left 01:12 atweiden-air joined
atweiden-air in attempting to parameterize roles, i'm wondering about something 01:14
why is this ok: ix.io/1dBA 01:15
but this is not ok: ix.io/1dBB
and is this the expected behavior?
01:25 llfourn joined 01:28 sauvin_ is now known as sauvin
Zoffix atweiden-air: mostly guessing here: but in the working version, the `T` is known to be a type capture so it's resolved to proper type later on. In the non-working version, you're using a variable which at compile time is a `Mu`, so it's trying to find a `Mu` parametarized variant and it ain't present 01:34
Adding `[Mu]` variants of those roles makes it work and BEGIN-dumping `$type` shows it to be `Mu`. If you BEGIN-dump the `T`, it dumps as some low-level object without `.perl`, which probaby what makes the thing tick 01:36
01:37 cowens joined
atweiden-air 10-4 zoffix 01:43
01:45 Kaiepi joined 01:52 Xliff left 01:53 Xliff joined 02:02 molaf left
kjk is there a way to reload a module from the REPL? 02:03
Zoffix doubts 02:06
b2gills maybe EVALFILE 02:09
02:12 atweiden-air left 02:14 molaf joined 02:28 eliasr left
Zoffix Comments on news.perlfoundation.org get lost. 02:39
I recall someone saying their comment on my grant was lost and now I made a comment on news.perlfoundation.org/2018/06/gra...l#comments before there were any comments, but it didn't show up when 2 comments became visible and now there are 3 comments, but mine's missing
.tell [Coke] FYI it appears TPF's grant commenting page is losing some comments and it's been happening for possibly ~3m colabti.org/irclogger/irclogger_log...-06-17#l54 02:40
yoleaux Zoffix: I'll pass your message to [Coke].
02:42 Kaiepi left 02:46 perlpilot left 03:08 Zoffix left 03:17 Kaiepi joined 03:30 Sgeo joined 03:31 xtreak joined 03:33 Sgeo__ left 03:35 Kaiepi left 03:36 Kaiepi joined
MasterDuke yeah, i commented on a proposal (i've forgotten which one exactly) and it never showed up 03:51
04:12 xtreak left 04:32 ZofBot joined, ChanServ sets mode: +v ZofBot 04:33 xtreak joined 04:39 ZofBot left, ZofBot joined, ChanServ sets mode: +v ZofBot 04:54 Zoffix joined
Zoffix m: hyper for ^$*TOLERANCE { try 「constant $*Z = <z>」.EVAL; try say substr ~$!, (^∞ .grep: *.is-prime)[chars(~$!)/$*THREAD.id] and last } 05:07
camelia moron
Zoffix :o
^_^
05:15 kurahaupo left, kurahaupo_ joined 05:18 benjikun2 is now known as benjikun
benjikun imgur.com/a/8b0qiy7 05:18
Zoffix no face? :) 05:23
benjikun not sure how to make one look natural 05:24
Zoffix I like the colours. Could try one of regular camelias with them for Alt-Variants github.com/perl6/marketing/tree/ma...t-Variants
benjikun I'll give it a go, one minute 05:25
ingy is the `perl6` binary installed as a name not containing /perl/?
ie I don't see `rakudo` in my PATH as an alias 05:26
Zoffix ingy: it's not really a binary. Just a shell script for calling something like: exec /home/zoffix/R/install/bin/moar --execname="$0" --libpath="." --libpath="blib" --libpath="/home/zoffix/R/install/share/nqp/lib" --libpath="/home/zoffix/R/install/share/nqp/lib" /home/zoffix/R/rakudo/perl6.moarvm --nqp-lib=blib "$@"
ingy: ah, no, no "rakudo" aliases.
ingy that's a shame :) 05:27
Zoffix points to github.com/rakudo/rakudo/issues/new
:)
ingy check this out: gist.github.com/ingydotnet/041f274...a32c7adeec 05:28
I can run testml (or any other language) with perl5 or prove 05:29
as long as the $bin-name !~~ /perl/
Zoffix heh
ingy so you could write test.t with '#!/usr/bin/env p6' 05:30
and then just 'prove t/*.t'
no --exec 05:31
that's exactly why testml has a testml-pl5 and testml-pl6 aliases
Zoffix `zef test` is shorter :)
ingy github.com/testml-lang/testml/tree/master/bin 05:32
but prove is everywhere
and I can have a t/ suite with perl6, perl5, bash tests whatevr 05:33
can zef handle that?
Zoffix no idea 05:34
ingy I've bee doing that for years: github.com/ingydotnet/json-bash/tr...aster/test
prove test # bash tap tests
when people see a t/ dir in anything perl they think `prove` not `zef`, a million to one 05:37
kent\n if you go down that line of logic, you're gonna find that same group of people who think 'perl' means "perl 5" 05:38
expecting perl5 tools to work with perl6 would be the anomalous expectation 05:39
ingy perhaps, but expecting prove to work anywhere is probably a lot more common tha ever having heard of zef 05:40
and prove is already everywhere that perl is
kent\n if you're working with a perl6 project ... expecting to not have a perl6 installation would be ... strange. 05:41
ingy all I'm saying is that if perl6 installed an alias p6 and people wrote their .t tests with it
then prove (and zef) works
yeah but I never heard of zef until a week ago nor did I know it ran tests until 5 minutes ago 05:42
Zoffix :D
ingy and it will be replaced by zzz in a year
way easier to type 05:43
;)
kent\n its only the recommended package mangler for perl6, so *shrug* ( eg: its akin to not knowing about the 'cpan' tool )
perl6.org/getting-started/ # documented here 05:44
benjikun Zoffix: added some more variants imgur.com/a/8b0qiy7 05:45
05:45 Kaiepi left
ingy I guess I'll have to patch zef to run foo.t with '#!/usr/bin/env testml-pl6' content 05:46
Zoffix benjikun: needs a face :) Right now it looks as much a flower as a butterfly 05:51
ingy or antenae 05:52
benjikun Zoffix: I like how actual butterfly heads look but I don't think I can recreate that much lol 05:54
1d59b73swr1f1swu2v451xcx-wpengine...._bartz.jpg
like that
ingy I just cloned [email@hidden.address] and ran `zef test` and it barfed 05:56
PERL6LIB=lib prove -lv --exec=perl6 t # worked 05:57
anywho... 05:58
I should zzzleep 05:59
yapc is tomorrow
benjikun you're going to that? 06:01
wish I could
ingy I wish you could too! 06:03
benjikun :) 06:04
06:06 psychoslave_ joined 06:09 xtreak left 06:11 xtreak joined 06:22 psychoslave_ left 06:46 hythm_ joined
Xliff What is the best way to convert Int to int32? 07:02
07:07 wamba joined 07:11 darutoko joined
moritz my Int $x = 12345; my int32 $y = $x 07:17
m: my Int $x = 12345; my int32 $y = $x; say $y
camelia 12345
07:25 Xliff left 07:26 domidumont joined 07:33 domidumont left, domidumont joined 07:34 sarna joined 07:37 hythm_ left
Geth doc: Kaiepi++ created pull request #2103:
Fix p6doc build errors
07:39
sarna hi o/ 07:49
07:57 wamba left 08:00 xtreak left
Geth doc: f5cb4f034f | (Christian Bartolomäus)++ (committed using GitHub Web editor) | doc/Language/concurrency.pod6
Use different case for value and method name
08:15
synopsebot_ Link: doc.perl6.org/language/concurrency
08:25 kurahaupo joined 08:28 kurahaupo_ left, sarna_ joined 08:50 dct joined
sarna_ m: my %foo = %(<1 2 3> => "foo"); %foo<<1 2 3>> 08:57
camelia ( no output )
sarna_ m: my %foo = %(<1 2 3> => "foo"); say %foo<<1 2 3>> 08:58
camelia ((Any) (Any) (Any))
sarna_ what's going on guys D:
08:58 Xliff joined
sarna_ one can't create hashes with lists as keys? 08:58
08:58 Xliff left 08:59 Xliff joined 09:02 domidumont left
tobs sarna_: class Hash: Mapping from strings to itemized values 09:03
sarna_ tobs: ah well, thank you 09:04
tobs m: my Hash[Int,List] $h .= new; $h{$[1,2,3,4]} = 5; say $h.keys
camelia ([1 2 3 4])
tobs sarna_: see also docs.perl6.org/language/hashmap#No...ject_hash)
sarna_ tobs: thanks _/\_ 09:05
09:16 eliasr joined 09:24 ufobat_ joined
sarna_ `Invocant of method 'AT-KEY' must be an object instance of type 'Hash[Hash,Str]', not a type object of type 'Hash[Hash,Str]'. Did you forget a '.new'?` 09:31
what could this error mean? I'm taking a hash as an argument to a function, and the error points at when I get values from it
moritz sarna_: it seems you have passed a type object and not an actual hash to it 09:40
sarna_: try printing out %yourhash.defined
09:40 dct left
sarna_ moritz: it gives me a True 09:41
moritz sarna_: is this a nested hash access, by chance?
sarna_ moritz: precisely 09:42
moritz sarna_: then try at the second level too
AlexDaniel benjikun: soo… will you commit these to github.com/perl6/marketing/tree/ma...t-Variants ? Or if not, can we have an .svg with a specified license? :)
sarna_ moritz: oh! I know where I goofed up, thank you :)
AlexDaniel I feel like these could be useful in some contexts
09:48 jmerelo joined
sarna_ m: my Hash[Hash, Str] %hash = %(foo => %(bar => "baz")) 09:49
camelia Type check failed in assignment to %hash; expected Hash[Hash,Str] but got Hash (${:bar("baz")})
in block <unit> at <tmp> line 1
sarna_ what's wrong here?
moritz sarna_: one level of hash is implied by the % sigil
sarna_ moritz: %%?
moritz I see no %% anywhere 09:50
sarna_ moritz: I mean, should I write %% to indicate two levels of hashes
moritz no
jmerelo m: my Hash[Hash, Str] %hash := %(foo => %(bar => "baz"))
camelia Type check failed in binding; expected Associative[Hash[Hash,Str]] but got Hash (${:foo(${:bar("baz")})})
in block <unit> at <tmp> line 1
moritz also, the %( ... ) constructs returns just a Hash, not a Hash[ your types here] 09:51
sarna_ oh darn
I have to .= new and push?
moritz m: my Str %h = my Hash[Str] % = (a => 'b')
camelia Type check failed in assignment to %; expected Hash[Str] but got Str ("b")
in block <unit> at <tmp> line 1
moritz m: my Str %h = my Hash[Str] % = %(a => 'b') 09:52
camelia Type check failed in assignment to %; expected Hash[Str] but got Str ("b")
in block <unit> at <tmp> line 1
jmerelo m: my Hash %hash{Str} := %(foo => %(bar => "baz"))
camelia Type check failed in binding; expected Associative[Hash,Str] but got Hash (${:foo(${:bar("baz")})})
in block <unit> at <tmp> line 1
moritz m: my Str %h = Hash[Str].new(a => 'b')
camelia ( no output )
jmerelo m: my Hash %hash{Hash} := %(foo => %(bar => "baz"))
camelia Type check failed in binding; expected Associative[Hash,Hash] but got Hash (${:foo(${:bar("baz")})})
in block <unit> at <tmp> line 1
moritz m: my Str %h := Hash[Str].new(a => 'b') 09:53
camelia ( no output )
moritz m: my Hash[Str] %h := Hash[Hash[Str]].new(a => %( c => 'b'))
camelia ( no output )
moritz sarna_: ^^ this is an example of a two-level typed hash and how to initialize it
sarna_ thank you moritz! 09:54
.hug moritz
huggable hugs moritz
moritz my pleasure :-) 09:55
El_Che .slap moritz around a bit with a big mstrout 10:04
the bot is broken :)
sarna_ Oo 10:05
moritz hugs El_Che 10:08
El_Che .slap .slap .slap
to late
El_Che hygs back
El_Che hugs back
10:09 markoong joined
moritz slapping and hugging, sounds kinky :) 10:11
El_Che hehe
jmerelo moritz: and concurrent in a thread-safe way. 10:15
10:22 wamba joined 10:29 sena_kun joined 10:34 sarna left
sarna_ I have the weirdest bug now :( 10:37
I have an empty hash, and I have an if condition that checks if stuff in this hash is defined 10:38
the hash is empty, but %h<foo>.defined returns True
`say %h.kv` prints `()` 10:39
AlexDaniel what about %h<foo>:exists ? :) 10:47
sarna_ AlexDaniel: "No such method 'exists' for invocant of type 'List'" 10:48
oh wait, it interprets it as a list 10:49
I know what's happening
or do I
I don't, nvm
AlexDaniel sarna_: alright, code? 10:50
sarna_ AlexDaniel: well, it's 100 lines, and I couldn't isolate it. it's a CLI Connect Four clone 10:52
AlexDaniel maybe `dd %h` ?
jmerelo sarna_: you might have used := instead of = to define the hash and it's been bound to a list. Could that be? 10:53
sarna_ AlexDaniel: Hash %cands = {}
jmerelo sarna_: ah, that's a trap
sarna_ Oo 10:54
jmerelo sarna_: docs.perl6.org/language/traps#Bloc..._ambiguity
No, wait, not that.
sarna_: but basically, that's the thing. {} is a block. use %() for an empty hash 10:55
jmerelo seems to remember that was documented somewhere
sarna_ jmerelo: I'm creating it with .= new
I've changed it to = %() now and it behaves in the same way 10:56
jmerelo sarna_: you can probably isolate that particular code. If you can't, do as above, use dd or %cands.^name, %cands.keys, and so on... 10:57
sarna_ jmerelo: p.teknik.io/bU0Go 10:58
oh I forgot to delete my debug prints
sarna_ blushes
Geth doc: caae9bab66 | (JJ Merelo)++ | 2 files
Changes and reflows identifier introduction
doc: 7becfc7ac3 | (JJ Merelo)++ | doc/Language/syntax.pod6
Adds documentation on extended syntax

It was used in examples, but not really mentioned. Closes #2101.
synopsebot_ Link: doc.perl6.org/language/syntax
jmerelo sarna_: what does dd %cands print? 10:59
sarna_ jmerelo: Hash %cands = {} 11:00
it's empty, and it should be empty
it's just that .defined shouldn't return True
nor shouldn't it be interpreted as a List 11:01
11:03 MDtox joined 11:06 MDtox left
jmerelo m: my Hash %cands = %(); say %cands.^name; say %cands{'foo'}:exists 11:09
camelia Hash[Hash]
False
sarna_ why doesn't it exist?
jmerelo m: my Hash %cands = {}; say %cands.^name; say %cands{'foo'}:exists
camelia Potential difficulties:
Useless use of hash composer on right side of hash assignment; did you mean := instead?
at <tmp>:1
------> 3my Hash %cands = {}7⏏5; say %cands.^name; say %cands{'foo'}:ex
Hash[Hash]
False
sarna_ oh sorry I misread
jmerelo m: my %cands = %(); say %cands.^name; say %cands{'foo'}:exists 11:10
camelia Hash
False
sarna_ You can't adverb &infix:<&&> --> f $x ≠ 1 && %cands{($x-1 ~ $y-1)}:exists⏏ 11:12
well, I had to convert `&&` into `and` 11:15
weird
ahh and 11:18
m: my %h = %(foo => 2); %h<'f' ~ 'oo'>
camelia ( no output )
sarna_ m: my %h = %(foo => 2); say %h<'f' ~ 'oo'>
camelia ((Any) (Any) (Any))
sarna_ that's my problem 11:19
jmerelo m: m: my %h = %(foo => 2); %h<'f' ~ 'oo'>
camelia ( no output )
jmerelo m: m: my %h = %(foo => 2); %h<'f' ~ 'oo'>; say %h.keys 11:20
camelia (foo)
jmerelo m: m: my %h = %(foo => 2); %h<'f' ~ 'oo'>; say %h.keys; say %h<foo>:exists
camelia (foo)
True
sarna_ rakudo interprets <'f' ~ 'oo'> as a three element list I think
m: say <'f' ~ 'oo'>
camelia ('f' ~ 'oo')
jmerelo sarna_: <> put quotes around whatever you do 11:21
sarna_ jmerelo: lisp in a perl
jmerelo m: say <'f' ~ 'oo'> == ['f','~','oo'].join("") 11:22
camelia Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5f~oo' (indicated by ⏏)
in block <unit> at <tmp> line 1
jmerelo m: say <'f' ~ 'oo'> eq ['f','~','oo'].join("")
camelia False
jmerelo m: say ['f','~','oo'].join("")
camelia f~oo
jmerelo m: say <f ~ oo>.join("")
camelia f~oo
jmerelo m: say <'f' ~ 'oo'> eqv ['f','~','oo'].join("")
camelia False
jmerelo Um, whatever 11:23
sarna_ jmerelo: anyway, thanks for helping me out :) the thing I had to do was to use {} instead of <>
jmerelo sarna_: good luck :-)
sarna_ jmerelo: same to you!
11:27 jmerelo left
tobs m: <'f' ~ 'oo'> eqv ["'f'","~","'oo'"].List 11:27
camelia WARNINGS for <tmp>:
Useless use of "eqv" in expression "<'f' ~ 'oo'> eqv [\"'f'\",\"~\",\"'oo'\"].List" in sink context (line 1)
tobs m: say <'f' ~ 'oo'> eqv ["'f'","~","'oo'"].List
camelia True
sarna_ :) 11:32
11:37 sarna_ left 11:42 Schepeers left 11:46 sarna joined 11:48 benjikun2 joined 11:50 benjikun left 11:51 Schepeers joined 12:05 jeromelanteri joined
jeromelanteri with spacemacs, perl6 layers installation failed (test failed): develop.spacemacs.org/layers/+lang/...EADME.html 12:06
if someone who use emacs / spacemacs know what i can do for understand more why it failed and eventualy how to fix this...
12:08 hami joined 12:19 xtreak joined 12:23 hami left
AlexDaniel jeromelanteri: what's the error? 12:24
jeromelanteri AlexDaniel, from spacemacs, i added "perl6" as layer, then SPC f e R and i can only see TEST FAILED (the questions are: how to see more error / how to know why ? and How to eventually fix this ?) 12:25
AlexDaniel hm maybe it's time to try spacemacs again for me… 12:28
let me restart emacs realquick :)
12:28 AlexDaniel left
jeromelanteri thank you 12:28
AlexDaniel`` I guess that'll take some time to install… :) 12:31
jeromelanteri: while I'm doing that, I can say that emacs with perl6-mode works fine by itself
I think spacemacs should show a list of failed tests somewhere 12:32
but quick googling didn't show up any good results
jeromelanteri AlexDaniel``, perl6-mode seems to works yes... i'm a newbie on emacs/spacemacs (usually i use vim). SO it should have a key combinaison for see some more rrors from test failed... 12:33
12:33 domidumont joined
jeromelanteri yes, duckducking doesn't show any answer on this request to... 12:33
12:33 AlexDaniel joined
AlexDaniel hello from spacemacs! :) 12:34
AlexDaniel`` maybe I should consider trying spacemacs for real now… especially given that there's a perl6 layer 12:36
ok I see a failing test in perl6 12:37
it's really cool that it comes with tests now 12:39
I don't remember that a few years ago when I tried it
sarna the vim plugin is v nice too 12:40
I use it with neovim
vscode plugin is broken
sarna doesn't know if it's any relevant
AlexDaniel jeromelanteri: I guess I'm also a noob in this question, so maybe we should go to #spacemacs if that's a thing 12:43
AlexDaniel`` Ah it's not, but they have gitter IIRC 12:44
AlexDaniel OK I asked a question there, let's see how it goes… 12:51
12:53 wamba left, wamba joined
jeromelanteri thank you again to try to help me with that 12:55
AlexDaniel hmm, looks like my message from over the Matrix bridge got lost, ok I'll send it again natively… 13:01
13:08 kurahaupo left, kurahaupo_ joined
hoelzro o/ #perl6 13:16
so, I figured out that Linenoise resources issue 13:17
if you look here: github.com/rakudo/rakudo/blob/b34d...y.pm6#L194 13:18
$home ('/home/rob/.perl6' for me) is used as the lookup key for $repos, but the actual key is something like 'inst#/home/rob/.perl6' rather than '/home/rob/.perl6'
when I changed that line to my $repo := nqp::atkey($repos, 'inst#' ~ $home), the Linenoise issue went away 13:19
but that change feels a little fragile - if someone more familiar with that code sees this, could they vet that idea or at least propose an alternative?
in the meantime, maybe I'll file an issue/make a PR 13:20
interestingly enough, github.com/rakudo/rakudo/blob/b34d...ry.pm6#L99 looks like it's starting to compensate for this issue? 13:21
El_Che, sarna: you two might be interested in ^
I have to walk my dog and prepare for a party I'm throwing, but I'll write up my findings in that Linenoise issue
AlexDaniel hoelzro: maybe also a rakudo ticket is needed 13:24
hoelzro AlexDaniel: yeah, I'll write that up too 13:31
sarna hoelzro: sweet, thanks for investigating :) and have fun at the party! 13:37
13:38 itaipu joined, dct joined
AlexDaniel jeromelanteri: I think I see something 13:47
jeromelanteri: oh yeah I think I figured it out! 13:50
let me restart to try that out…
13:51 AlexDaniel left, ChoHag left
AlexDaniel`` so as far as I can see this is what happens 13:52
there's `master` and `develop` braches
13:52 ChoHag joined
AlexDaniel`` I guess `master` is stable but it's a little bit old 13:53
there are no perl5 or perl6 layers in master
so you'll have to go to .emacs.d/ directory and do `git checkout develop`
13:54 dct left
AlexDaniel`` it says “VERSION 0.300 IS ALMOST OUT!” so I guess this issue will go away soon 13:55
13:56 AlexDaniel joined
AlexDaniel jeromelanteri: yeah! That works! 13:57
sarna: it seems like the default configuration in spacemacs is a bit more advanced 13:58
sarna: e.g. it automatically highlights lines with syntax errors
I guess the only missing thing is moar debugger :) 13:59
jeromelanteri AlexDaniel, it works for you ? what are you doing for this perl6 layer to work with spacemacs ? 14:03
hoelzro rakudobugs are on GitHub, not RT now - right? 14:04
AlexDaniel`` hoelzro: yes, unless you have some problem with GH
hoelzro: RT tickets are also looked at
hoelzro I don't in particular - just checking :)
AlexDaniel`` jeromelanteri: as I said a few messages above
jeromelanteri ho yes, sorry, just read it now... 14:05
AlexDaniel`` jeromelanteri: perl6 layer will be included in the upcoming version of spacemacs, so that issue will go away once it is released… but for now you'll have to switch to `develop` branch
interestingly perl5 layer is in the same situation :)
jeromelanteri AlexDaniel``, very good, that's fine there with develop branch 14:06
thank you very much 14:07
14:10 AlexDaniel left
sarna AlexDaniel: o, I'll have to try it out 14:10
14:12 aindilis left 14:19 fatguy joined 14:20 jeromelanteri left 14:24 aindilis joined 14:26 HaraldJoerg joined 14:27 kjk left, kjk joined
kjk given a sub, is there a way to check if it's a proto? 14:29
timotimo m: proto sub test() {*}; say &test.^methods
camelia (package <anon> candidates soft <anon> <anon> <anon> cando <anon> yada <anon> wrap onlystar perl <anon> <anon> unwrap multi <anon> <anon> <anon> <anon> leave <anon> <anon> <anon> <anon> BUILDALL of <anon> set_why returns has-phasers <anon> <anon> perl…
timotimo m: proto sub test() {*}; say &test.^methods.grep(*.name ne "<anon">) 14:30
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing required term after infix
at <tmp>:1
------> 3y &test.^methods.grep(*.name ne "<anon">7⏏5)
expecting any of:
prefix
term
timotimo m: proto sub test() {*}; say &test.^methods.grep(*.name ne "<anon>")
camelia (package unwrap leave cando wrap soft multi candidates yada perl onlystar BUILDALL set_why returns WHY phasers pos has-phasers has-phaser fire_phasers perl of fire_if_phasers add_phaser BUILDALL assuming static_id prec outer count ACCEPTS returns new …
timotimo m: sub test() {*}; say &test.^methods.grep(*.name ne "<anon>")
camelia (yada soft onlystar cando wrap unwrap multi leave perl package candidates BUILDALL phasers has-phasers fire_phasers WHY returns has-phaser of add_phaser set_why pos fire_if_phasers perl BUILDALL count Capture ACCEPTS static_id outer returns prec Str s…
timotimo m: proto sub meep() {*}; multi sub moop() {}; say &meep.^methods.grep(*.name ne "<anon>").Set (-) &moop.^methods.grep(*.name ne "<anon>").Set 14:31
camelia set()
timotimo well, at least multis and protos have the same methods
m: proto sub meep() {*}; sub moop() {}; say &meep.^methods.grep(*.name ne "<anon>").Set (-) &moop.^methods.grep(*.name ne "<anon>").Set
camelia set()
timotimo if the proto only has the * in it, then the onlystar method would give you true
oh, of course, when you have "multi sub foo" then &foo will refer to the auto-generated proto (or the one that already existed in an outer-er scope) 14:32
14:36 benjikun2 left, zakharyas joined
kjk timotimo: thanks, I'll think about it more 14:37
14:38 araraloren left 14:39 araraloren joined, lizmat left
timotimo m: proto sub meep() {*}; sub moop() {}; say &meep.^methods.grep(*.name ne "<anon>").Set (-) &moop.candidates[0].^methods.grep(*.name ne "<anon>").Set 14:40
camelia set()
14:40 sno left
kjk looks like the auto-generated proto has onlystar, but if I declare a proto myself it doesn't 14:41
and what does onlystar mean? 14:44
14:44 sno joined
timotimo basically "the proto does nothing other than call the appropriate candidate" 14:47
except of course limit what signatures are allowed 14:48
14:48 lizmat joined 14:49 fatguy left
kjk is there a built-in way to add meta info to objects in perl6 14:52
14:53 lizmat left, lizmat joined 14:57 sno left
kjk ok, it looks like if I declare a proto myself, I *have to* put only the * in its body (hmm, so that's what onlystar means?) otherwise, its multis won't work 15:02
timotimo you should either have the whole body be {*}, or have a {*} somewhere in it
15:02 xtreak left
timotimo m: proto sub doIt(|) { say "doing it"; {*} }; multi sub doIt(Str) { say "string" }; multi sub doIt(Int) { say "int" }; doIt("hi"); doIt(99) 15:03
camelia doing it
string
doing it
int
timotimo m: proto sub doIt(|) { say "doing it"; }; multi sub doIt(Str) { say "string" }; multi sub doIt(Int) { say "int" }; doIt("hi"); doIt(99)
camelia doing it
doing it
kjk timotimo: I see. So, * is like telling it to dispatch to its multis
timotimo yeah, that's how i think of it
kjk p6: proto p(|) { say "ppppp"; {*} }; multi p(Int $i) { $i }; p(123) 15:12
camelia ppppp
kjk 123 was not returned...
p6: proto p(|) { say "ppppp"; return {*} }; multi p(Int $i) { $i }; p(123) 15:14
camelia ppppp
kjk p6: proto p(|) { say "ppppp"; return {*} }; multi p(Int $i) { return $i }; p(123)
camelia ppppp
kjk p6: proto p(| --> Any) { say "ppppp"; return {*} }; multi p(Int $i --> Int) { return $i }; p(123) 15:15
camelia ppppp
kjk :( how to make it work
15:18 skids joined
tobs kjk: ENOSAY 15:19
geekosaur ^ remember the bot doesn't automatically "say" results
kjk it also doesn't return 123 in the REPL 15:21
gotta go, will check when I get back. 15:22
15:22 xtreak joined, aindilis left
tobs m: proto p(|) { say "ppppp"; {*} }; multi p(Int $i) { $i }; p(123).say 15:23
camelia ppppp
123
15:27 aindilis joined 15:32 aindilis left 15:33 dct joined, zakharyas left 15:35 zakharyas joined 15:36 zakharyas left 15:37 zakharyas joined 15:41 dct left 15:44 dha joined 15:52 xtreak left 15:54 MasterDuke left, sno joined 15:58 kurahaupo_ left, kurahaupo joined 16:02 MasterDuke joined 16:13 AlexDaniel joined 16:29 zakharyas left, frobisher joined 16:32 dha left
kjk alright, yeah it works, it's only that if a sub prints something in addition to returning a result, the repl or the bot doesn't show the returned result. 16:36
geekosaur not never shows them. repl… is trickier 16:42
16:44 xtreak joined 16:47 frobisher left 16:48 AlexDaniel left, sena_kun left, AlexDaniel joined, sena_kun joined
timotimo if you output something, it says "ah, you're probably not interested in the return value, then" 16:55
especially so that you don't get a "True" after every line that has a "say" in it 16:56
17:02 MasterDuke left 17:04 xtreak left 17:08 frobisher joined
Zoffix kjk: protos return True for is_dispatcher 17:08
m: sub bar {}; multi foo {}; .is_dispatcher.say for &bar, &foo, &foo.candidates.head 17:09
camelia False
True
False
17:09 zakharyas joined
Zoffix and yeah, that's what onlystar meanas 17:10
17:11 MasterDuke joined
Zoffix sarna: just use curlies instead of angle brackets if you don't want autoquoting: my %h = %(foo => 2); say %h{'f' ~ 'oo'} 17:27
sarna: and I didn't look at your code, but I'm guessing you used angle brackets instead of curlies with ^ that and that caused it to be a 3-item list, which is a slice, so it was returning a 3-el list of Any typeobjects, and you were calling .defined on it (and it is) 17:30
17:39 dct joined, araraloren left 17:45 frobisher is now known as dha 17:50 Schepeers left 17:59 itaipu left 18:00 itaipu joined 18:06 sarna left 18:10 sarna joined
sarna Zoffix: yes, precisely 18:10
Zoffix: I thought foo<bar> was the syntax for getting stuff out of hashes 18:11
El_Che < > means auto quotiong
%hash{$var} is with interpolation
Zoffix sarna: foo<bar> is shorthand for foo{val 'bar'} 18:12
timotimo tbh, i wouldn't call that interpolation
El_Che %hash<var> is the same %hash{'var"}
' ''
' '
Zoffix Not the same. `< >` creates allomorphs, `' '` doesn't
sarna what does `val` mean?
Zoffix m: my %h := :{ <42> => "forty two" }; say %h{'42'}; say %h<42> 18:13
camelia (Any)
forty two
Zoffix sarna: it's a function call docs.perl6.org/routine/val.html
hmm
m: dd val '42 foo'
camelia "42 foo"
Zoffix Ah, right
sarna oh 18:14
Zoffix sarna: correction, it's `val 'bar'` only up to a point. `< >` breaks on whitespace to make lists, so it'd be like `foo{'bar'.words».&val}` tho I don't know if .words and <> use the same rules for whitespace breaking
m: dd val '42' 18:15
camelia IntStr.new(42, "42")
sarna Zoffix: I see, thank you
Zoffix sarna: the < ... > is documented here: docs.perl6.org/language/quoting#Wo...g:_%3C_%3E
Geth doc: 85acff619a | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/quoting.pod6
Fix wrong tense of the word
18:16
synopsebot_ Link: doc.perl6.org/language/quoting
18:18 dct left
sarna and the last thing - why :{} ? 18:20
Zoffix sarna: {} is a Hash with Str keys. :{} is an object hash with Any keys 18:21
m: dd :{}
camelia :{}
Zoffix um
sarna Zoffix: makes sense, thanks! 18:22
.hug Zoffix
huggable hugs Zoffix
Zoffix m: dd :{}.^name
camelia "Hash[Mu,Any]"
Zoffix .of gives you parametarization of values, which one is the one for keys, I forget? 18:24
.keyof
m: say [.of, .keyof] for {}, :{}, (my Str %h), (my %{DateTime}), (my Int %h{Date})
camelia Potential difficulties:
Redeclaration of symbol '%h'
at <tmp>:1
------> 3 %h), (my %{DateTime}), (my Int %h{Date}7⏏5)
[(Mu) (Str(Any))]
[(Mu) (Any)]
[(Int) (Date)]
[(Any) (DateTime)]
[(Int) (Date)]
Zoffix m: say [.of, .keyof] for {}, :{}, (my Str %h), (my %h3{DateTime}), (my Int %h2{Date}) 18:25
camelia [(Mu) (Str(Any))]
[(Mu) (Any)]
[(Str) (Str(Any))]
[(Any) (DateTime)]
[(Int) (Date)]
sarna :^)
kjk Zoffix: thanks for the is_dispatcher tip, that's exactly what I want
it works, but I don't see the is_dispatcher method listed for Sub or its ancestors though... 18:27
Zoffix prolly one of those <anon>s 18:28
kjk ic, so does that mean it's considered an internal method? 18:29
Zoffix Not really, it's just added really early and I guess the way it's added makes it nameless.
Wonder if simply giving this sub the name here would make the method have a name: github.com/rakudo/rakudo/blob/mast....nqp#L1861 18:30
kjk interesting 18:31
18:31 domidumont left 18:32 Schepeers joined 18:35 dha left 18:46 psychoslave_ joined
El_Che AlexDaniel: it would be great if hoelzro++ PR would be added to the new release 18:50
I suspect that many people will end up with an install without Linenoise *and* Readline instead 18:51
AlexDaniel El_Che: I'm ok with that
El_Che great to hear
AlexDaniel won't merge right away in case someone has comments
but you can consider it to be in :)
18:53 psychoslave_ left 18:55 dwarring joined
hoelzro I should add it passes all tests - but unless things have changed around CURLIs and such, I wouldn't mind nine's input 18:58
(dunno if nine is still the authority on that stuff)
Zoffix pretty much. ugexe too 19:04
hoelzro oh, thanks Zoffix - good point 19:06
19:07 darutoko left, Schepeers left 19:08 Schepeers joined 19:09 itaipu left
Zoffix .ask TimToady my bot is asking whether you had the time to think more about HyperWhatevers. Original discussion: colabti.org/irclogger/irclogger_log...-02-07#l48 19:10
yoleaux Zoffix: I'll pass your message to TimToady.
19:13 espadrine joined 19:15 sena_kun left
zostay @lizmat: thx so much for the class, but just wanted to let you know I may not return this afternoon due to wanting to work on my talk a bit more 19:21
Zoffix zostay: FWIW, at least my IRC client doesn't highlight for @nick. You should use the nick by itself, without any symbols. 19:24
lizmat: ^ you got a message there for you 19:25
like that :)
19:30 zakharyas left
Zoffix e: use Test; class Ber::Meow {}; my \ClassDefs := 「my role Foo::Bar2[::T] {}; my class Ber::Meow2 {}; 」; throws-like ClassDefs ~ 「my Foo::Bar2[Ber::Meow2] constant mts7 = 42」, X::TypeCheck; EVAL ClassDefs ~ 「our Foo::Bar2[Ber::Meow2] constant ots7 = 42」; 19:31
evalable6 (exit code 1) 1..2
not ok 1 - 'my role Foo::Bar2[::T] {}; my class Ber::Meow2 {}; …
Zoffix, Full output: gist.github.com/6abe100358c862114e...99686cffe7
Zoffix "Redeclaration of symbol 'Ber::Meow2'" .... what is it smoking? It's not redeclared... 19:32
moritz it's not? 19:35
19:35 dct joined
Zoffix moritz: I don't see where... 19:35
moritz m: { class Ber::Meow2 {} }; { class Ber::Meow2 } 19:36
camelia 5===SORRY!5=== Error while compiling <tmp>
Redeclaration of symbol 'Ber::Meow2'
at <tmp>:1
------> 3ass Ber::Meow2 {} }; { class Ber::Meow2 7⏏5}
expecting any of:
generic role
Zoffix moritz: but I'm using Str throws-like
e: use Test; throws-like 'my class Foo {}; die', X::AdHoc; throws-like 'my class Foo {}; die', X::AdHoc
evalable6 1..2
ok 1 - 'my class Foo {}; die' died
ok 2 - right exception type (X::AdHoc)…
Zoffix, Full output: gist.github.com/9e01d0c675e8be0f28...b3fe42712f
moritz m: { class Ber::Meow2 {} }; { my class Ber::Meow2 } 19:37
camelia 5===SORRY!5=== Error while compiling <tmp>
Redeclaration of symbol 'Ber::Meow2'
at <tmp>:1
------> 3 Ber::Meow2 {} }; { my class Ber::Meow2 7⏏5}
expecting any of:
generic role
moritz Zoffix: I think "my" and ::-joined class names don't mix well 19:38
everythiing that contains :: is global pretty much by definition
Zoffix m: { my class Ber::Meow2 {} }; { my class Ber::Meow2 {} }
camelia ( no output )
Zoffix hm, I see `throws-like` uses EVAL $code, context => CALLER::CALLER::CALLER::CALLER::; 19:39
moritz how does that work? with two my's?
Zoffix moritz: I don't know 19:40
m: { my class Ber::Meow2 { method z { say "first" } }.z }; { my class Ber::Meow2 { method z { say "second" } }.z }
camelia first
second
geekosaur I would assume that means the first one doesn't leak out of its scope. In the earlier one, it's visible outside of its scope and so the later my conflicts
which might mean some thought needed as to if and/or how a local redeclaration should shadow an existing outer-scope name 19:41
Zoffix ohhhh 19:42
Now I get it
m: class Ber::Whatever {}; { my class Ber::Meow2 {} }; { my class Ber::Meow2 {} }
camelia 5===SORRY!5=== Error while compiling <tmp>
Redeclaration of symbol 'Ber::Meow2'
at <tmp>:1
------> 3s Ber::Meow2 {} }; { my class Ber::Meow27⏏5 {} }
expecting any of:
generic role
geekosaur hm
maybe not
Zoffix If package your `my` is being sticked into exists already then it remains and conflics with the other one or something
geekosaur but then I have no idea what :: means in a local name
er, a lexical name
Zoffix neither 19:43
geekosaur lexically scoped
and yes, package / namespace leakage is still a thing
hm, actually that seems even weirder because if it's following normal namespacing rules, the first one would ne Ber::Whatever::Ber::Meow2 and you'd need to start it with :: to avoid 19:44
iirc 19:45
"my" kinda weird the whole thing
19:46 aindilis joined 19:48 raschipi joined
zostay Blah, I didn't mean to at the @... Meh 19:50
geekosaur muscle memory? :p 19:51
zostay More or less 19:53
20:01 dct left 20:25 ufobat_ left 20:29 kalkin- joined
kalkin- hi 20:29
How can I wrap a C function which receives variadic arguments with Nativecall? 20:30
i.e man 3 sd_journal_print
geekosaur you can't, basically 20:33
nor by any other way that doesn;t go through an actiual C compiler
stdarg / varargs is … difficult 20:34
kalkin- geekosaur: thanks 20:36
moritz you could emulate the sprintf-style part in Perl 6 20:41
and only pass a single string to the underlying C function
geekosaur you still have to deal with the calling convention being different 20:43
and yes, it is different
20:46 sarna left
raschipi I find it very strange that C needs hacks to pass arguments in variadic functions, since the data structure used is a stack... Like, why? How can it be difficult to put more items in a stack... 20:47
geekosaur because C can decide to pass in registers 20:48
and x86-64 often does so
so there's some other thing you need to know about for that platform to tell it which args are in registers. and may differ between windows, linux, etc.
C hasn't been K&R C for several decades
raschipi Right, but as soon as it runs out of registers, it puts the remaining arguments on the stack, why does it have problems putting more in there? 20:49
I'm sure there's a good explanation, I just don't know what it is. 20:51
geekosaur because you can have an ABI that says "fixed in regs, var on stack" and now you have to know the declaration to know how to lay them iyt
out
which NativeCall does not and can not know, by design
it knows a symbol name in a shared object 20:52
20:52 rindolf left
raschipi Right, instead of using a generic way of determining which args are there, each function knows how to determine which ones are it's arguments. 20:53
20:54 n1ge left
geekosaur so how is NativeCall guessing this? 20:54
20:54 robertle left
kalkin- Hmm somehow i cant define a multi functions which wrap native functions 20:54
Getting this error: Cannot invoke object with invocation handler in this context
I defined the following two functions: 20:55
multi sd_journal_send(Str $arg1) returns int32 is native(LIBSD-BUS) is export {*} multi sd_journal_send(Str $arg1, Str $arg2) returns int32 is native(LIBSD-BUS) is export {*}
geekosaur that makes sense to me. is it native or not? 20:56
"multi" means it's got perl6 infrastructure. "is native" means it's a symbol in a shared object somewhere
kalkin- geekosaur: so? I don't see why I shouldn't be able to declare two perl6 functions with same name and different Signatures which use the same shared object? What am I missing? 20:57
geekosaur ...that it's not about the shared object, it's about "is native"
"is native" means completely raw 20:58
it means you do not get multi, or types that don't map to native C types, or anything else yo uexpect from perl 6
you have told eperl 6 that it is a C function, not a perl 6 function
if you ewant perl 6 functions, write perl 6 wrappers for the raw C functions 20:59
perhaps it's clearer this way: multiple dispatch knows how to call perl 6 functions, not C functions 21:00
kalkin- geekosaur: I see thanks for the explanation.
raschipi Always a good idea to write wrappers. Realy easy to write wrappers with NativeCall, and what's the point of using Perl6 if you're actually writing C instead? 21:01
geekosaur I am actually less than fond of nativecall, tbh. it's trying to be clever. so you get this, you get the varargs issue, you get struct passing/returning even worse than the varargs thing, etc. 21:04
kalkin- I really need a good way of faking variadic arguments. Currently the only sollution I come up with, would be generate functions with an argument suffix, and wrap them with a perl6 function foo_variadic, which counts the provided arguments and picks the right fooN function
21:04 Zoffix left
geekosaur even that's not guaranteed 21:05
if you decide you have to do it that way, test on as many plkatforms as possible
C does *not* promise varargs acts like fixed args
kalkin- the issue is that systemd journal functions all work with variadic arguments. It's not only about printf like behaviour, each own argument is an own field in the log entry 21:06
There is a variant of the send function which receives a const struct iovec, but now i have to figure out how this works *sigh* :) 21:07
raschipi One possible solution is to write a C wrapper. 21:08
geekosaur that won't work either unless it's a pointer. you *will* get core dumps if you try to force it
but everyone knows that it's still 1978 and the C compiler is obviously really simple, as is parameter passing 21:09
21:10 perlpilot joined
kalkin- I could write a c wrapper which expects a const char ** (i think this is what a string array is called in C land?) and an array length. My C wrapper could convert(?) the array to a variadic call, i guess?? 21:10
But can I compile a C library when installing a perl6 package with zef? 21:11
moritz yes 21:20
other modules do that too, for example Inline::Perl5 21:21
raschipi How can you know if cc wil be available in the target? 21:29
21:36 comborico1611 joined 21:37 dha joined
kalkin- thanks guys for all the help and good night 21:38
21:39 kalkin- left 22:06 Kaiepi joined 22:07 comborico1611 left 22:08 dha left 22:12 Khisanth left 22:14 Kaiepi left 22:15 Kaiepi joined
timotimo geekosaur: i'm a bit confused by your explanations on "is native" 22:25
geekosaur afaik it's a thin wrapper with no "handles" so you can't do normal p6 things with it 22:26
deliberately so it'll not introduce extra overhead
timotimo i don't have a better explanation, but i don't think it's that 22:27
22:27 Khisanth joined, perlpilot left
timotimo i do believe you used to be able to mix multi and "is native" 22:27
you'll have to use "is symbol" though
oh, but that was meant to be variadic, so that's actually fine 22:28
anyway, with an "is native" routine, you do get a real Routine object, it just has its $!do set to a freshly compiled piece of code 22:31
but there's still some perl6-level stuff in between the routine itself and the C function 22:32
bisectable6: use NativeCall; proto sub printf(|){*}; multi sub printf(Str $fmt, int32 $arg) is native(Str) { }; multi sub printf(Str $fmt, Str $arg) is native(Str) { }; printf("%s is my dog", "hi"); 22:34
bisectable6 timotimo, On both starting points (old=2015.12 new=61878c3) the exit code is 1 and the output is identical as well
timotimo, Output on both points: «Cannot invoke object with invocation handler in this context␤ in sub printf at /tmp/_anBgjLnK9 line 1␤ in block <unit> at /tmp/_anBgjLnK9 line 1␤␤»
timotimo huh, has it really always been this way?
m: say &printf
camelia sub printf ($, | is raw) { #`(Sub|41528584) ... }
timotimo oh, could that be a problem here?
bisectable6: use NativeCall; proto sub cprintf(|){*}; multi sub printf(Str $fmt, int32 $arg) is native(Str) is symbol("printf") { }; multi sub cprintf(Str $fmt, Str $arg) is native(Str) is symbol("printf") { }; cprintf("%s is my dog", "hi"); 22:35
bisectable6 timotimo, On both starting points (old=2015.12 new=61878c3) the exit code is 1 and the output is identical as well
timotimo, Output on both points: «Cannot invoke object with invocation handler in this context␤ in sub cprintf at /tmp/OsshHDaGAR line 1␤ in block <unit> at /tmp/OsshHDaGAR line 1␤␤»
timotimo i seem to be misremembering, huh.
it should be possible to make multi and native work together 22:36
22:47 Xliff left 22:50 Sgeo_ joined 22:51 Sgeo left
Kaiepi m: my $c = IO::Socket::INET.new(:host<telehack.com>, :port(23), :encoding<latin1>); my $fd = $c.native-descriptor; $c.close; dd $fd 22:53
camelia IO::Socket::INET is disallowed in restricted setting
in sub restricted at src/RESTRICTED.setting line 1
in method new at src/RESTRICTED.setting line 32
in block <unit> at <tmp> line 1
Kaiepi p6: my $c = IO::Socket::INET.new(:host<telehack.com>, :port(23), :encoding<latin1>); my $fd = $c.native-descriptor; $c.close; dd $fd
camelia IO::Socket::INET is disallowed in restricted setting
in sub restricted at src/RESTRICTED.setting line 1
in method new at src/RESTRICTED.setting line 32
in block <unit> at <tmp> line 1
buggable New CPAN upload: IP-Random-0.0.1.tar.gz by JMASLAK cpan.metacpan.org/authors/id/J/JM/...0.1.tar.gz 22:55
Kaiepi m: my $c = IO::Socket::INET.new(:host<localhost>, :port(23), :encoding<latin1>); my $fd = $c.native-descriptor; $c.close; say $fd 22:58
camelia IO::Socket::INET is disallowed in restricted setting
in sub restricted at src/RESTRICTED.setting line 1
in method new at src/RESTRICTED.setting line 32
in block <unit> at <tmp> line 1
Kaiepi damn
22:58 subroot joined 23:02 Sgeo joined 23:03 lembark joined
lembark Q: How can I compile/configure Rakudo to ignore my home directory for modules? 23:03
e.g., I *dont'* want to have anyone search ~/.perl6. 23:04
23:04 Sgeo_ left
lembark Looking at perl Configure.pl --help doesn't show any to configure the P6-ish equivalent to @INC. 23:04
thanks
23:05 HaraldJoerg left
raschipi lembark: A good start: docs.perl6.org/language/5to6-perlv...%C2%A05%29 23:07
23:12 Mark04 joined
Mark04 Hi all, any idea how I might debug this: "MoarVM panic: Internal error: Unwound entire stack and missed handler" 23:12
I'm trying to write a LibCurl based script to update Cloudflare DNS records 23:13
It was working ok on my mac0S machine, and copied over to an archlinuxarm box it's not so happy 23:16
MasterDuke Kaiepi: fyi, you can use "restricted" things with evalable, committable, etc 23:17
Geth doc/post-release-2018.06: 086d7c11bd | (Zoffix Znet)++ | doc/Language/terms.pod6
[CaR Grant] Rewrite section on constants

  - Document newly-available auto-coercion
  - Document newly-enforceable type constraints
  - Document ability to use := op and backslashed sigilless names
  - Document anonymous constants
  - Get rid of overly elaborate scoping prose. That belongs to
   the section on scoping.
23:19 Xliff joined, Xliff left, Xliff joined 23:20 Zoffix joined
Zoffix Mark04: adding --ll-exception command line flag to perl6 sometimes gives you extra bits of info 23:20
e: my $c = IO::Socket::INET.new(:host<localhost>, :port(23), :encoding<latin1>); my $fd = $c.native-descriptor; $c.close; say $fd 23:21
evalable6 (exit code 1) Could not connect socket: Connection refused
in block <unit> at /tmp/WDQX84a67R line 1
Zoffix e: my $c = IO::Socket::INET.new(:host<irc.freenode.net>, :6667port, :encoding<latin1>); my $fd = $c.native-descriptor; $c.close; say $fd
evalable6 -1
23:22 espadrine left 23:23 Sgeo_ joined
Zoffix Mark04: it might be a bug in Rakudo or MoarVM... You could try running with MVM_SPESH_DISABLE=1 set (that's one of the things you can disable; `moar --help` lists 'em all) 23:23
lembark: I don't think ~/.perl6 is *searched* for modules by default. It's just a place where installed modules reside 23:25
lembark: like, in their precompiled form
23:27 Sgeo left
Zoffix e: for $*REPO.repo-chain { say [.^name, .Str] } 23:27
evalable6 [CompUnit::Repository::FileSystem /home/bisectable/git/whateverable/sandbox/lib]
[CompUnit…
Zoffix, Full output: gist.github.com/048b7277cd0783427a...45430d8965
Zoffix Those are CUR::Installation and Perl 5's @INC equivalent would be CUR::FileSystem 23:28
23:29 lizmat left
Mark04 Zoffix: nothing more in this case :( 23:29
Zoffix: and the MVM_SPESH_DISABLE=1 doesn't seem to change anything… 23:30
Zoffix :( 23:31
Mark04 the script is litteraly two LibCurl::HTTP gets and a put… There's a JSON object in the middle and that's about all
Zoffix Mark04: oh, can you pastebin it?
Mark04: also, what's your perl6 version? 23:32
Mark04 Zoffix: sure yeah
23:32 zgana joined
Mark04 Zoffix: perl6 --version 23:32
This is Rakudo version 2018.05 built on MoarVM version 2018.05
implementing Perl 6.c.
Zoffix: pastebin.com/peJSAbcV 23:34
Zoffix installs prereqs 23:36
zgana hello perl6 people. i'm new 23:37
Zoffix eco: LibCurl::HTTP
buggable Zoffix, Nothing found
Zoffix Hm, weird. It's not on modules.perl6.org :/ even though it does show up in the build log 23:38
zgana: \o
.hug zgana
huggable hugs zgana
Zoffix eco: LibCurl
buggable Zoffix, LibCurl 'Perl6 bindings for LibCurl': github.com/CurtTilmes/perl6-libcurl 1 other matching results: modules.perl6.org/s/
Zoffix Ah.. Right, the site just sucks
zgana i'm very interested in the perl6 jupyter kernel, i guess this is the currently leading one? github.com/bduggan/p6-jupyter-kernel 23:41
Zoffix zgana: I think so
Mark04: just tells me `Couldn't connect to server`. Doesn't crash. CloudFare doesn't have some sort of testing API login/pass, does it? 23:42
Mark04 Zoffix: I wonder if the answer could be in some shared object on the machine where it's crashing… I just ran a Pacman (arch package manager) update a short while ago, definitely since I installed rakudo things have been updated (kernel, gcc I think, etc…) 23:43
Zoffix: really not sure about the Cloudflare API
zgana is there a preferred plotting API? the jupyter kernel examples include some with SVG::Plot, but it looks... not on par with, say, matplotlib 23:45
23:46 lizmat joined
Zoffix zgana: not really sure, but for things not being on par with stuff, I wouldn't be surprised. Our first language release was just 2 years ago, so everything's new and much of the modules aren't polished :) 23:47
zgana: there's also Inline::Python that lets you use Python's modules. Never tried it, but maybe it'll be useful.
eco: Inline::Python 23:48
buggable Zoffix, Inline::Python 'Use Python code and libraries in a Perl 6 program': modules.perl6.org/dist/Inline::Pyth...thub:niner
lembark Perl5-toPerl6 shows how @INC works -- or doesn't -- in Perl6.
Q: Is it possible to configure Perl6 tyo *not* search $HOME for modules?
i.e., perl6 should not look in ~/.perl6. 23:49
Zoffix lembark: what do you mean by "search for modules"? 23:50
lembark: like, search for Foo.pm6 files or something?
Mark04: dunno, got the API key and looks like it's making some requests without crashing. 23:52
lembark Looking at the list of repo's that Perl6 is initlailzed with:
> .say for $*REPO.repo-chain; file#/home/lembark/sandbox/Perl6/Modules/FindBin/lib inst#/home/lembark/.perl6 inst#/opt/perl6/share/perl6/site inst#/opt/perl6/share/perl6/vendor inst#/opt/perl6/share/perl6 ap# nqp# perl5#
Notice the "inst#/home/lembark/.perl6".
I want that permenantly removed from Perl6.
Zoffix Mark04: maybe try reinstalling some modules? Like zef uninstall LibCurl::HTTP; zef install LibCurl::HTTP;
lembark Put it another way, if I enter "use Foobar;", perl6 should not make the attempt of checking ~/.perl6 to find the module. 23:53
Zoffix lembark: you installed your perl6 with rakudo star? 23:55
Mark04 Zoffix: I tryed that too no change :( 23:56
Zoffix: I'm re-installing rakudo right now will see if that changes anything (might seem a long shot but hey, nothing to lose)
Zoffix lembark: FWIW, if another user runs the script, it'll be their home directory in that list, not yours. 23:57
MasterDuke zgana: the whateverable bots use SVG::Plot now, but previously successfully used Chart::Gnuplot with Inline::Perl5
Mark04 Zoffix: thanks a lot for taking the time to go get a key and all, that's very helpful of you! 23:58
Zoffix \o/ 23:59