»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend! Set by masak on 12 May 2015. |
|||
pink_mist | Ben_Goldberg: did you watch youtu.be/JpqnNCx7wVY yet? I'd recommend to watch it if you're looking into these kinds of things | 00:00 | |
Zoffix | Is there an easy way to upgrade? I've got rakudobrew installed and an who-knows-how-old version of P6... How do I get the latest and greatest? rakudo HEAD if possible? | 00:01 | |
00:01
ilbelkyr_ joined
|
|||
timotimo | if it's very old, you may want to rakudobrew self-update (or is it self-upgrade?) | 00:01 | |
and then just rakudobrew build moar should give you HEAD | |||
Zoffix | Thanks. | ||
(it's rakudobrew self-upgrade) | 00:02 | ||
timotimo | mhm | ||
00:04
TEttinger joined
00:06
laouji joined
|
|||
Zoffix | pink_mist++ That's a good vid I'll definitely watch. What nick is Jonathan Worthington BTW? (to put the face to the name) | 00:09 | |
pink_mist | jnthn | 00:10 | |
Zoffix | Thanks :) | ||
00:10
laouji left
00:11
[Tux] left,
khw left
|
|||
dalek | oblem_solver_tutorial: 0bb860d | (Herbert Breunung)++ | chapter/text0.md: reedit chapter 0 paragraph 2 |
00:19 | |
oblem_solver_tutorial: be15397 | (Herbert Breunung)++ | .gitignore: ignoring backup files |
|||
oblem_solver_tutorial: 8e2fb0f | (Herbert Breunung)++ | / (7 files): linking all chapter |
|||
00:19
ilbelkyr left,
ilbelkyr_ is now known as ilbelkyr
00:20
[Tux] joined
|
|||
Ben_Goldberg | Unless I'm mistaken, 'whenever' is un-cancellable. The closest one could do, would be to store the Supply returned by IO::Async::Socket.listen into a variable, and make a second Supply; .tap the first supply and have it emit into the second supply; then use 'whenever' on the second supply, and later call .done on the second supply. | 00:23 | |
unless of course whenever returns some sort of cancellation object which I'm unaware of. | 00:24 | ||
pink_mist | Ben_Goldberg: doc.perl6.org/type/IO::Socket::Async <-- both of the two large code blocks in the beginning of this seem to show how to close/stop a whenever | 00:34 | |
00:34
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
pink_mist | the first with $conn.close, the second with done; | 00:34 | |
maybe the $conn.close doesn't close it though | 00:36 | ||
but the done one certainly seems to | |||
00:43
laouji joined,
laouji left
00:44
tony___ left
|
|||
timotimo | whenever returns a supply, IIRC | 00:49 | |
um | 00:50 | ||
i just went to doc.perl6.org and the search bar was gone | |||
then i ctr-r'd and it appeared | |||
i wonder if it works fine for first-time visitors | |||
oh, wait | 00:51 | ||
the supply block returns the supply; whenever can only be inside a supply (or a react) block | |||
anyway. the whenever is cancellable from the inside by last-ing | 00:52 | ||
pink_mist | oh. so I was /almost/ right when I said LAST earlier :P | 00:53 | |
... is react/whenever properly documented somewhere? I can't seem to find good docs for them | |||
timotimo | yeah, except LAST is the phaser that fires when you last out of it or the last iteration happened | ||
pink_mist | just the incidental mention of them in IO::Socket::Async | ||
yeah I know | |||
00:54
thou left
|
|||
timotimo | hm, whatever happened to the S17 draft thing jnthn had | 00:54 | |
gist.github.com/jnthn/a56fd4a22e7c43080078 | |||
no mention of "react" yet | 00:55 | ||
but react is basically a shorthand for "await supply { ... }" or something similar | |||
00:57
llfourn joined
|
|||
Zoffix | Mind. Blown. | 01:04 | |
01:04
TingPing left
|
|||
Zoffix | jnthn++ very nice talk. Like your accent too. | 01:04 | |
Wow. Perl 6 really blows my mind. It's pretty revolutionary. | 01:05 | ||
01:06
Kcop left
|
|||
timotimo | peh. everything perl 6 can do, lisp could already do ~40 years ago | 01:07 | |
Zoffix | Dunno... the whole await stuff (youtu.be/JpqnNCx7wVY) really makes questions like this one utterly ridiculous: www.quora.com/Perl-programming-lan...body-care/ | 01:09 | |
Ben_Goldberg | pink_mist, In the first of those code blocks in IO::Socket::Async, the $conn.close does not stop the listening socket, but rather closes one accept()ed connection. | 01:15 | |
pink_mist | Ben_Goldberg: yes, I realised. I already said I was wrong. | 01:16 | |
ShimmerFairy | Am I wrong, or is Perl 6 one of the only languages to provide built-in async support that goes beyond what other languages provide? (That is, beyond just primitive stuff, and/or having to resort to various libraries?) | 01:25 | |
01:27
yqt left,
nuc_ joined,
nuc left
|
|||
awwaiid | mmm. "libraries" can get pretty fuzzy. OTP languages (Erlang, Elixir) have a whole lot of async for example | 01:28 | |
pink_mist | I think Erlang might still be better at async/concurrency/paralellism than p6, but not by much | ||
ShimmerFairy | Yeah, I really hope I'm wrong about that, since it would seem like other languages have had some time to focus on just async :) | 01:29 | |
awwaiid | I'm not sure how important it is to be in the language vs in a library, to a large extent. Though I guess if you do like clojure where most memory access is some form of software-transactional-memory then that helps... but more for consistency | 01:31 | |
Zoffix | I find panda' usage example is a bit too verbose with the whole $PATH_TO_PANDA business: fpaste.scsys.co.uk/paste | 01:33 | |
Looks messier in the terminal than the pastebin: i.imgur.com/DVd4BjX.png | 01:34 | ||
ugexe | because you are using a rakudobrew installed panda | 01:35 | |
Zoffix | Ah | ||
ShimmerFairy | Zoffix: your fpaste link doesn't seem to link to the thing you meant to | ||
Zoffix | Sorry, it should've been this: fpaste.scsys.co.uk/500065 | 01:36 | |
ShimmerFairy | Zoffix: I agree though, it should work off $*EXECUTABLE_NAME (or whatever it's called) instead. Call 'panda' what the user just did, imo :) | 01:37 | |
timotimo | especially the ".." in between ... *shudders* | ||
Zoffix | But it looks neat in the pastebin ('cause my browser is wide), but in the terminal it's a mess | ||
ugexe | add that full path/to/site/bin/panda to your path before rakudobrew | 01:38 | |
otherwise it literally is showing you what the user just did... run a shim that runs *that* command | 01:39 | ||
timotimo | oh, is that so? | ||
01:40
cibs_ joined
01:44
laouji joined,
cibs left
01:45
ilbot3 left
01:46
ilbot3 joined
01:49
laouji_ joined,
laouji left
02:05
sufrostico left
02:08
tokuhirom joined
02:09
eliasr left
02:13
kaare_ joined,
chenryn joined
02:14
FireFly left,
cibs joined
02:15
FireFly joined
02:18
FireFly left,
kid51 left
|
|||
M-tadzik | It seems to.me that using *WHATEVER_NAME here is more trouble than it's worth compared to just hardcoding “panda” | 02:19 | |
02:19
cibs_ left
|
|||
pink_mist | I can't say I know how shims work, but maybe the shim could set an env var with how it was called and that could be used instead? | 02:20 | |
02:23
vendethiel joined
|
|||
ShimmerFairy | M-tadzik: I can see the appeal in giving the correct path (esp. if you were typing out concrete, copy-paste style examples in usage, which isn't happening here incidentally), but I also think most people are clever enough to know to substitute 'panda' for the Right Thing :) | 02:24 | |
02:25
noganex joined
|
|||
MilkmanDan | Googling for "perl6" and "list" seems to have a lot more of the mailing- variety than it does data types. :) | 02:26 | |
Can someone familiar with the internals tell me if lists are a full fledged type now? | 02:27 | ||
ShimmerFairy | m: say (1,2, "foo", True).WHAT | ||
camelia | rakudo-moar 94d457: OUTPUT«(List)» | ||
[Coke] thinks he fixed a doc search bug. | |||
ShimmerFairy | MilkmanDan: we do in fact have a List type, if that's what you're asking :) | ||
[Coke] | MilkmanDan: doc.perl6.org/type/List | ||
MilkmanDan | ShimmerFairy: Is it the same kind as perl5? | ||
ShimmerFairy | MilkmanDan: safe bet is no, though I don't know P5 so I can't answer that question helpfully. | 02:28 | |
02:28
noganex_ left
|
|||
[Coke] | MilkmanDan: if you are coming from perl 5, you might want to read the 5-6 differences on the doc site. | 02:28 | |
doc.perl6.org/language.html - first few options. | 02:29 | ||
ARGLEBARGLE. I just got moar to crash on malloc building the docs. | |||
MilkmanDan | [Coke]: My knowledge of perl5 is minimal. | 02:30 | |
[Coke] | ... then don't worry if Perl 6 lists are like perl 5 lists. ;) | ||
MilkmanDan | [Coke]: I'm afraid I very much will worry about that. :) www.youtube.com/watch?v=zDJxgLe7JQo | 02:31 | |
M-tadzik | ShimmerFairy (IRC): yeah, good point | ||
02:31
cibs_ joined
|
|||
M-tadzik | Pull request welcome, I think :) | 02:31 | |
[Coke] | MilkmanDan: I'm not going to watch a 30m video; can you tl;dr it for me? | ||
pink_mist | MilkmanDan: that's just him not understanding perl5 | 02:32 | |
[Coke] | if it's "are the internals the same", the answer is a definite no. | ||
pink_mist | MilkmanDan: and no, perl6 lists don't work like that unless you tell them to | ||
MilkmanDan | [Coke]: Using perl5 lists considered hazardous. | ||
[Coke] | ok. this is perl6. You have a completely different set of things to worry about. | ||
ShimmerFairy | M-tadzik: ok, I've also got another fix in mind too :) ("panda help" being interpreted as trying to install package "help") | ||
MilkmanDan | pink_mist: Eh? What do you mean, not understanding? He successfully exploited list behavior. | ||
[Coke] | there are no internals in common. | 02:33 | |
pink_mist | MilkmanDan: yes, but all his complaints show that he don't understand how lists work in perl5. neither did the authors of the code he managed to break. that's why he managed to break it. | ||
M-tadzik | ShimmerFairy (IRC): oh yeah, that's a silly thing :) | 02:34 | |
MilkmanDan | pink_mist: I think it's a bit of a stretch to Blame The Programmer when we're talking about DBI, don't you? | ||
pink_mist | MilkmanDan: no, he was using utterly stupid interfaces to DBI. | ||
[Coke] | Anyway, please let us know if you have any Perl 6 questions. | ||
MilkmanDan | I see. | 02:35 | |
ShimmerFairy | M-tadzik: my fix for that would be to add the 'help' command, and to throw away 'panda [pkgname]' as a shortcut for the 'install' verb; if you have unadorned verbs for a tool like that, it's a bad idea to have that shortcut | ||
02:35
Ben_Goldberg left
02:36
cibs left
|
|||
ShimmerFairy | (if the verbs were instead --install, --info, etc., then naturally there wouldn't be an issue with that shortcut ☺) | 02:36 | |
pink_mist usually does `command -?` if he doesn't know how to use a command | 02:37 | ||
02:38
thou joined
|
|||
ShimmerFairy | My favorite is when 'command -h' responds with "unrecognized option" and tells you to use --help for the help :P | 02:38 | |
02:39
FireFly joined
|
|||
ShimmerFairy | M-tadzik: since panda uses the default usage, I'll fix it by adding a sub USAGE for it to use. | 02:40 | |
M-tadzik | Oh, right, it's inherently USAGE's problem | 02:41 | |
ShimmerFairy | M-tadzik: Not a worry, I figure panda is complex/important enough to deserve a more nicely written USAGE anyway :) | 02:42 | |
02:43
thou left,
leedo joined
02:44
leedo left
02:59
Cryptoknight joined
|
|||
Cryptoknight | Hello p6ers | 02:59 | |
trying to get a linux install going; stuck on a rakudobrew command - 'rakudobrew build-panda' - the rakudobrew I'm using expects a version number, and I have no idea what to use. | 03:01 | ||
03:04
Cryptoknight left
03:05
Cryptoknight joined
|
|||
dalek | c: b306073 | coke++ | htmlify.p6: Don't stop processing too early. |
03:05 | |
03:07
z8 left
03:14
cibs joined
|
|||
MilkmanDan | pink_mist: Well, being a bear of little brain myself I'm hoping to avoid making those same mistakes, as I expect my code to have to touch the scary Internet. | 03:18 | |
03:18
cibs_ left
|
|||
MilkmanDan | And I don't kid myself that I'm going to be smarter than the authors of DBI or Bugzilla or whatever. | 03:18 | |
03:22
Cryptoknight left
|
|||
pink_mist | MilkmanDan: it's not about being smarter, it's about using good APIs ... for example, DBI's ->quote is absolutely horrible and should be avoided at all costs. that the authors of some projects didn't do that is their own fault. if I see a codebase that use DBI's ->quote except in very very controlled conditions, I'd never use that software. and about CGI.pm, that's been discouraged for literally more than a decade. better alternatives have been available for | 03:22 | |
years and years | |||
03:23
Cryptoknight joined
|
|||
MilkmanDan | pink_mist: But the list behavior is still present, yes? | 03:23 | |
So I'd need to avoid stepping on that particular landmine. | |||
pink_mist | MilkmanDan: if you understood how perl5 does lists, it wouldn't be surprising at all, and actually very useful if used properly | ||
MilkmanDan: but this really isn't a discussion to have in #perl6 | 03:24 | ||
MilkmanDan | Well, I'd like to know if this particular landmine is still present in perl6. | 03:25 | |
Since I think we're still going to be waiting a bit for the new llama and camel books I don't expect to have a guide telling me where not to step for a little while. | 03:26 | ||
M-tadzik | Cryptoknight (IRC): what do you mean by “expects a version number?” | 03:27 | |
03:28
vendethiel left
|
|||
ShimmerFairy | MilkmanDan: without having any P5 knowledge, it's safe to say that Perl 5 security/etc. concerns aren't relevant to Perl 6. Any issues P6 has are independent of anything in Perl 5, and vice versa. | 03:29 | |
pink_mist | 04:32 <pink_mist> MilkmanDan: and no, perl6 lists don't work like that unless you tell them to | 03:30 | |
MilkmanDan: I already answered that question of yours a long time ago' | |||
-' | |||
MilkmanDan | pink_mist: Ok. Thanks. | ||
pink_mist | (for those who may be wondering what attribute of perl5 lists we're talking about, it's the auto-flattening behaviour of them) | 03:32 | |
(combined with the fact that parameters to functions are by default lists) | 03:33 | ||
ShimmerFairy | pink_mist: that second one shouldn't be a concern with P6's "real" signatures, right? Or is my lack of P5 knowledge really showing? :P | 03:35 | |
pink_mist | ShimmerFairy: that's right | 03:36 | |
Cryptoknight | MilkmanDan: when I run './rakudobrew build-panda' it responds 'No version set' - the documentation does mention a version argument, but not much else. | 03:37 | |
sorry, I mean to reply to M-tadzik ! | 03:38 | ||
M-tadzik | Cryptoknight (IRC): you may need a “rakudobrew switch”, or “rakudobrew global”, to tell it which installation of rakudo you mean | ||
Cryptoknight | even if I just have one ? | 03:39 | |
M-tadzik | It should perhaps be made so that the first rakudo that gets installed becomes tge default | ||
Cryptoknight | that could be a nice touch! | ||
M-tadzik | Yeah, to my defense though you only need to do this once :) | 03:40 | |
Feel free to open a bug, that'll minimize the chance of me forgetting about it:) | |||
Cryptoknight | theoretically | ||
I'm not sure if it is a bug, or rather my unfamiliarity | 03:41 | ||
M-tadzik | I think ideally it should just work for you and you need not seek help :) | 03:42 | |
Cryptoknight | yes, but you know how these things so often go | 03:43 | |
ShimmerFairy | M-tadzik: added pull request, when you have time to look it over :) | 03:44 | |
M-tadzik | Cryptoknight (IRC): thanks, will do :) | 03:45 | |
pink_mist | . o O ( that was ShimmerFairy ) | ||
Cryptoknight | does build-panda require perl6 ? | 03:48 | |
M-tadzik | Yes | 03:50 | |
03:54
chenryn left
|
|||
Cryptoknight | ok, part of my problem was that I wasnt in bash, so I'm starting over | 04:02 | |
personally, I prefer zsh. | 04:04 | ||
m-tadzik, did you write the installation instructions by any chance ? | 04:05 | ||
04:13
adu joined
|
|||
Cryptoknight | anyway, to whoever did: thanks! good job, really. | 04:13 | |
04:19
laouji_ left
|
|||
tokuhirom | Why is .^add_method lower_case? | 04:19 | |
04:19
laouji joined,
laouji left,
laouji joined
|
|||
M-tadzik | Cryptoknight (IRC): I might have, but it could be one of the awesome contributors :) | 04:20 | |
04:20
binjoy joined
04:25
chenryn joined
|
|||
Cryptoknight | M-t: for all that you do, this post-increment is for you: ++ | 04:26 | |
04:26
thou joined
|
|||
M-tadzik | :) | 04:28 | |
04:31
thou left
04:32
TingPing joined,
binjoy left
04:34
thowe joined
|
|||
skids | tokuhirom: ^add_method is part of the MOP, which looks different than normal Perl 6 naming conventions, perhaps for the best. | 04:41 | |
tokuhirom | skids: ah. i see! | 04:42 | |
skids | The ALLCAPS stuff is more for strange things you might normally do in the middle of normal code -- MOP things hopefuly will be more and more isolated as time goes on. | 04:44 | |
thowe | is "use v6;" still something that is done? | 04:56 | |
ShimmerFairy | You don't have to, but it's a good idea nonetheless :) | 04:57 | |
04:57
laouji left
|
|||
thowe | Is the explanation for why it's a good idea brief? | 04:58 | |
04:58
laouji joined
|
|||
ShimmerFairy | thowe: among other things, it's just a nice way of saying "this is definitely Perl 6", and it makes for a better error message if you try running it with Perl 5 by accident. | 05:00 | |
thowe | I'll buy that. | ||
ShimmerFairy | (and in the future, when we have newer versions of Perl 6, it'd of course serve as a way of saying which version of P6 you support) | ||
thowe | nice | ||
05:00
chenryn left
|
|||
Cryptoknight | I dunno. I never preface any conversations by saying I'm speaking English, or what regional version thereof, so it always seemed rather extraneous to me to say 'use v6' in my code | 05:01 | |
but the version supported thing is an excellent point. | 05:02 | ||
ShimmerFairy | It's really just like Perl 5's 'use v5.20.2' statement, but for Perl 6 :) | 05:03 | |
05:03
adu left
|
|||
thowe | I'm missing something about named arguments... | 05:04 | |
I get this... :named(35) | |||
but how can this work? :35named | 05:05 | ||
can't the 35 be anything? | |||
Also, I'm not sure if this doc is showing me the definition or the calling form... | |||
05:08
chenryn joined
|
|||
thowe | oh, there's a whole other doc on signatures... | 05:08 | |
there's a lot of language here... | |||
05:11
skids left
05:14
aborazmeh left
|
|||
[Coke] | :65foo is syntax that is to enable things like :3rd , and was genericized. | 05:20 | |
m: say :35.named.perl | |||
camelia | rakudo-moar 94d457: OUTPUT«5===SORRY!5=== Error while compiling /tmp/_bqT7gSVItMalformed radix numberat /tmp/_bqT7gSVIt:1------> 3say :357⏏5.named.perl expecting any of: number in radix notation» | ||
[Coke] | m: say :35named.perl | ||
camelia | rakudo-moar 94d457: OUTPUT«:named(35)» | ||
[Coke] | m: say :666beast.perl | 05:21 | |
camelia | rakudo-moar 94d457: OUTPUT«:beast(666)» | ||
05:30
Cryptoknight left,
Cryptoknight joined
05:40
[TuxCM] joined
|
|||
[TuxCM] | test 50000 34.462 34.352 | 05:51 | |
test-t 50000 35.271 35.162 | |||
\o/ way under 36 :) | |||
tux.nl/Talks/CSV6/speed4.html | 05:52 | ||
best I measured - ever | |||
05:58
bjz joined
06:04
bjz left,
diana_olhovik_ joined
06:05
itwalter joined
06:08
FROGGS left
06:09
FROGGS[mobile] joined
|
|||
FROGGS[mobile] | morning | 06:10 | |
.tell jnthn the MOP is fun btw | |||
yoleaux | FROGGS[mobile]: I'll pass your message to jnthn. | ||
06:15
thou joined
06:20
thou left
|
|||
dalek | ast: e361a0e | FROGGS++ | S02-types/subset.t: fix typo in type name |
06:21 | |
06:24
bjz joined,
FROGGS joined,
FROGGS[mobile] left
06:31
Cryptoknight left
06:32
Cryptoknight joined
06:35
domidumont joined,
firstdayonthejob joined
06:38
vytas left
06:39
Ven joined
06:44
vytas joined
07:00
z8 joined,
z8 left
07:01
[TuxCM] left
|
|||
lizmat | .botsnack | 07:05 | |
yoleaux | :D | ||
synbot6 | om nom nom | ||
yoleaux | 8 Oct 2015 21:21Z <FROGGS> lizmat: is it possible that you wait working on smileys (implementation wise, not test wise) until I've merged the MOP stuff? | ||
lizmat | I'll gladly postpone that :-) | 07:06 | |
FROGGS | :o) | ||
07:10
nuc_ left
|
|||
lizmat | .tell jdv79 you probably want to check with _itz_ about inclusion in the pl6anet.org feed | 07:17 | |
yoleaux | lizmat: I'll pass your message to jdv79. | ||
07:19
[TuxCM] joined
|
|||
lizmat | [TuxCM]: great to hear it's better, but I don't see exactly *why* that happened :-( | 07:20 | |
meanwhile, I see bare startup at 115 ~ 120 msecs again :-( | 07:21 | ||
07:25
firstdayonthejob left,
zakharyas joined
07:34
ely-se joined,
sivoais left
|
|||
masak | morning, #perl6 | 07:35 | |
lizmat | masak o/ | 07:36 | |
ely-se | hello world | ||
masak | hely-se :) | ||
ahoj, lizmat | 07:37 | ||
I would just like to say that 007 is moving forward quite nicely | |||
(and then be all mysterious about it and divulge nothing more) :P | |||
lizmat | .oO( I hear the movie is coming out soon :-) |
||
07:39
Ven left
07:41
Ven joined
07:43
sivoais joined
07:46
z8 joined
07:48
g5 joined
|
|||
FROGGS | *g* | 07:49 | |
ely-se | The next Perl should be Perl 007. | 07:51 | |
masak | actually, Perl 006 is already so advanced it's going to backport all features from 007 :P | 07:52 | |
07:53
sivoais left
07:55
patrickz joined,
sivoais joined
|
|||
ely-se | Wrote my first parser in Perl 5 yesterday. | 07:58 | |
07:59
RabidGravy joined,
jkva joined
|
|||
patrickz | .tell jdv79 (wrt your Blog post) Do you know about testers.perl6.org/ ? | 08:00 | |
yoleaux | patrickz: I'll pass your message to jdv79. | ||
Ven | ely-se: that's not the first one. Mill's was the first | ||
masak | ely-se: how was it? I find it a similar-but-different experience to writing a Perl 6 parser. | ||
08:03
thou joined
|
|||
chenryn | learning NativeCall, how to push a NULL into CArray.new? I don't know what's the NULL in Perl6? | 08:03 | |
08:04
sivoais left
08:05
sivoais joined
|
|||
ely-se | Ven: oh, hmm. :( | 08:06 | |
indeed :v | |||
Ven | ely-se: I remember :-). | ||
ely-se | masak: I used Parser::MGC which is very nice. | ||
Ven | ely-se: shoulda used faux-combinator/perl, told ya | ||
08:06
jkva left,
[Sno] left
08:07
thou left,
jkva joined
|
|||
ely-se | no | 08:08 | |
it's not on CPAN; CBA to figure out how to install it :P | |||
Ven | aw, true | ||
dalek | oblem_solver_tutorial: 3f2cb79 | lichtkind++ | menu.md: TOC test |
||
ely-se | also it passes a reference to push, which is experimental | 08:09 | |
masak .oO( CPAN or it didn't happen ) | |||
ely-se | Your code's bad and you should feel bad! | 08:10 | |
Ven feels bad | 08:11 | ||
ely-se | yay! | ||
Ven | even does it thrice :-). | ||
it felt good. | 08:12 | ||
dalek | oblem_solver_tutorial: 4bae7d7 | lichtkind++ | menu.md: TOC indent fix |
||
08:13
darutoko joined
08:14
sivoais left
|
|||
Ven | ely-se: am I supposed to @foo[@#foo] = $ref instead, btw? | 08:15 | |
08:15
sivoais joined
|
|||
Ven | err, $foo and $#foo. sigil variance... | 08:15 | |
masak | (this is #perl6) :P | 08:16 | |
08:16
antiatom left
08:17
Celelibi_ joined
|
|||
ely-se | no, push @$foo, $x; | 08:17 | |
08:18
Celelibi left,
patrickz left
|
|||
Ven | ely-se: fixeth | 08:21 | |
masak: sorry :-). | |||
08:22
antiatom joined
|
|||
jnthn | morning, #perl6 | 08:23 | |
yoleaux | 8 Oct 2015 21:25Z <FROGGS> jnthn: does nqp::settypecheckmode affect nqp::istype? | ||
06:10Z <FROGGS[mobile]> jnthn: the MOP is fun btw | |||
Ven waves | |||
what should be the namespace for MOP stuff? simply MOP? `use MOP::Ruby` *g* | |||
jnthn | chenryn: You push a type object of some kind (like if it's a CArray[SomeStruct] then just push (literally) SomeStruct) | ||
woolfy | o/ jnthn | ||
08:24
domidumont left,
sivoais left
|
|||
masak | jnthn++ # knowing the answer to that | 08:24 | |
jnthn: is it documented somewhere that type objects are the way to do NULL in NativeCall? | 08:25 | ||
Ven | \o woolfy | ||
08:25
domidumont joined
|
|||
jnthn | .tell FROGGS Yes, that's exactly what settypecheckmode controls the behavior of. And you probably want to set the type check mode to the same thing SubsetHOW does, and implement and accepts_type method that just does nqp::isconcrete | 08:25 | |
yoleaux | jnthn: I'll pass your message to FROGGS. | ||
FROGGS | jnthn: funnily I'm doing something wrong in a way that nqp::istype(Int:D, Int:D) is true in the Actions, but rightfully not true in user scripts | ||
yoleaux | 08:25Z <jnthn> FROGGS: Yes, that's exactly what settypecheckmode controls the behavior of. And you probably want to set the type check mode to the same thing SubsetHOW does, and implement and accepts_type method that just does nqp::isconcrete | ||
08:25
Ven left
08:26
sivoais joined
|
|||
jnthn | FROGGS: Did you (as CoercionHOW does) set up type canonicalization, so there's only ever One True Int:D? | 08:26 | |
FROGGS | jnthn: aye, after cloning the behaviour of CoercionHOW I came to the conclusion that I really want SubsetHow, and did that | ||
jnthn | No, you need to breed them! | ||
FROGGS | I... WAT? | ||
jnthn | So you get the type check behavior of SubsetHOW combined with the interning behavior of CoercionHOW | 08:27 | |
FROGGS | hmmmm | ||
okay | |||
jnthn | o/ woolfy | ||
.tell Ven In Rakudo it's exposed under Metamodel:: but in modules I've written that are MOP modules I've not tended to call that out in the module name. | 08:28 | ||
yoleaux | jnthn: I'll pass your message to Ven. | ||
jnthn | Who cares that Grammar::Tracer and OO::Monitors use the MOP? It's just how they do what it says on the tin :) | 08:29 | |
masak: Yes. | 08:30 | ||
In doc.perl6.org/language/nativecall both for strings and for other C-ish types | |||
jnthn wonders if we shouldn't just inline the win32 example linked at the bottom of that article | 08:31 | ||
It's probably the only real reason for the jnthn/zavolaj repo to continue to exist... | |||
masak | +1 on not calling out things as MOP just because they MOP | ||
jnthn | oh, there's a few more examples in there too | ||
Could maybe migrate to examples.perl6.org in the future | 08:32 | ||
dalek | ast: 52c04f4 | lizmat++ | S12-attributes/smiley.t: Add some more attribute smiley tests |
||
jnthn | Time for my Greek final... | ||
masak | I have another philosophical question, also prompted by 007 work: in `my $b = { ... };`, I would say `{ ... }` is a block literal. but is it in `if 2 + 2 == 4 { ... }` ? | ||
jnthn: "My Big Fat Greek Final" | 08:33 | ||
lizmat | masak: I would say, yes | ||
jnthn | Sigmas do look a bit on the chubby side... | ||
08:33
sivoais left
|
|||
jnthn | masak: Yes; as another data point both (preliminarily) compile into a QAST::Block also | 08:33 | |
masak | don't literals occur only in expressions, though? | ||
jnthn | Though they are a bit different | 08:34 | |
masak | yes, that's what I'm feeling | ||
jnthn | The first is blocktype declaration, the second blocktype immediate | ||
Because you have to distinguish | |||
if foo { bar } else { baz } | |||
from | |||
masak | oh, and `{ ... }` as a standalone statement is also blocktype immediate, right? | ||
jnthn | foo ?? { bar } !! { baz } | ||
masak: yes | |||
08:35
laouji left,
laouji joined,
espadrine joined
08:36
sivoais joined
|
|||
masak | ok. in 007, immediate blocks are simply Q::Statement::Block. so maybe that's what should go in an `if` statement, then, and not Q::Literal::Block... | 08:36 | |
08:37
rurban joined
|
|||
jnthn | m: say Uni.new(0x03A3, 0x03C3, 0x03C2).Str | 08:38 | |
camelia | rakudo-moar 94d457: OUTPUT«Σσς» | ||
masak | what makes it extra weird is that once you've said "no, `if` is a special form so it can't contain a literal", someone else goes, "ah, but what if it were defined as a macro?" | ||
jnthn | I guess the difference here is that at QAST level we don't care if you wrote if, unless, and, or, &&, ||, a ternary...they're all QAST::Op if/unless | 08:39 | |
But at the leavel you're working you do care | |||
masak | yeah | ||
I want to care in a way that feels consistent and makes sense | 08:40 | ||
"literals can only go in expressions" makes sense to me, but it's not the only possible way to make the distinction | |||
*structurally*, it feels slightly better to say that an `if` statement is (Q::Expr, Q::Statement::Block) than (Q::Expr, Q::Literal::Block) | 08:42 | ||
though I can't really put my finger on why | |||
08:44
sivoais left
08:46
sivoais joined
|
|||
dalek | ast: 382fa02 | jnthn++ | S32-str/lc.t: More complete final sigma tests. |
08:47 | |
RabidGravy | morning! | 08:49 | |
lizmat | RabidGravy o/ | 08:51 | |
jnthn | o/ RabidGravy | 08:52 | |
08:53
Cryptoknight left
08:54
Cryptoknight joined,
sivoais left
08:56
sivoais joined
|
|||
RabidGravy | are we all winning this fine morning? | 08:57 | |
lizmat | so far :-) | 08:58 | |
09:00
FireFly left
|
|||
RabidGravy | fabulous! | 09:02 | |
09:04
sivoais left
09:05
FireFly joined
09:06
sivoais joined,
spider-mario joined
09:08
jkva left
09:11
domidumont left
09:12
domidumont joined
09:14
sivoais left
|
|||
masak | Wikipedia says "In computer science, a literal is a notation for representing a fixed value in source code." | 09:14 | |
jnthn uses up his monthly goto | 09:15 | ||
masak | there's a certain sense in which the `if` code block is not "a fixed value in source code", the way a block literal assigned to a variable is | ||
in the sense of "a first-class value". | |||
jnthn | masak: And neither is a fixed value | ||
masak: Thanks to closure semantics. | 09:16 | ||
09:16
Cryptoknight left,
sivoais joined
|
|||
masak | arguably the thing that is fixed is the reference to the code block. | 09:17 | |
09:17
Cryptoknight joined,
ely-se left
|
|||
masak | as in, you could declare the block literal as a `const` (in ES6, say), and changing a value that the block closed over would still be allowed. | 09:19 | |
(because the block "itself" didn't change) | |||
very similar to how you can declare a `const obj = { x: 42 };` and then go `obj.x = 5;` | |||
09:21
ely-se joined
09:22
ecocode joined
|
|||
masak | (and if that seems wrong to you, on an intuitive level, you're not alone. it kind of sucks. fixing it is still an open research topic.) | 09:22 | |
09:24
sivoais left
09:25
TEttinger left
|
|||
jnthn | masak: That's one of those "all the solutions make things worse" areas at the moment... | 09:25 | |
masak | aye | 09:26 | |
09:27
sivoais joined
|
|||
masak | I believe I have seem glimpses of the final answer to it -- immutability, borrowed pointers, linear types -- but the tradeoffs currently seem too harsh. | 09:27 | |
09:28
antiatom left
|
|||
jnthn | I think Clojure does something interestingish there (pervasive use of persistent data structures) | 09:29 | |
09:29
Psyche^_ joined,
Cryptoknight left,
domidumont left
09:30
Cryptoknight joined
|
|||
masak | aye | 09:30 | |
09:31
domidumont joined
|
|||
masak | but even with persistent data structures, you have to have a really good notion of "who owns what" and "what contains what" | 09:31 | |
jnthn | *nod* | ||
We have a couple of xmas RTs on readonlyness that I suspect are going to be rejected along these lines. | 09:32 | ||
(In the list 'cus we need to make a decision that we're not taking the problem on.) | |||
09:32
antiatom joined
09:33
Psyche^ left
09:34
kipd left,
olinkl left,
SmokeMachine_ left,
sivoais left
|
|||
btyler | timotimo: re "no need to go onto seperate thread" in gist.github.com/kanatohodets/04c34...5db983d6dc -- I'm less interested in having a CPU core, and more interested in CSP-style/golang style concurrency, where I can set up a goroutine/promise to hang out and react to what it is interested in independent of others | 09:36 | |
what I wrote there is very close to a go socket server pattern: 'go handle_client(connection)' and then a 'select' in handle_client | |||
09:37
riatre joined,
sivoais joined
|
|||
masak | jnthn: aye. to me it feels like the spec overpromises with things like "readonly one level down", without realizing that that's a tall order. | 09:38 | |
jnthn | Thankfully, they're only design docs, not a spec :P | 09:39 | |
Now, if we have spectests that want this behavior... :) | |||
09:39
telex left
|
|||
btyler | that said, maybe I'm doin' it wrong in that gist, since Moar gives me a 'I unwound the entire stack and there's no handler left!' when I disconnect clients, and the JVM doesn't want to consume data from the socket in handle-client | 09:40 | |
dalek | ast: 2b70f97 | jnthn++ | S32-str/uc.t: Add test for uc of precomposed lower -> NFG upper. Yet another fun case! |
||
09:40
telex joined
|
|||
dalek | p: be87a41 | jnthn++ | tools/build/MOAR_REVISION: Bump MOAR_REVISION for SpecialCasing handling. |
09:40 | |
kudo/nom: e97ba11 | jnthn++ | tools/build/NQP_REVISION: Bump for SpecialCasing support. |
09:41 | ||
kudo/nom: 2c1af83 | lizmat++ | src/core/Any-iterable-methods.pm: We don't need no scopes to grep |
09:42 | ||
lizmat | jnthn: do you have some juicy examples for the P6W ? | 09:43 | |
dalek | ast: cb062b4 | jnthn++ | S32-str/ (2 files): We now get uc of German Sharp S correct. |
||
ast: 57b8aa5 | jnthn++ | S32-str/lc.t: Unfudge tests for final sigma semantics. |
|||
jnthn | lizmat: S32-str/fc.t, plus the tests I just unfudged/added | 09:44 | |
lizmat | okidoki | ||
09:45
sivoais left
|
|||
lizmat | so, could we argue we have the best unicode support in the world now ? | 09:45 | |
jnthn | You can argue anything you want, though you might not win :P | 09:46 | |
We've still the "what is a grapheme" NFG issue to go | |||
And I'm sure we'll discover more weird cases in the future | |||
We can certainly say we're doing really pretty good on it, though :) | 09:47 | ||
ShimmerFairy | jnthn: is there any reason to think "extended grapheme cluster" won't cover everything? | ||
jnthn | ShimmerFairy: I meant weird cases in Unicode support more generally, not just NFG | ||
ShimmerFairy | ah :) | ||
09:47
sivoais joined
|
|||
jnthn | ShimmerFairy: Though we'll have things there too, just perhaps not around "what is a grapheme" | 09:48 | |
ShimmerFairy: I didn't yet fix the interaction of SpecialCasing and NFG, for example... | |||
ShimmerFairy | jnthn: one thing that's on my mind there is the CLDR. I really need to look into it sometime, but I suspect it's definitely worth a module :) | ||
jnthn | And while *that* issue I do know about and will take care of...there'll probably be things I didn't think of | ||
ShimmerFairy: Yeah, that'll go module space | |||
chansen_ | I was pleasantly surprised when I read about Strings in Swift 2, <developer.apple.com/swift/blog/?id=30> | ||
09:51
ecocode left,
thou joined
09:55
thou left
|
|||
jnthn | chansen_: Good they're also going in the "by character people mean grapheme" direction | 09:56 | |
09:56
sivoais left,
kipd joined,
olinkl joined
|
|||
jnthn | Not doing the synthetics thing we are, alas. | 09:56 | |
But still an improvement. | |||
chansen_ | True | ||
09:56
SmokeMachine_ joined
09:57
kipd left,
olinkl left,
SmokeMachine_ left,
rindolf joined
|
|||
literal | the link at the bottom of this page (and similar ones) is wrong: doc.perl6.org/type/Cool | 09:57 | |
"github.com/perl6/doc/raw/master/li.../Cool.pod" =~ s{raw/}{} to fix it | |||
09:58
sivoais joined
09:59
Cryptoknight left
10:00
Cryptoknight joined
10:01
jkva joined,
Ven joined
|
|||
jnthn | Anyways, that's the SpecialCasing ticket knocked off the xmas RT list :) | 10:03 | |
10:04
itwalter left,
SmokeMachine_ joined
10:05
antiatom left,
laouji left,
jkva left
|
|||
ely-se | special cases must die | 10:06 | |
10:06
sivoais left
|
|||
dalek | kudo/nom: 911cf4a | lizmat++ | src/core/native_array.pm: Don't need a my int $i to keep track |
10:06 | |
10:07
laouji joined
|
|||
jnthn | ely-se: When it comes to language, humanity seems hugely unconvinced about this :) | 10:07 | |
10:08
sivoais joined
|
|||
lizmat | .oO( I think we can make an exception for that :-) |
10:08 | |
jnthn | .oO( X::HumansSuck ) |
10:10 | |
10:12
antiatom joined
|
|||
gfldex | i would even go so far to say that mammals suck | 10:13 | |
ely-se | sucking is my hobby | ||
RabidGravy | :-O | 10:17 | |
btyler | jnthn: if you have spare brane for a concurrency question -- is something like this gist.github.com/kanatohodets/04c34...5db983d6dc in reasonable alignment with the concurrency design goals? | ||
10:17
sivoais left,
jkva joined
|
|||
btyler | e.g. handle a socket, toss it off to a promise, have that socket do it's own 'react' with a central supply to interact with other sockets | 10:17 | |
*its | |||
10:18
pippo joined,
sivoais joined
|
|||
btyler | I'm glad to hunt and golf breakage in async bits, just want to make sure I'm holding it the right way, and that the breakage isn't just LTA error handling on my broken design | 10:18 | |
jnthn | btyler: It's fragile because if there's a death in the Promise, nothing gets it | ||
Also, since the message bus is shared, I'd maybe put it's whenever in the top-level react block | 10:20 | ||
oh wait | |||
I misunderstood. It's fine :) | |||
You're doing a chat server like thing :) | 10:21 | ||
btyler | well, it's just a silly little example for go-style communicating processes | ||
jnthn | Oh, and that return is wrong | ||
btyler | go/erlang/whatever | ||
jnthn | Should be "done" | ||
btyler | oh, nice, that sounds much better | ||
jnthn | But yeah, I'd stick a CATCH in handle-socket just in case | 10:22 | |
btyler | re "nothing gets the failure" -- that sounds quite a bit like 'unwound the stack and nothing caught it, kaboom' | ||
awesome, I'll do that and then poke around to see if things are still fragile. thanks! | |||
jnthn | If so lemme know | 10:24 | |
10:24
jkva left
|
|||
dalek | kudo/nom: dca64b9 | jnthn++ | src/Perl6/Grammar.nqp: Toss <colonpair> case of trait. We're not doing this in 6.christmas. It may return in the future, but it caused some crappy errors while unimplemented, so for now we just kill it off entirely. |
10:24 | |
jnthn | There's at lesat one known cause of fragility in Moar that's on my todo list | ||
Though you have to be a little unlucky to hit it | 10:25 | ||
btyler | some of the ones I've bumped into are simple enough, usually just needs a little more robustness in the interaction with libuv | ||
dalek | ast: e5a0358 | jnthn++ | S32-exceptions/misc.t: Tests for RT #119763 and RT #117417. |
||
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=119763 | ||
btyler | double closing an async socket, for example | ||
10:26
sivoais left
10:27
andreoss joined
|
|||
andreoss | m: say [+] <3, 1, 4> x ** 2 | 10:28 | |
camelia | rakudo-moar 911cf4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/dh6ferwligTwo terms in a rowat /tmp/dh6ferwlig:1------> 3say [+] <3, 1, 4> x **7⏏5 2 expecting any of: infix infix stopper postfix statement end …» | ||
Zoffix | I recall someone mentioning dropping any performance stuff as a gist here... so... here: gist.github.com/zoffixznet/68c6b3bc85c70e291fd4 | ||
It goes up by about .5s more if I run the code from file instead of -e | 10:29 | ||
10:29
sivoais joined
|
|||
FROGGS | Zoffix: is Inline::Perl5 precompiled? | 10:29 | |
(I guess not, which might explain things) | 10:30 | ||
Zoffix | ¯\_(ツ)_/¯ | ||
FROGGS | *g* | ||
Zoffix | I just installed it with panda last night. | ||
FROGGS | and panda does not precompile anymore | ||
Zoffix | Ah | ||
jnthn | dca64b9 picked off one more xmas issue :) | ||
Zoffix | \o/ | ||
jnthn | So, which next.. | 10:31 | |
FROGGS | Zoffix: how long does this take? time perl6 -MInline::Perl5 -e '' | ||
dalek | kudo/nom: bcc4d34 | lizmat++ | src/core/native_array.pm: Make iterating whole native arrays ~2x as fast |
||
FROGGS | jnthn++ | ||
jnthn: gist.github.com/FROGGS/cf2a24d89361e760e7bc | |||
10:31
Woodi left
|
|||
Zoffix | FROGGS, real0m3.268s | 10:31 | |
FROGGS | Zoffix: see | ||
Zoffix | yeah | ||
FROGGS | we should add precomp support to rakudo soonish, really | 10:32 | |
RabidGravy | right off to the seaside to take advantage of the clement weather | ||
have fun | |||
10:33
chenryn left,
Ven left
|
|||
FROGGS | have fun RabidGravy | 10:33 | |
jnthn | FROGGS: Does the module databae need to survive a rebuild of Rakudo though/ | 10:35 | |
? | |||
10:35
kipd joined
|
|||
lizmat | jnthn: :-( | 10:35 | |
did you read my CURLI gist ??? | 10:36 | ||
jnthn | Yes, but I need to again, and the comments on it, and... :) | ||
lizmat | gist.github.com/lizmat/f3807956c354c14902a3 | ||
in my opinion, it should | |||
jnthn | lizmat: OK, in which case we can't use the VM-level serializer for it | 10:37 | |
FROGGS | jnthn: no, we could habe a json backup for that case | ||
10:37
sivoais left,
RabidGravy left
|
|||
lizmat | or any other, dedicated format, backup | 10:37 | |
FROGGS | jnthn: but of course it would be better if we'd not need to use that backup | ||
lizmat | it's all in the gist | ||
which also addresses distribution of info needed at different stages | 10:38 | ||
jnthn | OK, let me do some reading | ||
lizmat | jnthn: thank you :-) | ||
jnthn | And probably then some designing :) | ||
ShimmerFairy | FROGGS: I personally don't think that much of JSON, doesn't even allow comments. :) .oO(I know! Let's create yet another markup language... wait...) | ||
FROGGS | ShimmerFairy: what do we need comments for? | ||
and yes, I dont want to design a language, that's why json | 10:39 | ||
10:39
sivoais joined
|
|||
ShimmerFairy | FROGGS: nothin', just writing my own META6.json the other day and wanted to leave a comment. Turns out JSON doesn't want you make your configuration/metadata files explained :) | 10:39 | |
lizmat | jnthn: that would be brill | ||
jnthn | The other two big items on my todo list at the moment are correcting the NFG algo and refactoring Moar's sync IO...neither of which are much less hairy :) | 10:40 | |
FROGGS | lizmat: your gist does not tell anything about serializing a databaseish thing, right? | ||
ShimmerFairy | FROGGS: I'd be more than happy to come up with a YAML-ish thing (my understanding is that YAML is a Perl thing, right? If so, YAML6! :P), if only my head wasn't in my Pod6 work... :) | ||
FROGGS | ShimmerFairy: I... don't like YAML much | 10:41 | |
ShimmerFairy | FROGGS: yeah, I've not looked too much into it, but it seems too much for configuration/metadata/etc. | ||
FROGGS | ShimmerFairy: JSON is limited, yes, but that helps me remembering how to write it | ||
lizmat | FROGGS: it does, it's the installed modules meta info in the .precomp dir | ||
and the runtime meta info for each compunit, also under .precomp | 10:42 | ||
ShimmerFairy | FROGGS: what didn't help was that emacs goes to Javascript mode for JSON, and it told me // comments would work just fine, by coloring them as normal :P | ||
FROGGS | lizmat: yes, you state that the meta info should be precompiled for performance reasons, but that's not quite detailed :o) | 10:43 | |
lizmat | well, since it lives in the .precomp dir, which is compilation bound, it sort of implies it's precomped MoarVM style to me :-) | ||
FROGGS | lizmat: and there is nothing I can see about the livetime of the precomped thing, which is what the topic was about | ||
andreoss | www.pigdog.org/auto/software_jihad/.../3138.html they probably meant say [+] <3 1 4> X** 2 | 10:44 | |
lizmat | FROGGS: well, that's really a meta-issue | ||
FROGGS | lizmat: yes, I understand that your were talking about the moarvm serialization format, though that does not solve the issues we're seeing | ||
andreoss | what 'say [+] <3, 1, 4> x ** 2' could do? | ||
lizmat | do we want to keep different compilations around when switching versions with e.g. rakudobrew ? | ||
FROGGS | lizmat: we are trying to solve a bug | ||
jnthn | andreoss: looks like infix where term expected to me | 10:45 | |
m: say [+] <3, 1, 4> x ** 2 | |||
camelia | rakudo-moar 911cf4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/_O7T_HFemQTwo terms in a rowat /tmp/_O7T_HFemQ:1------> 3say [+] <3, 1, 4> x **7⏏5 2 expecting any of: infix infix stopper postfix statement end …» | ||
jnthn | Exactly | ||
FROGGS | m: say [+] <3, 1, 4>, x ** 2 | ||
camelia | rakudo-moar 911cf4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Hi5owelEs9Two terms in a rowat /tmp/Hi5owelEs9:1------> 3say [+] <3, 1, 4>, x **7⏏5 2 expecting any of: infix infix stopper postfix statement end …» | ||
FROGGS | m: say [+] <3, 1, 4>, 'x' ** 2 | ||
camelia | rakudo-moar 911cf4: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '7⏏5x' (indicated by 7⏏) in block <unit> at /tmp/lFZu4MQh8A:1Actually thrown at: in block <unit> at /tmp/lFZu4MQh8A:1» | ||
FROGGS | m: say [+] <3, 1, 4>, 42 ** 2 | ||
camelia | rakudo-moar 911cf4: OUTPUT«1767» | ||
lizmat | FROGGS: agree fixing the seriali/deserial any data bug is a prerequisite for further work | 10:46 | |
10:46
mprelude joined,
ely-se left
|
|||
FROGGS | lizmat: it would be handy to support switching, but that's one step too much right now me thinks... at least implementation wise (not design wise) | 10:46 | |
lizmat | FROGGS: let us at least set it up in such a way that it *might* work in the future | 10:47 | |
FROGGS | lizmat: read my gist to understand what the showstopper wrt serialization is: gist.github.com/FROGGS/cf2a24d89361e760e7bc | ||
10:47
sivoais left
|
|||
lizmat | otherwise we get in all sorts of issues with installed base after Xmas | 10:47 | |
FROGGS | lizmat: yes, I very much agree | ||
andreoss | FROGGS: isn't <3, 1, 3> coerced to 3 here? | 10:48 | |
lizmat | FROGGS: just thinking: might using an EVAL with a fresh :context help ? | ||
andreoss | m: say [+] 3, 42 ** 2 | ||
camelia | rakudo-moar 911cf4: OUTPUT«1767» | ||
lizmat | or with :context(CORE::) ? | ||
FROGGS | m: say [+] |<3, 1, 4>, 42 ** 2 | ||
camelia | rakudo-moar 911cf4: OUTPUT«Cannot convert string to number: trailing characters after number in '0337⏏5,' (indicated by 7⏏) in block <unit> at /tmp/gADypNwf5_:1Actually thrown at: in block <unit> at /tmp/gADypNwf5_:1» | ||
lizmat | FROGGS: wouldn't that fix the dependency issues ? | ||
FROGGS | ohh | 10:49 | |
andreoss: either use (3, 1, 3) or <3 1 3> | |||
10:49
olinkl joined
|
|||
andreoss | somebody should tell them to fix that in their article | 10:49 | |
FROGGS | lizmat: no, EVAL at that stage failed too, tried that (also with :context) | ||
andreoss | also sub infix: ($a, $b) {}; doesn't make sense | ||
10:50
sivoais joined
|
|||
FROGGS | andreoss: who are "they"? | 10:50 | |
andreoss | FROGGS: www.pigdog.org/auto/software_jihad/.../3138.html | ||
ilmari | should commas in <>? like they do in qw() in perl5? | ||
should commas *warn* | |||
10:51
ely-se joined
|
|||
FROGGS | ilmari: I don't like warnings... it is either legal and should be quiet or it is an error and should explode... an "in between" only exists in rare exceptions to me | 10:51 | |
10:52
kid51 joined
|
|||
ShimmerFairy | m: say <> # that reminds me; I think this should obviously work as () (empty list) | 10:52 | |
camelia | rakudo-moar 911cf4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/zEda3ZMPZUUnsupported use of <>; in Perl 6 please use lines() to read input, ('') to represent a null string or () to represent an empty listat /tmp/zEda3ZMPZU:1------> 3say <7⏏5> # that reminds …» | ||
10:57
sivoais left
10:58
antiatom left
10:59
chenryn joined
11:00
chenryn left,
sivoais joined
11:01
chenryn joined
|
|||
chenryn | one more question about nativecall @jnthn: what's __int128? | 11:04 | |
FROGGS | chenryn: nothing we support right now | ||
chenryn | so, is there some other way? | 11:05 | |
11:05
antiatom joined
|
|||
FROGGS | chenryn: you can read two int64 | 11:06 | |
if this is about unpacking memory | |||
jnthn has never seen __int128 :) | 11:07 | ||
ilmari | postgres uses it when aggregating 64bit integers | 11:09 | |
11:09
sivoais left
|
|||
jnthn | Ah, interesting. | 11:09 | |
jnthn so far didn't use postgres much | |||
jnthn finally read all the gist and comments | 11:10 | ||
11:10
laouji left
11:11
sivoais joined
11:12
laouji joined
11:13
antiatom left
|
|||
ilmari | git.postgresql.org/gitweb/?p=postgr...0ee76e488a | 11:14 | |
probably not very portable | |||
jdv79 | oh i think i mistook dha's usage as being example usage not abstract | 11:16 | |
yoleaux | 07:17Z <lizmat> jdv79: you probably want to check with _itz_ about inclusion in the pl6anet.org feed | ||
08:00Z <patrickz> jdv79: (wrt your Blog post) Do you know about testers.perl6.org/ ? | |||
Zoffix | oooo shiny. | 11:17 | |
Zoffix didn't know about that site | |||
jdv79 | .tell lizmat i did and i saw my inclusion PR get merged but still don't see my post on the site | ||
yoleaux | jdv79: I'll pass your message to lizmat. | ||
Zoffix | jdv79, I'm pretty sure I saw it announced on Twitter last night. | 11:18 | |
I recall reading something other than gist. | |||
jdv79 | .tell patrickz yes. i'd like to try to get cpants support though since that's more mature | ||
yoleaux | jdv79: I'll pass your message to patrickz. | ||
Zoffix | (and noticing a misspelt "Its" that I've missed originally) | ||
11:19
sivoais left
|
|||
jdv79 | .tell patrickz less work for all:) | 11:19 | |
yoleaux | jdv79: I'll pass your message to patrickz. | ||
chenryn | and CStruct don't support bool now? | ||
Zoffix | Ah. This is what I've read. jdv79.blogspot.ca/2015/10/perl6-and...um=twitter | 11:20 | |
jdv79 | .tell patrickz oh, seems cpants and cpantesters aren't the same thing. I mean the latter. | ||
yoleaux | jdv79: I'll pass your message to patrickz. | ||
jdv79 | that is what i made, yes | 11:21 | |
11:21
sivoais joined
|
|||
FROGGS | m: use NativeCall; class Foo is repr<CStruct> { has Bool $.a } | 11:25 | |
camelia | rakudo-moar bcc4d3: OUTPUT«===SORRY!===CStruct representation only handles int, num, CArray, CPointer, CStruct, CPPStruct and CUnion» | ||
FROGGS | m: use NativeCall; class Foo is repr<CPPStruct> { has Bool $.a } | ||
camelia | rakudo-moar bcc4d3: OUTPUT«===SORRY!===CPPStruct representation only handles int, num, CArray, CPointer, CStruct, CPPStruct and CUnion» | ||
FROGGS | hmmm, I thought that at least CPPStruct would support it | ||
11:25
antiatom joined
|
|||
jnthn also re-read S11 and S22 | 11:27 | ||
11:29
Ven joined
11:30
sivoais left
|
|||
jnthn | Lunch, and got a few other things to do this afternoon. But will be doing some thinking on the module installation stuffs | 11:31 | |
lizmat | jnthn++ | ||
yoleaux | 11:17Z <jdv79> lizmat: i did and i saw my inclusion PR get merged but still don't see my post on the site | ||
11:31
sivoais joined
|
|||
jnthn | bbiab | 11:32 | |
dalek | kudo/nom: 9371b58 | lizmat++ | src/core/native_array.pm: Made for int @ -> \i, \j { } about 15% faster |
||
11:33
jkva joined
|
|||
grondilu | anyone uses lua? I'm wondering what would be the best way to implement Lua's tables. | 11:37 | |
that is what would be the Perl 6 equivalent. | |||
11:37
rotcpy left
|
|||
Ven | grondilu: a new MOP? I'm not sure we have a prototypal structure in 6 | 11:37 | |
yoleaux | 08:28Z <jnthn> Ven: In Rakudo it's exposed under Metamodel:: but in modules I've written that are MOP modules I've not tended to call that out in the module name. | ||
rurban | p2 has the lua tables | 11:38 | |
Ven | jnthn: yeah, I know you used OO:: for monitors/.. | ||
(which is somewhat "MOP"-like) | |||
11:39
thou joined
11:40
sivoais left,
Peter_R joined,
Cryptoknight left
11:41
Cryptoknight joined
11:42
sivoais joined
|
|||
lizmat | jdv79: I have no idea how pl6anet.org work... | 11:43 | |
11:43
thou left
|
|||
dalek | kudo/nom: bb5283c | lizmat++ | src/core/metaops.pm: Remove unneccesary scope in the DwimIterator |
11:45 | |
lizmat | *works | ||
nine | Our CMS at work now requires File::Slurp, File::Slurp::Unicode and File::Slurper. Oh Perl 6, I can hardly await using you there... | ||
moritz | timotwdi :/ | 11:46 | |
lizmat | There Is More Other Teas With Diluted Ingredients ? | 11:47 | |
ShimmerFairy | .oO( File::Slurp::Unicoder ) |
||
11:48
ely-se left
|
|||
nine | .oO( File::Slurp::Unicodest ) |
11:48 | |
ilmari | Filest::Surpest::Unicodest | ||
grondilu | m: class Table { has @!array is rw; handles AT-POS }; my Table $a .= new; $a[4] = pi; say $a[4]; | 11:49 | |
camelia | rakudo-moar bcc4d3: OUTPUT«5===SORRY!5===Undeclared name: AT-POS used at line 1Undeclared routine: handles used at line 1Other potential difficulties: useless use of 'is rw' on @!array at /tmp/_CBhGwmEwv:1 ------> 3class Table { has @!a…» | ||
grondilu | m: class Table { has @!array is rw handles AT-POS }; my Table $a .= new; $a[4] = pi; say $a[4]; | ||
camelia | rakudo-moar bcc4d3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/5psZ6AmjkACannot invoke this objectat /tmp/5psZ6AmjkA:1» | ||
11:50
sivoais left
|
|||
chenryn | @FROGGS and the error report need modify too, at least can handle Str. | 11:50 | |
grondilu | m: class Table { has @!array is rw handles <AT-POS> }; my Table $a .= new; $a[4] = pi; say $a[4]; | ||
camelia | rakudo-moar bcc4d3: OUTPUT«Potential difficulties: useless use of 'is rw' on @!array at /tmp/HYe6qck6yK:1 ------> 3le { has @!array is rw handles <AT-POS> 7⏏5}; my Table $a .= new; $a[4] = pi; say $3.14159265358979» | ||
grondilu | m: class Table { has @!array handles <AT-POS> }; my Table $a .= new; $a[4] = pi; say $a[4]; | 11:51 | |
camelia | rakudo-moar bcc4d3: OUTPUT«3.14159265358979» | ||
11:51
ely-se joined
|
|||
grondilu | m: class Table { has @!array handles <AT-POS>; has %!hash handles <AT-KEY> }; my Table $a .= new; $a<foo> = pi; say $a<foo>; | 11:51 | |
camelia | rakudo-moar bcc4d3: OUTPUT«3.14159265358979» | ||
grondilu | cool | ||
grondilu wonders if he could make those anonymous. | 11:52 | ||
m: class Table { has @! handles <AT-POS>; has %! handles <AT-KEY> }; my Table $a .= new; $a<foo> = pi; say $a<foo>; | |||
camelia | rakudo-moar bcc4d3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/KIY6AvcZs5Cannot declare an anonymous attributeat /tmp/KIY6AvcZs5:1------> 3class Table { has @7⏏5! handles <AT-POS>; has %! handles <AT-K expecting any of: constraint» | ||
grondilu | anonymous attributes anyone? | ||
11:52
sivoais joined,
diana_olhovik_ left
11:53
diana_olhovik joined
|
|||
grondilu | I mean it's annoying to pick a variable name where an anonymous var would do | 11:54 | |
m: my $a; $a<foo> = pi; $a[4] = 42; | 11:56 | ||
camelia | rakudo-moar 9371b5: OUTPUT«Index out of range. Is: 4, should be in 0..0 in block <unit> at /tmp/d7V__fx9DW:1Actually thrown at: in any at gen/moar/m-Metamodel.nqp:2860 in block <unit> at /tmp/d7V__fx9DW:1» | ||
lizmat | grondilu: and how you refer to it later ? only by using AT-POS/KEY ? | ||
grondilu | lizmat: yes | ||
which in a way is a way to protect the attribute | |||
11:57
kid51 left
|
|||
daxim | lizmat, this programmer wants a p6 equivalent of the "as" module: stackoverflow.com/questions/330294...short-name | 11:57 | |
11:58
rindolf left,
rindolf joined
|
|||
lizmat | daxim: sadly, that's still NYI (but hopefully soon when we unblock on CURLI and related precomp stuff) | 11:59 | |
ShimmerFairy has yet to see the benefit of anonymous vars, preferring to just pick a name and go with it | |||
grondilu | m: my $a; $a<foo> = pi; say $a.WHAT | 12:00 | |
camelia | rakudo-moar 9371b5: OUTPUT«(Hash)» | ||
12:00
sivoais left
12:02
antiatom left
12:03
sivoais joined
|
|||
nine | I still don't get why the module database is such an extreme performance problem for rakudo. It's a couple of kilobytes of text. A Perl ought to read that in microseconds. | 12:03 | |
lizmat | nine: the problem is really JSON and use of a grammar in there ? | 12:04 | |
that's why I would be in favour of a combination of precomp and dedicated data format | |||
ShimmerFairy | could module Foo::Bar { class Bar is export { ... } } accomplish the shorter name desire, at least on the module dev's side? | ||
lizmat | *not* for the distro info, but for the installed modules / runtime info | 12:05 | |
not sure if "is export" is valid on a class ? | 12:06 | ||
ShimmerFairy | sure it is, just tried it :) | ||
moritz | daxim, lizmat: I thought it was implemented, as use Shortname:someattr<Long::Name>; though I forgto what :someattr is | ||
dalek | kudo/nom: 28c3836 | peschwa++ | src/Perl6/World.nqp: Clarify comment and stop caring about the number of parts. The latter is handled later in add_categorical, which throws a proper typed exception. |
||
kudo/nom: 6c01dcd | peschwa++ | src/Perl6/World.nqp: Catch errors from unboxing in non-Op nibble_to_str case. Otherwise we get cases that leak "Cannot unbox...", which is undesirable. |
|||
jdv79 | nine: maybe if p6 had something like p5's JSON::XS | ||
nine | lizmat: I understand the technical issues. It's just the glaring irony that some of the brightest heads in the Perl universe have been struggling with that for months. It's Perl! It got large because of its text processing capabilities. | ||
dalek | ast: dee7a12 | peschwa++ | S06-operator-overloading/sub.t: Add another test for constant circumfix declaration. |
12:07 | |
lizmat | well, with grammars we have a swiss army knife: not sure that beats a hammer for hammering though :-) | ||
nine | lizmat: that's a wonderful description of the problem :) | ||
ShimmerFairy | lizmat: just use a null-separated file of all the fields, that'd be the best solution :P | 12:08 | |
lizmat | ShimmerFairy: something like that has been on my mind, but probably using something I could use .lines on though :-) | 12:09 | |
nine | Do we need to support embedded newlines? | ||
ShimmerFairy | "my\0string".cstrs, clearly :) | ||
12:10
ab6tract joined
|
|||
lizmat | nine: I don't think we need that for the modules meta-data or the runtime info | 12:10 | |
nine | lizmat: sounds like a job for an .ini like format | ||
lizmat | for the distribution introspection, we clearly would need to allow for embedded newlines | ||
ab6tract | m: class Long::Foo { has $.t = "test" }; constant F = Long::Foo; my $x = F.new; say $x.t; | 12:11 | |
camelia | rakudo-moar 9371b5: OUTPUT«test» | ||
lizmat | nine: even simpler than that, because it's not really supposed to be humar-readable anyway | ||
*human | |||
12:11
sivoais left
|
|||
jdv79 | how abuot dbm or sqlite then;) | 12:11 | |
ab6tract | seems like I should be able to munge OUTER:: context to define the constant in the importing scope? | ||
12:12
rurban left
|
|||
ab6tract | not sure if that 100% solves that SX question, but I posted it there anyway | 12:12 | |
nine | dbm actually doesn't sound that bad. I don't know who long sqlite takes to initialize | ||
ShimmerFairy | lizmat: my first thought is one null for separating fields, two nulls for separating distributions :) | ||
jdv79 | i can guarantee faster than p6 and json:( | ||
ab6tract | lizmat: is there some obvious horror to the constant approach that I'm not seeing? | ||
masak | I think I've decided that a Q::CompUnit does have a Q::Block, even though there are no braces. | 12:13 | |
because the "intent"/"spirit" is still there, that of a block/lexpad that can hold variable values | |||
12:13
sivoais joined
|
|||
moritz | sounds like Q::Scoped | 12:13 | |
12:14
chenryn left
|
|||
nine | time sqlite3 foo.sql 'select * from foo' | 12:14 | |
real 0m0.003s | |||
moritz | which is a role that both Q::CompUnit and Q::Block do | ||
12:14
antiatom joined
|
|||
nine | That's quite ok, I'd say | 12:14 | |
lizmat | m: class Foo::Bar::Baz { }; constant Zap := Foo::Bar::Baz; dd Zap.new # looks like that works, jdv79 | ||
camelia | rakudo-moar 9371b5: OUTPUT«Foo::Bar::Baz.new» | ||
jdv79 | BUT wouldn't it be nice if p6 could parse stuff faster... | 12:15 | |
ab6tract | lizmat: what is the bind providing there? it works fine with normal assignment | ||
nine | It's simple, extensible, scalable, fast. and has a compatible license. I'd go with sqlite. | ||
12:15
weihan joined
|
|||
ab6tract | FWIW I support nine here | 12:15 | |
lizmat | m: class Foo::Bar::Baz { }; my Zap := Foo::Bar::Baz; dd Zap.new # was thinking of this | ||
camelia | rakudo-moar 9371b5: OUTPUT«5===SORRY!5=== Error while compiling /tmp/YmOuhfF3fJMalformed my (did you mean to declare a sigilless \Zap or $Zap?)at /tmp/YmOuhfF3fJ:1------> 3class Foo::Bar::Baz { }; my Zap7⏏5 := Foo::Bar::Baz; dd Zap.new # was th» | ||
jdv79 | i was only kidding around but okk | ||
lizmat | m: class Foo::Bar::Baz { }; my \Zap := Foo::Bar::Baz; dd Zap.new # was thinking of this | 12:16 | |
camelia | rakudo-moar 9371b5: OUTPUT«Foo::Bar::Baz.new» | ||
timotimo | jdv79: wanna make JSON::Fast faster? :) | ||
jdv79 | maybe | ||
i'd perger if grammars adn the lang runtime were faster though | |||
timotimo | yes | ||
very much so | |||
nine | jdv79: I have thought about sqlite for that job before your comment. I just didn't try and see how fast it would be. | ||
lizmat | nine ab6tract jdv79 ShimmerFairy : before we can deal with all those suggestions, we need to agree on the layout | ||
masak | moritz: Q::Scoped doesn't really have the right connotations for me... | ||
jdv79 | my only p6 module is terrible compared to it's p5 twin becuase of this. | ||
ab6tract | lizmat: fair enough | ||
timotimo | there's lots of things that could be improved in the grammar engine still | ||
lizmat | and jnthn now has his thinking cap on to see how we should move forward | 12:17 | |
timotimo | but a few things that i can recall off-hand aren't helpful for json parsing at all | ||
not helpful for rakudo's core setting either | |||
or code in general | |||
jdv79 | lizmat: is there a summary of that? | ||
i don't recall much talk in here about it | |||
just curious | |||
moritz | masak: maybe s/Scoped/Scope/ ? | 12:18 | |
timotimo | also, nobody seems to realize we DO have a JSON::XS-alike for rakudo already | ||
12:18
antiatom left
|
|||
lizmat | gist.github.com/lizmat/f3807956c354c14902a3 # jdv79 | 12:18 | |
ab6tract | masak: Q::Pad ? | ||
timotimo | jdv79: one notable/noticable piece of overhead for json::tiny is how we construct match/result objects | ||
12:18
Erendis42 joined
|
|||
timotimo | TT has already poured a bit of time into that with some success, but i expect there's more to be had | 12:19 | |
masak | moritz: better. it feels like it trades concreteness for correctness, or something. not sure I want to make that trade. | ||
ab6tract: in my mind, a "[lexical] pad" is something a block or a scope *has* | |||
moritz | a block *has* a scope | ||
and that scope is implemented as a lexpad | 12:20 | ||
ab6tract | masak: yeah fair, | ||
moritz | except when it's not a lexical scope | ||
timotimo | there's also the thing about having $*ACTIONS as a dynamic variable; having fewer dynamic variables to look up may help performance, but a measurement is very required to verify that hunch | ||
moritz | dunno if a compunit is or has a scope | ||
ab6tract | masak: so what does it use rather than braces? | ||
timotimo | when you dump a piece of code with --target=ast, i believe you'll see that a CompUnit has a Block inside it as one of the earliest children | 12:21 | |
lizmat | moritz: has a scope, I think | ||
12:21
weihan_ joined
|
|||
ab6tract | is that really the only difference vs a block? | 12:21 | |
masak | yes, agree with lizmat. has a scope. | ||
timotimo | aye, has a scope | 12:22 | |
masak | I think CompUnit is practically a block. for convenience we've decided not to surround the whole program with braces. | ||
but besides that syntactic difference, it has all the properties of an ordinary block. | |||
ab6tract | masak: ah, I though Q::Block was macro-related, sorry | ||
timotimo | the compunit rakudo builds has a var for the __args__ (param), then an empty Stmts (perhaps for any kind of var declarations, which it never seems to do) and then the next thing is Op(call) on a QAST::Block that has $!,$/, ..., EXPORT, GLOBALish, ... | ||
so that's a clear indication that a compunit has a scope, rather than is a scope | 12:23 | ||
12:23
Ven left
|
|||
lizmat | masak: that's basically what UNIT-OUTER is | 12:24 | |
the missing braces around the compunit | |||
12:24
sivoais left
|
|||
masak | ab6tract: *everything* is macro-related :P | 12:24 | |
timotimo | a macro shall allow you to replace Moar with jvm on the fly! :) | ||
12:24
weihan left
|
|||
masak | timotimo: [patent pending] | 12:25 | |
lizmat | .oO( isn't that what Perl 5 is? :-) |
||
12:25
sivoais joined
|
|||
timotimo | perl 5 is a macro? | 12:25 | |
lizmat | you only need to configure the macro :-) | ||
hmmm... maybe I got "has" and "is" confused :-) | 12:26 | ||
12:26
andreoss left,
antiatom joined
|
|||
psch | runtime backend replacing sounds interesting | 12:30 | |
moritz | s/interesting/insane/ | ||
pink_mist | moritz++ #couldn't have said it better myself | ||
psch | "make easy things easy, hard things possible, and insane things interesting"...? :P | 12:31 | |
pink_mist | hah | ||
12:32
Loren joined
|
|||
ab6tract | lizmat: you mean that you maybe feel a CURLI is more of a scope than a thing which has a scope? | 12:33 | |
lizmat | no? | ||
this was re the p5 is a macro meme | |||
12:34
sivoais left
|
|||
moritz imagines MoarVM sneakily overtaking the JVM's runloop, deleting JVM-specific from the registers, transmogrifying the JVM stack into a Moar stack | 12:34 | ||
timotimo | write that fanfiction, moritz :) | ||
jnthn | I'm *so* not implementing that :P | 12:35 | |
timotimo | i'm not so implementing that | ||
12:36
sivoais joined
|
|||
moritz | sounds like a good April 1st topic :-) | 12:36 | |
12:37
Ven joined
|
|||
[Coke] | RT: 1036; nom: 8; glr: 4; lta: 88; weird: 12; tests: 9; xmas: 84 | 12:38 | |
ShimmerFairy | .oO(Today we proudly announce Mocha, a program that modifies your JVM process into a MoarVM process in real time...) |
||
timotimo | oh lord, the name fits %) | 12:39 | |
psch | that's a js testing framework though | 12:40 | |
timotimo | pff, nobody cares if names are already taken | ||
ShimmerFairy | psch: the alternative would be to have people scout various coffee shops, longest drink name wins :P | ||
psch | moarchaccino? :P | 12:41 | |
masak | moritz: "The Perl community announces HovercraftFullOfEels, a handy utility to hotswap your VM at runtime." :P | ||
timotimo | :D | 12:42 | |
masak .oO( <python_community> stop using Monty Pyhon names for your projects! ) | |||
12:42
pmurias joined
|
|||
timotimo | "Introducing the GiantFootFromTheSky compression algorithm" | 12:42 | |
pmurias | hi | ||
12:42
llfourn left
|
|||
masak | ahoj, pmurias | 12:42 | |
ShimmerFairy | stack transmogrification is done with an innovative SillyWalk memory traversal algorithm | 12:43 | |
pmurias | moritz: there is a research project that allows turning the JVM into a Perl 6 VM | 12:44 | |
moritz: or anyother language VM | |||
timotimo | "perl6 ported to quadrocopter firmwares thanks to FlyingLessons" | ||
12:45
sivoais left
|
|||
pmurias | moritz: it's called the graalvm | 12:45 | |
timotimo | "for your mailing list subscription please choose from the following options: | ||
spam, eggs, development news and spam | |||
sausage, spam, puns, spam, spam, cabbage and spam, | 12:46 | ||
..." | |||
12:46
sivoais joined
|
|||
nine | I get the distinct impression that Friday has arrived at #perl6 ;) | 12:46 | |
ShimmerFairy | "This Mocha project is dead!" "No it's not, it's pining for the fjords." | ||
lizmat | .oO( nobody expects the singing Vikings to fly in ) |
12:47 | |
dalek | p: 2104888 | (Pawel Murias)++ | src/vm/js/bin/run_tests.pl: [js] reorder the tests |
||
p: 6d79697 | (Pawel Murias)++ | src/vm/js/ (2 files): [js] move the way closures are handle closer to the way the MoarVM backends does things noop explicit takeclosure, and insert closures in a more declarative manner |
|||
masak .oO( nobody expects the submethod invocation! ) | |||
ShimmerFairy | .oO(nobody expects the <span> jQuery!) |
||
12:48
vytas left
|
|||
ely-se | <center> | 12:48 | |
timotimo | <marquee> | 12:49 | |
ely-se | omg that's an awesome nickname, as it actually shows up as <center> :O | ||
timotimo | not on my watch^Wsmartphone^Wdesktop computer | ||
12:49
vytas joined
12:50
weihan_ left,
weihan joined
|
|||
masak .oO( oh NULL you didn't! ) | 12:53 | ||
12:54
rurban joined,
sivoais left
|
|||
pippo | masak: how you do that thing ^^. I.e. your nick name appears as a '*' ? | 12:54 | |
grondilu | std: constant ∞ = Inf; | 12:55 | |
camelia | std 28329a7: OUTPUT«5===SORRY!5===Missing symbol in constant declaration at /tmp/nJO9AeVG4w line 1:------> 3constant 7⏏5∞ = Inf;Missing initializer on constant declaration at /tmp/nJO9AeVG4w line 1:------> 3constant 7⏏5∞ = Inf;Confused at /tmp/nJO9…» | ||
grondilu | can't I use ∞ as an identifier? | ||
masak | pippo: /me | ||
jnthn | m: say '∞' ~~ /<ident>/ | ||
camelia | rakudo-moar 6c01dc: OUTPUT«Nil» | 12:56 | |
jnthn | No :) | ||
grondilu | ok | ||
jnthn | m: constant \∞ = Inf; | ||
camelia | rakudo-moar 6c01dc: OUTPUT«5===SORRY!5=== Error while compiling /tmp/gkAIGW5inZMissing initializer on constant declarationat /tmp/gkAIGW5inZ:1------> 3constant7⏏5 \∞ = Inf;» | ||
masak just wrote "/me just wrote ..." | |||
ShimmerFairy | m: constant term:<∞> = Inf; say ∞ | ||
camelia | rakudo-moar 6c01dc: OUTPUT«Inf» | ||
pippo OK. Thank. | |||
jnthn | m: constant \term:<∞> = Inf; | ||
camelia | ( no output ) | ||
12:56
sivoais joined
|
|||
pippo | :-)) | 12:56 | |
jnthn | m: constant \term:<∞> = Inf; say ∞ | ||
camelia | rakudo-moar 6c01dc: OUTPUT«Inf» | ||
jnthn | ^^ | ||
ShimmerFairy | jnthn: do you need the \ ? | ||
jnthn | m: constant term:<∞> = Inf; say ∞ | ||
camelia | rakudo-moar 6c01dc: OUTPUT«Inf» | ||
jnthn | No :) | ||
grondilu | cool | ||
thanks | |||
masak | m: constant \\\\\\\\\\term:<∞> = Inf; say ∞ | 12:57 | |
camelia | rakudo-moar 6c01dc: OUTPUT«5===SORRY!5=== Error while compiling /tmp/YsB4Rxg9ACMissing initializer on constant declarationat /tmp/YsB4Rxg9AC:1------> 3constant7⏏5 \\\\\\\\\\term:<∞> = Inf; say ∞» | ||
jnthn | One \ enough! | ||
masak | :P | ||
12:57
ely-se left
|
|||
masak | some would say too much | 12:57 | |
pink_mist | what did the \ actually accomplish there? 0_o | ||
12:58
Cryptoknight left
|
|||
moritz | m: constant &term:<∞> = Inf; say ∞ | 12:58 | |
camelia | rakudo-moar 6c01dc: OUTPUT«5===SORRY!5===Argument to "say" seems to be malformedat /tmp/rhVRj6DNFr:1------> 3constant &term:<∞> = Inf; say7⏏5 ∞Bogus postfixat /tmp/rhVRj6DNFr:1------> 3constant &term:<∞> = Inf; say 7⏏5∞ expecting any o…» | ||
ShimmerFairy | jnthn: btw, do you know off-hand if constant &infix:<A> := &infix:<B> is sufficient to create a 'synonym' ? When I've done it before I could create new multis on either name, and call from the other name, so I'm curious. | ||
12:58
ely-se joined
|
|||
ShimmerFairy | (if it does work for making synonyms, it would be a better way of defining texas variants methinks) | 12:59 | |
jnthn | ShimmerFairy: If it calls add_categorical it'd work | 13:01 | |
Dunno if it does | |||
13:01
sufrostico joined,
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
ShimmerFairy | jnthn: ah, I'll check then :) . If not, guess I'll have to dream up a SynonymHOW or something :P | 13:02 | |
jnthn | ShimmerFairy: Or just patch the constant declarator | ||
jdv79 | _itz_: is your thing broken or is mine? | 13:03 | |
jnthn | m: constant &infix:<+++> = &infix:<+>; say 1 +++ 2 | ||
camelia | rakudo-moar 6c01dc: OUTPUT«Parameter '$a' expected a writable container, but got Int value in block <unit> at /tmp/PAoMArOSC2:1» | ||
13:03
sufrosti1o joined,
Ven left
|
|||
jnthn | m: my &infix:<+++> = &infix:<+>; say 1 +++ 2 | 13:03 | |
camelia | rakudo-moar 6c01dc: OUTPUT«3» | ||
jnthn | ShimmerFairy: Seems not | ||
13:03
jkva left
13:04
sivoais left
|
|||
ShimmerFairy | jnthn: oh, so 'constant' supposed to work in making synonyms then? (In the sense of "both refer to the same thing", aka aliases or pointers or whatever-you-call-em) | 13:04 | |
jnthn | ShimmerFairy: I don't see why not right off, though I've got my head in a heap profiler at the moment for $other-job so... :) | ||
lizmat | toons.gotblah.com/archive/glasberge...9-1501.gif :-) | 13:05 | |
jnthn | :P | ||
ShimmerFairy | jnthn: no worries, that's why I said "off-hand", not "after a thorough investigation" :) | ||
jnthn | :) | ||
13:06
sivoais joined
|
|||
ShimmerFairy | I did try naively implementing texas variants with 'constant' the other day, but it broke compilation :P | 13:06 | |
gfldex | they are now making CPUs for perl6, see: www.qualcomm.com/news/releases/201...-ecosystem | 13:07 | |
takadonet | morning all | 13:08 | |
lizmat | takadonet o/ | 13:11 | |
dalek | kudo/nom: b76e4ab | lizmat++ | src/core/Range.pm: for ^10 -> i,j { } and @a = ^10 about 10% faster Turns out there *is* a significant difference between updating an int attribute or an lexical int in a loop. |
13:12 | |
kudo/nom: fd403a8 | lizmat++ | src/core/native_array.pm: Make iterating over an entire int array 5% faster |
|||
13:14
sivoais left
|
|||
masak | another advantage of preferring $!foo to $.foo in methods: the former fails at compile time if you typo or change your attribute | 13:14 | |
13:16
sivoais joined
|
|||
pmurias | blogs.perl.org/users/pawel_murias/2...world.html # nqp-js blog post | 13:16 | |
lizmat | Pawel++ but the post is a bit bare ? | ||
Maybe something like: Proud to present NQP running on a Javascript backend! | 13:17 | ||
pmurias | lizmat: it's just the backend | ||
ilmari | huh, why is $i = $i + 1 10x faster than ++$i? | ||
lizmat | "a small, but necessary step towards supporting rakudo on a javascript backend" | 13:18 | |
pmurias | I'll write a bigger post once I bootstrap the full NQP | ||
pink_mist | so how far are we from having perl6 running in the javascript of a browser? :D | ||
lizmat | ilmari: because $i is a native int, and $i++ is not implemented for natives yet | ||
ilmari | lizmat: ah | ||
jnthn | It...is | ||
lizmat | so it will first box the native, then ++ it, then unbox it again | ||
jnthn | lizmat: bs | ||
It's that we can't inline the native ++ yet | |||
lizmat | well, there you go | 13:19 | |
jnthn | So, just not so well optimized | ||
lizmat | hence my $i = $i + 1 when using natives atm | ||
jnthn | *nod* | ||
13:19
yuppie joined
|
|||
lizmat | once we have it, we'll just apply a macro on the core settings and have a faster $i++ :-) | 13:20 | |
ilmari | lizmat: that's what made me wonder and test | ||
yuppie | i have arrived | ||
jnthn | It is implemented for natives, though, and it's not boxing to an Int. It's just the overhead of passing a reference and really doing the call is pretty high. | ||
Compared to the cost of actually incrementing a native integer, which is nearly free | |||
lizmat | ilmari: what jnthn said :-) | ||
yuppie | is there going to be something like cpan for perl6? | 13:21 | |
pmurias | pink_mist: nqp can already run in the browser | ||
pink_mist | pmurias: 0_o whoah | ||
[TuxCM] | yuppie, that is what jdv79 is working on | ||
lizmat | pmurias: so the next steps are: 1. making nqp on javascript self-hosting ? | 13:22 | |
pmurias | yes | ||
jnthn | yuppie: modules.perl6.org/ is where the collection of Perl 6 modules so far can be found | ||
lizmat | 2. write the necessary interface bits for rakudo | ||
3. profit ? | |||
yuppie | such "foo" is "bar" wow | ||
pmurias | making nqp on javascript self-hosting is the current step, I need to make the NQP grammar compile (and work correctly) on js | 13:23 | |
jnthn | pmurias++ # that's an important step towards bootstrapping...nice :) | ||
13:23
huf is now known as plnk_mlst,
Ven joined
|
|||
pmurias | and then I can move onto rakudo | 13:23 | |
lizmat | pmurias++ | ||
13:24
plnk_mlst is now known as huf,
pink_mist is now known as hnf,
hnf is now known as pink_mist,
sivoais left
|
|||
Loren | Nick blackcat | 13:25 | |
13:25
Loren is now known as blackcat,
blackcat is now known as blackcat_
13:26
blackcat_ is now known as Loren_,
sivoais joined
13:27
thou joined
13:29
pecastro left
13:31
Loren_ left
13:32
thou left
13:33
blackcat joined,
blackcat is now known as Guest5909
13:34
blackcat_ joined
13:35
sivoais left
13:36
sivoais joined
13:37
mr_ron left
13:38
Guest5909 left
13:41
n0tjack joined
13:42
pecastro joined,
andreoss_ joined
|
|||
andreoss_ | m: my &f = [+] 1..*; say f(5) | 13:42 | |
camelia | rakudo-moar 6c01dc: OUTPUT«(timeout)» | ||
jnthn | 1..* on a Range isn't a currying, it's an infinite range | ||
13:44
ely-se left
13:45
chenryn joined,
sivoais left
|
|||
ilmari | but why does it hang rather than throwing an exception when assigning it to &f? | 13:46 | |
ah, no, it's the reduce that's hanging | 13:47 | ||
jnthn | It's...right | ||
13:47
sivoais joined
|
|||
grondilu | wasn't there a rule that [+] 1..* == -1/3 or something :) | 13:48 | |
13:48
pecastro left
|
|||
grondilu | Ramanudjan sum or somthing | 13:48 | |
[Coke] | that was just bad maths. | ||
13:48
chenryn_ joined
|
|||
[Coke] | if it's the one I'm remembering that went around the youtubes about six months ago. | 13:49 | |
n0tjack | where should I start if I want to create a meta-operator which consumes (binary) operators as inputs and produces a (binary) operator as an output? | 13:50 | |
andreoss_ | m: my &f := my $x = { ... }; $x = 1; say f() | ||
camelia | rakudo-moar 6c01dc: OUTPUT«Cannot find method 'CALL-ME' in block <unit> at /tmp/F6rlRg9Q_h:1» | ||
13:50
Ven left,
ely-se joined
|
|||
andreoss_ | shouldn't it say Cannot invoke this object instead? | 13:50 | |
m: my &f; say f(); | 13:51 | ||
camelia | rakudo-moar 6c01dc: OUTPUT«Cannot invoke this object in block <unit> at /tmp/JM3xVPi79C:1» | ||
grondilu | creating meta-operators is not easy. | ||
13:51
vytas left
|
|||
n0tjack | grondilu: can it be done in-language, or would I have to hack the source? | 13:51 | |
grondilu | I think you'll have to wait for parsed macros or something. | 13:52 | |
n0tjack | ok, thanks | ||
(I was secretly hoping I could do something like sub infix:<dot> (&reduce, &map) {[&reduce] @^x >>&map<< @^y} ) | 13:54 | ||
psch | m: sub infix:<XX> ( $lhs, *@ [ $op, $rhs ] ) is looser(&infix:<,>) { say $op($lhs, $rhs) }; 5 XX &infix:<+>, 10 # ehhh.. | 13:55 | |
camelia | rakudo-moar fd403a: OUTPUT«15» | ||
psch | n0tjack: that's what's possible | ||
13:55
sivoais left
|
|||
psch | n0tjack: not it's not really the same, and pretty hackish | 13:55 | |
s:1st/not/note/ | |||
13:56
aborazmeh left
|
|||
psch | m: sub infix:<XX> ( $lhs, *@ [ $op, $rhs ] ) is looser(&infix:<,>) { say $op($lhs, $rhs) }; 5 XX &[+], 10 # ehhh.. # a bit shorter invocation | 13:56 | |
n0tjack | psch: let me go play with that | ||
camelia | rakudo-moar fd403a: OUTPUT«15» | ||
13:56
thou joined
13:57
sivoais joined,
WizJin joined
|
|||
n0tjack | the slurpy is in case the rhs has a bunch of stuff past the op? | 13:57 | |
dalek | kudo/nom: 693ca01 | lizmat++ | src/core/Range.pm: Oops, fix an off-by-one error introduced just now |
||
jdv79 | cna anyone review a post about metacpan? | ||
psch | n0tjack: the slurpy is probably not neccessary like that, i think. i just couldn't get the easy unpacking to work :) | 13:58 | |
s/easy/plain/ | |||
n0tjack | haha | ||
psch | m: sub infix:<XX> ( $lhs, [ $op, $rhs ] ) is looser(&infix:<,>) { say $op($lhs, $rhs) }; 5 XX &[+], 10 # ehhh.. # a bit shorter invocation | ||
camelia | rakudo-moar fd403a: OUTPUT«15» | ||
lizmat | jdv79: when I'm back from cycling | ||
cycling& | |||
psch | n0tjack: that also works, dunno what i did wrong before :) | ||
n0tjack | thanks, at least I know I can hack my way out if I ever need it | ||
jdv79 | sooner anyone? my battery is about to die and i'd like to go check out a blegian themede oktoberfest thing across town for a few hours | 13:59 | |
n0tjack | I was gonna write sub infix:<linear_combination> (@x, @y) { @x + map_reduce * @y } | ||
PerlJam | jdv79: just paste the link and see who bites. :) | ||
n0tjack | so then you could say (1,2,3,4) linear_combination (5,6,7,8) to get the sum of their product | ||
jdv79 | jdv79.blogspot.com/b/post-preview?...;type=POST | 14:00 | |
someone doesn't care about url brevity there | |||
nine | jdv79: s/handle, these/handle these/ | ||
psch | n0tjack: isn't that easier as "[+] @lhs X* @rhs"? | 14:01 | |
n0tjack: maybe call that linear_combination(@lhs, @rhs) | |||
[Coke] | jdv79: All of thse - *these | 14:02 | |
n0tjack | psch: that's definitely easier, but I have more uses for map_reduce than just linear_combination | ||
psch | oh, no, linear combination wouldn't be X but Z | ||
jdv79 | oops | ||
psch | m: say &reduce | ||
camelia | rakudo-moar fd403a: OUTPUT«sub reduce (&with, + is raw) { #`(Sub|50017240) ... }» | ||
n0tjack | is there a diff btwn >>foo<< and foo Z? | ||
psch | n0tjack: hyper doesn't guarantee order of execution, only of result | 14:03 | |
[Coke] | jdv79: nifty. good work | ||
jdv79 | cool, thanks | ||
PerlJam | jdv79: what Coke said. | ||
nine | jdv79: s/its been suggested/it's been suggested | ||
PerlJam | jdv79++ | ||
n0tjack | psch: good, that'll teach those recaltrant side-effectors! | ||
jdv79 | oh, forgot title | ||
d'oh | |||
n0tjack | I'm gonna build me a little Grammar in p6 today | 14:04 | |
nine | n0tjack: have fun! | ||
n0tjack | funny how the first thing I want to do in a brand spankign new language is built an even newer spankier language | ||
TimToady | morning from PPW hackathon | ||
14:05
skids joined
|
|||
[Coke] | TimToady: oh shit, that's today. | 14:05 | |
jdv79 | published. thanks guys! | ||
FROGGS | morning TimToady | ||
jnthn | o/ TimToady | ||
n0tjack | can I rely on the Grammar stuff in the butterfly book to be up to date? | ||
[Coke] | I had hoped to go to the PPW. dammit. | ||
psch | m: sub map-reduce(&mapsub, &redsub, *@args) { redsub mapsub @args }; say map-reduce &[*], &[+], ((1,2,3), (1,2,3)) | ||
camelia | rakudo-moar fd403a: OUTPUT«6» | ||
[Coke] asks, "what year is it?" "WHAT YEAR IS IT!?" | |||
psch | huh | ||
14:06
sivoais left
|
|||
PerlJam | jdv79: if that metacpan instance on hack is only for P6, you might want to change the "No result" message to not mention Task::Kensho | 14:06 | |
psch | m: sub map-reduce(&mapsub, &redsub, *@args) { [[&redsub]] [[&mapsub]] @args }; say map-reduce &[*], &[+], ((1,2,3), (1,2,3)) # there | 14:07 | |
camelia | rakudo-moar fd403a: OUTPUT«36» | ||
14:07
sivoais joined
|
|||
nine | jdv79: I'm a bit sad that we're gonna have two distinct metacpan sites. Will it be possible to merge them later on? | 14:07 | |
n0tjack | psch++ | ||
psch | n0tjack: maybe make &mapsub and &redsub named, if that fits your api. i'd say redsub probably also could have &infix:<,> as default value... | 14:08 | |
14:09
chrstphrhrt joined
|
|||
psch | eh, or just call (map { ... }, @args).reduce(:with({...})) i guess... :) | 14:09 | |
n0tjack | psch: that seems like a natural choice. in APL, map-reduce is named dot, and its default (when passed jot) is append | ||
[Coke] | I am fine with them being separate. Each is going to care about different aspects of their modules. | 14:10 | |
n0tjack | alright, I'm gonna take a risk and follow Using Perl6 for the learnins | 14:11 | |
jdv79 | nine: how would you do that ? | ||
n0tjack | you guys better not have made any progress since it was published in 2012 *shakes fist | ||
14:12
ely-se left
|
|||
jdv79 | a lot of things refer to a dist by name and such | 14:12 | |
all that would ahve to be bifurcated ^H | |||
14:12
rurban left
|
|||
jdv79 | that's more work than i' prepare to do right now. maybe later. but what's the benefit anyway? is it worth it? | 14:12 | |
PerlJam | "one metacpan to rule them all" seems to be the main benefit. | 14:13 | |
ShimmerFairy | I'm also fine with two separate sites; they are two distinct languages, after all :) (in the same way wikipedia's subdomain-based division of languages is still the nicest solution for i18n in wikis I've seen) | ||
jdv79 | PerlJam: :) | ||
let's just get something up and then we'll talk about making it harder:) | |||
lunch & | 14:14 | ||
nine | jdv79: well, maybe separate sites is not that bad at all. I'd just love to see it suggest Perl 5 modules with an automatically added Inline::Perl5 dependency in addition to the Perl 6 modules. That could fight the preconception that Perl 6 has a module problem. | ||
jdv79: of course. That's why I asked about possibilities of the future :) | |||
PerlJam | nine: that /would/ be nice | ||
14:15
sivoais left,
andreoss_ left
|
|||
ShimmerFairy | nine: Being the purely-P6 user that I am, I'm not quite comfortable with the idea of so readily suggesting Perl 5 modules. That may well be just me though :P . | 14:16 | |
FROGGS | I also think that these two should be separate | ||
otherwise searching for dists can be quite confusing | |||
jnthn | ShimmerFairy: Many people are just interested in solving their problem. :) | 14:17 | |
14:17
sivoais joined
|
|||
PerlJam | jnthn++ I was just about to say exactly that | 14:17 | |
14:17
antiatom left
14:18
antiatom joined,
Kogurr joined
|
|||
PerlJam | (though, taken reductio ad absurdum, why shouldn't it also suggest Python modules or Lua modules too?) | 14:18 | |
ShimmerFairy | jnthn: of course, that's just a personal thing, I can't help but feel like it kinda says "oh hey we don't have that why don't you try Perl 5 instead why bother with P6 anyway!?" | ||
14:19
chenryn left,
chenryn_ is now known as chenryn
|
|||
PerlJam | ShimmerFairy: I've almost always said TMTOWTDI includes ways that do not involve Perl . That's part of the "Perl Spirit" as far as I'm concerned. | 14:19 | |
concerned | yeah, I'm concerned too | 14:20 | |
lol | |||
nine | PerlJam: because we do have easy access to Perl 5 modules and I don't know of a real centralized Python module database | ||
PerlJam | concerned: :P | ||
jnthn | ShimmerFairy: Not really. If someone is already wanting to write in P6 (and so are looking at the P6 modules site), and then finds they have most of what they need and one missing thing, and we tell them "oh hey, you can get at it through Inline::Perl5", they're better equipped to use Perl 6. | ||
PerlJam | nine: an excellent point :) | ||
jnthn | ShimmerFairy: Rather than say "oh...it doesn't have something I need, I'd better use something else for the whole thing" | 14:21 | |
nine | PerlJam: I arrived at the same question a couple of minutes ago :) | ||
ShimmerFairy | I'd prefer if the response was "I'd better go write it!", but I see the point. | ||
PerlJam | ShimmerFairy: see "some people just want to get their work done" :) | ||
ShimmerFairy | I guess I'm just worried that this early on, being too quick to suggest FFIs would stagnate the development of P6 modules. | 14:22 | |
14:23
Erendis42 left,
laouji left,
cognominal joined
14:25
sivoais left
|
|||
PerlJam | ShimmerFairy: maybe. | 14:25 | |
pmurias | PerlJam: once we get :from<python> fully working having metacpan6 suggest python modules too seems like a good idea | ||
PerlJam | ShimmerFairy: but maybe it also gives people time to figure out how the P5 module isn't well suited for P6 and then write a *better* P6 module. | 14:26 | |
TimToady | would be funny if the best python infrastructure was written in p6 | ||
14:26
cognominal_ joined
14:27
sivoais joined
|
|||
ShimmerFairy | So I guess the reason why I'm not comfortable with the idea (even though I don't think it's bad) is because it might lead too many people into feeling like P6 is in fact some kind of successor to P5, 'cos look at all these P5 modules I can still use. | 14:27 | |
14:27
WizJin left
|
|||
nine | ShimmerFairy: I could live with people believing that if they also believe it's Python's successor :) | 14:28 | |
PerlJam | heh | ||
14:28
cognominal left
|
|||
PerlJam | ShimmerFairy: I think we have a good story there because "sister languages" | 14:28 | |
TimToady | but the fact remains that the younger sister has the longer life expectancy :) | 14:29 | |
nine | ShimmerFairy: also, people can use Perl 6 modules in Perl 5. And I could live very well with P5's metacpan suggesting Perl 6 modules as well. Bridges go both ways after all. | 14:30 | |
14:31
pippo left
|
|||
n0tjack | given how long it took her to get from conception to birth, I'd say p6 has a long life ahead of her indeed | 14:31 | |
ShimmerFairy | nine: hm. I like the sound of it more if it went both ways :) . I think my concerns boils down to "no wait, you just got here!" :) | ||
n0tjack | I think p6 years are like inverse dog years | ||
14:32
tokuhirom left
|
|||
PerlJam | I don't think there's a correlation between gestation period and life expectancy | 14:32 | |
14:32
Ven joined
14:34
s_kilk joined
14:35
sivoais left
14:36
ely-se joined
|
|||
n0tjack | PerlJam: oregonstate.edu/instruct/st352/koll...tation.htm | 14:36 | |
14:37
sivoais joined,
WizJin joined
14:38
llfourn joined
|
|||
PerlJam | n0tjack: are you suggesting that I Do The Math? :) | 14:41 | |
TimToady decided that the user-visible method to do triangular reduce is likely gonna be called "produce", to avoid collision with actual triangles in any geometry package, and because "triangle" is not a verb | 14:42 | ||
and the "triangle" mnemonic is just for the [\op] form | |||
14:42
llfourn left
|
|||
n0tjack | PerlJam: nah, do what everyone else does, scroll to the bottom line: " The interpretation: we are 95% confident that the median gestation period will be between 1.05 to 1.12 times longer for every increase of one year in life expectancy." | 14:43 | |
jnthn | TimToady: triangulate? ;) | ||
PerlJam | TimToady: triduce (make up your own words :) | 14:44 | |
ilmari | it would be nice if panda did $*PROGRAM.basename in its usage message | ||
jnthn | We could do with a method on Supply that maps to Rx's .scan | ||
Which is basically a triangle reduce | |||
14:45
sivoais left
|
|||
PerlJam | (though, "triduce" could be confused with "traduce" which could cause people to get the wrong impression about things) | 14:45 | |
14:45
reneeb joined
|
|||
ilmari | I don't need to know that it's /home/ilmari/.rakudobrew/bin/../moar-nom/install/share/perl6/site/bin/panda | 14:45 | |
PerlJam | ilmari: isn't that an issue in the panda repo already? | ||
ilmari | PerlJam: possibly, I didn't look | ||
nope | 14:46 | ||
14:46
g5 left
|
|||
PerlJam | huh. Well, it's come up before so I guess I thought it had been "issued" | 14:47 | |
TimToady | I already thought about all those possibilities before settling on "produce" | ||
ilmari creates an issue | |||
n0tjack | in other contexts, tri-duce is known as "running" | ||
"running sum" | |||
"running product" | |||
jnthn | TimToady: Will that exist as a method form too, like .reduce does? | ||
14:47
sivoais joined
|
|||
TimToady | hmm, didn't think about "running" | 14:48 | |
n0tjack | in J, you spell it +/\ and it does have a little triangle. Which I always picture as pointing to the spaces where the op will be inserted | ||
TimToady | it's not a verb though | ||
pink_mist | 0_o | ||
TimToady | and it's a little confusing with run() | ||
jnthn | TimToady: Also known as a cumulative product I guess, so accumulate or so may work | 14:49 | |
n0tjack | "running" isn't a verb in "running sum", either | ||
it's modifying sum | |||
TimToady | accumulators don't usually advertise their intermediate products | ||
jnthn | uh, cumulative sum | ||
Yeah, I just realized that after I wrote it :) | |||
moritz | cummulous cloud sum | 14:50 | |
dalek | p: fc8dffe | (Pawel Murias)++ | t/nqp/59-nqpop.t: Add tests for nqp::isge_s, nqp::isle_s. |
||
p: 5ba3ba3 | (Pawel Murias)++ | / (3 files): [js] Implement nqp::is{gt,ge,le,lt}_s |
|||
TimToady | anyway, if we pick a -duce word, produce is the best one | ||
14:50
[Sno] joined
|
|||
TimToady | idea of a production line is there to | 14:50 | |
ilmari | PerlJam: oh, that's perl's usage thing, not something in panda itself | 14:51 | |
jnthn | It just makes me think a bit of producer/consumer a bit much I guess. | ||
PerlJam | works as far as "growing things" is concerned too | ||
TimToady | well, it is a producer :) | ||
PerlJam | ilmari: oh. | ||
jnthn | True, but many other things also are :) | ||
concerned | growing things isn't concerned, I'm concerned! | ||
jnthn | I've nothing against produce, just wonder if there's something more vivid... | 14:52 | |
PerlJam | concerned: if you keep this up, I may never use that word again :) | ||
TimToady | well, traduce is more vivid :) | ||
concerned | looks like you're in a PerlJam | ||
epic nickname puns | |||
jnthn | .Scan from Rx didn't really tell me what it did and I had to go read the docs... :) | ||
PerlJam | or ... maybe I'll just /ignore ;) | 14:53 | |
concerned | sorry I derailed the chat | ||
ilmari | PerlJam: ah, it's because the rakudobrew shim invokes it by full path | ||
_and_ that path has a .. in it | |||
14:54
concerned left
|
|||
ab6tract | triduce is kinda cool, tbh :) | 14:54 | |
ilmari | fpaste.scsys.co.uk/500127 | 14:55 | |
ab6tract | is there an op form of it as well? | ||
jnthn | [\+] | ||
m: say [\+] 1..10 | 14:56 | ||
camelia | rakudo-moar 693ca0: OUTPUT«(1 3 6 10 15 21 28 36 45 55)» | ||
14:56
sivoais left
|
|||
TimToady | also considered treduce and induce, but produce seemed better | 14:57 | |
FROGGS | m: use variables :D; my $a | 14:58 | |
camelia | rakudo-moar 693ca0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/b6Gjfk0cx7Variable definition of type (with implicit :D) requires an initializerat /tmp/b6Gjfk0cx7:1------> 3use variables :D; my $a7⏏5<EOL> expecting any of: constraint» | ||
moritz | preduce | ||
the best of produce and reduce | |||
TimToady | rreduce | ||
pink_mist | triangle-produce? | ||
TimToady | for running reduce | ||
14:58
sivoais joined
|
|||
n0tjack | partial products? | 14:59 | |
pink_mist sees where triduce comes from ... how about proangle? :P | |||
PerlJam | "produce" looks better and better (though, I'd still favor "triduce" :) | 15:00 | |
15:00
[TuxCM] left
15:02
[Sno] left
|
|||
n0tjack | is there a built-in for sliding windows of size N? | 15:03 | |
15:03
[Sno] joined
|
|||
PerlJam | n0tjack: rotor | 15:03 | |
n0tjack | nice! | ||
ilmari | ah, canonpath doesn't strip .. segments | ||
FROGGS | ilmari: try .resolve | 15:04 | |
n0tjack | we need a perlfunc | ||
PerlJam | n0tjack: doc.perl6.org/routine/rotor | ||
n0tjack | too much work to go to perl6.org every time | ||
PerlJam | agreed | ||
thowe | do named arguments like this ":35thing" only work with integers or whatever? I mean, how would you use a string as an arg there? | 15:05 | |
PerlJam | thowe: :thing<value> | 15:06 | |
TimToady | only integers | ||
thowe | OK | ||
n0tjack | m: :35thing | 15:07 | |
camelia | ( no output ) | ||
n0tjack | m: say :35thing | ||
camelia | rakudo-moar 693ca0: OUTPUT«Unexpected named parameter 'thing' passed in block <unit> at /tmp/fNS4g90x_c:1» | ||
n0tjack | hmm, thought that just create a Pair | ||
m: say :!f; | |||
camelia | rakudo-moar 693ca0: OUTPUT«Unexpected named parameter 'f' passed in block <unit> at /tmp/3Ni79PgFZm:1» | ||
PerlJam | aye, it does | ||
psch | m: say (:35thing) | ||
camelia | rakudo-moar 693ca0: OUTPUT«thing => 35» | ||
n0tjack | parens are extra magical in p6 | 15:08 | |
psch | m: :35things.say | ||
camelia | rakudo-moar 693ca0: OUTPUT«things => 35» | ||
psch | n0tjack: no, bare Pairs are named arguments | ||
n0tjack | m: say Pair("foo","bar"); | ||
camelia | rakudo-moar 693ca0: OUTPUT«Cannot find method 'Pair' in block <unit> at /tmp/eTH7WZt1ly:1» | ||
n0tjack | m: say Pair.new("foo","bar"); | ||
camelia | rakudo-moar 693ca0: OUTPUT«foo => bar» | ||
n0tjack | why should that be different | 15:09 | |
thowe | this must be wrong... :name => <arg> | ||
15:09
sivoais left,
diana_olhovik left
|
|||
PerlJam | thowe: eh? | 15:09 | |
psch | m: say (:name => <arg>) | 15:10 | |
camelia | rakudo-moar 693ca0: OUTPUT«(name => True) => arg» | ||
15:10
sivoais joined
|
|||
psch | n0tjack: "bare" was probably a bad choice of words. literal colonpairs are parsed as named arguments, as are fatarrow pairs with implicitely quoted key | 15:10 | |
m: say foo => bar | |||
camelia | rakudo-moar 693ca0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1AMsaMjm1dUndeclared routine: bar used at line 1. Did you mean 'bag'?» | ||
psch | m: say foo => "bar" | ||
camelia | rakudo-moar 693ca0: OUTPUT«Unexpected named parameter 'foo' passed in block <unit> at /tmp/HFpg5d40pR:1» | ||
psch | m: say "foo" => "bar" | ||
camelia | rakudo-moar 693ca0: OUTPUT«foo => bar» | ||
n0tjack | psch: ah, ok. makes sense. | 15:11 | |
synatically, how is the convenient sugar :$named_param ~~ :$named_param($named_param) justified? | 15:12 | ||
uh, I mean :named_param($named_param) | 15:13 | ||
thowe | I'm not quite sure what I've gotten when I've gotten "(name => True) => arg" | ||
n0tjack | thowe: you've got a Pair whose key is a Pair | ||
psch | n0tjack: i always understood it as "mirroring the signature for easy invocation" | ||
n0tjack | psch: Absolutely, and I have already made great use of it. But I'm not sure how to explain that grammatically. | 15:14 | |
psch | sub f(:name($name)) { } => sub f(:$name) { } | ||
thowe | n0tjack, so if that was given calling a function, how would I get "arg"? | ||
FROGGS | DRY | ||
psch | but that's just moving the goalpost, i realize | ||
n0tjack | thowe: I'm new to p6 myself, but I'd expect if you had that object as a scalar named $blah, you'd say something like $blah.value | 15:15 | |
psch | m: sub f(:$name) { $name.perl.say }; f :name => <arg> | 15:16 | |
camelia | rakudo-moar 693ca0: OUTPUT«Too many positionals passed; expected 0 arguments but got 1 in sub f at /tmp/jmJKprK9YS:1 in block <unit> at /tmp/jmJKprK9YS:1» | ||
n0tjack | psch: I ask because the lights went on for me yesterday when someone told me :blah is just sugar for creating a pair | ||
pmurias | jnthn: what should the nqp::for op evaluate to? | ||
jnthn: the comments in the implementation imply the input list | |||
psch | n0tjack: i guess FROGGS++ response is pretty good. DRY is an established principle | 15:17 | |
thowe | n0tjack, but the intention was to have a param named "name". Do I need to get that from the Collection or something? | ||
jnthn | pmurias: That's OK I guess. It certainly isn't expected to produce a new list | ||
pmurias: And null is maybe a bit harsh | |||
n0tjack | psch: No, I get the "why" of it. I'm asking about the "how" of it. | ||
pmurias | jnthn: but when I run it's the last element | ||
jnthn | hm | ||
psch | thowe: you're building the Pair wrongly. :name<arg> or name => <arg> is what you're looking for | ||
PerlJam | perhaps :name => <foo> should have some sort of warning | ||
jnthn | pmurias: I'm pretty sure we don't actually rely on what it evaluates to anywhere | ||
15:18
reneeb left
|
|||
psch | n0tjack: i'm not sure i follow. implementation? | 15:18 | |
thowe | psch, yeah, I started by saying "this must be wrong". But if it was given, how would it be accessed? Can it? | ||
jnthn | pmurias: I can believe it's "last element" too, but...it's not too useful :) | ||
pmurias | jnthn: paste.debian.net/315122 | ||
n0tjack | psch: the "how" of :stuff(42) is the colon creates a Pair | ||
15:18
sivoais left
|
|||
n0tjack | psch: I'm looking for similar insight into :$name | 15:18 | |
FROGGS | n0tjack: if the thing after the colon (which is a Pair of dots btw) looks like a variable, we take its name (without sigil/twigel) and its value to produce a Pair | 15:19 | |
jnthn wonders if nqp-j does that too | |||
n0tjack | psch: before I knew the colon created a Pair, the syntax looked like a bolted-on special case; after the explanation, I can see the elegance much more clearly | ||
FROGGS | twigil* | ||
jnthn | pmurias: If it's not a pain you could do similar. Alterntively the thing we iterated over may also be fine, but then we have to keep that around, which we needn't do | ||
thowe | anyway... thanks. gotta go to work... | ||
15:19
thowe left
|
|||
n0tjack | FROGGS: Yeah, I guess it is just that straightforward. I thought maybe there was some hidden justification. | 15:19 | |
jnthn | pmurias: Which is least annoying from a JS perspective, ooc? | 15:20 | |
pmurias: Most of the time the thing is in a void context anyway | |||
15:20
sivoais joined
|
|||
pmurias | jnthn: the least about of pain would be a null | 15:20 | |
jnthn: on the jvm it's an arrayiterator | 15:21 | ||
jnthn | pmurias: OK, if it's already ont consistent then...just do what's the least pain | 15:22 | |
15:22
Dom__ joined
|
|||
pmurias | jnthn: is there a reason why we seem to have (none) very little ops that don't return anything? | 15:23 | |
jnthn | pmurias: Largely a reflection of there being very little in Perl 6 that doesn't return something | 15:24 | |
pmurias: For bindattr, which could be a candidate, for example, it evaluating to the bound value makes $a := $!b := 42; easy to code-gen | 15:25 | ||
15:26
momoko joined
|
|||
psch | .tell thowe you can access it with .value for one: my $PoP = :name => <arg>; say $PoP.value | 15:27 | |
yoleaux | psch: I'll pass your message to thowe. | ||
15:27
momoko is now known as Guest3379
|
|||
Guest3379 | m: say 10, 9, 8, { $_ - 1 || last } ... *; | 15:27 | |
camelia | rakudo-moar 693ca0: OUTPUT«(...)» | ||
TimToady | pmurias: could have something to do with Perl 6 being a functional programming language | ||
15:28
Dom__ left
|
|||
Guest3379 | hi perl6, is this output correct? | 15:28 | |
pmurias | TimToady: it's even with things such as nqp::setscdesc | ||
15:28
sftp joined,
ely-se left
|
|||
psch | m: say eager 10, 9, 8, { $_ - 1 || last } ... *; | 15:29 | |
camelia | rakudo-moar 693ca0: OUTPUT«(10 9 8 7 6 5 4 3 2 1)» | ||
grondilu | Guest3379: yes, it's correct. The list is not evaluated by a say | ||
(not eagerly evaluated that is) | |||
15:29
sivoais left
|
|||
Guest3379 | thanks! | 15:29 | |
15:30
sivoais joined
|
|||
psch | r: sub circumfix:["@", "@"] ($a) { say $a }; @ 5 @ # o.o | 15:31 | |
15:31
s_kilk left
|
|||
camelia | rakudo-moar 693ca0: OUTPUT«5» | 15:31 | |
..rakudo-jvm 693ca0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfileTwo terms in a rowat /tmp/tmpfile:1------> 3 circumfix:["@", "@"] ($a) { say $a }; @7⏏5 5 @ # o.o expecting any of: infix infix stopper statement end …» | |||
psch | jvm breakage reached a new WAT vOv | ||
jnthn | :( | 15:32 | |
psch | jnthn: could that be related to the literal LTM patch? | ||
15:32
tokuhirom joined
|
|||
jnthn | psch: My one that made constants interpolate? | 15:32 | |
psch: No, that was a Perl 6 compiler patch for Perl 6 constant decls, while the code that adds custom ops is all in NQP | 15:33 | ||
psch | jnthn: oh, i guess i lacked contextual information. interpolated constants shouldn't do anything there | ||
15:33
blackcat_ left,
Guest3379 left
|
|||
psch | r: sub prefix:<$> { $^a.say }; my $a = "5"; $$a | 15:35 | |
camelia | ( no output ) | ||
psch | r: sub prefix:<$> { $^a.say }; my $a = "5"; $ $a | ||
camelia | rakudo-{moar,jvm} 693ca0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfileUndeclared routine: a used at line 1» | ||
psch | uh, yeah DIHWIDT :p | 15:36 | |
although i remember something along those lines that worked some time back... | |||
n0tjack | holy crap | ||
m: say 'h̟̖̻̻exCDxA1xCDx87xCCx9CxCCxA9xCCxB1xCCxB3xCCx9FxCCxACl̘l̠̩͚o̰̘̮̬̹̪'.chars; | |||
camelia | rakudo-moar 693ca0: OUTPUT«5» | ||
n0tjack | that's amazing | ||
15:36
tokuhirom left
|
|||
n0tjack | "making unicode go away" is like a top 5 reason to switch to p6 | 15:37 | |
m: say uc 'h̟̖̻̻exCDxA1xCDx87xCCx9CxCCxA9xCCxB1xCCxB3xCCx9FxCCxACl̘l̠̩͚o̰̘̮̬̹̪'; | |||
camelia | rakudo-moar 693ca0: OUTPUT«H̟̖̻̻E͇̜̩̱̳̟̬͡L̘L̠̩͚O̰̘̮̬̹̪» | ||
jnthn | I'm glad Perl 6 is less confused about that string than my terminal... :) | ||
psch | s/go away/silently work reasonably/ | ||
n0tjack | hahahaha | ||
psch | m: say fc 'h̟̖̻̻exCDxA1xCDx87xCCx9CxCCxA9xCCxB1xCCxB3xCCx9FxCCxACl̘l̠̩͚o̰̘̮̬̹̪'; | 15:38 | |
camelia | rakudo-moar 693ca0: OUTPUT«(signal ABRT)» | ||
psch | ooohh | ||
jnthn | ABRT is...a bit unfortunate | ||
jnthn only added fc yesterday, and didn't do the NFG handling for it yet | |||
But I thought it should hit an NYI exception | 15:39 | ||
n0tjack | m: fc 'hello'; | ||
camelia | ( no output ) | ||
15:39
sivoais left
|
|||
psch | yeah, i was thinking it was probably still on a specific TODO list somewhere... | 15:39 | |
n0tjack | m: say fc 'hello'; | ||
camelia | rakudo-moar 693ca0: OUTPUT«hello» | ||
psch | m: say fc 'hÄllö' | ||
camelia | rakudo-moar 693ca0: OUTPUT«hällö» | ||
Ven | jnthn: wow, nodejs gave me 27 | 15:40 | |
15:41
sivoais joined
|
|||
Ven | ruby same. I guess most will | 15:41 | |
n0tjack | Ven: like I said, top 5 reason. | ||
anyone know why the REPL doesn't grok arrow keys / line recall on my Mac? | 15:42 | ||
15:43
RabidGravy joined
|
|||
psch | n0tjack: you need to install LineNoise with panda | 15:43 | |
n0tjack | thanks | 15:44 | |
jnthn | Ven: Wow! | ||
timotimo | n0tjack: wit a lowercase n i believe | 15:45 | |
psch | hmm, anyone have an idea where i should BP for implicit return on jvm..? :) | ||
r: sub f { sub g { 42 } }; f()() # had to pin this NPE down | |||
*hard | 15:46 | ||
camelia | ( no output ) | ||
..rakudo-jvm 693ca0: OUTPUT«java.lang.NullPointerException in block <unit> at /tmp/tmpfile:1» | |||
dalek | kudo/nom: 7b54492 | TimToady++ | src/core/Any-iterable-methods.pm: Add produce method to do triangle reduce |
||
15:46
domidumont left
|
|||
dalek | ast: d93ef20 | TimToady++ | S32-list/produce.t: add tests for produce |
15:47 | |
psch | oh, there was advice already re: that bug | ||
something about compile_all_the_stmts iirc | |||
15:48
patrickz joined
|
|||
dalek | kudo/nom: d05cb80 | TimToady++ | t/spectest.data: add S32-list/produce.t |
15:48 | |
psch | right, i got pretty much nowhere trying to compare the moar logic to jvm for void handling | ||
15:49
sivoais left
|
|||
n0tjack | oh god that's so much better; psch++ | 15:50 | |
15:51
sivoais joined
15:52
laouji joined
|
|||
psch | n0tjack: iirc you also get tab completion for CORE functions with linenoise | 15:53 | |
and methods too | |||
15:53
xfix joined,
xfix left,
xfix joined
|
|||
ab6tract | is windows still the blocker on getting Linenoise distributed with rakudo? | 15:53 | |
n0tjack | I have vim setup with p6 syntax highlighting, but haven't done much more than that for tab completion etc | 15:54 | |
15:54
FROGGS left
15:55
xfix left,
xfix joined
|
|||
timotimo | we have ctags for perl6, but i'm not sure that gives you tab completion | 15:55 | |
but at least the perl6 vim thing sets up - and ' as valid inside-identifier-characters | 15:56 | ||
psch | was tab completion in the REPL pulled from linenoise? | ||
15:57
Kogurr left
|
|||
timotimo | in the repl! | 15:57 | |
i thought n0tjack was talking about vim | |||
yeah, linenoise can tab-complete | |||
15:57
Ven left
|
|||
psch | yeah, the sudden talk of vim confused me as well, tbh | 15:57 | |
15:59
patrickz left,
sivoais left
|
|||
tony-o | :wq | 16:00 | |
timotimo memfrobs tony-o's buffer | |||
16:00
patrickz joined
|
|||
tony-o | sounds hot | 16:00 | |
16:01
sivoais joined
16:02
patrickz left
|
|||
n0tjack | it was a train of thought where you guys only saw the caboose (linenoise -> tab completion -> need to get that set up in vim too) | 16:06 | |
tony-o | doesn't ctrl+r or something in vim do something similar? | 16:07 | |
ctrl+n | |||
n0tjack: this looks cool too github.com/Valloric/YouCompleteMe | 16:08 | ||
timotimo | yeah, ctrl-n and ctrl-p is the opposite direction | ||
vim has like 8 different kinds of completion | 16:09 | ||
tony-o | ah | ||
16:10
sivoais left,
FROGGS joined
|
|||
pmurias | compiler/editor integration for Perl 6 would be awesome | 16:10 | |
eiro | a vi clone written in perl6 would be awesome | 16:11 | |
hello everyone | |||
16:11
sivoais joined
|
|||
tony-o | lol. | 16:11 | |
timotimo | first build something that makes terminal emulators less finnicky | ||
pmurias | convincing people to switch editors is really hard | 16:14 | |
timotimo | yeah, because the only good editor is vim (or vim-like editors) | 16:16 | |
so switching editors means switching from a vim to a not-vim :p | |||
psch is reminded of the "A Whole New World" talk, re: finnicky terminal emulators | |||
pmurias | for some weird reason getting people to switch to vim is also hard | ||
16:16
zakharyas left
|
|||
timotimo | haha | 16:16 | |
yeah, because then they're switching away from notepad, which does exactly what they expect | |||
press a button, get a character | 16:17 | ||
psch | 'what do you mean ci" is not intuitive?' | ||
tony-o | hah | 16:18 | |
psch actually usually uses F"ct" instead of ci", though | |||
timotimo | oh? | ||
why is that? | |||
psch | muscle memory, mostly | ||
timotimo | ci" will also search for a " to thel eft or right | ||
psch | well, it's probably T"ct" | 16:19 | |
yeah, ci" is probably the better sentence, i'm just not used to it :) | |||
timotimo | :) | ||
ok, afk for a bit | |||
16:20
sivoais left
16:22
Celelibi_ is now known as Celelibi,
sivoais joined
|
|||
n0tjack | tony-o: that does look cool | 16:23 | |
16:28
Ven joined
|
|||
FROGGS | jnthn / lizmat: the MOPy stuff passes all tests (even some of the new TODOs), but fails the exploding :D attribute tests (which were under discussion anyway) | 16:29 | |
16:30
sivoais left
|
|||
FROGGS | jnthn: do you also think that 'has Any:D $.foo' should not explode until object instanciation time? so that :D kinda implies 'is required' ? | 16:30 | |
16:31
antiatom left,
^elyse^ joined
|
|||
jnthn | FROGGS: We could make it imply "is required" for attrs I guess... | 16:32 | |
16:32
sivoais joined
|
|||
FROGGS | k | 16:32 | |
jnthn | FROGGS: For lexicals we probably should continue as we already are and demand an initializer | ||
FROGGS: Making it imply "is required" feels a little dirty but people didn't seem to like being forced to provide a default... | 16:33 | ||
FROGGS | jnthn: yes, when there is no initializer, I just check if the default value matches the bind constraint | ||
jnthn | +1 | ||
Oh | |||
Actually | |||
FROGGS | to allow: | ||
m: my Int:D $a is default(0) | |||
camelia | rakudo-moar d05cb8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/mUAf92dtdZDefault value '0' will never bind to a parameter of type Int:D (with implicit :D)at /tmp/mUAf92dtdZ:1------> 3my Int:D $a is default(0)7⏏5<EOL> expecting any of: constra…» | ||
jnthn | Maybe don't make it imply "is required", just check if it's marked "is default" or "is required" | ||
(for attributes, I mean) | 16:34 | ||
FROGGS | hmm? I dont get that | ||
jnthn | has Int:D $.x is default(1); # ok | ||
has Int:D $.x is required; # ok | |||
has Int:D $.x = 1; # ok | |||
has Int:D $.x; # error like now | |||
16:35
laouji left
|
|||
FROGGS | well, that's almost what I got now | 16:35 | |
jnthn | What bit is different? The last one automatically adds "is required"? | ||
FROGGS | no, I planned to make it so, but it is not yet in | 16:36 | |
jnthn is a tiny bit reluctant | |||
FROGGS | I check for the default trait, but not the required trait | ||
jnthn | Ah | ||
Let's maybe try adding the check for required (which also makes it OK) | |||
FROGGS | well, I check for the default trait indirectly, by checking the value after running the trait | ||
jnthn | ah | 16:37 | |
Yeah, it's going to be a special case for attributes whatever we do | |||
FROGGS | yeah | ||
I was also not very fond of making :D meaning 'is required later' | |||
because that implies that you always want defined values ever, which is not true | 16:38 | ||
especially because we have that many undefined things | |||
16:38
pmurias left
|
|||
n0tjack | in a regex, is * only the "whatever star" when it's used in a range (i.e. adjacent to a ..)? | 16:38 | |
psch | grrr object.asm | 16:39 | |
java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: 0 | |||
n0tjack | the example a ** 3..* threw me | ||
psch | that's not helpful for why codegen fails! | ||
n0tjack: right, * as a quantifier is still "zero or more times", but on the rhs of a range it's same as in Perl 6 itself | 16:40 | ||
16:40
sivoais left
|
|||
psch | n0tjack: ** is the new way of writing {m,n}, where m,n turns into m..n as rhs to ** | 16:40 | |
(given you have perl5 background and that's a useful translation) | 16:41 | ||
n0tjack | yes, it is, thank you | ||
16:41
Vivek joined
16:42
Vivek is now known as Guest9682
|
|||
psch | m: say "aaaa" ~~ m:g/(a ** 1..*)/ | 16:42 | |
camelia | rakudo-moar d05cb8: OUTPUT«(「aaaa」 0 => 「aaaa」)» | ||
psch | m: say "aaaa" ~~ m:g/(a) ** 1..*/ | ||
camelia | rakudo-moar d05cb8: OUTPUT«(「aaaa」 0 => 「a」 0 => 「a」 0 => 「a」 0 => 「a」)» | ||
16:42
sivoais joined
|
|||
psch | oh | 16:42 | |
m: say "aaaa" ~~ m:o/(a) ** 1..*/ | |||
camelia | rakudo-moar d05cb8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/fmoMXwldCsAdverb o not allowed on mat /tmp/fmoMXwldCs:1------> 3say "aaaa" ~~ m:o/(a) ** 1..*/7⏏5<EOL>» | ||
n0tjack | makes sense, but my brain is *insisting* that that's got a /.*/ in it | ||
psch | m: say "aaaa" ~~ m:ov/(a) ** 1..*/ | ||
camelia | rakudo-moar d05cb8: OUTPUT«(「aaaa」 0 => 「a」 0 => 「a」 0 => 「a」 0 => 「a」 「aaa」 0 => 「a」 0 => 「a」 0 => 「a」 「aa」 0 => 「a」 0 => 「a」 「a」 0 => 「a」)» | ||
psch | m: say "aaaa" ~~ m:ov/(a ** 1..*)/ | 16:43 | |
camelia | rakudo-moar d05cb8: OUTPUT«(「aaaa」 0 => 「aaaa」 「aaa」 0 => 「aaa」 「aa」 0 => 「aa」 「a」 0 => 「a」)» | ||
psch | *that's* what i wanted... :) | ||
Guest9682 | hi | ||
Ven | \o | ||
psch | hi Guest9682 | ||
Guest9682 | when is general release of perl6? | 16:44 | |
PerlJam | Guest9682: every month | 16:45 | |
Ven | Guest9682: 6.0 is planned for christmas | ||
but fwiw, I've been using rakudo in production for more than a year now | |||
n0tjack | Ven: what does your prod system do | 16:46 | |
Ven | n0tjack: tons of stuff. it used to just process a few files together when it got ping'd | ||
n0tjack | I guess what I'm asking is, how bad would it hurt if it went down | ||
Guest9682 | ok thanks | ||
Ven | at that $internship, I don't know what it does now, since my internship ended several months ago... but I expect it's still there running in the background :P | 16:47 | |
n0tjack | haha | ||
FROGGS | huh, checking for required attributes (or even setting it) seems to be a one-line patch | ||
jnthn | Guest9682: To clarify the conflicting info: the Perl 6.0 language definition and a comforming implementation are planend for Christmas, but as we converge on it we make compiler releases every month. | ||
(And will continue to make them every month after it, to quickly push out perf improvements, fixes, etc. How fast distributions choose to follow that is up to them.) | 16:48 | ||
Guest9682 | I wanted to learn a scripting language, which should I choose, Python 3 or Perl 6? | ||
[Coke] | FROGGS: required attributes already work, you should be able to just set whatever "is required" is setting there. | ||
n0tjack | Guest9682: check the titleof the room ;) | ||
PerlJam | Guest9682: you realize your audience will be biased? | 16:49 | |
[Coke] | Guest9682: well, we're going to tell you #perl6, of course. | ||
n0tjack | Guest9682: more seriously, perl6 is newer and has a ton of really cool, never seen before features | ||
16:49
krunen_ left
|
|||
n0tjack | if you have any in programming languages qua languages, perl6 is the way to go | 16:50 | |
16:50
sivoais left
|
|||
n0tjack | *any interest | 16:50 | |
Juerd | Guest9682: What, in your opinion, is a "scripting" language? | ||
I'm not sure Perl 6 qualifies | |||
[Coke] | Juerd: I would say it does, sure. | 16:51 | |
n0tjack | imo, a "scripting language" is "one which doesn't get in your way", and p6 definitely qualifies for that | ||
Juerd | [Coke]: Depends on one's definition I think. | ||
[Coke] | but the whole scripting vs. not classification doesn't mean as much these days. | ||
Juerd | [Coke]: I've seen "scripting language" defined as a language that's used to customize or automate parts of a larger program | 16:52 | |
16:52
sivoais joined
|
|||
Juerd | Like how Javascript is supposed to extend the browser's functionality, or how Perl can be used to automate irssi, or the difference between VB and VBA. | 16:53 | |
psch | and like C compiled to dlls for overriding directx hooks to change a games functionality..? | 16:54 | |
Juerd | As far as I know, Perl 6 is not (yet) used write scripts for programs in, but the code written in Perl 6 is typically a program by itself or a module. | ||
psch: Heh, possibly. | |||
Guest9682 | :) thanks. Everyday I read news related to perl6 and I am happy that it is finally releasing this christmas. | ||
dalek | ast: 2f6fd89 | jnthn++ | S15-nfg/case-change.t: A bunch more tests covering NFG casing issues. Hopefully correct, and covering various edge cases; there's no doubt some further ones. |
16:55 | |
Juerd | I wouldn't write CGI scripts in Perl 6 either, because of the startup overhead. But same goes for Perl 5 with Moose :P | ||
16:56
paulmr joined
|
|||
PerlJam | Juerd: no one writes CGI scripts these days anyway ;) | 16:58 | |
Juerd | PerlJam: Actually, I do. And I've been asked to extend existing ones. | 16:59 | |
In fact, I've been hacking on a 24 ksloc CGI script yesterday. One file :( | |||
16:59
weihan left
17:00
gonz_ left
|
|||
FROGGS | [Coke]: exactly | 17:00 | |
17:01
firstdayonthejob joined,
sivoais left,
Guest9682 left
17:03
sivoais joined,
Ven left
|
|||
[Coke] | Juerd: for me scripting was always as opposed to compiled. e.g. C is compiled, Tcl is scripting, and things were on the spectrum between. These days, it doesn't mean so much to me. maybe your meaning is the new one in the wild, I hadn't heard that one. | 17:03 | |
Juerd | I thought that was interpreted vs compiled | 17:04 | |
psch mostly agrees with [Coke] | |||
the distinction is in "what do i distribute" for me | |||
if it's a script it's in a scripting language | |||
Juerd | Are dynamic, interpreted, scripting the same thing now? :D | ||
psch | if it's a binary it's a compiled language | ||
but that's not a useful distinction because exceptions... | |||
so i'm not using the distinction | 17:05 | ||
Juerd | So if you distribute C source code for a program, C's a scripting language? | ||
psch | Juerd: that's one of the exceptions that makes the distinction useless, in my eyes :) | ||
n0tjack | I stand by "if the language gets out of my way, it's a scripting language" | 17:06 | |
a good test is the existence of a (useful) REPL | |||
psch | fwiw, wikipedia does have an article on "Scripting language" | ||
17:06
larion left
|
|||
psch | n0tjack: java has at least one pretty good REPL, nowadays... :) | 17:06 | |
n0tjack | psch: and how much can you express in one line of Java? ;) | 17:07 | |
psch | bash.org/?946461 | ||
scnr | |||
n0tjack | hahaha | ||
skids | The other layer of "scripting" other than compilation is that "scripts" make other components from "external" software do things. | 17:08 | |
n0tjack | I've written very many "scripts" in my life, almost none of them invoked external programs | 17:09 | |
I do a lot of statistical analysis | |||
17:09
ab6tract left
|
|||
skids | Not necessarily an invoke, just not a whole-cloth "built-here" thing. | 17:09 | |
In that respect nci, use :from<> are key to "scripting" capabilities. | 17:10 | ||
Juerd | On startup overhead: | 17:11 | |
1;0 juerd@cxie:~$ strace perl -E'say "Hello, world!"' 2>&1 | wc -l | |||
206 | |||
1;0 juerd@cxie:~$ strace perl6 -e'say "Hello, world!"' 2>&1 | wc -l | |||
994 | |||
17:11
sivoais left
|
|||
Juerd | That's a huge amount of system calls. Haven't looked at them yet. | 17:11 | |
17:14
sivoais joined
|
|||
pink_mist | huh, I get 294 for ther perl5 one | 17:14 | |
*the | |||
psch throws 216 in as another number | 17:15 | ||
pink_mist | strace perl -e'print "Hello, world!\n"' 2>&1 | wc -l <-- this version gives me 278 | 17:16 | |
n0tjack | I just got the *weirdest* error message | 17:17 | |
then I realized I typed perl -e, instead of perl6 -e ... | |||
dalek | ast: 7d0f82e | jnthn++ | S15-nfg/case-change.t: Correct NFD; those things decompose. |
||
17:22
coetry joined
17:23
ovidnis left,
sivoais left
|
|||
coetry | Hello folks, i installed rakudo-start via homebrew on osx, and it came coupled with panda, but everytime I try to install a panda module, I get an error similar to this:gist.github.com/coetry/2e05d107115015aad5ca | 17:24 | |
I also tried going on panda's github page and installing it manually, but when i run `perl6 boostrap.pl`, I get a compilation error | |||
psch | coetry: what's the output of perl6 --version? | 17:25 | |
17:25
sivoais joined
|
|||
coetry | This is perl6 version 2015.03 built on MoarVM version 2015.03 | 17:25 | |
psch | |||
n0tjack | I installed mine a couple days ago; mine says 2015.09 | ||
psch | n0tjack: with homebrew on osx? | 17:26 | |
n0tjack | yeah | ||
psch | coetry: that version is about half a year out of date, according to n0tjack you need to update your homebrew (or something like that, i don't use OSX :) ) | ||
coetry | ok thanks | ||
psch | does it have something equivalent to apt-get update | ||
coetry: and of course afterwards rebuild rakudo | |||
17:27
espadrine left
|
|||
coetry | correct, thanks | 17:27 | |
17:27
^elyse^ left
|
|||
psch | right, "brew update" it is, according to the docs | 17:27 | |
17:28
antiatom joined
|
|||
coetry | yup yup, thanks bud | 17:30 | |
17:34
tokuhirom joined,
sivoais left
17:35
sivoais joined,
laouji joined
17:36
llfourn joined
17:39
tokuhirom left
17:40
lichtkind joined,
laouji left
17:41
llfourn left
17:43
adu joined,
sivoais left
17:45
sivoais joined
17:49
^elyse^ joined
17:50
gonz_ joined,
gonz_ left
17:51
gonz_ joined
17:53
sivoais left
17:55
sivoais joined
|
|||
jdv79 | _itz_: ping | 17:59 | |
18:04
sivoais left
18:05
sivoais joined
|
|||
n0tjack | the butterfly book has an example m/(\w+)% % [\,\s*]/ is that first % a typo? Or some weird kind of quantifier I'm unfamiliar with? (the second % I get) | 18:10 | |
m: 'eggs, milk, sugar, and flour' ~~ m/(\w+)% % [\,\s*] \s* 'and' \s* (\w+)/; say $/[0]; | 18:11 | ||
camelia | rakudo-moar d05cb8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7xB_teJA2HMissing quantifier on the left argument of %at /tmp/7xB_teJA2H:1------> 3ggs, milk, sugar, and flour' ~~ m/(\w+)%7⏏5 % [\,\s*] \s* 'and' \s* (\w+)/; say $/[» | ||
psch | that looks all kinds of wrong to my eyes | ||
timotimo | yes, % only works after a regular quantifier | 18:12 | |
n0tjack | yeah, I want something more long-form to read up on Grammars and Rules and such, but I'm a little leery of depending on an outdated book | ||
timotimo | what's the butterfly book? github:perl6/book ? | ||
the docs were too short for you? | |||
n0tjack | yeah, Using Perl6, with the butterfly on the cover | ||
timotimo | OK | ||
n0tjack | rather than long form, I should say "discursive" | ||
psch | what i think it could mean is m/(\w+)+ % [\,\s*] \s* 'and' \s* (\w+)/ | ||
18:13
sivoais left
|
|||
timotimo | i always found S05 pretty good to read | 18:13 | |
n0tjack | yeah, that aligns better with the discussion after the pattern too | ||
psch | m: 'eggs, milk, sugar, and flour' ~~ /(\w+)+ %% [\,\s*] \s* 'and' \s* (\w+)/; say $/ | 18:14 | |
camelia | rakudo-moar d05cb8: OUTPUT«「eggs, milk, sugar, and flour」 0 => 「eggs」 0 => 「milk」 0 => 「sugar」 1 => 「flour」» | ||
psch | that, actually | ||
i don't remember the distinction between % and %% in regex off-hand | |||
n0tjack | what's the %% all about? | ||
I thought % meant "with separator" | |||
timotimo | the %% allows the thing to appear after the end again | ||
n0tjack | ah, ok | ||
timotimo | so "foo,bar,baz" vs "foo,bar,baz," | ||
%% allows both, % only the first kind | |||
psch | ah | ||
%% is for the oxford comma :) | |||
timotimo | i read "%%" as "one extra %" | 18:15 | |
18:15
sivoais joined
|
|||
timotimo | should we put "unexpected routine 'unit', did you mean 'uniq'?" into the FAQs? | 18:15 | |
because that's an extremely common sign for "your rakudo is way out of date" | |||
moritz | timotimo: +1 | 18:18 | |
psch | does sound rather useful, considering we can't guarantee we'll have 6.christmas in every package manager when it's out | ||
18:20
vendethiel joined
|
|||
masak | +1 | 18:21 | |
18:23
sivoais left,
leont joined
|
|||
[Coke] | timotimo: no. | 18:24 | |
.. but I am overruled. ok. :) | |||
n0tjack | huh, tokens and rules are simpler than I thought they'd be | ||
18:25
sivoais joined
18:27
coetry left
|
|||
timotimo | we can't put "i see a 'unit' here so i must be out of date" checks into the old rakudos now :P | 18:28 | |
DrForr | n0tjack: I'm writing a talk on those for Cluj.pm :) | ||
timotimo | n0tjack: perl6 grammars have been intentionally made simpler than perl5 regexes wherever possible | 18:29 | |
so it makes sense :) | |||
n0tjack | DrForr: preprint? :) | ||
DrForr | Not at the moment, I'm looking over perl6-ANTLR so I remember what I thought were the sticking points. | 18:31 | |
n0tjack | timotimo: "a token is just a non-backtracking regex" and "a rule is a token with sigspace", and here i was thinking they'd be some complex and scary recursive-descent LL(k) something something | ||
18:33
mattprelude joined
|
|||
psch | n0tjack: all of Perl 6 is full of "gee, that's it? i thought this was gonna be *hard*..?" | 18:33 | |
at least that was my impression when learning it :) | 18:34 | ||
18:34
sivoais left
|
|||
psch | s/learning/starting to learn/ # probably fitting, not like i know all of it | 18:35 | |
FROGGS | n0tjack: reducing the "lists to remember" was one of the big design principles (and still is) | ||
timotimo | my biggest problem with learning perl6 at the beginning was that "has $.foo" had a sigil, but i didn't put the sigil anywhere when i accessed $instance.foo | ||
"where do i put the dollar sign?! how do i even ... gaah!" | |||
FROGGS | so, when you implemented something, and needed a matrix to describe its behaviour, you did your job wrong | ||
psch .oO( and what better way to learn perl6 than by hacking the backend layers or the language itself... ) | |||
FROGGS | :P | 18:36 | |
18:36
sivoais joined
|
|||
timotimo | well, personally, my descent into the madness that is backend hacking started when i noticed junctions were ridiculously slow even when the static optimizer could completely bypass junctions | 18:37 | |
and so i built an optimization | |||
psch | hmm, i guess my actual first backend contribution was the jvm interop improvements | 18:38 | |
things like tr/// and throwing typed exceptions from the optimizer don't really count i guess | |||
moritz started really boring, with tests | |||
psch: sure it counts; it's compiler hacking after al | |||
l | |||
psch | moritz: well, yes, it's compiler hacking, but does that make it backend hacking? | 18:39 | |
tadzik | it's in the backend of the compiler even :) | ||
TimToady | m: sub infix:<op>($a,$b,$c) { $a + $b * $c }; say (1..9).reduce({ $^a + $^b * $^c }) | ||
camelia | rakudo-moar d05cb8: OUTPUT«141» | ||
moritz | psch: traditionally, the frontend of the compiler is the parser | ||
TimToady | m: sub infix:<op>($a,$b,$c) { $a + $b * $c }; say (1..9).reduce(&infix:<op>) | ||
camelia | rakudo-moar d05cb8: OUTPUT«Use of uninitialized value <element> of type Any in string contextAny of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in block <unit> at /tmp/jVefGwmYu_:1141» | ||
moritz | psch: so anything behind it is backend, ish | ||
flussence | idea: have fatal parse error messages check whether your rakudo is more than a year old, and print a suggestion to upgrade if it is | 18:40 | |
TimToady | m: sub infix:<op>($a,$b,$c) { $a + $b * $c }; say [op] 1..10 | ||
camelia | rakudo-moar d05cb8: OUTPUT«Too few positionals passed; expected 3 arguments but got 2 in sub infix:<op> at /tmp/hVYzsGwaGs:1 in block <unit> at /tmp/hVYzsGwaGs:1» | ||
moritz | flussence: -1 | ||
TimToady | m: sub infix:<op>($a,$b,$c) { $a + $b * $c }; say [op] 1..9 | ||
camelia | rakudo-moar d05cb8: OUTPUT«Too few positionals passed; expected 3 arguments but got 2 in sub infix:<op> at /tmp/imzAPrqlmi:1 in block <unit> at /tmp/imzAPrqlmi:1» | ||
flussence | yeah, figured :) | ||
moritz | flussence: I want my old code to work on my old compiler :-) | ||
flussence | but your old code wouldn't be generating parse errors on that compiler... | ||
timotimo | in the beginning i did a bunch of work with "testneeded" tickets in RT ... and forgetting to update the "plan" line at the top of the file like 9 times out of 10 :D | 18:41 | |
causing everybody grief | |||
FROGGS | my first contribution was fixing a bug when merging symbols wenn importing traits from two different modules... took two months | ||
when* | |||
moritz remembers FROGGS++'s fun | 18:42 | ||
18:44
sivoais left
|
|||
timotimo | oh hey TimToady | 18:44 | |
TimToady: do we know if using $*ACTIONS rather than hanging the actions object off of the ParseShared costs us much? | 18:45 | ||
oh, dinner | |||
18:46
sivoais joined
|
|||
FROGGS | moritz: and the fun thing was that jnthn explain something to me which I did not understand well enough; so I tried my ways through it, to finally understand what he said to solve the issue that way | 18:46 | |
which still happens today | |||
18:46
^elyse^ left
18:48
Ven joined
18:49
^elyse^ joined
|
|||
n0tjack | ack! | 18:50 | |
m: sub infix:<#>($a, $b) {say $b;}; 'hi' # 'there'; | |||
camelia | rakudo-moar d05cb8: OUTPUT«WARNINGS:Useless use of constant string "hi" in sink context (line 1)» | ||
n0tjack | wait, that worked in my REPL | 18:51 | |
well, really best that it doesn't. I was worried. | |||
18:52
ienh left
18:54
sivoais left
18:55
sufrosti1o left
|
|||
moritz | the REPL doesn't put the last statement in sink context, to be able to print it | 18:55 | |
psch | n0tjack: well, it's TODO'd in S06-operator-overloading/sub.t | ||
18:55
sufrostico left
|
|||
psch | i.e. it's tenetively (sp?) supposed to work, but doesn't yet | 18:56 | |
18:56
sivoais joined
|
|||
n0tjack | why is that a feature request? just because Perl? | 18:56 | |
psch | it's not a feature request, it's a part of the specification | ||
unless it gets removed vOv | |||
...or maybe delayed for after 6.christmas | 18:57 | ||
n0tjack | yeah, sorry, terminology. "why was that considered desirable sufficient to include it in the language spec" | ||
psch | n0tjack: because CORE ops aren't special | ||
n0tjack | is # an op? | ||
it's meta-linguistic | |||
18:58
ab6tract joined
|
|||
psch | if "comment starts here" is not an op, how can we support slangs that want other characters for their comments? | 18:58 | |
n0tjack | I'm not familiar with "slangs", but in other programming languages, the text to parse is an input, and the parser can handle it however it wants, irrespective of the syntax of the host language | 18:59 | |
tony-o | m: sub infix:<***> { @_.join(' ').say; }; 'hi' *** 'there'; | ||
n0tjack | is a slang a mini-language properly embedded in a perl script? | ||
camelia | rakudo-moar d05cb8: OUTPUT«hi there» | ||
psch | n0tjack: a slang is a sub language, yes | 19:00 | |
tony-o | can also be used to augment the way things directly inside the script work | ||
n0tjack | ... you guys have already created a brainf*ck slang, haven't you? | ||
psch | n0tjack: although slangs are probably not the best argument there; every new foofix declaration effectively creates something like a slang | ||
n0tjack | I do like foofix declarations | ||
tony-o | n0tjack: github.com/tony-o/perl6-slang-sql | 19:01 | |
n0tjack | I redefined log to be binary, because I don't like parens | ||
psch | n0tjack: not that i'm aware. i wrote a (bad and limited) ASM parser though | ||
cognominal_ | n0tjack, also regex and quotes are parsed by specialized slangs in Perl 6 | ||
psch | n0tjack: there's v5, which is (parts of, because stalled) perl5 implemented as Perl 6 grammar | ||
n0tjack | yeah, I knew v5 compat was a goal of p6 from the getgo | 19:02 | |
this is an interesting and general way to achieve that | |||
psch | well, the working and recommend path currently is Inline::Perl5, which is Nativecall to perl5.so (or whatever that so is called...) | ||
TimToady | timotimo: I'm more worried about hanging the actions on the right peg, which is the cursor, since you can pass cursors outside your current dynamic scope | ||
though as dynvars go, $*ACTIONS is one of the more expensive ones, along with $*W | 19:03 | ||
psch | n0tjack: github.com/masak/ipso might be interesting for you | 19:04 | |
19:04
sivoais left
|
|||
n0tjack | psch: oh, actually that's quite topical to what I'm reading up on right now. thanks brother. | 19:05 | |
(or sister) | |||
19:05
Ven left
19:06
sivoais joined
19:09
Ven joined
|
|||
ab6tract | so I'm curious as to how far I can extend my answer to stackoverflow.com/questions/3302943...9#33037839 | 19:09 | |
the obvious next step would be creating a constant inside of the OUTER or ... IMPORTER ? do we already have a "large lexical" for accessing an imported class? or is there an even more direct troute that Perl 6 provides that I'm not thinking of right now | 19:11 | ||
*an OUTER | |||
psch | ab6tract: your current answer is missing two colons, isn't it? | 19:12 | |
ab6tract | psch: ah yes! thanks for pointing it out. fixed. | 19:13 | |
19:14
sivoais left
|
|||
n0tjack | is there a cheaper way to ask "how many newlines" than .split("\n").elems? | 19:15 | |
psch | m: "a\nb\nc".split("\n").elems.say | 19:16 | |
camelia | rakudo-moar d05cb8: OUTPUT«3» | ||
psch | m: "a\nb\nc".comb("\n").elems.say | ||
camelia | rakudo-moar d05cb8: OUTPUT«2» | ||
psch | n0tjack: not sure about "cheaper" but "correcter" is with .comb | ||
19:16
sivoais joined
|
|||
n0tjack | psch: ah, good catch | 19:17 | |
psch | m: "a\nb\nc".comb("\n").say; say now - BEGIN now | ||
camelia | rakudo-moar d05cb8: OUTPUT«( )0.01508313» | ||
psch | m: "a\nb\nc".comb("\n").elems.say; say now - BEGIN now | ||
camelia | rakudo-moar d05cb8: OUTPUT«20.0113984» | ||
19:17
telex left
|
|||
psch | m: say +("a\nb\nc" ~~ tr/\n//); say now - BEGIN now | 19:18 | |
camelia | rakudo-moar d05cb8: OUTPUT«Cannot modify an immutable Str in block <unit> at /tmp/bvUoW7smEj:1» | ||
n0tjack | you'd have to test a much huger string | ||
and average out the timings | |||
psch | m: my $_ = ("a\nb\nc");say +(tr/\n//); say now - BEGIN now | ||
camelia | rakudo-moar d05cb8: OUTPUT«Potential difficulties: Redeclaration of symbol $_ at /tmp/f_YCUJu_59:1 ------> 3my $_7⏏5 = ("a\nb\nc");say +(tr/\n//); say now -20.0766607» | ||
psch | m: $_ = ("a\nb\nc");say +(tr/\n//); say now - BEGIN now | ||
camelia | rakudo-moar d05cb8: OUTPUT«20.025041736» | ||
19:18
telex joined
|
|||
psch | yeah, no need, i know enough :) | 19:18 | |
tr/// is slow | |||
luckily i didn't implement .trans, which is the slow bit :P | |||
n0tjack puts "phasers" on the TOREAD list | 19:19 | ||
psch | S99:blast | ||
synbot6 | Link: design.perl6.org/S99.html#blast | ||
pink_mist | so where's the doc about photon torpedoes? | 19:20 | |
FROGGS | hmmm, seems my Type:D patch is not sufficient yet... it complains about an abstract type T | 19:22 | |
masak | in all fairness, the abstract type T is such a pain in the backside :P | 19:23 | |
FROGGS | :P | ||
Ven | n0tjack: I explain phasers a bit in the learnxinyminutes | ||
masak <-- quipping all the way to Christmas | |||
lizmat | .oO( shifty types, those abstract ones ) |
||
Ven | (if you have feedback for that, I'd very gladly take it) | ||
psch | "Cannot invoke this object" as an nqp compilation error on a line that does a bind..? o.o | 19:25 | |
19:25
sivoais left,
Kogurr joined
|
|||
psch | oh, no, misread the trace | 19:25 | |
it's the call to QAST::OperationsJAST.box two lines further down | 19:26 | ||
n0tjack | Ven: LearnXinYMinutes is why I'm here :) S | ||
that's what finally pushed me over the edge to download the thing | |||
Ven | n0tjack: ohhh, that's good to know :-). | ||
I've read a few people say it was far too big... | |||
n0tjack | not for me, I wanted more | ||
psch | ohh | 19:27 | |
19:27
sivoais joined
|
|||
cognominal_ | Ven++ | 19:27 | |
19:27
Hor|zon left
|
|||
Ven | n0tjack: that's great to hear :-). I probably won't add *more* quite yet though (though I do have a list of what I'd like to add) | 19:27 | |
maybe I should just add everything I want, and add a big disclaimer "you'll learn the whole language here" | 19:28 | ||
n0tjack | I'm reading the butterfly book now | ||
also a very good, accessible treatment | |||
19:29
ienh joined
19:30
ab6tract left
|
|||
Ven | n0tjack: well, if you have any critiques, I'd gladly listen | 19:31 | |
n0tjack | Ven: When I get a little more experience using the language, I'll be in a better position to go back and give informed feedback | 19:34 | |
Ven | n0tjack: the position you're in is also very, very interesting | ||
19:34
firstdayonthejob left
19:35
sivoais left
19:36
sufrostico joined
19:37
sivoais joined
|
|||
n0tjack | ok, so to the best of my recollection, my experience was (a) "hey, this is all code, awesome", because if a language can't sell itself, I don't want to hear your sales pitch | 19:37 | |
and enticed by that (and my previous investigations of p6), it was something like | |||
cool. cool. cool. I want that. Oh, and that! I want that! Hey, I wish I could do that in $current_favorite_language | 19:38 | ||
and on and on | |||
19:38
yqt joined
|
|||
FROGGS | aye :o) | 19:38 | |
Ven | n0tjack: well, there's still a good chunk to learn, so that's good as well | 19:39 | |
n0tjack | there is a hell of a lot to learn | ||
Ven still hasn't decided if he wants to make a "comprehensive learnxiny", just add stuff to said tutorial, or make a "blog" with separated articles and stuff | 19:40 | ||
n0tjack | but because p6 invites noodling around, it doesn't feel like studying, it feels like playing | ||
garu | wow, that should be a logo somewhere :) | ||
n0tjack | but then I don't know if my experience will scale. I'm an old Perl guy and an APL (J) guy, and p6 is like "Hey, do you want Perl, but never to have to write a loop again?". I mean, seriously. | 19:41 | |
Ven | n0tjack: ooh, you're an APL guy? | ||
APL is amazing :D | |||
n0tjack | yeah | ||
I love APL. J is my primary language. K and R are also up there. | |||
[Coke] | n0tjack: you'll fit in just fine. | ||
Ven hit some limitations in GNU APL, and hasn't found how to launch Dyalog APL in the command-line for just a script (not a workspace) | |||
n0tjack | I know Dyalog has script support in recent years, but I have no experience with their CLI | 19:42 | |
The Dyalog IDE is an integral part of the experience. | |||
It's sublime. | |||
Ven | n0tjack: I don't want to leave my terminal :[. I have everything set up.. | 19:43 | |
n0tjack | I know the feeling. | ||
Ven | but, say, GNU APL's monadic uparrow doesn't work, so oh well. Anyway, welcome along :D | 19:44 | |
n0tjack | Thanks. You guys have all been great the last few days. I remember burning out on IRC many years ago because people were all so unfriendly. I was not expecting this. | ||
grondilu | a R slang will be pretty cool | 19:45 | |
19:45
sivoais left
|
|||
cognominal_ | dyalog, is that open source? | 19:45 | |
n0tjack | no, vendor product | ||
there are OSS APLs, but not as good. | |||
the personal version is free-as-in-beer though | 19:46 | ||
Ven | vendor product, but as a student, they gave me a free license (and very rapidly at that) | ||
19:46
coetry joined
19:47
sivoais joined
|
|||
Ven | (being a student is at times amazing for software stuff.. IntelliJ, dyalog, microsoft stuff... I know github also has stuff...) | 19:47 | |
dalek | kudo/smile: 6643eb5 | FROGGS++ | / (11 files): add DefiniteHOW to make Type:D and Type:U first class types That mean that we can now smartmatch against these types, and also that the smiley does not just vanish, when these types are used stand-alone. Parameters and signatures still need to be adjusted to make use of this new DefiniteHow. |
||
FROGGS | .tell jnthn please review github.com/rakudo/rakudo/commit/6643eb58c6 | 19:48 | |
yoleaux | FROGGS: I'll pass your message to jnthn. | ||
FROGGS | lizmat: ^^ | ||
lizmat | will look at it in a mo | ||
Ven | FROGGS: is there a perf hit? that sounds amazing :-) | ||
19:48
pfhork joined,
Hor|zon joined
|
|||
FROGGS | Ven: no, there isnt | 19:48 | |
19:48
ZoffixWork joined
|
|||
Ven | then it might just be *g* | 19:48 | |
FROGGS | *g* | 19:49 | |
19:49
bbarker joined
|
|||
ZoffixWork | Hey. What's a usecase for ENTER phaser? Wound't code still run "every time you enter the block"? | 19:49 | |
19:51
ZoffixWork is now known as ZoffixW
|
|||
[Coke] | well, for one, you can put it wherever you want in the block. | 19:51 | |
psch | my $db-conn; ... { ENTER { $db-conn = db-conn-init; } ... ; LEAVE { $db-conn.close } } # something like this springs to mind | ||
[Coke] | m: sub a($a) { say "$a"; ENTER { say "HI" } } ; a | 19:52 | |
camelia | rakudo-moar d05cb8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/UhlZp3XsRYCalling a() will never work with declared signature ($a)at /tmp/UhlZp3XsRY:1------> 3($a) { say "$a"; ENTER { say "HI" } } ; 7⏏5a» | ||
[Coke] | m: sub a($a) { say "$a"; ENTER { say "HI" } } ; a("me"); | ||
camelia | rakudo-moar d05cb8: OUTPUT«HIme» | ||
ZoffixW | psch, yeah, that's pretty much the example I'm looking at, which made me raise an eyebrow since ENTER was the first thing on the line. | ||
psch | although the out-of-order placement would still be the stronger argument | ||
s/stronger/strongest/ | |||
ZoffixW | Is COMPOSE phaser still unimplemented? | ||
lizmat | FROGGS: am I correct in seeing there is no support for parameters yet? | ||
[Coke] | ZoffixW: no tests for it, anyway. | 19:53 | |
lizmat | ZoffixW: we don't really know what the COMPOSE phaser is supposed to do, afaik | ||
ZoffixW | Ah. Alright :) | ||
Thanks. | |||
moritz | lizmat: run at the compose time of a class? | ||
lizmat | yes, but you have the mainline of the class already for that, basically | 19:54 | |
FROGGS | lizmat: there is still what we got before | ||
lizmat | FROGGS: ah, okl | ||
moritz | maybe something funny with inheritance? like it's also run during child classes compose time? | ||
lizmat | m: class A { say "hello" }; BEGIN say "after" | 19:55 | |
camelia | rakudo-moar d05cb8: OUTPUT«afterhello» | ||
lizmat | hmmm... | ||
m: class A { say "hello" }; INIT say "after" | |||
camelia | rakudo-moar d05cb8: OUTPUT«afterhello» | ||
19:55
sivoais left
|
|||
lizmat | that is.... unexpected ? | 19:55 | |
Ven | m: say "foo"; class A { say "bar"; } | 19:56 | |
camelia | rakudo-moar d05cb8: OUTPUT«foobar» | ||
lizmat | m: INIT say "before"; class A { say "hello" }; INIT say "after" | ||
camelia | rakudo-moar d05cb8: OUTPUT«beforeafterhello» | ||
Ven | lizmat: not really? | ||
19:57
sivoais joined
19:59
pfhork_ joined
|
|||
FROGGS | m: sub foo(Int:D $a is copy) { $a = Int }; foo 42 # lizmat: should be disallowed eventually | 19:59 | |
camelia | ( no output ) | ||
FROGGS | maybe we can remove the special casing of :D/:U in the signature binder (right?) at some point, but jnthn might know if its worthwhile | 20:00 | |
and also when we wanna do it... because I guess that can very well wait | |||
cognominal_ | in src/core/Match.pm is there a reason that :%hash and :@list are left out from .BUILD and .new parameters? That breaks EVAL/perl round triping | ||
20:01
pfhork left,
pfhork_ left
|
|||
cognominal_ | also, $ast, @list and %hash can be left out from .perl output when ANY/empty | 20:01 | |
I can propose a patch | 20:02 | ||
20:02
sivoais left
|
|||
moritz | cognominal_: +1 to patch | 20:02 | |
20:02
sivoais joined
|
|||
FROGGS | jnthn / lizmat: I forgot to mention, my patch causes regressions in t/spec/S14-roles/parameterized-type.t and t/spec/S32-exceptions/misc.rakudo.moar | 20:04 | |
lizmat | FROGGS: ok | 20:05 | |
FROGGS | most likely something simple, but still | ||
20:08
[Sno] left
|
|||
ZoffixW | Is 'splat' a proper term that means something? In '*@' is the '@' the "splat"? | 20:09 | |
FROGGS | I thought the * was | 20:10 | |
Ven | ZoffixW: I took it from ruby for the learnx | ||
iirc | |||
FROGGS | or not? | ||
20:10
[Sno] joined
|
|||
ZoffixW | Ah ok, yeah it's the asterisk. | 20:11 | |
Thanks. | |||
Ven | FROGGS: yeah, should be | ||
cognominal_ | also I don't understand why in someplaces BUILD is a method and in some other a submethod | ||
20:11
adu left
|
|||
lizmat | cognominal_: yeah, also, sometimes use $!attr instead of $.attr | 20:12 | |
FROGGS | consistency is unevenly distributed | ||
lizmat | the latter being much more expensive | ||
jnthn | FROGGS: Bit tired tonight... First thing that stands out though is that you may want to declare constants (just a knowhow or something) for CONCRETE/TYPE to use with nqp::parameterizetype | ||
yoleaux | 19:48Z <FROGGS> jnthn: please review github.com/rakudo/rakudo/commit/6643eb58c6 | ||
FROGGS | jnthn: k | ||
lizmat | .oO( inconsistency however is very evenly distributed ) |
||
jnthn | FROGGS: As the interner doesn't understand value types, and only cares for pointer equiv | ||
FROGGS | jnthn: no need to review it today :o) | 20:13 | |
jnthn | FROGGS: otoh if you're using Rakudo's True/False for that you're already covered I guess | ||
n0tjack | if /^^/ is start of line, is /$$/ end of line? | ||
FROGGS | n0tjack: yes | ||
jnthn: will add constants | 20:14 | ||
n0tjack | and if I write a grammar Foo { rule TOP {^^ stuff $$} ... }; what happens when I apply it to a multi-line string? | ||
does the grammar get invoked for every line/ | |||
jnthn | FROGGS: The MOP additons looks as I'd expect, anyway | ||
FROGGS | n0tjack: you can use the grammar as a token in another regex to quantify the regex I think | 20:15 | |
\o/ | |||
jnthn: I take that as a "well done" and a clap on my shoulder :D | |||
cognominal_ | FROGSS, I think I tried a smartch with a grammar to no avail. This different but similar. | 20:16 | |
jnthn | FROGGS: Yes, nicely figured out :) | ||
FROGGS | n0tjack: though keep in mind that Grammar.parse implicitly aligns to the entire string... so use subparse here instead | ||
psch | grammars don't smartmatch, grammars .parse | ||
jnthn | FROGGS++ # daring to hack MOP stuff :) | ||
FROGGS | *g* | ||
jnthn | Like many parts of Rakudo, once you work out what's going on it's not *that* scary. | ||
FROGGS nods | 20:17 | ||
jnthn | (Yes, there are some genuinely scary parts too... :)) | ||
FROGGS | it helps to understand the MOP bits though | ||
psch | cognominal_: you can add a 'method ACCEPTS($str) { self.parse($str) }' to a grammar to make it support smartmatching | ||
nine | The MOP is fun :) | ||
psch | (maybe want a type on the parameter...) | 20:18 | |
FROGGS | m: Grammar G { token TOP { . } }; say "foo" ~~ /<G>/ | ||
camelia | rakudo-moar d05cb8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Jn3S4bAhZjTwo terms in a rowat /tmp/Jn3S4bAhZj:1------> 3Grammar7⏏5 G { token TOP { . } }; say "foo" ~~ /<G expecting any of: infix infix stopper statement end…» | ||
FROGGS | m: grammar G { token TOP { . } }; say "foo" ~~ /<G>/ | ||
camelia | rakudo-moar d05cb8: OUTPUT«Method 'G' not found for invocant of class 'Cursor' in block <unit> at /tmp/ZdgbmgD7EI:1» | ||
FROGGS | m: grammar G { token TOP { . } }; say "foo" ~~ /<::G>/ | ||
camelia | rakudo-moar d05cb8: OUTPUT«Method 'G' not found for invocant of class 'Cursor' in block <unit> at /tmp/iwqsy4bflN:1» | ||
FROGGS | m: grammar G { token TOP { . } }; say "foo" ~~ /<::('G')>/ | ||
camelia | rakudo-moar d05cb8: OUTPUT«Method 'G' not found for invocant of class 'Cursor' in block <unit> at /tmp/b44mZ0xwww:1» | ||
FROGGS | :/ | ||
m: grammar G { token TOP { . } }; say "foo" ~~ /<G::TOP>/ | |||
camelia | rakudo-moar d05cb8: OUTPUT«「f」 G::TOP => 「f」» | ||
psch | oh, that's neat | ||
FROGGS | m: grammar G { token TOP { . } }; say "foo" ~~ /<.G::TOP> +/ | 20:19 | |
camelia | rakudo-moar d05cb8: OUTPUT«「foo」» | ||
FROGGS | m: grammar G { token TOP { . } }; say "k-e-b-a-b" ~~ /<.G::TOP>+ % '-'/ | ||
camelia | rakudo-moar d05cb8: OUTPUT«「k-e-b-a-b」» | ||
FROGGS | m: grammar G { token TOP { . } }; say "k-e-b-a-b" ~~ /<yummi=.G::TOP>+ % '-'/ | ||
camelia | rakudo-moar d05cb8: OUTPUT«「k-e-b-a-b」 yummi => 「k」 yummi => 「e」 yummi => 「b」 yummi => 「a」 yummi => 「b」» | ||
FROGGS | well, you get the idea :o) | ||
n0tjack | yeah, makes sense | 20:20 | |
cognominal_ | psch, would not that belong to Grammar.pm? | ||
psch | cognominal_: not in general, i don't think | ||
cognominal_: there was some discussion about this a few weeks ago, but i don't remember when nor the exact reason that convinced me... | |||
FROGGS | btw, TimToady++ or whoever invented the regex assertion and (non)capturing syntax - I *love* it | ||
20:21
Ven left,
gonz_ left
|
|||
psch | cognominal_: also, there is the syntax FROGGS showed, which probably makes it clearer what exactly happens | 20:21 | |
ZoffixW | Heh: "Meta operators ! Oh boy, get ready. Get ready, because we're delving deep into the rabbit's hole, and you probably won't want to go back to other languages after reading that." | 20:22 | |
ZoffixW gets excited | |||
(it's from learnxiny | |||
FROGGS | I guessed so :o) | 20:23 | |
psch | m: sub f($a, $b) { $a ** 2 + $b }; say [[&f]] ^5 # wee \o/ | ||
camelia | rakudo-moar d05cb8: OUTPUT«148» | ||
psch | that's not even metaop, actually | ||
just symbol-y reduce | |||
m: say ^2 R[Z-] 2..4 | 20:24 | ||
camelia | rakudo-moar d05cb8: OUTPUT«(2 2)» | ||
psch | m: say ^3 R[Z-] 2..4 | ||
camelia | rakudo-moar d05cb8: OUTPUT«(2 2 2)» | ||
lizmat | m: my Int @a; @a[5] = 42; .say for @a # should be (Int) xx 5, 42 | ||
camelia | rakudo-moar d05cb8: OUTPUT«(Any)(Any)(Any)(Any)(Any)42» | ||
FROGGS | lizmat: aye | ||
lizmat | fix found already | 20:25 | |
FROGGS | lizmat++ | ||
it is in $*W.create_container_descriptor I guess? | |||
dalek | kudo/nom: 5b2b247 | lizmat++ | src/core/List.pm: Fix default value of iterated List |
||
FROGGS | ohh | 20:26 | |
lizmat | $ 6 'my Int @a; @a[5] = 42; .gist.print for @a' | ||
(Int)(Int)(Int)(Int)(Int)42 | |||
it was in the iterator logic | |||
FROGGS | ahh | ||
jnthn | lizmat: ooh, I think that might be one of the xmas RTs? :) | 20:27 | |
FROGGS | that'd be great | ||
lizmat | m: $ 6 'my Int @a; @a[5] = 42; $_ = 666 for @a | ||
camelia | rakudo-moar d05cb8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/_9eEiomsVMTwo terms in a rowat /tmp/_9eEiomsVM:1------> 3$7⏏5 6 'my Int @a; @a[5] = 42; $_ = 666 for  expecting any of: infix infix stopper statement end …» | ||
lizmat | m: my Int @a; @a[5] = 42; $_ = 666 for @a | ||
camelia | rakudo-moar d05cb8: OUTPUT«Cannot assign to an immutable value in block <unit> at /tmp/FOUi6_KTBs:1» | ||
lizmat | another one... :-) | ||
sufrostico | screen | ||
20:28
darutoko left,
Hor|zon left
|
|||
FROGGS | ohh, my patch actually only regresses t/spec/S14-roles/parameterized-type.t it seems | 20:29 | |
20:30
xfix left
|
|||
FROGGS | Variable definition of type T (implicit : by pragma) requires an initializer | 20:30 | |
------> has T $.data is rw⏏; | |||
this will be interesting tomorrow | |||
20:31
ZoffixW left
20:32
TEttinger joined
|
|||
TimToady | okay, I think I've managed to move the code over from method reduce into metaops that handles N-ary operations, so that all reductions/productions now handle N-ary ops | 20:33 | |
oops, just broke it again :) | 20:34 | ||
lizmat | given a type in $foo, how can I make a container of that type ? | 20:35 | |
nqp::p6scalarfromdesc doesn't help, as I can't get at the descriptor ? | |||
20:36
Skarsnik joined
|
|||
lizmat | FROGGS jnthn ?? ^^ | 20:37 | |
jnthn | lizmat: You...need to have a descriptor to do that | ||
lizmat: Where can't you get at it, ooc? | |||
lizmat | well, I have just a type object | 20:38 | |
jnthn | Where're you writing the code? | ||
FROGGS | m: say Int.^descriptor | ||
camelia | rakudo-moar d05cb8: OUTPUT«Method 'descriptor' not found for invocant of class 'Perl6::Metamodel::ClassHOW' in block <unit> at /tmp/vGFukqeq46:1» | ||
jnthn | Array? | ||
lizmat | m: my Int @a; @a[5] = 42; $_ = 666 for @a # trying to fix this | ||
camelia | rakudo-moar d05cb8: OUTPUT«Cannot assign to an immutable value in block <unit> at /tmp/jlvjmQSx5F:1» | ||
lizmat | List | ||
Skarsnik | Hi there, is that normal that rakudo take over a minute to compile a perl script (there is like 300-400 lines)? or did I fuck up my install | 20:40 | |
n0tjack | wait, WHAT? | ||
You can assign _to_ $_ ? | |||
lizmat | jnthn: e.g. line 379 | ||
n0tjack | that's incredible! | ||
moritz | n0tjack: why not? | ||
it's just a variable :-) | |||
TimToady | and it's bound rw by default | ||
FROGGS | Skarsnik: can you show us the script? | ||
n0tjack | why has no one ever done this before? | ||
20:41
^elyse^ left
|
|||
lizmat | n0tjack: pretty common in p5, for the past 25+ years afaik | 20:41 | |
FROGGS | n0tjack: well, I did... I also do that in P5 | ||
n0tjack | I never saw that in p5 | ||
maybe I wasn't paying attention | |||
or maybe doing it just never occured to me | |||
jnthn | lizmat: But there should be a $!descriptor in the Array being iterated over | ||
n0tjack | I don't mean I never wrote $_ = something | 20:42 | |
FROGGS | elsif ($_ = foobarbaz) { # do something with $_ | ||
jnthn | lizmat: Maybe that needs passing into the ArrayIterator? | ||
Skarsnik | FROGGS, is that public? www.nyo.fr:1080/svn/fimstuff/ | ||
lizmat | m: my %h = a => 42, b => 666; $_++ for %h.values; dd %h | ||
camelia | rakudo-moar d05cb8: OUTPUT«Hash %h = {:a(43), :b(667)}» | ||
20:42
kfo joined
|
|||
n0tjack | I mean I never thought about using it to update an array in place | 20:42 | |
FROGGS | Skarsnik: no, it prompts for user/pass | ||
moritz | n0tjack: s/^\s+// for @array; # is pretty common, afaict | ||
FROGGS | Skarsnik: you can use nopaste.linux-dev.org/ | ||
n0tjack | moritz: that I did, but somehow $_ = 48 for @array seems different, and cooler, to me | 20:43 | |
though of course it's the same thing only more explicit | |||
lizmat | n0tjack: same applies for values of hashes | ||
even things that look like hashes, like sets | 20:44 | ||
_itz_ | .tell jdv79 sorry for the deplay in adding your RSS feed, I've been away from the computer but it's added now | ||
yoleaux | _itz_: I'll pass your message to jdv79. | ||
FROGGS | m: my @a = ^10; .++ for @a; say @a | ||
camelia | rakudo-moar d05cb8: OUTPUT«[1 2 3 4 5 6 7 8 9 10]» | ||
FROGGS | m: my @a = ^10; .-- for @a; say @a | ||
camelia | rakudo-moar d05cb8: OUTPUT«[-1 0 1 2 3 4 5 6 7 8]» | ||
n0tjack | now that's cute | ||
FROGGS | *g* | ||
lizmat | m: my $s = set(<a b c d e>; dd $s; $_ = False for $s.values; dd $s | ||
jnthn | OK, heading afk for l'evening | ||
camelia | rakudo-moar d05cb8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/O20x8rY1qKCannot use variable $s in declaration to initialize itselfat /tmp/O20x8rY1qK:1------> 3my $s = set(<a b c d e>; dd $7⏏5s; $_ = False for $s.values; dd $s expecting any of: …» | ||
jnthn | 'night, #perl6 | ||
FROGGS | yes, we can do linenoisish things | ||
gnight jnthn | |||
lizmat | m: my $s = set(<a b c d e>); dd $s; $_ = False for $s.values; dd $s | ||
camelia | rakudo-moar d05cb8: OUTPUT«Set $s = set("a","c","b","e","d")Cannot assign to an immutable value in block <unit> at /tmp/jDlFHVI_CJ:1» | ||
lizmat | huh? | 20:45 | |
m: my $s = <a b c d e>.SetHash; dd $s; $_ = False for $s.values; dd $s # sets are immutable :-) | |||
camelia | rakudo-moar d05cb8: OUTPUT«SetHash $s = SetHash.new("a","c","b","e","d")SetHash $s = SetHash.new()» | ||
n0tjack | wait, so a set is just pairs where the values are True (exists) and False (doesn't)? | 20:46 | |
what do you know, it's 2015 and we have a rational perl | 20:47 | ||
lizmat | n0tjack: indeed | ||
and it takes *objects* as keys | |||
so you can have sets of sets :-) | |||
psch | m: $_ = <a b c>.Set; say .<d> | ||
camelia | rakudo-moar d05cb8: OUTPUT«False» | ||
20:48
^elyse^ joined
|
|||
psch | m: $_ = <a a b c>.BagHash; .grabpairs.say; .perl.say | 20:50 | |
camelia | rakudo-moar d05cb8: OUTPUT«c => 1("a"=>2,"b"=>1).BagHash» | ||
20:50
ZoffixW joined
|
|||
Skarsnik | FROGGS, www.nyo.fr/~skarsnik/tmp/fimstuff/ the extractsomthing.pl, it took forever to start on the 'shitty' CPU of my dedicated server | 20:51 | |
ZoffixW | How come this doesn't produce all letter codes: | ||
m: say { 'A'.ord }, { 'B'.ord } ... { 'Z'.ord }; | |||
camelia | rakudo-moar d05cb8: OUTPUT«(65)» | ||
psch | m: say { 'A'.ord }(), { 'B'.ord }() ... { 'Z'.ord }(); | 20:52 | |
camelia | rakudo-moar d05cb8: OUTPUT«(65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90)» | ||
ZoffixW | Ah. Thanks. | ||
lizmat | m: say 'A'.ord .. 'Z'.ord | ||
camelia | rakudo-moar d05cb8: OUTPUT«65..90» | ||
psch | or that... :) | ||
ZoffixW | :) | ||
psch | not sure why it only prints the first though | ||
m: say ({ 'A'.ord }, { 'B'.ord } ... { 'Z'.ord }); | |||
camelia | rakudo-moar d05cb8: OUTPUT«(65)» | ||
20:53
adu joined
20:54
laouji joined
|
|||
psch | ...something about single arg rule? o.o | 20:54 | |
i have no idea | |||
FROGGS | Skarsnik: ahh, I thought you were saying it took a minute to *parse* the script... seems more like it would take a minute to *run* it | ||
Skarsnik | No no, it took a minute to parse | 20:55 | |
FROGGS | hmmmmm | ||
I mean, it also needs to parse the dependencies but still | |||
20:55
rindolf left
|
|||
FROGGS | we're parsing (and partially running) 25_000 lines of code of the setting in about 48s on my laptop | 20:56 | |
20:56
lichtkind_ joined
|
|||
Skarsnik | (skardev)skardev@ks364334:~/fimstuff$ time /opt/bin/perl6 extractbookshelf.pl 149291 | 20:57 | |
===SORRY!=== | |||
Unable to parse expression in parenthesized expression; couldn't find final ')' | |||
real 1m2.600s | 20:58 | ||
user 1m0.500s | |||
ZoffixW | Hm.... What would be a good example in response? twitter.com/cpan_pevans/status/652...6457304064 | ||
Skarsnik | I put an error or purpose | ||
*on | |||
ZoffixW is too n00b to think of anything good | |||
20:58
laouji left
|
|||
lizmat | .oO( it's wierd alright :-) |
20:59 | |
psch | ZoffixW: for Whatever? well, it's the most light-weight closure syntax i've seen yet | ||
(barring a few gotchas where we don't allow it to autocurry) | |||
20:59
lichtkind left
|
|||
Skarsnik | I should ask for an upgrade of this server x) model name : Intel(R) Celeron(R) CPU 220 @ 1.20GHz | 20:59 | |
FROGGS | Skarsnik: you can try running it as perl6 --parse-compile ... | 21:00 | |
Skarsnik: maybe that tells us something | |||
21:01
lichtkind_ is now known as lichtkind
|
|||
Skarsnik | also the vim syntax file slow the hell of vim on the StoryFac.pm6 x) | 21:01 | |
does it output a file? | |||
21:02
adu left
|
|||
Skarsnik | hm no option --parse-compile | 21:03 | |
psch | maybe -c? that's syntax check and BEGIN and CHECK | 21:04 | |
n0tjack | Skarsnik: perl6 --help offers a --stagestats | ||
maybe run that to pin down what stage is slow | |||
psch .oO( on a 1.2ghz celeron it's likely all stages will be slow... ) | 21:05 | ||
pink_mist | . o O ( might it be possible to use more than one core to speed up initial compilation? :P ) | 21:08 | |
21:08
n0tjack left
|
|||
psch | m: my &add2 = * + 2; say ^5 .map: &add2 | 21:08 | |
camelia | rakudo-moar 5b2b24: OUTPUT«(2 3 4 5 6)» | ||
dalek | kudo/nom: 2275f64 | TimToady++ | src/core/ (2 files): generalize N-ary reduce/produce to [op] & [\op] The N-ary code was only implemented in method reduce (and by extension, sub reduce). This is now moved over to the REDUCE generators in metaop.pm so those also do N-ary correctly. Additionally, the code should now work for functions that return lists and not just for scalars. (Not tested, but same transformation we used in the sequence operator to use push (or unshift) that is overridable with a slip, so a list is treated as a unit by default, but can be overridden.) |
21:09 | |
psch | ZoffixW: is that an example for paul evans..? | ||
lizmat | pink_mist: not before Xmas | ||
dalek | ast: 6f2a9f0 | TimToady++ | S32-list/ (2 files): updated reduce/produce tests for general N-ary |
||
Skarsnik | There is probably only one core x) | ||
ZoffixW | psch, "that" is what? | ||
pink_mist | Skarsnik: haha, yeah, but I meant for other people :P with saner CPUs :P | 21:10 | |
ZoffixW | psch, timotimo gave him some crazy stuff :D I think he'll be satisfied (Paul Evans == Leonerd from Perl 5, BTW) | ||
Skarsnik | Does not seem very helpful | 21:11 | |
Stage start : 0.000 | |||
Stage parse : 62.914 | |||
Stage syntaxcheck: Syntax OK | |||
lizmat | .tell jnthn my Int @a; @a[5] = 42; $_ = 666 for @a fails because it gets an IterationBuffer as target, not an ArrayReificationTarget | ||
yoleaux | lizmat: I'll pass your message to jnthn. | ||
psch | ZoffixW: before daleks outburst i let camelia run a snippet | 21:12 | |
lizmat | .tell the IterationBuffer doesn't have a descriptor | ||
yoleaux | lizmat: I'll pass your message to the. | ||
psch | ZoffixW: but if timotimo++ gave example already those are probably better... :) | ||
ZoffixW | :) | ||
psch, Ah. I'll relay your example as well. Thanks :) | 21:13 | ||
psch | ZoffixW: it's somewhat academic, i guess :P | 21:14 | |
ZoffixW: the important bit, in my opinion, is that Whatever is strongly multi-purpose | |||
ZoffixW nods | 21:15 | ||
21:16
chrstphrhrt left
|
|||
FROGGS | Skarsnik: the option is called --profile-compile | 21:19 | |
Skarsnik | It take 14 sec on my desktop Oo (it's a recent I5) | 21:20 | |
FROGGS | that | ||
err | |||
gnight | |||
lizmat | gnight FROGGS | ||
alpha123 | anyone happen to know if rakudobrew works on freebsd? | 21:23 | |
21:25
Hor|zon joined,
skids left
|
|||
Skarsnik | --profile-compile does not create of a file or display info, hm | 21:26 | |
21:27
chrstphrhrt joined
|
|||
timotimo | i was really quite certain PEvans was refering to the ... syntax | 21:28 | |
21:29
Hor|zon left
21:30
heisenberg joined
|
|||
ZoffixW | I think he was referring to the whole thing, because it's unclear that there are Whatever Stars as well as ... | 21:30 | |
lizmat | .tell jnthn I put the descriptor issue on RT #126312 , I think it needs deeper thoughts than I currently can muster | 21:31 | |
yoleaux | lizmat: I'll pass your message to jnthn. | ||
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=126312 | ||
21:31
coetry left
21:32
coetry joined
|
|||
psch | timotimo, ZoffixW: yeah it's completly unclear which syntactic part he's wondering about, but perl5 has ... (although somewhat different), so i thought it's about Whatever | 21:33 | |
timotimo | oh | 21:34 | |
psch | additionally, Whatever is mentioned in the original tweet, which is another hint that's what it's about | ||
timotimo | i think he probably meant the "my @FIB" part | ||
"i've only seen this used to demonstrate fib" | |||
makes more sense, huh? :) | |||
psch | i'm not saying i'm not overinterpreting... :P | ||
maybe it's about *+*, which is obviously a specific token for fib | 21:35 | ||
&term:<*+*> | |||
21:35
tokuhirom joined
|
|||
psch | as a side note: progress! the ArrayIndexOutOfBoundsException now complains about index -1, not index 0! | 21:36 | |
ZoffixW | timotimo, he did say "...this syntax..." as a Perl coder whose modules are in core Perl 5, I'm sure he knows what 'my @fib' means :) | ||
psch .oO( steps in the wrong direction are still progress, right..? ) | |||
timotimo | well, it's perl 5 vs perl 6; maybe he wanted to point out how foreign perl6's syntax feels? | ||
or how perl6 is a one-trick-pony that can only do fibonacci? | |||
(and not even fast) | |||
ZoffixW | ¯\_(ツ)_/¯ | 21:37 | |
timotimo | m: sub prefix:<¯\_(ツ)_/¯>($a) { say "pff." }; ¯\_(ツ)_/¯1 | ||
camelia | rakudo-moar 5b2b24: OUTPUT«pff.» | ||
21:37
coetry left
|
|||
timotimo | m: sub term:<¯\_(ツ)_/¯>($a) { say "pff." }; ¯\_(ツ)_/¯ | 21:38 | |
camelia | rakudo-moar 5b2b24: OUTPUT«5===SORRY!5=== Error while compiling /tmp/3O2CDun_n6Calling term:<¯\_(ツ)_/¯>() will never work with declared signature ($a)at /tmp/3O2CDun_n6:1------> 3ub term:<¯\_(ツ)_/¯>($a) { say "pff." }; 7⏏5¯\_(ツ)_/¯» | ||
timotimo | m: sub term:<¯\_(ツ)_/¯>() { say "pff." }; ¯\_(ツ)_/¯ | ||
camelia | rakudo-moar 5b2b24: OUTPUT«pff.» | ||
ZoffixW nerdgasms | |||
21:38
llfourn joined
|
|||
timotimo | that's just nerdgames | 21:39 | |
vendethiel just won a game, and is going to sleep | |||
have fun, #perl6! | |||
21:39
tokuhirom left
|
|||
ZoffixW | \o | 21:39 | |
timotimo | gnite vendethiel! | 21:40 | |
what did you play? monkey jousting? :) | |||
ZoffixW imagines Perl 6 will eventually have a quite amusing Acme:: collection | |||
timotimo | did you see ACME::AddSlashes? | 21:41 | |
masak | slashes. such safe. | ||
ZoffixW lols | |||
timotimo is now safe from slashes | 21:42 | ||
jonadab | Ah, when there's an ACME:: module that outputs code that looks like a NetHack dumpfile, then I'll be impressed. | ||
timotimo | it'd output code? | ||
mst | timotimo: if it doesn't make an HTTP connection to AO3 it's not trying hard enough | ||
jonadab | timotimo: Or accept code. | 21:43 | |
timotimo | hmm | ||
mst: i don't follow; what's AO3? | |||
jonadab | (I'm thinking like Eyedrops or Bleach.) | ||
21:43
llfourn left
|
|||
timotimo | i don't know either of those, jonadab :( | 21:43 | |
ZoffixW | How do I make that warn message refer to where my shiny new operator is at: | ||
m: sub prefix:<¯\_(ツ)_/¯>(Str $warning) { warn $warning }; ¯\_(ツ)_/¯ "dunno what's going on here" | |||
camelia | rakudo-moar 5b2b24: OUTPUT«dunno what's going on here in sub prefix:<¯\_(ツ)_/¯> at /tmp/KyvmA9Hy6J:1» | ||
jonadab | timotimo: Old Perl5 ACME:: modules. | ||
mst | timotimo: archiveofourown.org | ||
alpha123 | jonadab: was there a nethack dump Acme for perl5? | 21:44 | |
jonadab | alpha123: Not to my knowledge. | ||
timotimo | ah, i haven't done any perl 5 programming so far | ||
jonadab | Well, at this point, it's better to go ahead and learn 6. | 21:45 | |
timotimo | hah | ||
not for everybody, surely | |||
alpha123 | Don't learn perl6, you won't be able to use any language except perl6 | ||
jonadab | If you're starting, I mean. | ||
timotimo | too late for me now :) | ||
masak | alpha123: I find the opposite to be the case. | ||
jonadab | alpha123: I've been having THAT problem with 5. | 21:46 | |
masak | alpha123: I use a lot of other languages, but I use them better because I know Perl 6. | ||
alpha123 | masak: Mostly tongue-in-cheek, I use C++ and ruby and javascript for work all the time | ||
masak | nod | ||
timotimo | we don't have Inline::JavaScript yet | ||
alpha123 | but if I could write everything in perl 6, rust, and common lisp I probably would :) | 21:47 | |
timotimo | but Inline::C should handle C++ as well; or it will at some point | ||
so far, Inline::C is only for individual functions, though, IIRC | |||
alpha123 | unfortunately ruby has started to feel like a half-assed perl 6 ;( | ||
jonadab | timotimo: What, you haven't got the Mozilla suite running in Inline::C yet? | 21:48 | |
timotimo | the mozilla suite? now there's a blast from the past | ||
jonadab | alpha123: Ruby is intermediate between Perl5 and Perl6, both chronologically and in terms of the design. | ||
timotimo: Well, Seamonkey then, same thing. | |||
ZoffixW | m: sub prefix:<¯\_(ツ)_/¯>($msg) { $msg.say }; ¯\_(ツ)_/¯ “Programming is hard! Let's go shopping!” | ||
camelia | rakudo-moar 5b2b24: OUTPUT«Programming is hard! Let's go shopping!» | ||
ZoffixW | This is amazing :) Perl6++ | 21:49 | |
jonadab | Hehe. | ||
21:49
sufrostico left
|
|||
masak | m: say "Programming is ", <hard easy weird>.pick, ", let's go ", <shopping hunting programming>.pick, "!" | 21:50 | |
camelia | rakudo-moar 5b2b24: OUTPUT«Programming is hard, let's go hunting!» | ||
ZoffixW | lol | ||
psch | weird:programming is my favorite combination | ||
timotimo | m: say "Programming is {<hard easy weird>.pick}, let's go {<shopping hunting programming gathering>.pick}!" | 21:51 | |
camelia | rakudo-moar 5b2b24: OUTPUT«Programming is hard, let's go programming!» | ||
21:51
^elyse^ left
|
|||
ZoffixW | 0o | 21:51 | |
masak | psch: good news! you'll get it one time out of nine :P | ||
mst | jonadab: I've not seen you on #perl asking for help, so I'm not convinced you're trying to learn perl5 yet :P | ||
lizmat | m: say "Programming is {<hard easy weird>.pick}, let's go {<shopping hunting programming>.pick}!" | ||
camelia | rakudo-moar 5b2b24: OUTPUT«Programming is hard, let's go shopping!» | ||
mst | also the correct answer at the moment is probably "learn both" | ||
masak | the correct answer is almost always "both", modulo time constraints and sanity | ||
jonadab | mst: No, no, I mean the problem I have with Perl5 is that I learned it, and now I can't use any other language because they're all so cumbersome. | ||
I want to learn 6 though. | 21:52 | ||
ZoffixW | Yeah. Especially since P5 has a huge number of modules that can be used in P6 with Inline::Perl5 | ||
mst | jonadab: oh, sorry | ||
jonadab: I basically have that problem given Moo(se) | |||
21:52
rurban joined
|
|||
mst | jonadab: nobody seems to believe me ;) | 21:52 | |
jonadab | Oh, man, I've seen Moose, and it makes my head hurt. | ||
masak would like to learn Perl б | |||
jonadab: Moose have antlers, and if you approach them in the wrong way, they can make your head hurt. | 21:53 | ||
alpha123 | every time I learn a little bit more about perl 6 I always go "HOLY COW THAT'S ACTUALLY AMAZING". today it was with Actions and multi MAIN() | ||
TimToady | m: sub infix:<op>($a,$b,$c) { $a + $b * $c }; say [op] 1..9 | ||
camelia | rakudo-moar 2275f6: OUTPUT«141» | ||
masak | Meese* | 21:54 | |
TimToady | m: sub infix:<op>($a,$b,$c) { $a + $b * $c }; say [\op] 1..9 | ||
camelia | rakudo-moar 2275f6: OUTPUT«(1 7 27 69 141)» | ||
21:54
n0tjack joined
|
|||
TimToady | m: sub infix:<op>($a,$b,$c) is assoc<right> { $a + $b * $c }; say [\op] 1..9 | 21:54 | |
camelia | rakudo-moar 2275f6: OUTPUT«(9 79 479 1919 3839)» | ||
jonadab | masak: If you actually understand Moose, perhaps you can figure out why TAEB won't work lately. | 21:55 | |
masak | I don't claim any extraordinary understanding of Moose, no. | ||
jonadab | Ah. | ||
masak | I've watched people implement MOPs, though. | ||
dalek | kudo/nom: f254cd4 | lizmat++ | src/core/Hash.pm: Remove copy-pasto |
||
kudo/nom: 51d2c07 | lizmat++ | src/core/Iterable.pm: Don't use a scope if we don't need one |
|||
kudo/nom: ec2cad9 | lizmat++ | src/core/Str.pm: Make .comb.elems faster |
|||
lizmat | good night, #perl6! | 21:56 | |
psch | g'night lizmat o/ | ||
masak | 'night, lizmat | 21:57 | |
psch | m: my Int @a; @a[4]++; @a.map:{say .WHAT.perl}; | ||
camelia | rakudo-moar 2275f6: OUTPUT«IntIntIntIntInt» | ||
psch | that's #123037, which iirc lizmat fixed today, i'll note that in the ticket | 21:58 | |
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=123037 | ||
mst | jonadab: huh? Moo(se) is basically 'we stole the perl6 metamodel, ish' | 21:59 | |
jonadab: it's the only way to write OO in perl5 | |||
timotimo | that's not right | 22:00 | |
you can build your own object orientation | |||
masak | as many did, pre-Moose | 22:01 | |
and post-Moose too, I'm sure | |||
timotimo | oh! | ||
sorry, i read perl6 where you wrote perl5 | |||
i'% silly | |||
masak | also "we stole the Perl 6 metamodel" is a truth with qualifications | ||
mst | masak: did you miss the 'ish' ? | 22:02 | |
ZoffixW | m: 'fooABCABCbar' ~~ / foo ( AFOO BC+ ) + bar /; | ||
camelia | rakudo-moar 2275f6: OUTPUT«Potential difficulties: Space is not significant here; please use quotes or :s (:sigspace) modifier (or, to suppress this warning, omit the space, or otherwise change the spacing) at /tmp/hfSzcPl9Ja:1 ------> 3'fooABCABCbar' ~~ / foo ( A…» | ||
ZoffixW | ^^ isn't that annoying? | ||
masak | what actually happened was more like "we stole *Pugs's* Perl 6 metamodel", and then Rakudo stole Moose's back | ||
ZoffixW | I'd even call it a bug. | ||
mst | right, I spent quite a while running around to get people to actually talk to each other ;) | ||
TimToady | well, both were developed in the same cabin at the same time | ||
22:03
vendethiel left
|
|||
masak | at some point yes. after both had existed for quite some time :) | 22:03 | |
oh, or was there an earlier cabin thing, around 2006? | |||
psch | ZoffixW: what's supposed to be buggy there? | ||
(might be clear if i could see where the eject is...) | 22:04 | ||
masak | I really like how Moose puts almost everything worthwhile into the methods. that's necessary, because the blessed-hashrefs substrate it's building on makes the attributes quite dumb and un-private | 22:05 | |
with Perl 6's MOP, the balance is a bit different | |||
ZoffixW | psch, why is it warning me? It's a capture and I want to space out the terms. | ||
psch, here: fpaste.scsys.co.uk/500157 | |||
n0tjack | what's the right doc to understand all the rx modifiers, like sigspace, i, 1st, etc? | ||
ZoffixW | n0tjack, docs.perl6.org/language/regexes#Adverbs | ||
n0tjack | merci | 22:06 | |
ZoffixW | n0tjack, I don't remember if I've seen 1st in there. It might be elsewhere | ||
psch | ZoffixW: i think i agree with you. i don't see that warning adding anything of value | 22:08 | |
ZoffixW nods | |||
psch | m: say "foo" ~~ / f o o / | ||
camelia | rakudo-moar 2275f6: OUTPUT«Potential difficulties: Space is not significant here; please use quotes or :s (:sigspace) modifier (or, to suppress this warning, omit the space, or otherwise change the spacing) at /tmp/bjD588wdro:1 ------> 3say "foo" ~~ / f7⏏5 o o…» | ||
timotimo | consider this: | ||
m: say "here be dragons" ~~ /here be dragons/ | |||
camelia | rakudo-moar 2275f6: OUTPUT«Potential difficulties: Space is not significant here; please use quotes or :s (:sigspace) modifier (or, to suppress this warning, omit the space, or otherwise change the spacing) at /tmp/hVqDOXMXIy:1 ------> 3say "here be dragons" ~~ /h…» | ||
timotimo | that will be a match fail. | ||
m: say "here be dragons" ~~ /"here" "be" "dragons"/ | |||
camelia | rakudo-moar 2275f6: OUTPUT«Nil» | ||
timotimo | ^- you can always make explicit that you don't expect spaces to match there | 22:09 | |
m: say "here be dragons" ~~ /"here" be "dragons"/ | |||
camelia | rakudo-moar 2275f6: OUTPUT«Nil» | ||
timotimo | ^- it only triggers when spaces show up between non-quoted literals | ||
psch | yeah, between atoms | ||
that's what i saw in the code :s | |||
ZoffixW | Alright. I guess I need to use this in real life code to see if it's annoying or not :) | ||
I just spotted it from an example in the learnxiny | |||
ZoffixW will fix the example | 22:10 | ||
psch | with the explanation i can readily accept it being there - it's apparently not something that would come up in my own code, cause i haven't seen it before... :) | ||
which probably means it's might be useful | |||
ZoffixW | Yeah | ||
psch | -'s | 22:11 | |
22:17
cognominal_ left,
n0tjack left
|
|||
timotimo | i'd kind of be interested to see each error message get its own little page on the 'web | 22:18 | |
with a comments function | |||
"like this exception on facebook" | |||
psch | haha | ||
timotimo | angular has something like that | 22:19 | |
when it spits errors at you, it also has a link to a sort of explainer page on their 'site | |||
psch | well, we already try to have awesome errors | ||
but i guess having it explained more accessible is always possible | 22:20 | ||
s/accessible/thoroughly/ # maybe? | 22:21 | ||
timotimo | mhm | 22:22 | |
22:26
Hor|zon joined
|
|||
ShimmerFairy | I think a link in error messages would be weird, but naming the exception type would be very nice for looking up more info :) | 22:26 | |
(that is, sticking a self.^name somewhere appropriate in error messages) | 22:27 | ||
22:28
lichtkind left
|
|||
ZoffixW | W00t! I'm not the final stretch: "APPENDIX A: ... It's considered by now you know the Perl6 basics." | 22:28 | |
22:30
Hor|zon left
|
|||
timotimo | ShimmerFairy: hm. on the one hand, i agree, on the other hand, that could be a bit weird? | 22:30 | |
not sure | |||
ShimmerFairy | timotimo: just thinking about when you want to find more info on an error, I think it'd be more helpful to have 'X::Foo::Bar' to look up, than the more usual "copy-paste part of the error message" you do in other languages. | 22:32 | |
timotimo | yeah | ||
ShimmerFairy | Maybe not printed by default, but an easy way to get the name of the error type wouldn't hurt :) | ||
timotimo | aye, like --ll-exception | 22:33 | |
but it's not quite easy to get --ll-exception "in there" | |||
i'd prefer an env var for that | |||
or perhaps an env var that just has the same effect as putting --ll-exception | |||
ShimmerFairy | --verbose-exception :P | ||
timotimo | "--i'm-trying-to-fix-this-so-please-tell-me-what's-up" | 22:35 | |
22:35
cognominal_ joined
|
|||
ShimmerFairy | .oO( --VERBOSE / --BRIEF / --SUPERBRIEF ) |
22:36 | |
pink_mist | --BOXER | ||
timotimo | i've never worn a verbose down there; is it comfortable? | 22:37 | |
pink_mist | 0_o I was thinking the breed of dog | 22:38 | |
timotimo | haha | ||
isn't "boxer briefs" a common kind of underwear? | |||
ZoffixW | yeah | 22:40 | |
pink_mist | I'm not sure .. I know of boxer shorts, and those are usually 'opposed' as to briefs | 22:41 | |
-as | |||
timotimo | oh | ||
Skarsnik | hm, now DBIish do method always give me 0E0 | ||
pink_mist | seems like one of those perl5 '0 but true' type values | 22:42 | |
timotimo | nope | ||
0e0 is just a Num | |||
pink_mist | m: say so 0e0 | ||
camelia | rakudo-moar ec2cad: OUTPUT«False» | ||
Skarsnik | 0E0 is no row | ||
oh it's a real false value? | 22:43 | ||
pink_mist | apparently | ||
timotimo | i have a hard time coming up with the right english words to explain what my understanding of boxer shorts vs boxer briefs is | ||
pink_mist | I've never heard of boxer briefs before | ||
(of course I may just have lived a very sheltered life 0_o) | 22:44 | ||
ShimmerFairy | timotimo: "boxer briefs" is a thing, but I've no clue how it compares to the other types :P | ||
timotimo | this won't surprise you, but if you google-image-search for "boxer briefs", it'll show you a bunch of crotches :) | ||
pink_mist | hah | ||
Skarsnik | The issue. I do a SELECT * request. doing prepare + execute and a fetchrow_array.elem give me 17, doing the same with do give me E0E, it should give me an object ~~ | ||
timotimo | so, this isn't a good description, but i think boxer briefs is the type that offers a sort-of pouch for the male physique | ||
22:44
spider-mario left
|
|||
timotimo | whereas the boxer shorts just have a seam from the front to th eback | 22:45 | |
god damn it, all these dudes in the images for "boxer briefs" are *super* ripped | |||
pink_mist | comparing google image search results for boxer briefs vs boxer shorts, I'd say boxer shorts are loose, and boxer briefs are tight | ||
but I've never heard the distinction before | |||
timotimo | mhm | 22:46 | |
ZoffixW | Boom. Done! I finished learnyinx! I now officially know a useful amount of Perl 6 :) | 22:47 | |
pink_mist | Zoffix++ | ||
ZoffixW | And I even get to score a PR for #Hacktoberfest by submitting some corrections :) | ||
timotimo | Zoffix++ | 22:48 | |
i think i need me some sleepy times | |||
pink_mist | ep.yimg.com/ay/stylinonline/domo-ku...iefs-5.jpg hah, this was a fun one | ||
(it's safe for work) | |||
timotimo | heh | 22:49 | |
i don't actually know what domo kun actually is | |||
i've seen 'em show up in a bunch of gifs, though | 22:50 | ||
waving their arms up and down | |||
pink_mist | aye I don't know either, I just found the strategic placement of the mouth funny =) | ||
22:51
localJoe joined
|
|||
timotimo | of course :) | 22:51 | |
localJoe | Is there a Perl module for use on Windows with WPF applications that is similar to Win32::GuiTest ? | 22:52 | |
... namely, to do Windows UI automation. | |||
ZoffixW | localJoe, I had some success using NativeCall to call functions from AutoIt3 (www.autoitscript.com/site/) DLLs. I'd go that route.... but... have you tried seeing if Win32::GuiTest works with Perl 6's Inline::Perl5 ? | 22:53 | |
Oh, it's got XS. Never mind. I don't think Inline::Perl5 can handle XS stuff | 22:54 | ||
localJoe | ZoffixW, thanks for your reply. I am familiar with AutoIt, which is nice but not robust for my needs (lots of automated tests needed). Win32::GuiTest is for WQin32 applications, does not fly well with WPF applications. | 22:55 | |
*Win32 | |||
ZoffixW is lucky enough to not know what "WPF applications" are :D | |||
localJoe | I would like to do automate Windows WPF applications using Perl. For Win32 applications, Win32::GuiTest was good | 22:56 | |
Well, my work thing is on Windows... | 22:57 | ||
22:57
RabidGravy left
22:59
Skarsnik left
|
|||
masak | 'night, #perl6 | 23:03 | |
ZoffixW | night | ||
localJoe | hmm, if irc doesnt know the answer, then it doesnt exist, ya? | 23:04 | |
ZoffixW | localJoe, all Perl 6 modules are here and I see no Win32 in there: modules.perl6.org/ | 23:05 | |
23:06
skids joined
|
|||
ZoffixW | As for IRC answers: keep in mind it's Friday night :D Also, try asking in #perl too, maybe they know. | 23:06 | |
colomon | Zoffix: I’m pretty sure Inline::Perl5 can indeed handle XS stuff. # disclaimer: have not tried this myself | 23:07 | |
ZoffixW | Oh yeah, the docs do say "Supports Perl 5 modules including XS modules" | 23:09 | |
ZoffixW wonders where they heard "no XS" bit | |||
localJoe | Thanks for the hints. I wonder even if Wind32::GuiTest in Inline::Perl5, even if it supports XS stuff, could handle WPF applications. I need to look around more. And try in #perl too. Thanks | 23:12 | |
23:14
kid51 joined,
captain-adequate left
23:15
bjz left
|
|||
timotimo | you can totally use XS modules with Inline::Perl5. | 23:17 | |
"no XS" is for the v5 module | |||
because that's basically a grammar that parses perl 5 and generates the same kind of AST perl6 uses | 23:18 | ||
23:18
bjz joined
|
|||
ZoffixW | Ahhh. Thanks for clarifying. | 23:18 | |
For a second I thought I will have to quit drinking :) | |||
23:19
kid51_ joined,
kid51 left,
kid51_ is now known as kid51,
n0tjack joined
23:21
Peter_R left
23:23
kid51_ joined
23:24
kid51 left,
kid51_ is now known as kid51
23:27
Hor|zon joined
23:30
n0tjack left
23:31
tokuhirom joined,
Hor|zon left,
n0tjack joined
|
|||
alpha123 | Anyone have any idea how to get perl6 to compile on FreeBSD? I've determined it seems to want GCC (which I ahve installed) but I can't actually get it to use my GCC | 23:32 | |
23:32
localJoe left,
localJoe joined
|
|||
alpha123 | (rakudo, specifically) | 23:34 | |
timotimo | alpha123: it can handle gcc as well as clang | 23:36 | |
you may have to do moarvm individually from the rest so that it picks up the right configuration? | |||
all that's important for building everything correctly is that you give all Configure.pl scripts the same --prefix= | |||
in my case that's /home/timo/perl6/install | |||
and then you build MoarVM, nqp and rakudo in that order, with "make install" steps in between | 23:37 | ||
alpha123 | timotimo: indeed, I seem to have trouble building moarvm with --backend=moar --gen-moar from rakuod's configure.pl script. I'll try building it separately. thanks | ||
23:38
chrstphrhrt left,
localJoe left,
tokuhirom left
|
|||
timotimo | good luck! | 23:42 | |
i'll go to bed now | |||
alpha123 | had to fiddle around with --cc, --compiler, and --toolchain but it seems to work, though it wasn't super happy building with clang (I probably messed up my environment somehow while trying to get it to use gcc) | 23:45 | |
thanks | |||
23:46
yqt left
23:48
BenGoldberg joined
|
|||
ZoffixW | If anyone wants to have a whack for the few items (top) that I was not able to fix myself: github.com/adambard/learnxinyminut...ssues/1390 | 23:48 | |
And now it's... Beer O'Clock! :D | 23:49 | ||
23:49
ZoffixW left
23:56
n0tjack left
23:57
rurban left
23:59
adu joined
|