»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! | tinyurl.com/p6contest Set by moritz_ on 28 December 2010. |
|||
flussence_ | the thing I'm thinking of is: parse the heredoc as a literal string, remove the whitespace from the result, then interpret that as the equivalent inline q:* | 00:04 | |
sorear | Should I be listening to the verbiage in #parrot? | 00:09 | |
00:10
am0c^ left
|
|||
coldhead | this parrot drama is scary for noobs | 00:11 | |
i feel like my parents are fighting | |||
00:14
felliott joined
00:15
plobsing joined
|
|||
colomon | oh noez. | 00:17 | |
sorear | Does anyone have any last minute requests before I tag niecza v2? | 00:19 | |
00:25
snearch left
|
|||
PerlJam | coldhead: don't worry too much. This is only the 4th or 5th time it's happened (and each time things have gotten better as a result) | 00:27 | |
00:32
muixirt left
00:35
kst` joined,
dorlamm joined,
kst left
00:41
kst joined
|
|||
[Coke] | it's not like parents, more like 2 uncles you only see a few times a year. no worries. ;) | 00:49 | |
[Coke] has flashbacks to Coleda Family fights and goes off to hide in a corner with a beer. | |||
PerlJam | At least this time you'll still see the uncles around on holidays when the dust settles | ||
00:51
kst left
00:52
kst joined
00:53
kst` left
|
|||
[Coke] | rakudo: Inf.int.say | 00:54 | |
p6eval | rakudo d3e9a3: OUTPUT«Method 'int' not found for invocant of class 'Num' in main program body at line 22:/tmp/sXkZh4NwPA» | ||
[Coke] | rakudo: Inf.Int.say | ||
p6eval | rakudo d3e9a3: OUTPUT«-9223372036854775808» | ||
00:54
cdarroch left
|
|||
[Coke] | I'm goint to ask the rt admins to add a tag called "needstests". this work for folks? | 00:59 | |
PerlJam | [Coke]: +1 from me | 01:00 | |
pmichaud | I thought we had such a tag already? | ||
[Coke] | (I think I'd really like a new status, but this seems less invasive) | ||
pmichaud | or did we just decide that assigning to moritz++ was sufficient? | ||
I know we asked for a tag to be added of some sort, which the rt admins did for us | |||
I don't remember what it was. | |||
[Coke] | I don't see one with "test" in the name. | 01:01 | |
I see "testcommitted" | |||
s/one/relevant one/ | |||
pmichaud | okay. proceed then -- maybe the rtadmins will say "didn't you already ask for ...?" and remind us :) | 01:02 | |
or perhaps they will smite us down with gigantic bolts of lightning. | |||
pmichaud hopes for the former and not the latter. | |||
jdhore | pmichaud, Good work on that episode of FLOSS weekly a few months ago...I loved it. | 01:04 | |
pmichaud | merlyn++ definitely gets the credit. he just asked questions and let me ramble, and then edited it into something coherent, I think. But thanks! :) | 01:05 | |
PerlJam | or had someone edit it into something coherent :) | ||
[Coke] | heh. I listend to that episode and have skipped every one since. ;) | 01:06 | |
coldhead | it's nice how merlyn is now interested in perl 6 | ||
well done there | |||
[Coke] | pmichaud: feedback on 73148 ? | 01:08 | |
PerlJam | coldhead: have you seen learningperl6.com? | ||
[Coke] | rakudo: say (1 ^^ 1).WHAT | 01:09 | |
p6eval | rakudo d3e9a3: OUTPUT«Bool()» | ||
[Coke] | rakudo: say (1 ^^ 1) | ||
p6eval | rakudo d3e9a3: OUTPUT«Bool::False» | ||
[Coke] | rakudo: ~fail().say | 01:10 | |
p6eval | rakudo d3e9a3: ( no output ) | ||
coldhead | i hadn't, thank you PerlJam | 01:11 | |
01:13
dorlamm left
01:19
ggoebel left
01:23
stkowski left
01:24
ggoebel joined
01:25
cosimo left
01:28
felliott left
01:32
felliott joined
01:33
felliott left
|
|||
dalek | ecza: 79d5470 | sorear++ | docs/announce.v2: Add URLs to v2 announce |
01:45 | |
ecza: f937065 | sorear++ | FETCH_URL: Update bootstrap to v2 |
|||
sorear | v2 announce sent. | 01:49 | |
colomon | sorear++ | ||
01:51
drbean joined
02:07
Grimnir_ left
02:08
shabble joined,
Grimnir_ joined
|
|||
snarkyboojum | as far as I know learningperl6.com hasn't changed for years :) I wonder if merlyn and co still plan to write it? | 02:11 | |
02:16
whiteknight left
|
|||
snarkyboojum | twitter.com/#!/merlyn/status/32263043912040448 | 02:27 | |
well, at least it's a "possible reality" now ;) | |||
02:29
felliott joined
02:34
slavik left
02:35
slavik joined,
slavik left
02:36
slavik1 joined
02:43
bluescreen left,
lopaway is now known as lopnor
02:49
kcwu left
02:57
lopnor is now known as lopaway
|
|||
snarkyboojum | pretty nice introductory perl6 preso! mfollett.com/finalized-perl-6-talk-slides | 02:59 | |
03:00
noganex joined
03:04
noganex_ left
03:19
Chillance joined
03:28
kcwu joined
03:38
karb joined
|
|||
karb | after building perl6 from the tarball when I run perl6 it runs fine. But after I reboot my machine and then run perl6 it throws a segmentation fault. Is anybody else having this problem? | 03:42 | |
coldhead | that's awful :( | 03:43 | |
is it an environment variable maybe? set during the build? | |||
karb | I tried with gdb the fault seems to occur in src/packfile/api.c:941 | ||
i think so | |||
colomon | Have you executed "make install" ? | ||
karb | seems there is some env variable thats set during make, but is lost when i reboot | 03:44 | |
ya.. i tried make install after reboot | |||
it does not work | |||
has anybody else reported this? | 03:45 | ||
pmichaud | phenny: tell coke okay to close 73148 (sorry for not responding sooner) | ||
phenny | pmichaud: I'll pass that on when coke is around. | ||
pmichaud | or do I have to say "[coke]" for the nick? | ||
phenny: tell [Coke] okay to close 73148 (sorry for not responding sooner) | |||
phenny | pmichaud: I'll pass that on when [Coke] is around. | ||
colomon | karb: not that I know of. What platform are you on? | 03:46 | |
pmichaud | that'll get it :) | ||
karb: what OS? | |||
karb | colomon: I'm on ubuntu 10.10 | ||
pmichaud | it works fine for me on kubuntu 10.10 | ||
colomon | karb: and your problem is with the latest Rakudo Star? | ||
pmichaud | and under linux, makefiles can't really set environment variables that get lost at reboot | ||
(environment variables are always local to the make command itself, not the shell that runs it) | 03:47 | ||
karb | yes in rakudo star | ||
pmichaud | any chance you have an older version of rakudo or parrot installed on this machine somewhere? | ||
it may be grabbing the wrong library | |||
karb | this is a fresh star install | ||
pmichaud | have you ever installed star or parrot on this machine before? | 03:48 | |
karb | no | ||
pmichaud | hmmmm | ||
I don't have any clues at the moment. | 03:49 | ||
That's not something any of us have encountered before, afaik | |||
sorear | any time a reboot mysteriously changes something, you should suspect the platform | 03:50 | |
karb | ok. I'll try digging this. maybe there is some library path issue | ||
sorear | computers are supposed to be deterministic. nondeterministic faults suggest hardware failures, in particular RAM issues; I'd try memtest86+ next | 03:51 | |
karb | actually, if I build the same star tarball on another machine everything works fine.. so its something with my laptop | ||
sorear | (however, I've been burned, so I'm probably not the fairest) | ||
karb | no problem.. i'll dig through this. Just thought to ask if anyone else faced this on ubuntu | 03:52 | |
04:01
felliott left
|
|||
diakopter | pmichaud: I'm confused by "if I'm writing an APL compiler, I don't want the whole Perl 6 runtime" | 04:03 | |
(why would you want the whole Perl 6 runtime?) | |||
(which parts wouldn't you want?) | 04:04 | ||
sorear | niecza: | ||
p6eval | niecza v2: ( no output ) | ||
sorear | yay, it updated the tags ok | 04:05 | |
pmichaud | diakopter: that's the purpose of NQP. it lets you use perl 6 syntax and grammars to write compilers without having to also have the entire Perl 6 runtime available for the compiler to run | ||
04:06
karb left,
arthur-_ left
|
|||
sorear | APL was designed to not require a fancy parser | 04:06 | |
it is, iirc, a regular language | |||
diakopter | sorear: I'm sure you still see his point, though | ||
pmichaud | so, if I want to use Perl 6 syntax to write an APL compiler, I can do so without also having to have all of builtin classes and methods that a Perl 6 implementation would expect to rely upon. | 04:07 | |
diakopter | I guess I don't understand how those are a problem | ||
(yet) | 04:08 | ||
sorear | I just think APL is a bad example - APL would love to have parallel reduce operators on multidimensional compact arrays and other p6runtime goodies | ||
04:08
satyavvd joined
|
|||
pmichaud | yes, pick any other language then | 04:08 | |
I mean to run dynamically, not compile to binary and execute that | |||
APL might be a bad example -- I was just trying to pick a language that was none of Perl/Python/Ruby/etc. | 04:09 | ||
Tcl might be a better one. | |||
04:09
lopaway is now known as lopnor
|
|||
diakopter | does that even need a parser? | 04:10 | |
allbery_b | yes, it's just a very simple one | ||
pmichaud | yes | ||
diakopter | 'twas a joke. | 04:11 | |
pmichaud | github.com/partcl/partcl-nqp/blob/...Grammar.pm might be an example | ||
allbery_b | isn't the point more that you might not want all the baggage necessary to call eval? | ||
pmichaud | diakopter: obtw, I'm thinking of moving nqp-nom to a new repository in the next couple of days. Anything I need to know to not overly impact your work with nqp? | 04:12 | |
I was planning to migrate all of the branches (except master) across | |||
diakopter | I still don't get the point of "without also having to have all of builtin classes and methods that a Perl 6 implementation would expect to rely on" | ||
pmichaud | Perl 6 has a very large runtime footprint | ||
diakopter | I haven't ever looked at nqp-nom | 04:13 | |
pmichaud | much of which wouldn't be needed for a compiler | ||
diakopter: is any of the stuff you've been working on in the nqp-rx repo? | |||
diakopter | nope, I've never had a commit bit there, I don't think. | ||
pmichaud | okay | ||
diakopter | nor nom | ||
pmichaud | have you read the "NQP Roadmap 2011.01" post yet? | 04:14 | |
diakopter | I didn't even know there was a parrot edition of 6model until two weeks ago :D | ||
I knew only about the ones in jnthn/6model | |||
oh, yes, I read your blog post in the past hour | 04:15 | ||
along with backlogged the past 24 hours of #parrot out of curiosity | |||
pmichaud | it's been an interesting day there, yes :) | ||
okay, I'll take that as being that it's okay for us to move nqp-nom into its own repo, and we'll hope to eventually merge your nqp work into that repo at an appropriate time in the future | 04:16 | ||
now I just need to check with mberends on the stuff he's been working on :) | |||
diakopter | that's all in jnthn/6model | ||
pmichaud | okay | 04:17 | |
good | |||
over the next few weeks we'll be migrating past/post to be implemented in nqp, I think -- borrowing heavily from the pieces that others have already put together | |||
diakopter | there are "java" and "net" dirs... it's waiting for a "bird" dir | ||
all of past (including regexes)? | 04:18 | ||
pmichaud | yes, hopefully | ||
that's the expectation | |||
diakopter | hrm. | 04:19 | |
that one in particular will require the most work on both clr and java. | |||
pmichaud | yes, but I'm hoping it'll be easier to deal with as nqp source than anything else | 04:20 | |
I think jnthn++ has already migrated much of Cursor and other components to nqp source | |||
anyway, if you see us taking a step that looks problematic, feel free to say something. | 04:21 | ||
I'm hoping there won't be (m)any | |||
diakopter | but | ||
he migrated much of the parrot-backend edition of Cursor... I guess he didn't use the Cursor I ported? | 04:22 | ||
pmichaud | he may have | 04:23 | |
I didn't look yet to see exactly what was done -- I'm hoping to do that as part of migrating nqp-nom into a new repo. | |||
I may have mis-understood or mis-stated something, then. | |||
04:23
Su-Shee_ joined
|
|||
diakopter | I don't see a Cursor.pm there (yet) | 04:24 | |
pmichaud | okay, he may be working on it but not completed it yet then | ||
04:27
Su-Shee left,
kcwu left
|
|||
diakopter | pmichaud: is nqpbook on hiatus? | 04:29 | |
or is it just wayyyy far to the side on the plinko board of round tuits | 04:30 | ||
pmichaud | briefly; I'm thinking I'll write some tutorials and examples to my journal as we work on the new nqp, and hopefully those can form the core of an nqpbook | ||
diakopter giggles as his own joke | |||
pmichaud | I posted the roadmap to my journal today and the main comment I got back was "needs documentation" | ||
so, it's not too far to the side | 04:31 | ||
and the timing would be good now | |||
diakopter | pmichaud: were you imagining that the clr edition of Cursor.pm would be identical/one-in-the-same to the other editions? | 04:32 | |
(or would you allow for some specialization) | 04:33 | ||
pmichaud | I'm pretty sure that's what jnthn and I are aiming for, yes. | ||
we might allow for specialization for optimization reasons, yes. | |||
diakopter | here's sortof a larger question (hoping you have time) | 04:34 | |
so... the regex compiler for nqpbird would still target post/pir, I assume....? | 04:36 | ||
pmichaud | post, yes. I'm not sure sure it'll be pir specific at that point. | ||
diakopter | what will compile post? and to what? | 04:37 | |
pmichaud | I've been thinking will have post-to-vm compilers | ||
diakopter | oh god. | ||
that is what my questions have been dancing around. | |||
pmichaud | if that won't work, we can have separate past-to-vm compilers | ||
diakopter | I didn't dare suggest it | 04:38 | |
well we've already got the 1800 lines of past-to-vm compilers | |||
pmichaud | but if past is flexible enough to handle lots of hlls, I'm thinking post can be flexible enough to handle a variety of backends | ||
diakopter | so that may be a miscommunication b/t you & jnthn, or different plans. | ||
pmichaud | and post won't look _anything_ like it does now -- not even for parrot/pir | ||
the current version of post is very string oriented. the new version of post (which bacek++ has been working on) models the parts of the vm more directly, with separate types for registers and the like. | 04:39 | ||
bacek's version of post goes straight to .pbc without needing PIR | |||
anyway, if we end up having separate posts for the vms and separate past compilers for the different posts, I'm okay with that. | 04:40 | ||
we should still be able to share a lot of code between them, I think. | |||
diakopter | for the clr, 6model already has a decently sufficient model of CIL as its assembler and "DNST" as its PAST, ish. | 04:41 | |
pmichaud | yes, I'd need to look at that a bit. So far neither jnthn++ nor I have detected a miscommunication between us... but part of that is because I'm still fairly flexible on the overall design | 04:42 | |
diakopter waves hands in wild ovoids | |||
pmichaud | yes, there's some of that as well, following in grand Perl 6 tradition :) | ||
diakopter | based on this, I believe I'll halt my work on nqpclr-rx (or continue the halt from November or whenever) and wait until someone tells me the regex compiler should be targetting a clr stack machine or post. | 04:45 | |
pmichaud | diakopter: okay, that seems reasonable. I suspect we'll have an answer for you on that sooner rather than later (perhaps even as soon as jnthn++ reads this and says "oh, pmichaud++ is wrong" :) | 04:46 | |
diakopter | and I won't emit milk puddles from my tear ducts if all my work was "wasted". :} | ||
pmichaud | no way is it "wasted" | ||
we needed to have some idea of what's possible, your work at minimum tells us that | 04:47 | ||
diakopter | oh, I know, especially not to myself; I learned a lot | ||
pmichaud | all of the clr and jvm work has really helped us formulate a stronger approach overall -- jnthn identifies that as a key component of the overall work all the time | 04:48 | |
and it's very important to him (and me) that you and mberends find a way to continue what you've been working on | |||
and that all of us find a way to bring it all together under an "nqp" umbrella :) | |||
diakopter | meh. I've "thrown away" so much work I'm numb to it, except when I take it personally..... oh wait... | 04:49 | |
pmichaud | I know the feeling all too well -- I've done the same. | 04:50 | |
three separate implementations of PGE, an implementation of nqp-rx, various false starts with TGE and PAST and POST, etc. etc. | 04:51 | ||
a couple of implementations of what eventually became Rakudo | |||
:) | |||
diakopter | and several more to come! | 04:52 | |
:P | |||
pmichaud | yes, indeed. but economies and capitalism are built on the the principal of "creative destruction" :-) | 04:53 | |
diakopter thought that was a Marxist notion | |||
oh, a Marxist framing of capitalism | 04:54 | ||
pmichaud | " | ||
From the 1950s onwards, the term "creative destruction" has become more readily identified with the Austrian-American economist Joseph Schumpeter,[4] who adapted and popularized it as a theory of economic innovation and progress. The term, as used by Schumpeter, bears little resemblance with how it used by Marx." | 04:55 | ||
justatheory | Marx++ | ||
pmichaud | looks like wikipedia needs an edit to "how it *was* used by Marx." | ||
diakopter | wikipedia needs lots of things | 04:56 | |
Marx-- | |||
justatheory | lol | ||
pmichaud | oh, I always somewhat liked Groucho. | ||
justatheory | Harpo's letterhead: kottke.org/11/01/harpo-marx-letterhead | 04:57 | |
diakopter | pmichaud: where might I find a walkthrough/tutorial (or just theory) on identifying & analyzing basic blocks in program trees? | 04:59 | |
(or anyone) | |||
pmichaud | I don't have a reference off the top of my head; probably a compiler theory / implementation book or something like that | 05:00 | |
diakopter | I mean, "compiler textbooks" isn't really a helpful answer... (which one explains that well) | ||
oh | |||
pmichaud | I've never found compiler texts to be of much use in actually implementing a compiler :) | ||
diakopter | I suppose the algorithm on wikipedia is .. ok | 05:01 | |
hm, I wonder how general I can get it... (to allow also for future phase inlining) | 05:03 | ||
05:04
kcwu joined
|
|||
pmichaud | afk for me, time for sleep | 05:06 | |
sorear | has any of my CLR work been at all noticed? | 05:09 | |
diakopter | :P | 05:10 | |
"by whom" | 05:11 | ||
"those who matter" | |||
"those who matter to whom" | |||
pmichaud | sorear: I've noticed it. I've noticed that it's apparently working. :) | 05:19 | |
after thinking about it a bit more, I think it more likely that initially at least, we'll have separate PAST::Compiler sections for each backend. But that's still a preliminary guess -- we'll know more as we get into the details. | 05:20 | ||
afk again, for sleep | |||
05:28
envi joined
05:33
kaare_ joined
05:51
arthur-_ joined
05:55
gimix joined
06:13
HarryS left
06:15
cjk101010 joined
06:25
lopnor is now known as lopaway
06:45
aesop left,
aesop joined
06:49
mtk left
|
|||
dalek | ecza: c6596ea | sorear++ | docs/nam.pod: Start documenting opcodes for pmurias |
06:52 | |
sorear out.. | |||
06:55
mtk joined
07:08
justatheory left
07:12
satyavvd left
07:17
Bruce_Wayne joined
07:20
HarryS joined
07:58
Bruce_Wayne left,
lopaway is now known as lopnor
08:00
kjeldahlw joined
08:16
Su-Shee_ is now known as Su-Shee
08:23
lopnor is now known as lopaway
08:29
agentzh joined
08:37
daxim joined
08:44
satyavvd joined
08:46
onehotmomma joined
08:47
onehotmomma left
08:53
hudnix left,
masak joined
|
|||
masak | hola, zebras. | 08:53 | |
huh, niecza and yapsi releases almost coincide this month. :) | 08:54 | ||
08:56
snearch joined
09:00
kfo_ left
09:01
kfo joined
|
|||
moritz_ | Q: How does a geek know it's a new month? A: he has lots of mailing list subscription reminders in his inbox | 09:03 | |
masak | :) | 09:04 | |
09:10
lamstyle left
09:16
lopaway is now known as lopnor
|
|||
mathw | saluton masak | 09:19 | |
09:22
dakkar joined
|
|||
masak | bonan matenon, mathw. | 09:23 | |
moritz_ | is a saluton a quantized greeting? :-) | ||
masak | :P | ||
masak considers replying "yes" just to make moritz_ happy | |||
greeting particles tend to interact with the thankfulness particle, the "dankon". | 09:25 | ||
moritz_ | regarding discretized stuff, I have industrial disease :-) | 09:27 | |
masak | :) | 09:28 | |
overdose of academions... | 09:29 | ||
09:30
Canyon joined
|
|||
moritz_ | :-) | 09:30 | |
Canyon | hi | ||
masak | hi Canyon. | ||
Canyon | I have a beginner question | ||
masak | shoot. | ||
mathw | Excellent | ||
Canyon | I want to store some subroutines and global variables in a different file, without using modules(because I'm not experienced enough to write them) | 09:31 | |
masak | it's not that difficult. | ||
but go on. | 09:32 | ||
or was that it? :) | |||
Canyon | is there a way to do this, without sacrificing showing of errors? | ||
*the | |||
moritz_ | learning to write and use modules is easier than reinventing the module system | ||
(this applies both to Perl 5 and Perl 6) | 09:33 | ||
masak | Canyon: create a file A.pm -- put your stuff in there. in another file, write 'use A;' | ||
Canyon | I've already written the subroutines | ||
masak | Canyon: that's it. | ||
Canyon | I don't actually need modules | ||
moritz_ | you do | ||
masak | sounds like you do. | ||
mathw | Modules are how you include things from other files, in general | ||
And they really are very very simple | |||
moritz_ | Canyon: a module is nothing magical to be afraid of. It's just a piece of code in a file. | 09:34 | |
masak | you *could* slurp-and-eval the other file. but please don't do that. it would make all of us sad. | ||
Canyon | masak, if I'd use A.pm, would I still be informed about erros, when implementing new subroutines? | ||
masak | Canyon: definitely. | ||
Canyon: you can even try compiling A.pm alone, with the -c flag. | |||
(to see if there are syntax errors, etc) | 09:35 | ||
but even if you don't, you'll get error reports from both files whenever you run the other file. | |||
Canyon | I've used require function_index.pl and the "1;" line , and I recall that the script did not work without mentioning the line that caused the problems | ||
moritz_, I'm writing simple scripts | 09:36 | ||
masak | Canyon: maybe you didn't do 'use strict;' and 'use warnings;'...? | ||
Canyon | only use strict; | ||
masak | use warnings and you'll get more informative warnings :) | 09:37 | |
Canyon | I was reading here and I got scared: www.slac.stanford.edu/grp/scs/net/t...frame.html | ||
:) | |||
moritz_ | Canyon: don't close yourself to the best solution, just because you think it's difficult | ||
Canyon | I really want to avoid modules at the moment. | ||
I already have the subroutines | |||
it takes time to modify them | |||
the 1; line is still needed, right masak? | 09:38 | ||
moritz_ | not in Perl 6 | ||
masak | in Perl 5, it is. | ||
Canyon: you're aware that you're in #perl6 and we're helping you out of pure kindness, right? :P | |||
moritz_ | Canyon: that link describe not only how to write modules, but a whole distribution. You don't need the distribution part | 09:39 | |
masak | Canyon: what moritz_ said. a module is simply a .pm file that you 'use' | ||
nothing complicated about it. | |||
moritz_ | Canyon: en.wikipedia.org/wiki/Perl_module has a not-so-scary explanation | ||
Canyon | oh, I'm sorry. I didn't realize that they are so much different. In this case, thank you. | ||
masak | the '1;' at the end is needed because that's Perl 5's mechanism for saying "module works fine". | 09:40 | |
Canyon: no need to apologise. this helps us remember *why* Perl 6 is different ;) | |||
09:40
cafesofie joined
|
|||
masak | Canyon: had you ended up in the wrong Perl 5 channel, people might have called you a moron. (which you're decidedly not.) | 09:41 | |
Canyon | :)) | ||
actually I'm a noob when it comes to perl | |||
I'm used to c++ | |||
moritz_ | that's quite a shift of perspectives | 09:42 | |
masak | still, the worst parts of C++ ought to prepare one adequately for the worst parts of Perl. :P | ||
Canyon | I'm no C++ expert either | 09:43 | |
mathw | Not necessarily | ||
The worst parts of C++ are quite different :) | |||
mathw does C++ for a living | |||
masak | oh, I'm not saying they're not different. | ||
I'm saying they're, objectively, worse. | |||
mathw | I suppose you get used to the horror after a while, but at least neither of them are Java | ||
masak | wait... you dislike Java more than C++? | 09:44 | |
mathw | yup | ||
masak digests that | |||
moritz_ | java has the philosophy "it looks less complicated if we force you to write more lines to say the same thing" | ||
masak | absolutely. | 09:45 | |
Java is a DSL to turn XML into stack traces. | |||
moritz_ | right :-) | 09:46 | |
masak | still, as much as I object to the culture sometimes, I'm generally impressed by the JLS and the APIs. | 09:47 | |
the one big omission is closures, of course. | |||
moritz_ | it's quite interesting to observe how the lack of closures influences APIs | ||
masak | that's a blog post right there. | ||
mathw | I object to Java on the basis that it doesn't trust its programmers | ||
masak | as MJD once said, in thirty or so years, people will ridicule languages without closures as we today ridicule languages without recursion. | 09:48 | |
moritz_ | or languages without lexical variables | ||
mathw | Was that thirty or so years ago? Because, you know, *point and laugh* | ||
moritz_ | mathw: so much for unevenly distributed future :-) | 09:49 | |
mathw | It's actually hard to use current C++ sometimes, because I know we've got closures in the next standard... | ||
masak | mathw: I'm inclined to agree with you about the trust thing. the discussion about OO led me to realize that private attribute and the like are not there for security, but purely for convention. | ||
09:50
tzhs joined
|
|||
mathw | well in C++ you can certainly get hold of private attributes if you want them | 09:50 | |
masak | the discussion we had on perl6-language a couple months back, that is. | ||
mathw | just some simple pointer arithmetic and poking in the header files | ||
masak | mathw: right. | ||
mathw | and that's one of the stronger private-hiding languages | ||
masak | and that's *always* possible, unless you close the user off from the metal. | 09:51 | |
mathw | yeah | ||
but that's not really the point of my objection to Java | |||
it doesn't trust its users to use operator overloading responsibly | |||
masak | right. | ||
moritz_ | in C++ you can also just use a preprocessor macro that changes 'private' and 'protected' to 'public' | ||
mathw | So I can't write a String-like class in Java | ||
masak | moritz_: o.O | 09:52 | |
mathw | moritz_: true :) | ||
I hadn't thought of that | |||
the preprocessor can be useful, but one of its uses is opening cans of highly poisonous worms | |||
far better to have macros baked into the language :) | 09:54 | ||
Canyon | may I interrupt you again for a second? | ||
moritz_ | that's why language modifications are explicitly scoped in Perl 6 | ||
Canyon: sure | 09:55 | ||
Canyon | I've modified the files | ||
using .pm and 1; | |||
Ubut I get this error ndefined subroutine &main::push_startsearch called at C:\Documents and Settings | 09:56 | ||
\Administrator\Desktop\workspace\script.pl line 52. | |||
the subroutine takes args | |||
moritz_ | Canyon: did you export that subroutine? | ||
Canyon | yes | ||
moritz_ | perldoc Exporter | ||
Canyon | oh | ||
ok, thank you. :) | 09:57 | ||
Tene | Interesting, 1.0 release of EFL: www.enlightenment.org/p.php?p=news/...news_id=28 | 09:58 | |
masak | <hyperbole>surely, the end times are near!</hyperbole> | 09:59 | |
what's next, Duke Nukem Forever? *snort* | |||
moritz_ | masak: nope, The Hurd 1.0 is still missing, can't be end times | 10:00 | |
masak | ah. right. | ||
moritz_ | and PHP 6 | ||
masak | pffft, the PHP guys just want a version 6 like big brother Perl... :P | ||
frettled | masak: Duke Nukem Forever has a launch date now, 2011-05-06 in our part of the world. | 10:01 | |
Tene | I hear Perl 6 folks are claiming to have a release these days. | ||
frettled | s/launch/release/, sorry | ||
masak | frettled: I know... | ||
frettled | Tene: That sounds weird :D | ||
masak | Tene: yeah but I meant official releases. | ||
moritz_ | Tene: yeah, but it's not a *real* release *cough* | ||
masak | you know, the kind that doesn't suck. | 10:02 | |
masak hides | |||
frettled | The release, my friend, is blowing in the wind. | ||
masak | I think I know an official release when I see one! | ||
moritz_ | masak: like a yapsi release? :-) | 10:03 | |
masak | this feels weird. how did I end up trolling #perl6? :P | ||
10:03
Canyon left
|
|||
moritz_ | masak: you ran out of dankons :-) | 10:04 | |
masak | *lol* | ||
moritz_: speaking of which... one Yapsi release coming up later today. | |||
I'm optimistic, and hope to be able to release the FUTURE with this release. | |||
might even hold the release off a day or so to get it in. | |||
moritz_ | masak: I hope it's shortly followed by a p4 review (or another blog post preparing it) | 10:05 | |
masak | it will be, don't worry. | ||
frettled | So we're back to the future again, eh? | ||
masak | ooh, I hadn't considered the Marty McFly potential! :) | 10:06 | |
mathw | groan | 10:07 | |
10:07
flussence joined
|
|||
moritz_ preemtively calls the pun police | 10:08 | ||
mathw | You know what I hate? Languages without multiple return values! | ||
10:09
flussence_ left
|
|||
mathw | and APIs which require arguments to be specified in the most awkward way possible | 10:09 | |
moritz_ | mathw: then you'll love the API of the MUMPS library | ||
it expects an array of about 70 entries | 10:10 | ||
mathw | fun | ||
I'm afraid Win32 is quite bad enough for me | |||
moritz_ | and writing some weird values in some of these entries changes the meaning and format of other entries | ||
and their combination control what the function does in the end | |||
10:10
bhwu joined
|
|||
moritz_ | and all in FORTRAN | 10:10 | |
with no bounds checking on any arrays | 10:11 | ||
mathw | that sounds enormously entertaining | ||
moritz_ | no type checking | ||
mathw: yes. Until you actually try to use it :-) | |||
mathw | I learned FORTRAN once | ||
it seemed like a better alternative to BBC BASIC, and tuition was available | |||
Fortunately I learned C not long afterwards | 10:12 | ||
moritz_ | and I forgot, some of these array items would be changed by the function, and be part of the output. Of course. | 10:13 | |
mathw | naturally | ||
it's a classic of API obfuscation | |||
muddle around your input and output parameters | |||
mix them together in unhealthy ways | |||
flussence gets flashbacks to php array functions | 10:14 | ||
10:14
Canyon joined
|
|||
mathw | bool add(int *arr) { arr[2] = arr[0] + arr[1]; return true; } | 10:14 | |
flussence | haystack then needle, except when it's the other way around, and not the explode() function which takes them in either order | ||
mathw | PHP has some lovely bits of API... | 10:15 | |
*cough* | |||
Tene | mathw: www.tnx.nl/php.html#args | 10:16 | |
Canyon | C:\Documents and Settings\Administrator\Desktop\workspace>script.pl | ||
Can't locate Workspace/FunctionIndex.pm in @INC (@INC contains: C:/Documents and | |||
Settings/Administrator/Desktop/Workspace C:/My PF/Perl/site/lib C:/My PF/Perl/l | |||
ib .) at C:\Documents and Settings\Administrator\Desktop\workspace\script.pl lin | |||
e 10. | |||
BEGIN failed--compilation aborted at C:\Documents and Settings\Administrator\Des | |||
ktop\workspace\script.pl line 10. | |||
moritz_ | Canyon: please don't paste multiple lines of error messages into IRC channels - use a nopaste facility like nopaste.snit.ch/ for that | 10:17 | |
Canyon | ok | ||
masak | Canyon: @INC is an array of all the directories to look in for your module. | 10:19 | |
moritz_ | use lib '.'; # might help | ||
masak | moritz_++ | ||
moritz_ | if the module exists in the FunctionIndex.pm file in the Workspace subdirectory | 10:20 | |
Canyon | my mistake, I've pasted the wrong path for lib | 10:21 | |
but I still get that error that I got in the first place | 10:22 | ||
Undefined subroutine &main::push_startsearch called at | |||
moritz_ | then (1) you didn't set up push_startsearch to be exported by default and (2) you didn't import it | 10:23 | |
doing either helps | |||
10:24
tzhs left
|
|||
Canyon | our @EXPORT = qw(push_startsearch); | 10:24 | |
use Workspace::FunctionIndex qw(:ALL); | |||
moritz_ | and did you set up the :ALL tag?> | 10:25 | |
Canyon | doesn't work without it either | ||
moritz_ | our %EXPORT_TAGS = (all => qw/push_startsearch/); | 10:26 | |
erm, ':ALL' => qw/.../ | |||
no, without the colon, sorry | |||
moritz_ just read perldoc Exporter | 10:27 | ||
Canyon | shouldn't our @EXPORT = qw(push_startsearch); sufice? | 10:28 | |
moritz_ | it should | 10:29 | |
baest | Canyon: yes, but then you should use 'use Workspace::FunctionIndex;' | ||
Canyon | yes, that's what i did | ||
and I still get the same error | |||
moritz_ | Canyon: please show the whole start of the module | ||
(via nopaste) | 10:30 | ||
Canyon | ok, let me post it | ||
10:32
REPLeffect left
10:33
lopnor is now known as lopaway
|
|||
Canyon | nopaste.info/0fe6894210.html | 10:33 | |
moritz_ | Canyon: well, you're not in package Workspace::FunctionIndex | 10:34 | |
Canyon: but in Function::Index | |||
no wonder it can't find that sub | |||
Canyon | changed it to package Workspace::FunctionIndex; | 10:35 | |
still same error | 10:36 | ||
baest | Canyon: you will probably need to nopaste the code that uses Workspace::FunctionIndex too | 10:37 | |
moritz_ | Canyon: did you safe the file after changing? | 10:38 | |
*save | |||
10:38
Sarten-X joined
|
|||
Canyon | yes | 10:39 | |
I'm nopaste.info/b5991393ec.html | |||
masak | excuse me, where is this push_startsearch sub defined? | 10:43 | |
moritz_ | and you define sub push_startsearch in the module right below the end of the previous nopaste? | ||
masak | (I haven't been following along too closely, sorry) | 10:44 | |
Canyon | in functionindex | 10:45 | |
let me post the whole relevant part for functionindex | |||
but, maybe global_variables.pm it's causing some problems | |||
could it be possible? | |||
it holds a few variables | 10:46 | ||
Tene | Canyon: unlikely. | ||
Canyon | that's it | ||
ok, let me post functionindex + push_startsearch | |||
10:46
REPLeffect joined
|
|||
Canyon | nopaste.info/3a745c91fe.html | 10:48 | |
this is it | |||
moritz_ | Canyon: you still ahve 'package Function::Index" | 10:50 | |
Canyon | no way | ||
moritz_ | 11:35 < Canyon> changed it to package Workspace::FunctionIndex; | ||
Canyon | yes, i did and it still is changed | ||
moritz_ | either you our your nopaste lies. | 10:51 | |
line 08 in nopaste.info/3a745c91fe.html | |||
Canyon | I edited the functionindex.pm file, but I kept the header in a temp txt file | ||
and I've just added the sub_startsearch subroutine without realizing that I've changed the header | 10:52 | ||
my mistake | |||
let me repost | |||
moritz_ | Canyon: it doesn't work like that. Paste verbatim. Single characters decide whether programs work or not | ||
Canyon | but I assure you that FunctionIndex.pm has the correct package | ||
moritz_ | ... which makes me wonder what else you might have mispasted | 10:53 | |
Canyon | nopaste.info/27615c186b.html | 10:54 | |
this is the original | |||
with all the wiki comments and stuff | |||
nothing else mispasted | |||
moritz_ | Canyon: nopaste.info/27615c186b.html | 10:55 | |
sorry | |||
mispaste :-) | |||
masak | Canyon: pasting is a fine art. don't fret if you don't get it right the first few times :) | ||
moritz_ | our @EXPORT = qw(push_startsearch); | ||
now @EXPORT doesn't contain set_searchname anymore | |||
is that intentional? | 10:56 | ||
if you want to export multiple routines, use a single line of our @EXPORT = qw/first_routine second_routine/; | |||
anyway, I need to leave, real life is calling | 10:57 | ||
masak | however, that can't be the problem here. | ||
since push_startsearch is the missing sub. | |||
Canyon | masak, I used a temp txt file in order to get rid of the comments | ||
that's why I mispasted | |||
masak | nod | 10:58 | |
it's ok. it's just easier to debug the code that was run, is all :) | |||
moritz_ | which also has the disadvantage of making the line numbers not match those in the error messages | ||
really gone& | |||
Canyon | bye, thanks for helping me :) | ||
masak | I'm going to try to put together a minimal example that works for me. | 10:59 | |
maybe you can then mutate that, piece by piece, into what you want. | |||
Canyon | no | 11:01 | |
I've wasted too much time of yours anyway | 11:02 | ||
I'll debug it myself. | |||
masak | no problem, I'm doing household stuff anyway. | ||
absolutely. I was hoping you would :) | |||
Canyon: here, I got it working on the first attempt: gist.github.com/805717 | 11:05 | ||
Canyon: see if you can get that small example working, too. | 11:06 | ||
just create the files 'A.pm' and 'test' in the same directory, and do 'perl test'. | |||
Canyon | ok | ||
thank you | |||
masak | oh, and you're free to call it 'test.pl' if that's easier on Windows, I dunno. | ||
Canyon: are you getting any results? | 11:13 | ||
hm, alester++ recently expressed dismay over "How To Ask Questions The Smart Way" being the de-facto manual for community interaction. maybe people here on #perl6 would be interested in producing a small set of wiki pages with some sort of Best Practices for things like making a nopaste, reporting a bug, etc. | 11:14 | ||
11:15
Mowah joined
|
|||
masak | I'm imagining something very concrete and example-oriented, a bit the same way the SYNOPSIS sections help clarify Perl modules. | 11:15 | |
Canyon | yes | ||
it works | |||
masak | \o/ | ||
Canyon | indeed | 11:16 | |
masak | Canyon: that's great news. now you only need to find the significant difference between my script and yours :) | ||
I'd suggest changing my script, piece by piece, into yours, and run it after each little change. | |||
see where it breaks. | |||
Canyon | the only difference is that my subroutine has args and that i'm using another pm file that stores a few variables | 11:17 | |
masak | could be something with Windows paths. could be a file is actually in the wrong place somehow. could be either of any number of things we can't think of now. | ||
point is, you'll discover it on the way. | |||
Canyon | indeed | ||
ok, thank you for support. | |||
*your | 11:18 | ||
masak | no problem. and good luck. | ||
Canyon | yes, it's path related, it doesn't see even a dummy sub | 11:20 | |
i will solve it | 11:21 | ||
masak | nice! | ||
11:24
bacek joined,
jfried left
|
|||
flussence | Argh unicode drives me crazy sometimes... I'm working on some Catalyst thing at $dayjob, there's a "↓" in the header that usually displays fine. On one page with nothing special about it, that arrow gets double-utf8-encoded. WTF. </rant> | 11:28 | |
11:28
snearch left
|
|||
moritz_ | that's p5's crappy string model, not Unicode per se | 11:29 | |
flussence | yeah, it works fine on every other page. I think I'll resign to just using HTML entities... | 11:30 | |
masak | ♩ ♫ fixed in Perl 6 ♪ ♪ ♫ | ||
daxim | the number of questions tagged perl+(encoding|unicode|utf-8) are surprisingly low compared with other languages | 11:32 | |
apejens | it's because Other Languages (tm) fucked it up even worse :) | 11:33 | |
daxim | on stackoverflow | ||
flussence | hey, PHP handles unicode just fine, provided you treat it as a dumb pipe between the browser and database! | ||
11:34
sjn joined
|
|||
arnsholt | I think that can be amended to "PHP is just fine, provided you treat it as a dumb pipe between the browser and database" =) | 11:34 | |
11:39
gimix left,
agentzh left
11:40
wallberg joined
11:55
lopaway is now known as lopnor
|
|||
Juerd | arnsholt: "Anything is fine, provided you treat it as a dumb pipe" | 12:04 | |
"Dumb pipes are fine" | |||
moritz_ | man cat | 12:06 | |
12:09
orafu joined
|
|||
arnsholt | True, true =) | 12:10 | |
flussence | php takes the dumb part a bit too seriously | 12:14 | |
12:20
jfried joined
12:28
Canyon is now known as Canyon_
12:30
PZt left
12:31
satyavvd left
12:33
lopnor is now known as lopaway
12:35
jfried left,
fhelmberger joined
|
|||
[Coke] | we now have a "testneeded" tag on RT - we can use that now instead of assigning to moritz. | 12:36 | |
12:36
fhelmberger left
|
|||
phenny | [Coke]: 03:45Z <pmichaud> tell [Coke] okay to close 73148 (sorry for not responding sooner) | 12:36 | |
12:36
fhelmberger joined
12:37
flatwhatson_ left
12:38
MayDaniel joined
|
|||
[Coke] | closed. | 12:38 | |
so to mark a test as testneeded, it's Custom Fields -> Tags -> testneeded. | 12:39 | ||
be nice if someone whipped up a short URL for a report that showed all the non-closed perl6 tickets that had that tag. | 12:40 | ||
12:42
tzhs joined
|
|||
flussence | [Coke]: I gave it a try, even tried to RTFM for the search box. Got nowhere. :( | 12:54 | |
12:57
lopaway is now known as lopnor
|
|||
flussence | I think I've tried all the combinations of /[Tt]ags? \s* = \s* (') (?:fulltext:)? testneeded \1 /x I can think of in the URL, anyway. | 12:57 | |
flussence leaves it to the people who know how it works. | 12:59 | ||
masak | flussence: tried using "Advanced Search"? | ||
sorry, "Edit Search"/ | |||
takadonet | morning all | 13:00 | |
flussence | I would if I'd seen that. Guess it only shows up when logged in... | ||
masak | oh, you have to be logged in. | 13:01 | |
takadonet: \o | |||
rt.perl.org/rt3/Search/Results.html...estneeded' | |||
flussence | well no wonder I couldn't guess it :) | ||
13:03
gottreu left
|
|||
flussence | also, slightly nicer-looking URL: rt.perl.org/rt3/Search/Results.html...estneeded' | 13:05 | |
masak | flussence++ | ||
flussence | hmm, I wonder if there's some URL::Pretty module on CPAN for doing that | 13:06 | |
[Coke] | or just use xrl.us | 13:09 | |
flussence | but that's cheating! :P | 13:10 | |
masak | ah, URL shorteners. double-edged sword of the web. | ||
colomon | rakudo: say 2.2250738585072012e-308 | ||
p6eval | rakudo d3e9a3: OUTPUT«2.2250738585072e-308» | ||
13:10
kjeldahlw left
|
|||
flussence | (well, CPAN's got plenty of things for url shortener sites, but not one for this... guess that's another thing for me to do) | 13:12 | |
13:18
Layla_91 joined
|
|||
colomon | rakudo: say 2.2250738585072012e-308 | 13:18 | |
p6eval | rakudo d3e9a3: OUTPUT«2.2250738585072e-308» | ||
colomon | ah. | ||
www.exploringbinary.com/java-hangs-...2012e-308/ | |||
(in case people thought I had gone insaner.) | 13:19 | ||
13:20
flatwhatson_ joined
|
|||
flussence | Java too ?! | 13:21 | |
13:21
envi_ joined,
envi left
|
|||
colomon | yup. | 13:26 | |
apparently you can shut down the compiler or the runtime that way. crazy, eh? | |||
masak | o.O | ||
colomon | also Clojure and Scala, apparently. | ||
flussence | now I just have to wonder... | 13:27 | |
niecza: say 2.2250738585072012e-308 | |||
masak | killed by MATHS. hah! | ||
p6eval | niecza v2-1-gc6596ea: OUTPUT«===SORRY!===Action method escale not yet implemented at /tmp/waW5WvhgSn line 1 (EOF):------> say 2.2250738585072012e-308⏏<EOL>Action method dec_number not yet implemented at /tmp/waW5WvhgSn line 1 (EOF):------> say | ||
..2.2250738585072012e… | |||
colomon | .NET is supposed to be fine. | ||
:) | |||
though I suppose mono might have issues. | |||
apparently GCC's libraries have a related issue. | 13:28 | ||
flussence | yeah, I read that stuff. It's because they use the 80-bit x87 registers in intel chips and don't truncate the values to 64-bit as they should, for the sake of "optimisation"... | 13:29 | |
13:30
jfried joined
|
|||
flussence | (and it also means I'm vindicated for compiling everything on my netbook with -mfpmath=sse :) | 13:31 | |
13:31
felliott joined,
felliott_ joined,
felliott left,
felliott_ is now known as felliott
13:39
kaare_ left
13:40
MayDaniel left,
cafesofie left
13:41
hudnix joined
13:43
kaare_ joined
13:46
kaare_ left
13:57
PZt joined
14:00
cjk101010 left
14:11
V15170R joined,
plobsing left
14:14
cafesofie joined
14:16
drbean left
14:27
ilogger2 joined,
ChanServ sets mode: +v ilogger2
14:32
V15170R joined,
bluescreen joined
|
|||
Layla_91 | jnthn: I'm became a obj-c developer ^_^ no more sys admining! \o/ | 14:34 | |
jnthn | Layla_91: Yay! Congrats! :D | 14:36 | |
Can't object to that change. :) | |||
14:36
hudnix joined
|
|||
V15170R | if i want to implement a language in parrot, i should use nqp? what about pir/pasm? | 14:37 | |
14:37
mtk joined
|
|||
jnthn | V15170R: Yes, using nqp is the best choice. NQP itself is about to undergo soem changes, but it'll mostly be transparent to language developers. | 14:38 | |
14:38
plobsing joined
|
|||
jnthn | e.g. any grammar and actions you write now will keep on working | 14:38 | |
teaching & | 14:41 | ||
14:42
llabthgi1 joined,
llabthgi1 left
14:44
llabthgi1 joined
|
|||
colomon is listening to "Don't Stop Me Now". He blames masak. | 14:46 | ||
[Coke] | jnthn: there is a macport for parrot, at least. | 14:49 | |
[Coke] could probably build one for rakudo if there isn't one already. | |||
[Coke] never uses the macports, though. ;) | |||
shortcircuit is thinking about Perl 6 and Gentoo. | 14:50 | ||
Right now, Perl exists under a dev-perl/* partition. Should Perl 6 be under something like dev-perl6? | 14:51 | ||
masak | colomon: *grin* | ||
colomon | masak: been a good long time since I listened to anything but FBG and Bicycle off of Jazz. | 14:52 | |
14:52
masonkramer joined
|
|||
shortcircuit | I started thinking about this as a result of the niecza announcement. If niecza runs on mono, and would presumably run on gentoo, then, ideally, it'd need an ebuild as well. | 14:52 | |
14:58
ggoebel joined
|
|||
ggoebel | now I know why all the power company trucks have been sitting outside all morning... | 14:58 | |
[Coke] | ggoebel: where you at? | 14:59 | |
ggoebel | [Coke]: ATL | ||
15:01
cibs joined
15:07
masonkramer left,
PerlJam joined
|
|||
PerlJam | greetings #perl6 | 15:09 | |
colomon | \o | ||
masak | PerlJam! \o/ | ||
daxim | masak, there are 21 matchsticks on the table. we both take alternating turns. each player must remove at least 1, but maximal 4 sticks. who takes the last one, loses. who goes first? | ||
masak | daxim: that game is .3333 | ||
flussence | shortcircuit: sounds sensible - there's separate dev-php[45] categories for that reason (stuff which only works on one major version) | 15:10 | |
daxim | bonus question: what is the generalised formula for other values of 21, 1, 4? | ||
masak | daxim: but it's also misere, because of the reversed winning condition... | ||
daxim: if it's a normal game, it's easier to analyze straight off. | |||
daxim: but I can imagine this is one of the solved misere games. | 15:11 | ||
flussence | (in an ideal world the package manager would be smart enough to know how to use external tools and it'd just pull from cpan directly...) | ||
daxim | surely. also, it's not vastly more difficult than you think, "just add one" | ||
shortcircuit | Admittedly, I'm a little worried about niecza, based on the v2 announcement. | 15:12 | |
masak | daxim: right. it's already quite simplified because there is only one heap. | ||
shortcircuit | I recall trying to run an app compiled for mono on Debian, and it failed on be; I didn't have the exact version of mono that it was compiled to. I'm not sure how that would play out in a source-distro scenario. | 15:13 | |
15:14
bluescreen left
|
|||
daxim | I'll provide the answers in an hour or so, if you want to experiment a bit with the numbers meanwhile | 15:15 | |
masak | that's a teasingly short deadline... I'm at $work! :) | 15:17 | |
daxim | okay, then tomorrow | 15:18 | |
masak | deal. | ||
I think I see what you mean by "just add one", though. | |||
so it shouldn't be dreadfully difficult. just need to get the numbers right. | |||
15:19
Helios joined
|
|||
PerlJam | huh. merlyn answered snarkyboojum on twitter about LP6 but didn't reply to my email | 15:20 | |
mathw | Quick sneaky Perl 5 thing: the character class [.-_] is a range from . to _, not ., - and _, correct? | ||
flussence | - is only literal when it's adjacent to the [ or ], iirc | 15:21 | |
mathw | indeed that's what I thought | 15:22 | |
evidently the person who wrote this code thought it was a literal there | |||
and now it's surprising people by failing to match hyphens | |||
masak | TEST YOUR REGEXES | 15:23 | |
flussence | .u . | ||
phenny | U+002E FULL STOP (.) | ||
flussence | .u - | ||
phenny | U+002D HYPHEN-MINUS (-) | ||
flussence | I guess you could write [--_] :) | ||
.u . - | 15:24 | ||
phenny | U+0F02 TIBETAN MARK GTER YIG MGO -UM RNAM BCAD MA (༂) | ||
U+0F03 TIBETAN MARK GTER YIG MGO -UM GTER TSHEG MA (༃) | |||
U+0F13 TIBETAN MARK CARET -DZUD RTAGS ME LONG CAN (༓) [...] | |||
15:24
vmspb joined
|
|||
flussence | well, that was unexpected. | 15:24 | |
15:24
bluescreen joined,
plobsing left
|
|||
flussence | .u .,- | 15:24 | |
phenny | U+002E FULL STOP (.) | ||
U+002C COMMA (,) | |||
U+002D HYPHEN-MINUS (-) | |||
flussence | oh. | ||
mathw | masak: evidently nobody tested this one with hyphens. I will amend the tests, of course. | 15:25 | |
flussence | shortcircuit: I shouldn't imagine too many problems with niecza, just checked and mono 2.8.2 is already marked stable, and it seems to install everything needed by default anyway | 15:26 | |
masak | mathw++ | 15:29 | |
pmichaud | good morning, #perl6 | 15:31 | |
moritz_ | good morning pmichaud | 15:33 | |
15:38
plobsing joined
15:41
noganex_ joined
15:46
noganex joined
|
|||
colomon | \o, pmichaud | 15:46 | |
15:47
noganex_ left
|
|||
colomon just used scp to copy five novels to his phone while his wife was talking on it. (living in the future)++ | 15:47 | ||
moritz_ | (unvenly distribution of future)+- | 15:48 | |
mathw | the future is expensive :( | ||
masak | rakudo: sub postfix:<+->($x is rw) { $x++; $x-- }; my $future = 42; $future+-; say $future | 15:49 | |
p6eval | rakudo d3e9a3: OUTPUT«42» | ||
masak | \o/ | ||
PerlJam | Does that mean the +-- operator is an expression of "one step forward, two steps back"? :) | 15:51 | |
colomon | one step forward, one step back | 15:53 | |
moritz_ | uhm, that code should die | 15:54 | |
no wait, masak did you an extra variable | |||
PerlJam wonders what it would take for "perlbrew installl perl6" to actually install rakudo | 15:57 | ||
er, with the appropriate number of ells | |||
masak | extra variable? I used just the right amount of variables :P | 16:00 | |
moritz_ | yes, I thought you'd have called 42+- | ||
masak | that should indeed die. | ||
rakudo: sub postfix:<+->($x is rw) { $x++; $x-- }; 42+-; say 'alive, OH NOES' | |||
p6eval | rakudo d3e9a3: OUTPUT«Cannot modify readonly value in '&infix:<=>' at line 1 in 'postfix:<+->' at line 7454:CORE.setting in main program body at line 22:/tmp/zZ3TJfvuYX» | ||
masak | and it does. | 16:01 | |
rakudo++ | |||
flussence | rakudo: rakudo++ | ||
p6eval | rakudo d3e9a3: OUTPUT«Could not find sub &rakudo in main program body at line 22:/tmp/T_AY3Ehmp0» | ||
16:01
vmspb left
16:03
justatheory joined
16:08
bluescreen left,
alester joined
16:12
felliott joined
16:16
Psyche^ joined,
Psyche^ is now known as Patterner
16:17
awwaiid joined
16:18
MayDaniel joined,
risou joined
16:39
V15170R_ joined,
V15170R left
16:47
kfo_ joined
16:56
cafesofie joined
17:07
MayDaniel left
17:24
bluescreen joined
|
|||
takadonet | my god bioperl is slow in reading genbank files! | 17:31 | |
17:44
vmspb joined
17:51
cdarroch joined,
cdarroch left,
cdarroch joined
17:55
arnsholt joined
17:56
starcoder joined
17:58
kaydsoft joined
17:59
rgrau joined,
MayDaniel joined
18:04
abraxxa joined
|
|||
abraxxa | i'm looking for a way to get the number of matching elements from two arrays | 18:05 | |
18:05
ash_ joined
|
|||
[Coke] | abraxxa: in perl 6? | 18:06 | |
abraxxa | of course, else i wouldn't ask here | ||
moritz_ | define "matching" | ||
pmichaud | are there any duplicates within an array? | 18:07 | |
PerlJam | abraxxa: we sometimes get people asking for Perl 5 help in here, so it's not unreasonable to make sure :) | ||
abraxxa | no dups | ||
18:07
V15170R_ left
|
|||
pmichaud | rakudo: my @a = <a b c d e f g h i>; my @b = <a e i o u>; say +@a.grep(any(@b)); # maybe? | 18:07 | |
p6eval | rakudo d3e9a3: OUTPUT«3» | ||
abraxxa | i was visiting a friend last weekend who gave tuition to a fellow student in c# | ||
ash_ | are you talking about an array union? | 18:08 | |
abraxxa | and the guy hadn't any knowledge in basic coding | ||
so i started to fix his c# code (infinite loop because of a bool error val he passed around) and then started to write it in perl 5 | |||
after an hour i remembered the pick method of perl 6 and started doing the same in perl 6 | 18:09 | ||
pmichaud | abraxxa: so, I suggest +@array1.grep(any(@array2)) | ||
rakudo: my @a = <a b c d e f g h i>; my @b = <a e i o u>; say ~@a.grep(any(@b)); # maybe? | |||
p6eval | rakudo d3e9a3: OUTPUT«a e i» | ||
abraxxa | so what i have already is the input of 5 + 2 numbers, in the range of 1..50 and 1..9 and the random picking of winning numbers | ||
now i want to compare the user-chosen numbers with the winning ones | 18:10 | ||
sjohnson | trying to beat the odds and strike it rich? | ||
use .pick | |||
abraxxa | it's an EuroMillionen simulator | ||
i'll paste my code | |||
sjohnson | .oO(was .pick conveived of for lottery numbers?) |
||
PerlJam | sort them and iterate comparing for equality :) | ||
abraxxa | is there a favoured paste-page for #perl6? | 18:11 | |
moritz_ | abraxxa: gist.github.com | ||
18:11
MayDaniel left
|
|||
pmichaud | any will do. gist.github.com works if you need one | 18:11 | |
my @choices = (1..50).pick(5); my @winners = (1..50).pick(5); say ~@choices; say ~@winners; say +@winners.grep(any(@choices)); | 18:12 | ||
rakudo: my @choices = (1..50).pick(5); my @winners = (1..50).pick(5); say ~@choices; say ~@winners; say +@winners.grep(any(@choices)); | |||
p6eval | rakudo d3e9a3: OUTPUT«4 15 18 2 3225 37 15 3 361» | ||
pmichaud | rakudo: my @choices = (1..50).pick(5); my @winners = (1..50).pick(5); say ~@choices; say ~@winners; say +@winners.grep(any(@choices)); | ||
p6eval | rakudo d3e9a3: OUTPUT«48 30 42 43 2922 21 30 39 181» | ||
abraxxa | gist.github.com/806301 | ||
sorry for the German user interaction | 18:13 | ||
at least my var names don't contain Umlauts | |||
pmichaud | my @matching_numbers = @numbers.grep(any(@drawn_numbers)); | ||
abraxxa | i can paste the wonderful c# code of the guy too if someone is interessted in how many lines such a thing can grow to | ||
pmichaud | that gives you the actual matching numbers. if you just want to know how many of them, use +@matching_numbers | 18:14 | |
abraxxa | i hoped the ~~ operator will DWIM | ||
moritz_ | it does. grep() does a smart-matching for you | 18:15 | |
abraxxa | having them might be needed later, but for now i just want to output how many matched | ||
ash_ | i am surprised there is no Intersection method/op/etc.. | ||
pmichaud | there is. It's called .grep :-) | ||
ash_ | ya, true, its not hard to build with .grep(any(...)) | 18:16 | |
pmichaud | @array ~~ @array2 checks for ordering as well as matches | 18:17 | |
abraxxa | wonderful! | 18:18 | |
perl 6 makes this kind of code possible in much less lines | 18:19 | ||
i've updated my gist, any other suggestions how to improve it? this is my first contact with perl 6 | 18:20 | ||
finding docs isn't that easy | 18:21 | ||
btw, the C# code has 516 lines including a lot of c-style bracketing | 18:22 | ||
18:22
cjk101010 joined
|
|||
PerlJam | That sounds like a good name for a book "Perl 6 -- First Contact" | 18:22 | |
abraxxa | hehe | 18:24 | |
PerlJam | And there would be plenty of opportunity to use quotes from space films. "My God ... it's full of stars" comes to mind immediately :) | ||
abraxxa | PerlJam++ | 18:25 | |
colomon | hyperspace! | ||
pmichaud | phasers? | ||
abraxxa | Perl 6, from the makers of the Klingon language! | 18:26 | |
the only part of the code i don't like is the until loop around the prompt | |||
Su-Shee | first rule of aquisition: buy this perl 6 book. ;) | 18:28 | |
abraxxa | kudos to szabgab.com/blog/2010/06/starting-w...erl-6.html for the inspiration | ||
PerlJam | Isn't IO::Prompt or something like that existant? | ||
abraxxa | but i switched the while to an until to better suit my needs and brain | ||
i tried to install a p6 module using proto but failed because of our proxy | |||
18:29
risou left
|
|||
flussence is disappointed to find that none of the chars in U+300..U+36F are valid in identifiers | 18:30 | ||
abraxxa | thanks for the help guys, i'm going home! | 18:31 | |
18:32
ash_ left
|
|||
abraxxa | bye *wink* | 18:34 | |
18:34
abraxxa left
18:36
arnsholt_ joined,
arnsholt_ left
|
|||
tadzik | hello zebras | 18:36 | |
masak | hi panda | 18:37 | |
Tene | There isn't an Intersection op in core, but I've seen it in a Set module. | 18:38 | |
github.com/perl6/mu/tree/master/ext/Set probably | |||
masak | I wrote one for the Set class in Rakudo. | ||
18:39
kjeldahl joined,
colomon joined
18:41
bluescreen left
18:51
cafesofie left
|
|||
moritz_ | #phasers in 8 minutes | 18:52 | |
jdhore sets his phaser to Deep Fry and joins :P | 18:53 | ||
19:03
shi joined
19:08
rindolf joined
19:14
uvtc joined
|
|||
dalek | rixel: 3ea4bc2 | diakopter++ | / (3 files): [perlesque] allow the decimal exponent in the float grammar |
19:15 | |
diakopter | er, oops. :) forgot the optional hyphen :) | 19:17 | |
19:17
llabthgi1 left
|
|||
dalek | rixel: f028d0d | diakopter++ | / (3 files): allow negative decimal exponents on float literals |
19:18 | |
jdhore | does dalek post commits to Parrot or Rakudo? Or does it just EXTERMINATE? | ||
diakopter | it doesn't post parrot commits here | 19:19 | |
rakudo commits, yes | |||
Tene | jdhore: Just rakudo commits here. | ||
tadzik | well, and niecza, and yapsi, and nqprx, and... | ||
jdhore | ah | 19:20 | |
masak | and november, as I discovered the other day... | ||
jnthn | November. In January. :P | 19:21 | |
moritz_ | it reports parrot commits to #parrot. | 19:22 | |
diakopter | perlesque: say(2.2250738585072012e-308) | 19:26 | |
p6eval | perlesque: OUTPUT«0» | ||
diakopter | heh | 19:27 | |
moritz_ | well, pretty close :-) | ||
diakopter | perlesque: say(2.2250738585072012e-308 / 2.2250738585072012e-308) | ||
p6eval | perlesque: OUTPUT«NaN» | ||
diakopter | hrm | ||
jdhore | ah | 19:31 | |
19:32
hans__ joined
19:36
ash_ joined
|
|||
diakopter | both .net & mono give 0 for Double.Parse("2.2250738585072012e-308") | 19:36 | |
moritz_ | better than infinite loop | 19:39 | |
colomon | agreed. | ||
19:39
sftp joined
|
|||
diakopter | latest stable of each, anyway, who knows about prior ones | 19:40 | |
perlesque: say(Double.Parse("2.2250738585072012e-308")) | 19:41 | ||
p6eval | perlesque: OUTPUT«2.2250738585072E-308» | ||
diakopter | O_O | ||
masak | looks about right to me. | ||
diakopter | hrm, oh. I take back "both .net & mono ... " it was perlesque that was breaking it.... | ||
dalek | rixel: 9b108d8 | diakopter++ | sprixel/src/compiler/EmitterPass.cs: [perlesque] don't bother trying to parse to a Single |
19:44 | |
diakopter | perlesque: say(2.2250738585072012e-308 * 1.0e308) | 19:45 | |
p6eval | perlesque: OUTPUT«2.2250738585072» | ||
diakopter | better | ||
hm, I saw an arbitrary precision float CLR lib somewhere... | 19:50 | ||
19:56
orafu joined
20:00
hans__ left
20:03
orafu left
20:09
molaf joined
|
|||
pmichaud | jnthn: do you want the new rakudo branch to be called rakudo-nom? | 20:10 | |
or, what do you want the branch to be called? | |||
20:10
sji joined
|
|||
moritz_ | nom | 20:10 | |
:-) | |||
pmichaud | I'll go ahead and create it too, working on switching its build system to the new nqp | ||
jnthn | nom :) | 20:12 | |
20:12
shi left
|
|||
jnthn | pmichaud: Just call it "nom" | 20:13 | |
pmichaud: Typing 3 letters when pushing is nice ;) | |||
masak | 'git push' is 7 letters... :) | 20:14 | |
moritz_ | [branch "nom"] | ||
jnthn | :P | ||
moritz_ | remote = origin | ||
merge = refs/heads/nom | |||
PerlJam | he's got an alias for "nom" to be "git push nom" | ||
:) | |||
jnthn | ;) | ||
tadzik | git nom | ||
20:17
nadim_ joined
20:19
tylercurtis joined
|
|||
ash_ | is the new nqp still in perl6/nqp-rx? | 20:20 | |
jnthn | yes, nom branch | ||
20:25
plobsing left
|
|||
Tene | dissatisfied with IO again, ran into some issues writing a little recursive directory walker. I really need to work on that someday. | 20:30 | |
masak | what issues? what did you write it in? | 20:32 | |
20:32
hanekomu joined
|
|||
Tene | masak: Perl 6. | 20:32 | |
Sorry, "the IO class" | |||
masak | ok. | 20:33 | |
Tene | masak: consider: dir('/tmp')>>.IO | ||
All of those IO objects will be useless. | |||
masak | oh? | ||
Tene | The values returned from dir() are relative paths. | 20:34 | |
so you really need: dir('/tmp').map('/tmp' ~ *)>>.IO | |||
erm | |||
so you really need: dir('/tmp').map('/tmp/' ~ *)>>.IO | |||
masak | aye. | ||
right, we talked about this a few weeks ago. | |||
Tene | Also, looks like IO doesn't have a .dir method to make that any easier | 20:35 | |
and the .Str of IO is unhelpful | |||
So instead of walking over IO objects, I walk over strings, and repeatedly concatenate paths. | 20:36 | ||
colomon | Tene: you need to figure out what IO needs and add it... :) | ||
Tene | colomon: Yes, I do. I'm reluctant to do that, though, because it seems I have some philosophical disagreements with TimToady about this. | ||
colomon | ah | 20:37 | |
PerlJam | Tene: ask forgiveness rather than permission. | ||
Tene | Seems like I could at least get a bit closer to optimal, though. | ||
masak | +1 | 20:42 | |
don't let philosophical disagreements with TimToady stand in the way of a better IO class. | |||
dalek | psi: dad2ec6 | masak++ | t/ (2 files): [t/] s/done_testing/done/ |
20:45 | |
psi: 57acb43 | masak++ | lib/Yapsi.pm: [Yapsi] bumped SIC version Between releases, the SIC version is always the version number of the upcoming release. |
|||
20:48
shi_ joined
|
|||
ash_ | use TeneIO; | 20:49 | |
20:50
sji left
|
|||
masak | when I define an .at_pos method in a class that wraps around an array, should I delegate to the array's .[] method, or .at_pos method? | 20:56 | |
colomon | .at_pos, I think... | 21:00 | |
21:00
cjk101010 left
|
|||
masak | why? | 21:00 | |
colomon | probably no one knows for sure but pmichaud | ||
PerlJam | The spec doesn't say which is canonical. | ||
masak | at_pos is the more fundamental one. | 21:01 | |
PerlJam | So ... decide which is and document it in the spec | ||
colomon | is at_pos in the spec? | ||
masak doubts that | |||
PerlJam | A quick ack on the spec and it doesn't even mention at_pos | ||
masak | Perl 6 is so pretty: gist.github.com/806666 | 21:02 | |
I've written pre-order traversals dozens of times; never so nicely... :) | 21:03 | ||
arnsholt | Doesn't the initial call to helper lack an argument? | 21:05 | |
masak | oh, oops. | ||
was supposed to default to 0 | |||
arnsholt | Or that =) | ||
masak | there, fixed: gist.github.com/806666 | 21:06 | |
pmichaud | at_pos always looks up a single element | ||
.[] has to know how to handle slices | |||
masak | right, this is more a question about convention. | ||
when writing my own .at_pos, what should I delegate to in the wrapped Array? | 21:07 | ||
pmichaud | I'd go for .at_pos | ||
masak | that's what I settled for. | ||
pmichaud | faster, plus also expects a single element. Unless you think that your argument needs to be treated like a slice somewhere | ||
masak | nope. | 21:08 | |
I'm just passing the argument along unchanged. | |||
pmichaud | definitely .at_pos I think | ||
masak | pmichaud: I must say I'm torn when it comes to at_pos. I see its usefulness, and why it was created, but... | ||
it felt cool to define postcircumfix:<[ ]> | 21:09 | ||
.at_pos feels like Ruby :( | |||
pmichaud | TimToady has already said that the operators tend to be sugar over method calls, though. | ||
and postcircumfix:<[ ]> definitely qualifies as that | |||
masak | aye. | ||
it does make sense. | |||
does .{} have a similar method? | 21:10 | ||
pmichaud | and believe me, trying to handle slices and ranges and whatever closures in everything that wants to act like an array is not -Ofun | ||
.at_key | |||
masak | ah. | ||
21:10
Mowah joined
|
|||
masak | I believe you. it's a "semantics-rich" area. | 21:10 | |
moritz_ | Tene: in the end, dir() should return IO::Path objects, or some such | ||
Tene | moritz_: That's my inclination too. | 21:11 | |
masak | is PAST::Stmts strictly necessary? seems to me it isn't. | 21:12 | |
pmichaud | at the moment, no. | ||
Tene | masak: traversal like you posted is even nicer with multiple dispatch :) | ||
pmichaud | but I could imagine ways in which PAST::Stmts could be used to denote sequence points, or to provide various introspection/code analysis | 21:13 | |
masak | Tene: how so? | ||
pmichaud | so, it's a useful abstraction to say "this demarks a complete statement in the HLL source" | ||
Tene | masak: fwiw, gist.github.com/806549 was what I ended up with, on the little project that lead me to complain about IO today | ||
21:13
plobsing joined
|
|||
pmichaud | I'm thinking it might also be useful for object code annotations and references to the original source | 21:14 | |
21:14
V15170R joined
|
|||
masak | Tene: sir, that is a pretty use of multis. | 21:14 | |
pmichaud | anyway, early versions of allison++'s PAST (and I think even PIL) had a ::Stmts node, so I went ahead and kept it | 21:15 | |
Tene | masak: That also indirectly answers your question. | ||
masak | which question? | ||
Tene | 14:13 < masak> Tene: how so? | ||
masak has so many... :) | |||
right. | |||
I didn't need it for my method, since I'm treating all nodes the same. | 21:16 | ||
if I did, I would probably have reached for multis too. | |||
moritz_ | Tene: fwiw, dir() excludes . and .. by default | ||
arnsholt | That was very nice, indeed | ||
moritz_ | rakudo: say dir.join(' ') | ||
p6eval | rakudo d3e9a3: OUTPUT«Operation not permitted in safe mode in 'Safe::forbidden' at line 2:/tmp/0qntvAtA37 in main program body at line 22:/tmp/0qntvAtA37» | ||
masak | p6eval++ | 21:17 | |
Tene | moritz_: Ah, right. | ||
moritz_ | so need need for that grep(none <. ..>), pretty as it might be :-) | ||
masak | why are if statements and sub calls bunched in under PAST::Op? | 21:18 | |
seems like the thinking was "ok, PAST::Op is for when we want to do stuff..." :P | |||
moritz_ | right | ||
masak | no wonder there aren't many node types! | ||
moritz_ | there are subtypes | 21:19 | |
Tene | masak: it's dispatch on the pasttype attribute | ||
masak considers whether he wants that, too | |||
Tene | it certainly wouldn't be unreasonable for that to be broken out into classes for different pasttypes. | ||
masak | ah, what the heck. | ||
won't ever know if I don't try :P | 21:20 | ||
Tene | :pasttype was just simpler, I expect. | ||
masak | looks like it's just cheating the type hierarchy on all the fun. | ||
"who needs runtime polymorphism when there are switch statements?" | |||
moritz_ | masak: remember that PAST was written in PIR, wihch doesn't have nice, declarative syntax for classes :-) | 21:21 | |
masak | sure, sure, defend the mistakes of the PAST... :P | 21:22 | |
pmichaud | I did think seriously about having separate types | ||
but the problem is that it's much harder to specify node types than attribute values in say, a grammar. | |||
masak | I see what you mean. | ||
when does the need for that arise? | 21:23 | ||
pmichaud | token infix:<||> { <O( :pasttype('unless') )> } | ||
masak | hm. | ||
pmichaud | (or maybe that one is 'if') | ||
masak | I know too little about <O()>, but that's just a literal in there. | 21:24 | |
couldn't that as well have been PAST::Unless? | |||
pmichaud | right... basically the default is to create an object of type PAST::Op and pass the :pasttype along | ||
masak | ok. | ||
I don't think I will run up against that limitation. | 21:25 | ||
pmichaud | PAST::Unless works *if* you have a reliable mechanism to look up class types | ||
which Parrot often did not | |||
masak | a proliferation of PAST::Op subtypes it is! | ||
erm, FUTURE::Op. | |||
pmichaud | I also noticed that Pugs didn't have a proliferation of subtypes | ||
masak | and look what happened to Pugs... :P | 21:26 | |
pmichaud | lol | ||
anyway, my gut tells me that the current PAST has it largely correct, but I could be completely wrong there. | |||
masak | in a Liskov sense, I'm not really changing the type of anything. | 21:27 | |
21:27
alester left
|
|||
masak | I'm just pushing out an attribute as refined subtypes. | 21:28 | |
Tene | subtype PAST::Unless of PAST::Op where ... | ||
masak considers | 21:29 | ||
PerlJam | pmichaud: your observation of pugs may be telling since Haskell does have a good type system. | ||
masak | then I can't give the subtypes their specific attributes. | ||
Tene: btw, it's 'subset', last I looked. | 21:30 | ||
(but I tend to get it wrong, too) | |||
Tene | masak: ah, right. | ||
pmichaud | afk, errand | ||
Tene | masak: another synonym I get wrong all the time is "partition" instead of "classify" | ||
masak | that never happens to me. | 21:31 | |
then again, I never use .classify | |||
occasionally, I get 'given' and 'gather' wrong. | 21:32 | ||
Tene | Fascinating. | 21:33 | |
PerlJam | masak: is that an english-as-a-second-language thing? Those two words occupy completely different conceptual space to me. | ||
Tene | in both directions? | ||
masak | Tene: don't think so. doesn't happen often at all, mind. but it's probably always 'given' instead of 'gather'. | 21:34 | |
ash_ agree's with PerlJam | |||
masak | PerlJam: yes, I think so. it's not rational at all. | ||
arnsholt | Probably just "starts with a 'g'" | ||
masak | PerlJam: but they *are* both six-letter keywords start... what arnsholt said. | ||
tylercurtis | rakudo: say 'given'.chars | 21:35 | |
p6eval | rakudo d3e9a3: OUTPUT«5» | ||
PerlJam | masak: you must have some sort of alternate spelling for the word "given" :) | ||
masak | I like to spell it the old-fashiened way. | ||
arnsholt | The very start of words is how we remember them, usually | ||
masak | 'ghiven' :P | ||
21:35
kaare_ joined
|
|||
arnsholt | Suffixes help as well, but the clue "starts with a ..." is usually very helpful =) | 21:36 | |
masak | rakudo: say ? all( <given gather> ).chars == 5 | 6 | ||
p6eval | rakudo d3e9a3: OUTPUT«any(Bool::False)» | ||
PerlJam | Like old basic interpreters, as long as the first few characters are the same, it's the same identifier (in this case only 1 char) | ||
masak | huh. | ||
rakudo: say so all( <given gather> ).chars == 5 | 6 | |||
p6eval | rakudo d3e9a3: OUTPUT«Bool::True» | ||
arnsholt | (Yay, psycholinguistics) | ||
masak | \o/ | ||
PerlJam: yes, that's my brain. an old, crappy BASIC interpreter. | 21:37 | ||
huf | got more uptime than any basic interpreter i ever heard of | ||
moritz_ | PerlJam: I know that from Fortran 77, not basic :-) | 21:38 | |
PerlJam | basic is more perlian than fortran ;) | ||
V15170R | i'm totally lost at this : say so all( <given gather> ).chars == 5 | 6 | ||
PerlJam | V15170R: what part confuses you? | ||
masak | V15170R: sorry :/ | 21:39 | |
arnsholt | Speaking of Fortran, two of the older profs in my research group were spotted the other day deciphering the punch-card decorations in our new buildings =D | ||
V15170R | the word "so" and using <given gather> | ||
21:39
plobsing left
|
|||
masak | V15170R: in English it asks "do all of the strings <given gather> have either 5 or 6 characters"? | 21:39 | |
tylercurtis | so is a function equivalent of prefix<?> | ||
masak | V15170R: <given gather> means ["given", "gather"] | 21:40 | |
21:40
kaare_ left
|
|||
masak | er, ("given", "gather") | 21:40 | |
Tene | cd ~/src/rakudo; find . -type f -exec sed -i 's/given|gather/grumble/g' {} + | ||
huf | so why did the prefix<?> return something different? rakudobug? | ||
PerlJam | Tene: heh | ||
masak | huf: no. | ||
moritz_ | huf: precedence | ||
huf | ah! | ||
masak | huf: different... what moritz_ said. | ||
huf | hufbug then | ||
masak | yeah, pls fix kthx. | 21:41 | |
V15170R | rakudo: say so all ( <string1 otherstring> ).chars == 5|6 | ||
p6eval | rakudo d3e9a3: OUTPUT«Bool::False» | ||
ash_ | does anyone know if there is an equivalent of haskells . in perl6? | 21:42 | |
huf | hum, how is so() mnemonic for boolean? :) | ||
21:43
kaare_ joined
|
|||
V15170R | rakudo: say so all ( <string1 otherstring> ).chars == 6|9 | 21:43 | |
p6eval | rakudo d3e9a3: OUTPUT«Bool::False» | ||
V15170R | rakudo: say so all ( <string1 otherstring> ).chars == 7|9 | ||
p6eval | rakudo d3e9a3: OUTPUT«Bool::False» | ||
V15170R | rakudo: say so all ( <string1 otherstring> ).chars == 7|11 | ||
p6eval | rakudo d3e9a3: OUTPUT«Bool::False» | ||
moritz_ | rakdo: .say for <string1 otherstring>».chars | 21:44 | |
masak | ash_: foo(bar())? | ||
moritz_ | rakudo: .say for <string1 otherstring>».chars | ||
p6eval | rakudo d3e9a3: OUTPUT«711» | ||
V15170R | rakudo: say so all ( <string1 otherstring> ).chars == 7|11 | ||
p6eval | rakudo d3e9a3: OUTPUT«Bool::False» | ||
21:44
ashleydev joined
|
|||
Util | Do we have anything like File::Temp in Rakudo? | 21:44 | |
masak | ash_: ==> and <== are a bit similar, too. | ||
huf | oh! so as in the opposite of not, i get it ;) | ||
moritz_ | Util: nope :( and sorely missed iin the test suite | ||
ash_ | masak: do you use haskell much? | ||
Util | Thx | ||
masak | ash_: not in a while, no. | 21:45 | |
ash_: but I know what function composition is. | |||
PerlJam | isn't . just composition in haskell? | ||
PerlJam is slow | |||
masak | huf: took a while to reach that name, too :) | ||
Util | Haskell twisted my brain inside-out and did not even give me a lousy T-shirt. | ||
ash_ | doh | 21:46 | |
masak | huf: for a long time it was 'true', which is a horrible name. | ||
ash_ | i was thinking of $ | ||
not . | |||
huf | masak: i like it now that i understand it | ||
ash_ | my bad | ||
huf | masak: yeah, so is so better | ||
masak | ash_: $ is the default for listops. | ||
ash_: that's why we can do 'say so' above... | |||
PerlJam | Perl is getting closer to making "say it isn't so" into runnable code without much help | 21:47 | |
21:47
ashleydev left
|
|||
colomon | any quick tips how to run niezca under windows? | 21:48 | |
21:48
ashleydev joined,
snearch joined
|
|||
moritz_ | just need to define the subroutines it() and isn't() | 21:48 | |
tylercurtis | rakudo: use Test; say $_ isn't so; | ||
p6eval | rakudo d3e9a3: OUTPUT«===SORRY!===Confused at line 22, near "say $_ isn"» | ||
arnsholt | And make so work with no arguments (maybe?) | ||
tylercurtis | rakudo: use Test; say $_ isnt so; | ||
p6eval | rakudo d3e9a3: OUTPUT«===SORRY!===Confused at line 22, near "say $_ isn"» | ||
allbery_b | PerlJam: back tot he future? | ||
tylercurtis | rakudo: use Test; say $_, isn't, so; | ||
p6eval | rakudo d3e9a3: OUTPUT«===SORRY!===Confused at line 22, near "say $_, is"» | ||
colomon | To answer my own question: Niecza\run\Niecza.exe and then patience. | 21:49 | |
pmichaud | I always confuse given/when and gather/take | 21:50 | |
I'll type one when I mean the other | |||
ash_ | masak: well, what if you wanted to do: sub foo($, $) { ... }; sub bar(@) { ... }; bar foo 2, 3, 4, 6; I am more refereeing to a of saying this is the end of foo's args, the rest are bar's args | ||
pmichaud | bar (foo 2, 3), 4, 6 | 21:51 | |
masak | ash_: and you don't want to use parentheses...? :) | ||
pmichaud | or bar foo(2,3), 4, 6 | ||
anything else gets weird as soon as foo() becomes multi :-) | |||
jnthn | And I hpoe bar's signature is *@ :) | ||
masak boggles | |||
tylercurtis | Just like in Haskell, except with commas. | 21:52 | |
pmichaud | multi foo($,$,$) { ... }; multi foo($,$) { ... }; sub bar(*@) { ... }; bar foo 2, 3, 4, 6; # uh oh! | ||
I think some very early versions of pugs played with trying to make this work, which is how we ended up with what we have now :) | 21:53 | ||
PerlJam | maybe someone could steal the colon for haskell's equivalent to $. It's kind-of like the cut operator if you're crazy like me :) | ||
ash_ | multi foo($,$,$) { ... }; multi foo($,$) { ... }; sub bar(*@) { ... }; bar foo 2, 3 $ 4, 6; # in haskell terms would call foo($,$) | ||
PerlJam | er, perl's equivalent to haskell's $ | ||
bar foo 2, 3 :: 4, 6 # or something | 21:54 | ||
tylercurtis | ash_: in Haskell, "bar foo 2 3 $ 4 6" is "(bar foo 2 3) 4 6" | 21:55 | |
masak | rakudo: sub bar {}; sub foo {}; bar foo 2, 3 :: 4, 6 | ||
p6eval | rakudo d3e9a3: OUTPUT«===SORRY!===Confused at line 22, near "bar foo 2,"» | ||
PerlJam ponders how to define a juxtaposition operator in Perl 6 | 21:58 | ||
I guess it would be a context sensitive application of whitespace. | |||
22:01
ashleydev left,
ashleydev joined
22:08
kaare_ left
22:10
cafesofie joined
22:12
V15170R left
22:16
mtk left
22:24
mtk joined
22:26
uvtc left
22:36
kjeldahl left
22:40
ashleydev left
|
|||
masak | hey guys and gals, you know what would be really nice? imagine if, when a multi dispatch fails to bind, you get not only the possible signatures, but also the capture that failed to bind? :) | 22:41 | |
it's just a crazy idea... | |||
but would make things easier to debug. | |||
22:42
ashleydev joined
|
|||
ash_ | improving debuggability is always a plus | 22:43 | |
masak | I've decided to postpone the Yapsi release a day or two. the reason for this is that I'm making good progress with the FUTURE refactor. | 22:48 | |
Tene | masak: FUTURE refactor? | ||
masak | the punnability potential of this has not escaped me. | ||
Tene | masak: Is this related to TARDIS? | ||
masak | Tene: not really, actually. | ||
Tene: so, I'm making a variant of PAST for Yapsi. | 22:49 | ||
22:49
drbean joined
|
|||
masak | Tene: FUTURE is like PAST, only it was made later. | 22:49 | |
:) | |||
the way things are poiting now, I'll end up with fewer lines but a slower compiler. | 22:50 | ||
the runtime will be unaffected, but it's already slow enough. | |||
22:51
wamba joined
22:55
vmspb left
22:56
dorlamm joined
|
|||
Tene | :) | 23:02 | |
masak | rakudo: class A { method fleh { $*l++ }; method foo { my $*l = 0; self.fleh; say $*l; sub bar { self.fleh }; bar; say $*l } }; A.new.foo | ||
p6eval | rakudo d3e9a3: OUTPUT«12» | ||
masak | sometimes I'm impressed that stuff I throw at Rakudo just comes back, working :) | 23:03 | |
(in this case, dynamical-in-method-in-sub-in-method) | |||
23:07
snearch left
|
|||
colomon | I somehow read that as method-in-law.... | 23:07 | |
masak | :P | 23:08 | |
there totally should be such a concept in computer science. | |||
23:09
shi_ left
|
|||
coldhead | isn't that just design by contract? | 23:10 | |
23:11
kaydsoft left
23:12
shi joined
|
|||
masak | "Program to an interface, not to your method-in-law?" :) | 23:12 | |
sjohnson | sometimes, re-inventing the wheel needs to be done for some things | 23:14 | |
masak | sjohnson: were you thinking of any wheels in particular? | ||
sjohnson | yeah | ||
a javascript tabber i found on the internet, as well as a vim script for commenting | 23:15 | ||
23:15
Mowah left
|
|||
sjohnson | after trying to get the tabber thing to do what i wanted for 6 hours, i decided to write my own and had it done from scratch doing everything i needed in 8 hours :3 | 23:15 | |
masak | kudos. | ||
23:16
bpalmer joined
|
|||
sjohnson | i only said that cause of the quote you said reminded me of it | 23:16 | |
masak | really? I don't see the connection. | 23:17 | |
sjohnson: I associate the quote with the Dependency Inversion Principle. | 23:18 | ||
sjohnson | i get reminded of things very tangent-ly :) | 23:20 | |
masak | I think that goes for many of us in here :) | ||
sjohnson | it was really the "program to an interface" thing, then i thoguht "rewrite your own interface [sometimes]" | 23:21 | |
masak | aha. | 23:22 | |
sjohnson: in Java, there's List, which is an interface. and then there's ArrayList, LinkedList, and a bunch of other concrete classes that implement the List interface. the quote basically urges the programmer to write just "List" whenever possible. | 23:23 | ||
23:24
felliott left
|
|||
masak | I've got the refactored code running -e 'say 42' now :) | 23:27 | |
'night, #perl6 | |||
23:29
rindolf left
23:31
plobsing joined,
ash_ left
23:34
ashleydev left
23:38
starcoder left
|
|||
coldhead | Dependency Inversion Principle would be a good name for a band | 23:39 | |
23:40
tylercurtis left
23:44
starcoder joined
23:45
orafu joined
23:47
rgrau left
23:50
felliott joined
23:51
whiteknight joined
23:56
cosimo joined
23:59
wamba left
|