Parrot 3.10.0 "Apple Pi" | parrot.org | Log: irclog.perlgeek.de/parrot | #parrotsketch meeting Tuesday 19:30 UTC
Set by moderator on 22 November 2011.
dukeleto *really* feels like his old phd advisor now 00:00
Yuki`N I'm not entirely sure that paper even has sentences.
dukeleto Yuki`N: mathematicians have their own language :)
Yuki`N Starting from their definition of y and a around eq 4.
lol
dukeleto Yuki`N: here is the deal 00:01
Yuki`N: we break up the computation of pi(x) into parts
Yuki`N: some parts are easy, some are hard
Yuki`N: the hard part is an infinite sum
Yuki`N: but then they have a trick for only needing to add up a finite number of terms 00:02
Yuki`N the easy part it seems is that function P(x, a)
dukeleto Yuki`N: Ļ€(x) = φ(x, a) + a āˆ’ 1 āˆ’ P2 (x, a)
Yuki`N: that is important, write that down 00:03
Yuki`N I already put that down.
dukeleto Yuki`N: the hard part is figuring out P2(x,a)
Yuki`N But that section is only half a page long
and the part of phi(x, a) is like 4 sections.
dukeleto Yuki`N: hmm. you are right. The hard part is φ(x, a) :)
Yuki`N And I still can't figure out how to compute P_2(x, a) because I'm not sure how I'm determining y and a. 00:04
Would I just recurse until a is some small prime?
dukeleto Yuki`N: there is a recurrence relation to compute φ(x, a) : φ(x, b) = φ(x, b āˆ’ 1) āˆ’ φ 00:05
x
,b āˆ’ 1
oops
sorry, copy+pasting from PDFs dangerous, evidently 00:06
Yuki`N They split phi(x, a) into a binary tree type thing, so that the root is equal to the sum of the leaves at the bottom
but then they go a step further and... 00:07
start breaking sub-sums into more sub-sums
and I just.
don't understand.
dukeleto Yuki`N: are you still working on the is_strong_lucas function?
Yuki`N I finished that. 00:08
dukeleto Yuki`N: a = π(y)
Yuki`N: and you get to choose y, methinks
Yuki`N: this is hard. No doubt about it. 00:09
dalek sella: f84af18 | Whiteknight++ | / (19 files):
Dumper is version 1.
Yuki`N I think then we have to recurse until pi(y) gets small enough.
dukeleto Yuki`N: what about implementing π(x) the easy first, in Winxed. Does that sound more reasonable?
s/easy/easy way/
Yuki`N: you can just port the code from the Math::Primality perl 5 module straight up. 00:10
Yuki`N: i think i made this task too hard :)
Yuki`N lol
whiteknight called it!
Yuki`N the for-loop way?
dukeleto Yuki`N: yeha
Yuki`N: the dead simple way :)
Yuki`N haha, alright.
www.google-melange.com/gci/task/vie...11/7174263 lucas_pseudoprime is done.
dukeleto Yuki`N: i would love to help you implement the optimized version, but I also don't want to bog you down when you could be doing other tasks 00:11
Yuki`N: ok, just marked the task complete, will do a full review a bit later
Yuki`N: nice work! 00:12
Yuki`N alright.
dukeleto whiteknight: there is still another date where the last set of tasks gets released, right?
whiteknight Dec 16th, methnks
dukeleto Yuki`N: because you are going to do the *way* easy version of prime_count(), can you implement next_prime() and previous_prime() too? They are about 4 lines each, dead simple. 00:13
Yuki`N alright. 00:14
dalek rrot-math-primality: b147de0 | Yuki`N++ | / (2 files):
Add and test is_strong_lucas_pseudoprime.
rrot-math-primality: 1a51fa2 | dukeleto++ | / (2 files):
Merge pull request #3 from nol888/master

Add and test is_strong_lucas_pseudoprime
dukeleto Yuki`N: a few tests too, please :) 00:19
Yuki`N of course.
Tests make sure I didn't break anything while porting.
dukeleto Yuki`N: a good lesson to know :) 00:21
00:27 Nol888 joined
Nol888 dukeleto, how can I make big-integer literals. 00:45
s/./?/
s/\\./?/
dalek itor: a441875 | NotFound++ | examples/pizarra.winxed:
the color selector was wrong
00:46
01:03 AzureSto_ joined
dalek rrot/packfile_cleanups: ef94692 | Whiteknight++ | / (11 files):
Add a third argument to Parrot_pf_get_packfile_pmc, to be the string path for it. That way every time we have a PackfileView we've made a best effort to fill in all fields. Add a get_packfile() method to Sub to get the packfile that owns it. This exposes some subtle errors
01:05
rrot/packfile_cleanups: 0b3235a | Whiteknight++ | src/pmc/packfileview.pmc:
Make sure to set the ->view field in the PackFile* when we load it from the PackfileView.read_from_file() method.
rrot/packfile_cleanups: aba1afc | Whiteknight++ | / (2 files):
Remove PackFile_read_pbc file.

