»ö« 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
MasterDuke joined,
Skarsnik left
00:02
headcase_ left,
pyrimidi_ joined,
pyrimidine left
00:05
headcase joined
00:06
pyrimidi_ left
00:07
pyrimidine joined,
mcmillhj joined
00:09
headcase left
00:10
virtualsue left,
pyrimidine left,
pyrimidine joined,
headcase joined
00:11
nige left
00:12
mcmillhj left,
nige joined
00:13
pyrimidine left,
pyrimidi_ joined
00:14
virtualsue joined
00:17
pyrimidi_ left,
pyrimidine joined
00:20
pyrimidine left,
pyrimidi_ joined
00:21
rindolf left
00:23
Cabanossi left,
mcmillhj joined
00:25
pyrimidi_ left,
Cabanossi joined,
pyrimidine joined
00:27
mcmillhj left
00:29
mcmillhj joined
00:30
pyrimidine left
00:32
pyrimidine joined
00:33
u-ou- joined,
mcmillhj left
|
|||
u-ou- | hi | 00:34 | |
00:35
pyrimidine left,
pyrimidine joined
00:39
pyrimidine left
00:40
geekosaur left
00:41
pyrimidine joined,
geekosaur joined
00:44
mcmillhj joined
00:45
pyrimidine left
00:49
mcmillhj left,
pyrimidine joined
|
|||
AlexDaniel | u-ou-: o/ | 00:49 | |
u-ou- | :) | ||
00:53
pyrimidine left
00:54
pyrimidine joined
00:56
mr-fooba_ left
|
|||
AlexDaniel | did we have non-int enums? | 00:56 | |
non-num rather | 00:57 | ||
00:57
piojo joined,
margeas left
|
|||
AlexDaniel | er, doesn't matter | 00:57 | |
00:58
pyrimidine left
00:59
mr-foobar joined,
pyrimidine joined
01:00
mcmillhj joined
01:02
eliasr left
01:03
pyrimidine left
01:04
R0b0t1_ left
01:05
mcmillhj left,
pyrimidine joined,
R0b0t1_ joined
01:06
Khisanth left,
perlpilot_ joined
01:08
perlpilot_ left,
Cabanossi left
01:09
perlpilot_ joined
01:10
pyrimidi_ joined,
pyrimidine left,
Cabanossi joined
01:12
u-ou- left
01:14
pyrimidine joined
01:15
pyrimidi_ left
01:16
mcmillhj joined
|
|||
weabot | I have an array of functions that I want to write to a file and read back, what's the best way to do this? | 01:17 | |
I can read them to a string with simple regex, but then I need to convert the string to a function name to call, and that's where my issue is. | |||
01:18
pilne joined
|
|||
perlpilot_ | what do you mean 'read them to a string with simple regex'? | 01:19 | |
What are you writing to the file exactly? | |||
weabot | a table, key => value where value is a Block | 01:20 | |
01:20
pyrimidine left,
Khisanth joined
|
|||
weabot | I want to save the table and read it right back | 01:20 | |
01:20
mcmillhj left
|
|||
weabot | for this I'm writing it in a parseable way, and I need to read it back, and I assume that it'll be read as a string | 01:20 | |
so I need to get the function name from the value in the string | |||
perlpilot_ | so ... write Perl code and EVAL it when you read it? | 01:21 | |
01:21
pyrimidine joined
|
|||
weabot | I didn't know about that, thanks | 01:22 | |
01:22
mcmillhj joined
01:23
Actualeyes left,
Actualeyes joined
01:25
aborazmeh joined,
aborazmeh left,
aborazmeh joined
01:26
mcmillhj left
01:27
pyrimidine left
01:28
pyrimidine joined
01:29
u-ou- joined
01:30
u-ou- left
01:33
pyrimidine left
01:34
piojo left
01:38
mcmillhj joined,
pyrimidine joined
01:41
troys is now known as troys_
01:42
aborazmeh left,
mcmillhj left,
pyrimidine left,
pyrimidine joined
01:45
ilbot3 left,
aborazmeh joined,
aborazmeh left,
aborazmeh joined
01:47
pyrimidi_ joined,
pyrimidine left
|
|||
[Coke] finds a p6 project he hasn't committed to in... 3years. | 01:51 | ||
01:51
pyrimidi_ left,
pyrimidine joined
01:53
mcmillhj joined
01:54
ilbot3 joined,
ChanServ sets mode: +v ilbot3
01:57
pyrimidine left,
pyrimidine joined
01:58
mcmillhj left
02:01
pyrimidine left,
pyrimidine joined
02:05
pyrimidine left,
pyrimidine joined
02:08
Cabanossi left,
vendethiel- joined,
noganex joined
02:09
mcmillhj joined
02:10
Cabanossi joined,
Ven`` left
02:11
pyrimidine left,
noganex_ left
02:13
mcmillhj left
02:15
pyrimidine joined
02:19
pyrimidine left,
pyrimidine joined
02:23
pyrimidine left,
pyrimidine joined
02:25
AlexDaniel[m] joined
02:29
pyrimidine left
02:32
pyrimidine joined
|
|||
[Coke] unbitrots it. had some .lol's and other legacy stuff | 02:33 | ||
02:37
geekosaur left
|
|||
AlexDaniel[m] | m: say 42 | 02:38 | |
camelia | 42 | ||
AlexDaniel[m] | m: say ‘ | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Unable to parse expression in curly single quotes; couldn't find final "’" at <tmp>:1 ------> 3say ‘7⏏5<EOL> expecting any of: argument list curly single quotes … |
||
02:38
pyrimidine left,
zacts left,
pyrimidine joined
02:42
pyrimidine left
|
|||
AlexDaniel[m] | heh, now I know what [m] means | 02:42 | |
02:43
pyrimidine joined
02:46
zacts joined,
geekosaur joined
02:47
pyrimidine left,
pyrimidine joined
02:51
mcmillhj joined
02:52
pyrimidine left
02:53
pyrimidine joined
02:55
mcmillhj left
02:56
mr-foobar left
02:57
mr-foobar joined
03:01
pyrimidi_ joined,
pyrimidine left
03:02
AlexDaniel[m] is now known as MatrixDaniel
03:06
headcase_ joined
03:07
pyrimidi_ left
03:08
Cabanossi left
03:09
pyrimidine joined,
headcase left,
Cabanossi joined
03:10
wamba joined
|
|||
SmokeMachine | m: ((* + *)).assuming(1) | 03:12 | |
camelia | No such method 'assuming' for invocant of type 'WhateverCode' in block <unit> at <tmp> line 1 |
||
SmokeMachine | why WhateverCode doesn't have a assuming? | ||
03:13
pyrimidine left,
pyrimidine joined
03:15
astj left,
astj joined
|
|||
skids | Can't think of a good reason. Technically, because Block isn't in its mro. | 03:17 | |
03:17
pyrimidine left,
pyrimidi_ joined
|
|||
SmokeMachine | the documentation says that .assuming should be on callable: docs.perl6.org/routine/assuming but it seems to be on Block... | 03:18 | |
Callable | |||
skids | Yeah. | 03:19 | |
S06 specs Callable. | |||
SmokeMachine | so, I'll try to fix that... ok? | 03:20 | |
03:21
PapaChub joined
|
|||
PapaChub | p6: say [ { a => 1, b => 2 } ].elems | 03:21 | |
camelia | 2 | ||
03:22
pyrimidi_ left
|
|||
PapaChub | p6: say [ %( a => 1, b => 2 ) ].elems | 03:22 | |
camelia | 2 | ||
PapaChub | p6: say [ %( a => 1, b => 2 ).item ].elems | ||
camelia | 1 | ||
SmokeMachine | p6: say [ { a => 1, b => 2 }, ].elems | ||
camelia | 1 | ||
skids | m: say [ ${ a => 1, b => 2 } ].elems | ||
camelia | 1 | ||
PapaChub | skids++ | 03:23 | |
03:23
pyrimidine joined
|
|||
skids | hashes are iteratable and iterables blow up if they are the single argument, is why. | 03:24 | |
PapaChub | SmokeMachine +.99 -- The comma seems like a hack :-} | ||
03:24
virtualsue left
|
|||
skids | With the comma, the single iterable argument is the list which the comma made. | 03:25 | |
PapaChub | For all the times, e.g., JSON barfs on "extraneous" commas, it seems odd that it's significant here | 03:26 | |
03:26
todd joined
|
|||
todd | Hi All! There are times when I need to know who called a sub. In Perl 5 I use to do: `my $WhoCalledMe = ( caller(0) )[1];`. How do I do this is perl 6? | 03:28 | |
03:28
mr-foobar left,
virtualsue joined
03:29
pyrimidine left
|
|||
MatrixDaniel | maybe you need callframe ? | 03:29 | |
03:29
pyrimidine joined
|
|||
MatrixDaniel | ( docs.perl6.org/type/CallFrame#sub_callframe ) | 03:29 | |
skids | If you want the package, CALLER:: or CALLERS:: | 03:30 | |
CALLERS skips frames you usually don;t care about. | 03:31 | ||
03:32
mr-foobar joined,
wamba left
|
|||
skids | We are supposed to have caller() but it isn't implemented yet. | 03:33 | |
RT#123826 | 03:34 | ||
synopsebot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=123826 | ||
03:34
pyrimidi_ joined,
pyrimidine left
|
|||
todd | Sub call frame look like it will help. Thank you! | 03:35 | |
PapaChub | vs. Backtrace ? | ||
03:35
Cabanossi left
|
|||
skids | Backtrace is more a debuging/error path thing. It's expensive. | 03:36 | |
03:39
Cabanossi joined,
pyrimidi_ left,
pyrimidine joined
|
|||
geekosaur | todd, didn;t we go through this on the mailing list yesterday? | 03:44 | |
03:44
virtualsue left
|
|||
geekosaur | although iirc you hit a leaky internal abstraction that timotimo needs to fix | 03:45 | |
03:45
virtualsue joined,
pyrimidine left
03:47
Actualeyes left
|
|||
geekosaur | (basically, if you get an error that mentions NQP and you are not explicitly using NQP, you have found a bug in rakudo) | 03:47 | |
03:47
troys_ is now known as troys
|
|||
geekosaur | this was NQPRoutine that came up iirc | 03:47 | |
todd | geekosaur: yes we did. The routine given in docs.perl6.org/type/CallFrame is foobar. Timo went into it. Look for the third post under subject: "what am I doing wrong here?" | 03:50 | |
geekosaur | yes, that's what I was talking about | ||
so you hit a rakudo bug that needs to be fixed | |||
todd | Lucky me! Huh! | ||
03:51
Exodist left
|
|||
geekosaur | there may not be a good workaround in the meantime, since internals-leaking bugs are often hard to get around without digging into internals | 03:51 | |
and you probably don't want to have to mess with nqp just to find out your caller | |||
03:51
pilne left
03:52
Exodist joined
|
|||
todd | I may just wait until `rt.perl.org/Public/Bug/Display.html?id=123826` gets fixed. I will play a bit with callframe to see what it will cough up. | 03:52 | |
geekosaur | I should probably also ask if you figured out the other issue | 03:53 | |
03:53
pyrimidine joined,
pyrimidine left
|
|||
todd | I program in top down. When a lot of folks are calling a sub, I sometimes need to know who the culprit was that sent bad data | 03:53 | |
geekosaur | perl 6 subs are lexical, perl 5's are (by default) shared and externally visible | ||
you might want to consider inverting it for now: instead of trying to find that out yourself, immediately return a Failure and let the culprit handle it :) | 03:54 | ||
(or not, and explode in their context instead of yours) | |||
the NQPRoutine issue might not let you find out who called you, but the Failure will remember where it came from | 03:55 | ||
todd | "lexical" doesn't mean anythign to me. I look it up int he disctionary and I understand for about three minutes. Would you mind writing out what you mean without that word. | ||
geekosaur | I showed it to you in my last email | ||
todd | I adore the method in the sub because I only have to write the degubbing code one and not into every caller | 03:56 | |
geekosaur | m: module A { sub foo { say "nope" }; our sub bar { say "yep" } }; A::bar(); # bar has a globally visible name | ||
camelia | yep | ||
todd | what was the subject line of the eMail? | ||
geekosaur | m: module A { sub foo { say "nope" }; our sub bar { say "yep" } }; A::foo(); # foo's name only exists within A | ||
camelia | Could not find symbol '&foo' in block <unit> at <tmp> line 1 |
||
geekosaur | in perl 5, both of those would be visible from outside (and before 5.18 you couldn't even put 'our' on it) | 03:57 | |
todd | oh. I played a bit with it and saved it for when I have time and not a bunch of stuff tearing at me (I am a computer jack of all trades) | 03:58 | |
geekosaur | so basically you can only use Module::subname if it was declared "our". in perl 5 you can "always" use it (perl 5.18+ has local subs, but they were/maybe still are? apparently broken) | 03:59 | |
so the only way to do that is to make them all "our" subs | |||
I think at some point there is supposed to be a pragma that lets you specify defaults (like 'our') but it doesn't exist yet | 04:01 | ||
todd | What cionfused me was that the sub came from a module (pm6). I did not know where to put the "our". `our sub Which($ProgramName) is export {good stuff;}` or put it is the "use" (our use)? I was also told that specifying what subs you want to import from modules is still on the drawing board. That is why you saw me comment is out `use CheckDependancies; # qw[Which]` | 04:03 | |
geekosaur | the former | ||
this is specifying in the definition of the sub that it is to be part of the module's symbol table (so Module::name works) | 04:04 | ||
todd | Sorry for all the typos. | ||
geekosaur | it is distinct from 'is export' which means some other module can request that an alias to it be installed, so you can call it *without* the Module:: | 04:05 | |
and if you do neither then it's not accessible from outside the defining module at all | |||
todd | I like it! That way I don't have to 1) worry obout duplicate names and 2) don't have to scratch my head trying to figure out where that came from. I came from Modula2. I use modules A LOT. That is where I got the Top Down too. They take longer to write, but are insanely easier to maintain. | 04:06 | |
I am copying and pasting myself an eMail of what you just wrote me. Thank you! You are a good teacher. There is a tallent to that all of its own. | 04:08 | ||
04:11
aborazmeh left
04:16
geekosaur left
|
|||
todd | I put together a quick test of callframe. It got kind of weird. See vpaste.net/yawFm | 04:16 | |
PapaChub | m: sub child { note "CHILD: $(callframe(1).code.name)" }; sub parent { child; note "PARENT: $(callframe(1).code.name)" }; parent | 04:21 | |
camelia | CHILD: parent PARENT: <unit> |
||
PapaChub | todd There are a ton of edge cases it doesn't handle, but in a pinch, maybe it's better than nothingx85? | 04:22 | |
04:22
synopsebot6 joined,
ChanServ sets mode: +v synopsebot6
|
|||
todd | I am still reading over what you wrote. I will have to play with it | 04:23 | |
Is `m:` part of the code or part of the chat line? | 04:24 | ||
04:24
geekosaur joined
|
|||
PapaChub | No, that's to run the example. Basically `callframe(1).code.name` is a [VERY!] Quick-and-Dirty way to get your caller's name. Like I say, though, it's totally not production-quality! (What happens if you're called from a closure, or anonymous sub, e.g.) | 04:26 | |
04:26
kannan joined
|
|||
todd | oh no problem there. Todd is not smart enought to use closures or anonymous subs! It pays to be a dumbdumb at times! | 04:27 | |
made me look up `note`! Cool. I use the $*ERR a bunch and it will be easier to use that writing it all out for "say" | 04:31 | ||
Is there a `print` version of `note` (no \n)? | 04:33 | ||
04:35
Actualeyes joined
04:36
nohuhu left
04:37
Cabanossi left,
geekosaur left
04:39
Cabanossi joined
|
|||
SmokeMachine | is that ok if on Callable's .assuming I transform the Callable (WhateverCode) into a Block (using EVAL) and use its .assuming? | 04:39 | |
skids: ^^ | 04:40 | ||
04:40
BenGoldberg left
|
|||
skids | You mean for a rakudo patch or as a workaround in general code? | 04:41 | |
SmokeMachine | rakudo patch... | ||
i don't think its pretty... but even the original Block's .assuming uses multiple EVALs... | 04:42 | ||
to construct signatures... | |||
skids | I think what we should do is have callable stub (require, via interface) a method assuming, add an "NYI" method to ForeignCode, and write an assuming for WhateverCode. Because WhateverCode only has positionals and its .assuming can be much, much simpler. | 04:43 | |
(or find out who all the users of Foreigncode are and add "NYI" methods there.) | 04:44 | ||
SmokeMachine | that makes sense... | ||
this was my first try: github.com/FCO/rakudo/commit/e9aa8...61cd92bfe8 | 04:45 | ||
ill move it to WhateverCode and try to make it better... | 04:46 | ||
skids | As far as getting rid of the EVALs in Block.assuming, really what needs to happen is meta-api's into World and the VM binder have to be made available. Otherwise you'd end up reimplementing a whole lot of QAST construction. | 04:47 | |
04:49
perlpilot_ left,
geekosaur joined
|
|||
SmokeMachine | again: makes sense... | 04:53 | |
skids | Bedtime for me... best of luck! | 04:54 | |
SmokeMachine | skids: thanks | 04:56 | |
04:58
khw left
05:00
skids left
05:04
Ven`` joined
05:05
todd left,
vendethiel- left
05:07
xtreak joined
05:17
headcase joined
05:20
headcase_ left
05:22
musca left
05:25
adu left
05:27
PapaChub left
|
|||
AlexDaniel | buggable: tags | 05:30 | |
buggable | AlexDaniel, Total: 1686; BUG: 1080; UNTAGGED: 402; LTA: 180; NYI: 97; REGEX: 69; RFC: 61; TESTNEEDED: 56; CONC: 51; JVM: 49; REGRESSION: 36; UNI: 29; PERF: 28; SEGV: 26; @LARRY: 23; IO: 23; NATIVECALL: 22; POD: 21; TODO: 18; PRECOMP: 14; OO: 13; BUILD: 11; TESTCOMMITTED: 10; OPTIMIZER: 9; STAR: 7; PARSER: 6; BOOTSTRAP: 5; REPL: 5; GLR: 4; MATH: 4; OSX: 4; WINDOWS: 3; RT: 2; WEIRD: 2; BELL: | ||
AlexDaniel | .tell nine FWIW RT #132088 | 05:32 | |
synopsebot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=132088 | ||
yoleaux | AlexDaniel: I'll pass your message to nine. | ||
05:37
Cabanossi left
05:39
Cabanossi joined
05:56
wamba joined
06:05
xtreak left,
xtreak joined,
xtreak left
06:06
nadim joined
06:18
domidumont joined
06:23
bla123123 joined
06:24
bla123123 left,
domidumont left
06:25
domidumont joined,
darutoko joined
06:30
AlexDaniel left
06:36
Cabanossi left
06:39
Cabanossi joined
06:40
knobo joined
06:58
troys is now known as troys_
07:00
troys_ is now known as troys
07:01
leont joined
07:02
nadim left
07:06
Cabanossi left
07:07
SHODAN left
07:09
Actualeyes left,
Cabanossi joined
07:22
nadim joined
07:28
Actualeyes joined
07:43
cuonglm joined
07:48
pecastro left
07:49
ShalokShalom left
07:51
xtreak joined
07:56
troys is now known as troys_
08:00
pecastro joined,
ShalokShalom joined
08:02
sproctor joined
08:04
orac1e_ left
08:06
Cabanossi left
08:08
leont left
08:09
Cabanossi joined
08:12
xtreak left
08:15
troys_ is now known as troys,
cdg joined
08:17
cdg_ joined
08:20
cdg left
08:21
cdg_ left
08:23
robertle left
08:24
cdg joined
08:28
cdg left
08:32
cdg joined
08:33
xtreak joined
08:37
cdg left,
xtreak left
08:42
redhands joined
|
|||
redhands | very stupid question here, probably should look at REPL.pm, but how can I EVAL and intentionally introduce/leak into the surrounding scope? | 08:44 | |
08:44
troys left
08:45
ChoHag left
08:47
cdg joined
08:48
dakkar joined
08:50
ChoHag joined
08:51
cdg left
|
|||
moritz | you can't | 08:57 | |
lexpads are immutable at run time | |||
the only thing you can do is something my &newsub = EVAL '...'; | |||
the REPL cheats by putting subsequent lines in artificial inner scopes | 08:58 | ||
redhands | ah thanks | 08:59 | |
08:59
scovit joined
|
|||
scovit | Hello, the docs states that declaring your own ".new" makes correct initialization of objects from subclasses harder, how to deal with the issue? | 09:00 | |
specifically, how to make a subclass of the class Proxy, which provides her own ".new" ? | |||
moritz | why do you need a separate .new method? | 09:01 | |
scovit | the question is how to make a subclass of Proxy, I can sacrify the new method in the subclass | ||
09:02
adu joined
|
|||
scovit | I need to add some attributes, a DESTROY and specific FETCH and STORE to proxy | 09:02 | |
last part less important then adding a DESTROY | 09:03 | ||
moritz | what are you trying to achieve? | ||
scovit | just a Proxy with a DESTROY would be fine | ||
this ^ | |||
moritz | no, that doesn't answer my question | 09:04 | |
09:04
cdg joined
|
|||
moritz | why do you want/need it? | 09:04 | |
scovit | to free up memory once the proxy get garbaged | ||
moritz | which memory? | ||
'cause in general, the GC frees memory for you | 09:05 | ||
scovit | memory I allocate in the method with calls Proxy.new, or in FETCH. using a LEAVE dont work because a Fetch get called x4 times what would be needed | ||
for instance when say proxy; instead of my $a = Proxy. | 09:06 | ||
moritz | but if that memory is only referenced in the proxy, the GC will automatically collect it for you | ||
scovit | I honestly think those are all bugs but can leave with it if the language is flexible enough to give workarounds | ||
moritz it doesnt | |||
moritz | then yes, it's a bug and needs to be reported and fixed | ||
scovit | the memory is allocated by nativecall | 09:07 | |
09:07
adu left
|
|||
moritz | hmm, that might be tricky; but putting the handling into a Proxy sounds like the wrong idea | 09:07 | |
scovit | why Proxy has a .new method in the first place? | 09:08 | |
moritz | fwiw the problem with subclassing Proxy is that Proxy is marked as a container (so that it's ignored in type checks etc.) | ||
09:08
cdg left
|
|||
scovit | I just need a "smarter" proxy, nothing more or nothing less | 09:08 | |
moritz | seems like Proxy.new is a performance optimization | 09:09 | |
if you look at BOOTSTRAP.nqp in rakudo's source, there's a call to nqp::setcontspec | 09:10 | ||
that's what a subclass of Proxy likely also needs | |||
scovit | thanks, I'll look | ||
should be fine to reimplement proxy if it is not that big | 09:11 | ||
09:11
TEttinger left
09:17
cdg joined,
xtreak joined
|
|||
redhands | hmm, so is there is a simple way to pass a context to EVAL, or a simple way to do the same cheating that REPL does? Ideally would like to call the REPL, all I need is for stdout to be immediately flushed after every write. | 09:18 | |
09:20
scovit left
09:21
cdg left,
domidumont left
09:22
domidumont joined
09:23
cdg joined
09:28
cdg left
09:30
cdg joined,
mr-foobar left
09:31
kannan left,
redhands left
09:33
mr-foobar joined
09:34
cdg_ joined,
cdg left
09:35
cuonglm left,
cdg joined
09:38
knobo left
09:39
cdg_ left
09:40
cdg left,
knobo joined,
pecastro left
09:41
pecastro joined
09:45
pecastro left
09:46
pecastro joined
09:47
kannan joined
09:49
margeas joined
09:55
pecastro left
09:56
pecastro joined
09:58
Skarsnik joined
|
|||
Skarsnik | Hello | 09:59 | |
10:02
pecastro left
10:05
cdg joined
10:07
xtreak left,
xtreak_ joined,
Cabanossi left,
gfldex left
10:08
pecastro joined,
ShalokShalom left,
Cabanossi joined
10:09
gfldex joined
10:10
cdg left
10:22
cschwenz joined,
headcase left
10:23
headcase joined
10:26
kannan left
10:31
musca` joined
10:34
abraxxa joined
10:37
HoboWithAShotgun joined
|
|||
HoboWithAShotgun | when i can have a custom unicode operator ( multi sub postfix:<㎭>($v) returns Math::Angle ), why can't I have a likewise method ( method ㎭() )? | 10:40 | |
timo | the restrictions on what are valid method names are stricter compared to operators | 10:41 | |
jnthn | m: say '㎭' ~~ /\w/ | ||
camelia | Nil | ||
timo | m: say uniprop "㎭" | ||
camelia | So | ||
moritz | .oO( it's your signfificant other!) |
||
timo | that's rad | 10:42 | |
jnthn | m: class C { method ::('㎭') { 42 } }; say C.'㎭'() | ||
camelia | 42 | ||
moritz | operators aren't limited to identifiers | ||
jnthn | It's possible if you're willing to quote | ||
HoboWithAShotgun | amazing :) | 10:44 | |
10:44
ShalokShalom joined
|
|||
abraxxa | jnthn: regarding cro SSL->TLS, do you want to keep the cro-ssl history, so should I clone that repo, change all names and push that to cro-tls? | 10:44 | |
10:45
notbenh left,
notbenh joined
|
|||
jnthn | abraxxa: Yes, let's keep the history, please. | 10:45 | |
So just clone/tweak/push would do it fine | |||
abraxxa | ok | 10:46 | |
HoboWithAShotgun | so now I can say 90°.㎭; and get 1.5707963267949 | ||
instead of Math::Angle.new( degrees => 90 ).radians | 10:47 | ||
that's... | 10:48 | ||
10:48
xtreak_ left
|
|||
jnthn | :) | 10:48 | |
10:48
xtreak joined
|
|||
Skarsnik | huhu | 10:50 | |
HoboWithAShotgun | i am trying to write something named Math::Triangle, with which i can say for example M::T.new( a => 4, b => 5, gamma => 70 ).alpha | 10:51 | |
but i am finding myself repeat logic a lot. | 10:52 | ||
10:53
Cabanossi left
10:54
Cabanossi joined
|
|||
Xliff finally and truly groks the proxy object. | 10:56 | ||
s/proxy/Proxy/ | |||
abraxxa | is there already a prove equivalent in Perl 6 or do I still need to use zef to run a dists tests? | 10:57 | |
Xliff | jnthn: So I think I solved the multithreading thing we got into yesterday. I did mention it yesterday before I slept. | 10:58 | |
cschwenz | abraxxa: this is what i use: alias p6prove='prove --exec perl6 -r' | 10:59 | |
abraxxa | cschwenz: thanks | ||
cschwenz | you're welcome! :-) | ||
Xliff | cschwenz++ - Can you pass arguments to perl6 like that? | 11:00 | |
abraxxa | jnthn: Cro depends on Cro::SSL which depends on Cro? | ||
cschwenz | don't know, haven't had reason to try yet :-P | ||
Xliff | heh | ||
jnthn | abraxxa: Uh, I hope not. :) Cro::SSL depends on Cro::Core | ||
nine | In the tradition of #perl6 space geekiness: www.youtube.com/nasajpl/live | ||
11:01
_28_ria left
|
|||
jnthn | abraxxa: Which happens to provide the module Cro | 11:01 | |
(Dependencies are distribution names, not module names) | |||
timo | yo cschwenz, i got some more SDL fun to show you: twitter.com/loltimo/status/904038390131286025 and twitter.com/loltimo/status/904058942078246915 | ||
abraxxa | i did 'zef install Cro' which printed ===> Searching for missing dependencies: IO::Socket::Async::SSL, Shell::Command, File::Find, Terminal::ANSIColor, OO::Monitors, YAMLish, Cro::WebSocket | ||
===> Searching for missing dependencies: Cro::HTTP, Base64, Digest::SHA1::Native, Crypt::Random, File::Which | |||
===> Searching for missing dependencies: IO::Path::ChildSecure, HTTP::HPACK, Cro::Core, Cro::SSL, if, LibraryMake | |||
11:02
_28_ria joined
|
|||
cschwenz | timo: Ooh, that's awesome! :-D | 11:02 | |
11:02
kannan joined
|
|||
abraxxa | cschwenz: that doesn't search for module in ./lib | 11:02 | |
timo | still haven't prettied up the scrolling game or made a video out of it :| | ||
jnthn | Xliff: Glad you figured something out for it; modules that cope with being used in a threaded context will save their users a lot of pain :) | ||
stmuk | abraxxa: lowercase the Cro to cro | ||
stmuk wonders if anyone uses "local" in rakudobrew | 11:03 | ||
jnthn | I wonder if zef is case-insensitive on distribution names? The actual distribution name is "cro", not "Cro" | ||
abraxxa | hm, -Ilib doesn't work either | ||
jnthn | Since what it gets you is the "cro" executable | 11:04 | |
cschwenz | abraxxa: hmm, i haven't ran into that because i always start me perl6 test files with use v6; use Test; use lib 'lib'; :-( | ||
stmuk | jnthn: I think zef is genreally sensitive | ||
Xliff | abraxxa: Yeah. That's why I asked my earlier question. | 11:05 | |
jnthn | stmuk: Hm, interesting, I wonder why "zef install Cro" did anything other than an error, then... | ||
cschwenz | timo: the ones you linked on twitter remind me of a cross between snake and tron :-) | ||
abraxxa | jnthn: cro-tls pushed | 11:06 | |
Xliff | abraxxa: Try "prove --exec 'perl6 -Ilib' -r | ||
cschwenz | Xliff++ :-) | ||
11:07
geekosaur left
|
|||
jnthn | abraxxa++ | 11:07 | |
abraxxa | Xliff: yes, the colons where missing and so -Ilib was passed to prove instead of perl6 | ||
jnthn | Lunch time, then meeting; bbl | ||
abraxxa | jnthn: should I update all references in cro to it too? | ||
jnthn | abraxxa: Yes | 11:08 | |
Also those things in the cro-http repo | |||
abraxxa | ok | 11:09 | |
Xliff | Has cglobal matured to the point where you can use a version number instead of using a full lib name? | ||
Ala cglobal('xml2', v2, 'symbolname', int32) | |||
stmuk | oh "zef install Cro" does find "cro" | ||
I had problems with the capitalised version a few weeks back | 11:10 | ||
11:10
geekosaur joined
|
|||
abraxxa | jnthn: what about ssl params, rename those to TLS too? | 11:11 | |
jnthn | Yeah, distribution names and module names are two separate namespaces. There actually is no Cro::Core module, but there is a Cro::Core distribution. | ||
abraxxa: Ummm..hmmm | 11:12 | ||
abraxxa: Maybe alias them? | |||
11:12
llfourn left
|
|||
jnthn | :tls-config(:$ssl-config) lets us accept both | 11:12 | |
abraxxa | jnthn: although the module is that young? | ||
jnthn | Young doesn't mean zero users :) | 11:14 | |
We don't have to keep the alias forever, it'll just smooth things over a bit for current users, and while we update docs etc. | |||
abraxxa | ok | 11:15 | |
env vars? | |||
jnthn | Hm, which ones? | ||
stmuk | I think the dependency order for installing Cro rather cro was wrong when I tried and abraxxa seems to see something similar | 11:16 | |
jnthn can't immediately think of one with SSL in it | |||
abraxxa | jnthn: HTTPService.pm6 line 124 and 130 | ||
Xliff | jnthn: The only problem with that is that libxml2 has its own globals. I don't know if what I describe will handle those, or even if I have to worry about them. | ||
jnthn | abraxxa: ah, yeah, I forgot about those | 11:17 | |
abraxxa: Just rename those, I think | |||
abraxxa | ok | ||
jnthn | I think they're barely being used, and it's a template so it only affects new code going forward | 11:18 | |
11:20
nowan left,
void1 joined
|
|||
jnthn | oops, I was meant to be going for lunch... | 11:21 | |
jnthn really goes :) | |||
abraxxa | jnthn: not sure if you want to bump the version of Cro::TLS as it's code identical to Cro::SSL 0.7 | ||
jnthn: Mahlzeit! | |||
timo | is Cro::TLS more than just refering to SSL by the proper name? :P | ||
abraxxa | timo: not at the moment | ||
just early renaming to use the current proper name | 11:22 | ||
timo | that's fair | ||
abraxxa | timo: github.com/croservices/cro/issues/18 | ||
the aliasing didn't work and I got a Perl 5 error message I don't understand | 11:23 | ||
11:24
nowan joined,
orac1e_ joined
|
|||
abraxxa | ah, typo, now it works | 11:28 | |
11:38
margeas left,
Cabanossi left
11:39
Cabanossi joined
11:40
margeas joined
11:42
ufobat joined
|
|||
abraxxa | jnthn: i have my changes for cro-http ready but can't push them | 11:44 | |
11:44
scovit joined
|
|||
timo has a potential hotfix for the nativecall no longer supporting optional parameters | 11:44 | ||
Zoffix | moritz: do you want me to just fix small technical errors or keep them in a separate list with other, more general suggestions? | 11:46 | |
Like word boundary description fails to mention _ and other para says .IO creates a file handle | 11:47 | ||
stmuk | how sane is forking rakudobrew? | ||
asking for a friend :) | |||
11:47
Skarsnik_ joined
11:48
strangemk2 joined
|
|||
Zoffix | stmuk: so we have more than one project to not recommend? :p | 11:48 | |
stmuk | more confusion is the perl way :) | 11:49 | |
Zoffix | Maybe. But not Rakudo way. :) | ||
abraxxa | jnthn: sent a pr | ||
scovit | can somebody help me with nqp? I am trying to understand the code in BOOTSTRAP.npq where you define Proxy. | 11:50 | |
m: use nqp; my $a; $a := nqp::getstaticcode(sub b {}); | |||
camelia | getstaticcode requires a static coderef in block <unit> at <tmp> line 1 |
||
scovit | what does this mean? | ||
11:51
Skarsnik left,
void1 left,
ShalokShalom_ joined
|
|||
timo | might be something that only makes sense in nqp? | 11:52 | |
oh, it's also used in Code.pm in the core setting | |||
11:52
sumdoc joined,
domidumont left
|
|||
timo | getstaticcode will give you the without-closures code object from a sub | 11:53 | |
moritz | Zoffix: just fix it | ||
scovit | timo, so what about the error about the static coderef? | 11:54 | |
11:54
ShalokShalom left
|
|||
timo | not sure | 11:54 | |
11:57
xtreak left
|
|||
timo | gist.github.com/timo/f00347c2d9cd6...413ce4fe16 recompile your moarvm with this patch | 11:57 | |
ah, of course | |||
you're passing a Sub object, which simply has the code object that moarvm wants buried inside of it in some attribute | 11:58 | ||
11:58
domidumont joined
|
|||
timo | you need to nqp::getattr its '$!do' attribute | 11:58 | |
you can find many examples of this all over the code | |||
12:01
perlpilot_ joined,
perlpilot_ left
|
|||
sumdoc | Is there something like NativeCall for C++ | 12:02 | |
For interfacing with C++ | |||
So that we can import all the functions in C++ library | 12:03 | ||
moritz | iirc nativecall can do a bit of C++ interfacing | ||
where's FROGGS when we need him? :-) | |||
though the name mangling that C++ compilers do is not standardized, so the support is somewhat shaky | |||
sumdoc | Is it possible to impement arma.sourceforge.net/docs.html C++ library in Perl 6? | 12:04 | |
moritz | template-based library? probably not | 12:05 | |
12:06
MasterDuke left
12:07
MasterDuke joined,
Cabanossi left,
Skarsnik__ joined
12:09
Cabanossi joined
|
|||
Zoffix | moritz: OK. Will fix. I also created "zoffix-feedback.md" file in root of the repo. I'm gonna just write down some general feedback up in there. No need to write responses; just delete the entries you read or whatever. They're separated by `---------------` with blank lines around them. | 12:10 | |
timo | oh snap, grant submission deadline is *tomorrow* | ||
Zoffix | timo: cool. You gonna do a grant? | ||
timo | i'll try :) | 12:11 | |
12:11
Skarsnik_ left
|
|||
Zoffix | \o/ | 12:11 | |
timo | the "project details and a proposed schedule" section is .. tricky | ||
moritz | Zoffix: sure thing, thanks | 12:12 | |
scovit | timo: it is the second time in my life I truly feel like an idiot, and the first time was listening to a neo-liberal economist ;) | 12:17 | |
m: use nqp; my $a; my $b := sub { }; say $b.^attributes; nqp::getattr($b, Code, "$!do"); | 12:18 | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Variable $!do used where no 'self' is available at <tmp>:1 ------> 3attributes; nqp::getattr($b, Code, "$!do7⏏5"); |
||
MasterDuke | m: use nqp; my $a; my $b := sub { }; say $b.^attributes; nqp::getattr($b, Code, '$!do'); | 12:20 | |
camelia | (List @!dispatchees Mu $!dispatcher_cache Mu $!dispatcher int $!rw Mu $!inline_info int $!yada Mu $!package int $!onlystar List @!dispatch_order Mu $!dispatch_cache Mu $!phasers Mu $!why Code $!do Signature $!signature List @!compstuff) | ||
lizmat | scovit: single quotes | ||
scovit | makes sense.. it was performing substitution.. | 12:21 | |
12:22
awwaiid joined,
xtreak joined
12:23
kannan left
12:28
piojo joined
|
|||
timo | we call that interpolation | 12:29 | |
12:29
ChoHag left,
Skarsnik_ joined
|
|||
abraxxa | jnthn: pull-request for cro sent too | 12:30 | |
12:31
eliasr joined,
piojo left
12:33
setty1 joined,
Skarsnik__ left
12:35
xtreak left
12:36
Cabanossi left
|
|||
stmuk | "zef install Cro" does work (although cro itself was broken pre 4832aea | 12:36 | |
12:39
Cabanossi joined
12:42
abraxxa left
|
|||
stmuk | zef |& seems to be buffering .. not sure it should | 12:43 | |
12:45
sumdoc left,
nicq20 left
|
|||
stmuk | oh its the pipe | 12:48 | |
12:48
piojo joined
12:50
xtreak joined
12:54
setty1 left
12:55
setty1 joined
12:58
grondilu joined
|
|||
grondilu was wondering if he could make a mix out of a class implementing Real and wrote this: | 12:59 | ||
m: say :foo(class :: does Real {}.new).Mix | |||
camelia | MoarVM panic: Memory allocation failed; could not allocate 128736 bytes | ||
grondilu | m: say :foo(class :: does Real { method Bridge { NaN } }.new).Mix | 13:00 | |
camelia | Mix(foo(NaN)) | ||
grondilu | well I guess I can | ||
Zoffix | grondilu: same thing exists with many of the methods. You're not giving it any way to coerce to stuff, so it keeps coersing to itself | ||
And same thing exists with Numeric and, I guess, Stringy | 13:01 | ||
grondilu | ok | ||
makes sense | |||
Zoffix didn't see an easy way to fix this last time he looked at it | |||
scovit | this hangs probably in an infinite loop just entering $b (FETCH): gist.github.com/scovit/a72b8973e87...0032c5ff2d any help? | ||
13:01
cdg joined
|
|||
Zoffix | m: say Numeric.new + 42 | 13:02 | |
camelia | MoarVM panic: Memory allocation failed; could not allocate 125968 bytes | ||
Zoffix | .oO( stub required methods? An obvious answer, so there's probably a reason why it's not really workable in this case ) |
||
grondilu | shouldn't Numeric have a default Bridge to NaN or something? | 13:03 | |
Zoffix | Maybe | ||
scovit | I can imagine that the signature of $b keeps fetching and fetching and fetching... but I am missing a piece of knowledge | ||
perlpilot | It's been a while since this has happened, but lately I look at #perl6 and think "what are they talking about?!?" ;-) | 13:04 | |
Zoffix | scovit: just so you know: nqp is not meant for end users. We're free to change it at will and without notice, so if you use it, you risk code breakages in the future | ||
scovit | Zoffix: thanks I acknoledge | ||
Zoffix | The whole .Bridge thing looks superfluous to me. | 13:05 | |
13:05
kannan joined
|
|||
Zoffix | It coerces to Num, so why not just use .Num instead of .Bridge vOv | 13:05 | |
13:08
Cabanossi left
13:09
Cabanossi joined
|
|||
grondilu | isn't Bridge more general than that? | 13:09 | |
13:09
HoboWithAShotgun left
|
|||
grondilu | since it's being used by other roles | 13:09 | |
scovit | Zoffix: imagine somebody which loves Perl has some time to spare, start to program in Perl6. At first he is excited: so many nice new features! He takes some time, he ports some libs using nativecall. Then he want to really do things in Perl 6 which you cannot do in other languages but which the docs claim to be doable | 13:10 | |
13:10
void1 joined
|
|||
scovit | he discovers that most of the library is written in another language, nqp. Then he is presented with a blue pill: take it and it will be all just a bad dream | 13:11 | |
Zoffix | grondilu: I only ever seen it coerce to Num; what other types have it? | ||
scovit: sure. Learn nqp :) Then you can help us with core hacking :) | 13:12 | ||
I was just pointing it out in case you assumed that was user-facing stuff and was meant to follow same changes policy as the rest of Rakudo. | 13:13 | ||
BooK | the way I understand scovit's argument is that the whole "Perl6 is written in Perl6" is a half-truth | ||
13:13
strangemk2 left
|
|||
Zoffix | It's not true at all, I'd say :) | 13:14 | |
teatime | c'est la interpreters | ||
scovit | Zoffix I am mostly inclined to learn npq in order to accomplish my project | ||
Zoffix | (though I think I made such clames in the past) | ||
scovit | I might end up helping you in stuff in the core, but just at some point and by chance | ||
13:14
mcmillhj joined
|
|||
grondilu | Zoffix: Real | 13:15 | |
Zoffix | Well, not "at all". "Parts of rakudo are written in Rakudo, so it's easier to understand core code than were it written in an entirely different language" is the true statement :) | ||
scovit | specifically, i was trying to make a custom proxy class | ||
Zoffix | grondilu: but all Reals are Numeric | ||
well, all core Real types are also Numeric | |||
And so they .Bridge to Num | 13:16 | ||
grondilu | ok you meant Numeric not Num | ||
Zoffix | No, I meant Num | ||
grondilu | hum | ||
not all reals are Num, are they? | 13:17 | ||
m: my $x = 1; say $x ~~ Real; say $x ~~ Num; | |||
camelia | True False |
||
Zoffix | No, only Num are Num | ||
m: (42, 42.0, 42e0, 42+0i, FatRat.new: 42, 1).map: *.?Bridge.^name.say | |||
camelia | Num Num Num Nil Num |
||
grondilu | that's because they use the default Bridge | 13:18 | |
Real.Bridge must return a Real, but it doesn't have to be a Num. | 13:19 | ||
Zoffix | It does. It bridges different types to one type (Num) | ||
grondilu is skeptical | 13:20 | ||
Zoffix | And all core types return Num from .Bridge (though, now I see Complex doesn't have it), so my original point was: why the roundabout, just use a .Num | ||
13:20
mcmillhj left,
mcmillhj joined
|
|||
grondilu | I'm currently writing a Polynomial class. I want it to implement Real. So I'm writing a Bridge method and I intend it to return a Real, not a Num. Am I doing it wrong? | 13:20 | |
Zoffix | grondilu: my bet would be you'd encounter more infinite loops like you did above. Some operator will be trying to .Bridge your Real into something it can work with and will loop forever in dispatch | 13:21 | |
grondilu suddenly realizes that can be circular | |||
yeah | 13:22 | ||
otherwise I could just write class :: does Real { method Bridge { self } } | |||
masak | I've never quite understood Bridge either. I've never encountered the term "bridge" used in this way outside of Rakudo's core :) | 13:23 | |
13:24
xtreak left
|
|||
perlpilot | It's analogous to a network bridge, but with types instead of networks. (at least that's how I accept the term in my own head :) | 13:25 | |
13:25
Skarsnik__ joined
13:27
Skarsnik__ is now known as Skarsnik
|
|||
masak | yes, I _understand_ the term fine :) | 13:27 | |
grondilu | I can implement Real but apparently I can overwrite its Str method :/ | ||
masak | I was just never fully convinced that Rakudo's number tower needs a Bridge in the first place | 13:28 | |
grondilu | m: class :: does Real { method Bridge { NaN }; method Str { "yo!" } } | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Cannot have a multi candidate for 'Str' when an only method is also in the package '<anon|80985888>' at <tmp>:1 |
||
grondilu | that looks LTA | ||
13:28
Skarsnik_ left
|
|||
grondilu | oh wait | 13:28 | |
m: class :: does Real { method Bridge { NaN }; multi method Str { "yo!" } } | 13:29 | ||
camelia | ( no output ) | ||
grondilu | m: class :: does Real { method Bridge { NaN }; multi method Str { "yo!" } }.new.say | ||
camelia | yo! | ||
grondilu | of course, silly me | ||
m: (foo => class :: does Real { method Bridge { NaN }; multi method Str { "yo!" } }.new).Mix | 13:30 | ||
camelia | ( no output ) | ||
grondilu | m: (foo => class :: does Real { method Bridge { NaN }; multi method Str { "yo!" } }.new).Mix.say | ||
camelia | Mix(foo(yo!)) | ||
grondilu | m: (foo => class :: does Real { method Bridge { NaN }; multi method Str { "yo!" } }.new).Mix.total.say | ||
camelia | NaN | ||
13:33
xtreak joined
13:37
skids joined
13:38
orac1e_ left
13:49
HoboWithAShotgun joined,
pmurias joined
|
|||
pmurias | timo: what's your grant project? | 13:50 | |
timo | docs.google.com/document/d/102h_Nl...3yfI/edit# | 13:51 | |
the estimate is already a lot, but i'm afraid it'll actually take even longer than what i expect | |||
Skarsnik | haha the end picture | 13:52 | |
timo | if on the other hand i get it done in the time estimated or lower, i can spend a bunch of time making the instrumented profiler threadsafe or implementing a sampling profiler or what have you | ||
jdv79 | Zoffix: how's the C studies goin? | 13:53 | |
Zoffix | m: say 372/831 | 13:54 | |
camelia | 0.447653 | ||
jdv79 | almost halfway? | ||
Zoffix | 48% through the C book; afterwards, will also read the GC book (it's about 800 pages) | 13:55 | |
jdv79 | what is the gc book? | ||
teatime | also: what is the C book? | ||
Zoffix | jdv79: yeah, though I wasn't doing much of it in the previous few weeks. I think I'll get through the book by end of September | ||
13:55
pmurias left
|
|||
jdv79 | cool | 13:55 | |
Zoffix | "C Programming: A Modern Approach": knking.com/books/c2/ | ||
Wonderful book. Just a gem | |||
jdv79: the GC book: www.amazon.com/Garbage-Collection-...Management | 13:56 | ||
teatime | "KNK is now the logical heir to K&R ... In short, get this book." high praise. | ||
jdv79 | why you want to be a garbage man? i hear they are paid ok here in nyc.. | 13:57 | |
13:58
strangemk2 joined
|
|||
Zoffix | jdv79: hehe. I'm actually thinking of reading it in the lunch room at work... and telling all the computer unsavvy people that I'm training for a new career :P | 14:00 | |
14:01
void1 left
14:02
wamba left
|
|||
scovit | interestingly, this executed with nqp runs, while executed with perl6 hangs gist.github.com/scovit/d4dc4bd7302...500b543212 | 14:03 | |
14:05
Skarsnik_ joined
14:09
Skarsnik left
14:10
pecastro left
14:15
headcase left
14:16
HoboWithAShotgun left
14:18
wamba joined
14:20
vendethiel- joined,
Ven`` left
|
|||
Geth | doc: 87c125ebd8 | (Steve Mynott)++ | doc/Language/faq.pod6 correct name of 6.x-errata |
14:21 | |
14:22
pecastro joined
14:24
xtreak left
14:28
bdmatatu joined
14:30
Sgeo_ joined
14:33
Sgeo left
|
|||
Geth | doc: 15e3851479 | (Steve Mynott)++ | doc/Language/faq.pod6 more info about roast errata based on Zoffix on IRC |
14:41 | |
14:43
Skarsnik joined
14:46
mr-foobar left,
Skarsnik_ left
14:48
headcase joined,
AlexDaniel joined
14:49
wamba left
14:51
ChoHag joined
14:52
nige left,
nige joined
14:53
mr-foobar joined
14:56
ShalokShalom_ is now known as ShalokShalom
15:00
zakharyas joined
15:02
rindolf joined
15:04
ChoHag left
15:06
domidumont left,
ChoHag joined
15:07
Cabanossi left
15:08
strangemk2 left
15:09
Cabanossi joined,
knobo left
|
|||
grondilu | m: multi infix:<+>(Real $, Pair $ where *.value === True) { NaN }; say | 15:10 | |
camelia | 5===SORRY!5=== Argument to "say" seems to be malformed at <tmp>:1 ------> 3r $ where *.value === True) { NaN }; say7⏏5<EOL> Other potential difficulties: Unsupported use of bare "say"; in Perl 6 please use .say if you meant to cal… |
||
grondilu | m: multi infix:<+>(Real $, Pair $ where *.value === True) { NaN }; say +:foo | ||
camelia | Cannot resolve caller Numeric(Pair: ); none of these signatures match: (Mu:U \v: *%_) in block <unit> at <tmp> line 1 |
||
grondilu | m: multi infix:<+>(Real $, Pair $ where *.value === True) { NaN }; say 1 + :foo | 15:11 | |
camelia | ===SORRY!=== Circularity detected in multi sub types for &infix:<+> |
||
grondilu | m: multi infix:<+>(Real $, Pair $) { NaN }; say 1 + :foo | ||
camelia | NaN | ||
grondilu | adding a constraint on the Pair triggers circularity detection. | ||
looks like a false positive to me | |||
aka a bug | |||
15:12
khw joined
|
|||
Zoffix | grondilu: yeah, there's a ticket: rt.perl.org/Ticket/Display.html?id...et-history | 15:13 | |
grondilu | ok | ||
thanks | |||
jnthn | Did anyone actually take all the candidates and manually draw out the DAG? :) | 15:15 | |
15:16
mr-foobar left
|
|||
jnthn | I can't imagine the cycle detection is a false positive. | 15:17 | |
It is interesting that it ends up with a cycle though | |||
15:19
user123123 joined
15:22
mr-foobar joined,
zakharyas left,
HoboWithAShotgun joined
15:29
SHODAN joined
15:30
user123123 left
15:31
HoboWithAShotgun left,
scovit left
|
|||
timo | [Coke]: would it be bad to submit the proposal in a format other than pod? | 15:33 | |
15:34
user123123 joined,
ChoHag left
15:35
user123123 left
15:36
ChoHag joined,
user123123 joined
15:37
user123123 left,
user123123 joined
15:38
user123123 left
15:39
user123123 joined
15:41
user123123 left
15:42
user123123 joined
15:43
user123123 left
15:44
user123123 joined
15:45
cschwenz left
15:46
user123123 left
15:47
user123123 joined,
headcase left
15:48
headcase joined,
user123123 left
15:50
headcase left,
headcase joined
15:51
user123123 joined
15:55
tadzik left,
user123123 left,
user123123 joined,
nige left,
HoboWithAShotgun joined,
user123123 left
|
|||
timo | looks like a link to an application is also fine | 15:55 | |
15:55
nige joined,
tadzik joined
15:57
headcase left,
piojo left
15:58
releasable6 left,
nativecallable6 left,
evalable6 left,
committable6 left,
nativecallable6 joined,
committable6 joined,
evalable6 joined,
releasable6 joined
15:59
headcase joined,
user123123 joined
16:00
user123123 left
16:02
user123123 joined,
Bucciarati joined
16:03
user123123 left
|
|||
timo | i've submitted the document now | 16:03 | |
16:04
user123123 joined
16:05
user123123 left
|
|||
Geth | ecosystem: b6843a1eb5 | (Brian Duggan)++ | META.list Add Digest::SHA256::Native to ecosystem See github.com/bduggan/p6-digest-sha256-native |
16:06 | |
16:07
mcmillhj left
16:08
user123123 joined,
phanson joined
16:09
headcase left
16:10
user123123 left,
headcase joined,
nige left
16:11
sproctor left,
nige joined
|
|||
grondilu learnt more about C<Mix> lately and is quite happy about it as it's the thing he had been looking for to easily implement linear combinations. | 16:12 | ||
16:12
kannan left
16:15
mcmillhj joined,
phanson left
|
|||
stmuk | how did I miss seeing this? | 16:18 | |
utiaji.org | |||
Zoffix | who | 16:20 | |
*whoa | |||
16:21
mcmillhj left
|
|||
Zoffix | a bit too edit-happy :P Tried to select some text and it threw me in edit mode | 16:22 | |
bdmatatu | Thanks for trying it :) I gave a talk about it at yapc-na 2016 | 16:23 | |
Zoffix | bdmatatu++ | 16:24 | |
AlexDaniel | bdmatatu++ indeed | 16:26 | |
bdmatatu | thanks! | ||
AlexDaniel | wait, all the changes I do there are public? | 16:27 | |
Zoffix | Yes | ||
AlexDaniel | /o\ | ||
Zoffix | Well, I guess | ||
AlexDaniel: do you see Testy McTesty here? utiaji.org/wiki/main | 16:28 | ||
AlexDaniel | yes | ||
Zoffix | Then yes :) | ||
AlexDaniel | utiaji.org/cal heh | ||
Zoffix | neat | ||
HoboWithAShotgun | when I have a "subset foo of Cool where 0 < * < 9" and a "foo $foo = 8;", is there some magic i can apply so $foo++ rolls over and sets the value to 1? | 16:29 | |
gfldex | HoboWithAShotgun: not with a subset alone | 16:30 | |
but you could overload postfix:<++> | 16:31 | ||
or use a Proxy (slow) | |||
AlexDaniel | Zoffix: hey, yesterday I learned that Matrix and freenode are bridged, so looking at ZofBot it got me thinking that maybe it can solve a problem for you? | ||
Zoffix | I had a problem? | ||
AlexDaniel | Zoffix: that is, you can use Riot on your phone, pc and whatever else, all using the same nickname | ||
Zoffix: and if you're offline, you still get these messages and mentions when you go back online | 16:32 | ||
16:32
mcmillhj joined
|
|||
ilmari[m] waves from the matrix | 16:32 | ||
Zoffix has no idea what Riot or Matrix are | |||
MatrixDaniel | ilmari: | ||
oops | |||
well, I still have a problem with chromium, so can't use it entirely as I want… but we'll get there once I file a couple of bug reports | |||
ilmari[m] | matrix.org is a federated messaging platform, riot.im is the flagship client (web, android, ios) | 16:33 | |
MatrixDaniel | mainly, chromium does not support keyboard layouts properly, so it's half-broken for me. | ||
16:33
kannan joined
|
|||
Zoffix is happy with regular irc :P | 16:33 | ||
ilmari[m] | it works for me, but I'm only using en_GB layout | ||
It's handy on the go too | 16:34 | ||
ilmari[m] waves from Android | |||
16:34
dakkar left
|
|||
Zoffix just uses JuiceSSH on Android to connect to screen-ed weechat session :P | 16:34 | ||
ilmari | there's a matrix plugin/script/whatever for weechat | 16:35 | |
so you can keep using that | |||
Zoffix | But I don't have a problem :D | ||
AlexDaniel | Zoffix: well, sure, I just thought that I'd mention it just in case | ||
Zoffix | Thanks. | ||
timo | Zoffix: juicessh has a super annoying problem where it doesn't handle the "alternate screen" thing that terminal emulators have, so when i try to go into copy-paste mode, i'll end up getting just the server's welcome message and my "attach to screen" command, then nothingness m( | ||
16:36
domidumont joined
|
|||
Zoffix | ZofBot is more than just a messaging bot. He's... a friend \o/ | 16:36 | |
16:36
Cabanossi left
|
|||
ilmari uses connectbot on his phone on the rare occasions he SSHes from it | 16:36 | ||
16:36
user123123 joined
|
|||
AlexDaniel | Zoffix: here's a neat screenshot though: files.progarm.org/2017-09-15-19363..._scrot.png | 16:37 | |
I still don't understand how it figured out that it is code, but whatever | |||
16:37
mcmillhj left
|
|||
Zoffix | timo: I just start another juicessh instance if I need another terminal | 16:37 | |
timo | that's not what i mean by "alternate screen" | 16:38 | |
Zoffix | AlexDaniel: "that it is code"? What do you mean? | ||
Oh, IT | |||
AlexDaniel | Zoffix: well, it did the syntax highlighting automatically | ||
Zoffix | Nevermind. can't read | ||
16:39
Cabanossi joined
|
|||
Zoffix | m: More.Int.say | 16:39 | |
camelia | 1 | ||
timo | alternate screen is apparently used to keep the shell untouched while some terminal ui application runs, so when it exits you get back exactly what you had before you started it | 16:40 | |
Zoffix | K, good :) Thought it'd give the More :) | ||
timo | bdmatatu: the "install" section in your utiaji could use some ` ` around it to make it show up as multiple lines rather than just a single line. or do you have to indent? i'm not quite sure | 16:42 | |
skids reminds self to teach pterm to scroll up the backbuffer rather than use altscreen. | |||
timo | what's pterm? | 16:43 | |
skids | linuxified putty xterm. | ||
timo | oh interesting | ||
skids | Only thing I can stand these days, what with all the libvte crummyness. | ||
16:43
user123123 left
|
|||
timo | have you tried mlterm? it has sixel support :) | 16:44 | |
skids | I may look it over but it gets really frustrating trying 10s of terms to find the one that has decent actual emulation and won't get screwed up by my various switches/vendor kit. | 16:45 | |
timo | yeah | ||
skids | I actually got desparate enough to hack quick-select support into pterm just to call it a day. | 16:46 | |
16:46
mr-foobar left
|
|||
teatime | libvte is indeed cruminess. I was happy with urxvt for a long time. now I mostly just use xterm. | 16:47 | |
timo | what's quick-select again? | ||
skids | The second cut and paste buffer in linux. | ||
(well X) | |||
timo | ah | ||
teatime | I need to figure out how to make ctrl+shift+pgup/pgdn scroll in tmux (or screen) | ||
timo | i'm currently using mate-terminal, but it's got the worst crap for copy-paste | ||
where when you copy something it'll apparently only remember what part of the terminal you selected | 16:48 | ||
and when you paste it just takes whatever is at that spot at that very moment | |||
skids | Ow. | ||
teatime | lol, wow. wtf? | ||
timo | so good luck copy-pasting across like channels in weechat or something | ||
stmuk | I quite like the smaller vte stuff like roxterm or sakura | ||
timo | oh, on my desktop i actually use konsole | ||
that doesn't have this problem | 16:49 | ||
16:49
mcmillhj joined
16:50
imcsk8_ left,
mr-foobar joined
|
|||
bdmatatu | timo: Thanks, fixed | 16:51 | |
16:54
mcmillhj left
16:57
kannan left
16:59
pmurias joined
|
|||
pmurias | timo: re estimating grant hours, you might consider that stuff that work you don't anticipate will be neccessary | 17:01 | |
17:01
mcmillhj joined,
nadim left
|
|||
timo | i'll probably have to do more work than i asked for | 17:02 | |
but the amount of money i'm asking for is already alot | |||
17:06
mcmillhj left
|
|||
timo | i hope community people find my application worthwhile | 17:08 | |
17:11
HoboWithAShotgun left,
HoboWithAShotgun joined
|
|||
timo | plenty of perl5 people, too. who might not be so fond of perl6 in general? | 17:13 | |
17:13
headcase left,
headcase joined
17:14
mcmillhj joined
|
|||
Zoffix | IME s:g/Perl\s*6/Rakudo/ helps the fondness in those cases | 17:14 | |
17:15
HoboWithAShotgun left
|
|||
timo | i put Rakudo Perl 6 in the title at least | 17:15 | |
17:18
headcase left
17:20
mr-fooba_ joined
17:23
HoboWithAShotgun joined,
mr-foobar left
|
|||
HoboWithAShotgun | can i have aliases in signatures? such as foo(alpha=>45) is the same as foo(α=>1) ? | 17:25 | |
jnthn | :alias(:$name) | 17:26 | |
Zoffix | m: sub foo (:alpha(:$α) = 45) { dd $α }; foo :42alpha; foo :70α; foo | 17:29 | |
camelia | Int $α = 42 Int $α = 70 Int $α = 45 |
||
timo | Zoffix: you mentioned you'd also find 3k acceptable, but i somehow ended up with 6k; does that still sound good? | 17:32 | |
Zoffix | timo: I'd need to more thoroughly read the proposal. What's the link again? | 17:33 | |
timo | docs.google.com/document/d/102h_Nl...iufphxvxhj | ||
i'll surely take at least 200 hours, hopefully not terribly much more | |||
HoboWithAShotgun | allright. so using "multi sub prefix:<△>(List $list) returns Math::Triangle" I can now write say (△(α => 75°, c => 3, b => 3) ).beta; #prints 52.5° | ||
I would like to get rid of the inner parens | 17:34 | ||
or maybe even the outer ones | |||
Zoffix | HoboWithAShotgun: .beta.say with △ α => 75°, c => 3, b => 3 | 17:35 | |
HoboWithAShotgun: .beta.say with △ α => 75°, :3c, :3b | |||
:) | |||
HoboWithAShotgun: oh, wait, it'd help if I read the actual code lol :P | 17:36 | ||
HoboWithAShotgun | :3b? what kind of black magic is that again | ||
Zoffix | HoboWithAShotgun: .beta.say with △ "α" => 75°, "c" => 3, "b" => 3 | ||
HoboWithAShotgun: basically, without quotes there, it's getting passed as a named arg. | |||
HoboWithAShotgun: :3b is the same as b => 3 | 17:37 | ||
skids | HoboWithAShotgun: It's for stuff like :3rd | ||
Zoffix | You can use any non-negative integer there | ||
huggable: colonpairs | |||
huggable | Zoffix, All the shortcuts of colonpairs: twitter.com/zoffix/status/839807414211854337 | ||
Zoffix | HoboWithAShotgun: ^ lots of good stuff there | ||
skids | Anyway probably you want a slurpy rather than List $list. Which one depends on how you want to handle flattening. | 17:39 | |
HoboWithAShotgun | skids, i am just routing the arguments to the triangle operator to call the Math::Triangle constructor | 17:41 | |
Zoffix | Oh yeah, you need a slurpy there too. And if you use a named arg slurpy, you won't need to deal with the quoting business | 17:42 | |
HoboWithAShotgun | i'm doing this multi sub prefix:<△>(List $list) returns Math::Triangle is export( :operators ) { return Math::Triangle.new( |%$list ); } | 17:43 | |
works fine | |||
what benefit would i get from using a slurpy? | 17:44 | ||
17:47
_28_ria left
17:48
headcase joined
|
|||
Zoffix | HoboWithAShotgun: and you get a list of three pairs? | 17:48 | |
m: sub prefix:<♥> (List $l) { dd $l }; ♥(a => 42, b => 70) | |||
camelia | List $l = $(:a(42), :b(70)) | ||
Zoffix | Ah, I see. It's not a sub call :D | 17:49 | |
HoboWithAShotgun: the slurpy will let you get rid of the parens ther | |||
17:49
headcase left
|
|||
Zoffix | m: sub prefix:<♥> (*%l) { dd %l.list }; ♥ a => 42, b => 70 | 17:49 | |
camelia | WARNINGS for <tmp>: Useless use of "b => 70" in sink context (lines 1, 1) Too many positionals passed; expected 0 arguments but got 1 in sub prefix:<♥> at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
Zoffix | never mind. I don't have a clue what I'm talking about :) | ||
HoboWithAShotgun | loser | 17:51 | |
;-) | |||
allright, i gonna let that sink | |||
have a good day everybody. tx for the input | |||
17:51
HoboWithAShotgun left
17:52
nadim joined
|
|||
Zoffix | m: multi postfix:<°> { $^a }; multi prefix:<△> (*@things) is looser(&[,]) { class Triangle { has $.things; method beta { $!things.perl.uc } }.new: :@things }; .beta.say with △ α => 75°, c => 3, b => 3 | 17:54 | |
camelia | $[:Α(75), :C(3), :B(3)] | ||
Zoffix | .tell HoboWithAShotgun managed to make it work without parens (and slurpy slurps the things): multi postfix:<°> { $^a }; multi prefix:<△> (*@things) is looser(&[,]) { class Triangle { has $.things; method beta { $!things.perl.uc } }.new: :@things }; .beta.say with △ α => 75°, c => 3, b => 3 | 17:55 | |
yoleaux | Zoffix: I'll pass your message to HoboWithAShotgun. | ||
17:56
zakharyas joined
18:01
firefish joined
18:04
virtualsue left,
cdg left
18:05
knobo joined
18:10
virtualsue joined
18:11
_28_ria joined
18:12
knobo left,
ChoHag left
|
|||
Zoffix | timo: I'd suggest beefing up the benefits and explanation what will be happening. List benefits to Rakudo core devs, since this stuff will help us make more perf improvements. Add some "Terms" section that has 1-sentence explanation for all the fancy-pants terms like OSR, decont, spesh, jit. | 18:12 | |
18:13
wamba joined
|
|||
Zoffix | timo: basically, I've no idea what the work involved is gonna look like. If it costs 6G, it's fine. But right now to the reader who's not intimately familiar with the interals, it just reads like a wall of acronyms and buzz words, and all they walk away with is there'll be an optimizer program at the end of the 6G. If you'd describe the challenges and problems that need to be solved in more detail, I think | 18:15 | |
it'd help convince more people. | |||
18:16
grondilu left
|
|||
Zoffix | my 2 cents :) | 18:16 | |
Also, you have left-over hours information in "A framework for embedding "domain knowledge" into the GUI, so that common patterns can be pointed out to the user [5h; sum: 9h]" | 18:17 | ||
Zoffix & | 18:20 | ||
18:24
domidumont left
18:26
leont joined
18:29
espadrine joined
18:32
mr-fooba_ left
18:35
andrzejku joined
18:36
mr-foobar joined,
leont left
18:37
andrzejku left
18:39
andrzejku joined
18:41
nadim left
18:52
Cabanossi left
18:53
nige left
18:54
Cabanossi joined,
nige joined
18:55
Zoffix left
19:01
pmurias left
19:03
pmurias_ joined
19:04
vendethiel- left
19:07
Ven`` joined
19:09
nadim_ joined
19:14
nadim joined,
darutoko left
19:16
nadim_ left
19:18
firefish left
19:19
nadim left
19:24
headcase joined
19:25
pecastro left
19:26
pecastro joined
19:29
headcase left
19:30
lostinfog joined
19:32
awwaiid left
19:33
pecastro left
19:36
headcase joined,
Cabanossi left
19:37
dwarring joined
19:38
andrzejku left
19:39
Cabanossi joined
|
|||
Geth | ecosystem: fdc74f49c9 | (Jonathan Stowe)++ | META.list Add MQ::Posix See github.com/jonathanstowe/MQ-Posix |
19:40 | |
19:43
lostinfog left
|
|||
skids | -E_NEED_CAFFEINE_TO_GET_CAFFEINE | 19:46 | |
19:48
pecastro joined
19:52
davidfetter joined
|
|||
davidfetter | hi | 19:52 | |
i know it sounds insane, but i'm looking to embed perl6 in a C program (well, a PL for PostgreSQL) | 19:53 | ||
is that a thing? | |||
moritz | davidfetter: since Inline::Perl6 exists in Perl 5, I'm sure it's possible | 19:54 | |
davidfetter | docs.perl6.org/language/nativecall <-- kinda the opposite way 'round | ||
19:55
zakharyas left
|
|||
timo | moritz: the thing is that Inline::Perl6 just replaces the perl5 process with a perl6 process that includes the rest of the program with Inline::Perl5 :) | 19:58 | |
davidfetter | somebody page Rube Goldberg | ||
perhaps PL/npq might be a better plan | 19:59 | ||
20:01
headcase left
20:05
headcase joined
20:06
bdmatatu left
|
|||
timo | you can always build an evalserver that takes code on a socket and puts its results back | 20:07 | |
moritz | timo: so what? it works :-) | ||
20:09
headcase_ joined
|
|||
davidfetter generally used to working on PostgreSQL, where we are starting to care more and more about cache misses | 20:09 | ||
(not that we ever *didn't* care, precisely...) | |||
20:12
adu joined,
adu left,
headcase left
|
|||
skids | Well, you can pass Perl6 callbacks into NativeCall code, right? So... just flip the paradigm :-) | 20:14 | |
BooK | s: Bool.WHICH | 20:15 | |
SourceBaby | BooK, Something's wrong: ERR: Cannot resolve caller sourcery(ObjAt); none of these signatures match: ($thing, Str:D $method, Capture $c) ($thing, Str:D $method) (&code) (&code, Capture $c) in block <unit> at -e line 6 | ||
20:15
TEttinger joined
|
|||
BooK | (not sure how that s: thing works) | 20:15 | |
20:15
eliasr left
|
|||
geekosaur | I don't think it works with that anyway, methods like .WHICH are magic (actually "macros" wired into the compiler) | 20:16 | |
BooK | m: .WHICH.say for Bool.^enum_value_list, Order.^enum_value_list; | 20:17 | |
camelia | List|75139120 List|75139312 |
||
geekosaur | s: Bool, 'WHICH' | ||
SourceBaby | geekosaur, Sauce is at github.com/rakudo/rakudo/blob/f925.../Mu.pm#L24 | ||
BooK | m: .WHICH.say for |Bool.^enum_value_list, |Order.^enum_value_list; | ||
camelia | Bool|0 Bool|1 Order|0 Order|1 Order|2 |
||
geekosaur | huh it does handle that | ||
s: Bool, 'WHAT' | |||
SourceBaby | geekosaur, Something's wrong: ERR: Type check failed in binding to parameter '&code'; expected Callable but got Nil (Nil) in sub do-sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 42 in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 33 in block <unit> at -e line 6 | ||
BooK | mmm, isn't lizmat's patch for Enumeration applied yet? | ||
m: say Order::Same.WHICH, Bool::True.WHICH | 20:18 | ||
camelia | Order|1Bool|1 | ||
geekosaur | guess .WHICH is normal, it's just .WHAT and such | ||
that's the right commit for the patch | 20:19 | ||
skids | .WHICH can be macro/syntactical and code should assume it might be. But it can also be a method. | ||
timo | moritz: i wanna see you build the Perl6/PL that replaces the postgres server process :P | ||
BooK | what's f925c6 in camelia's answer? I assumed the rakudo or more commit, but don't seem to be either | 20:20 | |
skids | geekosaur: rgrep "brain pretzels" specs/ | 20:21 | |
ugexe | rakudo commit | ||
moritz | BooK: it's a short commit ID in the rakudo repo | ||
geekosaur | it's a rakudo commit hash | ||
well, a prefix of one. a full commit hash is quite long | |||
everything shortens it to a prefix, you do not have to use a specific length | 20:22 | ||
BooK | ah I didn't do a pull :-S | ||
geekosaur: I have some git knowledge, yes :-) | |||
geekosaur | skids, the point was more about whether CoreHackers::Sourcery would handle t | 20:23 | |
aka SourceBaby | |||
BooK | what have I done? It seems Enumeration is getting a lot of attention these days | ||
geekosaur | so I tested it and was surprised when it worked, then tried .WHAT and it expectedly couldn't find its butt | 20:24 | |
BooK | oooh, Enumeration.WHICH now contains the index, if I understood correctly | 20:25 | |
wamba | m: say (1,2) === (1,2) | 20:27 | |
camelia | False | ||
20:28
cdg joined
20:29
cdg left
20:30
cdg joined
20:31
cdg left,
cdg joined
|
|||
wamba | m: dd (set(1),set(2)) X(&) set(2), | 20:35 | |
camelia | (set(set(1),set(2)), set(set(2))).Seq | ||
BooK | trying to compile rakduo ac8e099bad7c11c724c290ec557e3426f180088d gives me: | 20:42 | |
Stage mast : No registered operation handler for 'threadlockcount' at gen/moar/stage2/QAST.nqp:1576 (/home/book/src/perl6/rakudo/install/share/nqp/lib/QAST.moarvm:compile_op) | |||
20:42
rindolf left
|
|||
skids | BooK: maybe MoarVM and nqp need updates. | 20:43 | |
BooK | oh, I thought that was automated | ||
skids | depends on what you are building it with. | 20:44 | |
Geth | ecosystem: da5203cb58 | (Jonathan Worthington)++ (committed using GitHub Web editor) | META.list Add Cro::TLS |
20:47 | |
20:50
cdg_ joined
20:51
Cabanossi left
20:52
headcase_ left
20:53
|oLa| joined,
cdg left
20:54
Cabanossi joined
|
|||
skids | .tell SmokeMachine github.com/skids/roast/tree/assuming_callable has tests for Whatever.assuming in S06-currying/positional.t | 20:56 | |
yoleaux | skids: I'll pass your message to SmokeMachine. | ||
BooK | m: .WHICH.say for Less..More | 20:57 | |
camelia | Int|-1 Int|0 Int|1 |
||
BooK | m: .WHICH.say for Less...More | ||
camelia | Order|0 Order|1 Order|2 |
||
BooK | Less...* sadly is an infinite list ending with infinitely many Order::More | 20:58 | |
21:07
skids left
21:08
headcase joined
|
|||
Altreus | So the famous perl6 fib sequence is «1, 1, * + * ... *», but how do I do that *+* thing with multiplication instead of addition? | 21:16 | |
Do I have to expand it to (@fib Z<*> @fib[1..*]) ? | |||
er, Z* | |||
tadzik | m: my $a = 1, 1, *** ...*; say $a[^5] | 21:17 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Missing required term after infix at <tmp>:1 ------> 3my $a = 1, 1, *** ...*7⏏5; say $a[^5] expecting any of: prefix term |
||
tadzik | bah | ||
well, that would work too: | |||
m: my $a = 1, 1, { $^a * $^b } ...*; say $a[^5] | |||
camelia | (timeout)Potential difficulties: Useless use of ... in sink context at <tmp>:1 ------> 3my $a = 1, 1, { $^a * $^b } ...7⏏5*; say $a[^5] |
21:18 | |
SmokeMachine | skids: great! thanks! | ||
yoleaux | 20:56Z <skids> SmokeMachine: github.com/skids/roast/tree/assuming_callable has tests for Whatever.assuming in S06-currying/positional.t | ||
tadzik | hm | ||
SmokeMachine | Ill continue to try to fix that when I arrive at home... | 21:19 | |
tadzik | m: my @l = 1, 3, { $^a * $^b } ... *; say @l[^5] # that's better | ||
camelia | (1 3 3 9 27) | ||
timo | m: my $a = 1, 1, * * * ... *; say $a[^5] | 21:21 | |
well, that'll just be a list of ones | |||
camelia | (timeout)Potential difficulties: Useless use of ... in sink context at <tmp>:1 ------> 3my $a = 1, 1, * * * ...7⏏5 *; say $a[^5] |
||
tadzik | yup | ||
SmokeMachine | m: my $a = (2, 3, * * * ... *); say $a[^5] | ||
camelia | (2 3 6 18 108) | ||
timo | oh, yes, $a on the lhs | 21:22 | |
we would have wanted @ on the lhs or the parens SmokeMachine gave | |||
21:22
headcase left,
setty1 left
21:23
hankache joined
|
|||
SmokeMachine | m: my $a = (2, 3, * × * ... *); say $a[^5] | 21:24 | |
camelia | (2 3 6 18 108) | ||
21:25
mcmillhj left
21:33
headcase joined
21:34
pmurias_ left
21:38
headcase left
|
|||
Altreus | I thought I tried that! | 21:45 | |
21:47
zacts left
21:55
hankache left
|
|||
Altreus | what do I read to understand this? my @fact = [\*] 1..*; | 21:56 | |
21:56
orac1e_ joined
|
|||
Altreus | specifically this \* in the operator | 21:56 | |
timo | it's a triangle reduce rather than a regular reduce | 21:57 | |
(because the [\ looks a bit like a triangle) | |||
Altreus | oh interesting | 22:03 | |
timo | some languages call it "produce" | ||
22:07
ShalokShalom left
22:08
headcase joined
22:09
telex left
22:11
telex joined
|
|||
Altreus | I found the docs that explained it :) | 22:13 | |
it was pretty obvious once I simply removed it :P | |||
timo | it'd be nice if [\ would give you an entry immediately, but when you "use web search" you immediately get the right answer, too | 22:16 | |
but it's got a big red background as if "you did something wrong" | |||
and it would probably be cool if reduce-[ ] and produce-[\ ] also showed up on the page for [ ] | 22:22 | ||
i think i'll open a doc issue | 22:23 | ||
22:24
perlpilot left,
headcase left
22:30
Skarsnik left
22:38
Cabanossi left
22:39
Cabanossi joined
22:40
espadrine left
22:42
mcmillhj joined
22:46
mcmillhj left
22:53
orac1e_ left
22:57
mcmillhj joined
22:58
nadim joined
23:00
headcase joined
23:01
skids joined
23:05
headcase left
23:06
mcmillhj left
23:18
margeas left
23:19
nadim left
23:22
Cabanossi left
23:24
Cabanossi joined
23:27
musca` left
23:34
cdg joined
23:37
cdg_ left
23:38
cdg left
23:41
musca joined
23:44
vendethiel- joined
23:45
imcsk8 joined,
Ven`` left,
MasterDuke_ joined
23:46
MasterDuke left
23:58
orac1e_ joined
|