»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! Set by moritz on 22 December 2015. |
|||
00:01
bisectable6_ joined,
ChanServ sets mode: +v bisectable6_
00:02
bisectable6_ left
00:04
Cabanossi left
00:06
Cabanossi joined,
colomon left
00:25
dh7320 left
00:28
cdg joined
00:29
pierre_ joined
|
|||
lookatme | morning | 00:30 | |
00:37
steve-o joined
|
|||
steve-o | total perl 6 noob question alert | 00:37 | |
can i use Tk with perl6 | |||
? | |||
jdv79 | i don't think there's any bindings | 00:38 | |
there's some gtk ones | |||
lookatme | buggable: eco gtk | ||
buggable | lookatme, Found 4 results: GTK::Simple, GTK::Simpler, GTK::Scintilla, Inform. See modules.perl6.org/s/gtk | ||
lookatme | buggable: eco tk | 00:39 | |
buggable | lookatme, Found 4 results: GTK::Simple, GTK::Simpler, GTK::Scintilla, Inform. See modules.perl6.org/s/tk | ||
00:39
dh7320 joined
|
|||
lookatme | steve-o, ^^^ | 00:39 | |
00:39
cdg left,
zengargo1le joined
|
|||
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:40 | |
jdv79 | gtk is the gnome gui stuff | 00:41 | |
lookatme | IDK | ||
thought gtk support win | |||
though | |||
jdv79 | yeah, it does | 00:42 | |
lookatme | you can see, the appveyor test is failed | ||
00:43
zengargoyle left
|
|||
steve-o | ok thanks i will look into GTK | 00:43 | |
00:45
dh7320 left
00:47
BenGoldberg joined
00:48
zengargo1le left
00:49
dh7320 joined
00:53
steve-o left,
raschipi joined
01:09
wamba left
01:12
dh7320 left
01:29
colomon joined
01:33
aborazmeh joined,
aborazmeh left,
aborazmeh joined
01:38
pompomcrab joined
01:40
colomon left,
pierre_ left,
colomon joined,
colomon left
01:41
colomon joined
|
|||
pompomcrab | my $resp = HTTP::UserAgent.new.get: $url; | 01:41 | |
Segmentation Fault | |||
i have no idea how to debug this, but i guess it's time to learn. what should i start with? | 01:42 | ||
in perl5 i would use B:: to see what line it was executing where i croaked. what is the p6 equiv of B::? | |||
01:43
pierre_ joined
|
|||
pompomcrab | the $url is 'wikileaks.org/macron-emails//get/' LOL | 01:44 | |
maybe HTTP::U::A doesn't like https | |||
and yes, this is just a simple scraper to pull all the emaisl | |||
01:45
colomon left
|
|||
pompomcrab | err i mean $url is 'wikileaks.org/macron-emails//get/2' | 01:45 | |
01:46
ilbot3 left
01:49
AlexDaniel left
|
|||
MasterDuke | pompomcrab: try with per6-valgrind or perl6-gdb | 01:49 | |
01:49
AlexDaniel joined
01:50
Cabanossi left
|
|||
lookatme | and may try to update your rakudo if you run old version | 01:50 | |
pompomcrab | MasterDuke: thx | 01:51 | |
01:51
Cabanossi joined,
ilbot3 joined,
ChanServ sets mode: +v ilbot3
01:52
aborazmeh left
|
|||
lookatme | buggable: eco io | 01:54 | |
buggable | lookatme, Found 235 results: p6doc, Bailador, BioPerl6, v5, Web. See modules.perl6.org/s/io | ||
01:56
pierre_ left
02:06
pierre_ joined
02:08
skids joined
|
|||
AlexDaniel | m: for ‘foo bar baz’.match: :g, / (\w+) / { say ~$0 } | 02:09 | |
camelia | foo foo foo |
||
AlexDaniel | why is it always foo? I do understand that I was supposed to write it like this: | ||
m: for ‘foo bar baz’.match: :g, / (\w+) / { say .[0] } | 02:10 | ||
camelia | 「foo」 「bar」 「baz」 |
||
AlexDaniel | but still, why? | ||
02:11
noganex joined
02:13
noganex_ left
02:14
cdg joined
|
|||
geekosaur | it doesn't know how to re-alias $0 for each returned Match object | 02:14 | |
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 | ||
so $0 always gets aliased to the first Match object | |||
probably also $/ | |||
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 | ||
that's not really perl 6 style magic though | |||
raschipi | Can it do symbolic references with a number to access $0, $1, $2, etc? | 02:18 | |
AlexDaniel | I'm thinking why would it be aliased to anything at all | 02:22 | |
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 | |
*your | |||
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 | |||
AlexDaniel | um… | 02:27 | |
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:28 | |
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 | ||
there is *one* match operation. it has completed, producing 3 Match objects. | |||
AlexDaniel | no, I'm thinking if it does nothing useful with :g, then why put anything into $/ at all | ||
geekosaur | it is too late for $/ to be each one in turn | ||
unless that knowledge is coded into for | |||
*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 } | ||
camelia | 「foo」 0 => 「foo」 「foo」 0 => 「foo」 「foo」 0 => 「foo」 |
||
perlawhirl | AlexDaniel: it's not equivalent to p5: while ( $foo ~= /(\w+)/g ) { say $1 } | ||
AlexDaniel: It doesn't match progressively, it's all at once | |||
m: for 'foo bar baz' ~~ m:g/(\w+)/ { say $/; exit } | |||
camelia | (「foo」 0 => 「foo」 「bar」 0 => 「bar」 「baz」 0 => 「baz」) |
||
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 | |
this is perl, not icon or haskell :p | |||
mst | *perl6 | 02:32 | |
I've implemented such generator behaviour in perl5 just fine | |||
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 | ||
AlexDaniel | oh… I think I see it now | 02:34 | |
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 | ||
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
|
|||
perigrin | perl.*-ish turned *me* into a lazy generator | 02:35 | |
so I present myself as a contradictory example | |||
AlexDaniel | thanks! | 02:36 | |
mst | geekosaur: "this is a perl" would express the same POV and I'd agree 100% | 02:37 | |
(and sorry for pedanting it but I've spent too long squelching silly arguments so obviously I'm (?:over)?sensitive) | 02:38 | ||
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:39 | |
(possibly recalling incorrectly though) | 02:40 | ||
well, sometihng like that, not this specific (equivalent) case | 02:41 | ||
(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:42 | ||
AlexDaniel | geekosaur: ok, wait, but why? It is useful | 02:43 | |
raschipi | In P6 for is quietly treated as a map instead. | ||
AlexDaniel | m: for ‘foo bar baz’.match: :g, / (\w+) / { say $/ } | ||
camelia | (「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 => 「… |
||
AlexDaniel | geekosaur: here you have all of your results | ||
geekosaur | oh, I just remembered what I was thinking of, it's the behavior of the each iterator | 02:44 | |
and they were doing the opposite thing: while (each ... ) | |||
which, no, very no | 02:45 | ||
AlexDaniel | m: ‘foo bar baz’.match: :g, / (\w+) /; for @$/ { say .[0] } | 02:46 | |
camelia | 「foo」 「bar」 「baz」 |
||
lookatme | m: for @(‘foo bar baz’.match: :g, / (\w+) /) { say .[0] } | 02:52 | |
camelia | 「foo」 「bar」 「baz」 |
||
AlexDaniel | that does nothing | 02:53 | |
tyil[m] | Perl conf is pretty cool so far | 02:59 | |
You guys are missing out | |||
mst | geekosaur: using 'each' in perl5 is invariably an error | 03:00 | |
geekosaur: it only exists that way to iterate DBM files that only allowed a single handle | |||
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? | ||
tyil[m] | perlawhirl: I can ask wendy if I dont forget | 03:03 | |
She's the one at the merch stand | |||
perlawhirl | thanks | 03:04 | |
03:05
pharv_ joined
03:08
itaipu joined
03:09
pierre_ left
03:18
Cabanossi left
03:19
Cabanossi joined
03:21
pompomcrab left,
aborazmeh joined,
aborazmeh left,
aborazmeh joined,
BenGoldberg left
03:43
pierre_ joined
03:44
stmuk joined
03:46
Util joined,
stmuk_ left
03:53
feng_ joined
03:56
skids left
03:59
pilne left
04:04
Cabanossi left
04:05
Cabanossi joined
04:07
itaipu left
04:13
feng_ left
|
|||
snarkyboojum | oO(plushie camelias!) | 04:19 | |
04:25
pierre_ left
04:27
pierre_ joined
04:30
khw left
04:39
raschipi left
04:48
cdg left
04:56
xtreak joined
04:58
pharv_ left
05:02
Cabanossi left
05:05
Cabanossi joined
05:09
aborazmeh left,
pierre_ left
05:21
aborazmeh joined,
aborazmeh left,
aborazmeh joined
05:26
dorothyw joined
|
|||
dorothyw | Sorry to intrude. I am wondering if there is a perl6 repl that is sutiable as a shell | 05:27 | |
*suitable | |||
05:28
aborazmeh left
|
|||
dorothyw | Even if there was just a really good repl for perl6 I think it could be hacked into being a suitable shell | 05:29 | |
05:30
Guest69863 joined
|
|||
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:35 | |
05:35
lizmat left
|
|||
dorothyw | Going to reconnect just a moment | 05:36 | |
05:36
dorothyw left
05:37
dorothyw joined
05:39
xtreak_ joined
|
|||
dorothyw | b | 05:40 | |
ryu0 | dorothyw: option 1. install the Readline or Linenoise packages. | 05:41 | |
05:41
xtreak left
|
|||
ryu0 | dorothyw: option 2. use rlwrap to wrap perl6 command. | 05:42 | |
dorothyw: it's not really a shell like BASH but it will give you a complete REPL. | |||
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 | ||
I am very new to perl though I am perl6 all the way because macros and because better than bash etc | |||
ryu0 | do you have zef alreay installed? | 05:43 | |
dorothyw | no though I have rakudo installed | ||
ryu0 | you need to install zef first. | ||
05:43
espadrine joined
|
|||
ryu0 | most instructions assume use of zef for installing modules for perl6. | 05:43 | |
dorothyw | installing zef as per github instructions | 05:44 | |
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:45 | |
36ish. | 05:46 | ||
dorothyw | Getting an undeclared names error | 05:47 | |
ryu0 | dorothyw: paste it somewhere please. | ||
dorothyw | hastebin.com/raw/nitebizoya | ||
05:48
xtreak joined
|
|||
ryu0 | ... How old is your rakudo? | 05:49 | |
dorothyw | I performed sudo apt-get install rakudo from ubuntu 16.04 | 05:50 | |
ryu0 | ... that's why. | ||
dorothyw | Want me to compile? | ||
05:50
xtreak_ left
|
|||
ryu0 | I have a better idea then. | 05:51 | |
uninstall the repo rakudo. it's very ancient and unlikely to work with current perl6 modules. | |||
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 | ||
launchpad.net/~ryu0/+archive/ubuntu/perl6 | |||
xenial is the current ubuntu you're using. | |||
dorothyw | moment | 05:53 | |
ryu0 | i'm hoping this will be an asset to novices who at least know enough to use PPAs. | 05:54 | |
05:54
lowbro joined
05:55
lowbro left,
lowbro joined,
andrzejku joined
|
|||
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. | ||
# add-apt-repository ppa:ryu0/perl6 | |||
It imports the PPAs public key and adds an APT repo for it. | 05:57 | ||
dorothyw | Should have just igven me that command :p | ||
ryu0 | Sorry, thought you could find it from the page. | ||
dorothyw | So now I apt-get install rakudo | ||
right? | 05:58 | ||
ryu0 | after an apt update. | ||
or apt-get | |||
either works. | |||
apt-get install rakudo perl6-readline zef | |||
that should get you started. | |||
you can use zef to install anything else you need, either into your private perl6 stuff or system-wide. | 05:59 | ||
dorothyw | installing zef | ||
ryu0 | i'm just packaging everything that ships with rakudo star so it's a complete set of the baseline packages. | ||
just not there yet, but what is there should be quite usable. | 06:00 | ||
does this solve your problem? | |||
dorothyw | Yeah that gets rakudo installed then I can try to install linenoise | 06:01 | |
ryu0 | ok. | ||
i was suggesting perl6-readline as it does the same thing as linenoise | |||
and is already packaged by my PPA. | |||
dorothyw | ah | ||
ryu0 | i'm using it to substitute for Linenoise. | 06:02 | |
dorothyw | apt-get installing it now | ||
ryu0 | If you were using perl6 on another platform, then you'd use Linenoise. | ||
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. | |||
You just wanted a complete REPL for perl6, yes? | 06:03 | ||
dorothyw | Yeah i want to try to get a perl shell going | ||
ryu0 | rakudo automatically has one if you have Readline or Linenoise installed. | ||
06:03
wamba joined
|
|||
dorothyw | I just typed perl6 and pressed enter and it seems to be working better now | 06:03 | |
ryu0 | Ok. | ||
lookatme | perl6intro.com/#_installing_perl_6 | 06:15 | |
06:15
lizmat joined
|
|||
dorothyw | What's wrong with this line? sub term ($arg1, $arg2){q:x/$arg1 "$arg2"/;} ; term("echo", "hello world") | 06:17 | |
06:17
pierre_ joined
06:19
nadim joined
|
|||
lookatme | m: sub term ($arg1, $arg2){q:x/$arg1 "$arg2"/;} ; term("echo", "hello world") | 06:20 | |
camelia | 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
|
|||
dorothyw | I'm pretty new to perl error messages | 06:23 | |
lookatme | dorothyw, you need qq:x I think | ||
and sub term ($arg1, $arg2){print qq:x/$arg1 "$arg2"/;} ; term("echo", "hello world") | 06:24 | ||
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:25 | |
06:25
zengargoyle left,
lizmat left
|
|||
ryu0 | lookatme: seems like a good idea, especially if we want perl6 to expand. | 06:26 | |
:-) | |||
dorothyw | So now I've got my term function right | ||
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 | ||
lookatme | oh, I thought you want something visual | ||
but I | 06:28 | ||
but I'm sure qq:x is what you want | |||
ryu0 | all looks like jibberish to me. i'll find out what it means some time. | 06:29 | |
but it sounds like they're trying to partially reproduce the effects of the POSIX function wordexp. | 06:30 | ||
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,
aborazmeh left,
aborazmeh joined
|
|||
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 | ||
ryu0 | Or w/e is more appropriate. | 06:32 | |
hm. | 06:33 | ||
m: sub foo(Int $arg1) { print $arg1; } | |||
camelia | ( no output ) | ||
06:33
jonas1 joined
|
|||
ryu0 | m: sub foo(Int $arg1) { print $arg1; }; print foo(1); | 06:33 | |
camelia | 1True | ||
ryu0 | O_o | ||
m: sub foo(Int $arg1) { print $arg1; }; print foo("a"); | |||
camelia | 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"); |
||
ryu0 | \o/ | 06:34 | |
I'm liking this. | |||
I always hated how dynamic languages made static typing conventions tedious to implement. | |||
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 | |
06:36
zengargoyle joined
|
|||
ryu0 | you do realize perl6 isn't meant as a replacement for a system shell? | 06:36 | |
though if you want to try, be our guest. | 06:37 | ||
lookatme | replace bash ? | ||
ryu0 | it's a better programming language for sure. | ||
lookatme | you can try some other thing like `zsh` | ||
I use zsh | |||
dorothyw | Well I think an issue with bash is that every single line of code has got to begin with a filename | ||
bash is not really built for programming in general just accessing files and executing them with arguments | |||
ryu0 | system scripting, basically. | 06:38 | |
it's very good for its niche but not much else. | |||
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
|
|||
ryu0 | that's just the nature of POSIX shells. | 06:38 | |
06:39
tokik left
|
|||
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 | ||
ryu0 | BASH is fine in its own time and place. | ||
Use it as an asset to your other stuff ideally. | 06:40 | ||
I don't expect my command line shell to do a lot honestly. | |||
lookatme | yeah, also there some non-POSIX shell implementation | ||
06:40
wamba left
|
|||
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 | |
06:40
tokik joined
|
|||
ryu0 | yes. zsh is a common choice for people that hate BASH. | 06:40 | |
... It is? | |||
jast | I don't exactly hate bash but I like zsh more | ||
06:40
lizmat_ left
|
|||
ryu0 | I thought the cool kids all learned Python these days. | 06:40 | |
jast | sure, or JavaScript | 06:41 | |
dorothyw | When i was learning linux bash was one of the first things I learned | ||
lookatme | I remember there are some guys want make a perl shell replace system shell, and also a perl OS :) | ||
you can try to do something like that | |||
jast | I think it's probably quite different when your primary goal is "learning linux" | ||
ryu0 | Not many people know it but it's also possible to extend BASH through its C API. | ||
jast | but my guess is most people learning to program start out on windows or os x | ||
06:41
wamba joined
|
|||
andrzejku | there is kind of Perl Shell already | 06:42 | |
jast | two, as I recall | ||
dorothyw | I like perl6 better because of the macros | ||
andrzejku | and a long time ago there was a guy which tried to make Perlix | ||
ryu0 | You can write BASH builtins as long as it exposes a specific C ABI. | ||
andrzejku | a perl operating system | ||
06:42
espadrine left
|
|||
jast | one is called Zoidberg, it gets extra points for naming, even if I've never actually tried it | 06:42 | |
andrzejku | but he didn't finish it as someone rushed him | 06:43 | |
lookatme | andrzejku, yeah, I heard Perlix from you :) | ||
ryu0 | i did that once to allow dumping the shell variables to JSON. | ||
jast | I don't think building an OS on top of an interpreted language is the way to go | ||
ryu0 | it was for a distro that wanted to collect metadata about their shell script source packages. | ||
lookatme | dorothyw, what macro ? | ||
andrzejku | the legend says that if you start to do Perl OS that bad things will happend | ||
jast | that's almost like putting a bytecode-based VM with GC and above-average memory use inside embedded devices, like mobile phones | ||
... oh. | |||
andrzejku | :< | ||
ryu0 | That's Java. | ||
LOL | |||
dorothyw | lookatme: afaik perl6 has fully extensible macros meaning you can invent your own syntax | ||
lookatme | dorothyw, I know the slang | 06:44 | |
ryu0 | dorothyw: so do many Lisps. | ||
dorothyw | Lisp has really failed to make a good repl outside of emacs though | ||
jast | with lisps it's debatable that they create 'new syntax', though :} | ||
ryu0 | haha | ||
lizmat | dorothyw: that's the theory, but most slangs are not based on macro's but instead on subclassing Perl6's grammar | ||
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 | |
includes a shell-like interpreter too | |||
jast | Tcl is... different | ||
dorothyw | I have been looking at gforth for a long time | ||
jast | bit of a fringe language these days, too | ||
dorothyw | cause gforth is very small and shell-like | ||
ryu0 | indeed it is. | ||
jast | for 'very small', check out lua | ||
dorothyw | lua is nice though I shy away from it's syntax. Plus no fully extensible macros I believe | 06:46 | |
06:46
pierre_ left
|
|||
ryu0 | puts [exec ls *] | 06:46 | |
:) | |||
jast | true, and I don't like its syntax too much, either | ||
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 | |
One shell to rule them all that will last forever | |||
ryu0 | dorothyw: ... uh zsh is a separate project from bash. | ||
jast | well, I'm not so sure that's actually achievable | ||
lookatme | How about fishshell ? | ||
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 :) | ||
ryu0 | ok, then TCLs out. | ||
there's not many languages that let you remodel the language itself. | |||
jast | the problem with fully extensible macros is that you'll inevitably run into conflicts between various extensions | ||
dorothyw | There's ways around that | ||
lookatme | and also I know a non-POSIX shell Elvish written with GO | ||
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 | |
but if you want to essentially turn one language into another, that's a different story | |||
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 | ||
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 | ||
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) | |||
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 :} | ||
yeah, that's what I meant by confining into a block | |||
that's not quite "fully extensible macros", though, if you ask mne | |||
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. | ||
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 | ||
the best macro system is worthless if the error messages from the parser are meaningless | |||
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
|
|||
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. | ||
err | |||
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 | ||
ryu0 | dorothyw: ^ | ||
jast | C's macros are a dirty hack, though | 06:55 | |
ryu0 | hell GNU C has some Lisp-like extensions for their macros. | ||
({ }) blocks for one. | |||
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. | ||
ryu0 | most languages weren't meant to be a shell language. | ||
jast | sure is, if you're a die hard lisp fan :) | ||
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. | ||
I am more of a macro fan. | |||
ryu0 | Did you look at other lisp implementations? | ||
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. | ||
dorothyw | It is very easy to write a lisp | ||
That's sort of off topic though I am talking about macros in general | |||
jast | yeah, anyone with a stack and a basic understanding of ASTs can write a lisp | ||
ryu0 | I actually liked the ML family more myself but any. | ||
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 | ||
ryu0 | Used mixins before? | ||
TEttinger | forth? | ||
dorothyw | Yes I am a huge forth advocate | ||
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 | ||
same with perl6, which I doubt I could ever read | |||
ryu0 | dorothyw: did you look at D? i've heard it's a nice hybrid of different stuff. | ||
dorothyw | ryu0: macros are the key | 07:00 | |
forth nees to be cobol-ized | |||
TEttinger | Nim goes hard into imperative/procedural but emphasizes compile-time programming as key | ||
nadim | m: role R{}; my @a = [] but R ; my $a = [] but R ; dd @a, $r ; | ||
camelia | 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 ; |
||
nadim | m: role R{}; my @a = [] but R ; my $a = [] but R ; dd @a, $a ; | ||
camelia | Array @a = [] Array+{R} $a = $[] |
||
ryu0 | i never did much with common lisp, so I can't really know to what extent you want to use macros. | ||
i just know macros and mixins tend to provide similar functionality. | |||
dorothyw | Basically I think writing a programming language where you can't change the syntax however you want is a sin | ||
07:01
aborazmeh left
|
|||
ryu0 | Ok, then most languages are out then. | 07:01 | |
TEttinger | fixed syntax is easier to make IDE integration actually work with | ||
it also can help avoid cases where users make the grammar ambiguous | |||
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 ; | ||
ryu0 | dorothyw: i once tried common lisp but i couldn't get past the crap the #lisp community threw at me. | ||
dorothyw | Lisp community sux but support question tho | ||
jast | communities... who needs those anyway | 07:03 | |
TEttinger | yeah I've definitely seen emacs supremacy stuff in lisp communities | ||
07:03
ijneb left
|
|||
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. | ||
jast | for most things I try to avoid interacting with the communities, that works too | 07:04 | |
ryu0 shrugs. | |||
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" | ||
ryu0 | ... lol | 07:05 | |
could have just said foobar | |||
jast | "this mode only works with this third-party fork of emacs that doesn't do releases and offers no binaries" | ||
TEttinger | it sounds more like a CL lib name | ||
jast | not sure that actually exists, though :) | ||
ryu0 | guys, anyone that can answer nadim? he did ask something. | ||
07:06
entonian joined,
entonian left
|
|||
jast | I'd love to but I have no idea :) | 07:06 | |
07:06
rindolf joined
07:07
entonian joined
|
|||
lookatme | m: role R{}; my @a = [] but R ; my $a = [] but R ; dd @a, $a ; | 07:07 | |
camelia | Array @a = [] Array+{R} $a = $[] |
||
lookatme | m: role R{}; my @a = [] but R ; my $a = [] but R ; dd @a[0], $a ; | ||
camelia | Any @a = Any Array+{R} $a = $[] |
||
07:09
entonian left,
abraxxa joined
|
|||
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 | |
m: role R{ method r() { say "CALL ME"; }; }; my @a = ([] but R); my $a = [] but R ; dd @a, $a ; say ([] but R).r; | |||
camelia | Array @a = [] Array+{R} $a = $[] CALL ME True |
||
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; | ||
camelia | 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 |
||
lookatme | and how about use does | 07:11 | |
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; | |||
camelia | Array+{R} @a = [] Array+{R} $a = $[] CALL ME CALL ME CALL ME |
||
lookatme | nadim, ^^ don't know why that not work | 07:12 | |
m: role R{ method r() { say "CALL ME"; }; }; my @a does R = []; my $a = [] but R ; dd @a, $a; | |||
camelia | Array+{R} @a = [] Array+{R} $a = $[] |
||
ryu0 | lookatme: eh? I thought Roles couldn't provide an implementation. I thought they only described a class API. | ||
lookatme | ryu0, it can | 07:14 | |
ryu0 | it appears to act more like an abstract class then. | ||
lookatme | you can defined the default implementation | ||
ryu0 | so it behaves more like an abstract class. Can Roles themselves be instantiated? | ||
lookatme | It's quite helpful when you need a default behavior | 07:15 | |
ryu0 | Or can roles only be instantiated by derivatives? | ||
lookatme | yeah, perl6 generate same name class for u | 07:16 | |
ryu0 | oh, so it's more like a general purpose base class. | ||
assuming inheritance follows. | |||
lookatme | they call that autopun | ||
07:17
Guest69863 left
|
|||
ryu0 | trying to bridge Perl6 to the general OOP concepts they use in C++, C#, and Java. | 07:17 | |
07:19
xtreak left,
xtreak joined
|
|||
jast | a more common name for the same concept is 'mixin' | 07:19 | |
ryu0 | Oh. | 07:20 | |
jast | it's not too uncommon: en.wikipedia.org/wiki/Mixin#Progra...use_mixins | ||
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:22 | |
07:22
zengargoyle left
07:23
xtreak left
|
|||
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 | |
err that can provide | |||
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:25
lizmat left
|
|||
lookatme | docs.perl6.org/type/auto-punning | 07:26 | |
auto-punning is not mixin | |||
docs.perl6.org/language/objects#in...try-Mixins | |||
07:34
zengargoyle joined
07:35
entonian joined
|
|||
stmuk | larry streaming live | 07:39 | |
07:42
devtom30 joined
|
|||
snarkyboojum | there's a public live stream? | 07:47 | |
stmuk | www.facebook.com/pg/theperlconference/videos/ | 07:48 | |
snarkyboojum | thank you! | ||
07:48
Cabanossi left
07:49
xtreak joined
07:50
Cabanossi joined
|
|||
lookatme | how long it will last ? stmuk | 07:50 | |
07:50
entonian left
|
|||
stmuk | its about 20 mins in | 07:51 | |
lookatme | oh | 07:52 | |
07:56
nattefrost joined
07:59
zengargoyle left
08:01
zengargoyle joined
08:03
devtom30 left
08:06
zengargoyle left
08:10
pierre__ left
08:14
pierre__ joined
08:18
Cabanossi left
08:19
darutoko joined,
tokik left
08:20
Cabanossi joined
|
|||
lookatme | ugexe, zef crash when run install: gist.github.com/araraloren/fdb91f8...ae41f42d8f | 08:20 | |
08:23
grondilu joined
|
|||
grondilu | are methods "my" or "our" by default? | 08:24 | |
08:25
zakharyas joined
|
|||
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 | |
08:25
[particle]1 joined
08:26
[particle] left
|
|||
lookatme | grondilu, my or our is use for declare static member | 08:26 | |
grondilu | oh | 08:27 | |
lookatme | docs.perl6.org/language/classtut#Static_fields? | ||
grondilu | I had seen this syntax somewhere, I thought it was a fancy way of specifying the return type. | 08:28 | |
so I guess I should stick to the method clone(--> Foo) {...} syntax | |||
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
|
|||
lookatme | grondilu, if you want some deep clone feature. I can give you some advice, if you need | 08:34 | |
El_Che | (sorry for the silly questions all-around, just trying stuff obout distribution) | 08:35 | |
08:37
imcsk8_ left,
imcsk8 joined
|
|||
grondilu | lookatme: no it was just a dummy example here | 08:37 | |
08:38
dh7320 joined
|
|||
lookatme | grondilu, oh :) | 08:38 | |
08:43
Sgeo left
08:48
Cabanossi left
08:50
Cabanossi joined,
TEttinger left,
zakharyas left
08:51
eroux joined
|
|||
stmuk | "perl is a four letter word" :) | 08:54 | |
grondilu | m: role Foo { method f(--> Num) { rand } }; class :: does Foo { has $.f = 1.2e0 }.new.f | 08:55 | |
camelia | ( no output ) | ||
grondilu | m: role Foo { method f(--> Num) { rand } }; class :: does Foo { has $.f = 1.2e0 }.new.f.say | ||
camelia | 0.26245213534034 | ||
grondilu | m: role Foo { method f(--> Num) { rand } }; class :: does Foo { has $.f = "Bar!" }.new.f.say | ||
camelia | 0.791408320845822 | ||
grondilu | :/ | 08:56 | |
I guess that makes sense | |||
08:57
zengargoyle joined
|
|||
grondilu | m: role Foo { method f(--> Num) {...} }; class :: does Foo { has $.f = "Bar!" }.new.f.say | 08:57 | |
camelia | Bar! | ||
grondilu | but that^ bothers me | ||
09:00
eroux left
|
|||
lookatme | m: role Foo { method f(--> Num) {...} }; class :: does Foo { has $.f = "Bar!" }.new.Foo::f.say | 09:03 | |
camelia | Stub code executed in method f at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
09:04
tokik joined
|
|||
lookatme | grondilu, what do you mean ? | 09:07 | |
09:07
eroux joined
|
|||
grondilu | I was expecting a type error | 09:09 | |
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:10 | ||
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
|
|||
grondilu | m: class Foo { has Foo method clone {...} } | 09:12 | |
camelia | ( no output ) | ||
grondilu | I see | ||
thanks | |||
lookatme | grondilu, but, method or accessor in `::` has its own return type constraint | ||
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 | Bar! | ||
lookatme | m: role Foo { method f(--> Num) { rand } }; class :: does Foo { has $.f = "Bar!" }.new.f.say | ||
camelia | 0.441744955363787 | ||
lookatme | jnthn, why it choose f in Foo ? not access in :: ? | 09:14 | |
09:15
zengargoyle left
09:17
cdg joined,
zakharyas joined
|
|||
nadim | m: role R{}; my @a = [] but R ; my $a = [] but R ; dd @a, $a ; | 09:17 | |
camelia | Array @a = [] Array+{R} $a = $[] |
||
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 | ||
nadim: = is assignment, not binding | 09:19 | ||
09:19
Guest69863 joined
|
|||
jnthn | Assignment is a copying operation | 09:19 | |
lookatme | oh, thanks, that make sense | ||
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 | ||
lookatme | so when I defined a f method in ::, it will call f first | ||
nadim | m: role R{}; my @a := [] but R ; my $a = [] but R ; dd @a, $a ; | ||
camelia | [] Array+{R} $a = $[] |
||
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 | ||
lookatme | jnthn, got it! :) | 09:21 | |
m: role R{}; my @a does R := [] but R ; my $a = [] but R ; dd @a, $a ; | 09:22 | ||
camelia | [] Array+{R} $a = $[] |
||
lookatme | m: role R{}; my @a does R := ([] but R) ; my $a = [] but R ; dd @a, $a ; | ||
camelia | [] Array+{R} $a = $[] |
||
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 | ||
lookatme | m: role R{}; my @a does R = ([] but R) ; my $a = [] but R ; dd @a, $a ; | ||
camelia | Array+{R} @a = [] Array+{R} $a = $[] |
||
09:27
Guest69863 left,
dh7320 left
09:31
suman___ joined
|
|||
suman___ | Hi everyone | 09:31 | |
Greetings from Nepal | |||
I need help here in this question stackoverflow.com/questions/456096...ith-perl-6 | 09:32 | ||
moritz | hi suman___ | ||
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:33 | |
09:33
Cabanossi left
|
|||
lookatme | m: role R{}; my @a does R = [] ; my $a = [] but R ; dd @a, $a ; | 09:34 | |
camelia | Array+{R} @a = [] Array+{R} $a = $[] |
||
lookatme | m: role R{}; my @a = ([] but R) ; my $a = [] but R ; dd @a, $a ; | ||
camelia | Array @a = [] Array+{R} $a = $[] |
||
09:35
Cabanossi joined
09:36
Guest69863 joined
|
|||
lookatme | suman___, you can simple use substitutions replace \begin{...} like s/'\begin{verbatim}'/'\begin{minted}{perl6}'/ | 09:41 | |
suman___ | lookatme Sounds good, will try | 09:42 | |
lookatme | you welcome | 09:43 | |
off work | |||
bye | |||
09:43
lookatme left
|
|||
suman___ | lookatme thanks bye | 09:43 | |
nadim | m: role R{has $.x}; my @a does R = [1] ; @a.x =7 ; | 09:45 | |
camelia | Cannot modify an immutable Any ((Any)) in block <unit> at <tmp> line 1 |
||
jnthn | m: role R{has $.x is rw}; my @a does R = [1] ; @a.x =7 | 09:47 | |
camelia | ( no output ) | ||
nadim | yes rw | ||
09:49
suman___ left,
Sgeo joined
|
|||
nadim | m: my role R { has $.max_lines is rw = 0 } ; my @d2 does R = [1..2] ; @d2.max_lines = 1 ; | 09:50 | |
camelia | ( no output ) | ||
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
09:52
itaylor57 left
|
|||
tyil | perlawhirl: I asked Wendy, I am to give you her email address so you can discuss it directly with her | 09:53 | |
09:53
cdg left
|
|||
nadim | timotimo: my @array does R is indeed an Array only | 09:54 | |
09:54
cdg joined,
brrt joined
|
|||
timotimo | oh, huh | 09:54 | |
09:56
mcmillhj left
|
|||
nadim | timotimo: no I am wrong, well no I am right, this is actually funny. | 09:57 | |
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. | |||
timotimo | ah, heh. | 09:58 | |
09:58
pierre__ left
09:59
cdg left
|
|||
timotimo | facebook video player has no speed option :\ | 09:59 | |
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:01 | |
timotimo | it already warns, doesn't it? | 10:03 | |
10:04
ijneb joined,
itaylor57 joined
|
|||
nadim | yes it does | 10:05 | |
10:06
Guest69863 left
|
|||
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 | |
10:07
cono_ is now known as cono
|
|||
nadim | but I would't mind having it as an error | 10:07 | |
10:08
cdg joined,
brrt left
10:11
sena_kun joined
10:12
lizmat_ joined,
cdg left
10:13
cdg joined,
lizmat_ left
|
|||
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:14 | |
10:15
lizmat left
|
|||
timotimo | but i'm not sure what our stance on warning vs error is | 10:16 | |
stmuk | timotimo: youtube-dl web.facebook.com/theperlconference...852932049/ | ||
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
|
|||
timotimo | stmuk: oh i hadn't thought of that! | 10:16 | |
it is, with a bit of coding | |||
stmuk | the video url comes from right clicking the original | 10:18 | |
10:18
cdg left,
astj left
10:19
astj joined
10:20
brrt joined
|
|||
stmuk | there is a perl 6 talk starting now | 10:20 | |
timotimo | i'm still watching larry's keynote | 10:21 | |
actually, i'll defer that to download | 10:22 | ||
10:22
astj left
10:23
astj joined,
Guest69863 joined
|
|||
nadim | then I'll go watch it too :) | 10:25 | |
10:28
Guest69863 left,
lizmat left
10:31
rindolf left
|
|||
nadim | woops that's long | 10:31 | |
timotimo | can't read the slides properly | ||
i imagine the url at the top would let me see the slides | |||
but i can't read the url either | |||
tyil | stmuk: does that work for all presentations that were posted? :o | ||
I want to share the High End Unicode to some folk online | 10:32 | ||
stmuk | tyil: I think so | ||
10:32
lizmat joined
|
|||
tyil | pretty cool | 10:32 | |
I'll check it after this talk | |||
people are dying to see it :p | |||
10:32
Cabanossi left
10:33
markmont left
10:35
Cabanossi joined
10:39
brrt left
10:41
lizmat left,
haha_ joined
|
|||
timotimo | why don't we have a kind of Mix that can hold Complex Numbers? :) | 10:43 | |
10:46
astj left
10:48
labster joined
10:49
brrt joined
10:51
rindolf joined
10:53
labster left
10:54
Celelibi left,
brrt left
10:55
brrt joined
11:01
dh7320 joined
|
|||
timotimo | ab5tract++ # good talk | 11:02 | |
11:04
brrt left
11:09
markmont joined
11:12
donaldh joined
|
|||
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:15 | |
timotimo: shall I open a request for the redeclaration as error or there is so little chance that it is not worth it? | 11:16 | ||
11:19
rindolf left
11:26
zengargoyle joined
11:27
astj joined
11:31
astj left
11:32
Cabanossi left
11:35
Cabanossi joined,
markmont left
11:36
Celelibi joined,
donaldh left
11:38
markmont joined
11:41
xtreak left
11:42
xtreak joined
11:45
xtreak left
11:46
xtreak joined
11:47
itaipu joined
11:48
lizmat joined
11:49
raschipi joined
11:59
titsuki joined
12:02
xtreak left
|
|||
raschipi | Did you guys see that bioinformatics software now need input sanitation? | 12:02 | |
nadim | don't all software need that? | 12:08 | |
raschipi | Somone wrote an exploit in DNA. | 12:09 | |
12:12
colomon joined
|
|||
ryu0 | raschipi: now you can say that viruses run in the genes. | 12:17 | |
lol | |||
12:22
lizmat left
12:24
astj joined
12:28
astj left
|
|||
AlexDaniel | raschipi: source? | 12:30 | |
12:38
colomon left
12:39
araraloren joined
12:41
lizmat joined
12:42
lizmat left
12:45
pierre__ joined,
mcmillhj joined,
pierre__ left
12:48
colomon joined
12:50
donaldh joined,
colomon left
12:54
skids joined
13:00
pierre__ joined
13:02
labster joined
|
|||
raschipi | AlexDaniel: www.wired.com/story/malware-dna-hack | 13:05 | |
13:07
cdg joined
13:11
bonf joined
13:12
lizmat joined
13:13
cdg_ joined
13:17
cdg left
13:18
jonas1 left,
Cabanossi left
13:20
Cabanossi joined
13:23
Grauwolf left,
lizmat left
13:28
bonf left,
skids left
13:29
brrt joined,
Grauwolf joined
13:30
haha_ left
13:34
lizmat joined,
lizmat left
13:35
itaipu left
13:36
andrzejku left
13:37
lizmat joined
13:39
Khisanth left
13:42
brrt left,
astj joined
13:47
raschipi_ joined
13:50
raschipi left
13:51
mr_ron joined
13:53
Khisanth joined
|
|||
stmuk | more unicode p6 at www.facebook.com/theperlconference/ | 13:55 | |
mr_ron | In docs.perl6.org/language/regexes#Ba...er_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 | |
13:56
astj left
|
|||
moritz | I prefer <?wb> actually | 13:56 | |
<wb> captures, but capturing a word boundary doesn't make all that much sense | 13:57 | ||
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 | |
do not underestimate the value of signalling your intent to a future reader of the code | |||
13:59
zakharyas left
|
|||
mr_ron | m: my $m = "The quick brown fox" ~~ /(.)(<wb>)quick/; say $0.chars; say $1.chars | 13:59 | |
camelia | 1 0 |
||
14:00
zakharyas joined,
rindolf joined
14:01
sufrostico left
|
|||
mr_ron | Why does <|wb> need the pipe and not not <ww> ? | 14:01 | |
raschipi_ | Here for me the pipe has the same effect for both. | 14:04 | |
14:04
zakharyas left,
donaldh left
14:05
labster left
14:06
lizmat left
|
|||
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 | 「 quick」 0 => 「 」 1 => 「」 wb => 「」 2 => 「quick」 「 quick」 0 => 「 」 1 => 「」 2 => 「quick」 「 quick」 0 => 「 」 1 => 「」 2 => 「quick」 |
||
raschipi_ | m: say "The quick brown fox" ~~ /(.)<?wb>(quick)/; | 14:12 | |
camelia | 「 quick」 0 => 「 」 1 => 「quick」 |
||
14:14
markmont left
14:15
markmont joined
14:17
donaldh joined,
Cabanossi left,
brrt joined
14:19
Cabanossi joined
|
|||
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:20 | |
14:22
brrt left
|
|||
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
14:27
lowbro left
14:29
cdg_ left
14:33
mcsnolte joined
14:35
lizmat joined
14:40
brrt joined
14:58
xtreak joined
15:00
nattefrost left
15:01
labster joined
15:04
ncow joined
15:10
brrt left,
brrt joined,
skids joined
15:17
brrt left,
itaipu joined
15:19
nadim left
15:22
ckraniak joined
15:29
pierre__ left
15:31
koto joined
15:33
zengargoyle left,
sena_kun left
|
|||
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,
itaipu left
|
|||
timotimo | is a mostly wrong executive summary | 15:36 | |
15:42
itaipu joined
15:46
labster left
15:49
Guest69863 joined
15:51
lizmat left,
zakharyas left
|
|||
kybr | i'm trying to fix what i experience as a broken link in the docs. gist.github.com/kybr/074966feb5da5...5a8762186e | 15:54 | |
15:56
zengargoyle joined
15:57
labster joined
15:58
abraxxa left
15:59
zakharyas joined
16:00
labster left
16:05
zengargoyle left
16:06
araraloren left
16:07
sufrostico joined
|
|||
geekosaur | kybr, it's a relative link | 16:10 | |
16:11
zengargoyle joined
|
|||
geekosaur | looks like someone copy-pasted text from type/Baggy to routine/roll | 16:11 | |
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:12 | ||
16:14
mcmillhj left
|
|||
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 | |
github.com/perl6/doc/blob/master/d....pod6#L150 is the link | |||
oh, I see, this is actually the generated docs pulling in stuff from elsewhere. it needs to fix relative links | 16:15 | ||
not sure who needs to do this, likely file a docs bug | |||
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 | ||
it might not be trivial, though | 16:17 | ||
16:17
eroux left
|
|||
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:17 | |
16:18
xtreak left,
Guest69863 left
|
|||
geekosaur | other kinds of relative links would be harder | 16:18 | |
16:21
zakharyas left
16:22
ck joined,
ck is now known as Guest71527
16:24
eroux joined,
dh7320 left,
pierre_ joined,
pierre_ left
16:25
ckraniak left
16:26
ckraniak joined
|
|||
moritz | or rewrite the links from relative to absolute when transplanting the POD data structures | 16:27 | |
16:27
Guest71527 left
16:32
user3 joined,
Cabanossi left
16:33
st_elmo joined
|
|||
user3 | m: say +("aaa \n bbb \n ccc \n" ~~ m:g/\n/) | 16:33 | |
camelia | 3 | ||
user3 | is there a better way than that to count the number of newlines in a string? | ||
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 | ||
Geth | doc: 5a2cd9da98 | (Steve Mynott)++ | doc/Type/Iterable.pod6 remove trailing whitespace |
16:35 | |
16:35
Cabanossi joined,
tokomer joined
|
|||
ckraniak | Ok trying out perl6, can't get nativecall to find a dll that's in the cwd | 16:37 | |
Haven't done lots with dlls but so far as I can tell there's nothing up with the dll itself | 16:38 | ||
I have tried to pass the full path in and that doesn't work | 16:39 | ||
raschipi_ | m: say +"aaa \n bbb \n ccc \n".comb.grep("\n") #user3 | 16:41 | |
camelia | 3 | ||
user3 | raschipi_: hmm, looks even more complicated... | ||
lol | |||
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 | ||
timotimo | hold on | 16:44 | |
comb *also* matches stuff | |||
m: say "foo bar baz quux lol omg wtf".comb("o").perl | |||
camelia | ("o", "o", "o", "o").Seq | ||
timotimo | m: say "foo bar baz quux lol omg wtf".comb(/<[aeiou]>/).perl | ||
camelia | ("o", "o", "a", "a", "u", "u", "o", "o") | ||
16:45
pilne joined
|
|||
raschipi_ | m: say +"aaa \n bbb \n ccc \n".comb("\n");+"aaa \n bbb \n ccc \n \n".comb("\n") | 16:46 | |
camelia | WARNINGS for <tmp>: Useless use of "+" in expression "+\"aaa \\n bbb \\n ccc \\n \\n\".comb(\"\\n\")" in sink context (line 1) 3 |
||
raschipi_ | m: say +"aaa \n bbb \n ccc \n".comb("\n");say +"aaa \n bbb \n ccc \n \n".comb("\n") | ||
camelia | 3 4 |
||
16:47
Guest69863 joined
|
|||
user3 | say +"aaa \n bbb \n ccc \n \n".comb("\n") | 16:47 | |
evalable6 | 4 | ||
user3 | wow | ||
it's better | |||
mspo | one thing I like about fancy quotes is that there is an explicit open and an explicit close | 16:48 | |
so there's no real «balancing» to be done | |||
raschipi_ | m: say +"aaa ccc".comb("c");say +"aaa\n ccc\n ccc".comb("c") | ||
camelia | 3 6 |
||
16:51
MilkmanDan left,
MilkmanDan joined
|
|||
raschipi_ | They're so much better that they're used everywhere except where a small number of characters was needed. | 16:51 | |
mspo: But balancing issues remain, just like with bracing. | 16:52 | ||
mspo | raschipi_: easier to detect, I think is what I'm saying | 16:53 | |
raschipi_ | I see your point. | ||
mspo | raschipi_: or maybe there's no real advantage and I'm just making it up :) | ||
ckraniak | where is the search path for nativecall on Windows documented? | ||
16:54
andrzejku joined
16:55
lizmat joined
|
|||
ugexe | docs.microsoft.com probably | 16:55 | |
ckraniak | As in "is native([stuff])" | 16:56 | |
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. | ||
ugexe | its wonky. i think it does something different if its a relative path vs an absolute path and str vs io::path | ||
kybr | geekosaur: is this the same problem that i described? github.com/perl6/doc/issues/1144 | ||
raschipi_ | Especially because it's better defined there. MS Windows is... problematic. | 16:58 | |
16:58
user3 left
|
|||
ckraniak | Can't argue with you there | 16:58 | |
raschipi_ | Do you have a motive to this on Windows? | 16:59 | |
ugexe | you probably have to do './' for $*CWD | ||
github.com/rakudo/rakudo/blob/nom/...names.t#L9 so much for windows | 17:00 | ||
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:01 | |
ugexe | I tried to bring some sanity to it here github.com/rakudo/rakudo/pull/730 | 17:02 | |
ckraniak | I have tried ./ | ||
Windows is more available | |||
ugexe | ckraniak: what do you get for | 17:03 | |
perl6 -e "use NativeCall :TEST; say guess_library_name('./foo')" | |||
ckraniak | Same as $*CWD basically | 17:06 | |
17:08
donaldh left
|
|||
ugexe | depends how you look at it. note the difference between ./foo and foo | 17:08 | |
"foo" and "foo".IO also return different things (guess_library_name is a mess) | 17:10 | ||
17:10
mcmillhj joined,
itaipu left
17:11
dh7320 joined
|
|||
ckraniak | guess_library_name("$*CWD/foo") == guess_library_name("./foo") | 17:11 | |
17:12
itaipu joined
|
|||
ugexe | m: use NativeCall :TEST; say guess_library_name("./foo"); say guess_library_name("foo"); say guess_library_name("foo".IO) | 17:12 | |
camelia | /home/camelia/libfoo.so libfoo.so /home/camelia/libfoo.so |
||
17:13
bstamour joined
|
|||
ckraniak | "foo".IO evaluates to full path, "foo" does not | 17:14 | |
Should say | |||
17:15
mcmillhj left
|
|||
ckraniak | In guess_library_name | 17:15 | |
ugexe | right, and thats weird because | 17:16 | |
m: say "foo".IO.Str | |||
camelia | foo | ||
17:17
mcmillhj joined
17:18
lizmat left
|
|||
ckraniak | Dropping the dll in system32 and leaving off ./ does not work apparently | 17:19 | |
Other dolls in system32 do work, like opengl32 | |||
*dlls | |||
Gotta be an environment variable or a registry key or something | 17:20 | ||
17:21
haha_ joined
17:25
Guest69863 left
17:27
entonian joined
17:29
tokomer left
17:31
lizmat joined
17:33
lizmat left
|
|||
kybr | does rand | 17:41 | |
does srand set the seed for pick and roll? | |||
17:42
cdg joined
17:43
cdg_ joined
17:45
haha_ left
17:46
entonian left,
cdg left
17:51
lizmat joined
17:54
llfourn joined
17:56
lizmat left,
zengargoyle left,
lizmat joined,
lizmat left
17:57
someuser joined
17:59
haha_ joined
18:02
cpage_ left,
cpage_ joined
18:09
haha_ left
18:10
haha_ joined
18:12
zengargoyle joined,
AlexDani` joined
18:13
AlexDaniel left
18:14
dh7320 left,
AlexDani` is now known as AlexDaniel
|
|||
geekosaur | kybr, yes, that's the sam eissue | 18:15 | |
18:19
haha_ left
18:20
konsolebox left
|
|||
ckraniak | May be that it can find it but error message is decceptive | 18:20 | |
Python cannot load it either but can definitely locate iy | 18:21 | ||
Guess: trying to load 32 bit dll into 64 but exe | |||
ryu0 | If Linenoise and Readline are both installed, which will rakudo choose to use for its REPL? | 18:22 | |
18:22
haha_ joined
|
|||
ckraniak | so moar is 64 but then | 18:23 | |
*bit | |||
18:25
konsolebox joined
18:26
Kyo91 left
|
|||
jdv79 | can anyone else install JSON::Tiny on the latest rakudo? | 18:30 | |
18:30
Kyo91 joined
|
|||
jdv79 | This is Rakudo version 2017.07-144-gec7bc25 built on MoarVM version 2017.07-365-gc0f7a3b | 18:31 | |
18:34
zengargoyle left
|
|||
jdv79 | is everyone at yapc or watching it? | 18:36 | |
18:36
zengargoyle joined
|
|||
ugexe | jdv79: fails for me | 18:40 | |
jdv79 | does anything weird happen < 1m afterwards? | ||
anywhere from immediately to ~30s later all my gnome-terminals vanish without a trace | 18:41 | ||
18:41
cdg joined,
cdg_ left
|
|||
ugexe | i think unicode is getting corrupted, and your terminals couldnt handle what it output | 18:42 | |
gist.githubusercontent.com/ugexe/9...tfile1.txt | |||
jdv79 | ah. gist.github.com/anonymous/5facb80b...f0a2569e38 | 18:45 | |
fun | |||
ckraniak | GOT IT | 18:49 | |
was 32 bit dll in 64 bit exe | |||
mingw-m64 fixed it | |||
18:50
TreyHarris left
|
|||
ckraniak | god bless cmake | 18:50 | |
18:50
dct joined
|
|||
mspo | am I in bizzaro world? :) | 18:50 | |
18:50
geekosaur left,
geekosaur joined
|
|||
ckraniak | Perl6 apparently has the world's least helpful error message for this, you see | 18:51 | |
mspo | sounds like a bug | ||
having good messages is a goal | |||
ckraniak | Its sort of passing through the message from LoadLibrary though | 18:52 | |
Actually wait I lied that was Python | |||
18:54
itaipu left
|
|||
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? | ||
ckraniak | Maybe | ||
timotimo | like, if you're a 32bit process, dlls that were made for 64bit don't actually exist? | ||
as ridiculous as that sounds | 18:55 | ||
geekosaur | yes, windows cannot cross-load dlls | ||
timotimo | well, of course it can't cross-load them | ||
ckraniak | The error message isn't somethi bc you could pull help from though | ||
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 | ||
timotimo | but it pretends the file doesn't exist, no? | ||
geekosaur | 64 bit processes cannot load 32 bit dlls | ||
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 | ||
timotimo | that's definitely what you get on linux | ||
18:59
Kyo91 left
|
|||
ugexe | El_Che: yes you can use zef's modules to do things without the cli - see github.com/ugexe/zef/blob/33c18c90...tory.t#L45 | 19:01 | |
ryu0 | ugexe: is there any reason to package panda? i read zef supersedes it. | 19:02 | |
ugexe | the only reason would be that a few packages may have panda listed as a dependency (see: `zef rdepends panda`) | 19:08 | |
ryu0 | \o/ | 19:13 | |
12 modules left until i have rakudo star packaged completely. | |||
raschipi_ | ryu0++ | 19:18 | |
Are you submitting them to Debian? | |||
ryu0 | raschipi_: ubuntu PPA. | ||
raschipi_ | So? | ||
19:18
Kyo91 joined,
Cabanossi left
|
|||
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. | ||
and ultimately they'll be out of date long before they make it into one of their major releases. | 19:20 | ||
19:20
Cabanossi joined
|
|||
ryu0 | it may make more sense later when rakudo is more mature that having an older release isn't a big deal. | 19:20 | |
raschipi_ | Nice, give me a link and I will do it myself. | 19:21 | |
ryu0 | launchpad.net/~ryu0/+archive/ubuntu/perl6 | ||
debian already has the 3 core packages of rakudo though, just a heads up. | |||
i'm not done packaging just yet, but you can certainly reuse how i figured out to package the modules. | 19:22 | ||
19:22
darutoko left
|
|||
ryu0 | raschipi_: why? do you actually use debian? | 19:23 | |
19:23
brrt joined,
cpage_ left,
Rawriful joined
|
|||
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? | ||
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. | ||
raschipi_ | Are you open to renaming them? | ||
ugexe | github.com/ugexe/zef/issues/117 # detailed discussion on some issues with packaging for Debian (mostly precomp related) | 19:25 | |
19:25
pierre_ joined
|
|||
ryu0 | raschipi_: a lot of work when i've already come so far. lol | 19:25 | |
hm. | 19:26 | ||
raschipi_ | For example, the package for File::Directory::Tree has to be named libfile-directory-tree-perl6 | 19:27 | |
19:27
haha_ left
|
|||
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:28 | |
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
pierre_ left
|
|||
ryu0 | packaging a certain script from rakudo package for installing the modules into the vendor directory. | 19:30 | |
it works quite well. the only thing i added was to symlink if anything gets installed into the bin directory. | |||
it's also how the stuff is packaged on ARCH. | 19:31 | ||
raschipi_: i advise writing a skeleton package when doing the modules. it helps a lot. | 19:32 | ||
i have only had to make minor adjustments for depends and such. | 19:33 | ||
raschipi_: there's ~35 modules to package. most only depend on rakudo, others depend on one or more module packages. | 19:35 | ||
19:36
TreyHarris joined
|
|||
raschipi_ | I know the debian Perl6 team is already working on it, I will go trough the team channels, thanks. | 19:36 | |
ryu0 | ok. | ||
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. | ||
ryu0 | once it makes into a ubuntu LTS i'll probably discontinue this PPA. | ||
raschipi_: that'll probably be awhile. | 19:38 | ||
raschipi_ | Why do you say that? | 19:39 | |
ryu0 | because debian stable tends to take years to get a new release. | ||
raschipi_ | Ubuntu doesn't pull from stable, it pulls from sid. | ||
ryu0 | Oh. | 19:40 | |
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:41 | |
ryu0 | ... has debian even packaged a single perl6 module yet? all i've seen is rakudo. | 19:43 | |
mst | ryu0: pleae don't discontinue the PPA | 19:44 | |
ubuntu are completely useless at shipping perl stuff | |||
ryu0 | mst: ok. | ||
mst: you actually want to use this PPA i'm building? | |||
mst | I want people to be able to do so | 19:45 | |
my solution is to only use ubuntu when shadowcat customers are paying me to support perl on it | |||
at which point their "snapshot debian testing at random and ignore it for six months" policy is a billable hour generator ;) | |||
19:46
grondilu left
|
|||
raschipi_ | ryu0: did you understand my point about conflicts? | 19:46 | |
ryu0 | raschipi_: yes, if someone's trying to use both at once. | 19:47 | |
i did distribution packaging for 8 years. i know what a conflict is. | |||
just not for debian really. | |||
i'll deal with it if/when it arises. | 19:48 | ||
19:49
Cabanossi left
|
|||
ryu0 | raschipi_: any idea why debian chose to split rakudo and its library into different packages? it seemed pointless. | 19:50 | |
19:50
Cabanossi joined
|
|||
raschipi_ | You mean the "rakudo" and "rakudo-lib" split? | 19:50 | |
ryu0 | yes. | ||
19:50
konsolebox left
|
|||
ryu0 | afaik, nothing except rakudo even links to that library. | 19:52 | |
19:54
cpage_ joined
19:55
PerlNewbie joined,
konsolebox joined
19:56
PerlNewbie left
20:03
dct left
|
|||
raschipi_ | I 'm not aware of their possible motivation. | 20:04 | |
moritz | probably a matter of policy, in case anybody wants to link to it later | 20:05 | |
much like Inline::Perl5 now links to libperl.so | |||
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:07
skids left
|
|||
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:10 | |
20:11
ckraniak left,
nhywyll joined
20:13
dorothyw left
20:14
khw joined,
andrzejku left
20:17
llfourn left
|
|||
timotimo | hey everybody | 20:18 | |
bikeshedding time | |||
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? | ||
stmuk | ryu0: I think you need to set NO_NETWORKING_TESTING for perl6-lpw-simple | 20:23 | |
ryu0 | stmuk: Ah. I had disabled the tests because they failed due to no networking access. | 20:24 | |
i'll put that in the next time I have to rebuild it. | |||
20:25
cdg left,
cdg joined
|
|||
mspo | getsockname and getpeername ? | 20:26 | |
those are the c functions, right? | |||
timotimo | uv also names them that, yeah | 20:32 | |
i do split it into ip and port, though | |||
and also i only support ipv4 and ipv6 | |||
ryu0 | ah, so no unix sockets. | 20:33 | |
timotimo | we don't support them at all yet ;( | 20:34 | |
ryu0 | not too surprising. they're not universally portable. | 20:35 | |
namely windows has nothing comparable. | |||
20:36
astj joined
|
|||
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 | |
build.opensuse.org/package/view_fi...f?expand=1 | |||
ryu0 | why? what's it even do? | 20:37 | |
stmuk | it fixes --ll-exception | 20:38 | |
ryu0 | i don't even know what that does. | ||
Ah. | |||
timotimo | normally exceptions are abbreviated, skipping over frames inside the compiler and builtins | 20:39 | |
with --ll-exception those are also shown, which is much more useful if you're reporting bugs in the compiler and/or builtins | |||
ryu0 | was this fixed in git? | ||
don't really want to have to rebuild everything just for this :| | 20:40 | ||
20:40
astj left
|
|||
stmuk | well maybe considering checking opensuse for patches in future .. it's likely R* will use them | 20:41 | |
ryu0 | R*? | 20:42 | |
stmuk | rakudo star | 20:43 | |
ryu0 | oh. | ||
stmuk | this fix is in star too | ||
timotimo | yup, we used a non-release version of nqp in rakudo star to get this fix | 20:46 | |
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 | |
i just checked and it's been patched in git. | |||
20:47
AlexDaniel left
20:50
AlexDaniel joined
|
|||
ryu0 | timotimo: are the monthly releases of moarvm, nqp, and rakudo recommended for actual use? | 20:50 | |
20:51
rindolf left
20:52
epony left
|
|||
stmuk | if you fix it this time you will have a mechanism for next time a similar problem occurs | 20:52 | |
20:52
epony joined
|
|||
ryu0 | stmuk: i just wish the precomp crud didn't require a recompile of every module package. | 20:53 | |
20:53
epony left
|
|||
stmuk | ryu0: I think there has been talk of making precomp more friendly to binary packagers in irclog.perlgeek.de/perl6-toolchain/ | 20:55 | |
20:55
epony joined
|
|||
ryu0 | ideally there'd be some ABI and old compiled bytecode would still work, though maybe less than optimally. | 20:56 | |
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 | ||
the second-last month we did like six point releases in a row | 20:58 | ||
that wasn't good, either | |||
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 | ||
ryu0 | hm. | ||
but i'll work this patch in. | 21:00 | ||
i just assumed that the separate releases were exactly the same. -_- | |||
stmuk | there was some talk of removing the time stamps from the SHA1 type precomp files | ||
ryu0 | SHA1? i thought they would be using SHA256 by now. | 21:01 | |
21:01
colomon joined
|
|||
stmuk | ryu0: the monthly releases are like Linus kernel releases .. I don't think a bit of patching is always bad | 21:01 | |
most linux distros don't use a Linus kernel | 21:02 | ||
21:02
Kyo91_ joined
|
|||
ryu0 | considering how they've found collisions with SHA1 now. | 21:03 | |
stmuk | its great more people are experimenting with packaging rakudo | ||
well git still uses SHA1 as well .. ] | |||
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. | ||
And this isn't a scurity critcal thing, they were talking just above about removing it... | |||
21:04
Kyo91 left
|
|||
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. | ||
Yes, if both documents are put into version control that relies on hashes, it will be a problem. | |||
21:06
TEttinger joined
|
|||
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. | ||
ryu0 | or, just use a stronger hash. | ||
raschipi_ | Yeah, that's why it's only done with files that will hide the real lenght, like PDFs. | ||
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
|
|||
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 | |
Well, sha256 too, but it's a much longer time. | |||
ryu0 | might as well jump straight to sha512 to prolong the time. | 21:09 | |
stmuk | pull requests welcome! :) | ||
raschipi_ | It makes sense to measure how much resources that takes. | ||
People, I have to go now. Hugs for everyone. | 21:10 | ||
ryu0 | Can't... breathe... | ||
lol | |||
21:10
mcmillhj left
21:14
raschipi_ left
21:15
colomon left
21:16
mr_ron left,
Cabanossi left
21:17
colomon joined
21:19
basket` joined
21:20
Cabanossi joined
21:22
lizmat joined
|
|||
mspo | timotimo: they return structures with a bunch of info, I thought | 21:23 | |
address and port at least | 21:24 | ||
timotimo: erlang drops the "get" part | 21:25 | ||
erlang.org/doc/man/inet.html#sockname-1 | |||
timotimo | well, yeah, they do. but do i want to mirror that in perl6? | 21:30 | |
with my current code you get a string and an int for the local and remote address each | |||
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:31 | ||
mspo | timotimo: just giving another data point. The c names are probably the best :) | 21:32 | |
21:32
sena_kun joined
|
|||
mspo | timotimo: why joearms decided to drop "get" in 1987 or whatever is probably lost to history | 21:32 | |
21:32
espadrine joined
|
|||
mspo | timotimo: I just like to think erlang is a good model for networking stuff in general. I could also be wrong completely :) | 21:32 | |
their binary encoding stuff is top notch, at least | 21:33 | ||
21:33
koto left
|
|||
mspo | erlang.org/doc/programming_examples...ml#id66841 | 21:35 | |
21:37
markmont left
21:38
sena_kun left,
rindolf left
21:41
colomon left
21:47
Guest69863 joined
21:50
Kyo91_ left
|
|||
tbrowder | is there | 21:52 | |
ff! | |||
timotimo | what i have right now are .peer-host, .peer-port, .socket-host, and .socket-port | 21:53 | |
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 | ||
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 | ||
tbrowder | m: sub f{ my $s = &?ROUTINE.name; say $s;}; f() | 21:57 | |
camelia | f | ||
tbrowder | ok, i think i was trying to put it inside "" or something like that. | 21:58 | |
timotimo: thanks! | 21:59 | ||
timotimo | "it"? | 22:02 | |
22:02
st_elmo left
|
|||
tbrowder | i was trying to do this inside a sub but it doesn't work: say "inside sub '&?ROUTINE.name'" | 22:06 | |
geekosaur | I dont think & interpolates directly | 22:07 | |
m: say "inside sub '&?ROUTINE.name'" | |||
camelia | inside sub '&?ROUTINE.name' | ||
geekosaur | m: say "inside sub '{&?ROUTINE.name}'" | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared name: ?ROUTINE used at line 1. Did you mean 'Routine'? |
||
tbrowder | but this does work: say "inside sub '{&?ROUTINE.name}'" | ||
well, you actually have to be in a sub... | 22:08 | ||
geekosaur | yeh | ||
tbrowder | it doesn't stringify like, say, $*PROGRAM | 22:09 | |
m: say "in program $*PROGRAM" | |||
camelia | in program <tmp> | ||
22:10
skids joined
|
|||
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:10 | |
tbrowder | m: f{say "in sub '&?ROUTINE.name'"};f() | 22:11 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared routine: f used at line 1 |
||
ugexe | space bar is hot lava | 22:12 | |
tbrowder | m: sub f{say "in sub '&?ROUTINE.name'"};f() | ||
camelia | in sub '&?ROUTINE.name' | ||
geekosaur | m: say "hi $*DISTRO.name" | ||
camelia | hi opensuse.name » | ||
geekosaur | interpolation iirc only handles $ sigil with optional postcircumfix; not method calls or etc. which is why {} interpolation exists | 22:14 | |
recognizing the end of general expressions in a string is hard | |||
tbrowder | m: sub f{say "in sub '{&?ROUTINE.name}'"};f() | ||
camelia | in sub 'f' | ||
tbrowder | \o/ | 22:15 | |
22:15
cdg_ joined
|
|||
MasterDuke | m: say "inside $*PROGRAM.uc()" | 22:16 | |
camelia | inside /TMP/EVALBOT-FILE-YVPTBWB1D6 | ||
MasterDuke | m: say "inside $*PROGRAM.uc" | ||
camelia | inside <tmp>.uc | ||
MasterDuke | it interpolates method calls, but you have to end them with '()' | ||
geekosaur | yeh, that postcircumfix thing I mentioned I guess | 22:17 | |
MasterDuke | ah, wasn't quite sure what you meant by that | 22:18 | |
22:18
mcmillhj joined
22:19
cdg left
22:20
cdg_ left
|
|||
tbrowder | well, inside a script $*PROGRAM stringifies without the .uc or () | 22:23 | |
22:23
mcmillhj left
|
|||
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 | |
22:24
nadim joined
|
|||
tbrowder | m: say "inside program '{$*PROGRAM}'" | 22:26 | |
camelia | inside program '<tmp>' | ||
Geth | Inline-Perl5: b26e3c4111 | (Stefan Seifert)++ | lib/Inline/Perl5.pm6 Speed up p5_to_p6 by avoiding smart match when $some_enum_value calls Numeric.ACCEPTS which is very heavy weight when all we want is a numeric equality test which should be dirt cheap. |
||
22:28
zakharyas joined,
setty1 joined
22:34
mcmillhj joined,
markmont joined
22:38
mcmillhj left
|
|||
Geth | Inline-Perl5: 83e2149596 | (Stefan Seifert)++ | lib/Inline/Perl5.pm6 Speed up p6_to_p5(Str) by only looking up the UTF-8 encoder once Str.encode looks up the encoder in the encoder registry and handing of the actual encoding to that. As we always want UTF-8 encoding anyway we can fetch this Encoder object once and use it directly. |
22:43 | |
jnthn | Yay, somebody takes advantage of the encoder API :) | 22:44 | |
(I/O handles do exactly that also) | |||
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:45 | |
22:46
espadrine left
22:50
mcmillhj joined
22:54
astj joined
|
|||
timotimo | that is really good | 22:56 | |
22:56
zakharyas left
22:58
mcmillhj left,
astj left
23:00
ckraniak joined
23:04
MasterDuke left
23:09
Guest69863 left,
mcmillhj joined,
nightfrog left
23:14
mcmillhj left
|
|||
mspo | encoder api? | 23:15 | |
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:18 | |
23:20
mildbill_ joined
23:23
MasterDuke joined
|
|||
mspo | docs? | 23:24 | |
23:24
mildbill_ left
23:25
mcmillhj joined
23:27
pierre_ joined
23:30
setty1 left
23:31
nhywyll left
23:32
pierre_ left,
mcmillhj left,
Cabanossi left
23:34
zengargoyle left
23:35
Cabanossi joined
23:36
zengargoyle joined
23:37
BenGoldberg joined
|
|||
jnthn | mspo: These are quite recent additions, so the docs aren't all there yet; the Encoding role is: docs.perl6.org/type/Encoding | 23:37 | |
23:39
dwarring joined
23:42
committable6 left,
committable6 joined,
ChanServ sets mode: +v committable6
23:45
labster joined
23:49
wamba left
|