»ö« 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:00
pyrimidine left,
pyrimidi_ joined
00:01
mr-foobar joined
00:13
yoleaux left
00:15
cono joined
|
|||
u-ou | what usually happens about licensing if you copy an open-source project without reading its code? | 00:24 | |
by copy i mean emulate or mimic the behaviour as opposed to copying code | 00:25 | ||
00:29
mr-foobar left
|
|||
ugexe | en.wikipedia.org/wiki/Clean_room_design | 00:32 | |
00:32
mr-foobar joined
|
|||
u-ou | thanks | 00:33 | |
I guess I just need to license it as if I were using their code? | 00:37 | ||
ugexe | if you are copying their code you need to abide by their license | 00:38 | |
u-ou | the thing I'm concerned about is that I'm copying ideas and behaviour | ||
with my own implementation | |||
ugexe | have you looked at the code? | ||
u-ou | no | ||
ugexe | then it shouldnt matter | 00:39 | |
u-ou | ok | ||
00:48
Actualeyes left
00:58
ribasushi left,
someuser left,
mr-foobar left
01:01
someuser joined
01:02
mr-foobar joined
01:04
troys is now known as troys_
01:11
ribasushi joined
01:21
dogbert17 left
01:24
Cabanossi left
|
|||
japhb | Uh ... be aware that in some jurisdictions there are other forms of IP (Intellectual Property) for which it does not matter whether you looked at the other product's code -- or were even aware it existed. You can be liable anyway. If you're concerned, talk to an IP lawyer in your jurisdiction. It's the only way to be sure. | 01:25 | |
(I Am Not A Lawyer, just aware that blanket statements about IP are generally as legally risky as ... well, any other major generalization.) | 01:26 | ||
01:26
Cabanossi joined
01:30
mr-foobar left
|
|||
kyan | Hi, I just installed rlwrap per the message when I first open perl6, but I still can't use arrow keys to navigate, etc.. Is it needed to recompile perl6? | 01:31 | |
01:31
mr-foobar joined
|
|||
u-ou | maybe i'll talk to the project coordinator | 01:34 | |
01:35
kyan left,
kyan joined
|
|||
kyan | Hi, I just installed rlwrap per the message when I first open perl6, but I still can't use arrow keys to navigate, etc.. Is it needed to recompile perl6? (not sure if that message came through, the irc glitched out) | 01:36 | |
geekosaur | if you go the rlwrap route, you have to run it yourself (rlwrap perl6) just like any other rlwrap user | 01:38 | |
rlwrap is not something that other programs know about, in fact it's specifically designed for use with commands that have no clue about readline | |||
if you wanted it to be automatic then you need to install the appropriate perl 6 module, not rlwrap | |||
rlwrap is just sometimes easier to install and doesn't require e.g. API compatibility with any perl modules | 01:39 | ||
01:39
Guest64290 left
|
|||
kyan | Um, I'm not rly sure what that means exactly... I see the package Term-Readline-Perl in my distribution (Gentoo), but no Perl 6 one | 01:40 | |
will I need to package it myself? | |||
geekosaur | "You may want to `zef install Readline` or `zef install Linenoise` or use rlwrap for a line editor" | ||
if you do one of the first two then you may have to supply an appropriate and compatible readline or linenoise library (e.g. beware of Apple's "readline", which isn't; also the Linenoise module may bundle the linenoise C lib at this point) | 01:41 | ||
kyan | Right, that's why I installed the rlwrap — I didn't see the other two in the distribution | 01:42 | |
geekosaur | the third one lets you avoid any compatibility issues since any rlwrap command will work the same way, but you have to run rlwrap manually | ||
gentoo likely does not package it. use the command it told you, not your distro | |||
kyan | Ok, I think I'm using regular GNU readline, but don't have a perl 6 readline package (or really *any* perl 6 packages beyond the perl 6 app itself) | ||
01:43
Actualeyes joined
|
|||
geekosaur | or if gentoo does package it then you'll need to find out what they called it. likely easier to just use zef to install it | 01:43 | |
kyan | Oh, so I need to package it myself then, ok, thanks! (I never use built in package things, I'm assuming "zef" is basically like "npm" except for Perl6) | ||
geekosaur | er | 01:44 | |
zef is perl 6's package manger | 01:45 | ||
01:45
ilbot3 left
|
|||
kyan | right, if it installs code I'll just make a native Gentoo package for whatever it installs instead... thanks! | 01:45 | |
geekosaur | zef will look up the appropriate package and install it for you, althoygh it will not help with C libs that come from an OS distribution (but on gentoo this should not be an issue, unlike RH/centos/ubuntu it does not separate runtime and dev packages) | 01:46 | |
kyan | it won't register it with Gentoo's Portage package manager, though, will it? If I put it in Portage, then I can do integrity checks and everything with the rest of my system. I do the same thing for Firefox addons, npm packages, Kodi plugins, etc.. Any files other than personal data and config being outside of the system package manager is alarming to me | 01:48 | |
geekosaur | so far as I can see gentoo only packages rakudo, although there appear to be plans to have it do more (it has a perl6 metapackage but all it installs is rakudo so far) | ||
kyan | cool, I'll just look at zef and see where it gets the code, and make a Gentoo package for it. Thanks! | 01:49 | |
geekosaur | also the rakudo ebuild says it will fail if a rakudo, including gentoo's ebuild, is already inastalled | ||
I suggest you *not* use that uynless you like pain | |||
u-ou | why don't you just use zef :S | ||
kyan | I never let anything into my system outside of Gentoo's package manager. That way, it's all organized and in one place. Helps me feel more sane | 01:50 | |
Most languages already have the packages available in Portage, but I guess no one's done that for Perl6 yet | 01:51 | ||
geekosaur | that's nice. so you do that slavishly even then the ebuild itself says it is broken and will bite you? | ||
gitweb.gentoo.org/repo/gentoo.git/...ebuild#n36 | |||
kyan | I mean, sounds like it's a known issue, so I can just do what it says (unmerge then remerge) if I need to update | 01:52 | |
and presumably it'll be fixed at some point anyway | |||
geekosaur | translation if you did not understand that message: "you cannot upgrade this, you must removie it and all depndents and reinstall them again"" | ||
01:53
cuonglm joined
|
|||
kyan | (don't have to remove all it's dependents, I don't think? Could just force-unmerge it, leaving dependents in place, re-merge, and assuming the new version is ABI compatible be good to go?) | 01:53 | |
cuonglm | Does rakudo development is frozen in some days? | 01:54 | |
kyan | Anyway, if it's a known issue it's not something I'll have to really think about, assuming it's fixed soon at some point | ||
01:54
ilbot3 joined,
ChanServ sets mode: +v ilbot3
|
|||
cuonglm | I made a PR 2 day ago but do not receive any response from core developers | 01:54 | |
kyan joined the CC list for that bug, so I'll keep track of it | |||
geekosaur | cuonglm, very active development, do you have an RT #? | 01:57 | |
cuonglm | geekosaur: No, just a TODO in source code, here's relevant PR github.com/rakudo/rakudo/pull/1154 | 01:59 | |
geekosaur | I don't know thta anyone catches random PRs, most stuff is done through RT | ||
and #perl6-dev is probably a better channel to ask about this | 02:00 | ||
02:00
mr-foobar left
02:01
mr-foobar joined
|
|||
cuonglm | geekosaur: thanks | 02:02 | |
geekosaur | (actually I'd suspect I know who would get notified of PRs.. and he's on vacation) | 02:04 | |
02:05
ChoHag joined
02:06
silug left
02:09
Cabanossi left,
yoleaux joined,
ChanServ sets mode: +v yoleaux
02:11
noganex joined,
Cabanossi joined
02:13
noganex_ left
02:17
silug joined
02:19
rosalind joined
02:22
someuser left
02:29
mr-foobar left
02:33
mr-foobar joined
03:00
rosalind left
03:01
skids left
03:09
R0b0t1_ left
03:10
troys_ is now known as troys
03:11
R0b0t1_ joined
03:24
Cabanossi left
03:26
Cabanossi joined
03:30
mr-foobar left,
Actualeyes left
03:33
mr-foobar joined
03:40
Cabanossi left,
Cabanoss- joined
03:41
Cabanoss- is now known as Cabanossi
03:45
llfourn joined
03:51
zacts left
03:53
llfourn left
04:18
troys is now known as troys_
04:23
Cabanossi left
04:25
Cabanossi joined
04:26
R0b0t1_ left
04:29
R0b0t1_ joined,
cuonglm left
04:34
Kyo91_ joined
04:38
Kyo91_ left
04:56
Actualeyes joined
04:57
nige joined
05:00
mr-foobar left
05:02
troys_ is now known as troys
|
|||
nige | I don't have the spare tuits for this - but hoping someone else might ... this strikes me as a good idea - creating a Perl 6 language server that supports multiple frontend IDE/editors | 05:03 | |
05:03
mr-foobar joined
|
|||
nige | a Cro-based backend service to implement this protocol? langserver.org/ | 05:04 | |
05:16
AlexDaniel left
05:20
wamba joined
05:21
xtreak joined
05:33
troys left
05:38
Cabanossi left
05:40
Cabanossi joined
05:44
BenGoldberg left
05:49
nohuhu left
05:50
llfourn joined
05:59
domidumont joined
06:03
domidumont left
06:04
domidumont joined
06:05
espadrine joined
06:06
R0b0t1_ left
06:08
R0b0t1_ joined
06:16
piojo joined
06:17
khw left
06:22
dwarring left
06:34
wamba left,
Kyo91_ joined
06:39
Kyo91_ left
06:43
astj_ joined,
astj left
|
|||
kent\n | kyan: mostly we haven't worked out how to do Perl6 modules yet, because doing it with our tools is a bit hard, but if you manage something sensible, hit me or xiaomiao up about it and it might land in some tree :) | 06:43 | |
06:45
xtreak left
|
|||
kent\n | bonus points if you have it do the right thing when somebody reinstalls the rakudo from source. | 06:45 | |
06:48
kyan left
06:56
espadrine left
06:59
jonas1 joined
07:07
huf left
07:14
b2gills left
07:15
b2gills joined
07:17
darutoko joined
07:18
lustlife joined
07:19
lustlife left
07:22
lustlife joined
07:24
wamba joined
07:31
huf joined
07:33
mr-foobar left
07:36
mr-foobar joined
07:47
domidumont left
07:49
domidumont joined
07:54
Cabanossi left
07:55
piojo left
07:56
Cabanossi joined
08:02
mr-foobar left
08:05
mr-foobar joined
08:24
Cabanossi left,
zakharyas joined
|
|||
gfldex .oO(WTB title offering blog post) | 08:24 | ||
08:26
Cabanossi joined,
xtreak joined
08:28
grondilu joined
08:29
robertle joined
08:30
xtreak left,
xtreak joined
08:32
mr-foobar left
08:35
xtreak left
08:36
mr-foobar joined
08:38
dakkar joined
|
|||
gfldex | lolibloggedalittle: gfldex.wordpress.com/2017/09/13/go...last-fifo/ | 08:45 | |
08:48
cog_ joined
|
|||
lizmat | gfldex++ | 08:49 | |
gfldex: is there a file-test that you can perform to find out if something is a fifo ? | 08:51 | ||
08:51
cognominal left
|
|||
gfldex | `ls` knows so there must be | 08:52 | |
lizmat: bash got `-p $fifo` | 08:53 | ||
lizmat | hmmm.... I guess we would need support for that at the MoarVM/nqp level first | ||
08:53
xtreak joined
08:55
Cabanossi left
08:56
Cabanossi joined
|
|||
Xliff | \o | 08:56 | |
If I have a class is repr('CStruct'), is it possible for the class to have attributes that are not visible to 'C'? | 08:57 | ||
Or would I need a wrapper class (which would blow up all of my code) | 08:58 | ||
jnthn | Well I guess if you put them at the end then C wouldn't care :) | ||
gfldex | lizmat: see `man 2 stat` :) | ||
Xliff | jnthn: Er. Not really. Good chance of a segfault. | ||
gfldex | m: react { whenever Supply.interval(1) { say .Int } }; | 08:59 | |
how do I use Supply.interval ? | |||
camelia | (timeout)0 | ||
09:00
scovit joined
|
|||
lizmat | gfldex: like that, works for me as a one liner | 09:00 | |
Xliff | gfldex: Bot don't like things that go on forever. | 09:01 | |
jnthn | Xliff: Well, I'm assuming you are allocating the memory in the first place. If you aren't then of course it's not going to work :) | ||
Xliff | jnthn: Heh. Well I did not preclude that assumption in the initial description. | ||
lizmat | gfldex: buffering appears to be the issue | 09:02 | |
Xliff | But as a general practice using NativeCall.... it's always good when class matches struct. | ||
So I am taking it that's a no and I have to use a wrapper? | |||
Or a hack. | |||
(I'm thinking hack) | |||
jnthn | Xliff: Yeah, I'd pretty much always take the wrapper class approach myself rather than such tricks :) | ||
lizmat | Xliff: the timeout is not the issue, the fact that the output only contains 0 *is* | ||
Xliff | jnthn++: Your wisdom is appreciated, but my stubborn practicality needs a hack or there is a lot of rewriting in my future. | 09:03 | |
jnthn | :) | ||
lizmat: Yeah, when the bot kills the process due to timeout, we won't get chance to do an orderly flushing | |||
Xliff | That was my point. This goes on forever, so the bot will timeout and drop the output. | 09:04 | |
lizmat | jnthn: if the bot is killed with a ctrl-c like signal, we could catch that and do an orderly shutdown | ||
Xliff | Plus, the output is a count. Not always 0. | ||
jnthn | lizmat: Well, we could have the bot sneak a signal handler in before the code, sure | 09:05 | |
lizmat: Though a better solution would perhaps be for it to allocate a tty or some such | |||
Xliff | But I yam prolly speaking to the choir at this point. And I have done my coder thing for today. Time for more re-jiggering for XML::LibXML | 09:06 | |
gfldex | lizmat: also, `open` blocks on fifos (until they are opened on the other end for writing). Not sure if that is desireable. | ||
Xliff & | |||
lizmat | the only thing the bot would need is: signal(SIGINT).tap: &exit | 09:07 | |
or possibly signal(SIGINT).tap: { exit(255) } if you want another exit value | 09:08 | ||
sjn | hm. just a thought. would it be an idea to create a conveniency function for "signal(SIGINT).tap: { ... }"? e.g. just "SIGINT { ... }" | 09:13 | |
jnthn | Sounds like something for a module | 09:14 | |
09:15
lustlife left
|
|||
sjn | nah. seeing .tap in the code is a good signal to newbies to read up on a useful feature :) | 09:15 | |
jnthn | (In more realistic cases you'd probably writing whenever signal(SIGINT) { }) | ||
*probably be | |||
sjn | yeah | ||
09:16
dakkar left
|
|||
sjn notices that "whenever" doesn't have it's own entry in the docs | 09:16 | ||
jnthn | Hm, that maybe also means it's not searchable? | 09:17 | |
sjn | it's mentioned in doc/Language/concurrency.pod6 | 09:19 | |
so there's *something* | |||
gfldex | jnthn: it is searchable | ||
sjn | same goes for react | 09:20 | |
gfldex | both don't got a heading so they wont show up in the ToC | ||
09:22
lustlife joined
09:25
Cabanossi left
09:26
Cabanossi joined,
lustlife left
09:31
Actualeyes left
09:32
mr-foobar left
09:37
mr-foobar joined
09:51
domidumont left
09:52
xtreak left
09:53
timo1 joined,
TEttinger left,
timo1 is now known as timotimo
|
|||
scovit | gfldex++: if I may dare a comment, "my $fifo = open("radio-fifo-in", :rw); for $fifo.lines { .say }" does blocking the same way as Perl5 and uses 0% cpu (like it is supposed to) | 09:56 | |
gfldex | scovit: it indeed does what doesn't play well with react. Working on it. | 09:59 | |
Xliff | So... I was trying to sleep when the hack solution came to me. | 10:00 | |
Create another module with non-exported our variables that contain all the extra attributes. | |||
That way I don't need to re-write code. And yes, that is very hackish, but serviceable since regular users shouldn't need the functionality, so the existing API is unaffected. | 10:01 | ||
jnthn: Thoughts? :) | 10:02 | ||
jnthn | our variables? | ||
What if the module is used from multiple threads at the same time? | |||
10:04
timotimo left
10:05
timo1 joined
|
|||
timo1 | using openbsd for the first time, a throwback to my first year of linux ... tar requires the j for the x, but tells me it already knows i should have put j. cool. then no utf8 support. cool. wonder what's next ... | 10:09 | |
the display in weechat is still full of ?, but i can at least type ümläüt | |||
scovit | gfldex: good luck with that! I might suggest this excellent review www.kegel.com/c10k.html | 10:10 | |
10:11
simonm joined,
dakkar joined
10:12
bhm_ is now known as bhm
|
|||
stmuk | I think the OpenBSD xterm does support utf8 now so maybe its a font issue? | 10:16 | |
10:23
xtreak joined,
Cabanossi left
10:24
gregf_ joined
|
|||
Xliff | jnthn: DAMMIT, MAN! I knew you were going to ask that! | 10:25 | |
10:25
dakkar left
|
|||
Xliff | And I solved THAT one, TOO! | 10:25 | |
Well... mostly. | |||
10:25
dakkar joined
|
|||
lizmat | :-) | 10:25 | |
10:25
Cabanossi joined
|
|||
Xliff | I would need to write a class that Proxy's the attribute. | 10:25 | |
10:25
ShalokShalom_ joined
|
|||
Xliff | So STORE would set the value to $attr{$*THREADID} and FETCH would return the same. | 10:26 | |
But that's MOAR work, not less! | |||
I know $*THREADID is not the right var. Too tired to go look it up. | 10:27 | ||
Remember, I was trying to go to sleep 90 minutes ago and had to code this or I'd lose it. | |||
timo1 | stmuk: i'm ssh'd in and have weechat inside tmux | 10:29 | |
10:29
ShalokShalom left
|
|||
timo1 | ah, maybe because TERM is screen and not tmux-256color | 10:29 | |
i thought i set that | |||
10:29
timo1 left
10:30
timo1 joined
|
|||
timo1 | nope, didn't help | 10:30 | |
stmuk | timo1: ah! not sure about tmux I'm still in the stone age with screen | ||
10:30
ShalokShalom_ is now known as ShalokShalom
|
|||
Xliff | <- screen too | 10:30 | |
stmuk | despite tina's advocacy :) | ||
Xliff | How would you run tmux in a VirtualBox guest? | 10:31 | |
Nevermind. It's not what I thought it was. Still neat though. | 10:36 | ||
gfldex | .tell AlexDaniel you may want to have a look at irclog.perlgeek.de/perl6-dev/2017-...i_15156473 | ||
yoleaux | gfldex: I'll pass your message to AlexDaniel. | ||
Xliff | Now to hope morpheus comes along and guides me to the land of the promised SLEEP! | ||
Xliff & | |||
10:41
sproctor joined
10:50
pmurias joined
|
|||
pmurias | scovit: why do you want to use 'macro a is export { quasi { CBuffer.new("Ciao") } }' instead of sub a {CBuffer.new("Ciao")} | 10:53 | |
10:54
Cabanossi left
10:55
Cabanossi joined
|
|||
Zoffix | scovit: FWIW, there's also .get method that fetches one line at a time. Seems a more appropriate tool than a Seq .lines returns if you want it to block stuff. docs.perl6.org/routine/get | 10:57 | |
11:00
knobo joined
|
|||
scovit | pmurias I am still learning how to do things in Perl6. In this case a sub would be best, right? | 11:02 | |
in C it was a macro | |||
11:04
HoboWithAShotgun joined
|
|||
HoboWithAShotgun | m: class foo { has Rat $.bar; }; foo.new( bar => 60 ); | 11:05 | |
camelia | Type check failed in assignment to $!bar; expected Rat but got Int (60) in block <unit> at <tmp> line 1 |
||
yoleaux | 12 Sep 2017 18:47Z <gfldex> HoboWithAShotgun: you can get hold of named params at runtime: gist.github.com/gfldex/44eeaceb7d0...214d0cccfc | ||
HoboWithAShotgun | why doesn't this auto convert? | ||
Zoffix | HoboWithAShotgun: that's just how the language works. | ||
HoboWithAShotgun: many types can be converted to others. If conversions were done automatically, there'd be less point in using types | 11:06 | ||
HoboWithAShotgun: there's a corser syntax. Though it's NYI for attributes; you'll need to define your own BUILD or TWEAK submethod | 11:07 | ||
11:07
lizmat left
|
|||
Zoffix | m: -> Rat() $x { dd $x.nude }(42) | 11:08 | |
camelia | (42, 1) | ||
scovit | Zoffix: why not! | 11:09 | |
Zoffix | scovit: why not what? | ||
scovit | .get instead of lines! Apparently you don't even need the :rw flag | ||
'my $fifo = open("radio-fifo-in", :r); while defined $_ = $fifo.get { .say }' | 11:10 | ||
does waiting and terminates at EOF | |||
Zoffix | right; you'd need :w only when also writng and it defaults to :r | ||
HoboWithAShotgun | allright, so what it the basic number type | 11:11 | |
scovit | yes, but in Perl5, you need "+<" for waiting, which stands for read+write | ||
and in Perl6 too if you want to use the .lines method | |||
instead of .get | |||
HoboWithAShotgun | the type docs is just a flat list, i can't find any inheritance tree | 11:12 | |
Zoffix | HoboWithAShotgun: Numeric is a role done by all numerics. There is Int, Num, Rat, FatRat, and Complex. They have allomorphic subclasses IntStr, NumStr, RatStr, and ComplexStr. All of these inherit from Cool class which is objects that can be viewed as both stringa and numbers. And these, like most other types inherit from Any and Mu. There's also a number of native numerics | 11:14 | |
m: class Foo { has Rat $.x; submethod BUILD (Rat(Cool) :$!x) {} }.new(:42x).x.nude.say | 11:15 | ||
camelia | (42 1) | ||
HoboWithAShotgun | "cool", eh? | 11:16 | |
moritz | docs.perl6.org/type/Cool.html | ||
Zoffix | yeah :) | ||
11:16
lizmat joined
|
|||
Zoffix | It's what the cool kids use ;) | 11:17 | |
HoboWithAShotgun: oh, one omission: there's also a Real role that's done by all numerics except for Complex and ComplexStr | 11:18 | ||
Docs for individual types have the tree showing inheritance, though you're right, I don't know if we have one good map showing inheritances amd doings of all the types | |||
Zoffix & | 11:19 | ||
moritz | all the types tend to get unwieldly | ||
gfldex | scovit: that's where I'm at right now, but .get might make things easier. gist.github.com/gfldex/ecd1060c8a6...f2722265ab | 11:20 | |
scovit: is that you? github.com/scovit?tab=repositories | 11:22 | ||
scovit | yes | ||
11:24
Cabanossi left
11:25
[ptc] joined
11:26
Cabanossi joined
|
|||
Zoffix | HoboWithAShotgun: oh and there's also Rational tole that's done by Rat, RatStr, and FatRat :) | 11:26 | |
I think now I got 'em all :) | 11:27 | ||
lizmat | humanstate.com/blog/2017/9/13/human...kshop-2017 # small mention of Perl 6 | ||
11:27
skids joined
|
|||
Zoffix | You can also inspect the inheritance/roles on anything: | 11:27 | |
m <42>.^mro.say | 11:28 | ||
m: <42>.^roles.say | |||
camelia | ((Real) (Numeric) (Stringy)) | ||
Zoffix | m :<42>.^mro.say | ||
bah. typing of phone sucks Well, you get the idea :) | |||
timo1 | Zoffix: that's nothing, i used to ICQ with my nintendo DS using DSLinux at one point :) :) | 11:29 | |
Zoffix | timo1: heh | 11:30 | |
11:30
nadim left
|
|||
Zoffix | timo1: are you timotimo or did we get a new timo? | 11:30 | |
11:32
orac1e_ joined,
timo1 is now known as timotimo
|
|||
timotimo | the very same | 11:32 | |
lizmat | Zoffix: timotimo has opened up tp BSD | 11:33 | |
timotimo | i was ... forced | ||
lizmat | by whom? | ||
11:33
xtreak left
|
|||
stmuk | by the stack protection? :) | 11:34 | |
scovit | pmurias: the point of the discussion yesterday was that putting the #defines in a constant, in that case, was the worst thing to do, putting them in a variable was second worst. sub and macro seems equivalent to me but maybe you have a point for sub over macro? | 11:35 | |
11:36
wamba left
|
|||
moritz | subs work right now :-) | 11:37 | |
macros are experimental and pretty limited in functionality | |||
11:37
xtreak joined
|
|||
scovit | moritz++. I found a + for sub over macro in this case. If you have a macro exported in module A::B, which is used by module A, then if you use module A the macro will be unaccessible | 11:41 | |
while you can access the sub in the A::B:: stash | |||
this might be usefull | |||
timotimo | stmuk: the server i run my irc on has been moved | 11:44 | |
stmuk | ah ... by someone who has developed some security paranioa maybe? | 11:49 | |
Zoffix: roughly how much disk space does toaster use? | 11:51 | ||
11:52
nadim joined
11:53
llfourn left
11:54
rindolf joined
|
|||
moritz | three slices? :-) | 11:55 | |
11:55
rindolf left,
rindolf joined
|
|||
stmuk | I suspect its more www.rowlett.co.uk/wp-content/upload...ropped.jpg | 12:00 | |
Zoffix | stmuk: the VM I use it on has 100GB and I think it used to be 20 or 10 and more than 1 toast run would fill it up. Basically, it needs enough space to store all the modules + their bytecode | ||
well, let me power it up and look at df | 12:01 | ||
12:02
simonm left
|
|||
Zoffix | Oh wait, I was looking at the wrong thing. 100GB is the size of RAM | 12:02 | |
It uses a 10GB drive | 12:03 | ||
ilesystem Size Used Avail Use% Mounted on | |||
/dev/sda1 9.8G 4.5G 4.8G 48% / | |||
That's after a couple of toast runs. | |||
[Coke] | geekosaur: Last I heard, PRs are preferred over RTs with patches. | ||
12:04
domidumont joined
|
|||
Zoffix | ~/.zef$ du -sh | 12:05 | |
1016M . | |||
stmuk: so I guess ~5-10GB will do. | |||
grondilu | m: class Foo {...}; class Bar is Foo {...}; class Foo {}; class Bar {} | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> 'Bar' cannot inherit from 'Foo' because 'Foo' isn't composed yet (maybe it is stubbed) at <tmp>:1 |
||
stmuk | oh that not quite as bad as I feared .. was considering "zef uninstall" after the install but probably not worth it | 12:06 | |
grondilu was hoping he could make a big section with predeclaration at the top of his compunit :( | |||
stmuk | I assume I can "wget temp.perl6.party/toast.sqlite.db" as a seed db? | ||
12:06
simonm joined
|
|||
Zoffix | stmuk: no need. Just run it and it'll create a new db automagically | 12:07 | |
stmuk: and old db is kinda useless. It was made over a month ago. If you use its data as a measure for previous commits instead of re-running them now, there's a chance modules broken by changes to modules will show up as false positives for breakage due to rakudo changes. | 12:08 | ||
stmuk | wouldn't using a seed db make historic comparisions easier? | ||
ah | |||
Zoffix | IIRC the site currently uses oldest commit vs newest commit as a measure of what got burned. | 12:09 | |
.tell Skarsnik you were asking how much HDD Toaster needed. I have the answer: irclog.perlgeek.de/perl6/2017-09-13#i_15156762 | 12:10 | ||
yoleaux | Zoffix: I'll pass your message to Skarsnik. | ||
12:21
maettu joined
12:38
Cabanossi left
12:40
Cabanossi joined
12:42
wamba joined
12:43
xtreak left
12:49
wamba left
12:53
jonas1 left
12:55
eliasr joined
12:59
mcmillhj joined
13:00
rgrau joined,
cdg joined
13:02
cog_ left
13:03
mr-foobar left
13:05
cdg_ joined,
zakharyas left
13:06
mr-foobar joined
13:08
cdg left
13:18
someuser joined
13:21
ilmari[m] left,
wictory[m] left,
tadzik left
13:23
Guest7824 left
13:24
wamba[m] left
13:25
unclechu left,
mack[m] left,
CIAvash[m] left,
Matthew[m] left,
tyil[m] left,
Garland_g[m] left,
xui_nya[m] left,
M-Illandan left,
mienaikage left,
cgfbee left
13:28
cgfbee joined,
Levex joined
13:29
Levex is now known as Guest67164
|
|||
pmurias | scovit: re subs for macros, why use a fairly weird experimental feature when there is a fundamental part of the language that serves that purpose | 13:31 | |
? | 13:32 | ||
13:33
orac1e_ left
13:39
Cabanossi left
|
|||
masak | there are a lot of use cases that subs cover perfectly well | 13:39 | |
anything where you feel like code should be inlined for performance, for example | |||
you don't need macros for that, just a good JIT inliner (which Rakudo has) | 13:40 | ||
13:40
Cabanossi joined
|
|||
pmurias | what's the Perl 6 equivalent of the perl 5 while (<>) {...} | 13:43 | |
lizmat | for *IN.lines { } | ||
for lines { } actually | |||
with the note that in Perl 6 it will have been chomped already | 13:44 | ||
moritz | lizmat: for line() { } | ||
lizmat | line() ? | ||
moritz | without the parens, the sub lines gobbles up the block | ||
sorry, lines() | |||
lizmat | ah, yes, with parens :-) | 13:45 | |
gfldex | m: { .say } for lines; | ||
camelia | »Wann treffen wir drei wieder zusamm?« »Um die siebente Stund‘, am Brückendamm.« »Am Mittelpfeiler.« »Ich lösche die Flamm.« »Ich mit« »Ich komme vom Norden her.« »Und ich vom Süden.«… |
||
13:45
HoboWithAShotgun left
|
|||
lizmat | m: .say for lines | 13:45 | |
camelia | »Wann treffen wir drei wieder zusamm?« »Um die siebente Stund‘, am Brückendamm.« »Am Mittelpfeiler.« »Ich lösche die Flamm.« »Ich mit« »Ich komme vom Norden her.« »Und ich vom Süden.«… |
||
lizmat | no need for a block | 13:46 | |
13:46
mienaikage joined
13:51
MasterDukeMobile joined
13:53
lancew joined
13:59
pyrimidi_ left,
pyrimidine joined
|
|||
masak | the DWIM of "we can skip the parens on this sub call" comes back as the WAT of "accidentally gobbled a block"... | 14:00 | |
Zoffix | m: sub e { 42 }; say e | 14:01 | |
camelia | 2.71828182845905 | ||
Zoffix | :) | ||
m: sub d { 42 }; say d | |||
camelia | 42 | ||
masak | Zoffix: I *think* that's to spec | 14:04 | |
moritz | m: sub e { 42 }; say e() | ||
camelia | 42 | ||
moritz | it is | 14:05 | |
Zoffix | masak: yeah, it is. I was just pointing out another WAT with the omitted parens | ||
masak is old enough that "spec" still means "synopses" to him :) | |||
Zoffix: feels like half a WAT at the most (to me) :) | |||
Zoffix | heh | ||
masak | I mean, you hit F12 or whatever in your IDE, and it takes you to the definition of `e` in the setting, no? :P | 14:06 | |
jnthn | Sure, after you write the IDE... :P | ||
Zoffix | :) | ||
masak | Simple Matter Of Writing The IDE | ||
14:06
MasterDukeMobile left
|
|||
Zoffix | pmurias: FWIW, we have Perl's magic args-as-files handling generalized and you can make your own handles from multiple sources: .say for lines IO::CatHandle.new: @*ARGS, $*IN, <foo foo2>, :!chomp, :enc<latin1> | 14:07 | |
$*ARGFILES.chomp = False; for lines() {} will turn off auto-chomping | 14:09 | ||
pmurias | lizmat: thanks | 14:12 | |
stmuk starts toasting Bs | 14:13 | ||
pmurias | masak: hooking up Perl 6 into an existing IDE would also work (and seems like better/easier than writing a whole custom IDE) | ||
masak | pmurias: *nod* | 14:14 | |
14:15
tadzik joined,
CIAvash[m] joined,
mack[m] joined,
M-Illandan joined,
tyil[m] joined,
unclechu joined,
wamba[m] joined,
ilmari[m] joined,
Matthew[m] joined,
wictory[m] joined,
xui_nya[m] joined,
Garland_g[m] joined
14:17
timotimo left
14:18
knobo left
|
|||
samcv | oh wow i didn't know instead of { } you can also use $( ) | 14:19 | |
m: my $var = "hello"; say "word: '$( $var.flip )'" | |||
camelia | word: 'olleh' | ||
samcv | it's pretty ugly though :P | ||
14:19
llfourn joined
14:20
llfourn left
|
|||
Zoffix | m: my $var = "hello"; say "word: @( $var.flip )[]" | 14:24 | |
camelia | word: olleh | ||
14:24
margeas joined
|
|||
Zoffix | m: my $var = "hello"; say "word: &( *.flip )($var)" | 14:24 | |
camelia | word: olleh | ||
Zoffix | m: my $var = "hello"; say "word: %( z => $var.flip )<z>" | ||
camelia | word: olleh | ||
Zoffix | :) | 14:25 | |
14:25
Cabanossi left,
Cabanossi joined
|
|||
samcv | ah so that's why it works | 14:26 | |
14:34
Aaronepower joined
|
|||
lizmat | yeah, feels a lot like a P5 hack :-) | 14:35 | |
14:36
Kyo91_ joined
|
|||
samcv | i'm getting crashes in p6decontrv | 14:43 | |
of perl6_ops.c:340 in the rakudo tree | |||
oops meant to post in #perl6-dev | 14:44 | ||
14:44
mr_ron joined
14:47
zakharyas joined
|
|||
stmuk | I just saw a "double free or corruption" while toasting Avro (but cant reproduce) | 14:48 | |
sjn | o/ | 14:50 | |
sjn just made his first pull request for rakudo o/ | 14:51 | ||
moritz | sjn++ | ||
lizmat just merged sjn's first pull request | 14:52 | ||
14:52
cognominal joined
|
|||
sjn | hey, I'm not entirely sure if it works on all platforms :) | 14:52 | |
lizmat | you mean, there are no tests? | ||
sjn | I have no idea how to test the automatic MAIN Usage text generation | 14:54 | |
14:54
Cabanossi left
|
|||
sjn | I'll run the spectest suite with that change | 14:54 | |
I just ran the regular ones before pushing | 14:55 | ||
lizmat | sjn: it is deeply appreciated if you do that *before* submitting the PR :-) | ||
which regular ones ? | |||
14:55
Cabanossi joined
|
|||
moritz | sjn: if you load Test::Util (in t/spec/), you get an is_run method that launches a rakudo and gives you access to the output | 14:55 | |
sjn | lizmat: the ones that are run when you do a "rakudo build moar" | 14:57 | |
lizmat | I have no idea what tests those are. is that the same as "make test" perhaps ? | ||
sjn | probably. I think so | ||
lizmat | sjn: how many tests do you see? | ||
sjn | lizmat: my terminal buffer is all filled up with spectest output now, so I can't answer you any more :-) | 14:58 | |
lizmat | hehe... increaze da buffer! | 14:59 | |
14:59
nige left
|
|||
sjn | nah, I'll file a bug about decreasing the amount of spectest</lol> :) | 15:00 | |
15:00
Actualeyes joined,
scovit left
15:01
Skarsnik joined
|
|||
lizmat can confirm spectest is clean after merging sjn's PR :-) | 15:02 | ||
sjn | lizmat has a much faster computer than sjn | 15:03 | |
lizmat hopes sjn is aware of TEST_JOBS= env var ? | 15:04 | ||
Zoffix | I think I made it default to 6 jobs now. | ||
sjn | I'm not | ||
it looks like some tests are running in parallel | |||
lizmat | TEST_JOBS=8 make spectest # use 8 parallel processes for testing | 15:05 | |
sjn has only 4 cores | |||
lizmat | sjn: this is actually a Perl 5 prove feature, afaik | ||
then TEST_JOBS=4 could be better :-) | |||
Zoffix | Yeah, I did: github.com/rakudo/rakudo/commit/80...87a77f19af | ||
In my tests, I found the best bang for the core you get with setting jobs to 1.3x number of cores. | 15:06 | ||
sjn | prove6 t/spec/S06-other/main-usage.t failed :-\ | ||
Zoffix | sjn: run it with t/fudgeandrun t/spec/S06-other/main-usage.t | ||
That will pass it through the fudger and apply fudges, if any | |||
sjn | that fails with even more noise (could not find warnings) | 15:07 | |
Zoffix | huh | ||
sjn: where are you running that from? From rakudo's repo? | 15:08 | ||
I see some fudges in that file, so it's not expected to pass with just prove6 | |||
sjn | ah, I'm using prove6 :) | ||
Zoffix | Use t/fudgeandrun :) | ||
sjn | t/fudgerun is perl5 | ||
t/fudgeandrun* | |||
Zoffix | Yeah, it's a Perl runner, but it uses Rakudo to run the tests | 15:09 | |
sjn | ook | ||
Zoffix | Perl Harness I mean | ||
sjn | yeah, all tests are ok with fudgeandrun | ||
sjn is happy o/ | |||
Zoffix | \o/ | 15:10 | |
sjn: and I left a comment on your PR, but it was more of a "oh, I remember this topic of discussion from before". I see the PR was already merged, so :) | 15:11 | ||
grondilu | m: proto f {*}; f() | 15:12 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Calling f() will never work with declared signature at <tmp>:1 ------> 3proto f {*}; 7⏏5f() |
||
grondilu | ^not quite the error I was trying to catch | ||
grondilu was expecting X::AdHoc | 15:13 | ||
Zoffix was expecting "only proto" error | |||
15:13
ccakes_ left
|
|||
Zoffix | m: class Foo { proto f {} }.f | 15:13 | |
camelia | No such method 'f' for invocant of type 'Foo' in block <unit> at <tmp> line 1 |
||
grondilu | m: proto f {*}; multi f {}; f() | ||
camelia | ( no output ) | ||
grondilu | hum, I tought this wasn't working either :/ | 15:14 | |
Zoffix | m: Any.splice | ||
camelia | Cannot resolve caller splice(Any); Routine does not have any candidates. Is only the proto defined? in block <unit> at <tmp> line 1 |
||
Zoffix | I was expecting that error :) | ||
sjn | Zoffix: when did nine++ commit something? I was specifically looking to reduce the usage noise, and that hasn't really changed in a while? | 15:15 | |
15:15
ccakes joined
|
|||
Zoffix | sjn: some time in 2016. Maybe October 2016 or something | 15:16 | |
sjn: I think the change was in one of the CompUnit:: classes, where it changed what the name for the installed binary is or something (/me has no clue about that area of the codebase) | |||
sjn | I've been annoyed about that issure for much longer than that. :-P | ||
Zoffix | :) | ||
Don't use rakudobrew :) | 15:17 | ||
huggable: sauce | |||
huggable | Zoffix, Install untested latest development version of Rakudo from source: github.com/zoffixznet/r#table-of-contents | ||
Zoffix should add a note for how to install latest release up there as well | |||
pmurias | Zoffix: we do need a nicer way of building/install rakudo+zef so that people don't use rakudobrew when they don't have to | ||
Zoffix | `git checkout 2017.08` for current release | 15:18 | |
pmurias: well, I got one. Same initial setup as rakudobrew and simpler update command | |||
15:19
someuser left
|
|||
Zoffix | And no need to run rakudobrew rehash after installing binaries | 15:19 | |
15:20
domidumont left
|
|||
Zoffix | I'm talking about: github.com/zoffixznet/r#table-of-contents | 15:20 | |
sjn | hm. my spectest run failed with t/spec/S11-modules/nested.t and t/spec/S10-packages/basic.rakudo.moar | 15:21 | |
Zoffix | sjn: try running them again with t/fudgeandrun t/spec/S11-modules/nested.t t/spec/S10-packages/basic.t | 15:22 | |
sjn | this was by using "make spectest" in the rakudo root dir | ||
Zoffix | sjn: those flop once in a while. I think they try to use the same test module file or something and there's a clash somewhere | ||
15:23
sena_kun joined
|
|||
sjn | is there any any real work being done on reducing the amount of fudged tests? | 15:24 | |
moritz | occasionally | 15:25 | |
but the low-hanging fruits for that task have been mostly picked by now, so it's hard work | |||
Zoffix | Haven't heard of anyone activelly doing that. Most (all?) of them are ticketed in RT, so they get fixed whenever the ticket get fixed | ||
Speaking of low-hanging-fruits: | 15:28 | ||
buggable: tag TESTNEEDED | |||
buggable | Zoffix, There are 51 tickets tagged with TESTNEEDED; See fail.rakudo.party/t/TESTNEEDED for details | ||
Zoffix | ^ lots of easy opportunity to contribute. Writing tests to cover fixed bugs. | ||
moritz: weird that I get a 500 when I forget to place a second quote: irclog.perlgeek.de/perl6/search/?n...udobrew%22 | 15:32 | ||
Wonder if that's not a hint Bobby Tables might be around | 15:33 | ||
15:35
mr-foobar left
|
|||
Zoffix | sjn: oh, nine's around in #perl6-dev if you wanted to talk to him about the fixes you made :) | 15:35 | |
15:36
troys joined,
mr-foobar joined
15:39
mr_ron left
15:43
pyrimidine left
15:44
pyrimidine joined
15:45
pyrimidine left,
pyrimidine joined
15:50
someuser joined,
pyrimidine left,
Guest67164 is now known as levex,
levex left,
levex joined
15:52
pyrimidine joined,
tejr joined,
kyan joined
|
|||
Zoffix | oops... instructions in github.com/zoffixznet/r used $HOME/install/… instead of $HOME/rakudo/install/… for one of the paths :) | 15:53 | |
Zoffix should practices the self-preachings and start using that bash alias on all the boxes :) | |||
15:56
pyrimidine left,
pmurias left,
pyrimidine joined
15:58
pmurias joined
16:01
pyrimidine left,
pyrimidine joined
16:02
replacementimo joined
16:08
Cabanossi left
16:10
xinming_ joined
16:11
Cabanossi joined
16:13
xinming left
16:14
cdg joined,
robertle left
16:17
cdg_ left
16:19
someuser left
16:20
Hor|zon joined
16:24
|oLa| left
16:28
sproctor left
16:32
cdg_ joined
16:33
mr-fooba_ joined
16:35
cdg left,
mr-foobar left
16:37
dakkar left
16:43
dogbert17 joined
16:44
tejr left
16:47
nohuhu joined,
mcmillhj left
16:49
leont joined,
mcmillhj joined
|
|||
Zoffix | Heh, cool. "C Programming: The Modern Approach" talks about defining a `loop` macro to mean `for (;;) {}` :) | 16:50 | |
m: loop { "I've seen that somewhere".say and last } | 16:51 | ||
camelia | I've seen that somewhere | ||
mspo | Zoffix: what kind of insane person would do that? | ||
or is the book some kind of satire? :) | 16:52 | ||
Zoffix | Nah, it's just a section about preprocessor. The loop macro *is* followed by "changing language syntax is usually not a good idea" | ||
.oO( make a bunch of macros to make C look like Rakudo and use them in MoarVM source code ) |
16:53 | ||
16:53
Cabanossi left
|
|||
Zoffix | mspo: Actually, I think I'm the kind of insane person who will be doing it. for (;;) looks ugly :) | 16:54 | |
16:54
robertle joined
|
|||
pmurias | moritz: I have encoutered a few fudged tests that are fossils and/or don't make sense, so I'm pretty sure there are some remaining that just need to be removed | 16:55 | |
16:56
Cabanossi joined,
cdg_ left
|
|||
leont has seen begin/end macros written by a pascal programmer forced to do C, this road is never a good idea | 17:00 | ||
Skarsnik | Zoffix, I use while (1) for this kind of loop x) | 17:01 | |
17:01
khw joined
|
|||
leont would use while (1) too | 17:02 | ||
Zoffix | :) | 17:05 | |
17:07
AlexDaniel joined
17:09
leont left
|
|||
hythm | How to get the current file name in $*ARGFILES, I checked methods of $*ARGFILES but could not find it there | 17:10 | |
m: $*ARGFILES.filename # something like that | |||
camelia | No such method 'filename' for invocant of type 'IO::ArgFiles' in block <unit> at <tmp> line 1 |
||
Zoffix | hythm: .path | 17:11 | |
hythm | m: $*ARGFILES.path # something like that | ||
camelia | ( no output ) | ||
hythm | thankx Zoffix | ||
Zoffix | m: $*ARGFILES.path.say | ||
camelia | IO::Special.new("<STDIN>") | ||
17:11
lancew left,
lancew joined
|
|||
Zoffix | hythm: it's a IO::CatHandle which is basically a normal IO::Handle with all the same methods and attributes: docs.perl6.org/type/IO::CatHandle | 17:12 | |
(writer methods just throw a NYI at the moment; no idea what they should do) | |||
And .seek method is speshul in that it doesn't automaticaly switch to next handle in queue when seeking past end | 17:13 | ||
hythm | Zoffix: makes sense. I was looking for a method ".filename", did not notice ".path" | 17:15 | |
Zoffix | Yeah, sometimes it's hard to know what to look for :) That's why we have humans to help here :) | 17:16 | |
There actually used to be a .filename attribute pre-IO-Grant that made IO::ArgFiles an IO::CatHandle: github.com/rakudo/rakudo/blob/d0c2...iles.pm#L3 | 17:17 | ||
As I recall it never worked right tho | |||
17:18
skids left
17:24
troys is now known as troys_,
domidumont joined
17:27
zakharyas left
17:31
ChoHag left
17:38
ChoHag joined
|
|||
hythm | Zoffix, that's true. I just read the IO::Path docs, many useful methods are there | 17:47 | |
17:48
leont joined
17:49
rouking joined
17:50
nige joined
|
|||
Zoffix | \o/ | 17:52 | |
17:53
rouking left
17:57
skids joined
17:59
Kyo91_ left
18:04
knobo joined
18:05
mr-fooba_ left
18:06
mr-foobar joined
18:08
Cabanossi left,
Kyo91_ joined
|
|||
moritz | leont: oh hai | 18:10 | |
leont: on twitter, you mentioned that you liked your approach to parsing indented stuff more than mine | |||
leont: care to elaborate on that? I'm always looking for new perspectives on parsing | 18:11 | ||
18:11
Cabanossi joined
|
|||
leont | I don't like contextual variables, I prefer to pass them as arguments, that's most of the difference really. | 18:11 | |
(Well, I don't necessarily dislike them, but in a parser they feel … wrong to me | 18:12 | ||
moritz | leont: do you have experience passing arguments down proto tokens? | 18:14 | |
does that work without any hassle? | |||
Zoffix | It doesn't work at all | ||
moritz | :( | 18:15 | |
Zoffix | m: grammar { token TOP { <foo(42)> }; proto token foo($) {*}; foo:sym<meow>($n) { { dd $n }; .+ } }.parse: "foo" | 18:16 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Variable '$n' is not declared at <tmp>:1 ------> 3; proto token foo($) {*}; foo:sym<meow>(7⏏5$n) { { dd $n }; .+ } }.parse: "foo" |
||
Zoffix | Unless I'm doin' it wrong? | ||
leont | See TAP and YAMLish for two highly related approached I took (one took indentation level as argument, the other a litteral string) | ||
Zoffix | buggable: eco YAMLish | ||
buggable | Zoffix, YAMLish 'A pure perl6 implementation of YAML': github.com/Leont/yamlish | ||
18:17
nige left
|
|||
Zoffix | :sym has no matches | 18:17 | |
leont | I'd advice looking at TAP First, YAMLish is rather long and complicated (because YAML) | ||
Zoffix | m: grammar { token TOP { :my $*n = 42; <foo> }; proto token foo {*}; foo:sym<meow> { { dd $*n }; .+ } }.parse: "foo" | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Malformed postfix call (only alphabetic methods may be detached) at <tmp>:1 ------> 3 foo {*}; foo:sym<meow> { { dd $*n }; .+7⏏5 } }.parse: "foo" |
||
moritz | m: grammar { token TOP { <foo(42)> }; proto token foo($) {*}; token foo:sym<meow>($n) { { dd $n }; .+ } }.parse: "foo" | ||
camelia | 5===SORRY!5=== Unrecognized regex metacharacter ; (must be quoted to match literally) at <tmp>:1 ------> 3{*}; token foo:sym<meow>($n) { { dd $n }7⏏5; .+ } }.parse: "foo" Malformed regex at <tmp>:1 ------> 3}; token foo:sym<meow>($… |
||
Zoffix | m: grammar { token TOP { :my $*n = 42; <foo> }; proto token foo {*}; foo:sym<meow> { { dd $*n } .+ } }.parse: "foo" | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Malformed postfix call (only alphabetic methods may be detached) at <tmp>:1 ------> 3en foo {*}; foo:sym<meow> { { dd $*n } .7⏏5+ } }.parse: "foo" |
||
moritz | m: grammar { token TOP { <foo(42)> }; proto token foo($) {*}; token foo:sym<meow>($n) { { dd $n } .+ } }.parse: "foo" | 18:18 | |
camelia | Too few positionals passed; expected 2 arguments but got 1 in regex foo:sym<meow> at <tmp> line 1 in regex foo at <tmp> line 1 in regex TOP at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
Zoffix | m: grammar { token TOP { :my $*n = 42; <foo> }; proto token foo {*}; token foo:sym<meow> { { dd $*n } .+ } }.parse: "foo" | ||
camelia | Int $*n = 42 | ||
leont | I would classify that as a bug in proto tokens | ||
Zoffix | That's basically the only workaround I know of :) | ||
moritz: I'm hoping you can fix it :D | |||
The other week someone was asking for it too and there's a ticket from 2014 | 18:19 | ||
This one: rt.perl.org/Ticket/Display.html?id...et-history | |||
18:20
andrzejku joined,
espadrine joined
|
|||
ugexe | i suspect thats also part of why sprintf isn't thread safe | 18:23 | |
18:25
andrzejku left,
knobo left
18:26
andrzejku joined
18:27
cdg joined
18:31
cdg left
18:34
cdg joined
18:37
ChoHag left
18:38
wamba joined
18:39
cdg left
18:52
domidumont left
19:06
darutoko left
19:09
Cabanossi left
19:10
Cabanossi joined
19:12
timo joined
19:17
lancew left
19:21
mcmillhj left
19:23
raschipi joined
19:24
mcmillhj joined
19:29
mcmillhj left
19:30
geekosaur left
|
|||
moritz | does anybdoy want to proof-read my Perl 6 Regexes and Grammar book? | 19:30 | |
Zoffix | moritz: yeah, I could. Considering I wanted to read properly… kill two birds with one stone, eh? | 19:31 | |
*read it | |||
moritz | Zoffix: do you prefer a PDF (or epub or so), or markdown sources? | 19:32 | |
Zoffix | moritz: what's the preferred way to submit corrections? | 19:33 | |
moritz | Zoffix: git :-) | ||
19:34
setty1 joined
|
|||
perlpilot | moritz: I'll proofread it | 19:34 | |
Zoffix | moritz: then I guess markdown sources sound good | ||
moritz | perlpilot: I'll need an SSH pubkey to give you access | 19:35 | |
Zoffix: git clone [email@hidden.address] | 19:36 | ||
files are in manuscript/*.md | |||
19:37
Brock left
|
|||
Zoffix | moritz: sweet. What's my due date and which subset of English are you using (American, UK, etc)? | 19:38 | |
moritz | perlpilot: same git clone instruction for you :-) | ||
19:38
ChoHag joined,
mcmillhj joined
|
|||
moritz | Zoffix: about two weeks; Oxford comma :-) | 19:38 | |
and American English | 19:39 | ||
Zoffix | OK :) | ||
Skarsnik | Oxford comma hurt my eyes ! | 19:40 | |
19:40
geekosaur joined
|
|||
Zoffix | Oxford comma rules :) | 19:41 | |
moritz | Skarsnik: blanks before punctuation hurts my eyes :-) | ||
leont | That's also my style :-) | ||
moritz | and bdfoy's code layout also hurts my eyes :/ | 19:42 | |
leont | And actually, I do want to proof read it too, given that I tend to do more grammar stuff than most :-) | ||
Zoffix | haha. blanks before punct is French style :) | ||
Skarsnik | seriously the oxford comma rule make no sense x) | ||
Zoffix | Skarsnik: it adds clarity in many situations and it makes sense to use it consistently | ||
moritz | leont: git clone [email@hidden.address] | 19:43 | |
perlpilot | Skarsnik: www.nytimes.com/2017/03/16/us/oxfo...wsuit.html :-) | 19:44 | |
moritz | if somebody also wants the PDF in a dropbox folder, /msg me the email address that I should send the invitation to | ||
19:45
skids left
|
|||
Skarsnik | perlpilot, I don't even get the mistake in the law | 19:47 | |
Zoffix | Skarsnik: without the Oxford comma the text is ambiguous. Does it mean ("packing for shipment" || "distribution for (a) (b) (c)) or ("packing for " ("shipment" || "distribution for (a) (b) (c)")) | 19:51 | |
Zoffix & | |||
Or rather, the ambiguity exists only because Oxford comma is not a hard rule :) | 19:52 | ||
19:54
Aaronepower left
|
|||
teatime | "This book is dedicated to my parents, Ayn Rand and God." | 19:54 | |
19:55
orac1e_ joined
|
|||
perlpilot | teatime: if Ayn Rand and God are really the parents, that comma should be a colon or a dash. It's just another case of people not using all the punctuation available to them. And those people should learn Perl ;-) | 19:59 | |
teatime | lol | 20:00 | |
20:00
geekosaur left
20:01
Aaronepower joined
|
|||
tbrowder | hi #perl6 | 20:02 | |
20:04
pyrimidine left
20:05
geekosaur joined,
pyrimidine joined
20:06
P6steve joined
20:07
pyrimidine left,
pyrimidi_ joined
|
|||
raschipi | hi tbrowder | 20:08 | |
tbrowder | i'm working with DBIish and trying to figure a clean way to detect an error. after a statement prepare and execute i have tested both the statement handle and the db handle for .err and so far neither has shown an error even though i think it should (testing for a key in a non-existent table, sqlite3). | ||
P6steve | hello - quick question - I think that this %h<units>:exists being broken is a known issue (127767) - any advice on an alternative phrasing? | ||
20:08
cdg joined
|
|||
tbrowder | hi raschipi! | 20:08 | |
lizmat | RT #127767 | ||
synopsebot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=127767 | ||
Skarsnik | m: my %h = a => 'b'; say %h<a>:exists; say %h<b>:exists; | 20:09 | |
camelia | True False |
||
lizmat | P6steve: %h<units>:exists works afaik | 20:10 | |
that ticket is really about an LTA error message for !%h<units>:exists | |||
Skarsnik | Ho it's ! | ||
lizmat | use %h<units>:!exists if you want to check for non-existence | 20:11 | |
20:11
pyrimidi_ left
|
|||
P6steve | thanks liz - reading the RT to more closely understand prefix:<!> relation | 20:11 | |
ah that';s the ticket %h<units>:!exists thanks! | 20:12 | ||
Skarsnik | tbrowder, hm weird | ||
20:12
pyrimidine joined
|
|||
Skarsnik | m: my %h = a => 'b'; say "plop" if ! %h<b>:exists; | 20:12 | |
camelia | Unexpected named argument 'exists' passed in block <unit> at <tmp> line 1 |
||
tbrowder | the sql statement is: select * from tableone where colname = "idx" | ||
Skarsnik | Oh yeah that will just return nothing | 20:13 | |
tbrowder | but the table doesn't exist so i expect an error, | ||
Skarsnik | Oh the table | ||
20:14
pyrimidine left,
pyrimidine joined
|
|||
P6steve | my brain is going to hurt when this is a private class attribute hash %!h<key>:!exists. ;-) | 20:14 | |
20:15
pyrimidine left
|
|||
P6steve | thanks for the guidance | 20:15 | |
lizmat | there's always %!h.EXISTS-KEY("key") | 20:16 | |
20:16
pyrimidine joined
|
|||
lizmat | but that would be more typing | 20:16 | |
Juerd prefers "not" to "!" because "!" is easily missed when scanning code. | |||
lizmat | and it would be cheating a bit | ||
Juerd | And in real life, it's less noisy because your hash will probably be called something longer than 'h'. | 20:17 | |
Skarsnik | tbrowder, how do you call the statement? *don't remember much about dbiish* execute fail? | ||
tbrowder | anyway, do i need a try block to catch an error in DBIish or is there a way to test the handles. i tried to read the DBIish module guts but it's not clear to me. i'll post the code and be back later... | 20:19 | |
[Coke] | lizmat, Zoffix: btw, I added TEST_THREADS to a few of the async-using tests in perl6-doc, which is how many running tasks you want to allow from a single file. (didn't see any prior art) | ||
perlpilot | m: my %h = a => 'b'; say "plop" if %h<b>:!exists; | ||
camelia | plop | ||
Skarsnik | I think you need to use a try block yes | ||
20:19
pyrimidi_ joined
20:20
pyrimidine left
|
|||
Skarsnik | yeah you get a X::DBDish::DBError | 20:20 | |
but it should have make your code die probably | |||
20:22
pyrimidine joined
|
|||
tbrowder | ok i'll "try" the block...thanks Skarsnik | 20:23 | |
Skarsnik | github.com/perl6/DBIish/blob/maste...ec-error.t some example in that | ||
20:24
pyrimidi_ left,
cdg_ joined
20:27
pyrimidine left,
Skarsnik_ joined
20:28
cdg left
20:29
mcmillhj left
20:30
Skarsnik left,
knobo joined
20:31
pyrimidine joined
|
|||
leont | pyrimidine: how is BioPerl6 doing nowadays? | 20:32 | |
Zoffix | P6steve: you can also use the .not method: %!h<foo>:exists.not | ||
Zoffix uses `unless` in most of such cases | 20:33 | ||
Skarsnik_ | unless is nice :) | ||
Zoffix | [Coke]: what do you think about using TEST_JOBS instead of TEST_THREADS to match the name we use for this purpose in roast and nqp? | 20:34 | |
[Coke] | TEST_JOBS is different? | 20:35 | |
Zoffix | Ah, OK :) | ||
[Coke] | TEST_JOBS is number of simultaneous files to run. that's in prove, still works fine in docs. | ||
20:35
pyrimidine left,
knobo left
|
|||
P6steve | hey zoffix I may try the look of .not - I confess that sin my style mixing unless with if can lead to twisty passages | 20:36 | |
[Coke] | this is "I have one test file, how many threads can I use simultaneously". it's a crappy api because TEST_THREADS=5 TEST_JOBS=10 make xtest is suddenly maybe 50 threads. (but it defaults to 2, which seems reasonable) | ||
20:36
pyrimidine joined
|
|||
leont | What's really needed is a job server like gmake uses | 20:36 | |
[Coke] | trying with the latest rakudo (with jnthn's scheduler updates) prove isn't showing me any progress. it's just 0/318 ... and then done.) | ||
Zoffix | P6steve: :) yeah, I've seen some of those :) | 20:37 | |
leont | But prove doesn't use that, and rakudo (or actually moar) doesn't expose the functionality I need to implement it in perl6 yet | ||
If you see that when using prove, it's a well known bug in prove | |||
Zoffix | I think there was a bug in our t/harness6 test runner due to a tripple negative in unless :) | ||
leont | (or at least with -j$x) | ||
[Coke] | leont: never seen that issue with prove before. | 20:38 | |
20:38
orac1e_ left
|
|||
[Coke] | so when I just compiled a new rakudo that tweaks threading, seemed a likely culprit. maybe we're just tickling it now. *dunno* | 20:38 | |
20:39
Cabanossi left
20:40
pyrimidine left,
goofy joined,
Cabanossi joined
|
|||
leont | It only happens under very specific circumstances. The cause is well understood, the fix requires rewriting at least half of prove/TAP::Harness. | 20:40 | |
20:41
nige joined,
pyrimidine joined
|
|||
leont | rt.cpan.org/Public/Bug/Display.html?id=108390 | 20:42 | |
20:42
goofy left
20:43
pyrimidine left,
pyrimidine joined
20:52
orac1e_ joined
20:58
knobo joined
20:59
kyan left,
sena_kun left
21:01
sena_kun joined
21:02
dogbert17 left
21:07
aindilis left,
aindilis` joined
21:08
raschipi_ joined
21:09
raschipi left
|
|||
leont | Anyone have an opinion if YAMLish should return Lists or Arrays for its data? | 21:10 | |
21:12
TEttinger joined
21:13
pyrimidine left,
pyrimidine joined
21:14
troys_ is now known as troys
21:16
pyrimidi_ joined
|
|||
Zoffix | Lists :) | 21:16 | |
21:16
pyrimidine left
|
|||
raschipi_ | leont: I would be glad if it were a Seq, actually. | 21:16 | |
Zoffix | There are some perf perks to Lists, so it's nice to get those by default. | ||
21:17
sena_kun left
21:18
Kyo91_ left
|
|||
leont | My current refactor accidentally makes them lists (used to be arrays), still not sure if this is good or bad | 21:18 | |
raschipi_ | Well, I don't think parsing YAML in a as-needed basis would be feasible now that I think of it, so it should be a List. | ||
leont: It's good. Returning Arrays was a bug you just fixed. | 21:19 | ||
leont | Yeah, as-needed is definitely too much of a complication | ||
mspo | yaml has representations for both? | ||
item:\n -foo\n -bar\n -moo | |||
raschipi_ | That's a List in a Dictionary, isn't it? | 21:20 | |
leont | In YAML spec language, that's a sequence in a map | 21:22 | |
21:22
skids joined
|
|||
leont | My question is really "should a YAML sequence translate to a Perl6 List or a Perl6 Array" | 21:22 | |
raschipi_ | List, for sure. | ||
Because it's easy for converting it to an Array. Doing the opposite would be just a waste. | 21:23 | ||
leont | I don't think we have an equivalent a map, right? | 21:24 | |
raschipi_ | Yeah, there's Map | ||
docs.perl6.org/type/Map | |||
21:30
raschipi_ left,
raschipi joined
21:35
Kyo91_ joined,
pyrimidi_ left,
andrzejku left
21:36
pyrimidine joined
21:38
Cabanossi left
21:39
Aaronepower left
21:40
pyrimidine left,
Cabanossi joined
|
|||
BooK | m: say Order::More.succ | 21:45 | |
camelia | 2 | ||
BooK | m: say Bool::True.succ | ||
camelia | True | ||
BooK | why? | ||
why is one going over the end of the items in the enum and not the other? | |||
Zoffix | s: True, 'succ', \() | ||
SourceBaby | Zoffix, Sauce is at github.com/rakudo/rakudo/blob/963b...ool.pm#L35 | ||
BooK | I'm not asking how | ||
21:46
pyrimidine joined
|
|||
BooK | I have the code under my eyes, I see how :-) | 21:46 | |
but why was it decided that True.succ would be True, and not 2, or conversely why isn't Order::More.succ simply Order::More | 21:47 | ||
I'm questioning the difference in behaviour between differents enums | |||
Zoffix | s: More, 'succ', \() | 21:48 | |
SourceBaby | Zoffix, Sauce is at github.com/rakudo/rakudo/blob/963b...ric.pm#L31 | ||
BooK | and in fact, why don't they just rollover? or bounce off the ends back in the reverse direction? | ||
boustrophedon enums! | 21:49 | ||
Zoffix | I was just looking at blame :) | ||
21:49
pyrimidi_ joined
|
|||
BooK | yeah, the second time I didn't complain, because I understood it was for you, not me ;-) | 21:49 | |
21:50
pyrimidine left
|
|||
ugexe | "succ is short for "successor"; it returns the next enum value. Bool is a special enum with only two values, False and True. When sorted, False comes first, so True is its successor. And since True is the "highest" Bool enum value, its own successor is also True." | 21:50 | |
Zoffix | Order::More uses just your generic .succ/.pred from Numeric, while Bool was made to its current behaviour in 2011. I'd guess it was just special-cased for Bool because it really feels more like its own thing rather than just any old Enum | ||
BooK | I'm more annoyed with the inconsistency, than at the actual behaviour | 21:51 | |
Zoffix | "<pmichaud> thus far I think I'm firmly in the camp of "Bool is not an enum"" | 21:53 | |
From around here: irclog.perlgeek.de/perl6/2011-07-28#i_4182343 | |||
raschipi | But is it an Enumeration? | ||
Zoffix | I mean, from around the time the Bool.succ/.pred were made to be that way | ||
ugexe | i dont understand what sorting is supposed to do with it | 21:54 | |
BooK | good old $| in Perl5 solved this nicely | ||
tbrowder | Skarsnik: i got the try block working now, just need to tweek the handling...thanks! | ||
BooK | perl -e 'print $|++ for 0..6; print $/; print $|-- for 0..6; print $/' | ||
0111111 | 21:55 | ||
1010101 | |||
lizmat | I would argue that the behaviour of Enum.succ going beyond the last value, is a bu | ||
g | |||
BooK | lizmat: I'd tend to agree | 21:56 | |
m: say False.prec | |||
camelia | No such method 'prec' for invocant of type 'Bool'. Did you mean any of these? asec grep pred sec in block <unit> at <tmp> line 1 |
||
Zoffix | With the standard Numeric way, False.pred and .succ would always return a truthy value, while True.succ would still be true, and True.pred would be false. Just feels to be all over the map | ||
lizmat++ Yeah, I agree too | |||
BooK | m: say False.pred | ||
camelia | False | ||
lizmat | please rakudobug, will look at it tomorrow | ||
21:57
knobo left
|
|||
BooK | the flip-flop behaviour of $| was so cool | 21:57 | |
ugexe | we have a flip flop operator... | ||
dont know anything else about it, but there is one! | 21:58 | ||
raschipi | More than one, ff and fff | 21:59 | |
BooK | is it like .. and ... ? | ||
22:00
nadim left
|
|||
raschipi | One is awk-like and the other sed-like | 22:00 | |
leont | Got to catch them all!… | 22:02 | |
tbrowder | ref: META6.json: the old Test:: META seems not to work as it used to. What is the recommended way to have a meta test now for a user module, use META6::Bin? | 22:03 | |
BooK | if False.pred was True, then repeatedly .prec on a Bool would flip/flop while repeatedly .succ on a Bool would stay True after a short while | 22:05 | |
22:05
Kyo91_ left
|
|||
BooK | while that sounds cool for Bool, not it would be wise to generalize for any Enum (going forward to stop at the max, going backwards you rollover) | 22:05 | |
not *sure* | 22:06 | ||
Zoffix | If we make it go to max for .succ and stop there and go to min for .pred and stop there, we'll maintain the current Bool.succ/.pred behaviour, while fixing Order stuff :) | 22:07 | |
I'm not a fan of what Perl does. All of these special tricks is exactly why people who hate it hate it: too complex to learn all of them (and keep them learned). | 22:08 | ||
Zoffix calls it a day | |||
\o | |||
BooK | Zoffix: yeah, I think it makes more sense to stop whenever your reach the end | 22:09 | |
whatever end | |||
will email [email@hidden.address] with hopefully something that makes sense | |||
or better, I could submit a patch that does that, and let someone more knowledgeable make it better | |||
AlexDaniel | it's interesting how people were thinking that enum Bool is not going to happen | 22:16 | |
and then it just did :) | |||
lizmat also calls it a day | 22:17 | ||
22:17
pyrimidi_ left
22:18
pyrimidine joined
|
|||
tbrowder | disregard for now, i'm nuking my .zef directory... | 22:21 | |
22:23
pyrimidine left
22:27
pyrimidine joined
|
|||
tbrowder | that didn't help! zef can't find the deps for META6--do i need the zef "nuke" option? | 22:29 | |
22:32
replacementimo left
22:33
replacementimo joined
22:35
pmurias left,
rindolf left
22:36
cdg joined
22:38
vendethiel- joined
22:39
cdg_ left,
Ven`` left
22:41
cdg left
|
|||
tbrowder | well, that was drastic, but it looks like starting over will fix the problem (he says while whistling in the dark)... | 22:41 | |
timo | oh tbrowder, how did your read-write benchmark go after the recent changes to I/O performance? | 22:48 | |
22:52
adu joined
22:55
Skarsnik_ left
23:10
Cabanossi left
23:11
Cabanossi joined
23:15
replacementimo left
23:18
plicease_ is now known as plicease
23:23
adu left
|
|||
ugexe | tbrowder: `zef uninstall xxx` for each of those problem dependencies, then they will install | 23:26 | |
23:26
wamba left
|
|||
tbrowder | ugexe: too late, i'm starting over! | 23:27 | |
23:28
geekosaur left
|
|||
ugexe | starting over with zef can be done with `zef nuke site home StoreDir` | 23:28 | |
although you'll have to reinstall zef after | 23:29 | ||
tbrowder | timo: i'm still cleaning up, and rw tests are next in line--i'll report to jnthn and here when i get there. i do agree with jnthn that results of ASCII reads now are "good enough" for now that p6 beats p5 in utf8! | ||
ugexe: i did that and am now installing ALL modules for fun! (with a perl6 script, of course!) | 23:30 | ||
feature request: new zef option install all | |||
23:30
replacementimo joined,
geekosaur joined
23:35
pyrimidine left,
troys is now known as troys_
23:36
pyrimidine joined
|
|||
raschipi | That looks like a feature for the Ecosystem instead, generate a Task::All on a GitHub hook. | 23:36 | |
23:39
MasterDuke left
23:40
Cabanossi left
23:41
Cabanossi joined
|
|||
ugexe | "all" is too ambiguous - all the versions? all the auths? if (NYI) optional dependencies are listed, which dependency path gets chosen that corresponds to "all"? | 23:46 | |
raschipi | Being purpussufully obtuse is really annoying. | 23:48 | |
ugexe | ive thought about these things for a long time. i'm not sure what you are talking about. | 23:49 | |
raschipi | "all" means as many as possible. | 23:51 | |
ugexe | and you don't see how that is not useful? | 23:56 | |
installing multiple old versions that may no longer work for instance. not only is this probably not what someone really wanted, but it also introduces all sorts of possible conflicts/interactions between the multiple versions | 23:59 |