pugscode.org/ | nopaste: sial.org/pbot/perl6 | ?eval [~] <m oo se> | We do Haskell, too | > reverse . show $ foldl1 (*) [1..4] | irclog: irc.pugscode.org/
Set by diakopter on 11 July 2007.
lichtkind ?eval my int $a = 3; my string $b = 3; say 'yes' if $a === $b; 00:16
pugsbot_r17185 OUTPUT[yes␤] Bool::True
lichtkind ?eval my int $a = 3; my string $b = '3a'; say 'yes' if $a === $b; 00:20
pugsbot_r17185 undef
lichtkind ?eval my int $a = 3; my string $b = '3'; say 'yes' if $a eqv $b;
pugsbot_r17185 undef
lichtkind ?eval my int $a = 3; my string $b = '3'; say 'yes' if $a === $b; 00:20
pugsbot_r17185 undef 00:21
lichtkind ?eval my Int $a = '3'; my string $b = '3'; say 'yes' if $a === $b;
pugsbot_r17185 OUTPUT[yes␤] Bool::True
lichtkind ?eval my int $a = '3'; my string $b = '3'; say 'yes' if $a === $b;
pugsbot_r17185 OUTPUT[yes␤] Bool::True 00:22
lichtkind is there any rational against a neqv operator? 00:25
diakopter =!= 00:33
lichtkind yes but === and eqv its not the same 00:35
there is !eqv
diakopter: but thanks that one i missed in my chapter
diakopter lichtkind: I didn't think that one was defined... 00:36
lichtkind diakopter: !eqv is mentioned in s03 but i thing neqv is not defined 00:39
DarkWolf84 I think that ther is no neqv in perl6 00:41
?eval 1 eqv 1 00:42
pugsbot_r17185 Bool::True
DarkWolf84 ?eval 1 neqv 1
pugsbot_r17185 Error: ␤Unexpected "neqv"␤expecting operator
lichtkind DarkWolf84: yes my initial question therefore was_ why isnt there such op 00:44
TimToady it would be redundant
TimToady with the ! metaoperator, != is redundant with !== and ne is redundant with !eq, but those are used often enough to be worth it 00:45
neqv isn't
lichtkind TimToady: logically your right but given the eclectic perl aproach i wasnt that shure
TimToady we don't even have !~ anymore, just !~~
diakopter !ne
lichtkind TimToady: thanks that detail i missed
diakopter !!eq 00:46
lichtkind !ne?
!ne ~~ == ?
TimToady !! is disallowed
[particle] what op is $x ~~ $x... eqv? 00:47
TimToady !ne would probably work
diakopter pugs doesn't like >1 negatives
lichtkind but it equals ==
diakopter >1 !s I mean
TimToady well, !! is potentially a token in its own right
[particle] !! is disallowed? how do you boolify
DarkWolf84 its for ??
diakopter er, here: 00:48
?eval 1 !!eq 1
diakopter shuts up
DarkWolf84 i think something is missing
pugsbot_r17185 Error: ␤Unexpected "!!"␤expecting operator
DarkWolf84 ?eval ??1 'true'!!'false' 00:49
pugsbot_r17185 Error: ␤Unexpected "??"␤expecting program 00:50
TimToady [particle]: you boolify with prefix:<?>, but we're currently discussing the infix:<!!> slot
Blwood ?eval 1 ?? 'true' !! 'false'
pugsbot_r17185 "true" 00:51
DarkWolf84 i got my mistake
fine
:)
diakopter would the <??><!!> operator be called a double-infix operator [set] (imagining other "ternary" operators here)? or can they be used independently, and does infix:<!!> have precedence over infix:<??> (and thus (1??'true'!!'false') means (1??('true','false')) means (ternary(1,('true','false'))) )? 01:04
diakopter belatedly remembers I'm supposed to be shutting up 01:08
TimToady the way STD handles it is to make ?? <EXPR> !! an infix operator 01:10
(where EXPR is limited in precedence actually)
lichtkind thanks to all and good night 01:11
TimToady hmm, needs a better error message for tha though... 01:12
n8
lichtkind :)
diakopter TimToady: I was (too fancifully, I'm sure) imagining an expanded way of declaring chained operators at runtime. infix:<gg><hh> (_,_,_) { ternarygghh(_,_,_) } 01:17
TimToady it would be possible to define such a category, but it didn't seem worth it for one operator. people get into bad enough trouble with that one already 01:24
diakopter hum, I guess there's not a way of declaring a runtime-declared operator's precedence. It always binds tightest than anything else, though, right? Argh; I don't remember whether the spec, well, specifies. 01:34
TimToady see S06:1538 01:35
diakopter oh, looky there. 01:38
pugs_svnbot r17233 | lwall++ | Improved error messages from ??!! 01:40
diff: dev.pugscode.org/changeset/17233
dduncan opinion question: what is a better name for a data type that is an integer which is >= 0 ... "unsigned integer" or "non-negative integer" 04:18
eg, subset Foo of Int where { $_ >= 0 } 04:19
avar unsiggned, do you need to cover -0 ? 04:26
evidently not
dduncan not in this case 04:33
afaik, +/- zero only makes sense with non-integer numbers, where you could have something really small 04:34
avar actually it's a peculiarity of most signed number representations, the first bit being set to 1 on 0x0 04:45
but yeah, doesn't matter
dduncan I thought most integer implementations were 2's complement, in which case a first bit being set means a -1 value 05:04
or other negative
for signed integers 05:05
avar, you probably mean non-integer numbers?
eg, floats
avar no for instance a 31 bit signed integer has the first byte as a boolean indicating whether it's signed 05:09
so -0 is 1 + [31 zeroes]
but that doesn't matter for anything really. It's an implementation quirk
dduncan avar, what you describe sounds like either 1's complement, or the way N-bit integers used to be done decades ago, before it was found that 2's complement was more efficient to implement; eg, for 8-bit integers, [+1,0,-1] were spelled [00000001,0000000,11111111], then 10000000 was -128, and 01111111 is +127 05:34
math ops are much simpler because no special cases needed to check what sign the numbers were ... you do the same thing with the bits either way ... 05:35
... this also leads to peculiarities where incrementing a number past its max value leads to its min value
for some reason, I thought this stuff (2's complement) was taught in programming 101 05:37
it was for me, anyway
avar, in case you wanted to know 05:39
toly dduncan: "natural number" perhaps? 05:57
dduncan toly, a "natural number" is a number >= 1 07:05
in any event, several people have said "unsigned integer" is best for what I'm asking about 07:06
or maybe I'm thinking "counting number"
for >= 1
no matter
masak dduncan: I think there's a non-consensus in the mathematical world about whether 1 or 0 is the smallest natural number. it depends. 07:07
dduncan no matter 07:09
zamolxes 0 is a natural number. 07:12
lumi Isn't a natural number a positive integer? 07:16
masak see? :)
lumi Or zero
masak my opinion is that people don't agree 07:17
lumi data Nat = Z | S Nat -- Like that!
masak seems like 0 is a slightly newer opinion, probably due to 0 being slightly newer than 1
lumi masak: Wikipedia agrees with you 07:18
masak ok
I suspect the divide stems from humans in general unconsciously preferring the 1 alternative, while mathematicians and C programmers in general tend towards 0 07:20
lumi Heh
I like the humans/C programmers contrast
masak :)
no offense intended towards C programmers (neither human nor non-human) 07:21
s/neither/neither towards/
toly dduncan: depends on who you ask 07:24
natural number as >=0 was especially popularised by french mathematicians I think, especially Bourbaki
masak toly: he was probably a C programmer :) 07:25
dduncan certainly the number zero is extremely important for non-trivial math ... though on its introduction, a lot of people were afraid of or couldn't understand it
O
masak it is a non-trivial concept
dduncan I'm thinking a few thousands of years ago
toly the idea being that "natural number == size of a finite set", and the empty set is definitely a finite set
dduncan empty set is finite 07:26
I don't think of natural number set being finite
anyway, back to work
lichtkind yesterday someone here metioned the =!= operator but i cant find it in S03 11:08
?eval =!= 11:09
pugsbot_r17185 Error: ␤Unexpected "!="
lichtkind ?eval ===
pugsbot_r17185 Error: ␤Unexpected end of input
lichtkind ?eval ===!!
pugsbot_r17185 Error: ␤Unexpected end of input
lichtkind ?eval 3 =!= 4 11:10
pugsbot_r17185 Error: ␤Unexpected "="
diakopter lichtkind: I was just joking around (=!=) 13:10
lichtkind diakopter: lichtkind is mostly too rerious to get jokes :) 13:14
Aankhen`` diakopter: I hereby sentence you to creating a meaningful semantics for the =!= operator.
lichtkind hahah 13:16
i firstly thought it was an alias fpr !=:=
for
diakopter TimToady: how about allowing try as a statement prefix as well as a block prefix? 13:42
diakopter argh; it already is... 13:43
pugs_svnbot r17234 | fglock++ | [kp6] added stub for the type-matcher 15:05
diff: dev.pugscode.org/changeset/17234
lambdabot Title: Changeset 17234 - Pugs - Trac 15:06
fglock i'm having trouble writing kp6 prelude things 15:17
lambdabot fglock: You have 1 new message. '/msg lambdabot @messages' to read it.
TimToady what kind of trouble? 15:18
fglock each time I add a new statement, I need to fix the compiler :P 15:19
is there a proposed mechanism to quantify type-distance? 15:21
TimToady we're not using type distance in any quantitative way, other than "worse" or "better" 15:22
fglock k 15:25
diakopter Juerd: ping 15:26
moritz_ fglock: how hard would it be to add a safe mode to kp6? (in order to make it usable for an evalbot) 15:58
TimToady looks like there are at least 3 spiders hammering on feather right now 16:16
kjwcode I'm thinking about writing tests for pugs. Who's the best person to hand them off to 'til I get a commit bit? 16:18
integral Would you like a commit bit? What's your email?
kjwcode [email@hidden.address] 16:19
Thank you, integral.
TimToady load avg on feather is currently 6, so might take a while to get commitbit up 16:20
integral err, it is just a *tad* slow :-) 16:21
kjwcode grins.
No worries -- I need to get up to speed on the work that's been done recently, anyway. 16:22
TimToady one of the big things we're looking at is how to refactor the tests for use by multiple platforms
kjwcode Can you expand on that a little or point me to a mailing list thread? That sounds right up my alley. 16:23
integral okay, that should be an invitation in the mail
kjwcode Thank you, integral. Much appreciated! 16:24
TimToady hmm, most of the discussion has been on #parrot, which isn't logged, but there are several things
first, the todo markings need to be pulled out of the actual test calls
probably to a preceding line
fglock moritz_: re safe mode, it probably doesn't do anything unsafe 16:25
TimToady it would be good if each platform had its own todo line so that svn can keep them independent easily
another thing is that some code passes on some platforms but doesn't even compile on new platforms
kjwcode makes notes. 16:26
TimToady so there's some discussion about how to format the tests so that either the tests are always compiled separately
or that there's a preprocess step for tests that are known not to compile on certain platforms
so a complete impl can just run the test straight up
but a partial impl can preprocess into separate evals and still get some info out of it 16:27
that's my take on the best approach
I think that passing the tests to be Real Perl 6 shouldn't involve any preprocessing 16:28
moritz_ what about storing the tests and the code it depends on into a computer readable format, and let each implementation pick their tests?
TimToady don't want any indirection that makes it harder to write tests
moritz_ probably too much effort
TimToady and it's already in a computer readable format. :)
moritz_ well... which program can read it? *g* 16:29
DarkWolf84 any editor
TimToady proprocessing tests to turn bare blocks into evals is fine for finding out which parts compile
DarkWolf84 I think
kjwcode Sounds good. Any big names in testing, or should I scan the commits to find the best folks to coordinate with?
TimToady but if you use a preprocessor for the standard tests, then you've essentially put part of the standard definition of P6 into the preprocessor, which is no good 16:30
moritz_ kjwcode: I think it's not the test writers that you should cooridinate with, but the compiler writers
TimToady we don't want language divergence based on which args you happen to feed the preprocessor today
moritz_ kjwcode: for example you could ask pmichaud++ which tests he'd like to have for p6-on-parrot 16:31
kjwcode moritz_: Good point. :)
TimToady he's also the parrot contact for rejiggering the tests to be useful to parrot
kjwcode Excellent. That gives me a great starting point. Thank you!
TimToady though various people are involved in that discussion 16:32
moritz_ maybe for some tests we could also just split them into separate files, roughly ordered by parsing difficulty
TimToady that's also been proposed
but it tends to make the smoke matrix longer
moritz_ and whatever people do will get done... if we wait for broad consent, we'll wait very long 16:33
TimToady and also doesn't help when tests depend on previous code
rough consensus and working code
TimToady kjwcode: note that the pugs philosophy is that it's better to ask forgiveness than permission 16:33
kjwcode TimToady: I think I can live with that. :) 16:34
TimToady kjwcode: have you seen the smoke output matrix online?
moritz_ on the other hand, nearly nobody forbids anything ;)
kjwcode TimToady: Not yet. We use a similar system where I work, so I'm somewhat familiar with it. 16:35
TimToady if not, see m19s28.dyndns.org/cgi-bin/pugs-smokeserv.pl and follow any of the arrows to a particular matrix
lambdabot Title: Pugs Smoke Reports
kjwcode Excellent, bookmarked. 16:35
TimToady you'll want the repository results rather than the release, which are ancient 16:35
TimToady anyway, most any time of day there will be someone here you can ask questions of, since we've got people all around the world working on this 16:36
kjwcode Wonderful. 16:37
moritz_ that sounds really cool ;)
and in fact, it is
kjwcode That's more than enough to get me started.
TimToady are you at all familiar with Haskell?
moritz_ kjwcode: just out of curiosity, how did you learn about pugs, the p6 test suite and this channel? 16:38
TimToady lot of those folks hang out here too, is all
kjwcode I'm familiar with the basic concepts of Haskell -- I've done a little ML in my time which is superficially similar
moritz_: I've been following Perl6 at a distance for quite some time. A couple of minor dips into parrot-land, and playing with Pugs on and off. I've decided to get active in the OSS community again and this felt like a great place to do it. 16:40
thoughtpolice i get a very strong feeling of dislike from ocaml, so i'm kind of iffy about ML (and f# for that matter)
that's probably just me though. :)
kjwcode thoughtpolice: It's not just you. I learned some mostly as a way of offsetting my bias towards Lisp-derived languages as being the whole of the functional language world. 16:41
Parentheses still give me warm fuzzies. We've all got our fetishes, I guess. :) 16:42
PerlJam kjwcode: If you could implement the Perl 6 rules syntax for pugs, that might be nice :)
thoughtpolice kjwcode: ah. lisp-land is a fun place to be though, I'll admit. :)
shachaf kjwcode: Monads are warm and fuzzy, if that helps. 16:43
kjwcode PerlJam: We'll see! This is only day 0 for me, so it'll be all about immersion. :)
TimToady well, we only need one complete rules engine, but we still need a lot fo tests
kjwcode shachaf: I've heard that about monads. I still haven't met one in real life, though -- only on-line. :) 16:44
kjwcode nods at TimToady. 16:44
Plus, tests are a great way of getting one's feet wet.
shachaf kjwcode: Lists are monads. Surely a LISPer would've met those? :-) 16:44
TimToady also, when you look at the tests, you'll see "smart links" back to the specs
shachaf @quote fuzzy 16:45
lambdabot No quotes match. This mission is too important for me to allow you to jeopardize it.
shachaf I guess it's gone. :-(
TimToady and the specs at perlcabal.org/syn/ have links into the current status of the tests for various sections of the document
lambdabot Title: Official Perl 6 Documentation
kjwcode shachaf: You bet! I have met a few of those in my time. :)
shachaf > [1,2,3] >>= (\x -> [4,5,6] >>= (\y -> return (x,y))) -- See? 16:46
lambdabot [(1,4),(1,5),(1,6),(2,4),(2,5),(2,6),(3,4),(3,5),(3,6)]
TimToady well, we don't require everyone around here to join a monadstery
?eval (1,2,3) X (4,5,6) 16:47
pugsbot_r17185 ((1, 4), (1, 5), (1, 6), (2, 4), (2, 5), (2, 6), (3, 4), (3, 5), (3, 6))
thoughtpolice speaking of haskell, my irc bot is making baby-steps. :)
in every sense of the phrase 'baby-steps' though 16:48
kjwcode Bookmarked. And I prefer the Perl 6 syntax. :)
shachaf > liftM2 (,) [1,2,3] [4,5,6] -- Almost as short, and way more general. :-)
lambdabot [(1,4),(1,5),(1,6),(2,4),(2,5),(2,6),(3,4),(3,5),(3,6)]
TimToady ?eval 1,2,3 X 4,5,6
pugsbot_r17185 ((1, 4), (1, 5), (1, 6), (2, 4), (2, 5), (2, 6), (3, 4), (3, 5), (3, 6))
DarkWolf84 :)
thoughtpolice it might be able to say 'hello' sometime in the next few days.
DarkWolf84 more clear
thoughtpolice i'll declare birth then
DarkWolf84 :)
TimToady good, the precedence got fixed
shachaf > [(x,y) | x <- [1,2,3], y <- [4,5,6]] -- Pretty clear?
lambdabot [(1,4),(1,5),(1,6),(2,4),(2,5),(2,6),(3,4),(3,5),(3,6)]
TimToady ?eval map { [$^x, $^y] }, (1..3 X 4..6) 16:50
pugsbot_r17185 ([1, 4, 1, 5], [1, 6, 2, 4], [2, 5, 2, 6], [3, 4, 3, 5], [3, 6, undef])
thoughtpolice lambdabot is fun. :) i think my new favorite command might be like djinn
TimToady hmm,
thoughtpolice because it's oh-so cool.
TimToady right X doesn't flatten right yet
shachaf Flatten? 16:52
TimToady most of the operations and functions that return sublists should return a list of captures, which in normal list context flatten, but in "slice" context turn into a list of lists 16:52
TimToady so things like X, map, gather are all context sensitive 16:53
but that's not quite implemented in pugs yet
shachaf thinks Perl is weird. 16:54
TimToady it's optimized differently than Haskell 16:54
pmurias fglock: hi 16:55
shachaf > let (*) = liftM2 (,) in [1,2,3] * [4,5,6]
lambdabot [(1,4),(1,5),(1,6),(2,4),(2,5),(2,6),(3,4),(3,5),(3,6)]
fglock pmurias: hi 16:56
PerlJam TimToady: Have you read any of Nassim Taleb's books? "Fooled by Randomness", "The Black Swan", etc.?
TimToady nope
PerlJam TimToady: He essentially makes the premise that humans aren't optimized to design but rather to discover. 16:57
TimToady: So ... you bucking evolution by making designing Perl 6 :)
s/making//
TimToady well, it is certainly the case that we frequently discover that our designs don't work...
diakopter design is the attempted discovery of the/an optimum implementation/solution... 16:58
TimToady I'm trying to discover a design that allows people to discover programming techniques gradually 16:59
and the optimum in language design is not one that's perfect, but one that is free to evolve over time 17:00
[particle] that's nvts. 17:01
TimToady lol
anyway, the whole point of Perl 6 is to do about 20 impossible things simultaneously 17:02
being perfect both now and 20 years from now is just one of those impossible things 17:03
PerlJam I remember right after perl 5 was released to the masses that it seemed to change rapidly and then entered a state of steady growth (change). Perl 6 will likely be the same. 17:04
(If Perl 6 is every released to the masses :)
diakopter "there's not many ways not to do it" "the best ways to do it are easier to learn and do than [previously | the worse ways to do it]" "cool"
that first quote is attributed to TimToady, btw. 17:07
TimToady there are not many ways not to say something that someone will not deem quotable 17:09
PerlJam "" <-- quoting the silence between TimToady's text. 17:10
DarkWolf84 :) 17:11
TimToady shower, bbl & 17:12
Juerd diakopter: pong (better to mail me) 17:13
fglock hmm - I probably need to implement something like this for sorting multis: compare_type_distance( $proto_a, $proto_b, $invocant ){...} 17:24
pmurias fglock: something like matches_tighter($proto_a,$proto_b,$argument) 17:45
might be better 17:46
pmurias is playing with selenium, and like it quite a bit 17:47
moritz_ selenium? the chemical element? 17:47
probably not :)
pmurias www.openqa.org/selenium-ide - automatic testing for ajax 17:49
moritz_ looks quite nice ;) 17:50
avar =v 11 17:51
diakopter does anyone here know if Debian has commented on the AL2 - that is, whether it will redistribute upstream source packages under the AL2, or whether it will select GPLn or something? 18:49
moritz_ I don't know... have you googlede linux.debian.legal? 18:50
moritz_ diakopter: www.debian.org/legal/licenses/index.en.html lists "Perl Artistic license" without specifying a version number, so I'd assume there is no problem 18:53
lambdabot Title: Debian -- License information
moritz_ debian-legal usually follows new version of common licenses very closly and cries out loudly if it's not DFSG-compatible 18:54
especially if the prior version was DFSG
diakopter I'd call that out of date... Debian's list of allowed licenses doesn't correspond to OSI's. For instance, the AL2 approves redistribution under the Apple Public Source License, while Debian calls that a non-free license. 18:57
moritz_ diakopter: that's no reason for AL2 to be non-free 18:58
diakopter: and DFSG and OSI only were the same initially, the "forked" a long time ago
moritz_ www.opensource.org/licenses/alphabetical doesn't list as2 either 18:59
lambdabot Title: Licenses by Name | Open Source Initiative
moritz_ and the as2 link on www.perlfoundation.org/legal/ is a dead link 19:01
obra OSI have approved the artistic 2. even if their website isn't current 19:03
moritz_ that's good news at least ;)
I don't know if (13) may be a problem for DFSGness 19:06
wolverian FSF also refers to AL2 nowadays, I think 19:07
aye, it does (and considers it free) 19:12
diakopter I guess I don't see a difference between Debian saying "we won't redistribute software that we're licensed to modify/redistribute under [only] the A(pple)PSL" and "we won't redistribute software that someone else could redistribute *with our patches* under a non-free license (the APSL)" 19:43
dduncan afaik, the APSL 2.0 is a free license; it just isn't GPL compatible 19:45
diakopter dduncan: sry; backlog; I was continuing a conversation from an hour ago 19:46
it is non-free according to Debian
dduncan I was quoting the fsf position ... www.gnu.org/licenses/license-list.html ... 19:47
lambdabot Title: Various Licenses and Comments about Them - GNU Project - Free Software Foundatio ... 19:47
dduncan but yes, I understand Debian is more strict
moritz_ diakopter: the difference is huge... BSD license allows you to redistribute under nearly _any_ license, but it's still DFSG-compatible
diakopter: DFSG is not about protecting Debian's intellectual property, but about ensuring freedom for the user 19:48
diakopter: and debian users modify their software ;)
pugs_svnbot r17235 | moritz++ | [irclog] more encoding issues: 20:10
r17235 | moritz++ | entering of multibyte chars in the search field will at least be preserved
r17235 | moritz++ | No guarantee that it finds something :(
diff: dev.pugscode.org/changeset/17235
lambdabot Title: Changeset 17235 - Pugs - Trac
moritz_ can somebody confirm DNS problems with resolving svn.pugscode.org 20:11
?
kjwcode moritz_: I was having problems resolving it a couple of hours ago, but assumed it was due to difficulties with my primary nameserver. 20:12
moritz_: Seems to be working fine for me now, though. 20:13
obra I get a fast answer of 193.200.132.135
moritz_ it works for me on three hosts, the fourth can't resolve it 20:14
TimToady I was also having trouble a couple hours ago 20:15
moritz_ ok, thanks
diakopter that registrar's dns servers were having problems (both perlcabal.org and pugscode.org) for a while. 20:18
moritz_ can't test the last irclog commit until pugscode.org resolves OK again 20:20
diakopter moritz_: why not 20:21
moritz_ diakopter: because I can't do a "svn up" on the server :(
diakopter hosts entry for 93.200.132.135 svn.pugscode.org ....? 20:22
er, 193.200.132.135
moritz_ diakopter: no root access :( 20:23
diakopter moritz_, TimToady: if you're feeling daring, you can svn switch --relocate svn.pugscode.org/pugs p6lib.org/pugs . 20:53
diakopter don't try using ssl, though... problems ensue. 20:55
diakopter (you can always switch it back...) 21:10