Parrot 4.4.0 "Banana Fanna Fo Ferret" | parrot.org | Log: irclog.perlgeek.de/parrot | #parrotsketch meeting Tuesday 19:30 UTC
Set by moderator on 12 June 2012.
02:00 seiferteric joined 03:03 elmex_ joined
seiferteric hello, I have read parrot is geared towards dynamic languages, would this have any impact and static languages targeted at parrot? 03:19
alvis msg kid51 Will do, and thank you. 04:27
aloha OK. I'll deliver the message.
04:38 EEPS joined 06:36 birdwindupbird joined 07:01 brrt joined 07:32 particle joined 08:14 lucian joined 08:19 kjs joined 08:21 kjs_ joined 08:23 contingencyplan joined 09:19 kjs joined
kjs aloha, nopaste? 09:29
aloha kjs: nopaste is is nopaste.snit.ch (works with the script in $_PARROT/tools/dev/nopaste.pl)
nopaste "kjs" at 193.1.104.2 pasted "verbose output perl configure zlib gettext" (127 lines) at nopaste.snit.ch/144331
09:36 schm00ster joined 10:20 kjs joined
kjs aloha, nopaste? 10:20
aloha kjs: nopaste is is nopaste.snit.ch (works with the script in $_PARROT/tools/dev/nopaste.pl)
nopaste "kjs" at 193.1.104.2 pasted "perl Configure with perl 5.16 built from source" (295 lines) at nopaste.snit.ch/144338 10:21
"kjs" at 193.1.104.2 pasted "perl configure output verbose with perl 5.16" (129 lines) at nopaste.snit.ch/144339 10:22
10:46 JimmyZ joined
kjs hi JimmyZ 10:55
JimmyZ hello kjs 10:59
kjs: I found t/switch is broken
kjs mm bummer. 11:01
JimmyZ: I messed up my perl installation so i cant testit myself 11:05
JimmyZ kjs: :) 11:06
kjs JimmyZ: does it run through M1? 11:16
I mean, does M1 give an error on t/switch
JimmyZ kjs: nope
kjs mm ok 11:17
I don't know then
I committed 1 or 2 small changes in the last few hours
JimmyZ: fixed my perl install. it runs here (t/switch) 11:20
can you do make clean and try again? 11:21
JimmyZ kjs: it outputs wrong
kjs the Makefile doesn't have all dependencies
JimmyZ kjs: try ./run_m1.sh t/switch.m1 11:24
kjs i run make test
ah your'e right
might have to do with changtes to break...
lemme look
JimmyZ: that t/switch fails doesnt become apparent with make test. 11:25
so it's false confidence...
JimmyZ kjs: yeah
dalek : cac108e | kjs++ | src/ (3 files):
some assertions and try-outs.
11:29
kjs JimmyZ: i think i know what it is 11:31
JimmyZ kjs: great. will it be hard fix? 11:32
kjs: I saw it that m1 lost m0 code
kjs what do you mean? 11:33
i thought it was an easy fix; seems a bit more difficult now.
JimmyZ kjs: m1 only outputs the first expr in the 'case'
kjs indeed 11:34
you're correct. there was a funciton gencode_exprlist, and i removed it
but apparently it's still needed here
so i'm replacing it
JimmyZ oh
kjs but now i'm runing into other issues.
but i think i knowwhat that is
gimme a few min
JimmyZ a case block ? 11:35
kjs i removed exprlist in favour of block; but switch "blocks" are not real blocks, as found in a for or while loop 11:36
a for or while loop just has a statement as a "block"
but because a "block" ISA "statement" that works 11:37
but in switch, it's just a "fall through"
fix coming up.
dalek : 947a950 | kjs++ | src/ (2 files):
fix switch test. thanks to jimmy for reporting.
kjs JimmyZ: is it possible to make "make test" detect failures like this?
it's quite important, because I don't commit unitl make test is successful 11:38
so i depend a lot on it
oh i forgot the karma 11:39
jimmy++
11:40 mtk0 joined
JimmyZ kjs: I don't know. I hadn't find the way to detect failures like this 11:48
*found
kjs i thougth the TAP protocol should detect that no?
it needs "ok 1" etc.
JimmyZ kjs: I thought so 11:49
dalek : 86b9901 | jimmy++ | t/switch.m1:
improved t/switch.m1 a bit
11:57
JimmyZ kjs: this makes sure TAP protocol could detect it 11:58
kjs great, thanks 12:02
i'll read a bit on TAP to see how this can be fixed structured way
*in a
JimmyZ good
12:05 brrt joined 12:11 mtk joined 12:12 PacoAir joined 12:56 PerlJam joined 13:07 schm00ster joined 13:09 mtk joined, Psyche^ joined 13:16 kjs joined 13:21 eric joined 14:28 jsut joined 15:14 dmalcolm joined 15:45 jashwanth joined
jashwanth hello dukeleto 15:49
15:53 contingencyplan joined
dukeleto jashwanth: hola 15:56
dalek : 2d85b04 | kjs++ | src/m1.l:
add lexer support for binary numbers: int x = 0b0001010101
16:03
16:03 brrt left
dalek : 8ab8b23 | kjs++ | src/m1.l:
add support for hex and oct too.
16:10
: 69dae17 | kjs++ | src/m1.l:
clean up lexer.
16:14
16:19 whiteknight joined
dalek : 47d1de6 | kjs++ | src/ (4 files):
add the >>> operator. Implemeng code generator for >>, <<, >>>.
16:23
website: Jashwanth++ | Testing Part 16:26
website: www.parrot.org/content/testing-part
16:26 kid51 joined
whiteknight good afternoon, #parrot 16:26
kid51 msg kjs paste nopaste.snit.ch/144339 shows that your 'gettext' and 'zlib' are not built for x86_64. Hence, error messages and failure to register their presence is predictable. Suggest non-fink builds. 16:28
aloha OK. I'll deliver the message.
kjs kid51: thanks. I'll try that. 16:29
jashwanth hello whiteknight 16:30
dalek : 543a5d5 | kjs++ | src/ (2 files):
handle chars properly. fix segfault.
16:39 darbelo joined
whiteknight hello jashwanth 16:41
benabik ~~ 16:59
dukeleto jashwanth: what are you working on now? 17:10
jashwanth dukeleto, actually had started to write tests but to do that whiteknight had insited me to change the code to make it as a library 17:12
dukeleto jashwanth: huh?
dukeleto backlogs
pmichaud anyone remember what Parrot's recursion limit is? 17:13
whiteknight pmichaud: I would have to search for it 17:14
pmichaud: Are you running into it?
dukeleto jashwanth: it is good to see you write blog posts. In the future, please add a few links to the blog post, such as links to your commits on github and the projects that you mention
pmichaud: include/parrot/sub.h
109:#define RECURSION_LIMIT 1000
pmichaud we have a test case that ran into it on #perl6, yes.
...1000? 17:15
that's pretty... small.
whiteknight yes, that does seem unnecessarily small
pmichaud okay, that makes me feel better.
17:15 tuxit joined
whiteknight pmichaud: Feel free to bump it if you need it up 17:15
pmichaud We can bump up the recursion limit from Rakudo.
whiteknight okay
dukeleto pmichaud: i guess nothing in the parrot test suite hits it so we didn't notice. I am sure we would take a patch to increase it if you feel the average user will bump against that 17:16
whiteknight I suspect that recursion limit isn't something we should enforce by default, unless in a security context that requires it
pmichaud dukeleto: there are tests for the recursion limit in the suite, yes. :-)
dukeleto pmichaud: but yes, it is probably best for Rakudo to configure Parrot with a recursion limit it wants
Coke this conversations sounds reallly familiar. 17:17
jashwanth dukeleto, we had an error on the other day regarding Rosella how do we fix that?
dukeleto pmichaud: if it is currently not simple to set that limit via Configure.pl, that is definitely a patch we would accept
pmichaud dukeleto: it's no problem, since we can change the limit dynamically at runtime
dukeleto jashwanth: let's not care about it for now. I want you to make iterative progress instead of chasing hairy yaks. You can just run your test with: winxed t/winxed/foo.t
pmichaud we'll just do that as part of compiler startup/init
that also means that someone invoking rakudo can potentially change the recursion limit from rakudo's command line, instead of having it baked into the parrot binary 17:18
jashwanth dukeleto, ok
pmichaud or even via a function we expose to the p6 programmer
dukeleto pmichaud: sounds flexible and yet dangerous...
pmichaud anyway, this answers my question very well -- thanks! 17:19
jashwanth dukeleto, regarding the tests how do you want me to do it a little detailed please 17:23
dukeleto jashwanth: irclog.perlgeek.de/parrot/2012-06-15#i_5730712 17:28
jashwanth: i see your firsttest.t 17:29
jashwanth: what happens when you run winxed t/winxed/firsttest.t ? 17:30
jashwanth: does it work for you? 17:31
jashwanth dukeleto,yes
dukeleto jashwanth: hmm, looks like i need to recompile my parrot with libffi (which I thought it had) for it to work correctly 17:33
jashwanth: i am a bit confused. Your test uses parrot-linear-algebra, not LAPACK 17:34
jashwanth dukeleto, so do you want me to write the test for dgetrf simarly to load this function from lapack or use the code from Double.winxed 17:35
dukeleto jashwanth: so yes, your test passes, but for the wrong reason :)
jashwanth: i think you are still confused about the difference between implementation and tests
jashwanth: the implementation makes something work. The test shows that the implemention works correctly and as you expect.
jashwanth: the implementation (Double.winxed) is what knows how to correctly call dgetrf (passing arguments and all that) 17:36
jashwanth: the test for Double.winxed calls the dgetrf function on various inputs and makes sure the outputs are correct
jashwanth: does that make more sense?
jashwanth dukeleto, yes
dukeleto jashwanth: the structure of your test is good, but you need to actually call the degetrf function and inspect the return value 17:37
jashwanth but can I know what this command is used for"$load "./src/Double.pbc";"
dukeleto jashwanth: i think whiteknight was showing you how the test would work with PLA, which is a good example. But it is not a test for parrot-lapack
jashwanth yes it is not 17:38
dukeleto jashwanth: that loads the bytecode of ./src/Double.winxed. When you run "winxed setup.winxed build", that is what turns Double.winxed into Double.pbc
jashwanth: *.winxed is source code, which you can feed to winxed, which has to turn it into bytecode before it runs
jashwanth dukeleto, so does it use the byte code when it runs
dukeleto jashwanth: when you convert *.winxed -> *.pbc, you can run the parrot binary on the *.pbc, without turning source code into an executable, which is much faster 17:39
jashwanth: parrot is a virtual machine that runs bytecode. If you don't give it bytecode, it has to turn your sourcecode into bytecode.
jashwanth: you can think of bytecode as basically a linked-list of stuff to do, if that helps
jashwanth dukeleto, yes so it loads the bytecode of Double.winxed then where or how can I make use of this in my test 17:41
dukeleto, my doubt is do I use the code loaded from Double.pbc 17:44
dukeleto, did you get my doubt? 17:50
dukeleto, am I wrong in my thinking ?? 17:54
dukeleto jashwanth: yes, you use the code loaded from Double.pbc (also known as the implementation)
jashwanth dukeleto, do I use it in test file 17:55
dalek rrot: ea4450c | dukeleto++ | ChangeLog:
[doc] Add some beef to the changelog
17:56
dukeleto jashwanth: $load "./src/Double.pbc" loads the code you wrote in Double.winxed so that you can use it from your test 17:57
jashwanth: does that answer your question?
jashwanth: also, it is good to actually write some code, see how it fails and if you can't figure out why it fails, paste/gist the exact error message and then ask for help in here
jashwanth dukeleto, yes it surely does
17:58 awwaiid joined
jashwanth dukeleto, but now how can I use it in here in the test file 17:58
dukeleto jashwanth: $load "./src/Double.pbc" at the top of the file, then just call dgetrf later on in the file. Try it and see what happens. 17:59
jashwanth: your job as a gsoc student is to try various things to see what works. If you get stuck on something, then you ask us 18:00
jashwanth: but asking us before you try is not good. It means you aren't learning how to learn.
jashwanth dukeleto, ok will try to do that sorry
dukeleto jashwanth: no worries! We are here to help. But we want you to try various things, then ask us when something doesn't work 18:01
jashwanth: don't be afraid to ask questions! But do try a few things beforehand. If you tell you everything, then you aren't having as much fun as you could have :)
jashwanth dukeleto, ok will try the ways if any problem pops will ask you
dukeleto s/If you tell/If we tell/ 18:02
jashwanth dukeleto, yes get the point
18:03 rich joined
dukeleto jashwanth: also, i can do code reviews. If you are not sure about code, write a few lines, commit, push to github and ask me to review 18:06
jashwanth dukeleto, yes thanks thats fine 18:07
18:09 kjs joined
dukeleto jashwanth: also, you should send me a progress report each day, via email. That way, I can answer your questions if I don't catch you on IRC 18:09
jashwanth dukeleto, ok fine am here almost here every day will do that no problem 18:10
kjs dukeleto: hi 18:12
dukeleto kjs: wazzup
kjs hi there. i seem to remember that one milestone was to implement a CRC algorithm on M0 18:13
NotFound dukeleto: puting a bytecode file in a dierctory called "src" doesn't look right.
kjs bitwise ops and bitwise constants (0b010101) are implemented in M1
whiteknight NotFound: baby steps
dukeleto kjs: indeed it was. That was what allison, cotto and I agreed upon being a litmus test for m0 being a viable language
kjs ah right. 18:14
dukeleto NotFound: agreed. We are just trying to get off the ground here and not worrying about various little nits :)
NotFound Ok
dukeleto kjs: implementing CRC in M1 sounds a lot more pleasant
kjs I suppose that milestone shouldnt be too difficult anymore. Not sure what is involved in CRC
but it has to do with bits i think :-)
dukeleto kjs: basically, you have polynomials + modular integer arithmetic, which you can turn into bit-twiddling :) 18:15
kjs it would be a good test for m1 too 18:16
dukeleto kjs: basically, we wanted to be sure m0 was turing-complete and all that jazz, so implementing CRC seemed like a good litmus test. If you implement in M1 and generate the m0, that still does what we want 18:17
kjs ok. not much time this week, but i ll see if i can find an existing algorithm
.. to port
dukeleto kjs: so I am in favor of just writing it in M1. Coding in M0 is very assembly-like and time consuming. 18:18
kjs: CRC is what is used in TCP, so many implementations about
kjs: and you can choose CRC8, CRC16, etc. The bitwidth doesn't matter, whatever works
kjs well if it's in M1, it's also available in M0. perhaps not the best code, but Some Day M1 might have an optimizer
NotFound Less you code in m0, the less temptations to add syntactic sugar to it. 18:19
dukeleto NotFound: indeed.
dukeleto is a big fan of M1
18:21 jevin joined 18:22 brrt joined 18:25 jevin joined
dalek kudo/nom: d223755 | moritz++ | src/core/Exception.pm:
fix types in error messages

