Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2007-10-10

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 fax hm
00:03 fax The CLOS methods are external to the classes, but they are all internal in the perl mop
00:03 fax that isn't a problem?
00:06 theorb joined #perl6
00:06 amnesiac joined #perl6
00:09 avar fax: We can pretty much do whatever we want with the lisp runtime pollution wise since we don't have to not mess things up there
00:15 pugs_svnbot r18363 | avar++ | Implemented @*ARGS, this is required for command-line processing in kp6.p6
00:15 pugs_svnbot diff: http://dev.pugscode.org/changeset/18363
00:15 lambdabot Title: Changeset 18363 - Pugs - Trac
00:17 pugs_svnbot r18364 | avar++ | Pass lib-kp6-mp6-p5 files through perltidy, makes things a bit slower but a lot easier to debug
00:17 pugs_svnbot diff: http://dev.pugscode.org/changeset/18364
00:17 lambdabot Title: Changeset 18364 - Pugs - Trac
00:37 [particle1 joined #perl6
00:37 pugs_svnbot r18365 | avar++ | regened from commit 18363
00:37 pugs_svnbot diff: http://dev.pugscode.org/changeset/18365
00:37 lambdabot Title: Changeset 18365 - Pugs - Trac
00:41 avar fax: still here?:)
00:41 fax yes
00:41 fax reading MOP.pm
00:42 fax What's up?
00:42 avar nuttn much:)
00:42 avar I'm going to sleep soon, but I was thinking if you wanted to hack this just making this work for e.g. Array.lisp in the repl would be nice
00:43 avar (defparameter *array* (make-instance 'kp6-Array))
00:43 avar (dispatch *array* "elems")
00:44 fax ok I'll give it a shot
00:46 avar (funcall (format nil "kp6-~a" "STORE") *array* 1 (make-instance 'kp6-Str :value "bleh"))
00:46 avar except with a function/symbol which I have no idea how to dynamically generate:)
00:48 avar Or of course if CLOS is flexible enough to map the Perl 6 model there's no need for such sillyness and you can just (kp6-store ...)
00:48 fax kp6-store shoudl be possible I think
01:00 lyokato joined #perl6
01:18 daxim_ joined #perl6
01:22 justatheory joined #perl6
01:23 cognominal_ joined #perl6
01:45 cognominal_ joined #perl6
01:59 vbattsAtWork joined #perl6
02:01 Lunchy joined #perl6
02:32 pugs_svnbot r18366 | fax++ | Added kp6-dispatch for Array and Hashtable in the Lisp runtime, Made emit lisp use it for array assignments. test 45-for.t now works.
02:32 pugs_svnbot diff: http://dev.pugscode.org/changeset/18366
02:32 lambdabot Title: Changeset 18366 - Pugs - Trac
02:35 avar fax: awesome
02:35 fax cool, this is what you meant?
02:37 avar checking it out, looks good
02:38 avar I had something else in mind but this is better:)
02:41 avar fax: does echo 'my @rray; say @rray.elems' | perl script/kp6 -lisp | sbcl work for you?
02:41 fax I'm actually working on getting it to work now :)
02:41 fax so not it doesn't
02:41 avar hehe
02:41 pugs_svnbot r18367 | avar++ | generated from last commit by fax
02:41 pugs_svnbot diff: http://dev.pugscode.org/changeset/18367
02:41 lambdabot Title: Changeset 18367 - Pugs - Trac
02:42 fax ah oops
02:42 fax I tried this time just commited the files I edited directly
02:42 fax because last time I commited the whole folder
02:42 avar np:)
02:42 avar I always forget the generated stuff
02:43 nothingmuch joined #perl6
02:44 avar but to answer your comment yes, that should be phased out
02:45 kanru joined #perl6
02:45 avar well kind of..
02:45 avar index/store etc should always get a kp6-Int object
02:45 avar INDEX=>sub {
02:45 avar my $key = ::DISPATCH(::DISPATCH($_[1],"int"),"p5landish");
02:45 avar return ::DISPATCH($::Cell,"new",{cell=>\$_[0]{_value}{_array}[$key]});
02:47 fax In the let I have
02:47 fax (index (kp6-value (elt parameters 0)))
02:47 pugs_svnbot r18368 | fax++ | array :elem dispatch working now
02:47 pugs_svnbot diff: http://dev.pugscode.org/changeset/18368
02:47 lambdabot Title: Changeset 18368 - Pugs - Trac
02:47 fax To get the int value from the kp6-int
02:47 avar Because the built-in classes should be using the normal perl 6 object protocol like the p5 backend, which afaict from reading it makes things a lot easier
02:47 avar fax: yup, that works
02:47 fax :D
02:48 avar well, ..
02:48 fax mm something wrong with 27-array.t
02:49 fax ah map is not implemented
02:49 avar I suppose it should really be (perl->cl (kp6-dispatch *array* "int")
02:49 avar or kp6-value instead of perl->cl
02:50 fax ahh ok
02:50 avar since the "int" is telling the object to tell us its int value as opposed to fetching the slot
02:50 avar Which would then translate to method Int { 1337 } or some such if you compiled a funky class with int overloading
02:53 avar (oh the overhead!) :)
02:57 aindilis joined #perl6
03:05 elmex_ joined #perl6
03:05 avar `echo 'my %a; %a{"key"} = "value"; say %a{"key"}' | perl script/kp6 -lisp` is broken with this patch: http://sial.org/pbot/27972 , but only because the emitter does lookup-lexical-variable instead of kp6-dispatch:)
03:05 lambdabot Title: Paste #27972 from Someone at 208.78.101.240
03:10 fax eep yes
03:10 fax I was trying to figure out how :S
03:10 avar also instead of ' :store ' you can do ' :' ~ $node.method I think
03:11 fax to get INDEX or LOOKUP ?
03:11 avar or no, that's wrong
03:11 avar it should be :store
03:12 avar It's '::DISPATCH_VAR( ' ~ $node.emit_perl5 ~ ', \'STORE\', ' ~ $.arguments.emit_perl5 ~ ' )' ~ Main::newline(); in the p5 backend
03:18 fax hmm
03:19 fax We've got, :initform (make-hash-table :test #'equal)
03:19 fax Then doing, (kp6-dispatch (lookup-lexical-variable (kp6-generate-variable "%" "hash")) :lookup (make-instance 'kp6-Str :value "x"))
03:19 fax It won't really work will it because two seperate instances cannot be equal
03:20 fax maybe the objects lisp data type should be hashed when it's one of string int ..
03:21 fax and the actual instance itself hashed otherwise?
03:21 avar I wrote that #'equal assuming the keys would be strings
03:22 amnesiac joined #perl6
03:22 avar I think only strings can be hash keys, but maybe that's just perl5
03:22 fax ah ok, that makes it easy :)
03:22 avar but in any case it's safe to assume it for now
03:23 weinig joined #perl6
03:25 fax that's hashes working now
03:25 fax 26-hash.t has some error due to global variables though :|
03:26 fax er ignore that, the test works fine :S
03:26 fax I did echo instead of cat... :P
03:29 pugs_svnbot r18369 | fax++ | 26-hash.t now working
03:29 pugs_svnbot diff: http://dev.pugscode.org/changeset/18369
03:29 lambdabot Title: Changeset 18369 - Pugs - Trac
03:30 avar awesome!
03:33 avar if you do prove -v -r t-lisp-exe you'll see a bunch of unimplemented dispatch stuff:)
03:34 fax avar: Is that all the ones where SBCL exits with fatal error?
03:34 avar anything non-zero
03:43 avar fax: http://sial.org/pbot/27973
03:43 lambdabot Title: Paste #27973 from Someone at 208.78.101.240
03:44 avar $ echo 'my %hash; %hash{"key"} = "value"; for %hash.keys -> $k { say $k }' | perl script/kp6 -lisp | sbcl
03:44 avar Error: In #<KP6-INTERPRETER {AB0DC79}>: Function NIL not found in package GLOBAL.
03:44 avar eek
03:45 avar oh right..
03:45 avar # prefix:<@>
03:45 avar sub prefix_58__60__64__62_      {
03:45 avar ::DISPATCH( $_[0], 'array' )
03:45 avar }
03:45 avar needs that:)
03:48 elmex joined #perl6
03:50 avar needs that: http://sial.org/pbot/27974
03:50 lambdabot Title: Paste #27974 from Someone at 208.78.101.240
03:50 pugs_svnbot r18370 | avar++ | .keys implemented
03:50 pugs_svnbot diff: http://dev.pugscode.org/changeset/18370
03:50 avar $ echo 'my %hash; %hash{"key"} = "value"; %hash{"key2"} = "value2"; say %hash.keys' | perl script/kp6 -lisp | sbcl
03:50 lambdabot Title: Changeset 18370 - Pugs - Trac
03:50 avar (#<FUNCTION (LAMBDA #) {A961E85}>)
03:50 avar * key2 key
03:50 avar ..for that to work
03:50 avar should be doing dispatch to "array" though
03:50 avar but I'm tiiired:)
03:51 fax cool I'll play with iths
03:51 fax this
03:52 avar now that we have an object dispatch framework going I can add more methods and stuff:)
03:54 avar there's also lots of yak shaving moving stuff over, like kp6-true => (kp6-dispatch ... : true
04:05 pugs_svnbot r18371 | avar++ | [kp6-lisp]
04:05 pugs_svnbot r18371 | avar++ | Implemented .true on numbers
04:05 pugs_svnbot diff: http://dev.pugscode.org/changeset/18371
04:05 lambdabot Title: Changeset 18371 - Pugs - Trac
04:28 fax :[
04:28 fax my %hash; %hash{"key"} = "value"; %hash{"key2"} = "value2"; my @rray = %hash.keys; for @rray -> $x { say $x; }
04:28 fax that works
04:29 fax There is some problem with for %hash.keys -> $x { say $x; } directly though
04:45 melissa joined #perl6
04:46 melissa joined #perl6
05:03 zamolxes joined #perl6
05:08 funktio joined #perl6
05:09 Ashizawa joined #perl6
05:41 Aankhen`` joined #perl6
05:54 nipra joined #perl6
06:07 nipra_ joined #perl6
06:19 devogon joined #perl6
06:21 diotalevi Does the JavaScript engine still work? Can I write perl 5 code and run it on a JavaScript interpreter?
06:23 c9s joined #perl6
06:41 drbean joined #perl6
06:52 cnhacktnt joined #perl6
06:52 jisom_ joined #perl6
06:55 cnhackTNT joined #perl6
06:58 iblechbot joined #perl6
07:00 miyagawa joined #perl6
07:01 cnhackTN1 joined #perl6
07:04 Jedai joined #perl6
07:12 franck___ joined #perl6
07:16 gorax joined #perl6
07:20 miyagawa left #perl6
07:36 mr_ank joined #perl6
07:43 masak joined #perl6
07:55 rgs joined #perl6
08:15 lyokato joined #perl6
08:19 moritz_ diotalevi: no, it doesn't, and I think it never worked with p5
08:21 dduncan left #perl6
08:23 arrowax joined #perl6
08:32 REPLeffect_ joined #perl6
09:13 IllvilJa joined #perl6
09:15 fax joined #Perl6
09:17 lichtkind joined #perl6
09:25 fglock joined #perl6
09:27 IllvilJa joined #perl6
10:11 penk joined #perl6
10:14 ruoso joined #perl6
10:42 fax What is prefix:<@> supposed to do?
10:42 fax (in kp6, global.lisp )
10:49 lichtkind_ joined #perl6
10:52 pugs_svnbot r18372 | fax++ | minor fixes for hashtables, got "for %h.keys -> $x" working
10:52 pugs_svnbot diff: http://dev.pugscode.org/changeset/18372
10:52 lambdabot Title: Changeset 18372 - Pugs - Trac
10:54 moritz_ fax: could you please use [kp6] in your commit messages?
10:54 fglock fax: "@" calls the argument in list context
10:54 fax moritz_: of course, sorry
10:54 moritz_ fglock: shouldn't that be @( ... )?
10:55 fglock yes, same operation
10:56 fglock prefix:<@>( ... )
10:56 moritz_ ok, I didn't knew that it works without the parenthesis
10:57 devogon joined #perl6
11:04 pugs_svnbot r18373 | fax++ | [kp6] added Hash keys and renamed for-loop-structure macro
11:04 pugs_svnbot diff: http://dev.pugscode.org/changeset/18373
11:04 lambdabot Title: Changeset 18373 - Pugs - Trac
11:05 moritz_ fax++ # kp6 hacking
11:07 chris2 joined #perl6
11:14 fglock kp6:  my $a = [1,2,3]; for prefix:<@>( $a ) -> $item { say "$item, " };
11:14 exp_evalbot r18373: OUTPUT[1, ␤2, ␤3, ␤]
11:15 moritz_ kp6: my @a = (1, 2, 3);
11:15 exp_evalbot r18373: OUTPUT[syntax error at position 6, line 1 column 6:␤my @a = (1, 2, 3)␤      ^ HERE␤]
11:15 moritz_ kp6: my @a = [1, 2, 3];
11:15 exp_evalbot r18373: OUTPUT[[ 1, 2, 3 ]␤]
11:16 moritz_ kp6: my @a = [1, 2, 3]; for @a -> $i { say $i }
11:16 exp_evalbot r18373: OUTPUT[1␤2␤3␤]
11:16 moritz_ kp6: my $a = [1, 2, 3]; for $a -> $i { say $i }
11:16 exp_evalbot r18373: OUTPUT[1␤2␤3␤]
11:16 fglock this one is broken atm
11:17 moritz_ fglock: should it put a hash ref in $i in the first iteration?
11:22 f0rth joined #perl6
11:23 fglock array ref, yes
11:50 iblechbot joined #perl6
12:06 onebadoze joined #perl6
12:13 weinig_ joined #perl6
12:20 zamolxes joined #perl6
12:27 cognominal_ joined #perl6
12:34 cmarcelo joined #perl6
12:50 Khisanth joined #perl6
12:52 khisanth_ joined #perl6
12:53 pmurias joined #perl6
12:54 scent joined #perl6
13:00 iblechbot joined #perl6
13:10 yhsuan joined #perl6
13:11 penk joined #perl6
13:38 pmurias fglock: the problem with test 50 is that methods autothread on the invocant
13:39 pmurias it's currently indistinguishable from the first argument
13:41 diotalevi moritz_, thanks. I'm bummed now.
13:45 polettix joined #perl6
13:47 pmurias diotalevi: you need to port something to javascript?
13:47 diotalevi pmurias, I've got an app that would be nice to export out to a browser.
13:50 diotalevi I had a wild idea that it would be ultra-spiffy to deparse my perl 5 code to JS and it would just work because everyone knows pugs hackers have awesome stacks.
13:53 pugs_svnbot r18374 | ruoso++ | [yap6] added a new test for the reference counting...
13:53 pugs_svnbot diff: http://dev.pugscode.org/changeset/18374
13:53 fglock pmurias: yes; i'm not sure if you can call methods on junctions or not
13:53 lambdabot Title: Changeset 18374 - Pugs - Trac
13:54 moritz_ diotalevi: pugs uses an embedded perl5 to interpret Perl 5
13:54 fglock so not sure how to fix it
13:54 moritz_ 5A
13:54 moritz_ sorry
13:54 TJCRI joined #perl6
13:55 fglock diotalevi: when do you need it?
13:56 diotalevi You're asking me a scheduling question about pie in the sky software?
13:59 diotalevi I'm confused see, you say that as if you could pull this magic rabbit out of your hat.
13:59 fglock pugs: (1|2|3).perl
14:00 exp_evalbot OUTPUT["(1 | 2 | 3)"␤]
14:00 fglock kp6: (1|2|3).perl
14:00 exp_evalbot r18374: OUTPUT[no method 'perl' in Class 'Junction'␤ at lib-kp6-mp6-p5/KindaPerl6/Runtime/Perl5/MOP.pm line 130␤  KindaPerl6::Runtime::Perl5::MOP::__ANON__('KindaPerl6::Runtime::Perl5::DispatchSugar::Dispatch=HASH(0x85...', 'perl') called at lib-kp6-mp6-p5/KindaPerl6/Runtime/Perl5/MOP.pm line 36␤
14:00 exp_evalbot ..main::DISPATCH('KindaPerl6::Runtime::Perl5::DispatchSugar::Dispat...]
14:01 fglock it depends on how complex you Perl 5 program is
14:02 fglock if it maps cleanly to javascript, it should not be too difficult
14:02 fglock getting emulation right is hard
14:03 * fglock puts the hat back in head
14:03 pmurias fglock: i think you are allowed to call method on junctions
14:03 diotalevi It's an OO component. I'm sure it'd require much finagling to automatically translate.
14:04 pmurias line 836, S12
14:05 fglock pmurias: ok
14:09 fglock diotalevi: I've got this idea that we could have platform-specific versions of Perl 6. This was the motivation for MiniPerl6, which was mapped to Perl 5
14:11 fglock otoh, KindaPerl6 can work as a desugaring layer
14:11 pmurias fglock: subsets of perl which would map directly to a given language?
14:11 fglock mapping things that need emulation into the low-level vm
14:11 fglock pmurias: yes
14:12 pmurias things wouldn't be portable between different implementations
14:13 fglock That's kp6 job, to add enough emulation
14:13 * diotalevi shrugs.
14:13 fglock so you have a choice
14:14 fglock nqp works like that too, I guess
14:14 fglock for the Parrot platform
14:15 fglock so MiniPerl6-javascript would be different from MiniPerl6-java, but they are as fast as they can be in the specific platform
14:16 weinig joined #perl6
14:16 fglock and you can use KindaPerl6 if you care more about features and compatibility
14:19 avar who's working on bootstrap these days? anyone?
14:19 pmurias avar: the grammar in the bootstraped compiler are too slow
14:19 pmurias * grammars
14:21 fglock we could use the per5rx backend for regexes, but then it depends on what you mean by bootstrapping
14:22 avar pmurias: that can be sped up with a better emitter
14:24 fglock avar: i think this could lead to premature optimizations
14:25 buubot joined #perl6
14:25 avar I'm just saying it doesn't matter if the grammar is slow, the bootstrap is the important part
14:25 avar It can be sped up later
14:26 pmurias avar: the rule engine is the problem
14:27 pmurias avar: the bootstrap compilers take enormous amounts of time to compile even the simplest things
14:28 fglock it depends on how you implement it
14:28 avar ls -l
14:28 pmurias making testing impractical
14:28 fglock the portable rule engine is slow
14:28 fglock but the perl5rx one is usable
14:29 avar and the -lisp one will be faaastah:)
14:30 avar pmurias: but things pretty much work aside from being slow?
14:33 vbattsAtWork joined #perl6
14:33 scent joined #perl6
14:33 wilx joined #perl6
14:34 avar "KindaPerl6/Runtime/Perl6/Pair.pm did not return a true value at lib-kp6-kp6-p5/KindaPerl6/Runtime/Perl5/MOP.pm line 823."
14:35 fglock hmm - junctions don't autothread in say() in pugs - I wonder what makes it autothread or not
14:35 pugs_svnbot r18375 | ruoso++ | [yap6] a test describing how threads can ensure that the value will not vanish while they are using it
14:35 pugs_svnbot diff: http://dev.pugscode.org/changeset/18375
14:35 lambdabot Title: Changeset 18375 - Pugs - Trac
14:35 ruoso fglock, take a look at that ^
14:35 fglock k
14:37 pmurias pugs: say 1 & 2
14:37 exp_evalbot OUTPUT[all(VInt 1,VInt 2)␤]
14:38 ruoso home &
14:38 pmurias avar: a bit
14:38 * ruoso going to sevilla
14:51 DarkWolf84 joined #perl6
15:07 marmic joined #perl6
15:09 amnesiac joined #perl6
15:18 fglock reading S09 on junctions
15:21 barney joined #perl6
15:52 cathya joined #perl6
16:00 REPLeffect_ joined #perl6
16:00 avar Aankhen``: have you seen the new stuff in kp6-lisp?
16:01 daxim joined #perl6
16:07 Daveman joined #perl6
16:14 fglock avar: can the kp6-kp6 compilation be made optional?
16:15 fglock I'm trying to find out how to do it
16:16 avar it worked before I screwed it up somehow
16:16 avar it *should* work
16:19 avar no wait, it shouldn't
16:22 avar fglock: does kp6-kp6 compile for you? I just get errors
16:23 fglock it doesn't, but it used to compile a week or so ago
16:23 avar I'm pretty sure I didn't screw that up..
16:23 avar Well maybe I did
16:23 pugs_svnbot r18376 | avar++ | make kp6_mp6 work again, pure_all included the kp6_kp6 targets, removed along with manifypods
16:23 pugs_svnbot diff: http://dev.pugscode.org/changeset/18376
16:23 lambdabot Title: Changeset 18376 - Pugs - Trac
16:25 cathya how insecure are passwords?
16:25 cathya in general
16:25 cathya even if they are encrypted
16:26 avar uh, what?
16:26 cathya as in passwords are sufficient but end of the day they are insecure arent they
16:27 cathya passwords are always insecure arent they? encryptioon could solve the problem but encryption only stops them, from say, getting a dump of your database and dispaying the cleartext passwords. it doesn't stop someone from calling you, protending to be the boss, and asking for a password reset\
16:27 cathya so whats an alternative?
16:28 moritz_ cathya: an alternative are fingerprint sensors, voice recogntion
16:29 moritz_ it always depends on how paranoid you are and how much you are willing to pay for your security
16:30 allbery_b there's always some variation on rubber-hose cryptography
16:30 allbery_b people have been known to make casts or even cut off fingertips (!) to deal with fingerprint sensors
16:31 allbery_b in the end, the only truly secure system is one that's been encased in steel and then reinforced concrete and dumped into the Marianas Trench
16:31 moritz_ that's why you use multi factor authentification if you have to have real security
16:32 * avar walks away in confusion
16:32 allbery_b the correct way to think about security is in terms of risk management.  rephrase it as an accounting risk or an actuarial problem
16:35 justatheory joined #perl6
16:41 weinig joined #perl6
16:42 weinig_ joined #perl6
16:53 TimToady fglock: say has list arguments, which don't autothread.  It's basically the MMD dispatcher that ends up autothreading when it notices that certain positional arguments don't match Any but do match Junction
16:58 barney joined #perl6
17:00 pmurias TimToady: can subs take an invocant? sub f($invocant:$arg1,$arg2,$arg3) {}?
17:16 TimToady not exactly
17:16 TimToady a sub isn't declared with an invocant, so can't take one
17:16 TimToady however
17:17 TimToady a method can be called as a sub if you have a reference to it
17:17 TimToady in which case the invocant is just the first positional argument
17:17 TimToady which is how dispatchers call methods
17:18 TimToady though perhaps the invocant form could be allowed for such a call.
17:19 TimToady and, indeed, if you're going to bind a Capture at that point, it has an invocant slot already
17:19 TimToady so possibly the invocant syntax is mandatory on such a call.
17:20 fglock TimToady: ok, thanks
17:21 TimToady mostly we just try to keep methods and subs distinct, but of necessity a dispatcher has to treat methods more like normal subs
17:21 fglock re MMD, does it mean "only" doesn't autothread?
17:22 TimToady an "only" would fail to bind a junction to an Any, and perhaps failover to autothreading
17:23 TimToady if the "only" dispatcher is just a degenerate case of MMD then it happens automatically
17:23 TimToady but the rationale for "only" is to allow optimization
17:23 Psyche^ joined #perl6
17:23 TimToady so it's likely to bypass MMD entirely
17:23 TimToady but it could still fail to bind
17:24 TimToady does that make sense?
17:25 fglock yes
17:25 TimToady but it was an excellent question
17:25 IllvilJa joined #perl6
17:26 TimToady bbl &
17:32 Aankhen`` avar: Yup.
17:34 fglock a video on STM http://video.google.com/videoplay?docid=5442492239822665187
17:34 lambdabot Title: Software Transactional Memory
17:37 avar Aankhen``: whee
17:37 carsten joined #perl6
17:37 avar Aankhen``: like where it's going?
17:48 Aankhen`` avar: I'm not sure yet. :-)
17:49 avar Aankhen``: You don't have a choice:)
17:49 Aankhen`` avar: I noticed. :-P
17:49 pugs_svnbot r18377 | avar++ | [kp6-lisp] class If {} is now kp6-dispatch to 'true' and 'cl-landish' like the perl 5 backend, if (1) {} works but something else is probably broken
17:49 pugs_svnbot diff: http://dev.pugscode.org/changeset/18377
17:49 lambdabot Title: Changeset 18377 - Pugs - Trac
17:49 Aankhen`` You guys are probably on the right track, though.
17:50 avar yes, basically we're (re-)writing the built-in classes in the p5 metamodel
17:50 * Aankhen`` nods.
17:50 avar and since clos is awesome we don't have to write our own object system while we're at it
17:53 avar Aankhen``: want to implement methods?:)
17:53 avar t/kp6/21-oo.t
17:53 Aankhen`` Not particularly
17:53 Aankhen`` … had a long day and I need to relax.
17:53 Aankhen`` Stupid Enter key.
17:53 avar <enter key> stupid enter key operator
17:53 fglock @tell ruoso http://www.cl.cam.ac.uk/research/srg/netos/lock-free/
17:53 lambdabot Consider it noted.
17:54 * Aankhen`` giggles.
17:56 avar Array.lisp has some lameness, lisp arrays croak if you access undefined indexes and it's not always extending itself correctly
17:57 Aankhen`` The first should be easy to fix.  Wrap the contents of KP6-LOOKUP in a HANDLER-CASE for bad indexes that wraps it in a KP6-ERROR form.
17:58 avar (defmethod kp6-dispatch ((invocant kp6-Array) (method (eql :lookup)) &rest parameters)
17:58 avar (defmethod kp6-dispatch ((invocant kp6-Array) (method (eql :lookup)) &rest parame  "Retrieve a value from the array"
17:58 avar (assert (= 1 (length parameters)))
17:58 avar (let* ((index (perl->cl (elt parameters 0)))
17:58 avar (dimension (array-dimension (kp6-value invocant) 0)))
17:58 avar (if (> dimension (1+ index))
17:58 avar ; This is beyond the size of the array, so it's undef
17:58 avar (make-instance 'kp6-Undef)
17:58 avar (progn
17:58 avar (let ((value (elt (kp6-value invocant) index)))
17:58 avar ; If it's 0(bit) it hasn't been set yet, so undef
17:58 avar (if (typep value 'bit)
17:58 avar (make-instance 'kp6-Undef)
17:58 avar value))))))
17:58 avar :)
17:58 avar doesn't even work:)
17:59 avar But I'm more interested in refactoring atm
17:59 Aankhen`` Heh.
18:01 avar a lot of stuff like coerce.lisp will be obsolete in favor of telling the object to coerce itself
18:01 avar anyway, gone
18:13 weinig joined #perl6
18:16 pugs_svnbot r18378 | fglock++ | [kp6] lazier Array
18:16 pugs_svnbot diff: http://dev.pugscode.org/changeset/18378
18:16 lambdabot Title: Changeset 18378 - Pugs - Trac
18:16 fglock kp6:  my @a; @a[100000000000]; say "still here"
18:16 exp_evalbot r18377: OUTPUT[Modification of non-creatable array value attempted, subscript -2147483648 at lib-kp6-mp6-p5/KindaPerl6/Runtime/Perl5/Array.pm line 17.␤]
18:17 _go_ joined #perl6
18:17 fglock kp6:  my @a; @a[2147483640]; say "still here"
18:17 exp_evalbot r18377: OUTPUT[Out of memory during array extend at lib-kp6-mp6-p5/KindaPerl6/Runtime/Perl5/Array.pm line 17.␤]
18:17 carsten left #perl6
18:18 fglock kp6:  my @a; @a[2147483640]; say "still here"
18:18 exp_evalbot r18378: OUTPUT[still here␤]
18:19 fglock home &
18:28 blindfish joined #perl6
18:29 Torment joined #perl6
18:32 jisom joined #perl6
18:54 stevan_ joined #perl6
19:05 polettix joined #perl6
19:10 falesca_ joined #perl6
19:15 xinming joined #perl6
19:16 pugs_svnbot r18379 | avar++ | [kp6-lisp] Implemented prefix:<!>
19:16 pugs_svnbot diff: http://dev.pugscode.org/changeset/18379
19:16 lambdabot Title: Changeset 18379 - Pugs - Trac
19:20 rindolf joined #perl6
19:25 pugs_svnbot r18380 | avar++ | [kp6-lisp] .true works on Bit
19:26 pugs_svnbot r18381 | avar++ | [kp6-lisp] Fixed .true on Bit, use (not (null))
19:26 pugs_svnbot diff: http://dev.pugscode.org/changeset/18381
19:26 lambdabot Title: Changeset 18381 - Pugs - Trac
19:33 zostay_ joined #perl6
19:37 pugs_svnbot r18382 | avar++ | [kp6-lisp] use kp6-dispatch :true not kp6-true
19:37 pugs_svnbot r18383 | avar++ | Use (kp6-dispatch (kp6-dispatch :true) :cl-landish) instead of kp6-true)
19:37 pugs_svnbot diff: http://dev.pugscode.org/changeset/18383
19:38 lambdabot Title: Changeset 18383 - Pugs - Trac
19:39 penk joined #perl6
19:43 shlomif joined #perl6
19:53 TimToady if there are any lambdacamels listening in, I would be ecstatic if someone with some Haskell-fu hacked an interface to Chris Kuklewicz's regex-tdfa into pugs.
19:58 * [particle] wonders where gaal shuffled off to...
19:59 TimToady bed, probably...
19:59 [particle] quitter!
20:05 pugs_svnbot r18384 | avar++ | [kp6-true] nuked kp6-true, port to the metamodel in progress...
20:05 pugs_svnbot diff: http://dev.pugscode.org/changeset/18384
20:05 weinig joined #perl6
20:05 lambdabot Title: Changeset 18384 - Pugs - Trac
20:08 pugs_svnbot r18385 | avar++ | [kp6-lisp] nuked kp6-true, port to the metamodel in progress...
20:08 pugs_svnbot diff: http://dev.pugscode.org/changeset/18385
20:08 lambdabot Title: Changeset 18385 - Pugs - Trac
20:08 weinig_ joined #perl6
20:08 pugs_svnbot r18386 | avar++ | [kp6-lisp] Removed the kp6-true generic function, can you make generics with argument checks like the new :true stuff?
20:08 pugs_svnbot diff: http://dev.pugscode.org/changeset/18386
20:09 lambdabot Title: Changeset 18386 - Pugs - Trac
20:11 ahmadz joined #perl6
20:11 pugs_svnbot r18387 | avar++ | [kp6-true] nuked kp6-true. Implemented .str, "0" is also false (should
20:11 pugs_svnbot r18387 | avar++ | the string be numified or what?)
20:11 pugs_svnbot r18388 | avar++ | [kp6-true] nuked kp6-true, port to the metamodel in progress...
20:11 pugs_svnbot r18389 | avar++ | [kp6-true] nuked kp6-true, port to the metamodel in progress...
20:11 pugs_svnbot diff: http://dev.pugscode.org/changeset/18389
20:11 lambdabot Title: Changeset 18389 - Pugs - Trac
20:11 ahmadz hi
20:12 avar ahmadz: hi
20:12 pugs_svnbot r18390 | avar++ | [kp6-true] removed kp6-true from the package export *boom*
20:12 pugs_svnbot diff: http://dev.pugscode.org/changeset/18390
20:12 lambdabot Title: Changeset 18390 - Pugs - Trac
20:14 pugs_svnbot r18391 | avar++ | [kp6-lisp] Made a TODO saying this stuff needs to die commented out
20:14 pugs_svnbot r18391 | avar++ | the stuff using kp6-true. Some of this might need to be rewritten.
20:14 pugs_svnbot diff: http://dev.pugscode.org/changeset/18391
20:14 lambdabot Title: Changeset 18391 - Pugs - Trac
20:15 ahmadz avar: i need to write a better p6 syntax highliter, where can i find the lexical grammar in the code?
20:15 avar wat
20:15 avar ^^ comment on acid
20:15 avar ahmadz: lexical grammar?
20:16 ahmadz avar: sorry, i need to find the language's grammar so i could write a faster syntax highliter that does not depend on regexps
20:17 avar how do you plan to use the highlighter? inside some program? stand-alone?
20:18 ahmadz for now im using the syntax highlighter plugin that i wrote for http://code.google.com/p/syntaxhighlighter/
20:18 lambdabot Title: syntaxhighlighter - Google Code
20:18 ahmadz but i need to write a cpan module so i could do at the server-side
20:19 ahmadz so far, Javascript is pretty slow on regexp and has about 10-15 secs of browser-timed execution time
20:19 avar there are some grammars that /parse/ p6 but to syntax highlight you also need info saying where it found the tokens, I don't think any grammar for p6 does that atm
20:20 ahmadz hmmm
20:21 weinig_ joined #perl6
20:22 ahmadz i could start it with simple examples/* and evolve it from there
20:23 ahmadz so what's the status of EmitLisp so far? ;-)
20:23 avar we're rolli'n!
20:24 ahmadz cool
20:24 avar We have a working object model thanks to fax++ which I'm porting stuff to atm
20:24 avar Then we need methods and other objecty-stuff and then we pretty much have everything
20:24 ahmadz and then? ;-)
20:25 avar world domination, duh!
20:32 thoughtpolice joined #perl6
20:45 avar http://u.nix.is/p6-dev.png :)
20:53 fax I'm baffled by that avar
20:53 avar by what?
20:53 fax (make-instance 'kp6-array :value <how can I list go here?>)
20:53 fax in hash-keys
20:54 avar a list?
20:54 pugs_svnbot r18392 | avar++ | [kp6-lisp]
20:54 pugs_svnbot r18392 | avar++ | * slot-value instead of kp6-value (oh, that's another thing being nuked these days)
20:54 pugs_svnbot r18392 | avar++ | * Implemented metamodel versions of .exists, .delete, clear
20:54 pugs_svnbot r18392 | avar++ | * Added some comments explaining the use of #'equal and the functions that are only used internally
20:54 pugs_svnbot diff: http://dev.pugscode.org/changeset/18392
20:54 lambdabot Title: Changeset 18392 - Pugs - Trac
20:55 avar fax: Feel like hacking?:)
20:56 fax yeah
20:57 fax in the screenshot though.. it looks like (kp6-dispatch *hash* :pairs) worked..
20:57 avar it did
20:58 avar it returns an array, see last commit
20:58 avar fax: I have an in-progress patch to array which sucks, but the general bug needs to be fixed
20:58 avar patch -> http://sial.org/pbot/27990
20:58 lambdabot Title: Paste #27990 from Someone at 208.78.101.240
20:59 fax oh what is the bug?
20:59 avar the problem is that lisp arrays don't auto extend, so my @rray; @rray[666] croaks
20:59 avar cat t/kp6/35-undef.t  | perl script/kp6 -lisp | sbcl
20:59 avar Error: The index 666 is too large.
21:00 avar like I said the patch sucks, but the case of an index out of bounds being looked up/assigned to needs to be handled (return undef / extend the array)
21:01 avar fglock commited something for the p5 backend which makes those arrays lazy so @a[10000000000] = doesn't consume ungodly amounts of memory. I think
21:01 avar or do whatever and don't listen to me:)
21:03 fax well see kp6-dispatch ((invocant kp6-Hash) (method (eql :pairs))
21:03 fax which does (make-instance 'kp6-Array :value (let ...))
21:04 fax that let returns a list but kp6-array treats it as an array internally I think
21:05 avar it's just (make-instance 'kp6-Array :value '("some" "values" "here"))
21:05 avar I don't get your point but maybe I'm being terse
21:06 fax It seems like if you called kp6-dispatch :elems on that array, for example.. it will call array-dimension on '("some" "values" "here") and choke
21:07 avar oh we're talking about Array.lisp not Hash.lisp. If you're saying there's something wrong with my Array.lisp code you're almost certainly right
21:08 avar It was written in a mindset where I was having trouble figuring out the functionality of the <= and >= functions:)
21:08 fax ah this explains it
21:09 avar :)
21:09 pasteling "fax" at 137.195.250.2 pasted "hash table make array with list" (20 lines, 747B) at http://sial.org/pbot/27991
21:11 avar hrm
21:11 fax just commited a fix
21:11 pugs_svnbot r18393 | fax++ | [kp6-lisp] small modification to Hash.lisp kp6-dispatch :pairs
21:11 pugs_svnbot diff: http://dev.pugscode.org/changeset/18393
21:11 lambdabot Title: Changeset 18393 - Pugs - Trac
21:12 fax do you think that's ok? another way would be to make-array :initial-contents <the list from before>
21:14 pasteling "fax" at 137.195.250.2 pasted "alternative" (12 lines, 528B) at http://sial.org/pbot/27992
21:17 avar no I think it's better like you commited it, then the kp6-array class takes care of constructing the array from a list
21:18 Notrix joined #perl6
21:20 weinig joined #perl6
21:33 pugs_svnbot r18394 | avar++ | Lit::Hash works again using (kp6-dispatch)
21:33 pugs_svnbot diff: http://dev.pugscode.org/changeset/18394
21:33 lambdabot Title: Changeset 18394 - Pugs - Trac
22:05 justatheory joined #perl6
22:06 DarkWolf84 joined #perl6
22:16 weinig joined #perl6
22:25 Schwern joined #perl6
22:55 weinig_ joined #perl6
22:59 weinig joined #perl6
23:02 cognominal_ joined #perl6
23:02 pugs_svnbot r18395 | avar++ | oh noes tabs
23:02 pugs_svnbot diff: http://dev.pugscode.org/changeset/18395
23:02 lambdabot Title: Changeset 18395 - Pugs - Trac
23:03 fax eek O_o
23:03 fax that was my fault!
23:03 fax I swear I configured my editor to not do that..
23:04 fax anyway sorry, I'll find the cause of that
23:04 avar et tu fax?
23:11 fax (setq-default indent-tabs-mode nil)
23:11 fax :D
23:11 fax somehow that was uncommented
23:23 thoughtpolice joined #perl6
23:35 avar fax: were you hacking array.lisp?
23:35 avar i.e. anything uncommited atm
23:36 fax no
23:44 rrohbeck joined #perl6
23:57 devogon joined #perl6

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

Perl 6 | Reference Documentation | Rakudo