»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:00 PacoLinux left 00:03 cooper left, cooper joined 00:05 silug left, PacoLinux joined, silug joined 00:07 lumi_ left 00:17 lumi joined 00:20 Moukeddar joined 00:25 thou left 00:35 Moukeddar left 00:36 Moukeddar joined 00:42 nymacro joined 00:55 silug left, silug joined 00:57 fhelmberger joined 01:00 jfried left 01:01 noganex left 01:06 noganex joined 01:09 aindilis joined 01:11 lumi left 01:12 lumi joined 01:22 silug left 01:23 silug joined 01:28 molaf_ left 01:39 yinyin joined 01:45 silug left 01:47 Moukeddar left 02:04 silent_h_ joined 02:07 ethan joined
ethan is moritz around? or anybody who has setup ilbot before 02:08
02:10 donri left 02:14 tokuhirom joined 02:34 ymasory left, ymasory joined 02:39 silent_h_ left 02:41 dayangkun left 02:43 dukeleto left, dukeleto joined 02:55 woosley joined 03:00 agentzh joined 03:21 hudnix left, cooper left 03:46 Eevee left 03:48 jaldhar_ left, Eevee joined 04:00 jaldhar joined 04:08 Eevee left 04:09 satyavvd joined 04:10 Eevee joined 04:14 satyavvd left 04:15 Zapelius joined, jaldhar left 04:19 woosley left 04:20 ymasory left, satyavvd joined 04:27 jaldhar joined 04:30 jaldhar left 04:31 jaldhar joined 04:32 ymasory joined 04:34 silug joined 04:35 jaldhar left 04:36 jaldhar joined 04:43 silug left, silug joined 04:44 jaldhar left, jaldhar joined 04:53 thou joined 04:55 satyavvd left 04:56 satyavvd joined, satyavvd left 04:57 satyavvd joined 04:58 woosley joined 05:01 birdwindupbird joined 05:09 ymasory left 05:11 silug left 05:18 jaldhar left 05:20 jaldhar joined 05:21 ymasory joined 05:23 wamba joined 05:45 koban` joined 05:46 ymasory left 05:52 dayangkun joined 05:58 molaf joined 05:59 wamba left 06:01 wtw joined 06:20 daxim joined
dalek ecza: 5c3490f | sorear++ | / (9 files):
Move assign process, including LISTSTORE, off CPS
06:24
06:26 envi joined 06:27 envi left, envi_laptop joined 06:29 am0c joined 06:39 rhr left 06:40 yahooooo left 06:44 yahooooo joined 06:46 amkrankruleuen left 06:56 rhr joined 07:03 Mowah joined, amkrankruleuen joined, jfried joined
daxim www.reddit.com/r/programming/commen...ogramming/ # I'm currently at the part of the comments where someone makes a ridiculous font recommendation 07:07
07:07 envi_laptop left
sorear wonders if there's a statistically nicer way to get microbenchmark data then "loop 1M times, divide by 1M" 07:12
like maybe run 100 loops of 10k times, then regressively fit the resulting times to a normal distribution and report the mean 07:15
wonder if that would work better.
sometime after v6 I'll port Benchmark to niecza 07:17
tadzik sorear: how about making up Time::HiRes and making Benchmark portable? 07:18
sorear maybe. 07:20
but I get in a very NIHy mood when I see Perl 6 code that obviously wasn't written to take advantage of Niecza's more efficient primitives: )
07:23 icwiener joined
sorear decides that real-time benchmarking is stupid and looks to add some kind of clock() to Niecza 07:24
07:27 Shozan joined
moritz ethan: I'm around now 07:34
moritz back after a long weekedn with itnernets 07:36
07:36 mj41 joined
moritz for some reason the DSL splitter decided to say goodbye (at least that's my first diagnose) 07:38
yath moritz: just put your dsl modem directly to the phone line 07:44
moritz: it has a high-pass filter anyway
moritz yath: but then I can't connect the phone
yath: and the plugs are incompatible 07:45
yath moritz: man soldering iron :)
07:45 jfried left
yath NTBAs have low-pass filters too, for that matter. 07:45
07:46 jfried joined 07:50 amkrankruleuen left 07:51 amkrankruleuen joined 08:08 ethan left 08:12 silug joined 08:23 amkrankruleuen left 08:24 cognominal_ left, amkrankruleuen joined
dalek ecza: f7b5a9c | sorear++ | lib/ (2 files):
Add &times
08:26
ecza: 94d21c4 | sorear++ | perf/std-20110528.pl6:
Use user time in benchmark script
08:29 tzhs joined 08:30 bacek joined 08:41 dayangkun left 08:45 am0c left 08:53 jaldhar left 08:54 dayangkun joined, jaldhar joined 08:58 am0c joined 08:59 silug left 09:03 thou left 09:04 cognominal joined 09:31 Trashlord joined 09:33 woosley left
dalek ecza: 0571dfc | sorear++ | lib/ (3 files):
Rewrite List.{pop,push,shift,unshift} at the C# level
09:34
ecza: 2825023 | sorear++ | / (3 files):
push/pop/shift/unshift get inlined
ecza: c49e30c | sorear++ | / (3 files):
Make bitops inlinable
09:35 Mowah_ joined 09:38 amkrankruleuen left 09:39 amkrankruleuen joined 09:42 TBA2 left 09:43 TBA joined 09:50 MayDaniel joined 09:52 buubot_backup left 09:53 bacek left 09:54 amkrankruleuen left 09:55 amkrankruleuen joined 10:05 bacek joined 10:08 MayDaniel left 10:09 amkrankruleuen left 10:11 amkrankruleuen joined 10:17 dayangkun_ joined 10:20 dayangkun left 10:26 envi_laptop joined 10:28 bacek left 10:30 molaf left, amkrankruleuen left 10:45 amkrankruleuen joined 10:59 pernatiy joined 11:05 whiteknight joined 11:10 cognominal_ joined 11:12 ab5tract joined 11:13 cognominal left 11:17 zamolxes joined 11:37 satyavvd left 11:39 buubot_backup joined, amkrankruleuen left 11:42 wamba joined 11:43 amkrankruleuen joined
jnthn good afternoon, #perl6 11:56
11:56 ethan_ joined 11:57 silug joined
takadonet morning all 11:58
pmichaud jnthn: o/ 12:01
12:01 wamba left
jnthn o/ pmichaud 12:04
pmichaud: How's things? Any exciting happenings in my last few days away? :)
pmichaud I've been working on list and other improvements
What's the plan or strategy for bringing nom to life? (more) 12:05
I'm a little concerned that if we try to rip+patch the existing actions code, we'll be fighting a lot of cruft with lots of outdated assumptions
12:06 hanekomu joined
jnthn I'm reviewing quite a lot of the actions as I go. 12:06
I don't want to toss it and start again.
There's a lot of good knowledge encoded in the current ones that I'd hate to lose. 12:07
pmichaud there's a lot of ugliness there too, though. However, I'm going to let this one be your call, so we'll go with fixing the existing stuff.
jnthn Also I'm trying to keep the scope of the current branch relatively limited, to the degree that a do-over of meta-model, packages handling, multi-dispatch and literals can be limited. :) 12:08
pmichaud I don't quite understand that
jnthn A lot of ugliness has been in symbol installation, which is decidedly les ugly now.
pmichaud: I don't want this to drag on for months on end. 12:09
pmichaud I agree with that, fully.
I don't understand "scope of current branch relatively limited"
do you expect to merge with master again at some point?
jnthn I didn't form an expectation yet, but I am trying to keep that as a possibility.
Or at least track changes in master best I can so we don't have to re-do stuff. 12:10
If I had to guess though, I suspect we'll take a similar approach as we did with ng.
nom becomes master, master becomes beta, or something. :)
pmichaud well, with ng we "started over"
jnthn Yeah. I've tried to avoid "starting over" this time. :) 12:11
Apart from the bits that I intended to start over with.
pmichaud I'm worried it's going to be really hard to track master
jnthn When the cost of doing so comes to exceed the benefits of doing so, it's easy to stop.
pmichaud ...easy to stop? 12:12
meaning, we merge with master at that point even if everything breaks?
jnthn No, I mean if trying to bring changes being done in master into nom - which I've done to some extent so far - becomes too hard, we needn't keep doing so. 12:13
Or at least, not in the "merge master into nom" sense.
Guess some could be cherrypicked.
Really, I think we should wait a little bit and see. 12:14
pmichaud okay
I'm guessing I don't want to have to redevelop the fixes I'm working on
jnthn OK, which bits are you working on? Lists?
pmichaud nom isn't far enough along where I can make them there, and I don't want to put them in master just to have to redevelop them again later
afk for 5 mins 12:15
jnthn k
pmichaud back 12:18
working on Lists, but also working on fixing some of the calling/return value bits
for example, I worked on fixing the 'take' bug yesterday
jnthn ah, nice
pmichaud (almost have it fixed entirely, but there's a trans.t bug somewhere that stops me from completing the fix) 12:19
jnthn I wanted to ask you a bit aobut lists.
At the moment I think we still rely there - probably more than anywhere else - on dropping Perl 6 methods into e.g. RPA.
Of note, iirc, Parcel was a "subclass" of the RPA PMC. 12:20
pmichaud that's more out of performance than any particular design choice 12:21
jnthn There's no PMC inheritance in 6model, and we should probably not re-create a mechanism to pollute Parrot namespaces.
pmichaud what does 6model use for basic arrays?
jnthn Well, we have some choices here. 12:22
6model can do two things with parrot v-tables
1) Allow an override of them, which is a HLL method.
2) Delegate to the same v-table method on a particular attribute.
With (2) you basically get equivalent - well, better - performance as you did with PMC inheritance before. 12:23
The other thing we could do - and will need to at some point - is to have a custom representation, which we use for lists.
We'll need that to do things like packed arrays.
But there's no need to do that refactor now.
pmichaud we need to avoid vtables as much as we can, I think.
jnthn Well, the alternative is our own array storage representation and some ops to work with doing stuff with that repr. 12:24
That's the nqpclr approach.
pmichaud did you see whiteknight++'s article on the cost of vtables?
jnthn think so...let's check we're talking about the same one... 12:25
whiteknight whiteknight.github.com/2011/05/10/t...rides.html
pmichaud yes, that one
jnthn whiteknight.github.com/2011/05/10/t...rides.html
Yeah, Parrot's vtable override handling is insanely slow. 12:26
pmichaud I profiled rakudo to see how much we're hitting the vtable interface -- turns out it's much less than I had expected, at least for the benchmarks I ran
jnthn 6model is way smarter.
pmichaud whiteknight: you might also be interested to know that I switched Rakudo to have its own qsort (hand-coded PIR) instead of using the builtin sort, and there was almost no performance increase
jnthn It makes a PMC** which maps to the vtable slots (yes, C-level array) and looking up a v-table override is a pointer follow.
whiteknight pmichaud: oh, that's disappointing. was there a performance decrease? 12:27
jnthn The meta-object is responsible for making a flattend hash which 6model then turns into this efficient lookup.
12:28 noganex left
jnthn 6model also manually contructs the CallContext. 12:28
pmichaud whiteknight: slight increase in performance
jnthn (yes, using the v-table API, nothing nasty)
pmichaud back in 2 12:29
jnthn Anyway, do profile, but the cost of using v-table overrides with 6model is likely to be vastly lower than the cost with Parrot's Class/Object implementation.
whiteknight pmichaud: okay, that's better than nothing. I've been doing some benchmarks where I've been seeing pretty consistent improvements
on the order of 20-40%, depending on the shape of the input array
the higher end of that range was with a hybrid qsort+insertion sort I put together
pmichaud jnthn: so, back to nom and Parcel 12:30
12:30 silug left
pmichaud Parcel wants to be a very simple list of elements 12:30
it probably doesn't want to be a List, as that's a high-level construct 12:31
jnthn pmichaud: At the moment, Parcel isa RPA? 12:32
pmichaud at the moment, yes
doesn't have to be... but having it as an RPA was convenient because that's also what :slurpy args become
jnthn If Parcel has-a RPA and delegation is as cheap as inheritance, is that a good enough way forward for now?
oh. 12:33
12:33 noganex joined
jnthn We'd need a cheap way to go RPA => Parcel,then? 12:33
pmichaud don't know
maybe
this is partially what I mean about a lot of assumptions get thrown out
jnthn :)
pmichaud how many times are we going to be using :slurpy, for example?
I'm expecting "not very much"
jnthn :slurpy as in, at PIR level? 12:34
pmichaud right
jnthn Near enough not at all. :)
pmichaud exactly
12:34 agentzh left
jnthn There shouldn't really be any PIR (other than Q:PIR and pir::foo) left after nom. 12:34
pmichaud so, if we don't have a lot of :slurpy, we don't have a lot of need for RPA => Parcel 12:35
jnthn Right.
pmichaud but it also means a complete rewrite of the List code
jnthn Really, *@foo is the place we'll need to do the construction of slurpy and that's down in the binder.
What bit causes the complete re-write? 12:36
pmichaud List depends on RPA also
in a has-a sense
jnthn Depends on having something with the external interface of an RPA?
pmichaud capabilities more than interface
jnthn What capabilities, specifically?
as in, push, pop, indexing... 12:37
pmichaud the ability to maintain has-a arrays that can grow and shrink, mostly
jnthn Does List has-a RPA(s) today? 12:38
pmichaud yes
jnthn Or has-a Parcel today?
OK.
pmichaud has-a RPA
(which can also be a Parcel)
(since Parcel isa RPA)
but mostly List just has-a RPA
jnthn We could still do that.
pmichaud In some sense I'd rather get rid of that
might not be possible at present, though 12:39
jnthn Maybe best to try not to do anything too drastic with lists in nom.
pmichaud which brings me back to my earlier question, then :) 12:40
because it means, well, I'm kinda blocked.
jnthn Blocked because you don't want to have to re-do work in nom?
pmichaud working on lists in master isn't really helpful 12:41
(more)
one thing I've discovered in all of this is that the underlying list and container model has huge ramifications for the entire code base (more)
having done it at least three or four times now
I'd like to think that we have the list api pretty close to right, and we probably do 12:42
jnthn Yes, it feels like people complain relatively little about the semantics of Rakudo's list implementation.
Especially compared to previous APIs. :) 12:43
pmichaud but since nom has some pretty different underlying assumptions, especially with respect to attribute handling and efficiency of calls, I'm not sure that the existing List code is at all appropriate
jnthn OK.
I'm not unwilling to have us do a container and list re-work in nom.
pmichaud I guess my question is partially -- how/when will we know if nom can work with the existing List implementation? 12:44
(and Parcel)
12:44 bacek joined
pmichaud is it likely to work soon, or will nom be blocked until that gets redone? 12:44
where "redone" can mean either "rewritten" or "patched to work in nom" 12:45
jnthn Well, we'll need list handling pretty early on. 12:46
So I wasn't planning on it being left until much further down the line.
pmichaud right
I'm worried we may get caught in a deadlock (more)
jnthn My next two items are putting back primitives - literals and multi-dispatch.
12:47 donri joined, hudnix joined
pmichaud because the current literals code (which also needs some substantial reworking) depends a bit on lists 12:48
might not be that much, though
jnthn I was mostly just going to put back Int and Str just to get a start on it
And then put multi-dispatch back
12:48 arnsholt_ is now known as arnsholt
jnthn And then it's a bit easier for folks to jump in. 12:48
pmichaud ...as long as they don't need parcels or lists :) 12:49
jnthn Right.
pmichaud I think nom may block there.
jnthn OK.
So you're thinking parcels and lists need a priority bump, or?
pmichaud well, even parcels and lists need multidispatch and literals first 12:50
jnthn Yes, that was my feeling too :)
The other question is what we want to do about containers generally.
pmichaud I'm trying to get a sense of when it makes sense to start hacking on nom
(more) 12:51
12:51 dayangkun_ left
pmichaud much of the overall Actions.pm code from master is somewhat hard to follow at the moment. I'm hoping a bunch of it gets ripped out. 12:51
or at least drastically simplified
maybe that's a false hope, or you're thinking it doesn't change that much? 12:52
jnthn nom has more of a three-way split than the two-way one in master. 12:53
grammar, actions, symbol table
Also, it doesn't maintain compile-time notions of packages and signatures.
Instead, those are unified with the runtime ones.
IMHO, new nqp has less cruft in actions related to OO stuff. 12:54
pmichaud as it should :-)
jnthn So far nom feels nicer too.
$*ST.pkg_add_method($*PACKAGE, 'add_method', $name, $code_obj); # how adding a method looks in the actions, for example. 12:55
pmichaud $*PACKAGE ?
for a method?
jnthn The current meta-object.
pmichaud ah
jnthn Well, it could be a role, or a grammar.
Every package declarator type populates $*PACKAGE. 12:56
pmichaud okay
jnthn Looks up in %*HOW to find the correct type of meta-object.
So it's extensible. :)
pmichaud I understand the reasoning now... the name still is jarring
if only because it's likely to confuse other p5 folks :) 12:57
jnthn oh, I mis-spoke
The current *type object*. :)
pmichaud right
the name is jarring :)
jnthn $*PACKAGE.HOW is the current meta-object :)
Well, I didn't have a better word to hand that covers package/module/role/class/grammar etc :)
(yes, there's a $*PACKAGE for package too, but it doesn't know how to do...well...anything much more than have a name...) 12:58
12:58 Moukeddar joined
jnthn "can be have a method" is just a .can check on $*PACKAGE.HOW 12:59
Anyway, no objections to name improvements. I just don't have a better one off hand.
And also it maps to the runtime notion of $?PACKAGE quite neatly.
pmichaud no problem, $*PACKAGE can work for now 13:00
jnthn Oh, another fun circularity is gonna be Bool... :|
pmichaud okay, let's see if I can summarize a bit 13:01
jnthn If I can throw in some timeline guesses first...
My week is going to be pretty good for Rakudo hacking. 13:02
I expect to have basic work on literals and multi-dispatch handled by end of Wednesday.
At that point container and listy stuff are kinda next on the roadmap. 13:03
pmichaud My week is also looking very good for Rakudo hacking 13:04
it will either be very good or Very Bad.
I think that anything I might do with Lists and call/return stuff in master is unlikely to merge to nom 13:05
indeed, anything "substantial" I work on in master would feel very unlikely to merge to nom
(under the theory that a lot of the non-substantial stuff has been taken care of already in master :-)
so, I'm eager to push nom along however I can best help 13:06
I can work on literals... but there's not much that one can do with literals until, e.g., 'say' works.
jnthn I was pondering just adding a dummy say until we get IO back in place.
pmichaud that'd be fine... I'm not sure what the dummy say should look like 13:07
but even then things don't really work until we have Str
jnthn sub say($x) { pir::say($x) } # very dumb-y :)
pmichaud er, .Str
jnthn Oh heh, but...yeah :)
Hm :)
OK, let me try and get Str and Int back and try and put some kinda dummy say in place. 13:08
pmichaud and fixing .Str/.Stringy is another thing that needs to be done, too
jnthn Ah, yes...that also.
pmichaud because those are wrong in master
jnthn Yeah
say actually wants .Str though, iircy.
*iirc.
moritz rakudo: say Buf ~~ Stringy
pmichaud and .Str is supposed to be in terms of .Stringy
p6eval rakudo 048573: OUTPUT«Bool::True␤»
jnthn Whereas e.g. prefix:<~> wants .Stringy
pmichaud or maybe I have those backwards... I'd have to review 13:09
regardless, the current vtable interface is wrong/backwards there
jnthn pmichaud: *nod*
moritz agreed
Int.Str should *not* go through a vtable
in fact any type coercions within Perl 6 should avoid the vtables
jnthn moritz: +1
vtables are just for the outside world.
pmichaud agreed fully
moritz vtables should only be... right. HLL interop, nothing more 13:10
pmichaud we do have a problem there, though, that vtables are for our inside world as well, whether we like it or not
$I0 = $P0 # vtable
if $P0 goto label # vtable
$S0 = $P0 # vtable
jnthn Sadly, $I0 = $P0 and $S0 = $P0 are ambiguous in intent. 13:11
pmichaud pir::add__NNN($P0, $P1) # vtable
jnthn We probably want to say that those vtables are for coercion, not unboxing.
13:12 daniel-s joined
pmichaud right now we don't pay a performance penalty on vtables there because our Int/Num/Str/etc objects are isa-Integer, isa-Float, isa-String 13:12
what happens in the 6model version?
jnthn pmichaud: A REPR may know how to box/unbox natives. 13:13
pmichaud jnthn: but does it do it using a PIR sub or in C?
jnthn The REPR itself is written in C. REPRs are our "glue" to the VM, whatever the VM may be. 13:14
(e.g. so the REPR is written in C# for nqpclr)
e/s.g.//
gah :)
pmichaud okay. I guess I need to see what Int looks like in nom.
jnthn class Int { has int $!value is box_target; } # for now, until we get a repr that can handle bigint. 13:15
Note that there's a (already resolved) circularity there since int ~~ Int. :)
pmichaud assuming that $P0 is an Int, how does $I0 = $P0 get resolved?
jnthn Depends 13:16
(more)
13:16 daniel-s left
jnthn If you mean "take the thingy on the right and get a native integer somehow" then you'd do $I0 = $P0, which would call the v-table override which would presumably be also Mu.int. 13:16
If you already did a multi-dispatch and you know you have an Int, then it's pir::repr_unbox_int__IP($P0) 13:17
Which doesn't do anything v-table-ish but goes straight to the REPR.
This is what I mean by reifying the difference between coercion and box/unbox.
pmichaud wait
how does pir::repr_unbox_int__IP know to look in $!value ? 13:18
jnthn has int $!value is box_target;
(the is box_target)
Note that under the hood, the REPR introspects and works out the offset once and stashes it away. 13:19
So getting the int value out is cheap.
pmichaud if you know you have an Int
13:19 MayDaniel joined
jnthn Yes. In multi infix:<+>(Int, Int) { ... } then you know you have an Int 13:19
pmichaud if you have a Mu, getting the int value out via the vtable is expensive
(because vtables in PIR are expensive) 13:20
jnthn Right, but all the built-in operators are multi-dispatch, so by the time we hit them we know what we have.
pmichaud so we need to re-do all of the builtin operators, too :)
(granted, we can do them piecemeal) 13:21
jnthn Yeah but it should be quite mechanical.
pmichaud I'm not certain of that, but I'll go with it for now 13:22
this is another place where the builtins got optimized somewhat due to the performance characteristics of the model we were (but are no longer) under
so a mechanical translation could be very wrong.
jnthn True :)
I'm happy that the new model will be faster in this area. 13:23
s/happy/confident/
moritz is happy that jnthn is confident
jnthn For one because it's a lot less levels of indirection
pmichaud oh, I'm sure it will too.... if we can avoid doing things that are very suboptimal
jnthn Today our Int is an Object PMC + an RPA for attributes + an Integer PMC. 13:24
pmichaud I guess I've just been discouraged by the amount of suboptimal code I've already found in master
jnthn *nod*
pmichaud I'm worried we'll have even more in nom
especially if we're just bringing master code as-is into nom
okay, well, let's not ponder that much more for now (more) 13:25
jnthn Aye, but nom is the start of the next journey as much as it is the end of the current one. It'll be what enables a bunch more optimizations that we just can't really code towards today.
pmichaud I agree that it enables much more optimizations 13:26
I'mworried we may miss them because of code that depends on outdated assumptions
jnthn And the cost-model is going to be different. Today type annotations are more costly than they are helpful. The work in nom will let us start using them to be efficient.
Ah, OK. That I can understand as a risk, yes. 13:27
pmichaud ultimately we kinda need to review everything
jnthn I'm not sure what we can do about it other than very careful code review and trying to document the cost model for @other.
Well, and each other. I'm not sure I fully grasp the cost model for all of the list stuff, for example. ;) 13:28
13:28 never_ left
pmichaud well, none of us do yet, I think :) 13:28
master's list implementation was "the first Perl 6 list implementation that actually worked" 13:29
cost was less important than "works"
(and the list implementation was done on a time deadline, too :)
so, I'm looking forward to fixing it in nom 13:30
jnthn I think a lot of things in master were in that "needs to work" boat. :) 13:31
pmichaud okay, I think I can summarize a short-term plan 13:32
oh, one question before that -- do you mind if I refactor the nqp and nom build subsystems?
mainly I'm thinking of removing --gen-parrot from nom, so that it just has --gen-nqp 13:33
and we eliminate PARROT_REVISION from nom, it just has a NQP_REVISION
(and NQP_REVISION keeps track of the PARROT_REVISION dependency)
jnthn Not only do I not mind, I very much encourage that. 13:34
13:34 yinyin left
pmichaud okay 13:34
so, here's my short-term guess at a plan, pending available tuits
jnthn I didn't build the solution I wanted there, I built the thing that unblocked me and trusted that those who are skilled at such things would jump in. :)
pmichaud for the next 2-3 days, I think I'll work on build system refactor
mainly I want to improve the download+install state of nqp and nom 13:35
13:35 ab5tract left
pmichaud then, whatever time is left outside of that I may try building an example language in nqp... probably try to port lolcode to 6model 13:35
that will help me to understand 6model and how things work in the new nqp for building compilers without having to try to grok it in nom 13:36
jnthn In terms of building compilers, little's changed besides "you can do it all in NQP now" and "add some use statements" :)
Well
separate compilation will catch you some more too :)
It only gets exciting once you hit 6model :) 13:37
(where exciting = shiny new stuff)
I need to do a heck of a lot of work on docs there.
pmichaud well, I'd expect it's a little more changed if I have custom types instead of using Parrot's builtins, yes?
i.e., where lolcode used Integer/Float I'm guessing I'll have things that are has int $!value ....
jnthn Yes, you could do that. :) 13:38
Note that NQP itself still uses Integer/Float though.
I didn't take that bit on. Coulda done.
pmichaud I'm fine with NQP itself still using Integer/Float
jnthn I'm fine with it until the point it makes NQP's cross-vmness an issue.
pmichaud but in order to build a reasonable Perl 6 implementation of List, I feel like I need to understand the low-level primitives pretty well 13:39
jnthn Yes, agree.
There are some things to read.
pmichaud we could do that by me being able to watch them be built up in nom (in a "start-from-scratch review-all-the-code-as-we-rebuild it approach"), or I can learn it by writing a separate language from scratch
the latter seems more productive at the moment
jnthn Yes, and exampels are good. :)
github.com/jnthn/6model/blob/maste...erview.pod and sixmodelobject.h are worth reading. 13:40
pmichaud well, you're likely to get a lot of questions from me
jnthn That's good.
Hm
I/we should use this as an opportunity to document stuff more. :)
pmichaud yes, I'm thinking that as well.
as well as a new nqp tutorial
jnthn So that we get at least an FAQ or something out. 13:41
pmichaud anyway, I can work on those while you work on literals and multidispatch in nom
jnthn OK, sounds like a plan.
pmichaud when you have things far enough along that we can do simple say of literal values, perhaps I can jump in at that point and we can work on containers
jnthn +1 13:42
I'm going to dig in on that very soon :)
pmichaud I still fear we're going to have a long slog ripping things out and fixing them
but we'll try it and see.
jnthn Yes, it's a balance of getting improvements into our user's hands soon, but also making sure we don't take shortcuts to do so that make ourselves more problems in the near future. 13:44
ruoso btw... I was considering porting 6model to p5 guts...
but I kinda didn't find where to start...
the bootstrapping path starts by the 6model lower-level stuff, right? which would be the "runtime" folder in the dotnet implementation, right? 13:46
jnthn ruoso: Yes. 13:47
ruoso: That probably needs some updating with stuff I figgered out while working on the nqp/6model on Parrot stuff but it's probably mostly right. 13:48
ruoso hmm... ok... is there some guide through the different parts of it? 13:49
(I can look on the nqp/6model instead of dotnet)
13:50 wtw left
jnthn ruoso: Not a good one. :( I need to write it really soon. github.com/jnthn/6model/blob/maste...erview.pod is an overview. 13:51
ruoso yeah... I've read that one...
ruoso keeps diving into code then...
13:52 hudnix left 13:53 Limbic_Region joined 13:54 Shozan left, jaldhar left 13:55 jaldhar joined, jaldhar left, jaldhar joined
pmichaud oh, I'll also go ahead and prototype some list fixes in master when TimToady++ responds to my questions from yesterday :) 13:56
(so that we can pin down the autotrim behavior we want) 13:57
that's a case where I don't mind working in master because it's mostly testing new capability as opposed to major code refactors 13:58
Limbic_Region . o O ( we don't need no stinking revision control ) 13:59
pmichaud afk for a bit
Limbic_Region pmichaud, take your time and take a whole byte
ruoso on a different subject, how is the support for feeds this days?> 14:00
pmichaud rakudo: <I think feeds are working> ==> sort ==> say 14:02
p6eval rakudo 048573: OUTPUT«Iarefeedsthinkworking␤»
pmichaud probably not completely, but there's some basic support there
wolverian rakudo: say <== <foo bar> ==> say
p6eval rakudo 048573: OUTPUT«==<foobar␤Bool::True␤»
wolverian I don't know if that's even supposed to be sensible. :) 14:03
pmichaud I don't know if <== works... it's currently a misparse
ruoso any paralellization already?
moritz nope
pmichaud that's one of the things I'd like to move towards in nom
ruoso is it implemented in terms of iterators already? or are they cheating?
moritz parrot segfaults when you launch a second thread while inside a HLL
pmichaud I think we should simulate parallelization even if we don't implement it
e.g., hypers should work out-of-sequence, etc. 14:04
feeds are implemented in terms of iterators -- at least to the extent that they fall out naturally from lazy slurpy parameter semantics
ruoso pmichaud: does parrot support co-routines, doesn't it>
?
moritz continuations even
we use those for gather/take 14:05
pmichaud parrot has coroutines, yes. but they carry a lot of baggage
ruoso ok... and iterators can block, right?
pmichaud suspend, yes.
they're lazy
ruoso (do we have an API for something like EWOULDBLOCK?)
pmichaud an IO iterator would block, yes. 14:06
ruoso but do we have how to raise, say, a control exception when they would block?
pmichaud no, we don't have that
not sure that's even specced
moritz doesn't think so 14:07
ruoso here is what I had in mind... 14:10
if we had all blocking operations raising control exceptions, we could implement a POE-like model for iterators 14:11
what I initially thought on that subject was that the feed operator would always start two coroutines and a transmission buffer 14:12
then if we had something like a EWOULDBLOCK control exception, we could use it to control the states of the coroutines 14:14
14:17 Qerub left
ruoso but this would mean we need a co-routine scheduler... 14:18
and if parrot supports threads fully, it would mean the co-routine scheduler would be able to distribute the tasks accross different threads... 14:19
14:20 wamba joined 14:22 Mowah_ left
moritz parrot supporting threads is a fairytale 14:22
14:24 Moukeddar_ joined 14:25 REPLeffect left 14:26 Moukeddar left 14:27 am0c left
ruoso moritz: well, in that case, the co-routine scheduler would do the "simulation" pmichaud was talking about 14:30
pmichaud Linux 3.0-rc1: Proof that version numbers have become meaningless with respect to "major revisions": permalink.gmane.org/gmane.linux.kernel/1147415 14:34
daxim some background: h-online.com/-1248294 14:36
moritz ah well, there have been long discussions about the difference in major version number increases between chrome and firefox 14:38
pmichaud after RedHat (not EL) 7.1 came out, I was pretty well convinced that major version numbers mean nothing beyond marketing. 14:39
RedHat 6.1 -> RedHat 7.0 trivial upgrade 14:40
RedHat 7.0 -> RedHat 7.1 OMGWTF
moritz so, lots of examples of meaningless version numbers 14:41
moritz thinks we should rename Perl 6 to perl.2011 14:42
arnsholt That'd give the folks over on slashdot something to rage about, at least =)
pmichaud then we'd only be 989 integers behind Python 3000
moritz p6v2011.05
14:44 Moukeddar__ joined
ruoso If I was to experiment with a "co-routine scheduler", would it be required to be done in Parrot level? or is it possible to do in rakudo-level? 14:47
14:48 Moukeddar_ left
moritz you don't have to patch parrot to use coroutines, if that's your question 14:48
ruoso no no... the question was more in the lines of "does rakudo have hooks where I can hang this sort of stuff? or the only way is in parrot-level? " 14:51
moritz depends on what you mean by "this sort of stuff"
there are no hooks for identifying blocking API calls 14:52
ruoso implementing the equivalent of processes and unix pipes
moritz you'd have to patch that in
ruoso well... I guess I'd need some sort of spec for EWOULDBLOCK 14:53
14:55 gbacon joined
moritz you don't need a spec for experimenting 14:55
in fact any spec with less than two implementaions is considered "experimental" anyway 14:56
14:56 cooper joined 14:59 koban` left, aindilis left 15:00 aindilis joined 15:02 wamba left
ruoso rakudo: my @a = (1,2,3); say @a.get(); 15:03
p6eval rakudo 048573: OUTPUT«Method 'get' not found for invocant of class 'Array'␤ in main program body at line 22:/tmp/jh2BHwp9GF␤»
ruoso rakudo: my $a <== (1,2,3); say $a.get();
p6eval rakudo 048573: OUTPUT«Method 'push' not found for invocant of class ''␤ in main program body at line 22:/tmp/FFnTtzuP4V␤»
15:04 ethan_ left
ruoso rakudo: say (1,2,3).get() 15:04
p6eval rakudo 048573: OUTPUT«Method 'get' not found for invocant of class 'Parcel'␤ in main program body at line 22:/tmp/coWpzZN9X_␤»
ruoso rakudo: say (1,2,3).getargs() 15:05
p6eval rakudo 048573: OUTPUT«Method 'getargs' not found for invocant of class 'Parcel'␤ in main program body at line 22:/tmp/NGuAvH3WeN␤»
moritz rakudo: say $*IN.get
p6eval rakudo 048573: OUTPUT«Land der Berge, Land am Strome,␤»
moritz rakudo: say (1, 2, 3).iterator.get
p6eval rakudo 048573: OUTPUT«Method 'get' not found for invocant of class 'ParcelIter'␤ in main program body at line 22:/tmp/x114vpwj__␤»
ruoso S07 is still far from reality it seems 15:06
moritz it is. 15:07
ruoso but is it still in the right direction?
or is it just outdated?
moritz outdated
ruoso is the most up-to-date documented anywhere? 15:08
moritz ask sorear when he shows up, I think he did the most recent implementation
15:12 silug joined, _twitch joined 15:19 Moukeddar__ left 15:20 silug left, silug joined 15:24 silug left, ethan joined 15:25 silug joined 15:29 silug left 15:30 silug joined 15:39 silug left 15:40 tzhs left, silug joined 15:43 _twitch left 15:47 jaldhar left, jaldhar joined 15:48 ethan left 15:58 silug left, silug joined 15:59 jaldhar left 16:01 jaldhar joined, kaare_ joined, thou joined, ymasory joined, nymacro left 16:03 lumi left 16:04 lumi joined 16:07 silug left 16:08 silug joined 16:10 Moukeddar joined 16:11 ymasory left 16:13 ethan joined, Moukeddar left 16:16 daxim left
dalek p: 1c65083 | jonathan++ | src/6model/reprs/P6opaque.c:
Update P6opaque to more fully handle box/unbox of native types.
16:17
16:19 silug left 16:20 silug joined 16:29 pernatiy left 16:31 n0den1te joined 16:33 silug left
n0den1te rakudo: (42 ** 3) ==> say 16:33
p6eval rakudo 048573: OUTPUT«74088␤»
16:33 silug joined
n0den1te rakudo: (42 ** 3) ===> say #? 16:33
p6eval rakudo 048573: OUTPUT«===SORRY!===␤Confused at line 22, near "(42 ** 3) "␤»
16:34 MayDaniel left 16:35 lumi left 16:36 lumi joined
n0den1te rakudo: class C { has $.x; }; my $aa = C.new(:$x = 42); my $bb = C.new(:$x=84); ($aa === $bb).say; 16:37
p6eval rakudo 048573: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 22␤»
jnthn C.new(:x(42))
n0den1te rakudo: class C { has $.x; }; my $aa = C.new(:x(42)); my $bb = C.new(x(84)); ($aa === $bb).say; 16:38
p6eval rakudo 048573: OUTPUT«Could not find sub &x␤ in main program body at line 22:/tmp/fdUXASYby0␤»
n0den1te rakudo: class C { has $.x; }; my $aa = C.new(:x(42)); my $bb = C.new(:x(84)); ($aa === $bb).say;
p6eval rakudo 048573: OUTPUT«Bool::False␤»
n0den1te thanks, jnthn!
err, sorry.. 16:39
16:39 n0den1te is now known as isBEKaml
isBEKaml so this is equivalent to javascript's strict equality? both value and type equality, except that it sniffs out attribute equality too reflectively? 16:39
(i.e., in cases of composite objects) 16:40
jnthn === defaults to reference equality apart from types which define a .WHICH that says otherwise.
16:40 jmp___ joined
isBEKaml I see 16:41
16:41 mj41 left
jmp___ good morning. I'm fairly new to Perl5 (started programming it seriously in March) and have begun reading Perl6 web stuff (and watching the YouTube vids) this weekend. 16:42
so I'm basically a newbie
isBEKaml rakudo: class C { has $.x; }; my $aa = C.new(:x(42)); my $bb = $aa(:x(84)); ($aa === $bb).say;
p6eval rakudo 048573: OUTPUT«invoke() not implemented in class 'C'␤ in main program body at line 22:/tmp/7VHvdYKVBx␤»
isBEKaml didn't think it would work. :)
jmp___ but I have a question regarding references.
under perl6 16:43
is this the right place to ask?
16:43 icwiener left
isBEKaml jmp___: anything about perl6, even a shred of remote link to perl6 goes here. go ahead. 16:43
jmp___ while playing around in rakudo (downloaded last night to my Mac... works nicely as a playground, btw) 16:44
i've discovered a solid metonymy between the $x reference to %h, in that everything i due with either is the same 16:45
is this intentional
will it remain forever>
(i like it)
do you want a specific example? 16:46
isBEKaml so you're asking if a class reference $x works like an hash under the hood ?
jmp___ ah! i may be confused there.... i assumed doing the $x=%h would give me a reference 16:47
but that is not what it is?
jnthn jmp___: There aren't really explicit references in Perl 6.
jmp___: Generally, you just don't have to think about those things.
jmp___ so creating a scalar ($x) that "references" an array or hash just "works"? 16:48
jnthn "my %h; %h<foo>" and "my $h = { }; $h<foo>" will work out just the same.
Yes.
jmp___ trey cool. Thank you.
i have one other question, if I may... The %h.push('Foo'=>5) construct for adding an array element to the value in a hash requires parenthesis, but 16:51
push %h<Foo>,5 does not
oops
i goofed that last... just a sec 16:52
isBEKaml rakudo: my %h; %h.^methods(:local).perl.say;
p6eval rakudo 048573: OUTPUT«[{ ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }]␤»
jmp___ push %h.<Foo>,5
isBEKaml rakudo: my %h; %h.^methods(:local).join(",").perl.say; 16:53
p6eval rakudo 048573: OUTPUT«"at_key,Bool,delete,push,list,hash,sort,pick,roll"␤»
jmp___ rakudo:
rakudo: %h<Foo>=>4
p6eval rakudo 048573: OUTPUT«===SORRY!===␤Symbol '%h' not predeclared in <anonymous> (/tmp/EHrkwkhaKb:22)␤» 16:54
jmp___ rakudo: my %h<Foo>=4;
p6eval rakudo 048573: OUTPUT«Could not find sub &Foo␤ in main program body at line 22:/tmp/q81rzbeu45␤»
isBEKaml jmp___: two things, you need to prefix my there and create a new instance of an hash for you to use later.
rakudo: my %h; %h<Foo> = 4; %h.perl.say;
p6eval rakudo 048573: OUTPUT«{"Foo" => 4}␤»
jmp___ rakudo: my %h 16:55
p6eval rakudo 048573: ( no output )
jmp___ rakudo: %h<Foo>=4
p6eval rakudo 048573: OUTPUT«===SORRY!===␤Symbol '%h' not predeclared in <anonymous> (/tmp/OuM6hZT4Bk:22)␤»
isBEKaml jmp___: two more things, you have to use 'say' for p6eval to print out stuff. It doesn't preserve state like your local REPL. :) 16:56
jmp___: one too many 'two'. SCNR. :)
jmp___ not a problem, I'm just a fumble fingered typer (and fumble minding when working with new languages)... I'll play more on my private rakuto before pasting here, next time, sorry
thanks! 16:57
isBEKaml jmp___: feel free to try things out here. We were all newbies and are still very much so. :)
jmp___ btw... when i read about 'unspace' i almost fell off the couch .... awesome concept -- yet elegantly simple. Does any other major language use it? 16:58
17:00 birdwindupbird left
jmp___ Larry's obsession with making space irrelevant to the parser seems to have born, if not borrowed, an incredible concept. 17:00
isBEKaml jmp___: it's just a concept of escaping a few characters. Only difference here is, it's more generalized in perl6 to any whitespace character. 17:01
jmp___ any plans to eventually let 'unspace' live amidst a token?
yes, i programmed C for years, and nawk and lots of others that used the backslash to escape newlines on the end of lines
it was particualarly nasty in the shell 17:02
where if some other whitespace got between the backslash and end of line you had invisible breakage
with it being applied to all white space, that bug goes away
isBEKaml ah, not sure if that's a good idea(unspace in tokens). IIUC, tokens are meant to be single entities. 17:03
jmp___ awesome... maybe it is just "escaping a few characters" but to me it is somewhat a jewel.
ok 17:04
i understand re tokens, but just curious on that.... i'll not complain. for sure.
isBEKaml if you want more examples, you can always look at Rosetta Code. It's still a work in progress, but some examples have left me stunned. 17:05
17:06 Vlavv left
jmp___ chrestomathy: wow, what a word! 17:06
isBEKaml rosettacode.org/wiki/Category:Perl_6
17:06 lumi left 17:07 lumi joined
isBEKaml jmp___: rosettacode.org/wiki/Define_a_primi...ype#Perl_6 haffun! :) 17:09
17:09 Chillance joined
isBEKaml rakudo: subset OneToTen of Int where { 1 <= $^n <= 10 }; my OneToTen $num = 5; $num += 5; say $num; 17:10
p6eval rakudo 048573: OUTPUT«10␤»
isBEKaml rakudo: subset OneToTen of Int where { 1 <= $^n <= 10 }; my OneToTen $num = 5; $num += 6; say $num;
p6eval rakudo 048573: OUTPUT«Type check failed for assignment␤ Container type: Int␤ Got: Int␤ in '&infix:<=>' at line 1␤ in main program body at line 22:/tmp/WFDtv_w_rs␤»
isBEKaml rakudo++
jmp___ i'll try them on my rakudo installation.
17:11 silug left
dalek kudo/nom: 8511092 | jnthn++ | src/Perl6/ (2 files):
First cut of Int and Str constants. Rather than making them every single time, we instead stash them away in the SC, which amongst other things serves as a constants table. Then the code is just looking up that boxed constant. Also refactor the way we handle the case where we need a string value to hand at compile time; should give better errors.
17:16
kudo/nom: 6c4de02 | jnthn++ | src/ (2 files):
Shuffle Int/Num/Str setup into the initial meta-model bootstrap; seems they gotta be at least partially done there.
kudo/nom: c704aff | jnthn++ | src/Perl6/Metamodel/ClassHOW.pm:
Add find_method fallback dispatcher for when there's no hit from the cache; can flesh out more bits in here later for e.g. weird delegation cases.
kudo/nom: 7845bc1 | jnthn++ | / (5 files):
Dummy &say, first couple of useful setting methods. We can now say('Hello, world!').
17:19 Vlavv joined
sorear good * #perl6 17:21
jnthn LHF but important hacking task for anybody who knows NQP: add_constant in src/Perl6/SymbolTable.pm currently doesn't detect duplicate usaes of the same constant within a compilation unit.
17:21 silent_h_ joined
jnthn o/ sorear 17:21
isBEKaml hello, sorear
ruoso hi sorear...
moritz was saying you have insight on the state of affairs surrounding Iterator 17:22
is there any docs on the Iterator behavior? how that relates to the current state of S07? 17:23
isBEKaml sorear: I saw you were looking for some help with unicode treatment in niecza. any way I can help?
17:26 Mowah_ joined
sorear moritz: #p5p is is (still jokingly at this point) suggesting 6.0-rc1 17:26
17:27 Sarten-X joined
sorear o/ ITS JNTHN 17:28
jnthn :)
17:28 EDevil joined
sorear isBEKaml: I am looking for people with native languages other than pl, es, de, en, jp, cn 17:29
isBEKaml: but not verty actively now; TimToady nudged me that this is worth punting
isBEKaml sorear: my native language is ta and I can help with hi and devanagari too. 17:30
17:32 silent_h_ left
ruoso jnthn: why is Invoke implemented in STable? 17:33
17:34 lumi left
jnthn ruoso: Are you looking at CLR one? 17:34
ruoso yes 17:35
jnthn If Parrot one I suspect fossil...
Well, it's gotta go somewhere. :)
ruoso but it's just a regular method, isn't it?
it actually implements by doing a lookup and a call
I was wondering why it is available at the lower-levle 17:36
...
jnthn It's gotta bottom out somewhere.
And doing a method lookup for every single method invocation is gonna get horribly slow.
ruoso So you expect STable implementations to override .invoke
17:37 lumi joined
ruoso ah... just see what you mean... (found SpecialInvoke) 17:37
jnthn Well, there kinda should only be one implementation in a sense...yes, you found the trick. :)
I'm not totally happy with that chunk of stuff.
I needed something that worked and that worked. But it's kinda slow. 17:38
ruoso so things in the lower-level know that .postcirumfix:<( )> have a shortcut
jnthn *nod* 17:39
Though when I get back to nqpclr I expect that bit will change. 17:40
ruoso so, conceptually, this is just an optimization..
jmp___ isBEKaml, regarding the samples you sent me to, is there something special (like use Math;) i need to make the 'sqrt' function visable?
jnthn The background on this is that I did the 6model prototyping on the clr, without any real expectation of whether it'd lead anywhere or not. So I deliberately punted on the "best way" to do things that didn't matter that much to the prototyping I was doing.
ruoso: Yes, you could see it as that. 17:41
Or not doing it is a pessimization. :)
17:41 pernatiy joined
jmp___ LOL 17:41
17:41 ymasory joined
jnthn rakudo: say sqrt(9) 17:41
p6eval rakudo 048573: OUTPUT«3␤» 17:42
jnthn jmp___: Seems not :)
jnthn goes for dinner, back in a little bit
jmp___ jnthn, thanks, the parens did it.
isBEKaml jmp___: it's just Num. you can directly use sqrt 17:43
ah, jnthn++ already replied to your qn. :)
jmp___ my problem is that when defining a type, it wont recognize sqrt
at the point in time the range for the type is checked 17:44
when the assignment to the actual variable is made
isBEKaml jmp___: you're using subset?
jmp___ yes
attempting to copy an example i found
curious if it memoized the subset 17:45
isBEKaml rakudo: subset OneToTen of Int where { 1 <= $^n <= 10 }; my OneToTen $num = 5; $num += 4; say sqrt($num); #like this?
p6eval rakudo 048573: OUTPUT«3␤»
jmp___ i was trying subset Prime of Int where { $^n > 1 and $^n %% none 2 .. sqrt($^n) } 17:46
thought it was interesting and curious about implementation... however, later attempts to use vars of that subset fail: 17:47
my Prime $p; p=37; 17:48
isBEKaml rakudo: subset P of Int where { $^n > 1 and $^n %% none 2 .. sqrt($^n) }; my P $pp = 37; say $pp;
p6eval rakudo 048573: OUTPUT«Could not find sub &sqrt␤ in <anon> at line 22:/tmp/TrovCZ40vH␤ in 'Block::ACCEPTS' at line 6374:CORE.setting␤ in 'infix:<~~>' at line 483:CORE.setting␤ in <anon> at line 1:/tmp/TrovCZ40vH␤ in 'Block::ACCEPTS' at line 6374:CORE.setting␤ in 'ACCEPTS' at line
..1082:CORE.setting␤…
jmp___ my rakudo response to the assignment with could not find sub &sqrt
17:49 fhelmberger left, masak joined
masak evenin', zebras. 17:49
isBEKaml masak! 17:50
masak: how are you, my good sir? :)
masak hey! :)
TBA evening masak :) funny you should say zebras, currently logged into my server named zebra :p fun animal!
17:51 hanekomu left
masak TBA: it's one of our mascot animals here in #perl6. 17:51
isBEKaml jmp___: hmmm, that's odd it should fail. maybe someone here could explain better.
jmp___ i am guessing zebra is the new animal from O'Reilly to take the place of the Perl5 camel for perl6?
TBA masak: odd i should choose zebra as my p6 testing server then lol... they're all named after animals but what a coincidence
isBEKaml rakudo: my Int $n = 37; say sqrt($n);
sorear hmm. if the Germans got de_DE for Deutsch(land), why didn't Japanese get ni_NI?
p6eval rakudo 048573: OUTPUT«6.08276253029822␤» 17:52
isBEKaml sorear: this is only a guess. Japanese have their own name for their country. Nippon, I think
sorear ruoso: niecza has real threads, btw. 17:53
isBEKaml sorear: and their language, nihongo bashi. (cool, I"m making this up) :D
sorear just nihongo 17:54
also, the country itself can be called nihon
17:54 araujo left
isBEKaml you got it. 17:55
sbp "Japanese is represented by ja (even though its endonym is Nihongo)"
en.wikipedia.org/wiki/ISO_639-1
TBA does anyone know if theres a perl interpreter for avr microcontrollers (or any microcontroller)? 17:56
17:56 Sarten-X left, mj41 joined
sbp phenny: ask clsn why Japanese is jp in ISO 639-1 instead of ni for the endonym, Nihongo 17:57
phenny sbp: I'll pass that on when clsn is around.
17:57 mberends joined, lumi left
isBEKaml rakudo: my Int $n = 37; say { $n %% none 2..sqrt($n) }; 17:57
p6eval rakudo 048573: OUTPUT«_block139␤»
TBA or perhaps more relevant, whats my chances of getting parrot and perl6 to compile using avrgcc
17:57 MayDaniel joined, lumi joined
isBEKaml rakudo: my Int $n = 37; say ( $n %% none 2..sqrt($n)); 17:58
p6eval rakudo 048573: OUTPUT«none(Bool::False)␤»
ruoso sorear: but my question was more regarding Implementation vs Spec 17:59
sbp same result with say { $n %% none 2..sqrt($n) }(), and just say $n %% none 2..sqrt($n)
ruoso S07 seems far from reality
isBEKaml sbp: yeah, I was more wondering why the subset assignment failed in my earlier example. 18:00
sbp ah
isBEKaml sbp: so that looks wrong. 18:01
rakudo: my Int $n = 37; say ( all $n %% 2..sqrt($n)); 18:02
p6eval rakudo 048573: OUTPUT«all(0, 1, 2, 3, 4, 5, 6)␤»
18:02 vlixes joined
sorear ruoso: S07 is close to what alpha did. 18:02
ruoso sorear: ah... so S07 is still in the right direction... 18:03
isBEKaml rakudo: my Int $n = 37; say all $n; #huh?
p6eval rakudo 048573: OUTPUT«all(37)␤»
sorear niecza is pretty close to rakudo master (which is quite different), although I took some license with iterators
jmp___ the sample was posted in Wikipedia at: rosettacode.org/wiki/Define_a_primi...ype#Perl_6 if you wan't original not mangled by my typing on the irc
isBEKaml rakudo: my Int $n = 37; say ($n %% 2..sqrt($n)); 18:04
p6eval rakudo 048573: OUTPUT«0123456␤»
sorear jnthn: How {does,will} $obj ~~ MyClass work in nom?
isBEKaml rakudo: my Int $n = 37; say ($n %% 2..sqrt($n).Int); 18:05
p6eval rakudo 048573: OUTPUT«0123456␤»
ruoso rakudo: say List ~~ Iterator, Iterator ~~ List
p6eval rakudo 048573: OUTPUT«Bool::FalseBool::False␤»
ruoso From what is in S07, I would think List and Iterator are kinda the same thing 18:06
sorear ruoso: they were in alpha
isBEKaml rakudo: my Int $n = 37; say ( $n %% none 2..sqrt($n)); 18:07
p6eval rakudo 048573: OUTPUT«none(Bool::False)␤»
sorear little if anything in S07 has been relevant since ng was merged
isBEKaml masak, jnthn: ^^ is this correct?
masak rakudo: my Int $n = 37; say ?( $n %% none 2..sqrt($n))
p6eval rakudo 048573: OUTPUT«Bool::True␤»
masak none(False) == True :) 18:08
ruoso sorear: "has been relevant" meaning nobody tried to implement... but the spec is still kinda what it was supposed to be
sorear ruoso: no
not at all
isBEKaml masak: ahhh... :)
sorear pmichaud has repeatedly promised to delete S07 and replace it with a description of what Rakudo master does
18:09 daxim joined
ruoso ok... I guess that means there isn't any other document explaining it... 18:09
18:10 Sarten-X joined
mberends TBA: parrrot and rakudo make a 50MB process, that is way beyond any avr hardware. I am working on a perl 6 subset -> C translator (perlduino) whose output can be compiled by avrgcc, but only parts of it are written. It's taking a lot of my time ;) 18:10
18:12 lumi left 18:13 lumi joined
jmp___ ok... don't hit the online perl engine with this... I've tried it on my iMac and it is slow, every time i run it, suggesting that the engine is not memoizing the results...I presume that eventually the engine will hang onto key values make things run faster... 18:17
18:18 wamba joined
jmp___ { $^n>1 and $^n %% none 2 .. sqrt( $^n) }(1000_000) 18:18
masak I see no memoization going on there. 18:19
jmp___ i can't make my iMac xterm cut and paste cleanly so i could have typo'd but the idea is exposed... in the event of using the block as the body of a subset 18:20
, i'd presume the interpreter would automatically retain memoized intermediates for something like that (or of course, i suppose a user written function could be used in lieu of parts of the block with explicit caching in a hash...) 18:22
isBEKaml rakudo: subset PP of Int where { $^n > 1 and ?($^n %% none 2..($^n.sqrt)) }; my PP $nn = 37; say $nn; #ok
p6eval rakudo 048573: OUTPUT«37␤»
masak jmp___: you overestimate Rakudo :)
jmp___ i'm only asking for omniscience... 18:23
18:23 HarryS left
jmp___ I guess that could be a Perl7 thing... 18:23
18:24 wooden left
isBEKaml jmp___: see my last example. that works. 18:24
now someone could take this up to change the p6 code example on RC.
jmp___ sweet. THANKS isBEKaml
18:25 HarryS joined
isBEKaml jmp___: you're welcome. :) 18:25
18:26 Sarten-X left 18:28 lumi left 18:29 kaare_ left
jmp___ one oddity: the "Type check failed for assignment" message should probably reference the subset name, if that is possible, rather than the larger Class name, as it tells me that I can't put an Int in an Int... 18:29
18:29 lumi joined
jmp___ Type check failed for assignment \n Container type: Int \n Got: Int 18:30
masak jmp___: agreed.
that's a known issue.
will be fixed in nom ;)
jmp___ oh... sorry
jnthn masak: yes, it will :)
masak don't be sorry :)
jnthn: I'm starting to be able to tell :P
jnthn sorear: $obj ~~ MyClass will do MyClass.ACCEPTS($obj) which will in turn call the typecheck op which will look in the typecheck cache and if it doesn't get lucky in there will call back to .^type_check 18:32
isBEKaml I don't know the extent of changes in NOM, but I'm working on nqpjvm after a month. :)
sorear jnthn: so the calling into the typecheck enging happens from Mu.ACCEPTS(Mu:U $self:) ?
jnthn sorear: yes
sorear: Note that things like the binder, runtime assignment type checks and so on will not go via .ACCEPTS 18:33
sorear: But rather straight to the typecheck engine.
tadzik hello #perl6
isBEKaml hey tadzik!
tadzik hey isBEKaml. How is the world on the other side of the wire? 18:34
masak tadzik! \o/
jnthn o/ tadzik
sorear ok.
isBEKaml tadzik: frayed as ever. :)
tadzik: how's things at your end?
tadzik my class Whatever is Cool -- Cool 18:35
jnthn rakudo: say Whatever ~~ Cool
p6eval rakudo 048573: OUTPUT«Bool::False␤»
tadzik isBEKaml: fair enough. I feel a little moody though, may be related to the hardcore semester ending
jnthn ah
tadzik: Feel free to fix.
isBEKaml
.oO(hardcore semesters?)
18:36
sorear is fixing spectests for v6
tadzik isBEKaml: yeah, every single one
isBEKaml tadzik: that's odd. my memories of univ and semesters are a total haze. 18:37
they just kind of passed me by that fast.
18:38 Sarten-X joined
tadzik not a piece of cake for me it seems 18:39
dalek kudo/nom: e127457 | tadzik++ | src/Perl6/Metamodel/ClassHOW.pm:
Minor typo fix
tadzik FWIW, 48 out of 120 passed the first year
one-letter karma
daxim perl6: [1,3,2,8,9,6] >> sort 18:40
p6eval pugs: OUTPUT«*** ␤ Unexpected ">>"␤ expecting operator␤ at /tmp/d6rjCteDYH line 1, column 15␤»
..niecza v5-130-gc49e30c: OUTPUT«===SORRY!===␤␤Unsupported use of >> to do right shift; in Perl 6 please use +> or ~> at /tmp/4bE6tTW63C line 1:␤------> [1,3,2,8,9,6] >>⏏ sort␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting
..line 413 (CORE die …
..rakudo 048573: OUTPUT«===SORRY!===␤Unsupported use of >> to do right shift; in Perl 6 please use +> or ~> at line 22, near "sort"␤»
daxim rakudo: [1,3,2,8,9,6] >>> sort
p6eval rakudo 048573: OUTPUT«===SORRY!===␤Missing << or >> at line 22, near " sort"␤»
daxim is that called the pipeline operator? I totally forgot the name, how to look this up 18:41
jnthn ==>
fed
gah
feed
isBEKaml rakudo: (1,3,2,8,9,7).>>sort.say 18:42
p6eval rakudo 048573: OUTPUT«===SORRY!===␤Confused at line 22, near "(1,3,2,8,9"␤»
jnthn >>.
isBEKaml bah
rakudo: (1,3,2,8,9,7)>>.sort.say
p6eval rakudo 048573: OUTPUT«132897␤»
isBEKaml rakudo: (1,3,2,8,9,7) ==> sort.say
daxim rakudo: [1,3,2,8,9,6] ==> sort ==> map ->n { n*n }
p6eval rakudo 048573: OUTPUT«===SORRY!===␤Sorry, do not know how to handle this case of a feed operator yet. at line 22, near " sort.say"␤»
rakudo 048573: OUTPUT«===SORRY!===␤Invalid typename in parameter declaration at line 22, near " { n*n }"␤»
daxim pugs: [1,3,2,8,9,6] ==> sort ==> map ->n { n*n }
p6eval pugs: OUTPUT«*** ␤ Unexpected " sort"␤ at /tmp/poIsv6ggHZ line 1, column 18␤»
tadzik fed operator. sjohnson, bring the fat face! 18:43
jnthn rakudo: [1,3,2,8,9,6] ==> sort ==> map -> $n { $n * $n } ==> say
p6eval rakudo 048573: OUTPUT«36␤»
jnthn heh
rakudo: (1,3,2,8,9,6) ==> sort ==> map -> $n { $n * $n } ==> say
p6eval rakudo 048573: OUTPUT«149366481␤»
isBEKaml ( >> o|O << )
rakudo doesn't treat arrays and lists as equivalent/ 18:44
ISTR pmichaud saying something like that... 18:45
jnthn isBEKaml: [...] will not flatten
isBEKaml jnthn: if they are meant to be equivalent, shouldn't it also flatten? 18:46
jnthn: equivalent constructs, consistent behaviour?
18:46 vlixes left
daxim niecza: [1,3,2,8,9,6] ==> sort ==> map ->n { n*n } 18:46
p6eval niecza v5-130-gc49e30c: OUTPUT«===SORRY!===␤␤Any()Preceding context expects a term, but found infix ==> instead at /tmp/C9wc50RjPO line 1:␤------> [1,3,2,8,9,6] ==> sort ⏏==> map ->n { n*n }␤␤Parse failed␤␤»
jnthn isBEKaml: They're not meant to be equivalent in this context.
It's like doing sort (1,2,3) vs sort [1,2,3] 18:47
(1,2,3).sort and [1,2,3].sort OTOH would do the same.
isBEKaml jnthn: hmmm, I must check this one 18:48
rakudo: sort [1,4,98,8,2] >> .say;
p6eval rakudo 048573: OUTPUT«===SORRY!===␤Unsupported use of >> to do right shift; in Perl 6 please use +> or ~> at line 22, near ".say;"␤»
isBEKaml rakudo: sort [1,4,98,8,2].say; 18:49
p6eval rakudo 048573: OUTPUT«1 4 98 8 2␤»
18:49 hudnix joined
isBEKaml rakudo: (sort [1,4,98,8,2]).say; 18:49
p6eval rakudo 048573: OUTPUT«1 4 98 8 2␤»
isBEKaml jnthn: I see what you mean.
masak isBEKaml: it's considered "bad form" to combine hyperops and side-effectful methods like .say
18:49 lumi left
isBEKaml masak: haskell-y, yeah. Until I get a firm grip on ropes, instead of groping around. :) 18:50
masak sure thing.
18:50 vlixes joined, lumi joined
masak the pseudo-junction type 'each' has been suggested to fill this gap. 18:50
isBEKaml masak: it's still doing the rounds in proposals in the ML? 18:54
tadzik oh noes, nom doesn't compile 18:55
wklej.org/id/538120/
masak isBEKaml: it's marked "conjectural" in the spec. 18:56
jnthn tadzik: Your nqp is too old 18:57
isBEKaml masak: OIC. IM IN YR SPEC. O RLY? NO WAI. IM OUTTA YR SPEC.
masak ;)
18:58 MayDaniel left
tadzik jnthn: oh thanks 18:59
18:59 Sarten-X left
isBEKaml masak: my fascination for that form of language grew when I saw a google code jam submission for the candy problem recently. :) 19:02
masak candy problem?
isBEKaml masak: yeah, that was one of the problem statements in teh contest.
masak: code.google.com/codejam/contest/das...75485#s=p2 -- candy splitting problem. 19:03
one of the submissions to that problem was in LOLCODE. :D 19:04
19:04 meteorjay joined 19:07 nwc10 joined 19:08 Sarten-X joined
nwc10 do I misremember, or was there something on jnthn's blog at 6guts.wordpress.com/ about how the new 6model compiler/loader architecture had to merge settings at load time? 19:08
[I can see the bit about "clean slate" for compiling, but I though also there was a discussion about the implications of what that means at load time, when 2 different compiled modules had both been fiddling with globals]
jnthn nwc10: There's no setting merging as that's just an outer scope. 19:10
But for modules there is.
I may have scribbled about that. :) 19:11
Don't see it in that post either though...
tadzik yay, Hello world
nwc10 I *thought* you had, but re-reading at "skim" speed and with a couple of what-I-thought-were-reasonable searches, I couldn't find anything.
So, guess my memory is faulty.
I guess. 19:12
jnthn nwc10: There's a little bit on global merging in 6guts.wordpress.com/2011/04/25/sepa...hat-a-mix/ 19:13
But just a reference to it rather than any details.
colomon o/
jnthn => shop, before it shuts 19:14
nwc10 good plan. would be a bad plan to run out of beer, er food 19:15
19:15 daxim left
jmp___ i thought beer was food... 19:16
nwc10 jnthn: ah yes, this bit: Obviously, this means that you kind of need to have parallel realities: the module's view of GLOBAL is decidedly not going to contain whatever happens to be in GLOBAL by whatever does the "use" statement to load the module. Of course, they must be reconciled at some point, but not until that module's compilation is completed. 19:17
well, guiness *is* the classic "liquid lunch" 19:18
tadzik call me crazy, but I didn't like Guiness last time I tried 19:19
nwc10 I didn't use to, but now I do
tadzik I even added sugar to it
jmp___ tadzik, maybe you'd find Smithwyck's more to your liking... and its a guiness beer... 19:20
btw: beer discussion is ok here, right? I mean the mongers seem like a hoppy bunch of folks... 19:21
nwc10 was just treating all channels like #london.pm :-)
19:22 EDevil left, mj41 left 19:23 lumi left 19:24 lumi joined
tadzik jmp___: I'm sure jnthn won't complain 19:26
19:28 Limbic_Region left
jnthn ooh, we're on to beer! 19:31
19:31 Enlik left
jnthn nwc10: Yes, that's the bit I was thinking of. 19:31
19:32 Moukeddar joined
Moukeddar Hello guys \o 19:33
masak hi Moukeddar.
nwc10 hi Moukeddar. However, I'm off
19:33 nwc10 left
Moukeddar how are doing masak ? 19:33
masak doing okay :) 19:34
Moukeddar: how're you?
Moukeddar good to hear :)
i'm pretty stressed :) 19:35
pmichaud good afternoon, #perl6
Moukeddar exams are soon
evening here :) 19:36
masak, since you're here ,should i start with design patterns , or with the algorithms/ datastructure book ? 19:37
masak Moukeddar: what's your aim?
Moukeddar aim?
masak yes. why are you reading those books? 19:38
in three words or less :P
colomon Moukeddar: algorithms. :)
Moukeddar to be the best :)
masak Moukeddar: I don't think the patterns book is going to tell you much until you've written a few "systems". 19:39
Moukeddar i'm attending a school next year , i want to be the best , also i have a few projects of my own , and i want to do them right :)
19:40 jaldhar left, jaldhar joined
masak Moukeddar: I'm trying to learn Go (the board game) on my spare time. I go back and forth between getting beat up by the computer and reading about tactics and strategy on the web. 19:40
colomon Moukeddar: understand that there is a wildly different skillset needed to by, say, "the best" web app designer and "the best" compiler writer.
masak Moukeddar: I think you'd be wise to do the same. pick a programming book you really like, doesn't much matter which one, and apply what you read into working code. 19:41
Moukeddar colomon, how about solution designer :)
like writing some system to manage a school , or store
masak Moukeddar: did you know Pugs (the Perl 6 compiler) was started because au++ read a book and went through the exercises in it? :)
Moukeddar interesting 19:42
masak I got heavily involved in Perl 6 development because I started writing a wiki engine one summer with a friend. 19:43
colomon I got heavily involved in Perl 6 development because I was impatient for all the cool new Perl 6 features. :) 19:44
Moukeddar you see , my goal is quite simple , learn design instead of dry coding :p
jnthn I got heavily involved in Perl 6 development because I drunk beer and then said I'd implement stuff without knowing how hard it'd be. :P 19:45
Moukeddar lol
masak Jonathan Worthington: beer-driven development, beer-driven project involvment :P
jmp___ This has got to be the best channel on the web... Beer, Perl and Go.... 19:46
TBA mberends: thanks for the info, which controller are you using btw? sounds like something i'd be interested in if you'll be releasing the source at any point, need to build a heating control unit and keep coming back to the conclusion that perl is the way to go, just don't want to run linux in between if i can avoid it!
colomon jnthn++
pmichaud colomon: still impatient?
colomon pmichaud: you betcha! :)
Moukeddar beer-driven , that's a good one Sir 19:47
masak Moukeddar: that goal is admirable. all I'm saying is make sure you build a few houses along the way. otherwise the architecture you learn isn't going to be as strong.
19:47 jaldhar left
Moukeddar masak, roger that :) 19:48
tadzik jmp___: go?
19:48 jaldhar joined
Moukeddar i'll play in the sandbox before doing something seriouss 19:48
masak Moukeddar: I can frankly say I spent the first 10 years as a developer building dog-house-sized houses. that's very useful for learning the small patterns. :)
19:48 lumi left 19:49 lumi joined
masak tadzik: it's a board game played on the intersections of a grid, wherein the object is to occupy territory by surrounding and suffocating opponent groups of stones. 19:49
jlaire masak: how strong are you at Go? :)
masak jlaire: pitifully weak :)
jlaire heh, me too
Moukeddar long way to go , because i began to hate dry coding 19:50
masak Moukeddar: what is this "dry coding" you're talking about?
donri rejoice, new MoR!
tadzik masak: oh, this go 19:51
masak dalek: YAY
Moukeddar well , jumping into the code without having a plan or whatso ever
masak donri: YAY
pmichaud I'm not sure why I got into Perl 6 development.
19:51 hanekomu joined
masak hugs pmichaud 19:51
Moukeddar just an idea and hacking and slashing your way through
jlaire Moukeddar: studying algorithms and data structures might make coding seem less dry to you
pmichaud I think it had something to do with fame and world renown. I didn't realize it was going to be "infamy".
jmp___ i quit pursuing Go skill when i came to the conclusion that I'd possibly never reach Dan rank.... but it is an awesome game, if you have the extra neurons for it.
19:51 Mowah_ left
TBA moukeddar: sometimes that can be good though, design is all well and good when theres a clear end goal in mind, but sometimes you just have to go for it and see what you get at the other end :p it feels naughty! 19:51
jmp___ i plan to take it back up after retiring
Moukeddar jlaire, thank you , that was my opinion too , 19:52
19:52 molaf joined
Moukeddar TBA, it's like inventing , but less cheerful :) 19:52
TBA lol
masak Moukeddar: I never go in *entirely* without a plan. but with TDD, one still gets to pace oneself. I *really* enjoy seeing the code grow in minimal increments :) 19:53
19:53 hanekomu left
Moukeddar masak, you should join SWAT forces :) 19:53
19:53 hanekomu joined
pmichaud TDD makes the little successes (and the little failures) more evident earlier :) 19:53
TBA masak: to me it always feels nice to wake up to a lack of test failure emails :P 19:54
apart from that, TDD sometimes drives me nuts lol
masak TBA: why?
TBA but i do think it produces better quality code
normally environment issues tbh
Moukeddar also , i want to learn SOA and DDD and TDD and CQRS and all these philosophies :)
masak Moukeddar: but yes, over the years I've come to believe that the really good pieces of software out there were written by people who had already tried writing that kind of software 49 times before. :)
jmp___ maybe there is a good balance to be found between theory and practice... use the practice to make the Patterns more alive in the mind... i mean
TBA tests fail and you spend hours chasing a red herring lol :/
Moukeddar haha 19:55
masak TBA: you should write a test 'is $herring.color, "red"', duh :P
TBA lol, at least it'd pass every time ;)
jmp___ after decades of "coding" and writing, I became a much better programmer after studying Patterns... though I'm not sure they would have been much use beforehand. 19:56
masak exactly.
jmp___ too much of coding is knowing the system you are working on
Moukeddar again , patterns :)
mberends TBA: I currently have the Uno, Nano and the (obsoleted) Duemillenove in arduino.cc/en/Main/Hardware
jmp___ and that is developed by experience, not study
masak Patterns encode experience you wish you had earlier. but you can't get it earlier.
Moukeddar masak, that site "infoQ" has really changed my view of a lot of things
masak "the sad thing 'bout experience / is by the time you get it / it's usually all you've got" 19:57
Moukeddar masak, alternative joy :)
jmp___ ouch
19:57 silug joined
masak ...sung by a very old female sleeping train in "Starlight Express" :P 19:57
sjohnson tadzik: :] 19:58
( `ー´)
tadzik :)
Moukeddar good one , very true :(
masak puts on "Starlight Express"
sjohnson! \o/
pmichaud "good judgment comes from experience. experience comes from bad judgement."
sjohnson yo
TBA mberends: just had a look, but are they not avr chips used by those arduinos?
pmichaud afk for a bit 19:59
jmp___ do the primitive types work in rakudo?
I mean, Int works, but does int?
tadzik it is supposed to work in nom 20:00
jnthn jmp___: Not yet.
Moukeddar pmichaud, infinite loop
jmp___ thanks tadzik,jnthn
masak Moukeddar: oh! I have a recommendation for you. but... if you liked "infoQ"... this one is likely to keep you awake for a week...
jmp___ what is "nom"
the next release?
another compiler?
Moukeddar masak, bring it :)
masak Moukeddar: c2.com/cgi/wiki?ReallyValuablePages
Moukeddar i nom , you nom , noming 20:01
masak You Have Been Warned.
tadzik jmp___: "new object model"
jmp___ thanks tadzik
jnthn jmp___: It's a branch in the Rakudo repository where various improvements are being developed.
jmp___ so...its "on the way" or just "in planning"
ah ha! 20:02
jnthn jmp___: Many performance related.
tadzik on the planning
masak in the way :)
jnthn masak: :P
masak SCNR
TBA out of interest, is any benchmarking being done between p5 and rakudo atm?
mberends TBA: I thought we were discussing the same thing ;) Arduino is the board design and avr ATmega328 is the CPU. Users use avrgcc to produce binaries for them and avrdude to upload the executables to the board via USB cable.
20:02 Moukeddar left
masak TBA: only when we need a good cry. 20:02
jmp___ i suspect that until the primitives are instantiatable, any performance testing will just make us Perl6 lovers cry. 20:03
TBA mberends: you said about the 50mb limit on the avrs, which would apply to the ATmega328 too? i'm using avrgcc on an atmega328 already, just directly on a (non-arduino) programmer
20:03 Moukeddar joined
jnthn jmp___: Rakudo performance is pretty bad at the moment. 20:03
TBA masak: that bad eh? :/
Moukeddar sorry , what did i miss
jnthn Moukeddar: The rapture happened.
TBA lmao jnthn
Moukeddar so fast?
jnthn Yeah, it was an accelarapture... 20:04
Moukeddar casulties report please :)
masak jnthn: dåligt :)
20:04 lumi left
masak Moukeddar: did you get my link? 20:04
if not, it's in the backlog.
Moukeddar yes masak 20:05
masak it's... a wiki for patterns!
(and other topics of discussion)
mberends TBA: no, I mean a Rakudo perl6 process measures over 50MB on an i386 system, and you will never squeeze anything like that into the *32KB* of the atmega328.
Moukeddar very interesting :)
thanks
mberends TBA: the biggest atmega chip has 256KB flash memory afaik. 20:07
TBA mberends: ah i see, so what are the options? iirc the avrs only go upto 64kb internal? is there any way to use external ram to support it? kinda new to microcontroller programming so sorry if silly questions :)
20:07 lumi joined
TBA mberends: psychic, correcting me before i say anything ;) 20:07
mberends: or, any way to get a perl parser working in under 256kb? ;)
mberends TBA: the option is to stick to a small subset of the language, and to generate code for only the instructions actually used by the program. 20:08
TBA: forget eval() for starters...
TBA: it is an interesting experiment to discover how quickly the memory will be filled. I optimistically expect some pleasant surprises, and some disappointments :) 20:10
TBA mberends: so how do PC's do it? i mean, obviously there's a cache in the processor (8mb?) and external ram, but is that it? if so, could we not use external ram (assuming we have enough pins lol)
mberends: how far are you off getting it to compile?
mberends TBA: no, the PC RAM can all contain machine language, even gigabytes of it, and the atmega has only kilobytes for machine language. 20:11
TBA: I had a little bit working with lex and yacc, and I hated it, so I broke it and am re-doing it another way. I have been one day off getting working for about three weeks now ;) 20:12
TBA lol :p
20:13 silug left
TBA presumably there are other controllers which could do it though? what about ARM? 20:13
mberends TBA: yes, the ARM is much more powerful, a 32 bit CPU instead of 8 bit. 20:14
20:14 Sarten-X left, silug joined
TBA mberends: so potentially something like the ARM11MPCore (has built in MMU too!)? 20:15
mberends I have two ARM based NAS servers running Linux and Perl 5, but the 64MB RAM is too small to *build* Rakudo :(
TBA lmao typical
20:15 MayDaniel joined
TBA no way to build on another machine? 20:15
20:15 Sarten-X joined
jmp___ regarding perl6 perlformance, a simple subroutine to compute and print (into | wc) all the primes up to 1_000_000 takes about 4.2 seconds on my Mac mini... with Perl FIVE.... 20:15
... i'll report how long perl SIX takes when it finishes, sometime in the next hour, i'd imagine 20:16
mberends TBA: yes, cross compiling *should* work, but I have no tuits to explore that field :(
TBA mberends: how easy is it to get linux running on an arm chip? been thinking about building a nas (just building a server room for it to go in lol) but not really looked at any of the details yet
Moukeddar ok guys , thanks for all the help , and thanks for your time 20:17
TBA jmp: lol didn't realise it was that bad...
tadzik jmp___: it may never finish :)
Moukeddar ttyl
20:17 Moukeddar left
TBA jmp, tadzik: is there room for optimisations or should we be, er, concerned about performance? lol 20:17
pmichaud there's a ton of room for optimization
tadzik TBA: yes, yes
20:17 envi_laptop left
jmp___ i'm using a similar algorithm in both... wrote it in perl6 (my first perl6 program) and hand-converted into a perl5 similar program 20:18
pmichaud also, there are lots of pieces of the implementation (in both Rakudo and Parrot) that are far from optimal. nom is trying to address a lot of those.
TBA ah cool, just thinking 4 seconds to 5+ minutes seems quite a difference lol
jmp___ still, "early optimization is the root of all evil", eh?
jlaire conclusion, don't use perl6 for finding primes
TBA rofl
jmp___ jlaire... it does ok, for small primes 20:19
TBA, it is still running... i really expect it to take about one hour.
pmichaud jmp___: could you nopaste the code somewhere? 20:20
TBA there any value to having a performance comparison test suite (i.e. a set of perl5/perl6 tests which achieve the same functionality)?
pmichaud TBA: I suspect there's little point to that until rakudo gets about 10x faster
TBA fair enough lol 20:21
jmp___ sure... (btw i did handicap p6 a little...oops off to the airport... i'll post code with results when i get back.... about 2 hours.... sorry
masak 'night, #perl6.
pmichaud later, masak
TBA night masak
jnthn 'night, masak
20:21 masak left 20:22 pothos_ joined, y3llow_ joined, stephanepayrard_ joined 20:23 baest_ joined, kst` joined
mberends TBA: I don't know much about it, but there is a community for building NAS type embedded Linux at openwrt.org/ . Good luck there :) 20:23
TBA mberends: thanks, will take a look there :) 20:24
20:24 y3llow left, y3llow_ is now known as y3llow, pothos left, pothos_ is now known as pothos 20:25 TiMBuS|Away joined
pmichaud TBA: maybe also see www.raspberrypi.org 20:26
20:26 shachaf_ joined, estrai_ joined, jdv79 joined, Sarten-X left, xinming_ joined 20:29 shachaf left, shachaf_ is now known as shachaf
mberends Oh, yes, saw that raspberrypi once before, very promising. It's still mainly in the planning and high cost prototyping stage, though. Futureware. 20:29
20:29 TiMBuS left, [Sec] left, jevin left, jlaire left, baest left, estrai left, krunen left, cognominal_ left, PacoLinux left, kst left, xinming left, jdv79_ left, yath left, PacoLinux_ joined, PacoLinux_ is now known as PacoLinux 20:30 TiMBuS|Away is now known as TiMBuS, jlaire joined
TBA pmichaud, mberends: the photo on their homepage shows it running ubuntu so looks promising 20:30
thanks again
20:30 jevin joined
mberends :) 20:30
pmichaud raspberrypi also claims "late 2011"
"later in 2011" 20:31
although perhaps it's another DNF example :-)
20:31 krunen joined
pmichaud maybe it'll be ready in time for Christmas :-P 20:31
20:31 hanekomu left 20:32 silug left, hanekomu joined, silug joined 20:33 Sarten-X joined 20:34 yath joined
TBA DNF? 20:34
mberends Duke Nukem Forever 20:35
jlaire or Did Not Finish
used in some sports
TBA ahh
20:36 jlaire_ joined
pmichaud "Duke Nukem Forever" is what I was referring to. It won various vaporware awards for never being released 20:37
20:37 jlaire_ left 20:39 lumi left
mberends The experimenter market that the raspberrypi is aiming at does not have the massive volumes that are required for very low manufacturing costs, so I think the challenge may be more financial than technical. The Blackberry PlayBook is only slightly ahead hardware-wise, will sell in greater volumes and for a much higher price. 20:39
20:40 lumi joined
colomon pmichaud: you know DNF comes out week after next, right? 20:42
pmichaud colomon: yes, I do. :)
colomon :)
pmichaud colomon: but it still wins the vaporware lifetime achievement award :) 20:43
TBA hang on... let me get this right. raspberrypi have made a computer so small that you need a usb *hub* to connect basic devices like a mouse and keyboard... isn't this a little self defeatist? 20:44
mberends aye, that is why they will appeal only to experimenters 20:46
TBA seems insane. the combined size of the pc and the usb hub is bigger than if they'd just added a few extra usb ports. same for the power, it now requires 2 cables instead of 1...
anyway, best go, work @7am sucks lol, night #perl6! 20:48
20:48 vlixes left
colomon pmichaud: in my head, the award might go to Cyc. Weren't they supposed to have revolutionized AI by 1995 or so? 20:48
20:49 TBA left
colomon Though I guess at least they haven't given up yet. 20:53
dalek kudo/nom: 9042f2d | jnthn++ | src/Perl6/Grammar.pm:
Fix <routine_def> calls in multi declarators.
20:54
kudo/nom: bf1066c | jnthn++ | src/Perl6/ (2 files):
Get onlystar handling in place a little more, with a call into the (do be set up) multi-dispatcher.
20:58 stephanepayrard_ left, stephanepayrard_ joined 21:00 silug left, silug joined 21:05 donri left
mberends wow, v5.14 perl -Dx -E 'say "hello";' produces over 2200 lines of syntax tree dump 21:05
sorear perl6: my $x = 12; (foo => $x).value++; say $x 21:06
p6eval pugs, niecza v5-130-gc49e30c: OUTPUT«13␤»
..rakudo 048573: OUTPUT«12␤»
21:06 TiMBuS left
sorear if pugs agrees, then Rakudo is probably wrong here 21:06
sorear fixes the test
21:06 silug left 21:07 TiMBuS joined
colomon jnthn: what do we need to get string / int constants working? 21:07
jnthn colomon: I already did that earlier today :)
colomon jnthn++
\o/ 21:08
21:08 silug joined
colomon you spend your time at parades and picnics, you miss some things. 21:08
sorear perl6: (foo => 12).value++;
p6eval niecza v5-130-gc49e30c: OUTPUT«Unhandled exception: Writing to readonly scalar␤ at /tmp/DOSwHAYfly line 1 (MAIN mainline @ 1) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1438 (CORE C638_ANON @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1439 (CORE module-CORE @ 42) ␤ at
../home/p6eval/niecza/lib/CORE.…
..rakudo 048573: ( no output )
..pugs: OUTPUT«*** Can't modify constant item: VInt 12␤ at /tmp/P_TNSl5jYD line 1, column 1-20␤»
dalek kudo/nom: 91ec2d0 | jnthn++ | NOMMAP.markdown:
Update nommap.
21:10
colomon jnthn: so the answer to my question was, "party while jnthn does all the work." works for me!
jnthn sorear: uh, given Rakudo tends to be more up to date than Pugs, "if Pugs agrees" is probably not the best assumption. :/
21:11 Sarten-X left 21:12 jaldhar left, lumi left 21:13 lumi joined 21:14 jaldhar joined 21:15 gbacon left, mberends left
sorear jnthn: I can't find it either way in the spec and the Rakudo behavior seems distinctly less useful to me 21:16
21:19 Sarten-X joined 21:21 silug left 21:22 silug joined 21:27 silug left, cooper left 21:28 silug joined 21:34 pernatiy left, silug left 21:35 silug joined
sorear niecza: say NaN; # oops! 21:35
p6eval niecza v5-130-gc49e30c: OUTPUT«Infinity␤»
tadzik funny 21:39
21:39 lumi left 21:41 lumi joined 21:46 Psyche^ joined 21:49 Patterner left, Psyche^ is now known as Patterner
dalek ecza: c8fbbef | sorear++ | t/spectest.data:
Remove accidentally passing and in spec limbo test files from list
21:49
ecza: 34b68ce | sorear++ | / (2 files):
Fix NaN handling after numerics overhaul
ast: 01c8d9e | sorear++ | S32-hash/pairs.t:
[S32-hash/pairs] explicitly rw-ize pair elements for niecza and pugs
21:50 araujo joined, araujo left, araujo joined, PacoLinux left 21:51 Sarten-X left, Ali_h left 21:56 Ali_h joined
dalek ast: 1c7477c | sorear++ | S03-metaops/hyper.t:
Add a few #?DOES to hyper.t and move it to done; for good measure
22:01
22:03 slavik joined 22:04 Sarten-X joined
dalek kudo/nom: 2f29d66 | jnthn++ | src/Perl6/Metamodel/BOOTSTRAP.pm:
Need a place for the dispatcher to hang any extra info it needs.
22:07
kudo/nom: 82d35af | jnthn++ | src/binder/multidispatch.h:
Move various multi-dispatch data structures into a header file, plus way that we'll be able to get at the dispatcher list, dispatcher info stash and so forth.
jnthn has more partially done bits locally
May get multi dispatch back in place, or at least basic case of it, tomorrow. :)
22:08 slavik left, lumi left, lumi joined 22:14 ethan_1 joined 22:20 [Sec] joined
colomon jnthn: what's the status on operators? 22:21
22:22 bacek left
jnthn colomon: Need multiple dispatch first. 22:23
22:23 silug left
colomon k 22:23
> 4 22:24
get_string() not implemented in class 'SixModelObject'
jnthn That will land either tomorrow or Wednesday.
colomon jnthn++
jnthn That get_string thing will need Parrot v-table mapping trait in place.
Again, not hard, jut didn't get there yet :) 22:25
colomon so not solvable by a quick method in Int.pm? (which I haven't looked in yet, been cooking dinner)
colomon is chomping at the bit to be useful.... 22:26
jnthn No, it's not that.
colomon afk, noms
jnthn Well, if you can work out how to get num values computed in NQP then you can get Num literals in along the same lines as Int ones. I already did a chunk of the work.
22:31 lumi left 22:32 lumi joined
dalek ecza: 02ec23f | sorear++ | src/ (7 files):
Mergeback
22:36
22:42 pjcj left, pjcj joined 22:55 pjcj left, pjcj joined 22:59 Sarten-X left 23:00 lumi left 23:01 jaldhar left
sorear kumpera++ # fixing the GC+dynamic code gen bug I found the other day 23:01
23:02 jaldhar joined
dalek ecza: 614215a | sorear++ | / (2 files):
Update to v6 bootstrap
23:02
23:03 lumi joined
sorear v6 announce pushed 23:05
23:06 MayDaniel left 23:08 Sarten-X joined
jmp___ the first 78K primes (those < 1_000_000) calc by p6 from a couple of hours ago is still running .... I'm going to cancel it, take out a terminal 'say' where it prints out all the primes it has found and start it over for a smaller set, maybe those less than 100_000, that should only take a few minutes. 23:10
sorear niecza: my @primes = 2; CANDIDATE: for 2..1_000_000 -> $i { for @primes -> $p { last if $p * $p > $i; next CANDIDATE if $i %% $p }; push @primes, $i }; say @primes[*-1] 23:12
p6eval niecza v5-132-g34b68ce: OUTPUT«(timeout)»
sorear niecza: my @primes = 2; CANDIDATE: for 2..1_000 -> $i { for @primes -> $p { last if $p * $p > $i; next CANDIDATE if $i %% $p }; push @primes, $i }; say @primes[*-1] 23:13
p6eval niecza v5-132-g34b68ce: OUTPUT«997␤»
sorear niecza: my @primes = 2; CANDIDATE: for 2..100_000 -> $i { for @primes -> $p { last if $p * $p > $i; next CANDIDATE if $i %% $p }; push @primes, $i }; say @primes[*-1]
p6eval niecza v5-132-g34b68ce: OUTPUT«(timeout)»
sorear niecza: my @primes = 2; CANDIDATE: for 2..^50_000 -> $i { for @primes -> $p { last if $p * $p > $i; next CANDIDATE if $i %% $p }; push @primes, $i }; say @primes[*-1]
p6eval niecza v5-132-g34b68ce: OUTPUT«(timeout)» 23:14
jlaire eratosthenes' sieve is a bit faster
than trial division
jmp___ much better than mine ($p*$p > $i) better than my silly sqrt($i) ....
hey... i had problems with @primes-> $p construct, i had to use @primes.list->$p .... 23:16
jlaire but really, that type of code is probably where perl6 is the most inefficient at, and even perl5 is orders of magnitude slower than C
sorear niecza: my $MAX = 50_000; my @primes; my @sieve; CANDIDATE: for 2..^$MAX -> $i { next if @seive[$i]; loop (my $j = $i; $j < $MAX; $j += $i) { @sieve[$j] = True }; push @primes, $i }; say @primes[*-1];
p6eval niecza v5-132-g34b68ce: OUTPUT«===SORRY!===␤␤Variable @seive is not predeclared at /tmp/ZKmL0IayIf line 1:␤------> CANDIDATE: for 2..^$MAX -> $i { next if ⏏@seive[$i]; loop (my $j = $i; $j < $MAX;␤␤Unhandled exception: Check failed␤␤ at 23:17
../home/p6eval/niecza/boot/lib/CORE.sett…
sorear niecza: my $MAX = 50_000; my @primes; my @sieve; CANDIDATE: for 2..^$MAX -> $i { next if @sieve[$i]; loop (my $j = $i; $j < $MAX; $j += $i) { @sieve[$j] = True }; push @primes, $i }; say @primes[*-1];
p6eval niecza v5-132-g34b68ce: OUTPUT«49999␤»
sorear niecza: my $MAX = 500_000; my @primes; my @sieve; CANDIDATE: for 2..^$MAX -> $i { next if @sieve[$i]; loop (my $j = $i; $j < $MAX; $j += $i) { @sieve[$j] = True }; push @primes, $i }; say @primes[*-1];
23:17 lumi__ joined
p6eval niecza v5-132-g34b68ce: OUTPUT«(timeout)» 23:17
jlaire you can start $j at $i*$i
jmp___ are bit types out yet? specifically, can we do bitbuffers yet?
sorear 49999 does not look like a prime number
jlaire sorear: it is
factor 49999 23:18
49999: 49999
sorear niecza: my $MAX = 500_000; my @primes; my @sieve; CANDIDATE: for 2..^$MAX -> $i { next if @sieve[$i]; loop (my $j = $i*$i; $j < $MAX; $j += $i) { @sieve[$j] = True }; push @primes, $i }; say @primes[*-1];
p6eval niecza v5-132-g34b68ce: OUTPUT«(timeout)»
sorear well I do have something new for an optimization target now 23:19
:)
niecza: my $MAX = 200_000; my @primes; my @sieve; CANDIDATE: for 2..^$MAX -> $i { next if @sieve[$i]; loop (my $j = $i*$i; $j < $MAX; $j += $i) { @sieve[$j] = True }; push @primes, $i }; say @primes[*-1];
dalek p: e08c5ca | jonathan++ | docs/6model/ (2 files):
Add a little 6model documentation.
p6eval niecza v5-132-g34b68ce: OUTPUT«(timeout)»
sorear hmm
jlaire a common optimization is to special case 2 and 3 and only loop through numbers that are 1 or 5 mod 6 23:20
23:20 lumi left
jmp___ since Perl6 is OO, and we don't yet have primitives, are the members of an array treated as Num or Int objects that have to be autoboxed? 23:21
that could slow things down by a factor of 5 or more, i'd guess....
sorear niecza: my $MAX = 200_000; my @primes; my $t1 = times[0]; my %sieve; for 2..^$MAX -> $i { next if %sieve{$i}:exists; loop (my $j = $i*$i; $j < $MAX; $j += $i) { %sieve{$j} = True }; push @primes, $i }; say @primes[*-1]; say times[0] - $t1;
p6eval niecza v5-132-g34b68ce: OUTPUT«(timeout)144446␤»
jmp___ for computation heavy items like this
sorear jmp___: yes, that's one of the main problems
jmp___: yes, that's one of the main problems 23:22
niecza: my $MAX = 200_000; my @primes; my $t1 = times[0]; my %sieve; for 2..^$MAX -> $i { next if %sieve{$i}:exists; loop (my $j = $i*$i; $j < $MAX; $j += $i) { %sieve{$j} = True }; push @primes, $i }; say @primes[*-1]; say times[0] - $t1;
p6eval niecza v5-132-g34b68ce: OUTPUT«199999␤7.172448␤»
sorear it should be possible to use my bool @sieve; my int @primes and avoid most of that
jmp___ ok, its way too early to start "optimizing" then, as someone said earlier, we're still pessimizing for a while....
sorear 7.2 seconds for 200k primes to sieve
not terrible
jlaire more than enough for most use cases :) 23:23
jmp___ primes under 200K, yes?
sorear niecza: my $MAX = 200_000; my @primes = 2,3; my $t1 = times[0]; my %sieve; for map { $_*6 + 1, $_*6 + 5 } ^($MAX/6) -> $i { next if %sieve{$i}:exists; loop (my $j = $i*$i; $j < $MAX; $j += $i) { %sieve{$j} = True }; push @primes, $i }; say @primes[*-1]; say times[0] - $t1;
jlaire sorear: how much memory would my bool @sieve; use per item?
23:23 wamba left
p6eval niecza v5-132-g34b68ce: OUTPUT«Unhandled exception: Junctions NYI␤ at /home/p6eval/niecza/lib/CORE.setting line 469 (CORE die @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1324 (CORE infix:<^> @ 2) ␤ at /tmp/6oMCutNBgY line 1 (MAIN mainline @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting 23:24
..line 1438 (CORE…
sorear jlaire: 1 bit *waves hands*
jlaire awesome
sorear niecza: my $MAX = 200_000; my @primes = 2,3; my $t1 = times[0]; my %sieve; for (map { $_*6 + 1, $_*6 + 5 }, ^($MAX/6)) -> $i { next if %sieve{$i}:exists; loop (my $j = $i*$i; $j < $MAX; $j += $i) { %sieve{$j} = True }; push @primes, $i }; say @primes[*-1]; say times[0] - $t1;
p6eval niecza v5-132-g34b68ce: OUTPUT«200003␤2.984187␤»
jmp___ you could use a bit buffer, too, as it treats contiguous storage like one ginormous integer
jlaire I want to solve project eulers in perl6 now
sorear I'm suprised and a little irritated that storing the sieve in a hash is faster 23:25
niecza: my $MAX = 500_000; my @primes = 2,3; my $t1 = times[0]; my %sieve; for (map { $_*6 + 1, $_*6 + 5 }, ^($MAX/6)) -> $i { next if %sieve{$i}:exists; loop (my $j = $i*$i; $j < $MAX; $j += $i) { %sieve{$j} = True }; push @primes, $i }; say @primes[*-1]; say times[0] - $t1;
p6eval niecza v5-132-g34b68ce: OUTPUT«(timeout)»
jmp___ less memory
jlaire sorear: try replacing @primes with just $max-prime and print that at the end
jnthn sleep & 23:26
sorear niecza: my $MAX = 200_000; my $max-prime; my $t1 = times[0]; my %sieve; for (map { $_*6 + 1, $_*6 + 5 }, ^($MAX/6)) -> $i { $max-prime = $i; next if %sieve{$i}:exists; loop (my $j = $i*$i; $j < $MAX; $j += $i) { %sieve{$j} = True } }; say $max-prime; say times[0] - $t1;
p6eval niecza v5-132-g34b68ce: OUTPUT«===SORRY!===␤␤Any()Confused at /tmp/lkgHdXNVEf line 1:␤------> < $MAX; $j += $i) { %sieve{$j} = True }⏏ }; say $max-prime; say times[0] - $t1;␤␤Parse failed␤␤»
sorear niecza: my $MAX = 200_000; my $max-prime; my $t1 = times[0]; my %sieve; for (map { $_*6 + 1, $_*6 + 5 }, ^($MAX/6)) -> $i { $max-prime = $i; next if %sieve{$i}:exists; loop (my $j = $i*$i; $j < $MAX; $j += $i) { %sieve{$j} = True }; }; say $max-prime; say times[0] - $t1;
p6eval niecza v5-132-g34b68ce: OUTPUT«200003␤2.832177␤»
jlaire so that makes no difference 23:27
sorear niecza: my $MAX = 200_000; my $max-prime; my $t1 = times[0]; my @sieve; for (map { $_*6 + 1, $_*6 + 5 }, ^($MAX/6)) -> $i { $max-prime = $i; next if @sieve[$i]; loop (my $j = $i*$i; $j < $MAX; $j += $i) { @sieve[$j] = True }; }; say $max-prime; say times[0] - $t1;
p6eval niecza v5-132-g34b68ce: OUTPUT«200003␤2.436153␤»
jlaire the way you loop through 1,5 mod 6 is really neat
sorear niecza: my $MAX = 500_000; my $max-prime; my $t1 = times[0]; my @sieve; for (map { $_*6 + 1, $_*6 + 5 }, ^($MAX/6)) -> $i { $max-prime = $i; next if @sieve[$i]; loop (my $j = $i*$i; $j < $MAX; $j += $i) { @sieve[$j] = True }; }; say $max-prime; say times[0] - $t1;
p6eval niecza v5-132-g34b68ce: OUTPUT«(timeout)» 23:28
jmp___ which is better for work with perl6, Ubuntu or Fedora, or is there a better? my Mac interface just isn't quite up to pare for cutting and pasting...
i'm gonna stick a VirtualBox on my Mac and plant a Linux there... Suggestions?
sorear niecza: my $MAX = 500_000; my $max-prime; my $t1 = times[0]; my @sieve; for (map { $_*6 + 1, $_*6 + 5 }, ^($MAX/6)) -> $i { $max-prime = $i; next if @sieve[$i]; }; say $max-prime; say times[0] - $t1;
p6eval niecza v5-132-g34b68ce: OUTPUT«(timeout)»
sorear I've been using Debian since 2003...no comment 23:29
jlaire arch here, but I don't think the distro matters much
use whatever you like most
jmp___ sounds good. thanks.
sorear niecza: my $MAX = 500_000; my $max-prime; my $t1 = times[0]; my @sieve; my $ct = -$MAX; push @sieve, False while $ct++; for (map { $_*6 + 1, $_*6 + 5 }, ^($MAX/6)) -> $i { $max-prime = $i; next if @sieve[$i]; }; say $max-prime; say times[0] - $t1;
p6eval niecza v5-132-g34b68ce: OUTPUT«(timeout)» 23:30
23:30 Sarten-X left
sorear niecza: my $MAX = 500_000; my $max-prime; my $t1 = times[0]; my @sieve; my $ct = -$MAX; push @sieve, False while $ct++; my @ok = 0,1,0,0,0,1; loop (my $i = 0; $i < $MAX; $i++) { next unless @ok[$i % 6]; $max-prime = $i; next if @sieve[$i]; }; say $max-prime; say times[0] - $t1; 23:35
p6eval niecza v6: OUTPUT«499999␤2.356147␤»
sorear niecza: my $MAX = 500_000; my $max-prime; my $t1 = times[0]; my @sieve; my $ct = -$MAX; push @sieve, False while $ct++; my @ok = 0,1,0,0,0,1; loop (my $i = 0; $i < $MAX; $i++) { next unless @ok[$i % 6]; $max-prime = $i; next if @sieve[$i]; loop (my $j = $i*$i; $j < $MAX; $j += $i) { @sieve[$j] = True }; }; say $max-prime; say times[0] - $t1;
p6eval niecza v6: OUTPUT«499999␤4.012251␤»
sorear niecza: my $MAX = 500_000; my $max-prime; my $t1 = times[0]; my @sieve; my $ct = -$MAX; push @sieve, False while $ct++; my @ok = 0,1,0,0,0,1; loop (my $i = 0; $i < $MAX; $i++) { next unless @ok[$i % 6]; next if @sieve[$i]; $max-prime = $i; loop (my $j = $i*$i; $j < $MAX; $j += $i) { @sieve[$j] = True }; }; say $max-prime; say times[0] - $t1; 23:36
p6eval niecza v6: OUTPUT«1␤4.060253␤»
23:37 Sarten-X joined
sorear niecza: my $MAX = 500_000; my $max-prime; my $t1 = times[0]; my @sieve; my $ct = -$MAX; push @sieve, False while $ct++; my @ok = 0,1,0,0,0,1; loop (my $i = 6; $i < $MAX; $i++) { next unless @ok[$i % 6]; next if @sieve[$i]; $max-prime = $i; loop (my $j = $i*$i; $j < $MAX; $j += $i) { @sieve[$j] = True }; }; say $max-prime; say times[0] - $t1; 23:37
p6eval niecza v6: OUTPUT«499979␤4.500281␤»
sorear niecza: my $MAX = 1_000_000; my $max-prime; my $t1 = times[0]; my @sieve; my $ct = -$MAX; push @sieve, False while $ct++; my @ok = 0,1,0,0,0,1; loop (my $i = 6; $i < $MAX; $i++) { next unless @ok[$i % 6]; next if @sieve[$i]; $max-prime = $i; loop (my $j = $i*$i; $j < $MAX; $j += $i) { @sieve[$j] = True }; }; say $max-prime; say times[0] - $t1;
p6eval niecza v6: OUTPUT«(timeout)» 23:38
23:40 hanekomu left
sorear niecza: my $MAX = 500_000; my $max-prime; my $t1 = times[0]; my @sieve; my $ct = -$MAX; push @sieve, False while $ct++; my @adv = 0,4,0,0,0,2; loop (my $i = 5; $i < $MAX; $i += @adv[$i % 6]) { next if @sieve[$i]; $max-prime = $i; loop (my $j = $i*$i; $j < $MAX; $j += $i) { @sieve[$j] = True }; }; say $max-prime; say times[0] - $t1; 23:41
p6eval niecza v6: OUTPUT«499979␤2.940184␤»
sorear niecza: my $MAX = 500_000; my $max-prime; my $t1 = times[0]; my @sieve; my @adv = 0,4,0,0,0,2; loop (my $i = 5; $i < $MAX; $i += @adv[$i % 6]) { next if @sieve[$i]; $max-prime = $i; loop (my $j = $i*$i; $j < $MAX; $j += $i) { @sieve[$j] = True }; }; say $max-prime; say times[0] - $t1; 23:42
p6eval niecza v6: OUTPUT«499979␤2.052128␤»
jmp___ wow
sorear niecza: my $MAX = 1_000_000; my $max-prime; my $t1 = times[0]; my @sieve; my @adv = 0,4,0,0,0,2; loop (my $i = 5; $i < $MAX; $i += @adv[$i % 6]) { next if @sieve[$i]; $max-prime = $i; loop (my $j = $i*$i; $j < $MAX; $j += $i) { @sieve[$j] = True }; }; say $max-prime; say times[0] - $t1;
p6eval niecza v6: OUTPUT«999983␤4.15626␤»
sorear \o/
jmp___ you must have something up your sieve...
23:43 Sarten-X left
jlaire niiiice 23:44
jmp___ i'm emailing myself that last one, so that i can cut and paste it later.... thanks, sorear
23:45 molaf_ joined
sorear jmp___: I've spent basically the last year working on Perl 6 optimization technology 23:46
23:47 ethan_1 left
jmp___ it showed 23:47
23:49 molaf left, Sarten-X joined 23:51 jaldhar left
sorear things I have up my sleeve: an implementation which is less complete than, but faster than, Rakudo. Detailed knowledge of exactly what is supported in this implementation and how relatively fast different operations are in it. 23:51
jdhore1 I'm surprised no one's working on a pure C, P5-style implementation of P6 23:52
jmp___ someone mentioned one for a couple of small processors, earlier...
jdhore1 ah 23:53
sorear jdhore1: the answer to this has two parts
jmp___: I think that was a Perl->C translator, not a C interpreter
1. Perl 6 is specced such that the only reasonable way to parse it is with a Perl 6 grammar 23:54
jmp___ 13:10] <mberends> TBA: parrrot and rakudo make a 50MB process, that is way beyond any avr hardware. I am working on a perl 6 subset -> C translator (perlduino) whose output can be compiled by avrgcc, but only parts of it are written. It's taking a lot of my time ;)
23:54 lumi__ left
jdhore1 sorear, ah, what's the second reason? 23:55
sorear 2. I've thought a couple times about writing a C bytecode interpreter, but decided that if I'm going to rewrite Parrot, I'd use my time more effectively by hijacking the existing Parrot rewrite
23:55 lumi joined
jmp___ jdhorel, was that earlier entry from mberends in any way bearing on your query? i'm so new here and to the Perl community at large that I don't always savvy what is salient 23:57
23:57 Chillance left
sorear ruoso wrote a custom VM (although he refuses to call it one) for Perl 6 once 23:58
in C