We have Parrot_pf_read_pbc_file, and we only want one interface for this crucial mechanism to prevent confusion
01:10
rrot: 34f56d9 | Whiteknight++ | / (11 files):
Add a third argument to Parrot_pf_get_packfile_pmc, to be the string path for it. That way every time we have a PackfileView we've made a best effort to fill in all fields. Add a get_packfile() method to Sub to get the packfile that owns it. This exposes some subtle errors
01:20
rrot: 62100ee | Whiteknight++ | src/pmc/packfileview.pmc:
Make sure to set the ->view field in the PackFile* when we load it from the PackfileView.read_from_file() method.
rrot: 2c4ef38 | Whiteknight++ | / (2 files):
Remove PackFile_read_pbc file.

We have Parrot_pf_read_pbc_file, and we only want one interface for this crucial mechanism to prevent confusion
rrot: 7ad94d6 | Whiteknight++ | t/src/extend.t:
Fix tests that were relying on Parrot_pf_get_packfile_pmc
dukeleto it is nice to ride the GCI commit wave... 01:29
Yuki`N lol 01:30
almost done
whiteknight that wasn't GCI stuff, that was me opening src/packfile/api.c and saying the F-word 01:31
benabik ? 01:32
Yuki`N dukeleto, finished 01:35
The task is www.google-melange.com/gci/task/vi...11/7197337 01:36
Oh, you never accepted my claim.
dalek rrot: 81de279 | Whiteknight++ | src/pmc/imccompiler.pmc:
Add a named 'path' argument to IMCCompiler.compiler and .compile_file, to override default path name in the PackfileView
01:45
href="https://parrot.github.com:">parrot.github.com: b92c942 | (Alvis Yardley)++ | index.html:
See whether '../html/' onto 'docs/intro.pod.html' will work correctly.
01:49
01:50 woosley joined
cotto 'evening 01:53
whiteknight++ 01:54
whiteknight Rakudo didn't use either of those functions, so I figured they were fine to nuke 01:58
dalek rrot: 130df8b | Whiteknight++ | src/pmc/imccompiler.pmc:
doesn't seem to like the named arguments. Just make the path argument optional instead
02:00
Heuristic branch merge: pushed 178 commits to winxed/pir_compiler_fixes by Whiteknight
nxed/pir_compiler_fixes: c07c759 | Whiteknight++ | / (2 files):
the pir compiler should use the .compile method instead of the old, deprecated invoke vtable. Pass in the new path parameter so the packfile knows which file it came from
02:02
whiteknight msg NotFound I just opened winxed pull request #17 to fix uses of the PIR compreg and get new features 02:03
aloha OK. I'll deliver the message.
whiteknight with all those commits, I can do: Rosella.Reflect.Module.get_current_packfile().name() and get the name of the file that I'm running 02:05
in my test file, it prints "test.winxed"
02:06 blaise_ joined
dalek href="https://parrot.github.com:">parrot.github.com: e79f6ae | (Alvis Yardley)++ | index.html:
Make the links point to the correct directory, i.e., "../html/".
02:14
whiteknight that doesn't seem like much, but it's a major improvement in consistency and interface usability 02:16
Yuki`N whiteknight, do you mind approving this? www.google-melange.com/gci/task/vie...11/7197337 02:20
whiteknight done
I would wish you good luck, but I suspect that's not necessary
Yuki`N I've already finished, actually. 02:21
To avoid suspicion I'll wait until a bit later to submit, though./
whiteknight cotto: if packfiles are associated with file names, and we have ready access to version numbers and UUID strings, we can create strong names for each library, which is a security essential 02:27
for instance, we can do a packfile load with file name, specific version, and even specified UUID, and fail if any of those things don't match
dalek kudo/nom: 652952a | colomon++ | README:
Add --gen-nqp to the Configure instructions.
02:30
cotto whiteknight, istr that the uuid strings (and related code) were pretty stubby. 02:34
whiteknight it's all pretty stubby, but I'm getting through it all slowly 02:35
dalek rrot: f4defab | Whiteknight++ | / (3 files):
Add in Parrot_pf_get_version_string and expose it through new method PackfileView.get_version
02:39
whiteknight git now it appears generated packfiles get the version number of the Parrot that generated them
and that's suboptimial
When we have PACT, we're going to need a method to set the version number on the generated bytecode 02:40
cotto It doesn't reflect actualy compatibility very well.
whiteknight no 02:41
eitherway, I have what I need for Rosella now
cotto is there a strong reason to keep it when we have explicit bytecode versions? 02:42
dalek sella: 1d7fbc3 | Whiteknight++ | s (3 files):
Add in a Reflect.Module class to provide a friendly wrapper around PackfileView
sella: eadfbf5 | Whiteknight++ | src/unstable/reflect/Module.winxed:
Implement the get_current_packfile function.
whiteknight msg benabik I'm adding some PACT-inspired stuff to Rosella: github.com/Whiteknight/Rosella/blo...ule.winxed 02:43
aloha OK. I'll deliver the message.
benabik Version number of the generated bytecode? I thought the version number was for the packfile format, not the packfile. 04:12
0x13155a1 ? Is that supposed to be something? 04:14
(Magic number for PBC) 04:16
cotto benabik, there's some small basis for it, but it's mostly important that it be unique. 05:18
dukeleto msg alvis i like the idea of a parrot vm spec. Our docs/pdds are supposed to be that, but many are wrong/old/bitrotten 05:37
aloha OK. I'll deliver the message.
dukeleto If old code gets bitrot, what does old documentation get? 05:38
sorear irrelevant 05:41
05:46 blaise_ joined
dukeleto sorear: ba dump ching 05:48
Firefox JIT stuff: blog.mozilla.com/dmandelin/2011/11/...1123-1129/
a good read
this too blog.mozilla.com/dmandelin/2008/05/...ls-part-i/ 05:50
06:01 rfw joined 06:36 davidfetter joined 07:22 rblackwe joined 07:34 rfw joined 08:08 alvis joined 08:13 lucian joined 08:38 mj41 joined 09:01 AzureStone joined 09:08 lucian joined 10:11 blaise_ joined 10:28 GeJ joined
dalek kudo/nom: 80f6ce0 | moritz++ | src/core/IO.pm:
make IO.write DWIM if the handle is not binary yet
10:50
11:20 rfw joined 11:45 whiteknight joined
whiteknight good morning, #parrot 11:56
12:13 Psyche^ joined 12:41 blaise joined 12:47 bluescreen joined
moritz hi whiteknight, how are you? 12:47
whiteknight moritz: I'm doing well. We're going to settlement on our new house in a few hours, so I'm nervous 12:48
you?
moritz whiteknight: I'm doing quite well, apart from being very tired 12:50
whiteknight: the small one has started to scuttle forward two weeks ago, and is now quite fast. Interesting times :-) 12:51
whiteknight awesome. I always found it much more fun when my son could move and be crazy 12:52
dalek kudo/nom: ff7fd2d | moritz++ | src/core/IO/Socket.pm:
.write method for sockets
12:56
13:12 mtk joined 13:27 schmooster joined
Coke ah, you n00bs. ;) 13:31
my little one is taller than I am and thinking about cars.
13:32 benabik joined
benabik o/ #parrot 13:36
whiteknight hello benabik 13:37
let me tell you what: Writing new ops for Parrot is infuriating 13:46
benabik How's that?
whiteknight if you have a C syntax error in the op you write and try to make bootstrap-ops, it takes forever to find it and then it's overwritten a bunch of files so you can't build parrot and try again 13:47
benabik Ah.
whiteknight yeah, it sucks
moritz can't you just type 'make'?
whiteknight moritz: no, because opsc overwrites several source files with the invalid code 13:48
so you need to revert about 4 files before you can make
moritz :( 13:49
whiteknight: that's terrible design of the build system
nqp uses separate steps for building and for bootstrapping 13:50
and building doesn't overwrite anything (except old builds)
whiteknight yes it is a terrible design, hence my complaining 13:53
blah, and then we have tests in the suite testing to make sure we have an exact number of ops 14:00
and the test fails any time you add or remove an op
moritz just remove that test.
dalek rrot/pcc_ops: 6eb5bf3 | Whiteknight++ | / (7 files):
Add in several new ops and supporting logic to help streamline PCC
14:02
rrot/pcc_ops: f0a522c | Whiteknight++ | t/compilers/opsc/06-opsfile.t:
Don't test for an exact number of ops, because then the test breaks during routine non-breaking development.
whiteknight already did :) 14:03
msg cotto can you take a look at some of the new ops I added in the pcc_ops branch? They're pretty important for some upcoming PCC refactors I'm planning.
aloha OK. I'll deliver the message.
benabik flatten_*_arg? 14:04
moritz whiteknight: the socket PMC has a readline method, but rakudo needs a more general method which allows a custom delimiter besides \\n 14:06
benabik whiteknight: Docs on the new invoke/invokecc variants would be nice. ;-)
whiteknight moritz: okay, so what if we pass in an :optional delimiter argument to Socket.readline?
moritz whiteknight: either that, or a separate method
whiteknight moritz: which would Rakudo prefer?
moritz whiteknight: both are fine. We need to wrap it anyway for type marshalling, so it's all the same to me 14:07
whiteknight moritz: okay. I don't know if I will have a lot of time to do it myself this week. When is it needed?
moritz whiteknight: I can even try it myself, just wanted some feedback first 14:08
any example of a method in a PMC that takes an optional argument?
whiteknight oh, okay. Yes it sounds very sane to me. Whichever variant you prefer should be fine
moritz: src/pmc/imccompiler.pmc .compile() and .compile_file() methods take optional parameters
I don't think :optional works with :named. There are some examples of that combination in that file which aren't used, but didn't appear to work when I tested briefly 14:09
so, just stick with :optional
moritz ok
so, pretty much like in PIR :-)
benabik whiteknight: Looks like you're breaking up set_args into pieces? 14:21
whiteknight benabik: yes 14:39
benabik: whiteknight.github.com/2011/05/12/p...mings.html
benabik whiteknight: I notice that the block labeled PASM for optional/positional stuff is actually PIR. 14:44
(about 2/3s of the way down)
whiteknight ah, looks like a copy+paste error 14:45
that post is several months old and nobody has mentioned that yet
benabik And the fast way of doing optional positional is probably checking a length argument.
It's easy to gloss over the code.
(I know I've read it before and I didn't notice)
dalek rrot: e95cf3a | moritz++ | src/pmc/socket.pmc:
give Select.readline an optional deleimiter parameter (not yet tested)
14:46
benabik Select.readline?
Oh! Socket.
moritz sorry
moritz braindead
whiteknight benabik: yes, length checking would work very well for the positionals
okay, I have to go now. I have to see a man about a house 14:47
14:47 JimmyZ joined
benabik moritz: No big deal. I'm just not awake enough to realize what you meant quickly. 14:47
moritz have fun^Wsuccess :-)
benabik 'luck1
s/1/!
whiteknight Thanks!
15:55 ilbot2 joined
moderator Parrot 3.10.0 "Apple Pi" | parrot.org | Log: irclog.perlgeek.de/parrot | #parrotsketch meeting Tuesday 19:30 UTC
Coke is all for saneifying the build system. 16:02
checking in built files doesn't help with that process. 16:03
dukeleto ~~ 16:11
dalek itor: e069557 | NotFound++ | examples/graph.winxed:
a bit more eye candy in example graph
16:27
16:38 contingencyplan joined
cotto ~~ 16:41
16:57 dmalcolm joined
dalek kudo/nom: f0ac58c | coke++ | tools/autounfudge.pl:
add more on-demand debug output
16:58
17:09 davidfetter joined 17:25 zby_home joined
dalek itor: 7d438ce | NotFound++ | / (4 files):
constants for GC logical functions - use constants consistently in examples
17:35
17:43 fperrad joined 17:50 ambs joined 19:01 lucian joined
dalek p: e680f11 | moritz++ | tools/build/PARROT_REVISION:
bump parrot revision
19:42
kudo/nom: 2b31355 | moritz++ | / (2 files):
implement input-line-separator on IO::Socket::INET (not yet tested, but not regressing either)
19:43
20:23 schmooster joined 20:29 Yuki`N joined 21:11 perlite joined 21:52 blaise joined 21:53 alester joined
alester seen dukeleto 21:53
aloha dukeleto was last seen in #parrot 5 hours 42 mins ago saying "~~".
21:55 jsut_ joined
alvis msg dukeleto got your msg 'bout the vm spec. thank you. 22:02
aloha OK. I'll deliver the message.
alvis seen NotFound
aloha NotFound was last seen in #parrot 1 days 19 hours ago saying "cotto: doesn't matter, just let people send money and we'll manage to find something to do with it ;)".
NotFound ~~ 22:04
alvis NotFound: Hello. Got a coupl'a questions: Are you familiar with the JVM Specification?
NotFound I know it exists ;) 22:05
alvis NotFound: Ok, well, I'm thinking about doing something similar for Parrot and in it, it features Java ...
NotFound: so, I was wondering if you'd be opposed to me featuring Winxed? 22:06
cotto unsurprisingly
alvis cotto: :)
cotto +1 (or more)
benabik JVM spec was amazingly clear when I had to work with it.
cotto We should encourage things that aren't PIR.
NotFound alvis: featuring in what sense? Providind example or test code in it? 22:07
alvis cotto: right, i'd also like to do nqp-rx, at least.
benabik I like the Anything but PIR ticket for 2012. :-D
alvis benabik: Yeah, that's one of the virtues of the spec or any spec: clarity.
NotFound Anyway, I don't oppose the use of winxed for anything. On the contrary, I encourage world domination. 22:08
alvis NotFound: Basically, a syntactic and semantic description of the language, along with example code (like your examples)
NotFound: Ok, thanks. I wanted to ask you _before_ I included it in my proposal for a Parrot VM Specification document. 22:09
NotFound alvis: if you want clarity, I proclaim here, in front of the parrot community, that I authorize and encourage you. 22:10
alvis NotFound: Ha! :) Good 'nough! 22:11
PerlJam NotFound: does that mean that you want alvis to re-write most of the parrot core in winxed? ;) 22:12
alvis cotto: Do you have any other language(s) you think I should look at for consideration or inclusion?
Yuki`N I for one encourage things not in PIR.
NotFound (maybe I've should be used majestic plural?)
PerlJam NotFound: you should have said "Hear ye! Hear ye!" too
benabik For a VM spec, PIR is actually one of the better things to use at the moment. PASM might be better if it's actually functional (which I have little proof of at the moment). 22:13
NotFound I have enough problems with present days english, won't try medieval.
benabik I'd discourage nqp-rx for the purpose as what it generates isn't really clear. 22:14
alvis benabik: Well ..., there will have to be some (don't know how much, at this point) recourse to PIR.
benabik (Not that I was asked. >.> <.< )
alvis benabik: ... and it's sooo slow. haven't had the chance to figure out why. <shrugs> 22:15
PerlJam alvis: could you comparatively quantify the slowness?
benabik My guess on nqp-rx speed is find/store_lex being slow and it using Integer and Float PMCs instead of I and N registers. 22:16
PerlJam: My nqp-rx PCT port took about 2x the time to compile Rakudo.
cotto NotFound: I feel the same way about nqp-rx. Also, it's designed for people interested in Rakudo more than as a general-purpose language.
22:16 nbrown joined
benabik And nqp-rx generating way too many find/store_lex ops… I wonder if we could use mls++'s directaccess additions to improve that. 22:17
cotto alvis: only winxed comes to mind atm.
alvis PerlJam: Not at the moment, but on the tests I've ran, it really lags. 22:18
NotFound Guys, be nice. Don't say that nqp is slow, just say that winxed is fast ;)
benabik nqp is reasonable, AFAICT. nqp-rx is slow. ;-)
Yuki`N msg dukeleto i've got some code for you to review: www.google-melange.com/gci/task/vie...11/7197337
aloha OK. I'll deliver the message.
Yuki`N I'm suprised by the relative speed of winxed. 22:19
Given that it's running on an interpretive VM, it's not that bad.
benabik For sheer numerical work, Parrot should be pretty good. :-D There are some pain points in our object system, though. :-/ 22:20
Yuki`N I propose JIT should be a GSoC project. 22:21
NotFound The drawing of R->R functions in the graph example of Guitor looks reasonably fast. Have somenone looked at it? 22:22
alvis Ok, just to be clear, the general consensus for inclusion in a PVM Spec is winxed (and some) PIR? 22:26
NotFound +1
alvis and I will submit a well-formulated question about the same to parrot-dev/parrot-users. 22:27
dalek itor: 7145f6d | NotFound++ | / (3 files):
font getHeight and example of using font metrics
22:36
22:41 whiteknight joined 22:42 lucian joined
whiteknight good evening, #parrot 22:46
cotto hio whiteknight 22:47
whiteknight hello cotto
NotFound whiteknight: the change you propose for winxed will work with the current release, or depends on master? 22:54
whiteknight NotFound: depends on master 23:19
I added that second parameter to master yesterday
NotFound whiteknight: I'm going to wait a few days, then. 23:21
whiteknight okay, no rush
23:36 awwaiid joined
dalek itor: bf014ba | NotFound++ | / (3 files):
some fontmetrics for fontsets
23:46
itor: 04999fa | NotFound++ | examples/text.winxed:
Ops, this was just for testing
23:55