Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-08-10

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:01 bisectable6_ joined #perl6
00:06 Cabanossi joined #perl6
00:28 cdg joined #perl6
00:29 pierre_ joined #perl6
00:30 lookatme morning
00:37 steve-o joined #perl6
00:37 steve-o total perl 6 noob question alert
00:37 steve-o can i use Tk with perl6
00:37 steve-o ?
00:38 jdv79 i don't think there's any bindings
00:38 jdv79 there's some gtk ones
00:38 lookatme buggable: eco gtk
00:38 buggable lookatme, Found 4 results: GTK::Simple, GTK::Simpler, GTK::Scintilla, Inform. See https://modules.perl6.org/s/gtk
00:39 lookatme buggable: eco tk
00:39 buggable lookatme, Found 4 results: GTK::Simple, GTK::Simpler, GTK::Scintilla, Inform. See https://modules.perl6.org/s/tk
00:39 dh7320 joined #perl6
00:39 lookatme steve-o, ^^^
00:39 zengargo1le joined #perl6
00:40 steve-o yeah i was just looking at that site. so if i want to make an extremely simple desktop app with perl6 is GTK a tool that will work?
00:41 jdv79 gtk is the gnome gui stuff
00:41 lookatme IDK
00:41 lookatme thought gtk support win
00:41 lookatme though
00:42 jdv79 yeah, it does
00:42 lookatme you can see, the appveyor test is failed
00:43 steve-o ok thanks i will look into GTK
00:47 BenGoldberg joined #perl6
00:49 dh7320 joined #perl6
00:53 raschipi joined #perl6
01:29 colomon joined #perl6
01:33 aborazmeh joined #perl6
01:33 aborazmeh joined #perl6
01:38 pompomcrab joined #perl6
01:40 colomon joined #perl6
01:41 colomon joined #perl6
01:41 pompomcrab my $resp = HTTP::UserAgent.new.get: $url;
01:41 pompomcrab Segmentation Fault
01:42 pompomcrab i have no idea how to debug this, but i guess it's time to learn. what should i start with?
01:50 pompomcrab in perl5 i would use B:: to see what line it was executing where i croaked. what is the p6 equiv of B::?
01:50 pierre_ joined #perl6
01:50 pompomcrab the $url is 'https://wikileaks.org/macron-emails//get/' LOL
01:50 pompomcrab maybe HTTP::U::A doesn't like https
01:50 pompomcrab and yes, this is just a simple scraper to pull all the emaisl
01:50 pompomcrab err i mean $url is 'https://wikileaks.org/macron-emails//get/2'
01:51 ilbot3 joined #perl6
01:51 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:54 lookatme buggable: eco io
01:54 buggable lookatme, Found 235 results: p6doc, Bailador, BioPerl6, v5, Web. See https://modules.perl6.org/s/io
02:06 pierre_ joined #perl6
02:08 skids joined #perl6
02:09 AlexDaniel m: for ‘foo bar baz’.match: :g, / (\w+) / { say ~$0 }
02:09 camelia rakudo-moar 1761f9: OUTPUT: «foo?foo?foo?»
02:09 AlexDaniel why is it always foo? I do understand that I was supposed to write it like this:
02:10 AlexDaniel m: for ‘foo bar baz’.match: :g, / (\w+) / { say .[0] }
02:10 camelia rakudo-moar 1761f9: OUTPUT: «?foo???bar???baz??»
02:10 AlexDaniel but still, why?
02:11 noganex joined #perl6
02:14 cdg joined #perl6
02:14 geekosaur it doesn't know how to re-alias $0 for each returned Match object
02:15 geekosaur really, it can't (what if you save into an array and then random-access, should it know which index you were working with to alias $0?)
02:15 geekosaur so $0 always gets aliased to the first Match object
02:15 geekosaur probably also $/
02:17 geekosaur I mean, perl 5 would probably have some special case recognizing that you used for ...match(:g) and aliasing stuff inside the loop
02:17 geekosaur that's not really perl 6 style magic though
02:18 raschipi Can it do symbolic references with a number to access $0, $1, $2, etc?
02:22 AlexDaniel I'm thinking why would it be aliased to anything at all
02:25 perlawhirl match populates $/, which is what you're accssing with $0 (which is sugar for $/[0])... instead you really want to access $_ inside you're loop.
02:25 perlawhirl *your
02:25 perlawhirl and while it seems more consistent to treat things that way, i think it could be confusing for people, particularly those familiar with p5 semantics
02:27 AlexDaniel um…
02:28 geekosaur AlexDaniel, $/ is an alias to the result of the most recent regex match. in this case, there is no single "most recent", there is a list of 3. it uses the first, pretending there was no :g. (I could argue $/ should be Match in that case...)
02:29 geekosaur I do see what you want it to do; I do not see why you think it is something that should just automatically happen without help
02:29 geekosaur there is *one* match operation. it has completed, producing 3 Match objects.
02:29 AlexDaniel no, I'm thinking if it does nothing useful with :g, then why put anything into $/ at all
02:29 geekosaur it is too late for $/ to be each one in turn
02:29 geekosaur unless that knowledge is coded into for
02:30 geekosaur *that* is what I meant by it being Match (that is, the Match type object)
02:30 AlexDaniel m: for ‘foo bar baz’.match: :g, / (\w+) / { say $0 }
02:30 camelia rakudo-moar 1761f9: OUTPUT: «?foo?? 0 => ?foo???foo?? 0 => ?foo???foo?? 0 => ?foo??»
02:30 perlawhirl AlexDaniel: it's not equivalent to p5: while ( $foo ~= /(\w+)/g ) { say $1 }
02:30 perlawhirl AlexDaniel: It doesn't match progressively, it's all at once
02:30 perlawhirl m: for 'foo bar baz' ~~ m:g/(\w+)/ { say $/; exit }
02:30 camelia rakudo-moar 1761f9: OUTPUT: «(?foo?? 0 => ?foo? ?bar?? 0 => ?bar? ?baz?? 0 => ?baz?)?»
02:31 geekosaur this is for not while. .match is not a generator that gets tickled with each step through the loop; the whole result has been produced and for is now iterating over that result
02:31 geekosaur this is perl, not icon or haskell :p
02:32 mst *perl6
02:32 mst I've implemented such generator behaviour in perl5 just fine
02:33 geekosaur sure, can be done in python too. but it's not inherent behavior
02:33 mst sure, just let's not casually call perl6 perl, masak and I went to some effort to get it clear that it wasn't to avoid stupid internecine warfare
02:34 AlexDaniel oh… I think I see it now
02:35 AlexDaniel I should've printed $/ to see what's going on
02:35 geekosaur hm. I was thinking more language family, it isn't a perl.*-ish thing to magically turn anything into lazy or generator expressions automatically
02:35 geekosaur it is a perl.*-ish thing to do it in specific cases though (different cases in perl 5 and perl 6)
02:35 zengargoyle joined #perl6
02:35 perigrin perl.*-ish turned *me* into a lazy generator
02:35 perigrin so I present myself as a contradictory example
02:36 AlexDaniel thanks!
02:37 mst geekosaur: "this is a perl" would express the same POV and I'd agree 100%
02:38 mst (and sorry for pedanting it but I've spent too long squelching silly arguments so obviously I'm (?:over)?sensitive)
02:39 geekosaur anyway it probably would make sense to have $/ be something useless in that case to catch thinkos like that. unless @Larry would prefer that for recognize this case and rewrite it ... but I am recalling that older Perls did that at one point and it was discarded as encouraging for/while confusion
02:40 geekosaur (possibly recalling incorrectly though)
02:41 geekosaur well, sometihng like that, not this specific (equivalent) case
02:42 geekosaur (I .. have had a few cases where a perl programmer tried to use a similar idiom in not-perl and was utterly mystified at the result, because other languages didn't quietly treat your for as a while.)
02:43 AlexDaniel geekosaur: ok, wait, but why? It is useful
02:43 raschipi In P6 for is quietly treated as a map instead.
02:43 AlexDaniel m: for ‘foo bar baz’.match: :g, / (\w+) / { say $/ }
02:43 camelia rakudo-moar 1761f9: OUTPUT: «(?foo?? 0 => ?foo? ?bar?? 0 => ?bar? ?baz?? 0 => ?baz?)?(?foo?? 0 => ?foo? ?bar?? 0 => ?bar? ?baz?? 0 => ?baz?)?(?foo?? 0 => ?foo? ?bar?? 0 => ?bar? ?baz?? 0 => ?…»
02:43 AlexDaniel geekosaur: here you have all of your results
02:44 geekosaur oh, I just remembered what I was thinking of, it's the behavior of the each iterator
02:44 geekosaur and they were doing the opposite thing: while (each ... )
02:45 geekosaur which, no, very no
02:46 AlexDaniel m: ‘foo bar baz’.match: :g, / (\w+) /; for @$/ { say .[0] }
02:46 camelia rakudo-moar 1761f9: OUTPUT: «?foo???bar???baz??»
02:52 lookatme m: for @(‘foo bar baz’.match: :g, / (\w+) /) { say .[0] }
02:52 camelia rakudo-moar 1761f9: OUTPUT: «?foo???bar???baz??»
02:53 AlexDaniel that does nothing
02:59 tyil[m] Perl conf is pretty cool so far
02:59 tyil[m] You guys are missing out
03:00 mst geekosaur: using 'each' in perl5 is invariably an error
03:00 mst geekosaur: it only exists that way to iterate DBM files that only allowed a single handle
03:01 mst geekosaur: I've banned it from all codebases where I can do so :)
03:01 perlawhirl speaking of missing out... i'm in australia and don't really have a chance to go to all the cool confs... is there some otherway I can get some nice merch, like those plushie camelia's?
03:03 tyil[m] perlawhirl: I can ask wendy if I dont forget
03:03 tyil[m] She's the one at the merch stand
03:04 perlawhirl thanks
03:05 pharv_ joined #perl6
03:08 itaipu joined #perl6
03:19 Cabanossi joined #perl6
03:21 aborazmeh joined #perl6
03:21 aborazmeh joined #perl6
03:43 pierre_ joined #perl6
03:44 stmuk joined #perl6
03:46 Util joined #perl6
03:53 feng_ joined #perl6
04:05 Cabanossi joined #perl6
04:19 snarkyboojum oO(plushie camelias!)
04:27 pierre_ joined #perl6
04:56 xtreak joined #perl6
05:05 Cabanossi joined #perl6
05:21 aborazmeh joined #perl6
05:21 aborazmeh joined #perl6
05:26 dorothyw joined #perl6
05:27 dorothyw Sorry to intrude. I am wondering if there is a perl6 repl that is sutiable as a shell
05:27 dorothyw *suitable
05:29 dorothyw Even if there was just a really good repl for perl6 I think it could be hacked into being a suitable shell
05:30 Guest69863 joined #perl6
05:35 dorothyw Like when I type perl6 into the terminal and enter a repl I get similar issues as the perl repl where when I use arrowkeys for example I get these weird escape codes printed
05:36 dorothyw Going to reconnect just a moment
05:37 dorothyw joined #perl6
05:39 xtreak_ joined #perl6
05:40 dorothyw b
05:41 ryu0 dorothyw: option 1. install the Readline or Linenoise packages.
05:42 ryu0 dorothyw: option 2. use rlwrap to wrap perl6 command.
05:42 ryu0 dorothyw: it's not really a shell like BASH but it will give you a complete REPL.
05:42 dorothyw I've seen these mentioned on stack overflow and I am on the Linenoise github page though it eludes me how to install Linenoise
05:42 dorothyw I am very new to perl though I am perl6 all the way because macros and because better than bash etc
05:43 ryu0 do you have zef alreay installed?
05:43 dorothyw no though I have rakudo installed
05:43 ryu0 you need to install zef first.
05:43 espadrine joined #perl6
05:43 ryu0 most instructions assume use of zef for installing modules for perl6.
05:44 dorothyw installing zef as per github instructions
05:45 ryu0 i've been working on making it more convenient to install on ubuntu, but it'll take a bit. there's a lot of modules in the rakudo star distribution.
05:46 ryu0 36ish.
05:47 dorothyw Getting an undeclared names error
05:47 ryu0 dorothyw: paste it somewhere please.
05:47 dorothyw https://hastebin.com/raw/nitebizoya
05:48 xtreak joined #perl6
05:49 ryu0 ... How old is your rakudo?
05:50 dorothyw I performed sudo apt-get install rakudo from ubuntu 16.04
05:50 ryu0 ... that's why.
05:50 dorothyw Want me to compile?
05:51 ryu0 I have a better idea then.
05:51 ryu0 uninstall the repo rakudo. it's very ancient and unlikely to work with current perl6 modules.
05:52 ryu0 Here is my Perl 6 PPA. It's only for xenial right now as it's still a WIP. But it should be enough for you to get started.
05:52 ryu0 https://launchpad.net/~ryu0/+archive/ubuntu/perl6
05:52 ryu0 xenial is the current ubuntu you're using.
05:53 dorothyw moment
05:54 ryu0 i'm hoping this will be an asset to novices who at least know enough to use PPAs.
05:54 lowbro joined #perl6
05:55 lowbro joined #perl6
05:55 andrzejku joined #perl6
05:56 dorothyw do I add it as xenial main or xenial universal?
05:56 ryu0 Uh... xenial main I assume, but normally people just use the commands given at that page. It takes care of those details for you.
05:56 ryu0 # add-apt-repository ppa:ryu0/perl6
05:57 ryu0 It imports the PPAs public key and adds an APT repo for it.
05:57 dorothyw Should have just igven me that command :p
05:57 ryu0 Sorry, thought you could find it from the page.
05:57 dorothyw So now I apt-get install rakudo
05:58 dorothyw right?
05:58 ryu0 after an apt update.
05:58 ryu0 or apt-get
05:58 ryu0 either works.
05:58 ryu0 apt-get install rakudo perl6-readline zef
05:58 ryu0 that should get you started.
05:59 ryu0 you can use zef to install anything else you need, either into your private perl6 stuff or system-wide.
05:59 dorothyw installing zef
05:59 ryu0 i'm just packaging everything that ships with rakudo star so it's a complete set of the baseline packages.
06:00 ryu0 just not there yet, but what is there should be quite usable.
06:00 ryu0 does this solve your problem?
06:01 dorothyw Yeah that gets rakudo installed then I can try to install linenoise
06:01 ryu0 ok.
06:01 ryu0 i was suggesting perl6-readline as it does the same thing as linenoise
06:01 ryu0 and is already packaged by my PPA.
06:01 dorothyw ah
06:02 ryu0 i'm using it to substitute for Linenoise.
06:02 dorothyw apt-get installing it now
06:02 ryu0 If you were using perl6 on another platform, then you'd use Linenoise.
06:02 ryu0 But really, I only see Linenoise being of interest if you want to use it as a module, but that's not your use case right now.
06:03 ryu0 You just wanted a complete REPL for perl6, yes?
06:03 dorothyw Yeah i want to try to get a perl shell going
06:03 ryu0 rakudo automatically has one if you have Readline or Linenoise installed.
06:03 wamba joined #perl6
06:03 dorothyw I just typed perl6 and pressed enter and it seems to be working better now
06:03 ryu0 Ok.
06:15 lookatme http://perl6intro.com/#_installing_perl_6
06:15 lizmat joined #perl6
06:17 dorothyw What's wrong with this line? sub term ($arg1, $arg2){q:x/$arg1 "$arg2"/;} ; term("echo", "hello world")
06:17 pierre_ joined #perl6
06:19 nadim joined #perl6
06:20 lookatme m: sub term ($arg1, $arg2){q:x/$arg1 "$arg2"/;} ; term("echo", "hello world")
06:20 camelia rakudo-moar 1761f9: OUTPUT: «qx, qqx is disallowed in restricted setting?  in sub restricted at src/RESTRICTED.setting line 1?  in sub QX at src/RESTRICTED.setting line 11?  in sub term at <tmp> line 1?  in block <unit> at <tmp> line 1??»
06:22 lizmat_ joined #perl6
06:23 dorothyw I'm pretty new to perl error messages
06:23 lookatme dorothyw, you need qq:x I think
06:24 lookatme and sub term ($arg1, $arg2){print qq:x/$arg1 "$arg2"/;} ; term("echo", "hello world")
06:25 ryu0 lookatme: cool. i was just referring them to my PPA since it's easier for novices to get running, especially if a release happens to fail to build for some reason.
06:26 ryu0 lookatme: seems like a good idea, especially if we want perl6 to expand.
06:26 ryu0 :-)
06:26 dorothyw So now I've got my term function right
06:27 lookatme :)
06:27 dorothyw but what I need to do is take a string and parse up to the first space and make that two values, then plug value 1 into $arg1 and value 2 into $arg2
06:27 lookatme oh, I thought you want something visual
06:28 lookatme but I
06:28 lookatme but I'm sure qq:x is what you want
06:29 ryu0 all looks like jibberish to me. i'll find out what it means some time.
06:30 ryu0 but it sounds like they're trying to partially reproduce the effects of the POSIX function wordexp.
06:31 lookatme qq allow variable interpolation, and q not
06:31 dorothyw I am trying to ge tthe same functionality as system() from perl
06:31 aborazmeh joined #perl6
06:31 aborazmeh joined #perl6
06:31 ryu0 Uh, it'd probably be easier to just make a NativeCall reference.
06:31 lookatme dorothyw, if you want system, you can use QX
06:32 ryu0 Or w/e is more appropriate.
06:33 ryu0 hm.
06:33 ryu0 m: sub foo(Int $arg1) { print $arg1; }
06:33 camelia rakudo-moar 1761f9: ( no output )
06:33 jonas1 joined #perl6
06:33 ryu0 m: sub foo(Int $arg1) { print $arg1; }; print foo(1);
06:33 camelia rakudo-moar 1761f9: OUTPUT: «1True»
06:33 ryu0 O_o
06:33 ryu0 m: sub foo(Int $arg1) { print $arg1; }; print foo("a");
06:33 camelia rakudo-moar 1761f9: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Calling foo(Str) will never work with declared signature (Int $arg1)?at <tmp>:1?------> 3 foo(Int $arg1) { print $arg1; }; print 7?5foo("a");?»
06:34 ryu0 \o/
06:34 ryu0 I'm liking this.
06:34 ryu0 I always hated how dynamic languages made static typing conventions tedious to implement.
06:36 dorothyw I am basically just fed up with bash and so I did alot of research to try to replace bash and I think perl6 is a good way to do that
06:36 zengargoyle joined #perl6
06:36 ryu0 you do realize perl6 isn't meant as a replacement for a system shell?
06:37 ryu0 though if you want to try, be our guest.
06:37 lookatme replace bash ?
06:37 ryu0 it's a better programming language for sure.
06:37 lookatme you can try some other thing like `zsh`
06:37 lookatme I use zsh
06:37 dorothyw Well I think an issue with bash is that every single line of code has got to begin with a filename
06:37 dorothyw bash is not really built for programming in general just accessing files and executing them with arguments
06:38 ryu0 system scripting, basically.
06:38 ryu0 it's very good for its niche but not much else.
06:38 dorothyw perl6 also has extensible macros so afaik a user can extend perl6 to be whatever they want, unlike bash which has a limited and punishing syntax
06:38 lizmat joined #perl6
06:38 ryu0 that's just the nature of POSIX shells.
06:39 ryu0 it was never meant to be a true programming language.
06:39 dorothyw This is the issue I hate with bash is that it is not meant to be a true programming language
06:39 ryu0 BASH is fine in its own time and place.
06:40 ryu0 Use it as an asset to your other stuff ideally.
06:40 ryu0 I don't expect my command line shell to do a lot honestly.
06:40 lookatme yeah, also there some non-POSIX shell implementation
06:40 dorothyw The issue I have with bash is that bash is often one of the first languages new programmers learn and it is really not fully satisfying as a programming language
06:40 tokik joined #perl6
06:40 ryu0 yes. zsh is a common choice for people that hate BASH.
06:40 ryu0 ... It is?
06:40 jast I don't exactly hate bash but I like zsh more
06:40 ryu0 I thought the cool kids all learned Python these days.
06:41 jast sure, or JavaScript
06:41 dorothyw When i was learning linux bash was one of the first things I learned
06:41 lookatme I remember there are some guys want make a perl shell replace system shell, and also a perl OS :)
06:41 lookatme you can try to do something like that
06:41 jast I think it's probably quite different when your primary goal is "learning linux"
06:41 ryu0 Not many people know it but it's also possible to extend BASH through its C API.
06:41 jast but my guess is most people learning to program start out on windows or os x
06:41 wamba joined #perl6
06:42 andrzejku there is kind of Perl Shell already
06:42 jast two, as I recall
06:42 dorothyw I like perl6 better because of the macros
06:42 andrzejku and a long time ago there was a guy  which tried to make Perlix
06:42 ryu0 You can write BASH builtins as long as it exposes a specific C ABI.
06:42 andrzejku a perl operating system
06:42 jast one is called Zoidberg, it gets extra points for naming, even if I've never actually tried it
06:43 andrzejku but he didn't finish it as someone rushed him
06:43 lookatme andrzejku, yeah, I heard Perlix from you :)
06:43 ryu0 i did that once to allow dumping the shell variables to JSON.
06:43 jast I don't think building an OS on top of an interpreted language is the way to go
06:43 ryu0 it was for a distro that wanted to collect metadata about their shell script source packages.
06:43 lookatme dorothyw, what macro ?
06:43 andrzejku the legend says that if you start to do Perl OS that bad things will happend
06:43 jast that's almost like putting a bytecode-based VM with GC and above-average memory use inside embedded devices, like mobile phones
06:43 jast ... oh.
06:43 andrzejku :<
06:43 ryu0 That's Java.
06:43 ryu0 LOL
06:43 dorothyw lookatme: afaik perl6 has fully extensible macros meaning you can invent your own syntax
06:44 lookatme dorothyw, I know the slang
06:44 ryu0 dorothyw: so do many Lisps.
06:44 dorothyw Lisp has really failed to make a good repl outside of emacs though
06:44 jast with lisps it's debatable that they create 'new syntax', though :}
06:44 ryu0 haha
06:44 lizmat dorothyw: that's the theory, but most slangs are not based on macro's but instead on subclassing Perl6's grammar
06:45 ryu0 dorothyw: you can also look at TCL, it's closer to a true language and tends to follow some shell syntax conventions.
06:45 ryu0 includes a shell-like interpreter too
06:45 jast Tcl is... different
06:45 dorothyw I have been looking at gforth for a long time
06:45 jast bit of a fringe language these days, too
06:45 dorothyw cause gforth is very small and shell-like
06:45 ryu0 indeed it is.
06:45 jast for 'very small', check out lua
06:46 dorothyw lua is nice though I shy away from it's syntax. Plus no fully extensible macros I believe
06:46 ryu0 puts [exec ls *]
06:46 ryu0 :)
06:46 jast true, and I don't like its syntax too much, either
06:47 dorothyw The reason I want fully extensible macros is this: we started with shells built into the os in the 1940s and rewrote those for bourne shell and rewrote that as ksh and rewrote that as bash and now we are rewriting that as zsh. So I am hoping for a language that will not need to be rewritten
06:47 dorothyw One shell to rule them all that will last forever
06:47 ryu0 dorothyw: ... uh zsh is a separate project from bash.
06:47 jast well, I'm not so sure that's actually achievable
06:47 lookatme How about fishshell ?
06:48 dorothyw fish and zsh are both good but they lack fully extensible macros so if I have a syntax feautre that I want I can't get it.
06:48 jast I've thought about language design extensively back when I thought I was much more inventive than I actually am :)
06:48 ryu0 ok, then TCLs out.
06:48 ryu0 there's not many languages that let you remodel the language itself.
06:48 jast the problem with fully extensible macros is that you'll inevitably run into conflicts between various extensions
06:48 dorothyw There's ways around that
06:48 lookatme and also I know a non-POSIX shell Elvish written with GO
06:49 jast as long as each syntax extension is isolated, e.g. by putting it into a block  of sorts with an identifier of sorts, it's all easy
06:49 jast but if you want to essentially turn one language into another, that's a different story
06:49 dorothyw Basically whenever you walk down a syntax hallway you have to have a way to go back to back your way out of a syntax corner
06:50 dorothyw You don't want escalators that are one way where you add a syntax feature and it's stuck with you
06:50 jast I'm talking about a set of extensions that make your input ambiguous
06:50 jast it could have two different meanings depending on the order in which you try the extensions (if we're talking about recursive descent parsing, but the ambiguity is independent of the parsing emthod)
06:51 dorothyw My thinking is that you create a non ambiguous way to hop into and out of a specific macro. So like macrox***>??? or something really specific like that
06:51 jast that backtracking might be necessary at some point is kind of straightforward :}
06:51 jast yeah, that's what I meant by confining into a block
06:51 jast that's not quite "fully extensible macros", though, if you ask mne
06:51 dorothyw It's kind of like how quotations marks work in code. You have an entry point and an exit point, both the quote mark.
06:52 dorothyw True that's just how I would do it
06:52 jast and one thing that gets very difficult with this is properly displaying errors if there's a delimiter mismatch
06:52 jast the best macro system is worthless if the error messages from the parser are meaningless
06:53 dorothyw I don't know a good solution to that other than walking through what your macro evaluates to
06:53 jast I have a design for a language in mind that does this kind of thing, but with some extra restrictions
06:54 pierre__ joined #perl6
06:54 dorothyw Basically there are some key rules for being a good macro writer. 1. If you have a language with full macros don't write a macro that blocks your full macro abilities. 2. Make your macros unambiguous and clear. 3. Have your macros evaluate to good code
06:54 ryu0 jast: i've used C macros extensively. you have to take care with them.
06:54 ryu0 err
06:54 jast it's a lisp at heart, but with syntax (gasp)... and by forcing all syntax extensions to respect proper balancing of parentheses, it's not too complicated to translate all of it back into s-expressions internally
06:54 ryu0 dorothyw: ^
06:55 jast C's macros are a dirty hack, though
06:55 ryu0 hell GNU C has some Lisp-like extensions for their macros.
06:55 ryu0 ({ }) blocks for one.
06:55 dorothyw So I am a lisper I'll admit but I am starting to be convinced that at it's current state lisp is not ready to be a shell language.
06:55 ryu0 most languages weren't meant to be a shell language.
06:55 jast sure is, if you're a die hard lisp fan :)
06:56 jast just make sure to have a few spare parens keys
06:56 dorothyw I am not really die hard but I think common lisp is an example of a language that can fit nearly all applications.
06:56 dorothyw I am more of a macro fan.
06:56 ryu0 Did you look at other lisp implementations?
06:57 dorothyw I see common lisp as the most technologically superior lisp but I think scheme and elisp are also very good lisps
06:57 ryu0 I think I've seen more Lisp derivatives than any other languages.
06:57 dorothyw It is very easy to write a lisp
06:57 dorothyw That's sort of off topic though I am talking about macros in general
06:57 jast yeah, anyone with a stack and a basic understanding of ASTs can write a lisp
06:57 ryu0 I actually liked the ML family more myself but any.
06:58 ryu0 anyway
06:58 dorothyw When I started programming in c++ I always assumed there would be something like macros available to me where I could make syntax that did exactly what I wanted and I kept looking and looking and found out few languages actually do this
06:58 ryu0 Used mixins before?
06:58 TEttinger forth?
06:58 dorothyw Yes I am a huge forth advocate
06:59 dorothyw Basically top tier languages: common lisp, perl6, forth
06:59 TEttinger I don't find forth readable (yet), but I like a lot of its qualities
06:59 TEttinger same with perl6, which I doubt I could ever read
06:59 ryu0 dorothyw: did you look at D? i've heard it's a nice hybrid of different stuff.
07:00 dorothyw ryu0: macros are the key
07:00 dorothyw forth nees to be cobol-ized
07:00 TEttinger Nim goes hard into imperative/procedural but emphasizes compile-time programming as key
07:00 nadim m: role R{}; my @a = [] but R ; my $a = [] but R ; dd @a, $r ;
07:00 camelia rakudo-moar 1761f9: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Variable '$r' is not declared?at <tmp>:1?------> 3 = [] but R ; my $a = [] but R ; dd @a, 7?5$r ;?»
07:00 nadim m: role R{}; my @a = [] but R ; my $a = [] but R ; dd @a, $a ;
07:00 camelia rakudo-moar 1761f9: OUTPUT: «Array @a = []?Array+{R} $a = $[]?»
07:00 ryu0 i never did much with common lisp, so I can't really know to what extent you want to use macros.
07:00 ryu0 i just know macros and mixins tend to provide similar functionality.
07:00 dorothyw Basically I think writing a programming language where you can't change the syntax however you want is a sin
07:01 ryu0 Ok, then most languages are out then.
07:01 TEttinger fixed syntax is easier to make IDE integration actually work with
07:01 TEttinger it also can help avoid cases where users make the grammar ambiguous
07:02 TEttinger I think perl6 has a solution for that last one
07:02 nadim Can someone tell me with "but" does not add the role to the @a but does to $a?   m: role R{}; my @a = [] but R ; my $a = [] but R ; dd @a, $a ;
07:02 ryu0 dorothyw: i once tried common lisp but i couldn't get past the crap the #lisp community threw at me.
07:02 dorothyw Lisp community sux but support question tho
07:03 jast communities... who needs those anyway
07:03 TEttinger yeah I've definitely seen emacs supremacy stuff in lisp communities
07:03 jast that's stupid, notepad++ is obviously way superior :P
07:03 ryu0 i decided to move onto something less hostile. common lisp wasn't worth it to me.
07:04 jast for most things I try to avoid interacting with the communities, that works too
07:04 * ryu0 shrugs.
07:04 TEttinger "you need this version of emacs with this mode" "no that mode has been superceded by blingerblang" "really? I thought the blingerblang guy had moved to an off-the-grid commune"
07:05 ryu0 ... lol
07:05 ryu0 could have just said foobar
07:05 jast "this mode only works with this third-party fork of emacs that doesn't do releases and offers no binaries"
07:05 TEttinger it sounds more like a CL lib name
07:05 jast not sure that actually exists, though :)
07:05 ryu0 guys, anyone that can answer nadim? he did ask something.
07:06 entonian joined #perl6
07:06 jast I'd love to but I have no idea :)
07:06 rindolf joined #perl6
07:07 entonian joined #perl6
07:07 lookatme m: role R{}; my @a = [] but R ; my $a = [] but R ; dd @a, $a ;
07:07 camelia rakudo-moar 1761f9: OUTPUT: «Array @a = []?Array+{R} $a = $[]?»
07:07 lookatme m: role R{}; my @a = [] but R ; my $a = [] but R ; dd @a[0], $a ;
07:07 camelia rakudo-moar 1761f9: OUTPUT: «Any @a = Any?Array+{R} $a = $[]?»
07:09 abraxxa joined #perl6
07:10 lookatme role R{ method r() { say "CALL ME"; }; }; my @a = ([] but R); my $a = [] but R ; dd @a, $a ; say ([] but R).r;
07:10 lookatme m: role R{ method r() { say "CALL ME"; }; }; my @a = ([] but R); my $a = [] but R ; dd @a, $a ; say ([] but R).r;
07:10 camelia rakudo-moar 1761f9: OUTPUT: «Array @a = []?Array+{R} $a = $[]?CALL ME?True?»
07:10 lookatme m: role R{ method r() { say "CALL ME"; }; }; my @a = ([] but R); my $a = [] but R ; dd @a, $a ; $a.r; ([] but R).r; @a.r;
07:10 camelia rakudo-moar 1761f9: OUTPUT: «Array @a = []?Array+{R} $a = $[]?CALL ME?CALL ME?No such method 'r' for invocant of type 'Array'?  in block <unit> at <tmp> line 1??»
07:11 lookatme and how about use does
07:11 lookatme m: role R{ method r() { say "CALL ME"; }; }; my @a does R = []; my $a = [] but R ; dd @a, $a ; $a.r; ([] but R).r; @a.r;
07:11 camelia rakudo-moar 1761f9: OUTPUT: «Array+{R} @a = []?Array+{R} $a = $[]?CALL ME?CALL ME?CALL ME?»
07:12 lookatme nadim, ^^ don't know why that not work
07:12 lookatme m: role R{ method r() { say "CALL ME"; }; }; my @a does R = []; my $a = [] but R ; dd @a, $a;
07:12 camelia rakudo-moar 1761f9: OUTPUT: «Array+{R} @a = []?Array+{R} $a = $[]?»
07:12 ryu0 lookatme: eh? I thought Roles couldn't provide an implementation. I thought they only described a class API.
07:14 lookatme ryu0, it can
07:14 ryu0 it appears to act more like an abstract class then.
07:14 lookatme you can defined the default implementation
07:14 ryu0 so it behaves more like an abstract class. Can Roles themselves be instantiated?
07:15 lookatme It's quite helpful when you need a default behavior
07:15 ryu0 Or can roles only be instantiated by derivatives?
07:16 lookatme yeah, perl6 generate same name class for u
07:16 ryu0 oh, so it's more like a general purpose base class.
07:16 ryu0 assuming inheritance follows.
07:16 lookatme they call that autopun
07:17 ryu0 trying to bridge Perl6 to the general OOP concepts they use in C++, C#, and Java.
07:19 xtreak joined #perl6
07:19 jast a more common name for the same concept is 'mixin'
07:20 ryu0 Oh.
07:20 jast it's not too uncommon: https://en.wikipedia.org/wiki/Mixin#Programming_languages_that_use_mixins
07:22 ryu0 I thought it was inheritance related because i assumed you could also use other classes instead of just the base class in place of that role's type.
07:23 ryu0 So a role then is an interface of sorts that provides a default implementation if the implementing class doesn't define its own.
07:23 ryu0 err that can provide
07:24 jast yes, and that implementation can use methods from the target class
07:24 ryu0 sounds like a hybrid of interfaces and abstract classes.
07:26 lookatme https://docs.perl6.org/type/auto-punning
07:26 lookatme auto-punning is not mixin
07:26 lookatme https://docs.perl6.org/language/objects#index-entry-Mixins
07:34 zengargoyle joined #perl6
07:35 entonian joined #perl6
07:39 stmuk larry streaming live
07:42 devtom30 joined #perl6
07:47 snarkyboojum there's a public live stream?
07:48 stmuk https://www.facebook.com/pg/theperlconference/videos/
07:48 snarkyboojum thank you!
07:49 xtreak joined #perl6
07:50 Cabanossi joined #perl6
07:50 lookatme how long it will last ? stmuk
07:51 stmuk its about 20 mins in
07:52 lookatme oh
07:56 nattefrost joined #perl6
08:01 zengargoyle joined #perl6
08:03 devtom30 left #perl6
08:14 pierre__ joined #perl6
08:19 darutoko joined #perl6
08:20 Cabanossi joined #perl6
08:20 lookatme ugexe, zef crash when run install: https://gist.github.com/araraloren/fdb91f8ee1a0e74fdd0d7bae41f42d8f
08:23 grondilu joined #perl6
08:24 grondilu are methods "my" or "our" by default?
08:25 zakharyas joined #perl6
08:25 grondilu I'm wondering because I'm not sure I should write class Foo { my Foo method clone {...} } or class Foo { our Foo method clone {...} }
08:25 [particle]1 joined #perl6
08:26 lookatme grondilu, my or our is use for declare static member
08:27 grondilu oh
08:27 lookatme https://docs.perl6.org/language/classtut#Static_fields?
08:28 grondilu I had seen this syntax somewhere, I thought it was a fancy way of specifying the return type.
08:28 grondilu so I guess I should stick to the method clone(--> Foo) {...} syntax
08:30 lookatme I prefer `method clone(*%_) of Foo { ... }`
08:30 El_Che ugexe: is Zef OK to be used a a module or is it meant as internal for the zef command only? E.g. to use it to download the chain of sources to an specific dir without installing them?
08:32 maettu joined #perl6
08:34 lookatme grondilu, if you want some deep clone feature. I can give you some advice, if you need
08:35 El_Che (sorry for the silly questions all-around, just trying stuff obout distribution)
08:37 imcsk8 joined #perl6
08:37 grondilu lookatme: no it was just a dummy example here
08:38 dh7320 joined #perl6
08:38 lookatme grondilu, oh :)
08:50 Cabanossi joined #perl6
08:51 eroux joined #perl6
08:54 stmuk "perl is a four letter word" :)
08:55 grondilu m: role Foo { method f(--> Num) { rand } }; class :: does Foo { has $.f = 1.2e0 }.new.f
08:55 camelia rakudo-moar 1761f9: ( no output )
08:55 grondilu m: role Foo { method f(--> Num) { rand } }; class :: does Foo { has $.f = 1.2e0 }.new.f.say
08:55 camelia rakudo-moar 1761f9: OUTPUT: «0.26245213534034?»
08:55 grondilu m: role Foo { method f(--> Num) { rand } }; class :: does Foo { has $.f = "Bar!" }.new.f.say
08:55 camelia rakudo-moar 1761f9: OUTPUT: «0.791408320845822?»
08:56 grondilu :/
08:56 grondilu I guess that makes sense
08:57 zengargoyle joined #perl6
08:57 grondilu m: role Foo { method f(--> Num) {...} }; class :: does Foo { has $.f = "Bar!" }.new.f.say
08:57 camelia rakudo-moar 1761f9: OUTPUT: «Bar!?»
08:57 grondilu but that^ bothers me
09:03 lookatme m: role Foo { method f(--> Num) {...} }; class :: does Foo { has $.f = "Bar!" }.new.Foo::f.say
09:03 camelia rakudo-moar 1761f9: OUTPUT: «Stub code executed?  in method f at <tmp> line 1?  in block <unit> at <tmp> line 1??»
09:04 tokik joined #perl6
09:07 lookatme grondilu, what do you mean ?
09:07 eroux joined #perl6
09:09 grondilu I was expecting a type error
09:10 grondilu thing is : I would like to create two types of classes implementing "Foo" : one would do it with a f method, and one would do it with a f attribute.  I wanted both to obey the type constraints defined in the role Foo.
09:11 lookatme Hmm, I don't know about that
09:11 jnthn grondilu: Methods are has-scoped by default, not my or our
09:12 lizmat joined #perl6
09:12 grondilu m: class Foo { has Foo method clone {...} }
09:12 camelia rakudo-moar 1761f9: ( no output )
09:12 grondilu I see
09:12 grondilu thanks
09:12 lookatme grondilu, but, method or accessor in `::` has its own return type constraint
09:13 lookatme m: role Foo { method f(--> Num) { rand } }; class A does Foo { has $!f = "Bar!"; method f() of Str { $!f; }; }; A.new.f.say
09:13 camelia rakudo-moar 1761f9: OUTPUT: «Bar!?»
09:13 lookatme m: role Foo { method f(--> Num) { rand } }; class :: does Foo { has $.f = "Bar!" }.new.f.say
09:13 camelia rakudo-moar 1761f9: OUTPUT: «0.441744955363787?»
09:14 lookatme jnthn, why it choose f in Foo ? not access in :: ?
09:17 cdg joined #perl6
09:17 zakharyas joined #perl6
09:17 nadim m: role R{}; my @a = [] but R ; my $a = [] but R ; dd @a, $a ;
09:17 camelia rakudo-moar 1761f9: OUTPUT: «Array @a = []?Array+{R} $a = $[]?»
09:18 nadim jnthn: do  you have an explanation for why the array does not do the role when role is assigned to @var but it works when it is a $var
09:18 jnthn lookatme: Because an attribute only generates a method if there isn't already one
09:19 jnthn nadim: = is assignment, not binding
09:19 Guest69863 joined #perl6
09:19 jnthn Assignment is a copying operation
09:19 lookatme oh, thanks, that make sense
09:20 jnthn So my @a = blah means "iterate blah and put the things from it into @a"
09:20 nadim jnthn: so the lhs being an array does not get the extra role
09:20 lookatme so when I defined a f method in ::, it will call f first
09:20 nadim m: role R{}; my @a := [] but R ; my $a = [] but R ; dd @a, $a ;
09:20 camelia rakudo-moar 1761f9: OUTPUT: «[]?Array+{R} $a = $[]?»
09:20 jnthn lookatme: Yeah, in fact if you write class C { has $.a; method a() { } } then your method wins, by the same "only generate if it's missing" rule
09:21 lookatme jnthn, got it! :)
09:22 lookatme m: role R{}; my @a does R := [] but R ; my $a = [] but R ; dd @a, $a ;
09:22 camelia rakudo-moar 1761f9: OUTPUT: «[]?Array+{R} $a = $[]?»
09:22 lookatme m: role R{}; my @a does R := ([] but R) ; my $a = [] but R ; dd @a, $a ;
09:22 camelia rakudo-moar 1761f9: OUTPUT: «[]?Array+{R} $a = $[]?»
09:22 jnthn nadim: Yeah, assignment always means "put into". That's why things like my @pairs = %h; can work; it iterates %h (getting pairs) and puts them into @a
09:22 lookatme m: role R{}; my @a does R = ([] but R) ; my $a = [] but R ; dd @a, $a ;
09:22 camelia rakudo-moar 1761f9: OUTPUT: «Array+{R} @a = []?Array+{R} $a = $[]?»
09:31 suman___ joined #perl6
09:31 suman___ Hi everyone
09:31 suman___ Greetings from Nepal
09:32 suman___ I need help here in this question https://stackoverflow.com/questions/45609695/batch-text-processing-with-perl-6
09:32 moritz hi suman___
09:33 nadim lookatme: your example may not do what you want, you already have an array but R on the lhs. the interesting thing would be to assign is a normal array not one that doe R
09:34 lookatme m: role R{}; my @a does R = [] ; my $a = [] but R ; dd @a, $a ;
09:34 camelia rakudo-moar 1761f9: OUTPUT: «Array+{R} @a = []?Array+{R} $a = $[]?»
09:34 lookatme m: role R{}; my @a = ([] but R) ; my $a = [] but R ; dd @a, $a ;
09:34 camelia rakudo-moar 1761f9: OUTPUT: «Array @a = []?Array+{R} $a = $[]?»
09:35 Cabanossi joined #perl6
09:36 Guest69863 joined #perl6
09:41 lookatme suman___, you can simple use substitutions replace \begin{...} like s/'\begin{verbatim}'/'\begin{minted}{perl6}'/
09:42 suman___ lookatme Sounds good, will try
09:43 lookatme you welcome
09:43 lookatme off work
09:43 lookatme bye
09:43 suman___ lookatme thanks bye
09:45 nadim m: role R{has $.x}; my @a does R = [1] ; @a.x =7 ;
09:45 camelia rakudo-moar 1761f9: OUTPUT: «Cannot modify an immutable Any ((Any))?  in block <unit> at <tmp> line 1??»
09:47 jnthn m: role R{has $.x is rw}; my @a does R = [1] ; @a.x =7
09:47 camelia rakudo-moar 1761f9: ( no output )
09:47 nadim yes rw
09:49 Sgeo joined #perl6
09:50 nadim m: my role R { has $.max_lines is rw = 0 } ; my @d2 does R = [1..2] ; @d2.max_lines = 1 ;
09:50 camelia rakudo-moar 1761f9: ( no output )
09:51 nadim Ha! ^^ does not compile here, error is: No such method 'max_lines' for invocant of type 'Array'
09:51 timotimo if the invocant is "of type 'Array'", then the role mixin got lost
09:51 mcmillhj joined #perl6
09:53 tyil perlawhirl: I asked Wendy, I am to give you her email address so you can discuss it directly with her
09:54 nadim timotimo: my @array does R is indeed an Array only
09:54 cdg joined #perl6
09:54 brrt joined #perl6
09:54 timotimo oh, huh
09:57 nadim timotimo: no I am wrong, well no I am right, this is actually funny.
09:57 nadim timotimo: I had an error in my code, @a is redeclared a few lines below but it makes it fail a few lines up. I need to golf this.
09:58 timotimo ah, heh.
09:59 timotimo facebook video player has no speed option :\
10:01 nadim it seems that when a variable is redeclared in the same scope, the latest declaration is the one that is taken for the whole scope. Makes sense, is there a way to make a variable redeclaration a fatal error.
10:03 timotimo it already warns, doesn't it?
10:04 ijneb joined #perl6
10:04 itaylor57 joined #perl6
10:05 nadim yes it does
10:07 nadim very rightly so, so this is a mess from me but I was surprised to see that the type of an object at line 10 is change by a redeclaration on line 20. It makes perfectly sense, I made the error
10:07 nadim but I would't mind having it as an error
10:08 cdg joined #perl6
10:11 sena_kun joined #perl6
10:12 lizmat_ joined #perl6
10:13 cdg joined #perl6
10:14 timotimo hm, the general case is you accidentally have my $x; and later my $x; again, and it's no problem. so you see the warning, the program runs fine anyway, but you can immediately pull it out
10:16 timotimo but i'm not sure what our stance on warning vs error is
10:16 stmuk timotimo:  youtube-dl https://web.facebook.com/theperlconference/videos/341575852932049/
10:16 nadim is it possible to make it an error, specially if the types are different, which is the case I had here.
10:16 lizmat joined #perl6
10:16 timotimo stmuk: oh i hadn't thought of that!
10:16 timotimo it is, with a bit of coding
10:18 stmuk the video url comes from right clicking the original
10:19 astj joined #perl6
10:20 brrt joined #perl6
10:20 stmuk there is a perl 6 talk starting now
10:21 timotimo i'm still watching larry's keynote
10:22 timotimo actually, i'll defer that to download
10:23 astj joined #perl6
10:23 Guest69863 joined #perl6
10:25 nadim then I'll go watch it too :)
10:31 nadim woops that's long
10:31 timotimo can't read the slides properly
10:31 timotimo i imagine the url at the top would let me see the slides
10:31 timotimo but i can't read the url either
10:31 tyil stmuk: does that work for all presentations that were posted? :o
10:32 tyil I want to share the High End Unicode to some folk online
10:32 stmuk tyil: I think so
10:32 lizmat joined #perl6
10:32 tyil pretty cool
10:32 tyil I'll check it after this talk
10:32 tyil people are dying to see it :p
10:35 Cabanossi joined #perl6
10:41 haha_ joined #perl6
10:43 timotimo why don't we have a kind of Mix that can hold Complex Numbers? :)
10:48 labster joined #perl6
10:49 brrt joined #perl6
10:51 rindolf joined #perl6
10:55 brrt joined #perl6
11:01 dh7320 joined #perl6
11:02 timotimo ab5tract++ # good talk
11:09 markmont joined #perl6
11:12 donaldh joined #perl6
11:15 nadim good to know, I've see another one but it was more a social type and little content, except the social content which is also of value
11:16 nadim timotimo: shall I open a request for the redeclaration as error or there is so little chance that it is not worth it?
11:26 zengargoyle joined #perl6
11:27 astj joined #perl6
11:35 Cabanossi joined #perl6
11:36 Celelibi joined #perl6
11:38 markmont joined #perl6
11:42 xtreak joined #perl6
11:46 xtreak joined #perl6
11:47 itaipu joined #perl6
11:48 lizmat joined #perl6
11:49 raschipi joined #perl6
11:59 titsuki joined #perl6
12:02 raschipi Did you guys see that bioinformatics software now need input sanitation?
12:08 nadim don't all software need that?
12:09 raschipi Somone wrote an exploit in DNA.
12:12 colomon joined #perl6
12:17 ryu0 raschipi: now you can say that viruses run in the genes.
12:17 ryu0 lol
12:24 astj joined #perl6
12:30 AlexDaniel raschipi: source?
12:39 araraloren joined #perl6
12:41 lizmat joined #perl6
12:45 pierre__ joined #perl6
12:45 mcmillhj joined #perl6
12:48 colomon joined #perl6
12:50 donaldh joined #perl6
12:54 skids joined #perl6
13:00 pierre__ joined #perl6
13:02 labster joined #perl6
13:05 raschipi AlexDaniel: https://www.wired.com/story/malware-dna-hack
13:07 cdg joined #perl6
13:11 bonf joined #perl6
13:12 lizmat joined #perl6
13:13 cdg_ joined #perl6
13:20 Cabanossi joined #perl6
13:28 bonf left #perl6
13:29 brrt joined #perl6
13:29 Grauwolf joined #perl6
13:34 lizmat joined #perl6
13:37 lizmat joined #perl6
13:42 astj joined #perl6
13:47 raschipi_ joined #perl6
13:51 mr_ron joined #perl6
13:53 Khisanth joined #perl6
13:55 stmuk more unicode p6 at https://www.facebook.com/theperlconference/
13:56 mr_ron In https://docs.perl6.org/language/regexes#Backslashed,_predefined_character_classes word boundary is given as <|wb> but I don't think you need the '|' here to make it zero width.  <wb> and <|w> are both word boundaries.  Can I take out the leading '|' in <|wb>?
13:56 moritz I prefer <?wb> actually
13:57 moritz <wb> captures, but capturing a word boundary doesn't make all that much sense
13:59 geekosaur basically, the use of specifically | is commentary (telling the reader it's a zero width assertion), the more important part is that since it doesn't start with an alphanumeric, it is non-capturing
13:59 geekosaur do not underestimate the value of signalling your intent to a future reader of the code
13:59 mr_ron m: my $m = "The quick brown fox" ~~ /(.)(<wb>)quick/; say $0.chars; say $1.chars
13:59 camelia rakudo-moar 5e8d46: OUTPUT: «1?0?»
14:00 zakharyas joined #perl6
14:00 rindolf joined #perl6
14:01 mr_ron Why does <|wb> need the pipe and not not <ww> ?
14:04 raschipi_ Here for me the pipe has the same effect for both.
14:10 mr_ron m: say "The quick brown fox" ~~ /(.)(<wb>)(quick)/; say "The quick brown fox" ~~ /(.)(<|wb>)(quick)/; say "The quick brown fox" ~~ /(.)(<?wb>)(quick)/;
14:10 camelia rakudo-moar 5e8d46: OUTPUT: «? quick?? 0 => ? ?? 1 => ???  wb => ??? 2 => ?quick??? quick?? 0 => ? ?? 1 => ??? 2 => ?quick??? quick?? 0 => ? ?? 1 => ??? 2 => ?quick??»
14:12 raschipi_ m: say "The quick brown fox" ~~ /(.)<?wb>(quick)/;
14:12 camelia rakudo-moar 5e8d46: OUTPUT: «? quick?? 0 => ? ?? 1 => ?quick??»
14:15 markmont joined #perl6
14:17 donaldh joined #perl6
14:17 brrt joined #perl6
14:19 Cabanossi joined #perl6
14:20 mr_ron The doc only says zero-width and not non-capturing - introducing the extra concept at that point in the doc seems more confusing.  At least both <wb> and <ww> should be same.  I think better to leave (non-)capturing out but if you want to leave then maybe <|wb>... Word Boundary (zero-width assertion, non-capturing with '|').
14:23 raschipi_ mr_ron: The best way to explain it is to send a patch to the docs.
14:23 mr_ron thanks
14:26 Kyo91 joined #perl6
14:33 mcsnolte joined #perl6
14:35 lizmat joined #perl6
14:40 brrt joined #perl6
14:58 xtreak joined #perl6
15:01 labster joined #perl6
15:04 ncow joined #perl6
15:10 brrt joined #perl6
15:10 skids joined #perl6
15:17 itaipu joined #perl6
15:22 ckraniak joined #perl6
15:31 koto joined #perl6
15:34 japhb ab5tract: What was your talk about?  (I saw timotimo mention it above)
15:34 timotimo "rakudo has cool builtins, which is a good thing. also, you can read the source of these builtins because it's in perl6"
15:35 zakharyas joined #perl6
15:36 timotimo is a mostly wrong executive summary
15:42 itaipu joined #perl6
15:49 Guest69863 joined #perl6
15:54 kybr i'm trying to fix what i experience as a broken link in the docs. https://gist.github.com/kybr/074966feb5da558465ed995a8762186e
15:56 zengargoyle joined #perl6
15:57 labster joined #perl6
15:59 zakharyas joined #perl6
16:07 sufrostico joined #perl6
16:10 geekosaur kybr, it's a relative link
16:11 zengargoyle joined #perl6
16:11 geekosaur looks like someone copy-pasted text from type/Baggy to routine/roll
16:12 geekosaur so the L<pick|#method pick> turned into <a href="#method_pick"> which will only work on the Baggy page. the browser shows you not the relative link but what the link resolves to based on the page URL
16:14 geekosaur also, you seem to be looking for the source backwards. the link is from roll to pick, you cited a link in pick not in roll
16:14 geekosaur https://github.com/perl6/doc/blob/master/doc/Type/Baggy.pod6#L150 is the link
16:15 geekosaur oh, I see, this is actually the generated docs pulling in stuff from elsewhere. it needs to fix relative links
16:15 geekosaur not sure who needs to do this, likely file a docs bug
16:16 geekosaur it should be adjusting relative links based on the "From <place>" url
16:16 moritz anyone can do that who can read and write Perl 6 code
16:17 moritz it might not be trivial, though
16:17 geekosaur right, in this case the doc builder needs to (a) save the original source page (b) delete an existing anchor (c) add in the new one --- but that handles only the case L<text|#anchor>
16:18 geekosaur other kinds of relative links would be harder
16:22 ck joined #perl6
16:24 eroux joined #perl6
16:24 pierre_ joined #perl6
16:26 ckraniak joined #perl6
16:27 moritz or rewrite the links from relative to absolute when transplanting the POD data structures
16:32 user3 joined #perl6
16:33 st_elmo joined #perl6
16:33 user3 m: say +("aaa \n bbb \n ccc \n" ~~ m:g/\n/)
16:33 camelia rakudo-moar 5e8d46: OUTPUT: «3?»
16:33 user3 is there a better way than that to count the number of newlines in a string?
16:34 kybr unfortunately, i'm not going to be able to file a bug beyond what i already posted on that gist. i'm happy to file the content of my gist and geekosaur's response. is that enough or does someone else want to take that on?
16:34 user3 or in general to count the number of instances of a given character in a string
16:35 Geth ¦ doc: 5a2cd9da98 | (Steve Mynott)++ | doc/Type/Iterable.pod6
16:35 Geth ¦ doc: remove trailing whitespace
16:35 Geth ¦ doc: review: https://github.com/perl6/doc/commit/5a2cd9da98
16:35 Cabanossi joined #perl6
16:35 tokomer joined #perl6
16:37 ckraniak Ok trying out perl6, can't get nativecall to find a dll that's in the cwd
16:38 ckraniak Haven't done lots with dlls but so far as I can tell there's nothing up with the dll itself
16:39 ckraniak I have tried to pass the full path in and that doesn't work
16:41 raschipi_ m: say +"aaa \n bbb \n ccc \n".comb.grep("\n") #user3
16:41 camelia rakudo-moar 5e8d46: OUTPUT: «3?»
16:41 user3 raschipi_: hmm, looks even more complicated...
16:41 user3 lol
16:42 raschipi_ .comb divides the string into a list of charachters, then grep separates the ones we want, then casting to numeric returns the number in the list
16:42 user3 yes
16:44 timotimo hold on
16:44 timotimo comb *also* matches stuff
16:44 timotimo m: say "foo bar baz quux lol omg wtf".comb("o").perl
16:44 camelia rakudo-moar 5e8d46: OUTPUT: «("o", "o", "o", "o").Seq?»
16:44 timotimo m: say "foo bar baz quux lol omg wtf".comb(/<[aeiou]>/).perl
16:44 camelia rakudo-moar 5e8d46: OUTPUT: «("o", "o", "a", "a", "u", "u", "o", "o")?»
16:45 pilne joined #perl6
16:46 raschipi_ m: say +"aaa \n bbb \n ccc \n".comb("\n");+"aaa \n bbb \n ccc \n \n".comb("\n")
16:46 camelia rakudo-moar 5e8d46: OUTPUT: «WARNINGS for <tmp>:?Useless use of "+" in expression "+\"aaa \\n bbb \\n ccc \\n \\n\".comb(\"\\n\")" in sink context (line 1)?3?»
16:46 raschipi_ m: say +"aaa \n bbb \n ccc \n".comb("\n");say +"aaa \n bbb \n ccc \n \n".comb("\n")
16:46 camelia rakudo-moar 5e8d46: OUTPUT: «3?4?»
16:47 Guest69863 joined #perl6
16:47 user3 say +"aaa \n bbb \n ccc \n \n".comb("\n")
16:47 evalable6 user3, rakudo-moar 5e8d46132: OUTPUT: «4»
16:47 user3 wow
16:47 user3 it's better
16:48 mspo one thing I like about fancy quotes is that there is an explicit open and an explicit close
16:48 mspo so there's no real «balancing» to be done
16:48 raschipi_ m: say +"aaa ccc".comb("c");say +"aaa\n ccc\n ccc".comb("c")
16:48 camelia rakudo-moar 5e8d46: OUTPUT: «3?6?»
16:51 MilkmanDan joined #perl6
16:51 raschipi_ They're so much better that they're used everywhere except where a small number of characters was needed.
16:52 raschipi_ mspo: But balancing issues remain, just like with bracing.
16:53 mspo raschipi_: easier to detect, I think is what I'm saying
16:53 raschipi_ I see your point.
16:53 mspo raschipi_: or maybe there's no real advantage and I'm just making it up :)
16:53 ckraniak where is the search path for nativecall on Windows documented?
16:54 andrzejku joined #perl6
16:55 lizmat joined #perl6
16:55 ugexe docs.microsoft.com probably
16:56 ckraniak As in "is native([stuff])"
16:57 ckraniak Can't point it at cwd apparently
16:57 raschipi_ ckraniak: You might try to explore this stuff on Unix, we will be able to help better.
16:57 ugexe its wonky. i think it does something different if its a relative path vs an absolute path and str vs io::path
16:57 kybr geekosaur: is this the same problem that i described? https://github.com/perl6/doc/issues/1144
16:58 raschipi_ Especially because it's better defined there. MS Windows is... problematic.
16:58 ckraniak Can't argue with you there
16:59 raschipi_ Do you have a motive to this on Windows?
16:59 ugexe you probably have to do './' for $*CWD
17:00 ugexe https://github.com/rakudo/rakudo/blob/nom/t/04-nativecall/17-libnames.t#L9 so much for windows
17:01 raschipi_ I didn't say that it's simple, just that it's predictable. Not because of the OS in itself but because of conventions regarding the libraries.
17:02 ugexe I tried to bring some sanity to it here https://github.com/rakudo/rakudo/pull/730
17:02 ckraniak I have tried ./
17:02 ckraniak Windows is more available
17:03 ugexe ckraniak: what do you get for
17:03 ugexe perl6 -e "use NativeCall :TEST; say guess_library_name('./foo')"
17:06 ckraniak Same as $*CWD basically
17:08 ugexe depends how you look at it. note the difference between ./foo and foo
17:10 ugexe "foo" and "foo".IO also return different things (guess_library_name is a mess)
17:10 mcmillhj joined #perl6
17:11 dh7320 joined #perl6
17:11 ckraniak guess_library_name("$*CWD/foo") == guess_library_name("./foo")
17:12 itaipu joined #perl6
17:12 ugexe m: use NativeCall :TEST; say guess_library_name("./foo"); say guess_library_name("foo"); say guess_library_name("foo".IO)
17:12 camelia rakudo-moar 5e8d46: OUTPUT: «/home/camelia/libfoo.so?libfoo.so?/home/camelia/libfoo.so?»
17:13 bstamour joined #perl6
17:14 ckraniak "foo".IO evaluates to full path, "foo" does not
17:14 ckraniak Should say
17:15 ckraniak In guess_library_name
17:16 ugexe right, and thats weird because
17:16 ugexe m: say "foo".IO.Str
17:16 camelia rakudo-moar 5e8d46: OUTPUT: «foo?»
17:17 mcmillhj joined #perl6
17:19 ckraniak Dropping the dll in system32 and leaving off ./ does not work apparently
17:19 ckraniak Other dolls in system32 do work, like opengl32
17:19 ckraniak *dlls
17:20 ckraniak Gotta be an environment variable or a registry key or something
17:21 haha_ joined #perl6
17:27 entonian joined #perl6
17:31 lizmat joined #perl6
17:41 kybr does rand
17:41 kybr does srand set the seed for pick and roll?
17:42 cdg joined #perl6
17:43 cdg_ joined #perl6
17:51 lizmat joined #perl6
17:54 llfourn joined #perl6
17:56 lizmat joined #perl6
17:57 someuser joined #perl6
17:59 haha_ joined #perl6
18:02 cpage_ joined #perl6
18:10 haha_ joined #perl6
18:12 zengargoyle joined #perl6
18:12 AlexDani` joined #perl6
18:15 geekosaur kybr, yes, that's the sam eissue
18:20 ckraniak May be that it can find it but error message is decceptive
18:21 ckraniak Python cannot load it either but can definitely locate iy
18:21 ckraniak Guess: trying to load 32 bit dll into 64 but exe
18:22 ryu0 If Linenoise and Readline are both installed, which will rakudo choose to use for its REPL?
18:22 haha_ joined #perl6
18:23 ckraniak so moar is 64 but then
18:23 ckraniak *bit
18:25 konsolebox joined #perl6
18:30 jdv79 can anyone else install JSON::Tiny on the latest rakudo?
18:30 Kyo91 joined #perl6
18:31 jdv79 This is Rakudo version 2017.07-144-gec7bc25 built on MoarVM version 2017.07-365-gc0f7a3b
18:36 jdv79 is everyone at yapc or watching it?
18:36 zengargoyle joined #perl6
18:40 ugexe jdv79: fails for me
18:40 jdv79 does anything weird happen < 1m afterwards?
18:41 jdv79 anywhere from immediately to ~30s later all my gnome-terminals vanish without a trace
18:41 cdg joined #perl6
18:42 ugexe i think unicode is getting corrupted, and your terminals couldnt handle what it output
18:42 ugexe https://gist.githubusercontent.com/ugexe/99228bb9c17beb69d80ebfd2fec17d72/raw/87d499ef4020b997bf783fcc823d18512a4aad68/gistfile1.txt
18:45 jdv79 ah.  https://gist.github.com/anonymous/5facb80bd66b12f3fd5216f0a2569e38
18:45 jdv79 fun
18:49 ckraniak GOT IT
18:49 ckraniak was 32 bit dll in 64 bit exe
18:49 ckraniak mingw-m64 fixed it
18:50 ckraniak god bless cmake
18:50 dct joined #perl6
18:50 mspo am I in bizzaro world? :)
18:50 geekosaur joined #perl6
18:51 ckraniak Perl6 apparently has the world's least helpful error message for this, you see
18:51 mspo sounds like a bug
18:51 mspo having good messages is a goal
18:52 ckraniak Its sort of passing through the message from LoadLibrary though
18:52 ckraniak Actually wait I lied that was Python
18:54 ckraniak The error message is "cannot locate native library", but the problem is actually the dll was compiled to the wrong architecture
18:54 timotimo isn't that a quirk of how windows does that?
18:54 ckraniak Maybe
18:54 timotimo like, if you're a 32bit process, dlls that were made for 64bit don't actually exist?
18:55 timotimo as ridiculous as that sounds
18:55 geekosaur yes, windows cannot cross-load dlls
18:55 timotimo well, of course it can't cross-load them
18:55 ckraniak The error message isn't somethi bc you could pull help from though
18:55 geekosaur if you rin a 32 bit process on 64 bit windows, it starts up a cut-down hyperv to run it in a 32-bit container
18:55 timotimo but it pretends the file doesn't exist, no?
18:55 geekosaur 64 bit processes cannot load 32 bit dlls
18:56 ckraniak Yes and it took a few hours to realize that was the problem instead of some weird path resolution issue
18:56 geekosaur hm. I thought recently someone was getting a "bad file format" type error from that
18:56 timotimo that's definitely what you get on linux
19:01 ugexe El_Che: yes you can use zef's modules to do things without the cli - see https://github.com/ugexe/zef/blob/33c18c90000df37df15e7612100bdbf0ebfd6799/xt/repository.t#L45
19:02 ryu0 ugexe: is there any reason to package panda? i read zef supersedes it.
19:08 ugexe the only reason would be that a few packages may have panda listed as a dependency (see: `zef rdepends panda`)
19:13 ryu0 \o/
19:13 ryu0 12 modules left until i have rakudo star packaged completely.
19:18 raschipi_ ryu0++
19:18 raschipi_ Are you submitting them to Debian?
19:18 ryu0 raschipi_: ubuntu PPA.
19:18 raschipi_ So?
19:18 Kyo91 joined #perl6
19:19 raschipi_ My question remains...
19:19 ryu0 not really planning on it per say. debian has their own packaging policies that i don't really know too well.
19:20 ryu0 and ultimately they'll be out of date long before they make it into one of their major releases.
19:20 Cabanossi joined #perl6
19:20 ryu0 it may make more sense later when rakudo is more mature that having an older release isn't a big deal.
19:21 raschipi_ Nice, give me a link and I will do it myself.
19:21 ryu0 https://launchpad.net/~ryu0/+archive/ubuntu/perl6
19:21 ryu0 debian already has the 3 core packages of rakudo though, just a heads up.
19:22 ryu0 i'm not done packaging just yet, but you can certainly reuse how i figured out to package the modules.
19:23 ryu0 raschipi_: why? do you actually use debian?
19:23 brrt joined #perl6
19:23 Rawriful joined #perl6
19:23 raschipi_ Just looking at that page, I can already tell they're too out of policy to be useful.
19:23 ryu0 heh. too many?
19:24 raschipi_ No, Perl/perl6 ackages have to follow the debain perl policy, which means that "perl6" goes at the end of the name of the package.
19:24 ryu0 Oh.
19:24 raschipi_ Are you open to renaming them?
19:25 ugexe https://github.com/ugexe/zef/issues/117 # detailed discussion on some issues with packaging for Debian (mostly precomp related)
19:25 pierre_ joined #perl6
19:25 ryu0 raschipi_: a lot of work when i've already come so far. lol
19:26 ryu0 hm.
19:27 raschipi_ For example, the package for File::Directory::Tree has to be named libfile-directory-tree-perl6
19:28 ryu0 raschipi_: i don't really feel like renaming them, but i can share what i learned if you feel like writing debian packages.
19:29 raschipi_ I will ask if I need anything. If you want to write, can you please do it in the link ugexe posted above?
19:29 ryu0 it already documents the main point.
19:30 ryu0 packaging a certain script from rakudo package for installing the modules into the vendor directory.
19:30 ryu0 it works quite well. the only thing i added was to symlink if anything gets installed into the bin directory.
19:31 ryu0 it's also how the stuff is packaged on ARCH.
19:32 ryu0 raschipi_: i advise writing a skeleton package when doing the modules. it helps a lot.
19:33 ryu0 i have only had to make minor adjustments for depends and such.
19:35 ryu0 raschipi_: there's ~35 modules to package. most only depend on rakudo, others depend on one or more module packages.
19:36 TreyHarris joined #perl6
19:36 raschipi_ I know the debian Perl6 team is already working on it, I will go trough the team channels, thanks.
19:36 ryu0 ok.
19:37 ryu0 sorry i can't really help you, but i felt it best to just let debian do it their way.
19:37 raschipi_ Just FYI, soon their packages will be pulled by Ubuntu and there might be conflicts, you should check to add appropriate conflicts to your packages.
19:37 ryu0 once it makes into a ubuntu LTS i'll probably discontinue this PPA.
19:38 ryu0 raschipi_: that'll probably be awhile.
19:39 raschipi_ Why do you say that?
19:39 ryu0 because debian stable tends to take years to get a new release.
19:39 raschipi_ Ubuntu doesn't pull from stable, it pulls from sid.
19:40 ryu0 Oh.
19:41 raschipi_ And Ubuntu will release in October, they try to pull multiple times and as close as possible to the release date if they don't detect problems.
19:43 ryu0 ... has debian even packaged a single perl6 module yet? all i've seen is rakudo.
19:44 mst ryu0: pleae don't discontinue the PPA
19:44 mst ubuntu are completely useless at shipping perl stuff
19:44 ryu0 mst: ok.
19:44 ryu0 mst: you actually want to use this PPA i'm building?
19:45 mst I want people to be able to do so
19:45 mst my solution is to only use ubuntu when shadowcat customers are paying me to support perl on it
19:45 mst at which point their "snapshot debian testing at random and ignore it for six months" policy is a billable hour generator ;)
19:46 raschipi_ ryu0: did you understand my point about conflicts?
19:47 ryu0 raschipi_: yes, if someone's trying to use both at once.
19:47 ryu0 i did distribution packaging for 8 years. i know what a conflict is.
19:47 ryu0 just not for debian really.
19:48 ryu0 i'll deal with it if/when it arises.
19:50 ryu0 raschipi_: any idea why debian chose to split rakudo and its library into different packages? it seemed pointless.
19:50 Cabanossi joined #perl6
19:50 raschipi_ You mean the "rakudo" and "rakudo-lib" split?
19:50 ryu0 yes.
19:52 ryu0 afaik, nothing except rakudo even links to that library.
19:54 cpage_ joined #perl6
19:55 PerlNewbie joined #perl6
19:55 konsolebox joined #perl6
20:04 raschipi_ I 'm not aware of their possible motivation.
20:05 moritz probably a matter of policy, in case anybody wants to link to it later
20:05 moritz much like Inline::Perl5 now links to libperl.so
20:06 raschipi_ Policy requires splitting if more than one package links to it. But since just rakudo links against it, it's not required.
20:06 moritz ok
20:10 raschipi_ According to the description, the lib is an ELF-handling lib, useful for general use, so they might have split preemptively in case someone does want to use in the future. It isn't much work anyway, all handled by the automatic tools.
20:11 nhywyll joined #perl6
20:14 khw joined #perl6
20:18 timotimo hey everybody
20:18 timotimo bikeshedding time
20:19 * moritz sheds his bike and his skin
20:19 timotimo what methods on a IO::Socket::Async would you expect to give you access to the ip of the local and remote sockets?
20:23 stmuk ryu0: I think you need to set NO_NETWORKING_TESTING for perl6-lpw-simple
20:24 ryu0 stmuk: Ah. I had disabled the tests because they failed due to no networking access.
20:24 ryu0 i'll put that in the next time I have to rebuild it.
20:25 cdg joined #perl6
20:26 mspo getsockname and getpeername ?
20:26 mspo those are the c functions, right?
20:32 timotimo uv also names them that, yeah
20:32 timotimo i do split it into ip and port, though
20:32 timotimo and also i only support ipv4 and ipv6
20:33 ryu0 ah, so no unix sockets.
20:34 timotimo we don't support them at all yet ;(
20:35 ryu0 not too surprising. they're not universally portable.
20:35 ryu0 namely windows has nothing comparable.
20:36 astj joined #perl6
20:36 stmuk ryu0: if you are using the official release tarballs for nqp 2017.07 rather than the nqp in R* you might want to consider this patch as well
20:36 stmuk https://build.opensuse.org/package/view_file/devel:languages:perl6/nqp/nqp-fix-ll-exception.diff?expand=1
20:37 ryu0 why? what's it even do?
20:38 stmuk it fixes --ll-exception
20:38 ryu0 i don't even know what that does.
20:38 ryu0 Ah.
20:39 timotimo normally exceptions are abbreviated, skipping over frames inside the compiler and builtins
20:39 timotimo with --ll-exception those are also shown, which is much more useful if you're reporting bugs in the compiler and/or builtins
20:39 ryu0 was this fixed in git?
20:40 ryu0 don't really want to have to rebuild everything just for this :|
20:41 stmuk well maybe considering checking opensuse for patches in future .. it's likely R* will use them
20:42 ryu0 R*?
20:43 stmuk rakudo star
20:43 ryu0 oh.
20:43 stmuk this fix is in star too
20:46 timotimo yup, we used a non-release version of nqp in rakudo star to get this fix
20:47 ryu0 either way i'll get it next time i bump nqp so i don't think i'm going to worry about it at this time.
20:47 ryu0 i just checked and it's been patched in git.
20:50 AlexDaniel joined #perl6
20:50 ryu0 timotimo: are the monthly releases of moarvm, nqp, and rakudo recommended for actual use?
20:52 stmuk if you fix it this time you will have a mechanism for next time a similar problem occurs
20:52 epony joined #perl6
20:53 ryu0 stmuk: i just wish the precomp crud didn't require a recompile of every module package.
20:55 stmuk ryu0: I think there has been talk of making precomp more friendly to binary packagers in https://irclog.perlgeek.de/perl6-toolchain/
20:55 epony joined #perl6
20:56 ryu0 ideally there'd be some ABI and old compiled bytecode would still work, though maybe less than optimally.
20:57 ryu0 just the way it is right now is like having static linkage.
20:57 timotimo the monthly releases are good, but sometimes we do the terrible thing where the rakudo star release has a patch that the monthly release doesn't
20:58 timotimo the second-last month we did like six point releases in a row
20:58 timotimo that wasn't good, either
20:59 ryu0 timotimo: mostly i wanted to package the same feature set as rakudo star, maybe a bit more depending on what i get requests for or find useful.
20:59 timotimo i see
20:59 ryu0 hm.
21:00 ryu0 but i'll work this patch in.
21:00 ryu0 i just assumed that the separate releases were exactly the same. -_-
21:00 stmuk there was some talk of removing the time stamps from the SHA1 type precomp files
21:01 ryu0 SHA1? i thought they would be using SHA256 by now.
21:01 colomon joined #perl6
21:01 stmuk ryu0: the monthly releases are like Linus kernel releases .. I don't think a bit of patching is always bad
21:02 stmuk most linux distros don't use a Linus kernel
21:02 Kyo91_ joined #perl6
21:03 ryu0 considering how they've found collisions with SHA1 now.
21:03 stmuk its great more people are experimenting with packaging rakudo
21:03 stmuk well git still uses SHA1 as well .. ]
21:04 ryu0 stmuk: frankly rakudo star should be packageable directly but i found that to be next to impossible currently.
21:04 raschipi_ ryu0: They can find collisions if they control both inputs.
21:04 raschipi_ And this isn't a scurity critcal thing, they were talking just above about removing it...
21:05 ryu0 i just know it broke some subversion repos awhile back.
21:05 raschipi_ Rephasing: they can produce too documents that appear bona-fide but have the same sha1 hash.
21:05 raschipi_ Yes, if both documents are put into version control that relies on hashes, it will be a problem.
21:06 TEttinger joined #perl6
21:06 ryu0 i heard a mitigation is to also include the length in some respect.
21:06 raschipi_ But it's not something one expects to find in the wild. It could be used into a scam, though.
21:06 ryu0 or, just use a stronger hash.
21:06 raschipi_ Yeah, that's why it's only done with files that will hide the real lenght, like PDFs.
21:07 stmuk ryu0: yes it should be
21:07 raschipi_ Yeah, the recommendation to use a stronger hash is warranted if problems could arise. But in this case, they are talking about removing it.
21:08 rindolf joined #perl6
21:08 raschipi_ If sha1 is used in other places, it should be changed because it's only a question of time before it causes problems.
21:08 raschipi_ Well, sha256 too, but it's a much longer time.
21:09 ryu0 might as well jump straight to sha512 to prolong the time.
21:09 stmuk pull requests welcome! :)
21:09 raschipi_ It makes sense to measure how much resources that takes.
21:10 raschipi_ People, I have to go now. Hugs for everyone.
21:10 ryu0 Can't... breathe...
21:10 ryu0 lol
21:17 colomon joined #perl6
21:19 basket` joined #perl6
21:20 Cabanossi joined #perl6
21:22 lizmat joined #perl6
21:23 mspo timotimo: they return structures with a bunch of info, I thought
21:24 mspo address and port at least
21:25 mspo timotimo: erlang drops the "get" part
21:25 mspo http://erlang.org/doc/man/inet.html#sockname-1
21:30 timotimo well, yeah, they do. but do i want to mirror that in perl6?
21:30 timotimo with my current code you get a string and an int for the local and remote address each
21:31 timotimo sockname stuff is just a flat struct, so i could also ask the user to pass in a size and just return a Buf of the bytes and have rakudo do whatever it wants with it
21:32 mspo timotimo: just giving another data point.  The c names are probably the best :)
21:32 sena_kun joined #perl6
21:32 mspo timotimo: why joearms decided to drop "get" in 1987 or whatever is probably lost to history
21:32 espadrine joined #perl6
21:32 mspo timotimo: I just like to think erlang is a good model for networking stuff in general.  I could also be wrong completely :)
21:33 mspo their binary encoding stuff is top notch, at least
21:35 mspo http://erlang.org/doc/programming_examples/bit_syntax.html#id66841
21:47 Guest69863 joined #perl6
21:52 tbrowder is there
21:52 tbrowder ff!
21:53 timotimo what i have right now are .peer-host, .peer-port, .socket-host, and .socket-port
21:54 tbrowder hi, #perl6. is there any way to capture a "&?ROUTINE.name" into a p6 var for later use?
21:54 timotimo &?ROUTINE.name is just a string, you can store strings in perl6 vars, of course
21:56 tbrowder i've tried that and haven't had it work, probably a coding error. see if i can demo it as you said...
21:56 timotimo sure
21:57 tbrowder m: sub f{ my $s = &?ROUTINE.name; say $s;}; f()
21:57 camelia rakudo-moar ec7bc2: OUTPUT: «f?»
21:58 tbrowder ok, i think i was trying to put it inside "" or something like that.
21:59 tbrowder timotimo: thanks!
22:02 timotimo "it"?
22:06 tbrowder i was trying to do this inside a sub but it doesn't work: say "inside sub '&?ROUTINE.name'"
22:07 geekosaur I dont think & interpolates directly
22:07 geekosaur m: say "inside sub '&?ROUTINE.name'"
22:07 camelia rakudo-moar ec7bc2: OUTPUT: «inside sub '&?ROUTINE.name'?»
22:07 geekosaur m: say "inside sub '{&?ROUTINE.name}'"
22:07 camelia rakudo-moar ec7bc2: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Undeclared name:?    ?ROUTINE used at line 1. Did you mean 'Routine'???»
22:07 tbrowder but this does work: say "inside sub '{&?ROUTINE.name}'"
22:08 tbrowder well, you actually have to be in a sub...
22:08 geekosaur yeh
22:09 tbrowder it doesn't stringify like, say, $*PROGRAM
22:09 tbrowder m: say "in program $*PROGRAM"
22:09 camelia rakudo-moar ec7bc2: OUTPUT: «in program <tmp>?»
22:10 skids joined #perl6
22:10 geekosaur yes, as I said, & sigil doesn't interpolate. more, it's a method call, so if it did interpolate & sigils then you'd get '<whatever &?ROUTINE stingifies to>.name'
22:11 tbrowder m: f{say "in sub '&?ROUTINE.name'"};f()
22:11 camelia rakudo-moar ec7bc2: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Undeclared routine:?    f used at line 1??»
22:12 ugexe space bar is hot lava
22:12 tbrowder m: sub f{say "in sub '&?ROUTINE.name'"};f()
22:12 camelia rakudo-moar ec7bc2: OUTPUT: «in sub '&?ROUTINE.name'?»
22:12 geekosaur m: say "hi $*DISTRO.name"
22:12 camelia rakudo-moar ec7bc2: OUTPUT: «hi opensuse.name?»
22:14 geekosaur interpolation iirc only handles $ sigil with optional postcircumfix; not method calls or etc. which is why {} interpolation exists
22:14 geekosaur recognizing the end of general expressions in a string is hard
22:14 tbrowder m:  sub f{say "in sub '{&?ROUTINE.name}'"};f()
22:14 camelia rakudo-moar ec7bc2: OUTPUT: «in sub 'f'?»
22:15 tbrowder \o/
22:15 cdg_ joined #perl6
22:16 MasterDuke m: say "inside $*PROGRAM.uc()"
22:16 camelia rakudo-moar ec7bc2: OUTPUT: «inside /TMP/EVALBOT-FILE-YVPTBWB1D6?»
22:16 MasterDuke m: say "inside $*PROGRAM.uc"
22:16 camelia rakudo-moar ec7bc2: OUTPUT: «inside <tmp>.uc?»
22:16 MasterDuke it interpolates method calls, but you have to end them with '()'
22:17 geekosaur yeh, that postcircumfix thing I mentioned I guess
22:18 MasterDuke ah, wasn't quite sure what you meant by that
22:18 mcmillhj joined #perl6
22:23 tbrowder well, inside a script $*PROGRAM stringifies without the .uc or ()
22:24 geekosaur I am still not sure what you are trying to get at, aisde from "must interpolate every possible sigil. sorry you intended that as literal text; interpolatin is clearly more important"
22:24 nadim joined #perl6
22:26 tbrowder m: say "inside program '{$*PROGRAM}'"
22:26 camelia rakudo-moar ec7bc2: OUTPUT: «inside program '<tmp>'?»
22:26 Geth ¦ Inline-Perl5: b26e3c4111 | (Stefan Seifert)++ | lib/Inline/Perl5.pm6
22:26 Geth ¦ Inline-Perl5: Speed up p5_to_p6 by avoiding smart match
22:26 Geth ¦ Inline-Perl5:
22:26 Geth ¦ Inline-Perl5: when $some_enum_value calls Numeric.ACCEPTS which is very heavy weight
22:26 Geth ¦ Inline-Perl5: when all we want is a numeric equality test which should be dirt cheap.
22:26 Geth ¦ Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/b26e3c4111
22:28 zakharyas joined #perl6
22:28 setty1 joined #perl6
22:34 mcmillhj joined #perl6
22:34 markmont joined #perl6
22:43 Geth ¦ Inline-Perl5: 83e2149596 | (Stefan Seifert)++ | lib/Inline/Perl5.pm6
22:43 Geth ¦ Inline-Perl5: Speed up p6_to_p5(Str) by only looking up the UTF-8 encoder once
22:43 Geth ¦ Inline-Perl5:
22:43 Geth ¦ Inline-Perl5: Str.encode looks up the encoder in the encoder registry and handing of
22:43 Geth ¦ Inline-Perl5: the actual encoding to that. As we always want UTF-8 encoding anyway we
22:43 Geth ¦ Inline-Perl5: can fetch this Encoder object once and use it directly.
22:43 Geth ¦ Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/83e2149596
22:44 jnthn Yay, somebody takes advantage of the encoder API :)
22:44 jnthn (I/O handles do exactly that also)
22:45 nine Ok, with the latest Inline::Perl5 commits, I'm now at 9.881s for csv-ip5xs (best of 5 runs, 100000 iterations). Used to be 13.042s earlier today and 17.483s last week.-
22:50 mcmillhj joined #perl6
22:54 astj joined #perl6
22:56 timotimo that is really good
23:00 ckraniak joined #perl6
23:09 mcmillhj joined #perl6
23:15 mspo encoder api?
23:18 japhb mspo: The MoarVM/NQP/Rakudo stack has a pluggable string encoder/buffer decoder API, allowing you to orchestrate everything at the Perl 6 level, instead of having to write C code to alter encoding rules.
23:20 mildbill_ joined #perl6
23:23 MasterDuke joined #perl6
23:24 mspo docs?
23:25 mcmillhj joined #perl6
23:27 pierre_ joined #perl6
23:35 Cabanossi joined #perl6
23:36 zengargoyle joined #perl6
23:37 BenGoldberg joined #perl6
23:37 jnthn mspo: These are quite recent additions, so the docs aren't all there yet; the Encoding role is: https://docs.perl6.org/type/Encoding
23:39 dwarring joined #perl6
23:42 committable6 joined #perl6
23:45 labster joined #perl6

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

Perl 6 | Reference Documentation | Rakudo