The Return of the Journal : pugs.blogs.com/ | pugscode.org | pugs.kwiki.org | paste: paste.lisp.org/new/perl6 or sial.org/pbot/perl6
Set by GammaRay on 31 December 2005.
theorbtwo What's the syntax for p5evalbot ? 00:00
buu eval: 00:01
theorbtwo eval: local $x=4; $x 00:04
p5evalbot theorbtwo: Return: 4
00:08 evalbot_8551 is now known as evalbot_8552
deoxy This is probably not new but parrot0.4.0-devel pulled directly from svn does not recognize new_pad lines emitted by pugs also pulled directly from svn. Could someone point me to the solution? 01:19
Debolaz [debolaz@leviathan] ~/temp8# pugs -BParrot test.p6 01:41
error:imcc:syntax error, unexpected PREG, expecting '('
in file '/tmp/pugs95422.pir' line 71
This can't be good. :/
svnbot6 r8555 | Darren_Duncan++ | r1752@Darren-Duncans-Computer: darrenduncan | 2006-01-01 21:16:17 -0800 05:18
r8555 | Darren_Duncan++ | /ext/Rosetta-Incubator : finished converting generic string exceptions to specific LKT ones; added 2 messages to SRT/L/en.pm, and a few to LKT/L/en.pm, upgraded both SQL::Routine classes, adding 7 private methods ... this probably still doesn't execute
r8556 | Darren_Duncan++ | r1758@Darren-Duncans-Computer: darrenduncan | 2006-01-01 21:45:51 -0800 05:47
r8556 | Darren_Duncan++ | /ext/Rosetta-Incubator : updated 21 files with copyright statements to read '-2006' rather than '-2005'
r8557 | stevan++ | PIL/Native/Bootstrap.pil 06:36
r8557 | stevan++ | - added ::Pair object, minimal implementation for now
r8557 | stevan++ | - filled in several ::Array methods, including .join
r8557 | stevan++ | t/pil/container/
r8557 | stevan++ | - added this directory for testing containers
r8557 | stevan++ | - basic tests for ::Scalar and ::Hash
r8557 | stevan++ | - ::Array test have decent coverage, but could use
r8557 | stevan++ | some more complex tests
tewk q 06:46
aufrank hello? 07:42
evalbot_8552: say "hello world"; 07:43
07:44 evalbot_8552 is now known as evalbot_8557
aufrank ?eval 2+3; 07:44
evalbot_8557 5
Limbic_Region ?eval 1...; 07:45
evalbot_8557 pugs: out of memory (requested 1048576 bytes)
Limbic_Region heh
aufrank ?eval sub add ($i, $j) { $i + $j} my &add2 = {add( 2, $^x) }; add2(4);
buu That seems .. broken
evalbot_8557 6
buu I guess it's really not
?eval (1...)[9000213123]
aufrank hey, I just curried!
evalbot_8557 pugs: out of memory (requested 1048576 bytes)
buu heh
Ok, why doesn't that one work? 07:46
aufrank feels like a stud, even if it's silly
Limbic_Region ?eval(1...)[3]
evalbot_8557 \4 07:47
buu ?eval (1...)[900000]
Limbic_Region it doesn't work because evalbot has a limit of 1mb of memory per request it looks like
evalbot_8557 pugs: out of memory (requested 1048576 bytes)
buu Limbic_Region: Sure, but why should that require a meg?
Limbic_Region dunno how pugs stores data structures internally but obviously each element in the array is consuming enough space to make X * 900_000 > 1_048_576 07:48
buu Then let me rephrase 07:49
It *should* work!
Limbic_Region why?
buu Because it shouldn't allocate all 899,999 preceding elements
Limbic_Region buu - it has to
buu Why?
Limbic_Region lazy doesn't mean magic
Amnesiac indeed 07:50
Limbic_Region you still have to evaluate every element up to and including the one being requested
buu So why does it need to store them all?
Limbic_Region you asked it to by making it a list with a subscript
if you had done this instead
buu That doesn't answer the question
Limbic_Region ?eval for 1... { last if $_ == 4; } say 4; 07:51
evalbot_8557 pugs: out of memory (requested 1048576 bytes)
Limbic_Region ooh - now that is a problem
that should work
aufrank heh
buu I accept that the current implementation does that, but my contention is that it should not.
Limbic_Region well, my contention is that my last example should work and the former shouldn't
buu Limbic_Region: Why shouldn't the former? 07:52
Limbic_Region well - what if I had said my @foo = 1..4;
are you saying it should act as an iterator 07:53
and only return the last value iterated over?
buu Well, in general I think that's a different case
Limbic_Region again, lazy doesn't mean magic
buu In specific it'd be nice if @x= 1...; worked
anatolyv ?eval for 1... { last }
buu Although there are situations where it wouldn't work
evalbot_8557 pugs: out of memory (requested 1048576 bytes)
Limbic_Region there can certainly be optimizations that would allow you to check context 07:54
buu ?eval my @x = 1...;
evalbot_8557 pugs: out of memory (requested 1048576 bytes)
Limbic_Region and I agree that my @x = 1...; should work too
hmmm
whatever
anatolyv ?eval my $x=(1...)[2];
buu I think the principle I'm reaching for here is "deferred laziness"
evalbot_8557 \3
anatolyv it flattens the list when it enters for? it shouldn't 07:55
buu Apparently it do!
anatolyv ?eval (1...)[400_000] 07:56
evalbot_8557 \400001
anatolyv ?eval (1...)[999_999]
evalbot_8557 pugs: out of memory (requested 1048576 bytes)
anatolyv heh
Limbic_Region ?eval lazy 1...; 07:57
evalbot_8557 Error: cannot cast from VInt 1 to Pugs.AST.Internals.VCode (VCode)
Limbic_Region interesting
does pugs have a lazy keyword?
aufrank ?eval my @x is lazy = 1... 07:58
anatolyv ?eval lazy (1...);
evalbot_8557 pugs: out of memory (requested 1048576 bytes)
aufrank I think it's a trait
is lazy
gaal Limbic_Region: it does, (op1 "lazy") but I'm not sure what's its status; some laziness has been disabled afaik
aufrank ?eval my @x :lazy = (1...)
evalbot_8557 Error: unexpected ":" expecting trait, "=", ".=", ":=", "::=", ";" or end of input
gaal ask nothingmuch if he's around 07:59
Limbic_Region it's 3am here and I am trying to convince my jet lag that sleep is OK now
of course the fact that the computer room is currently freezing probably is making the desire for warmth more overpowering than that for sleep 08:00
aufrank eah, 3 am here too 08:01
buu 2 here 08:02
aufrank were you west or east, Limbic_Region ?
does your body think it's earlier or later than 3? 08:03
aufrank deduces west, earlier
buu Phillipines
Limbic_Region Philippines to east coast 08:04
aufrank that's some kind of time difference, I reckon
Limbic_Region my body isn't sure what to think
aufrank heh
sucks, sorry
Khisanth Limbic_Region: cold environment makes sleeping easier :) 08:05
Juerd Moin 08:08
Limbic_Region Khisanth - not if it is so cold your body is shivering to try and stay warm 08:10
Khisanth Limbic_Region: well the idea is to have a warm blanket as well :)
buu Khisanth: I was wondering if I was the only one who felt that way. 08:12
aufrank how does the p6 case statement look? 08:16
is it given ... when... ?
whoops, apparently I disapeared.
I didn't even notice
sorry-- spotty connection
wolverian aufrank, given $foo { when $bar { ... } } it's in one of the synopses. 08:17
aufrank yeah, S04
I found it right after I asked, as usual
doing tutorials for other languages in perl6 is kinda fun
I guess I'm gonna turn in for the night 08:19
bye all!
svnbot6 r8558 | asavige++ | Rpn Haskell code tightened via GHC (Larry) -Wall switch, plus style improvements, audreyt++ for teaching me 11:12
13:23 xunxin is now known as agentz, agentz is now known as agent
agent Hi,all. i've found precompile_prelude key doesn't work as expected in Config.yml. 13:28
audreyt: recently, when i set the precompile_prelude to "true" in Config.yml, no precompilation happened. But to my surprise, when i commented the whole line out, precompilation worked beautifully.
another issue on Win32 was "nmake" broke on "cd .." but both "nmake optimised" and "nmake unoptimised" worked. I'm not quite sure if they've been fixed in these days. 13:30
i may have a try tomorrow.
gaal agent: did you remake the Makefile after you edited config.yml? 13:42
agent sure
in my memory, precompile_prelude is set to "true" by default. 13:43
gaal do you still have the shell history for that build? it dumps configuration before the compilation.
agent: I think you're right.
agent :=)
someone else has mentioned this issue here a few days on ago 13:44
but autreyt was busy discussing some other issues like PILN or Rules support at that moment. 13:46
gaal agent: I'm not on native win32 any more so I'm afraid I can't help much with nmake 13:55
stevan audreyt: what do you think about some kind of use/include functionality for PIL^N? Recompiling Bootstrap.pil all the time is kind of a pain, and I think it would be better from a maintainence point of view to be able to include seperate files 15:19
gaal stevan: do you need symbol export stuff there?
stevan gaal: probably not
gaal urp, do you have namespaces at all, or is evreything classy lexical there anyway? 15:20
stevan it is mostly that Bootstrap.pil is getting quite large with all the container types
gaal: no namespaces, everything is lexical
gaal sounds easy to do then
stevan actually there are no real lexical variables even
$foo := 3 is desugared to -> $foo { }`(3) 15:21
gaal (without knowing much about piln. Hmm, I hereby dub it "pilsner".)
if pugs had named releases versions should be named after beers. 15:22
stevan :)
gaal "have you tried out pugs leffe? strong stuff!"
stevan Pugs 6.28.0 - The King of Beers 15:23
audreyt rehi! 17:11
obra reaudrey!
Debolaz Yes.. rehi to you too.
Alias_ hi
Question: How long does a single ... -> make test take for pugs 17:12
ballpark
audreyt 30min? 17:14
Alias_ ouch 17:15
ok, so I need some sort of more configurable timeout then 17:16
Debolaz audreyt: Pugs didn't like using parrot as backend. :/
audreyt Debolaz: pugs.blogs.com/pugs/2005/12/release_plans.html 17:17
"The current plan is to push out 6.2.11 on early January following Parrot 0.4.1's release. 0.4.0's introduction of new lexical pads broke our Parrot compilation backend (that is a good thing -- I called for obliteration of the old lexical pads)." 17:18
I think I'd like to try out PIR targetting for PILN. 17:24
stevan: so, Pair ends up mutable... are you doing something with ::Pair yet? 17:25
stevan: re inclusion of bootstrap... I think it's best to split into multiple .pil files, but we'd still need to let "make pil" link them in statically, no? 17:36
avar audreyt: you're not obeying the GFDL on your blog;) 17:37
audreyt avar: how so? 17:38
did I include some GFDL work?
(can't think of any)
avar you copied the wp page verbatim without follwing all the annoying little GFDL clauses;)
obra "wp"? 17:39
avar pugs.blogs.com/about.html
obra oh. wikipedia
audreyt point. fixing.
avar copying wp stuff is actually hell for small texts 17:40
you have to include the GFDL verbatim (can't just link to it), as well as other stuff
avar hates the GFDL 17:41
audreyt hm, not so 17:43
wikipedia explicitly says a boilerplace notice is okay
en.wikipedia.org/wiki/Wikipedia:Cop...bligations
I've added the notice. thanks for the reminder! 17:44
avar mm, they're wrong 17:45
I think
Debolaz audreyt: Ah, that enlightens things. :) 17:48
Hmm.. I actually read that, just didn't remember it.
avar it's *totally* wrong
"You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies" 17:49
anatolyv well then... edit the wikipedia page? :) 17:50
en.wikipedia.org/wiki/Wikipedia:Verbatim_copying says you can link to a local copy of the GFDL instead of copying it. 17:52
avar yeah, because then you're including it in your publication
anatolyv I think it makes sense because after all GFDL is not inclduded on every Wikipedia page, it's linked to.
avar but you can't for example distribute a flyer to turists with info on country $x and just say "this article is under the GFDL 1.2 [link], from [link]" 17:53
that's one of the big problems with the GFDL, it's a PITA for distributing/copying small works
anatolyv right, because then it's not "reproduced". that's quite inane though, isn't it? 17:54
Alias_ yay PITA!
avar well depending on how you look at it
first of all, it wasn't designed for that at all, it's a documentation license, and documentation tends to be long, so distributing a 2.5 page license in your 500 page documentation isn't going to be a problem 17:55
the real problem is people using it for things they shouldn't be using it for;)
anatolyv :)
Alias_ avar: I hijacked the acronym for something cooler
:) 17:56
avar It's not at all as "portable" for free works as as the GPL is for free software, it's designed for a very specific application
anatolyv Alias_: I like pita as in food :) 17:57
Alias_ me too
Im happy with it as a project name
anatolyv Ah, that explains it then!
avar uses the DWTFYWWI license for everything now;) 17:58
anatolyv avar: too late now to relicense anything :)
Alias_ Using it is to constantly remind me that it's replacing a manual way that was a PITA, so if my PITA is a PITA, there's no point
anatolyv as far as Wikipedia goes.
avar anatolyv: true
anatolyv: the only thing that can be done is the FSF releasing 1.3 that doesn't suck as much
anatolyv likes avar's license :)
avar anatolyv: it rocks;) 17:59
oo, I'm on google 18:00
anatolyv avar: that's... quite unique of you :)
avar: ah, the license is! Cool. 18:01
avar tools.wikimedia.de/~avar/COPYING 18:02
anatolyv butbut... don't you need the LDWTFYWWI as well? 18:04
avar L being?
anatolyv well, Lesser, or Library... or in your case, maybe Liberally? 18:05
avar the DWTFYWWI allows linking;)
gaal hola 18:22
anatolyv hey gaal
gaal yo toly-san 18:23
18:57 ilogger2 joined 18:58 ilogger2 joined 19:00 orafu joined 19:18 r0nny joined, DesreveR joined
nothingmuch given N numbers, what's the funkiest way of finding the median? 19:20
audreyt stevan: I'll refactor things into src/PIL/Native/Bootstrap/*.pil. 19:21
commit in a minute.
nothingmuch: keep doing rand()
rand(MINNUM .. MAXNUM) 19:22
nothingmuch audreyt: i need to be hellalllllllllllllaaaa fast
audreyt and test whether if it's median
oh, fast.
nothingmuch is benchmarking event pickup code
where mutexes are too slow
err scrap that
thread local storage is too slow
nothingmuch is using a shizznit trick to hash the stack
void func (int param) {
hash[ (char)( (size_t)&param >> 19 ) ]; 19:23
audreyt just use quicksort algorithm
nothingmuch that's almost unique per thread
audreyt Select a random element in the data set as a pivot, and use it to partition the data into sets of elements less than and greater than the pivot. From the sizes of these sets, we know the position of the pivot in the total order, and hence whether the median lies to the left or right of the pivot. Now we recur on the appropriate subset until it converges on the median.
nothingmuch now i need to find a fun algorithm to implement a worker-boss layout
hehe, i'm implementing quicksort
and I want a probably good median for chunks over 10000 elements 19:24
nothingmuch would like even sized chunks later on
but merge sort just isn't as cool
although.... hmm
you know what, i'll do an in place merge sort 19:25
that's fun
audreyt stevan: feel free to move .pil files freely or create a Container subdir etc... improvise, now we have #include ;) 19:29
19:32 dduncan joined 19:42 aufrank joined
aufrank is asavige in the channel? 19:43
svnbot6 r8559 | audreyt++ | * util/file_to_hs.pl: support #include in source files. 19:45
r8559 | audreyt++ | * Factor PIL.Native.Bootstrap PIL code into multiple sub .pil files.
19:47 raptorXXX joined
audreyt aufrank: he was earlier, but I don't think he had mastered the art of screen(1) yet 19:47
aufrank heh
raptorXXX hi...
audreyt stevan: journal up -- see if it makes sense to you :)
now I need to sleep. see you tomorrow *wave*
aufrank I just got used to using given/when, and he's got a bunch of if/elsif/else in his rpn code
wanted to suggest how he could make it sexier :) 19:48
audreyt ahh... probably just commmit a fix ;)
aufrank is that fair game?
audreyt yes in the pugs tree.
if you'd like to be polite, drop him a note.
aufrank ooh, commit #1 coming up :)
raptorXXX i made a simple diagram of perl6-to->parrot compilation..but have no place where to host it... does somebody know to whom i can send this page so that it can host it on some perl6/parrot related site ? thanx 19:49
audreyt woot
aufrank: ajsavige at yahoo com au
aufrank danke
audreyt raptorXXX: sure... do you have it online somewhere currently?
raptorXXX no i dont have it online.. 19:50
audreyt raptorXXX: you can send it to me. autrijus at gmail dot com
raptorXXX ok..wait a sec..
it is on the way 19:52
audreyt k
raptorXXX :) thnx
audreyt np :)
19:53 kakos` joined
ako is now known as kakos` 19:54
audreyt it's in HTML? cool!
raptorXXX yep :)
i hope it is correct 19:55
19:55 kakos joined
aufrank which is better coding style: 19:55
when 'x' { bla() } 19:56
or when 'x' { bla(); }
audreyt raptorXXX: I think it is correct for the compiler_tools.pod's purpose
aufrank ?
wolverian bla when 'x'; # :)
raptorXXX ok
audreyt raptorXXX: I'm pursuing a closely related, though not parrot-based (until the PASM/PBC stage), route 19:57
that uses Perl 6 objects instead of Parrot objects for the upper layers
PerlJam aufrank: Are you asking about a single semicolon?
audreyt but the layers and flow stays the same.
aufrank yes
wolverian: is that { bla() } when x;
raptorXXX it is easy changable... i can modify it...only if i know what to modify :)
audreyt raptorXXX: if you apply for a feather account, you can host it in your ~/public_html/ 19:58
raptorXXX feather account ?
wolverian aufrank, I don't know if they are the same.
?eval given 2 { say "hi" when 2 }
evalbot_8559 Error: unexpected "{" expecting operator, ":", ",", term postfix, postfix conditional, postfix loop, postfix iteration, ";" or end of input
wolverian oh, well. :)
raptorXXX audreyt: what is feather account ? 19:59
aufrank ?eval given 2 { say "hi" when {2} }
evalbot_8559 Error: unexpected "{" expecting operator, ":", ",", term postfix, postfix conditional, postfix loop, postfix iteration, ";" or end of input
aufrank ?eval given 2 { {say "hi"} when 2}
evalbot_8559 Error: unexpected "{" expecting operator, ":", ",", term postfix, postfix conditional, postfix loop, postfix iteration, ";" or end of input
aufrank ?eval given 2{ when 2 {say "hi"} }
evalbot_8559 Error: No such method in class Any: "&given" 20:00
audreyt raptorXXX: www.mail-archive.com/perl6-language...20060.html
raptorXXX checking... tnx
audreyt np... I've temporarily hosted it at 20:02
svnbot6 r8560 | audreyt++ | * add a link to the feather announcement.
audreyt perlcabal.org/~autrijus/perl6-to-pa...a-tge.html
raptorXXX how i can contact Juerd for account ?
audreyt the URL won't become invalid 20:03
but we may want to find a better home of it afterwards
but I need to sleep now
Juerd is on this channel
so you can /msg him
(if you have registerd your freenode nick)
or drop him a mail
raptorXXX aha
audreyt (which is likely to be more reliable)
with your real name and desired login etc 20:04
stevan audreyt: hey :)
raptorXXX oki..tnx
stevan #include works great :)
audreyt his email is juerd at convolution nl
stevan and your journal makes sense
aufrank whoops, now audreyt can't sleep, stevan showed up
audreyt woot, then I can rest in peace for tonight
it's 4am already
horribly late :)
or early
aufrank yargh 20:05
gnight!
stevan audreyt: go to sleep,.. I will have stuff for you in the morning :)
audreyt waves &
wunderbar
stevan night
audreyt &
20:07 DaGo joined 20:24 raptorXXX left
svnbot6 r8561 | aufrank++ | Changed ajsavige's rpn code to use given/when. Added myself to AUTHORS. 20:32
20:33 _SamB_ joined
am is now known as _SamB_ 20:35
20:38 mjl69_ joined 21:08 kanru2 joined
svnbot6 r8562 | asavige++ | minor adjustments to make unit tests pass, aufrank++ for improving p6 code 21:15
21:19 nnunley joined
aufrank anyone want to talk over multi dimensional methods on arrays? 21:21
it's missing in quickref/data 21:22
stevan do you mean methods on multi-dimensional arrays?
aufrank heh, yeah, those too ;)
nnunley Cool.
stevan I imagine they would not be any different from normal, just that they are filled with arrays 21:23
aufrank there are some possible specific ones
nnunley Would be a good idea to look at the ops offered in things like Octave/Matlab.
And PDL.
aufrank matlab, for example, offers a squeeze() function
nnunley Does that de-sparsify an array? 21:24
stevan aufrank: there is some PDL stuff in one of the AES, I dont recall which one though
aufrank collapses a singleton dimension and returns an array of one less dimension
yah, I read it
I just figured since you guys are working off of quickref/data, and it says these are missing there, maybe there was something to talk about 21:25
stevan aufrank: quickref/data was just something simple to start with
however, having this all compiled in some spot is a good thing :) 21:26
aufrank indeed :)
stevan I think actually S29 has more complete/official info
but it is also (IIRC) suffereing from neglect
gaal is hyperop traversal finalized? 21:27
[[1,2], [3,4]] >> that is
aufrank stevan: is there going to be a mutable/immutable distinction on scalars like in scala?
stevan aufrank: possibly, I am reading over the Scala docs now, but that is just for PIL^N right now 21:28
aufrank s/scalars/containers/
21:29 Odin-LAP joined
stevan aufrank: I think Tuple's are basically immutable since they evaled at compile time 21:30
and the List interface (as described in S29) looks to be fairly immutable
but I am not sure what @Larry's position on this is 21:31
aufrank hadn't seen S29... good stuff 21:39
stevan aufrank: yes it is very helpful
21:41 oylenshpeegul joined 21:56 justatheory joined
svnbot6 r8563 | stevan++ | PIL/Native/Bootstrap/* 22:06
r8563 | stevan++ | - broke out the different containers into src/PIL/Native/Bootstrap/Container/*
r8563 | stevan++ | - added proper name/version/authority to all the container classes and roles
r8563 | stevan++ | - added tests for this info
r8563 | stevan++ | - added stubs for a number of methods listed in S29 for ::Hash and ::Array
r8563 | stevan++ | PIL/Native/Bootstrap/Container/Array.pil
r8563 | stevan++ | - ::Array.grep has been cleaned up so it no longer rely's on mutable features
r8563 | stevan++ | - ::Array.join now properly converts items using `as_str()
r8563 | stevan++ | PIL/Native/Bootstrap/Container/Pair.pil
r8563 | stevan++ | - ::Pair.kv now correctly returns a 2 element ::Array instead of a ::Pair (S29++)
r8563 | stevan++ | - ::Pair.new now accepts k & v for the $!key and $!value attributes respectively
22:07 petdance joined 22:13 amv joined 22:31 oylenshpeegul left 22:38 Amnesiac joined 23:00 knewt joined 23:07 frodo72 joined 23:10 Debolaz joined 23:19 frodo72 joined
Juerd audreyt: Thanks for letting raptorXXX know how to contact me 23:24
audreyt: I only accept feather requests by mail, though - with only very specific exceptions
audreyt: By the way - I love your new journal. The frequency, design and the continued writeup quality.
23:30 lisppaste3 joined
Debolaz I get the feeling that when I manage to fix something, I break something else. 23:48
Amnesiac same Debolaz as Efnet? 23:50
s/as/from/ 23:51