Patch courtesy of Nick Glencross
18:31
whiteknight dukeleto++ # tracking down IA64 bugs 18:33
dalek kudo/no-strict: cb28ebf | moritz++ | src/core/Exception.pm:
fix types in error messages

Patch courtesy of Nick Glencross
kudo/no-strict: bfcce00 | moritz++ | src/Perl6/ (2 files):
first step towards "no strict;"

No way to test it yet, because $*STRICT is never set to a false valu
rrot: bd38fd0 | NotFound++ | ChangeLog:
winxed news
18:36
kjs aloha, nopaste? 18:39
aloha kjs: nopaste is is nopaste.snit.ch (works with the script in $_PARROT/tools/dev/nopaste.pl)
nopaste "kjs" at 89.101.178.50 pasted "CRC-type of calculation" (27 lines) at nopaste.snit.ch/144373 18:40
kjs Well, I'm not sure if it's a proper CRC (I found something on the internet and ported it), but it's complicated and it runs.
tadzik hehe
I stole mine from glib when I needed it
kjs it's a different answer than C though. might have to do with unsigned v signed vars. 18:42
whiteknight yes, signedness of chars is going to make a difference 18:43
brrt good evening 18:45
kjs M0 doesn't know unsigned types i think 18:49
dalek : 574e404 | kjs++ | src/m1. (2 files):
add ^= operator. Allow a += b in for step.
18:50
kjs hi brrt
brrt hi kjs :-)
whiteknight, i'd like some advice again 18:51
(or any other)
whiteknight I've got it in droves
whether people want it or not
brrt great
the problem is: output http headers
whiteknight forget it. Use FTP instead 18:52
brrt the method is: interconvert between some form of parrot array or hash and the apr_table_t type that apache knows
whiteknight PROBLEM SOLVED
blah, so you have to put it into that exact struct?
brrt :-) great, i'm going to advice that
none other
but yeah, lets write mod_parrot for filezilla-daeomn 18:53
whiteknight Okay, so you've got two options. First is to try and use Pointer, PointerObject and the like to build the struct up from Winxed code or you can write a C-level PMC type to wrap the struct and provide a hash-like interface
brrt well, yes, there was another 18:54
i thought about those two, but the 'other one' is to use wrapper functiions and NCI to manipulate the hash
18:54 kjs_ joined, jashwanth joined
whiteknight yeah, if that struct has an API that works too 18:55
brrt it does, luckily
whole documentation and stuff
whiteknight whichever is more comfortable for you
brrt well, none is really :-) is my point
dalek nxed: c193888 | NotFound++ | / (4 files):
jump version to 1.9.1 and update generated files
nxed: 3afe2cb | NotFound++ | winxedst2.winxed:
Merge branch 'master' into version_1_9
nxed: 3387865 | NotFound++ | pir/winxed_compiler.pir:
update installable compiler
nxed: b08e12d | NotFound++ | winxedst2.winxed:
Merge branch 'master' into version_1_9
brrt how does writing a PMC go about?
nxed: 5a1444a | NotFound++ | pir/winxed_compiler.pir:
update installable compiler
nxed: 439b0e3 | NotFound++ | / (4 files):
Merge branch 'version_1_9'
nxed: 13e6fd7 | NotFound++ | / (2 files):
jump to 1.10 devel
brrt or, yet another 18:57
iterating over a hash in C
is that at all possible? 18:58
(a parrot hash)
whiteknight yes.
brrt oh, tell me more
whiteknight let me look 18:59
brrt (a resizable pmc array works just as well for me, by the way)
dalek : dd78117 | kjs++ | examples/crc.m1:
add CRC example. Not really correct, but it's running.
19:00
whiteknight github.com/parrot/parrot/blob/mast...rgs.c#L500
the macro parrot_hash_iterate iterates over the low-level hash
brrt right 19:01
whiteknight in that code block _bucket is the thing. _bucket->key and _bucket->value are what you need
brrt that seems like it could work 19:02
src/include/hash.h 19:05
good, thank you
please don't breakthat macro in future revisions :-) 19:07
brrt brb
including hash.h doesn't seem to work very well 19:14
too bad, it was such a good option 19:20
there is another completely awesome option 19:25
moreso because it exploits a vice as a virtue 19:26
i simply concatenate the headers as a string, and then parse them at the other end
tadzik String Typing? :) 19:27
brrt which is trivial, because (a): i must copy the darn thing anyway to keep it from the prying hands of parrot
and (b): after i've copied it is is literally mine
and (c): i can thus simply tokenize upon a colon (for the key) and a newline for the value
where (d) i can literally just put zero's 19:28
19:29 eseifert joined, NotFound joined
brrt but yeah, string typing :-) 19:35
19:35 kuku joined
whiteknight brrt: Wait, are you doing this hash iteration through the API? 19:39
That probably won't work there
From inside a custom PMC you can iterate hashes like the example I showed 19:40
brrt well, that was the original plan, yes, through the api
and no, it doesn't work
:-)
i'd like to avoid creating a custom pmc to be quite honest
dalek kudo/nom: 94a8bbe | tadzik++ | src/core/Pod.pm:
Make Pod::Block::Declarator stringification more friendly
19:41
whiteknight I can understand that motivation. 19:54
Coke surely we don't need a custom pmc to iterate a hash from c... 19:55
brrt ...
i could possibly also include extend.h? 19:56
no, thats also besides the point 19:57
whiteknight no, mixing the embedding API and other APIs is not recommended 19:58
At least, not at the same level. If you want to use the internal routines you need to be inside libparrot like a dynpmc or a dynoplib
brrt hmm.... i think i'm going for the string typing method 20:00
Coke there's an iterator pmc, no? can't you get the iterator pmc of a hash pmc and walk it, all through the embedding API?
whiteknight yes
The hash brrt is talking about is not a normal Parrot hash
it's a custom struct from apache 20:01
brrt oh, that one is not the point, importing the hash
i can iterate over that one, all right, its iterating over the parrot one as a pmc that is tricky 20:03
(and with importing, i mean from apache to parrot, and with exporting, i mean the reverse)
whiteknight from winxed it's absurdly easy
from not-winxed it's harder, yes 20:04
brrt well, thanks though, i'm going to sleep now 20:06
see you tomorrow
20:06 brrt left
dalek kudo/nom: e80b1b1 | pmichaud++ | src/core/Parcel.pm:
Parcel.elems should flatten (per TimToady++ at yapc::na 2012).
20:11
kudo/nom: c203977 | tadzik++ | src/core/Pod.pm:
Fix Pod::Block::Declarator stringification, tadzik--
20:33
20:56 kjs joined 21:34 darbelo joined
dalek kudo/nom: ddfb9ff | pmichaud++ | src/main.nqp:
Bump up Parrot's recursion limit when we start (from default 1000 to 100000).
21:39
: 731d641 | kjs++ | / (6 files):
few editions to examples [WIP]. Improve variable naming. And most importantly fix the todo of getting number of elements in a particular dimension, to correctly access arrays. Also allow struct members to be arrays.
21:55
: 71afecf | kjs++ | src/ (3 files):
Handle struct member declarations similar to normal variable declarations, so they get an m1_var node. Also fix code with dimension handling in complex situatios such as x[4].y[4].z = 42.
22:22
22:30 autark joined 22:39 kid51 joined
dalek : 3db3ee0 | kjs++ | / (3 files):
correct a comment. remove the need for a local var in semcheck. Add a nice and complex test for structs and arrays combined.
22:54
22:57 whiteknight joined
whiteknight good evening, #parrot 23:00
kid51 Yo! 23:01
dukeleto kid51: i updated the ticket about /sbin/sysctl 23:07
kid51: it sounds like it is right up your alley
kid51: /sbin/sysctl is assumed to exist on linux, which need not be the case
kid51 dukeleto: I think kjs was the one who was concerned with /sbin/sysctl; I've been dealing with one of his other tickets: 791 23:13
I haven't looked at the ticket which discusses sysctl
kjs kid51: hi there. I cant remember posting that.
kid51 goes to github issues 23:14
kjs dukeleto: this works now: github.com/parrot/m1/blob/3db3ee05...structs.m1
I believe I got infinitely complex arrays and structs working. 23:15
kid51 Correction: I did comment on #792
dukeleto: I see your point now. 23:17
kjs alright. I cheered to early. oh well. 23:23
dalek : f4f0ab6 | kjs++ | / (3 files):
Found the culprit. Recent changes to the parser no longer track size for struct. This needs to be calculated in semcheck. This is a WIP and a SMOP.
23:32
: 8b50932 | kjs++ | src/gencode.c:
size != 0, not NULL, of course.
23:39