Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2007-01-06

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:02 buetow joined perl6
00:14 BooK joined perl6
00:25 Aankhen`` joined perl6
00:31 markstos joined perl6
00:33 Schwern joined perl6
00:33 Schwern joined perl6
00:33 rhizo joined perl6
00:41 markstos I'm try to commit to pugs after a long hiatus. I keep getting "Merge conflict during commit" even though I'm up-to-date. Is there some administrative command I need to run to straighten things out? This is using svk on feather.
00:41 markstos Oh, am commiting to svn.pugscode.org/pugs, which I assume is correct.
00:42 TimToady that's the right place.  can't help with svk tho
00:45 allbery_b wasn't there a bugfix for svk "recently"?
00:46 * allbery_b isn't an svk user but recalls discussion along those lines within the past few weeks
00:46 markstos Thanks for the responses. I'll keep poking.
00:52 justatheory joined perl6
00:52 markstos svk sync -a; svk update; svk commit seemed to fix things. I don't know why.
01:04 nothingmuch off hiking, see you in 3 days
01:25 Aankhen`` joined perl6
01:29 svnbot6 r15005 | markstos++ | A solution for problem 13 of 99. It's not pretty, but it passes the test.
01:32 ruz_ joined perl6
01:36 nbrown04 joined perl6
01:50 ruz__ joined perl6
01:55 nbrown04_ joined perl6
02:13 Schwern joined perl6
02:13 svnbot6 r15006 | markstos++ | bump copyrights from 2006 to 2007.
02:51 phg joined perl6
02:58 weinig is now known as weinig|zZz
03:22 diakopter left perl6
03:25 lambdabot joined perl6
03:34 bwk joined perl6
03:39 neonse left perl6
03:49 b00t joined perl6
03:54 bwk joined perl6
03:57 diakopter joined perl6
03:58 diakopter left perl6
04:47 bwk joined perl6
05:22 leed joined perl6
05:23 Sartak joined perl6
05:23 spx2 joined perl6
05:24 spx2 oh dear perl gods for give me ! *bows*   for i have sinned and am not worthy of your knowledge(wich is actually read from books by people much smarter than you )
05:41 jdv79 joined perl6
05:43 jdv79 anybody have any ideas about how to optimize sub calls in p5?  I'm asking here cause there's a lot of "Really Smart" people in here:)
06:01 dduncan optimize in what way?
06:07 nipra joined perl6
06:08 TimToady @tell luqui the main problem I see with single dispatch on the right side of ~~ is junctions.  $pat.accepts($_) has to autothread or it doesn't have a dispatch type.  But that messes up current policy on all(@foo) ~~ any(@bar).
06:08 lambdabot Consider it noted.
06:11 jdv79 dduncan: the call overhead out i supose
06:11 TimToady most people here have done it by rewriting the routine in C.
06:13 jdv79 well, the point was to take out the bottleneck in accessors and "well factored" OO code where the subs are short and execution bounces around quite a bit...
06:17 BooK joined perl6
06:17 bwk joined perl6
06:27 iblechbot joined perl6
06:30 Aankh|Clone joined perl6
06:37 briank joined perl6
06:42 bwk joined perl6
06:43 lambdabot joined perl6
06:43 nperez joined perl6
07:09 QwestDawG ?eval `ls -la`
07:09 evalbot_r15006 Error: Unsafe function 'Pugs::Internals::runShellCommand' called under safe mode
07:16 lambdabot joined perl6
07:28 Schwern joined perl6
07:30 ingy hi Schwern
07:37 fasic joined perl6
07:46 fasic left perl6
08:05 devogon joined perl6
08:51 elmex joined perl6
09:17 alex____ joined perl6
09:17 alex____ is now known as AlexLibman
09:46 bwk joined perl6
09:46 AlexLibman joined perl6
09:50 AlexLibman_ joined perl6
09:50 AlexLibman_ is now known as AlexLibman
10:25 VanilleBert joined perl6
10:28 buubot joined perl6
11:01 iblechbot joined perl6
11:06 elmex joined perl6
11:15 _bernhard joined perl6
11:34 buubot joined perl6
11:40 polettix joined perl6
11:50 chris2 joined perl6
11:58 VanilleBert left perl6
12:11 dduncan left perl6
12:35 spacebat is now known as spacebot
12:39 spacebot is now known as spacebat
12:43 elmex joined perl6
12:56 buetow joined perl6
13:27 neonse joined perl6
14:03 weinig joined perl6
14:09 foo\ joined perl6
14:25 foo\ joined perl6
14:28 qmole [#umist.me]
14:35 kolibrie clkao: I am svk pulling darcs to a new computer and ran into 'Incomplete data: Delta source ended unexpectedly'.  I vaguely remember needing to upgrade some SVK module.  Do you recall which one?  I'm using debian svk at the moment.
14:35 clkao svn::mirror ?
14:35 kolibrie I'll try it
14:47 kolibrie clkao: that seems to have fixed it.  thank you
14:50 rindolf joined perl6
14:53 kanru joined perl6
14:56 weinig is now known as weinig|bbl
15:16 turrepurre joined perl6
15:40 nipra joined perl6
15:47 Casan joined perl6
15:51 theorb joined perl6
16:06 weinig|bbl is now known as weinig
16:32 cognominal joined perl6
16:33 wilx` joined perl6
17:08 nperez joined perl6
17:12 TimToady joined perl6
17:16 TimToady hmm, was this channel really dead for more than 9 hours?
17:17 wolverian deadish, yes. kolibrie said something three hours ago.
17:18 TimToady ah, yes, I see that on colabti
17:18 wolverian you left nine hours ago with connection reset by peer.
17:19 TimToady odd, I always keep a connection running under screen.
17:20 allbery_b bitchx sometimes fails to notice that it's been disconnected, IME
17:20 TimToady maybe freenode or their isp hiccuped
17:20 TimToady cause it looks like lots of people were disconnected then.
17:21 wolverian buggy client
17:21 wolverian (try irssi!)
17:21 allbery_b I see only the usual join/part foo over the past 12 hours, no mass exodi
17:21 * allbery_b fwaps himself for "exodi" :)
17:22 TimToady I'm using irssi!!!
17:22 wolverian oh. :)
17:22 TimToady ah well, if it doesn't happen again, I'll chalk it up to a cosmic ray.
17:23 allbery_b <TimToady> cause it looks like lots of people were disconnected then.
17:23 allbery_b implies the server he was on netsplit, actually
17:23 wolverian true.
17:23 TimToady but for some reason I didn't get reconnected like usual
17:24 SamB joined perl6
17:24 allbery_b you were still connected.  your server wasn't
17:25 kolibrie if I get 'Setup: cannot satisfy dependency network-any' during 'make' what do I need to delete|upgrade|check ?
17:25 allbery_b ghc6.6?  make sure you installed the ghc-extralibs bundle
17:25 kolibrie yes ghc 6.6
17:26 allbery_b if using a vendor package, it may be split out even farther, for example I recall separate network packages being mentioned on debian
17:26 kolibrie I am on debian
17:27 kolibrie libghc6-network-dev?
17:27 * allbery_b has little debian experience and no machines so can't help to omuch beyond that
17:27 kolibrie I'll try it
17:28 allbery_b libghc6-network-dev?
17:28 allbery_b (googling)
17:29 allbery_b (does debian have anything like freebsd's freshports.net or RPM's rpmfind.net?)
17:29 wolverian kolibrie, yes.
17:29 wolverian allbery_b, packages.debian.org
17:29 gaal kolibrie: i think so yes, also you will need an 'mtl' package with a similar naming scheme
17:29 kolibrie gaal: I got the mtl one already
17:30 gaal groovy
17:30 kolibrie just missed network for some reason
17:34 lichtkind joined perl6
17:36 kolibrie hmm, don't recall seeing this one
17:36 pasteling "kolibrie" at 66.160.89.74 pasted "build failed in Pugs.Embed.Parrot" (37 lines, 1.4K) at http://sial.org/pbot/22156
17:37 kolibrie or maybe this is the one where I have old build files lying around?
17:38 gaal yeah, i think so. kill src/Pugs/Embed/Parrot.hs
17:38 svnbot6 r15007 | gaal++ | * ghc 6.7 has a shiny new debugger in interactive mode
17:38 svnbot6 r15007 | gaal++ |   that works with Pugs! To use, set PUGS_GHCI_DEBUGGING
17:38 svnbot6 r15007 | gaal++ |   to a true value in your environment.
17:38 svnbot6 r15007 | gaal++ |   TODO: promote this to autodetection by GHC version and
17:38 svnbot6 r15007 | gaal++ |   possibly a config.yml setting. (If someone benchmarks
17:38 svnbot6 r15007 | gaal++ |   and finds that -fdebugging doesn't slow down / eat more
17:38 svnbot6 r15007 | gaal++ |   RAM, we can just turn it on everywhere it's available.)
17:38 svnbot6 r15008 | gaal++ | svn:ignore props on mundane files
17:39 kolibrie all the .hs files in src/Pugs/Embed ?
17:40 kolibrie the one does not seem to be enough
17:41 gaal well, anything that has a .hsc file
17:41 gaal but don't delete the hsc
17:41 gaal a clean moose will fix this, in a pinch
17:41 kolibrie ls src/Pugs/Embed/*.hs
17:41 kolibrie src/Pugs/Embed/Haskell.hs  src/Pugs/Embed/Perl5.hs
17:41 kolibrie src/Pugs/Embed/Parrot.hs   src/Pugs/Embed/Pugs.hs
17:42 kolibrie ls src/Pugs/Embed/*.hsc
17:42 kolibrie src/Pugs/Embed/Parrot.hsc
17:42 gaal ok then only Parrot.hs :)
17:42 gaal you can also nuke dist/build/Pugs/Embed/
17:43 kolibrie ls dist/build/Pugs/Embed/
17:43 kolibrie Parrot.hi  Pugs.hi  Pugs.o
17:43 gaal them all.
17:44 kolibrie same error
17:44 gaal well, then make clean, or make realclean, or clean co, in this order :)
17:45 kolibrie ok
17:48 kolibrie that seems to have worked: delete the files, then make clean
17:56 araujo joined perl6
18:07 tcliou joined perl6
18:11 ruz__ is now known as ruz
18:11 ruz joined perl6
18:15 bwk_ joined perl6
18:33 bwk__ joined perl6
18:55 Eidolos joined perl6
19:10 wilx` is now known as wilx
19:10 diakopter joined perl6
19:12 ruz joined perl6
19:14 brent[] joined perl6
19:19 johnjra joined perl6
19:19 johnjra why if i do whil(cond) \n instruction; i get error and if i use {} i dont get any error
19:21 Juerd johnjra: Because in Perl the {} are mandatory.
19:21 Juerd johnjra: In Perl 6, the () are optional, though.
19:21 johnjra Juerd: o rly
19:22 johnjra ?
19:22 allbery_b yes
19:22 johnjra thx
19:22 Juerd johnjra: I don't know those abbreviations. Please type 6th grade English or I won't know what you're saying.
19:22 johnjra Juerd: sorry
19:24 diakopter I think "o rly" means "oh, really?"
19:25 colibri_ joined perl6
19:25 colibri_ is now known as cm_
19:26 Juerd English isn't my native language. It's hard for me to figure such things out.
19:26 Juerd Although those two sentences aren't necessarily related.
19:27 kolibrie echt waar? :)
19:27 Juerd Ja, absoluut!
19:27 Juerd Hey, you're not Dutch, are you?
19:27 diakopter what is that, Afrikaans?
19:27 Juerd diakopter: Dutch
19:27 kolibrie no, just lived there for a couple years
19:27 diakopter close
19:28 kolibrie and now I speak it to my children
19:29 Juerd kolibrie: DON'T SPREAD THE DISEASE! :)
19:30 kolibrie there certainly isn't much of it here in the States
19:53 masak Juerd: "O RLY?" is more than an abbreviation and a slang phrase nowadays
19:53 masak it is something of an internet cult
19:53 masak http://en.wikipedia.org/wiki/O_RLY%3F
19:54 masak (that doesn't mean, however, that I endorse it or consider the use cultivated. I, too, am a non-native speaker)
19:54 Khisanth It might get mistaken for O'Reilly in some places :)
19:54 masak Khisanth: probably :)
19:57 TimToady So, I'm curious.  *Why* do the Dutch continually deprecate their own language?
19:59 TimToady It's not a very Indo-European attidude... :)
19:59 * Khisanth suspects it's some sort of Dutch joke that only the Dutch will understand
19:59 TimToady attitude, even.
19:59 mtve joined perl6
19:59 gaal TimToady: maybe they just like to deprecate languages in general? e.g. Gerald Nolst Trenite's poem.
19:59 gaal (about English spelling.)
19:59 TimToady my father and his mother used to tell jokes to each other, and then the punchline would come out in Flemish.
19:59 TimToady we'd say "what's it mean in English?
20:00 TimToady and they'd say "It's not funny in English."
20:00 gaal I thought $lang in that expression was ::= to Yiddish.
20:02 Juerd TimToady: Our language is hard and a bit inefficient.
20:03 Juerd TimToady: Better than English, but at least English is understood by more than a few dozen million people.
20:04 Khisanth hmmm Dutch6 ;)
20:04 Juerd Khisanth: Vapourware.
20:05 TimToady Dutch 3000, more likely.
20:05 Juerd TimToady: As in Terminator?
20:05 Juerd 20:59 < TimToady> we'd say "what's it mean in English?
20:06 Juerd Interisting that "does" can be contracted.
20:06 Juerd Interesting.
20:07 Juerd I have a chicken/egg problem
20:07 diakopter many times, it's pronounced like "what-iz it mean in English?"
20:07 Juerd This 9V DC supply probably supplies too high a voltage. My multi meter has an empty battery, 9V.
20:08 diakopter to be more precise, "wuddiz it mean ..."
20:08 Juerd I want my spareribs. Ordered them 45 minutes ago
20:11 TimToady In my head it was pronounced "whatsit", not "whatizit"
20:11 jferrero joined perl6
20:11 TimToady Might be a California thing though
20:12 TimToady But I don't think so.  "What's it to ya?" has 4 syllables.
20:13 Juerd Stuff like this is why English is worse than Dutch :)
20:13 frankg joined perl6
20:14 diakopter here in the midwest I hear/say "wuddizit mean.."   I haven't heard "what's it to ya?" ever, I think. :)  
20:14 masak Juerd: I hear you've had recent spelling reforms and stuff in Dutch
20:14 masak that sounds admirable
20:15 masak I wish English had one of those, but I doubt it'll happen
20:16 nipra joined perl6
20:17 Patterner the german reform is a disaster.
20:18 pbuetow joined perl6
20:19 masak Patterner: how so?
20:19 Patterner No idea. I still use the old spellings...
20:19 masak all I know about it is most double esses went away
20:19 Patterner Defin...
20:19 devogon joined perl6
20:19 Patterner ^WDelfin
20:20 Patterner this looks so wrong
20:20 masak Patterner: not to me, I don't know either word
20:20 masak :)
20:20 Patterner Dolphin
20:21 masak Patterner: so the reform makes you spell it without an L? that is indeed weird
20:21 Patterner Delfin instead of Delphin.
20:21 masak ah, ok
20:21 masak so ph -> f in general?
20:21 Patterner And Spagetti
20:21 luqui joined perl6
20:22 masak without an H?
20:22 Patterner yes.
20:22 masak yeah, we've got that particular one in Swedish too
20:22 Patterner ph->f almost everywhere, but not everywhere
20:22 masak I think I like that
20:22 Patterner (which is part of the stupididy)
20:22 masak sorry :)
20:22 masak not being consistent is Bad, of course
20:23 diakopter is memory usage of variables in ram (think "scalar overhead") part of the perl6 specification?  i.e. can/should it be tested?
20:23 masak but ph -> f seems phine by me
20:24 markstos joined perl6
20:30 luqui diakopter, surely not
20:30 lambdabot luqui: You have 1 new message. '/msg lambdabot @messages' to read it.
20:30 ofer0 heh
20:30 ofer0 good lambdabot !
20:32 Juerd These spare ribs are the best.
20:32 TimToady no, P6 only specs that native types are biased towards optimizable.
20:32 Juerd re.
20:33 Juerd masak: Most Dutch people hate the spelling reform of 2006.
20:33 Juerd masak: Er, 2005. Typo.
20:33 TimToady date reform. :)
20:33 Juerd Hehe
20:33 Juerd I want a yyyy-mm-dd date reform.
20:33 Juerd But only if the US joins the reform
20:34 TimToady most USians don't mind that form, since it puts the month first.
20:34 Juerd Uhhuh
20:34 Juerd It's mm-dd-yyyy that really annoys me.
20:34 Juerd Not only because I'm not used to it. It's mostly because it fails to make sense.
20:36 TimToady well, if you were used to starting your letters with July 4, 1776 style dates...
20:36 Juerd I *am*.
20:37 Juerd In fact, I've used that form on juerd.nl for ages. Well, almost. It uses ordinalths.
20:38 Juerd But in recent years I changed my mind.
20:39 masak Juerd: do you hate the Dutch spelling reform of 2005 for the same reasons Patterner dislikes Germany's?
20:40 Juerd masak: No
20:40 Juerd Well, inconsistency is hateful, yes, and we have lots of that, but the main reason for hating the recent reforms is that ambiguities that were gone for decades were re-introduced
20:41 masak Juerd: bummer
20:41 Juerd "50 dollarbiljetten" is ambiguous now. It can both mean 50 * $1, or $n * $50
20:42 masak Juerd: yes. sounds in part like the reasons to oppose the Simplified Chinese Characters
20:42 masak they "fix" a system by partly destroying it
20:42 Juerd My theory is that this was done to "correct" the name of the language institute.
20:43 Juerd Their name is "Nederlandse Taalunie". This spelling has always been wrong, until 2005. They changed the rules in order to not have to change their name.
20:44 Juerd The correct spelling would have been "Nederlandse-Taalunie". It's the union for the Dutch language, not a language union that happens to be Dutch.
20:44 masak Juerd: *lol*
20:44 Juerd Because this institute isn't Dutch. It's NL+BE.
20:45 * masak 's favorite jokes all involve at least two semantic points of view
20:45 Juerd We write compound words without whitespace because that prevents ambiguity. See also Perl 6 and postfix operators.
20:46 Juerd If the first part of the compound word already has whitespace in it, you "encode" it using dashes.
20:46 Patterner Donaudampfschiffahrtskapitaensmuetzenkordel!
20:46 Juerd So the "unie van de Nederlandse taal" (union of the Dutch language) would be the Nederlandse-taalunie.
20:46 Juerd That is (Nederlandse taal)unie
20:47 Juerd This rule was simple and useful.
20:47 johnjra WHAT IS THE PROBLEM HERE ????????
20:47 Patterner simple and useful.
20:47 masak johnjra: overly zealous use of caps?
20:47 Patterner We cannot have that in the 21st century
20:47 Juerd The only problem with it was that whenever the original part had whitespace in it because it was a proper noun, you wouldn't encode it. This exception made the rule confusing, and all they should have done was remove the exception.
20:48 johnjra masak: you shut up,i wasnt talkin to you
20:48 Juerd Albert Heijn-medewerker would become Albert-Heijn-medewerker (Employee of Albert Heijn, a supermarket chain)
20:48 masak johnjra: dreadfully sorry, sir
20:48 masak Juerd: I've had the same thought at times
20:49 masak I'm not sure I can do that in Swedish, though
20:49 masak people would consider it strange
20:49 masak even though from a mathematician's perspective it makes perfect sense
20:49 Juerd Anyway, this is just one of the many annoyances. But because of this thing with the name of the Nederlandse Taalunie, it upsets me the most.
20:50 Juerd This specific part of the reform just confirmed that the Unie behaves irresponsibly
20:50 diakopter johnjra: to whom were you talkin?
20:50 Juerd They fuck up a large part of the language just to fix their own name.
20:50 johnjra diakopter: you shut up too,i wanst talking to you
20:50 * Juerd suggests that we all just put johnjra on ignore
20:50 johnjra looooooooooooooolz
20:51 Juerd /ignore johnjra
20:51 Juerd It should have been called /shun :)
20:51 masak /ignore johnjra
20:52 masak though I mostly feel sorry for him
20:52 johnjra it was just a joke actually but well ...
20:53 elmex joined perl6
20:53 * Juerd watches Scrubs S05E21
20:55 masak wow, there's already five seasons of Scrubs? cool.
20:56 luqui johnjra, don't say that about Juerd.  that's not nice
20:56 luqui haha, oh yeah, with masak?  totally!
20:56 Juerd What with masak?
20:57 masak Juerd: I think he's emulating what would happen if we only saw one side of an exchange
20:57 masak quite clever, actually :)
20:58 Juerd Fortunately, Irssi has /ignore -replies
20:58 Juerd Which also filters out lines =~ /^$nick/
20:58 Juerd So seeing one side of the conversation only happens when people don't prefix the nick
20:58 Juerd Like in 21:56 < luqui> haha, oh yeah, with masak?  totally!
20:58 ruz joined perl6
20:59 masak Juerd: ok, it was preceded by luqui asking john jra not to say stuff about you, "that's not nice"
20:59 masak though far as I can tell, the gentleman in question had not said anything
20:59 luqui that is true
20:59 Juerd This is funnier than you think.
20:59 luqui i get it
21:00 masak Juerd: no, I don't think so :)
21:04 masak why would it be?
21:05 Juerd It's not funny in English ;)
21:05 Juerd TimToady: Good one. I'll use that a *lot*! :)
21:05 ruz joined perl6
21:05 masak Juerd: O RLY?
21:05 masak Juerd: then please explain to me, in whatever language it is funny... :)
21:07 ruz joined perl6
21:08 Juerd masak: 't Is grappig om mensen te zien uitleggen wat ik al weet, terwijl degene die 't uitlegt denkt dat ik niet weet wat hij wel weet, en er iemand bij is die wel weet dat ik het weet, waar de uitleg bovendien over ging, en waarvan degene die niet weet wat ik wel weet, niet weet dat hij weet dat ik het weet.
21:10 masak Juerd: but there's always the logs, right?
21:10 Juerd I don't log
21:10 masak no, the ones online
21:10 masak those have no /ignores in them
21:10 Juerd Doesn't matter.
21:12 masak ok, I'll get back to you in a few days, once I've consulted my neighbourhood Dutch person on the funniness of your explanation
21:12 masak my own reading of it (limited as my Dutch is) doesn't reveal anything
21:12 Juerd Heh
21:12 Juerd Be warned: it really isn't funny in English.
21:12 masak Juerd: consider me warned
21:14 larsen_ joined perl6
21:14 Juerd Larsen doesn't sound italian
21:14 larsen_ yes, that's not my name
21:14 luqui http://dictionary.reference.com/translate/ does dutch :-)
21:15 larsen_ my name is Stefano
21:15 Juerd larsen_: That does sound Italian :)
21:15 luqui but it doesn't know "weet", which Juerd used more than a few times...
21:16 Juerd luqui: know/knows
21:16 * luqui infers the meaning based on context.  yay for context.
21:16 Juerd Context being irc? :)
21:16 TimToady luqui: I was worrying about reordering all(@foo) ~~ any(@bar) into any(@bar).accepts(all(@foo)), but I think by the rules in S02 the all always trumps the any regardless of the order, so maybe we're okay on that.
21:16 luqui what does all(@foo) ~~ any(@bar) mean?
21:16 TimToady S09 rather
21:17 TimToady any(@bar).accepts(all(@foo)) :)
21:17 luqui that is, without the ~~ rules for it
21:18 TimToady it is true if all the elems of @foo match somewhere in @bar
21:18 luqui you keep being ambiguous
21:18 * luqui thinks about more junctive reform
21:18 luqui ugh, junctions just bug me so much... they could be so much better... :-)
21:19 TimToady well, with the .accepts rewrite, the invocant must autothread or we don't have a proper type on the left
21:19 TimToady it simplifies if the argument to .accepts also autothreads, so we never write any of those with Junctions.
21:19 luqui the point being "if all of the strings match any of the patterns" is ambiguous in english
21:20 TimToady that is, all the method defs are straight types, not |Junction
21:20 TimToady yeah, I know.
21:20 luqui (and so is your sentence starting with "it is true")
21:20 luqui :-
21:20 TimToady but English tends to priviledge the first one.
21:20 luqui I'm getting a necker cube out of that sentence, actually
21:21 luqui (equal time given to each reading, flopping back and forth every five or six seconds)
21:21 masak luqui: me too, now that you mention it
21:21 masak I didn't have a problem with it until you pointed it out :/
21:22 luqui what did it mean before I pointed it out?
21:22 TimToady the rules in S02 basically say the all always autothreads before the any
21:22 TimToady S09, darn it.
21:22 masak lumi_: hm... "for all elements in @foo, the element matches somewhere in @bar" but that is quite inconsequential, I think
21:23 * luqui considers changing the first two letters of his nick
21:23 masak luqui: oops, sorry :)
21:23 masak lumi_: also sorry. I meant luqui. hope I didn't wake you or something
21:24 lumi_ Still asleep, I assure you :P
21:24 luqui I seem to be settling on "there is one pattern which all strings match"
21:25 luqui i.e. any threads first.
21:25 TimToady Whatever the rules are, I'd just like it not to be counter-intuitive for ~~ if all the other operators MMD left-to-right instead of right-to-left
21:25 masak lumi_: good to hear :)
21:26 luqui whereas "any of the strings match all of the patterns" is almost certainly "there is one string which matches all patterns"
21:26 luqui again, any threads first
21:26 luqui I'm sure there is literature on this kind of thing
21:26 luqui if we must deal with multiple threadings in one sentence, we might as well base it on linguistic research
21:27 TimToady linguistics isn't generally gonna give you a consistent answer on that sort of thing...
21:27 * luqui realizes that...
21:27 luqui pick the theory we like best
21:27 luqui :-)
21:27 TimToady is the theory funny in Dutch?
21:29 masak TimToady: as long as it is sane in perl6, that's all that matters to me :)
21:29 TimToady anyway, it's possible that S09 has the precedence backwards on autothreading.  I do like that there is a precedence, if it solves the ~~ reordering problem.
21:29 Juerd ~~ doesn't need to be symmetric.
21:29 TimToady on the other hand, doing it by left-to-right consistenly might just mean we need to desugar ~~ to something smart enough to autothread backwards.
21:29 Juerd In fact, that only makes it confusing IMO
21:30 TimToady That's the whole point of what we're doing.
21:30 TimToady trying to see how the single dispatch form works out
21:30 Juerd Ah
21:30 TimToady I don't mind that reversed forms have to be written "when .accepts($value)"
21:31 TimToady I'm just worried about the junctions at this point.
21:31 Juerd Too bad there isn't a reversed ~ in unicode ;)
21:31 TimToady I did (briefly) think about spelling "when" backwards.  :)
21:31 luqui wait, don't we get it for free if we write ~~ as sub infix:<~~> (Any, Any|Junction) ?
21:32 TimToady get what for free?
21:32 luqui the semantics we are looking for
21:32 Juerd luqui: And a junction on the LHS would cause autothreading?
21:32 * luqui isn't quite sure what we're looking for
21:32 luqui Juerd, yeah
21:33 TimToady but yeah, in the abstract rewriting twice could give us the autothreading in the other order naturally.
21:34 TimToady what is fairly certain to me is that the underlying comparison routines don't generally want to accept Junctions at all.
21:34 TimToady unless the Junction can be guaranteed to be type homogenous
21:35 TimToady any(1,"foo") ~~ any($a,$b)
21:35 luqui yeah, I don't think anything really wants to accept junctions...
21:35 * luqui shuts himself up
21:36 TimToady even rewriting to $a.accepts(1|"foo") | $b.accepts(1|"foo") isn't gonna dispatch right if
21:36 Juerd :)
21:36 TimToady the right arg wants to distinguish Num from Str
21:37 TimToady so I think it just wants to completely autothread, based on Patterns that never contain junctions.
21:37 luqui here's a question:
21:37 TimToady The Selector type includes Junctions though, because it has a different purpose
21:37 luqui what does given(1|2) {...} mean?
21:38 luqui yeah, I think grep (/^foo/ & /bar$/) @list  is a useful use for junctions
21:38 luqui and I don't want it to autothread lexically
21:38 TimToady well, to pick nits, it's a syntax error without a space after the given.
21:38 TimToady right, that's what Selector is for.
21:38 luqui (which would get you a junction of lists)
21:38 luqui no kidding?
21:38 luqui how come?
21:39 TimToady we're trying to be consistent about mumble(...) always being a function call.
21:39 luqui oh... given(1|2):{...}  ?
21:39 TimToady that might work.
21:39 luqui right
21:39 luqui it's coming back to me now
21:39 TimToady but why not just "given 1|2 {...}"
21:39 luqui yeah, that works too
21:39 TimToady anyway, it just pokes the junction into $_ is all.
21:40 luqui no threading?
21:40 TimToady I don't think people will expect threading the whole block.
21:40 luqui so it seems like there is a large class of functions which does accept junctions and a large class that does not
21:41 TimToady I think the assumption with given is that it's a distributed/factored ~~
21:41 luqui neither is linguistically cofinite...
21:41 TimToady so each when is in charge of its own autothreading
21:41 luqui can I explicitly thread junctions?
21:42 luqui or explicitly not thread them?
21:42 luqui (the latter being the one I don't think I can do)
21:42 luqui (because it would be a type error)
21:42 luqui (ok)
21:42 TimToady well, you could pass in a junction within a container of some sort, but that takes type collusion
21:43 * luqui would like a haskellish all() too, in order to be explicit
21:43 luqui all @x -> $x { $x ~~ any @y }
21:43 TimToady how to force grep(all(@foo), @bar) to autothread is an interesting question.
21:43 luqui that's doable, but calling it all() might be a mistake
21:44 luqui all @foo -> $x { grep $x, @bar }
21:44 luqui :-)
21:45 TimToady currently doable as "all gather for @foo -> $x { grep $x, @bar }"
21:45 TimToady er, with a take
21:46 buubot joined perl6
21:46 TimToady all gather for @foo -> $x { take grep $x, @bar } would do it.
21:46 luqui do you think it would be wise for 'for' to behave like map with args reversed?
21:46 luqui thus: all do for @foo -> $x { grep $x, @bar }
21:46 TimToady it doesn't?
21:46 * luqui wasn't sure
21:46 luqui maybe it was like in perl 5
21:47 TimToady oh, you mean in returning values
21:47 luqui yeah
21:48 TimToady I'm trying to decide if it would violate Least Astonishment.
21:49 TimToady It's probably okay.  Question is whether a final for in a function works the same.
21:49 TimToady or whether it's just "do" that turns on the collecting.
21:50 luqui what did a final for in a function do before?
21:50 luqui return the last thing from the last iteration?
21:50 TimToady in p5 probably returns the virtual undef off the end of the list
21:50 TimToady possibly there's a performance issue
21:51 TimToady if you collect up all the results, and you were only interested in
21:51 TimToady the side effects, or you return 90% thru.
21:51 TimToady then you collect a bunch of stuff only to throw it away.
21:51 TimToady much like a final map would
21:52 TimToady P5 at least tracks whether the sub was called in void context.
21:52 TimToady I suppose P6 could also.
21:52 nipra joined perl6
21:53 TimToady anyway, I don't see much reason for "do for" except to mappishly collect all the results.
21:53 TimToady so we could certainly do it there, I think.
21:53 buubot joined perl6
21:54 luqui but what tells it to do that?
21:54 luqui you can't just start making do do new things, lest it cannot be trusted
21:55 TimToady well, "do" just makes the context come from the expr on the left rather than the outer blocks context.
21:55 TimToady and presumably the expression on the left may supply a context that is known at compile time.  But that's not certain either.
21:56 luqui oh right, we'd like to optimize at compile time
21:56 TimToady a bare "do" on the front of a statement is kind of a no-op, mostly.
21:56 luqui now the trade-off makes more sense...
21:57 TimToady It's hard to keep everything in mind simultaneously.  :)
21:58 luqui of course, when the return value is explicitly typed it is not a problem
21:58 luqui we know exactly what to do
21:58 diakopter left perl6
21:59 TimToady I think of programming as a protracted negotiation with the computer over which order it should throw away information.  :)
22:02 * luqui remembers something about list comprehensions and goes to review it
22:04 aufrank joined perl6
22:04 * TimToady goes to hack on S03 some more on the assumption that ~~ and when can simply be resugared to $pat.accepts($value)
22:04 TimToady or somethink like that...
22:05 luqui don't be too long, I'll start to complain about comprehensions shortly
22:07 khisanth_ joined perl6
22:08 khisanth_ is now known as Khisanth
22:09 masak apparently, the driving force today is complaints
22:10 masak (not that there's anything wrong with that :)
22:11 luqui when I am around, that's what drives design
22:13 TimToady I suspect you'll start complaining about comprehensions shortly whether or not I'm too long... :)
22:13 masak luqui: I'm glad of that. your complaints are often about lack of consistency, and I have a thing for consistency
22:14 TimToady I think we need spelling reform in Perl.  when => wen for instance.
22:15 TimToady change do => doo
22:15 masak TimToady: if, so please make it a module :)
22:15 Entonian joined perl6
22:15 luqui it wouldn't be a difficult one to write
22:17 khisanth_ joined perl6
22:17 luqui first vaguely related question: in S03 there is my @args := @foo, @bar;
22:18 luqui that doesn't flatten?
22:18 TimToady use iŋgliš;
22:19 luqui ?
22:19 TimToady my *@args := would flatten
22:19 luqui okay... so, that doesn't die?
22:20 luqui isn't that the same as: sub foo (@bar) {...}   foo(@foo, @bar)
22:20 TimToady looks like "too many args" to me.
22:20 masak TimToady: I'd call it "iŋli∫"
22:21 luqui the my @args := @foo, @bar;  looks like too many args to you, you mean?
22:21 TimToady you don't put a g in the middle when you pronounce it?
22:21 weinig is now known as weinig_
22:21 allbery_b except that we mostly pronounce the "g" as well as the "ng" :)
22:21 weinig_ is now known as weinig
22:21 TimToady luqui: yes
22:21 TimToady my @args := [@foo,@bar] would work though.
22:22 luqui fixing
22:22 masak TimToady: not a hard one, no. the "ŋ" suffices in my dialect (or rather, rendering) of iŋli∫
22:23 luqui why is capture flatten spelled | ?
22:23 luqui instead of something more.. verbose and... obvious?
22:23 Khisanth so if @foo was 1,2,3 and @bar was a,b,c. push @foo, 4; would make @args[3] change from a to 4? O_o
22:24 TimToady don't what people assuming it's a listop.
22:24 luqui same goes for list comprehensions, I suppose ;-)
22:25 luqui no, that's not my problem with them.  but let's talk about | first
22:25 TimToady Khisanth: no, [...] constructs a new array.
22:26 luqui oh, I get what Khisanth was talking about.  yikes...
22:26 luqui oh, I'm dumb
22:26 luqui that's not the fix I wanted
22:27 luqui oh dear...
22:27 luqui does my $x = $(@foo);   mean the same thing as my $x = @foo;
22:27 luqui ?
22:28 TimToady yes.
22:28 luqui okay...
22:28 TimToady $x = item @foo
22:28 luqui this is getting uglier and uglier.  you'll have to double check S03 when I'm done with it.
22:28 luqui yeah, same ugliness factor
22:29 luqui so, now the section on | reads:
22:29 luqui    my @args := [item @foo, item @bar];
22:29 luqui    push |@args;
22:29 TimToady oh, what you want is my @args := \(@foo, @bar)
22:30 TimToady captures don't commit to flattening or not
22:30 luqui I think you were trying to emphasize that it wasn't already a capture object
22:30 Khisanth that is a strange statement
22:31 TimToady in that case it should probably be [item @foo, @bar]
22:31 TimToady or you're just pushing the @bar object into @foo.
22:31 johnjra >just worked with sockets on perl,but i can pass information only one way,how do i pass it the other way too ? should i open another socket in the other way ?
22:31 luqui hmm, that's true
22:32 TimToady sockets are supposed to be 2-way
22:32 johnjra TimToady: how are they 2 way ? i'll tell you immediately the article that i read
22:32 TimToady that's what distinguishes them from pipes, primarily.
22:33 johnjra TimToady: ive used this http://www.perlfect.com/articles/sockets.shtml
22:33 lambdabot Title: Perl, Sockets and TCP/IP Networking.
22:34 luqui johnjra, you should go to #perlhelp and ask
22:34 luqui we usually don't talk about perl 5 here
22:34 luqui er
22:35 luqui not perlhelp
22:35 luqui uh... where is it?
22:35 luqui #perlhelp on magnet maybe?
22:35 luqui you might find help on #perl here on freenode...
22:36 johnjra luqui: if you can help me with something ,please related to my problem,i am searchig for a method ,i dont care if its perl 5 or 6,i really dont care about that at all
22:36 luqui you probably do care about that...
22:36 luqui are you using pugs?
22:36 TimToady if you want to use a socket two ways, you probably need to use sysread/syswrite to avoid buffering issues with <$sock> and print $sock.
22:36 johnjra luqui: no i dont
22:36 Khisanth it will be rather difficult for you to use perl6 as it doesn't fully exists yet
22:37 luqui so, listen to TimToady (you can't find better help) or go to a perl 5 room
22:37 TimToady and the answers to this question will almost certainly be different.
22:37 luqui (sorry, I don't know much about perl networking)
22:37 johnjra Khisanth: i dont care,those are technical issues,im really very pragmatic about this,and im not going to turn this version stuff into a philosophy
22:38 luqui sigh... perl 6 is *very* different from perl 5
22:38 johnjra luqui: really,leave that away of the problem ,it really isnt important
22:38 TimToady pragmatically, as well as pholosophically...
22:38 luqui oh... kay
22:39 Khisanth I guess we can just provide the solutions in Haskell then ;)
22:40 luqui johnjra, my best advice would be to try TimToady's advice in this case
22:40 luqui or go ask at #perl where there are more people who know the answer
22:45 luqui so... anyway, list comprehensions
22:45 luqui I do feel like list comprehensions are a really expressive and powerful way to, er, express some things
22:45 ofer0 perl6's motto is "there is exactly one way to do it, and it sucks"
22:45 luqui and I think list() list comprehensions miss out on most of that power, so you'll have to rely on map and grep
22:45 luqui (which is annoying)
22:46 ofer0 nah, I'm just kidding.
22:46 luqui I thought it was "there are 39 ways to do it, or you can invent your own, and they're all slow"
22:46 ofer0 hey TimToady, what's Perl6 motto?
22:47 luqui for 1..6,12 -> $n { see "A$n" }
22:48 Khisanth ofer0: "my way or the highway" :P
22:49 luqui also, how is "1 < list(@a) < 10" supposed to read?
22:49 luqui I'd read it as "the list of @a's which are between 1 and 10"
22:49 masak ofer0: "perl6: if we had it already, we could implement perl6 sooner" :)
22:49 luqui i.e. more like list @a -> { 1 < $_ < 10 } or something
22:49 luqui masak, :-)
22:50 ofer0 masak, heh, nice one
22:50 masak night &
22:51 TimToady ofer0: Second System Syndrome Done Right
22:52 allbery_b heh
22:52 Khisanth SSSDR might be mistaken for someone trying to imitate a snake
22:53 ofer0 Khisanth, LOL
22:53 TimToady Perl 6 will be mistaken for a lot of things, I think...
22:54 TimToady the list() style comprehensions are just a way to write the corresponding grep.
22:54 TimToady I agree they aren't full list comprehensions.
22:55 TimToady so your reading of "1 < list(@a) < 10" is correct as it is currently defined.
22:56 TimToady it's just grep {1 < $_ < 10}, @a
22:57 luqui okay...
22:57 TimToady list is possibly not the best word for that.  at one point we were using all(), I think, but then realized it implied unordering
22:57 luqui is that supposed to read more nicely?
22:57 luqui (I'm used to putting a "such that" in english before such constructions)
22:57 TimToady used to be "for all(@x) < 32 {...}"
22:57 ofer0 maybe "each" ?
22:58 ofer0 nah, not good
22:58 TimToady already use "each" for something else.
22:58 TimToady for every(@x) < 32 might work.
22:58 luqui all, each, every...
22:58 TimToady but it's just sugar.
22:58 nanonyme i have a suspicion perl6 is going to take a lot of time to learn... :/
22:59 luqui I think it'd be nicer to focus on real comprehensions
22:59 luqui (maybe you did, and then couldn't come up with anything)
22:59 Khisanth nanonyme: same as 5
22:59 TimToady mostly just waiting for suggestions from young whippersnappers.  :)
22:59 luqui I find that plausible, because not only does  the [foo | bar] syntax not work, I don't think it's very good even if it did
23:00 nanonyme Khisanth: hmm, most stuff in perl5 seemed intuitive to me since they were similar to stuff in other programming languages
23:00 luqui well, I keep wanting to fit it into existing syntax
23:00 luqui but that just ends up getting cluttered
23:00 TimToady actually, "do for" is now close
23:00 Khisanth nanonyme: if you start learning more languages now, then the p6 stuff will be similar too :)
23:01 nanonyme hmm
23:01 luqui yeah, you can rewrite (haskell's) [ f(x) | x <- list, pred(x) ] as do for @list { next unless .pred; take f($_) }
23:01 luqui but that's not very, um, succinct
23:02 TimToady @list = do for @a { $_ if 1 < $_ < 10 };
23:02 lambdabot No module "= do for @a { $_ if 1 < $_ < 10 };" loaded
23:02 luqui haha lambdabot, you so crazy
23:02 TimToady but that doesn't let you extend the do without {...} added.
23:02 luqui yeah, but you can't do multiple comprehensions veyr easily
23:02 TimToady -> $a, $b ?
23:03 luqui do for @a XX @b -> $a, $b { ... }
23:03 luqui yeah, but then @b can't depend on $a
23:03 luqui maybe I'm just spoiled
23:04 luqui I would love to have that combinatorial power though
23:04 TimToady hmm, cursors...
23:04 luqui maybe we should look at it more like the list monad instead of comprehensions (they are the same, but I have begun writing combinatorial programs in the former)
23:05 luqui but...
23:05 luqui no, it just doesn't work for perl
23:05 TimToady we're already dangerously close to getting lynched just for introducing lazy lists...
23:05 luqui let's look at language, then
23:06 luqui "the hair of every angry flea on each dog"
23:06 luqui hmm, each would be better than every there
23:07 luqui eh, language isn't good at this.  list comprehensions come from math's set comprehensions
23:07 luqui { f(x) | x in A }
23:08 luqui or { f(x) | x in A, x < 64 }
23:09 luqui if I had to linguistify that, I would say f(x) for each x in A such that x < 64
23:09 luqui or even f(x) for each x in A < 64
23:10 luqui { f(x,y) | x in A, y in B, x**2 + y**2 < 1 }
23:10 TimToady -> $x where { 1 < $_ < 10 } {...}
23:10 luqui interesting
23:11 TimToady It's one of them thar Selectors...
23:11 luqui but the big one that demonstrates the power is not from math
23:11 TimToady assuming for is smart enough to skip and not fail.
23:12 luqui [ f(y) | xs <- as, y <- xs ]
23:12 luqui dependent bindings...
23:12 TimToady in theory our bindings are dependent, but don't auto-iterate lists.
23:13 Aankhen`` joined perl6
23:13 TimToady -> $a, $b = $a {...} is legal
23:13 luqui in math you would have to say { f(y) | exists xs. y in xs in as }
23:13 TimToady these remind me of database joins as well.
23:13 JiggleButt joined perl6
23:14 JiggleButt Howdy, yall!
23:14 JiggleButt JiggleButt in da house!
23:14 luqui haaaidy ho
23:14 JiggleButt Yipee yi yo!
23:14 JiggleButt Sup wid yall, homey?
23:15 luqui hmm, what is the join syntax from sql?
23:15 TimToady mercifully I forget
23:16 * luqui never knew
23:16 * JiggleButt smacks luqui
23:16 JiggleButt left perl6
23:16 luqui whew, I needed that
23:16 TimToady was that a 'bot?
23:17 luqui that was johnjra
23:17 Psyche^ joined perl6
23:17 johnjra luqui: shut up
23:18 luqui are you saying that that wasn't you?
23:18 * luqui watches himself succumb to trolling
23:18 luqui I don't mean to offend, I just inferred based on your similar ircnames...
23:19 TimToady different address tho
23:19 luqui true
23:19 luqui nevermind
23:21 johnjra luqui: cut the crap,and leave me alone with your weird remarks,i am not to take part in such futile discussions
23:22 luqui johnjra, uh, okay
23:22 luqui so....... that was awkward.  back to business
23:22 luqui invoke continuation(five minutes ago)
23:23 Vex joined perl6
23:24 luqui SELECT table1.col1, table2.col3 FROM table1, table2 WHERE table1.col2 = table2.col2
23:24 luqui simple enough
23:24 TimToady but see also S09:606 "Parallelized parameters and autothreading"
23:25 Psyche^ is now known as Patterner
23:25 luqui so we may want to unify the two ideas into one cleaner, saner one
23:26 TimToady -> $a in @A, $b in @b where { $a < $b } { f($a,$b) }
23:26 luqui though I do remember talking a lot about einstein threading...
23:26 luqui so it may be unlikely that we'll find a better one
23:26 TimToady einstein?
23:26 luqui reminiscent of einstein notation
23:27 TimToady ah, yes
23:29 luqui it's amazing that we don't have the "in" keyword yet
23:29 TimToady -> $a in @A, $b in @b { f($a,$b) if $a < $b }
23:29 luqui we could use it... :-)
23:30 luqui though that hardly strikes me as a -> block...
23:30 luqui maybe "in @X" is short for "where { $_ in @X }", together with some magic
23:31 TimToady -> $a, $b {...} in @a, @b
23:31 luqui uh, yikes
23:31 luqui keeping them together gives the possibility of $a in @A, $b in @$a
23:32 TimToady nod, just brainstorming
23:32 dduncan joined perl6
23:34 TimToady it's a strange signature that doesn't look for an argument, unless they're really defaults.
23:34 luqui I mean, you could extend signatures to allow constraints...
23:34 TimToady sigs already allow constraints
23:34 TimToady using where
23:34 luqui yeah, but some constraints seem really weird with where
23:35 luqui maybe you just put up with the weirdness
23:35 TimToady @fido in @pound where Dog
23:35 lambdabot Maybe you meant: id redo todo undo
23:35 luqui or maybe it's like that capture thingy we talked about a little while ago
23:35 luqui zero-width parameters
23:35 luqui the all-feared unification of regexes and signatures :-/
23:36 luqui sub ($x, $y, $x < $y)
23:36 luqui oh, right, we can have where outside
23:36 luqui sub ($x, $y) where { $x < $y }
23:37 luqui I fear that if I let my mind go free on this one I will come up with some incredibly powerful unacceptable thing
23:37 TimToady that'd be cool, at least temporarily.  :P
23:38 luqui often my powerful proposals come at the expense of difficult-to-learn-ness (I know there's a word for that) or huge speed hits
23:38 luqui ...
23:38 luqui well, expense of easy-to-learn-ness I suppose
23:39 luqui anyway, I'm going to get some food
23:39 TimToady nap time &
23:39 luqui have you been traveling?
23:39 TimToady no, just getting old.
23:39 luqui ah
23:42 johnjra TimToady: im going to go read up sysread/syswrite now
23:52 johnjra where is perl used mostly ?
23:53 luqui johnjra, perl found its niche (some years ago) in the CGI script world
23:53 luqui a lot of people use it for sysadminning
23:53 Limbic_Region joined perl6
23:54 luqui and it has found some other useful applications (eg. RT (a bug tracker), svk (version control), ...)
23:54 luqui I know I'm missing some big ones
23:55 johnjra are there others who know where perl is used mostly ?
23:56 luqui those who have used it, I imagine :-)
23:56 luqui a lot of them are here and a lot of them are in #perl
23:58 johnjra im actually banned from #perl because i made fun of the admin gods
23:58 johnjra teh op gods that is

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo