Parrot 3.5.0 "Menelaus" released | parrot.org | Log: irclog.perlgeek.de/parrot/today
Set by moderator on 27 June 2011.
dalek rrot: 1d270a0 | chromatic++ | src/gc/fixed_allocator.c:
[GC] Fixed Win32-killing type errors in d789b5.
00:04
00:08 darbelo joined 00:14 darbelo left 00:17 Limbic_Region joined
dalek rrot: e87d3d6 | util++ | runtime/parrot/library/Digest/sha256.pir:
Fix typo in sha256 comment
00:48
kudo/nom: 81a7e84 | pmichaud++ | src/core/ (7 files):
Refactor operators, add degenerate forms for reductions.
00:49
00:54 theory left 00:56 kid51 joined 01:17 kid51 is now known as kid51_at_dinner 01:35 whiteknight joined
whiteknight good evening, #parrot 01:40
chromatic++ on GC optimizations 01:50
bubaflub good evening whiteknight 01:52
01:55 Limbic_Region left
whiteknight hello bubaflub 01:56
how are you doing today?
02:00 kid51_at_dinner is now known as kid51
bubaflub not too bad 02:03
how are you?
house stuff in order?
whiteknight I'm good, but I'm heading to bed now. I'll talk to you tomorrow 02:04
02:04 whiteknight left
dalek rrot: 9a23f72 | jkeenan++ | src/gc/gc_gms.c:
[codingstd] Need space between C keyword and opening parenthesis.
02:16
rrot: a157bd0 | jkeenan++ | src/hash.c:
Fix typo in POD.
kid51 There is one test failing in: prove t/codingstd/c_arg_assert.t ... which I do not know how to correct
Failure is in src/hash.c 02:17
02:19 lichtkind left
kid51 benabik++ thanks for links 02:20
msg whiteknight Is trac.parrot.org/parrot/ticket/1682 closable? 02:22
aloha OK. I'll deliver the message.
02:38 bluescreen joined 02:48 Coke left, zostay left, zostay joined 02:54 bluescreen left 03:06 theory joined 03:13 kid51 left 03:18 Coke joined
dalek kudo/nom: c4ca652 | pmichaud++ | src/core/metaops.pm:
Handle assignment metaop on undefined lhs.
03:35
kudo/nom: 25b3ee6 | pmichaud++ | / (2 files):
Rat updates, add another spectest.
03:42 jsut_ joined 03:47 jsut left 03:54 theory left, theory joined 03:58 zostay_ joined 04:03 zostay left 04:30 theory_ joined 04:32 theory left, theory_ is now known as theory 04:37 benabik_ joined, benabik left, benabik_ is now known as benabik 05:07 soh_cah_toa left 05:08 daniel-s joined 05:09 daniel-s left, daniel-s joined
cotto ~~ 05:15
05:34 rurban_ joined 05:36 rurban left 05:37 rurban_ is now known as rurban
dalek kudo/nom: bf81ce6 | pmichaud++ | src/core/Str.pm:
Add Str.perl.
05:51
kudo/nom: 49e19c5 | pmichaud++ | src/core/Numeric.pm:
Add prefix:<-> for non-numeric types.
kudo/nom: 96cb354 | pmichaud++ | NOMMAP.markdown:
NOMMAP update for my ($, $) = ...;
kudo/nom: f7f0c00 | pmichaud++ | / (2 files):
More fixes for Range class, now pass S03-operators/range-basic.t .
06:09 fperrad joined 06:23 mj41 joined 06:25 zby_home left 06:43 theory left 06:45 mj41 left 06:49 UltraDM joined 07:33 fperrad left 07:36 giwi joined 07:45 fperrad joined
dalek kudo/nom: baaef99 | pmichaud++ | src/core/operators.pm:
Handle reversing sequences (e.g., 'z'...'a').
08:54
kudo/nom: 602c0af | pmichaud++ | src/core/ (4 files):
Some additional Range methods.
08:58 Coke left, Coke joined 09:30 lichtkind joined 09:57 JimmyZ joined 10:13 wagle left
dalek rrot: 9759af2 | mikehh++ | src/hash.c:
run make headerizer to remove function info for function
10:16
10:20 wagle joined 10:21 whiteknight joined
whiteknight good morning, #parrot 10:27
tadzik good morning whiteknight 10:29
whiteknight good morning, tadzik 10:33
tadzik how are you doing whiteknight? 10:34
whiteknight doing well. Tired and sore from a busy day yesterday 10:35
10:36 JimmyZ_ joined
whiteknight interesting article about the V8 javascript compiler internals: wingolog.org/archives/2011/07/05/v8...-compilers 10:39
10:40 mls joined
mls Hi guys, I get a segfault if I run miniparrot with an unsupported LC_CTYPE, is this known? 10:41
10:42 JimmyZ left, JimmyZ_ is now known as JimmyZ
mls (interp->ctx is NULL, but it is referenced in Parrot_pcc_warnings_test) 10:42
(it wants to print "Unknown codeset `%s', defaulting to ASCII", src/warnings.c:111) 10:43
whiteknight you're running miniparrot directly? 10:44
mls the parrot build process runs it
whiteknight oh, okay. So you're running a build, and miniparrot is segfaulting because of an unknown codeset error? 10:46
mls yes. I've got LC_CTYPE set to de_DE@euro for historic reasons and the build segfaults.
The call chain is initialize_interpreter -> Parrot_str_init -> Parrot_encodings_init -> Parrot_init_platform_encoding -> Parrot_warn 10:47
whiteknight oh, okay. I'm not too familiar with how parrot handles LC_CTYPE
okay, that makes sense
let me look at the code real quick 10:48
what OS are you on? 10:49
mls linux
problem is that interp->ctx is till PMCNULL when Parrot_warn is called
^still 10:50
whiteknight right
okay yeah, I see exactly what the problem is 10:51
I've got a fix, testing it now 10:52
dalek rrot: 002e279 | Whiteknight++ | src/warnings.c:
In Parrot_warn, check that we have a valid interp->ctx before doing flag testing on it. If we warn during interp initialization, bad things might happen otherwise. mls++ for the report
10:55
whiteknight okay, that commit should at least avoid your current segfault
mls Thanks for the prompt fix! 10:56
whiteknight thanks for the report!
10:56 mls left 11:03 fperrad left
mikehh whiteknight: have you had any thoughts on the "broken" threading stuff in parrot, still getting random segfaults 11:04
whiteknight mikehh: my thoughts on it are the same as they've always been: We should delete that test file
mikehh was looking at that, everybody from way back has been involved with that test 11:06
have you had any ideas on what to replace it with, tried to catch some stuff and it segfasulted somewhere else
11:07 fperrad joined
whiteknight mikehh: no replacement. I want that test and the entire threading system as it currently stands to be removed 11:08
TiMBuS ^
mikehh whiteknight: ok, what have you in mind there, we definately need some way of handling a) concurrency and b) hardware threads 11:10
most modern processors have multiple hardware threads of some sort
whiteknight mikehh: that's a good question. I'm not sure I entirely have a great answer yet 11:12
I do know that what we have now is broken and does not work reliably
TiMBuS threads suck, but not having threads sucks more.
whiteknight we basically don't have threads now. What we have doesn't work
and we have tests for it which randomly fail
mikehh as I see it we can go with the erlang type approach or maybe golang which might be a good idea 11:14
TiMBuS related note: hows async IO going D: 11:15
mikehh TiMBuS: I don't think anyone is working on that at the moment :-{
TiMBuS i recall whiteknight wanted to implement it at some point, then build all IO (including blocking) on top of that 11:16
11:17 daniel-s left
whiteknight I did want to work in async IO, but we needed threading improvements first 11:17
mikehh whiteknight: yup, that is the way I see it 11:18
whiteknight mikehh: I was pushing for an Erlang-style approach to concurrency: high-level tasklets multiplexed onto hardware-level threads
TiMBuS wait, do you mean we need threads to make async IO or that threads are more important
because, you can have non threaded async IO (epoll, etc) 11:19
whiteknight we need threads for async IO. At least, we need the current threading implementation to get out of the way
mikehh TiMBuS: I think both
whiteknight not all systems support epoll
TiMBuS windows has nonblocking. not sure how it can wait
11:22 mtk joined
tadzik TiMBuS: I know something about this async IO 11:25
TiMBuS tell me your secrets :o
tadzik basically, there's a Select PMC which gives us some async capabilities. There's a Trac Ticket for that, the PMC is working all right I think, but the interface it should have is still not decided. If you figure out and design a worthwhile interface for it, you should be able, after poking cotto++, bring the Select PMC to Parrot master 11:26
see trac.parrot.org/parrot/ticket/2034 11:27
JimmyZ thought most people like libevent/libev or linux epoll, not select 11:29
TiMBuS i dont think it's actually using 'select' 11:30
cotto has already suggested a very sensible interface. it's exactly what i'd expect 11:31
11:38 Coke left, Coke joined
tadzik then you only have to poke cotto to implement it 11:41
dalek kudo/nom: e6f88ff | (Solomon Foster)++ | src/core/Bool.pm:
Fix infix:<?^> copy/paste glitch.
11:42
11:52 Coke left, Coke joined 12:08 Coke left
dalek kudo/nom: 5cd26f6 | (Solomon Foster)++ | src/core/Numeric.pm:
Fix infix:<!=> copy/paste glitch.
12:08
12:08 Coke joined
dngor Hey, high-level tasklets multiplexed onto hardware-level threads: www.mail-archive.com/perl6-internal...04573.html 12:14
Related: www.mail-archive.com/perl6-internal...02208.html 12:17
12:19 lucian joined
whiteknight dngor: the question is what parrot should provide. A hybrid threading approach like that is good, but it's a lot of implementation at the parrot level and might not be useful for all our HLLs 12:20
if we implement that, some people may be forced to do ugly workarounds and abstractions to get what they want
JimmyZ the problem is who does coding 12:23
dngor Fair enough. I was designing by example with a specific language in mind.
12:24 Coke left 12:25 Coke joined
dngor What sort of ugly work-arounds come to mind? I'm drawing a blank. 12:26
JimmyZ parrot's OO, that's why jnthn designed 6model 12:28
dalek sella: 12c979c | Whiteknight++ | s (5 files):
Rename Template.winxed -> Engine.winxed. Move NodeFactory.winxed -> node/Factory.winxed.
sella: 2083586 | Whiteknight++ | src/unstable/template/handler/For.winxed:
Reset magical loop vars so for loops can be reentrant. Fix detection of is_last for hashes, so 1-element hashes the first element is the last
sella: ae09555 | Whiteknight++ | src/unstable/template/handler/For.winxed:
fix is_last detection for arrays
sella: 5957194 | Whiteknight++ | src/unstable/template/handler/For.winxed:
Fix error detection and reporting for reserved variable names
whiteknight dngor: that's a good question too. If we can find a system that can reasonably accomodate all users, there's no reason Parrot can't implement it 12:33
12:33 mj41 joined 12:41 bluescreen joined 12:51 M_o_C joined 12:52 NotFound_b joined
NotFound_b asynch and non-blocking are different beasts. 12:54
Coke sighs. 12:55
Coke sees aloha is doing a bangup job. 12:57
msg dukeleto FYI, jal******o@gmail.com has (had) rights on the comp.lang.parrot calendar for a while. 13:03
aloha OK. I'll deliver the message.
Coke when is the PS meeting at going forward?
msg bacek aloha isn't decanting messages when someone emotes into a channel. ("/me says hi" vs. just "hi") 13:04
aloha OK. I'll deliver the message.
Coke ponders why he cannot end the parrotsketch meeting on jul 5, 2011. 13:06
there we go. 13:07
msg cotto meeting updated to 1930-2030 GMT 13:11
aloha OK. I'll deliver the message.
13:11 whiteknight left
Coke msg dukeleto meeting updated to 1930-2030 GMT 13:11
aloha OK. I'll deliver the message.
13:12 whiteknight joined
Coke aloha parrot calendar is editable by coke, dukeleto, whiteknight, particle and half a dozen others. 13:15
aloha Coke: Okay.
13:22 M_o_C left 13:23 mj41 left, mj41 joined 13:35 rurban_ joined 13:36 rurban left, rurban_ is now known as rurban 13:39 mj41 left 13:43 daniel-s joined
dalek sella: 7ffac9d | Whiteknight++ | src/unstable/template/Engine.winxed:
Add a new method Engine.generate_from_file
13:49
13:49 daniel-s_ joined
dalek sella: 1a679e1 | Whiteknight++ | src/unstable/template/Engine.winxed:
redo the interface to Template.Engine to make regions more configurable. Users can add new region types, remove region types, and modify existing regions
13:49
13:50 giwi left, JimmyZ left, daniel-s left
bubaflub ~ 13:53
13:56 Coke left, Coke joined
whiteknight good morning, bubaflub 13:59
14:00 daniel-s_ left 14:10 daniel-s joined 14:15 daniel-s_ joined 14:16 daniel-s left 14:21 mj41 joined
dukeleto ~~ 14:36
14:37 UltraDM left
whiteknight good morning, dukeleto 14:41
14:53 darbelo joined
dukeleto whiteknight: how goes the new place? 14:53
whiteknight not there yet
settlement on the 22nd
dukeleto whiteknight: moving to a different city? 14:54
whiteknight no, only about 30 minutes away. About 1/10th of a radian clockwise around philadelphia from where I am now 14:55
maybe less than that. It's hard to estimate radians
dukeleto whiteknight: indeed, especially without a protractor 14:57
14:59 theory joined 15:03 lucian_ joined 15:06 lucian left 15:10 theory left 15:15 daniel-s_ left, daniel-s joined 15:21 daniel-s_ joined, daniel-s left 15:26 daniel-s__ joined, daniel-s_ left
dukeleto benabik: you have any thoughts on the recent parrot-users email about NQP? 15:30
15:31 _daniel-s__ joined 15:32 _daniel-s__ left, daniel-s__ left 15:33 daniel-s joined
Coke gmail sez: (This message may not have been sent by: jayemerson@gmail.com Learn more Report phishing) ... I assume this is a list setting we could tweak? 15:38
dalek TT #1636 closed by dukeleto++: Functions need to be added to the embed/extend API headers 15:40
TT #1636: trac.parrot.org/parrot/ticket/1636
dukeleto Coke: i gonna delete the 6perl talk from our calendar, since it doesn't happen anymore
15:41 dmalcolm joined
Coke dukeleto: ok. Just edit it so it ends this week. (or whenever it ended.) 15:42
Coke hopes his lack of attendence was not the killer on that one. ;) 15:43
15:46 ambs joined
Coke spork 15:47
mmm, lunchtime.
15:49 JimmyZ joined
dalek nxed: 9ce7c68 | NotFound++ | winxedst1.winxed:
stop using vtable get_bool and get_integer instead of iseof in Token
15:50
15:53 daniel-s left 15:56 JimmyZ left 15:57 giwi joined
dukeleto Coke: it's been ended 15:59
dalek kudo/podparser: e258ef5 | tadzik++ | src/Perl6/SymbolTable.pm:
Allow named parameters to new_type in add_constant()
16:02
kudo/podparser: 9d33af3 | tadzik++ | / (2 files):
Import as little Pod classes as needed, less hacky than before due to default .new working again
kudo/podparser: e653b7f | tadzik++ | src/Perl6/ (2 files):
Build (empty so far) $POD variable
16:06 theory joined 16:07 theory left, theory joined
Coke dukeleto: I got an edit message from you on the parrotsketch weekly meeting. 16:08
not on the perl6 phone call meeting.
dukeleto: UGH. you edited the meeting retroactively?
also UGH: I had already fixed the parrotsketch meeting. 16:09
ah. it's only retroactive back to 6/28? that's less confusing that I feared. 16:13
dukeleto Coke: i didn't hear from you that you edited it. Miscommunication. 16:14
Coke: sorry, i will let you deal with calendar stuff
Coke dukeleto: ... I do not /want/ to deal with calendar stuff exclusively. That is not the takeaway i wish you to have. 16:16
dukeleto Coke: i already wear too many hats, so I am bowing out of calendar duty 16:20
dalek rrot-libgit2: 03a5234 | dukeleto++ | / (4 files):
Improve error reporting about unknown NCI datatypes and add a few more
16:22
rrot-libgit2: 0fbd602 | dukeleto++ | / (2 files):
Create a proper nci file header
rrot-libgit2: 21ab174 | dukeleto++ | src/git2.pir:
Add a PIR file that $PARROT/tools/dev/ncidef2pir.pl generated from src/git2.nci
benabik dukeleto: I apparently forgot to subscribe to parrot-users. Checking the archive. 16:27
16:27 whiteknight left
dukeleto benabik: Coke++ already answered the question, but you should still be on that list :) 16:27
16:27 whiteknight joined
benabik ~~ 16:32
whiteknight hello benabik 16:35
benabik Heyo, whiteknight. How's things?
whiteknight pretty good. Having a nice lazy day after the crazy one yesterday 16:36
benabik Laziness is a programmer's virtue. :-D 16:37
whiteknight well, "lazy" in this case means we are staying home cleaning, packing, programming, and doing all sorts of other stuff 16:38
bubaflub ~ 16:40
whiteknight hello bubaflub 16:43
bubaflub hello whiteknight
dalek sella: 09e6835 | Whiteknight++ | src/co (7 files):
misc cleanups to core and container
16:44
sella: 69ef47f | Whiteknight++ | src/test/Test.winxed:
[Test] draft two new utility functions for creating, but not running, a suite
whiteknight how are you doing today, bubaflub?
bubaflub whiteknight: alright - pretty tired. my wife and i are moving soon so lots of stuff to clean and pack up, which i'm sure sounds familiar. 16:45
whiteknight bubaflub: ah, I know that story. We're working on moving ourselves
but we haven't made settlement yet, so not doing a lot of packing/moving yet
bubaflub whiteknight: ah. our currently lease is up the 23rd but out new one doesn't start till August 1st so we're trying to see if we can move into our new place early... if not we'll have to move in with some friends for a bit. 16:46
whiteknight ouch, that's rough. What town are you in?
bubaflub Champaign-Urbana, IL. it's where the University of Illinois is 16:48
center for super computing, place where the mosaic browser was invented, and so on
Coke does parrot-nqp allow multi-subs? 16:50
benabik I believe so.
whiteknight Coke: yes 16:52
Winxed currently does not 16:54
dalek kudo/podparser: 6a71d46 | tadzik++ | src/Perl6/SymbolTable.pm:
[SymbolTable] Include the %named parameter signature in the cache key creation
16:57
NotFound_b bubaflub: and HAL-9000 16:58
Coke "our multi sub print(ResizablePMCArray $foo) {} # doesn't compile in nqp-rx.
bubaflub NotFound_b: true.
17:01 mj41 left, whiteknight left, whiteknight joined
Coke perhaps I have an outdated parrot-nqp. rebuilding... 17:01
tadzik Coke: conflicts with the existing print(), yep?
Coke tadzik: ah, very possibly. 17:02
(aye, that's it) 17:04
17:07 bluescreen left, zby_home joined 17:16 Eclesia joined
Eclesia hi 17:16
Coke tadzik++ # forgot to give you a shout out in the parrot-users post.
tadzik no worries :) 17:17
17:19 mj41 joined
cotto_work ~~ 17:25
dalek nxed: 5275afa | NotFound++ | winxedst1.winxed:
refactor and fix pir encoding of string literals
17:28
NotFound_b Eclesia: this should fix your problem with hex escape sequences 17:29
Eclesia NotFound_b: thanks. I'm going to try :) 17:30
NotFound_b Eclesia: Are you using winxed from its git repo?
Eclesia NotFound_b: I don't have winxed repo. only parrot. 17:31
NotFound_b Eclesia: then you must wait until I update the parrot snapshot
Eclesia ok 17:32
NotFound_b: did you take a look at namespace too ?
tadzik where can I read about PAST::Op methods?
NotFound_b Eclesia: You mean namespaces with unusual names? 17:33
Eclesia yes
NotFound_b Eclesia: no, I don't plan to work on that before the parrot stable release.
Eclesia ok 17:34
dalek nxed: 800ca4e | NotFound++ | pir/winxed_compiler.pir:
update installable compiler
17:36
rrot: bb4d3c9 | NotFound++ | ext/winxed/compiler.pir:
upadte winxed snapshot to get literal string escape fixes
17:39
cotto_work TiMBuS: post in the ticket for the Select PMC which interface you'd prefer and I'll make it happen. 17:40
17:43 mj41 left
dalek rrot: bba5080 | NotFound++ | ext/winxed/compiler.pir:
upadte winxed snapshot to get literal string escape fixes
17:47
Eclesia NotFound_b: traitor, I pulled between the commits :D 17:49
NotFound_b Eclesia: sorry
17:53 ligne left
Eclesia NotFound_b: nice work :) ftp://ftp-developpez.com/jsorel/temp/treesnapshot.png (at the bottom) 17:56
NotFound_b Eclesia: good
Eclesia hm, that mean perhaps my x3.64 code will work too 17:58
dalek nxed: 5f588f5 | NotFound++ | winxedst1.winxed:
proper error for invalid escape in literal string
18:02
18:08 NotFound_b left
cotto_work seen sorear 18:12
aloha sorear was last seen in #perl6 6 days 12 hours ago saying "perlhack: in English forums, we abbreviate "thank you" to "ty"".
18:12 jay joined
dukeleto jay: howdy 18:13
jay Howdy! My first IRC.
cotto_work jay++
and your first karma
tadzik hello jay 18:14
Eclesia jay: you know the rule: first IRC = pay a beer to everyone ;) 18:15
jay Hello all. Thx for replies and posts on parrot-users. Struggling... but learning.
Mmm... beer. How often do you folks actually get together offline?
tadzik knows about 2 persons on the channel in person 18:16
cotto_work jay: not often enough
Eclesia knows ... 1 (me)
atrodo I now know a few, but that's only because of YAPC::NA
cotto_work Eclesia: where are you at? 18:17
dalek kudo/nom: b20c00f | pmichaud++ | src/core/Cool.pm:
Add Cool.rand.
kudo/nom: 9e91676 | pmichaud++ | src/core/ (3 files):
Add List.pick, Any.pick, and Range.at_pos.
Eclesia cotto_work: france
cotto_work ah, so you're in fperrad's area (or country, at least)
Eclesia cotto_work: hm .. looks like he is only 200km from me :D 18:19
cotto_work great. That's walking distance, right?
;)
Eclesia 'walking' he says :p
too hot to walk, better stay in the shadows this days 18:20
18:36 donaldh joined 18:43 alester joined 18:44 mj41 joined
alester What's all this jibber-jabber about less C? 18:45
How will I have anything to work on?!?
alester sobs
18:47 donaldh left
jay Can someone point me to docs explaining the creation of a custom class in NQP? I see the PIR docs on classes... 18:48
cotto_work jay: unfortunately the best docs on nqp tend to be its test suite. 18:49
tadzik jay: You could read some Perl 6 docs
chromatic++ # blag post
cotto_work tadzik: that works if you don't mind guessing how much of the spec is implemented by nqp. 18:50
jay cotto_work: I was about to write something like that. I feel like I'm guessing at everything. !-)
Eclesia jay: learn pir first.
tadzik cotto_work: true
Eclesia: why so?
benabik I have generally found the best reference for NQP is the tests.
atrodo chromatic++
benabik (Mixed with knowledge of P6)
jay Eclesia: interesting. A character-building experience? 18:51
cotto_work github.com/perl6/nqp/tree/master/t/nqp (specifically, github.com/perl6/nqp/blob/master/t...subclass.t )
benabik cotto_work++
Eclesia jay: just my personnal experience for my project : I made this order . Parrot PCT > NQP > PIR > WINXED 18:52
starting with nqp and pct was not a good idea. starting on pir is more ... friendly
jay: but I don't know what you want to do so I may be wrong 18:53
dalek kudo/nom: 1f8fe70 | moritz++ | src/core/Pair.pm:
Pair.ACCEPTS
kudo/nom: 8aa37ff | moritz++ | src/core/Numeric.pm:
add Numeric.Bool -- but it does not seem to get called at all
cotto_work "friendly" isn't the word I'd use, but it is the foundation on which a lot of Parrot and its tools are built.
Eclesia cotto_work: friendly in the way : you can understand what's going on. not like the pct ... 18:55
cotto_work Eclesia: I have found PIR to be more discoverable.
jay I'm trying to implement the basics of a language like Matlab/Octave (called R). I can mimik most of the grammar and do some things in Runtime.pm to be approximately right, but I'm to the point where I think I need to understand more about the "big picture" of designing like this, not just the superficial behavior of squaak-type use code.
atrodo cotto_work> really odd question, that maybe doens't need an answer. But do you think it'd be possible to port a real C compiler to m0 and would that help any? 18:56
18:56 eqhmcow joined
cotto_work atrodo: your question makes a large number of assumptions that make it hard to answer. What would you want to build with the C/M0 compiler? 18:57
atrodo cotto_work> off hand, i'm thinking parrot
cotto_work tcc would be a logical starting point, but you can't use tcc to build parrot as it stands.
atrodo cotto_work> I was looking at pcc last night 18:58
cotto_work atrodo: has it matured any? last I checked it still had a very manual build process.
whiteknight jay: yes, it's an important boundary
atrodo cotto_work> It looked usable. It hit "1.0" last april
cotto_work chromatic++ for blagging 18:59
cotto_work goes in search of noms
whiteknight jay: NQP is a weird middle language. It's a subset of Perl6 with its syntax, but an overlay on top of PIR with Parrot semantics
jay: so learning either Perl6 or PIR better should help you with more NQP 19:00
Coke alester: We'll need you to develop M0lint. 19:01
perhaps we could call it "curly"
jay whiteknight: in a previous life I was ok with Perl 5, and found that it could be pretty unreadable; it was often easier to rebuild a tool than to figure hour how I wrote the code in the first place (almost anything was valid Perl code). On the other hand, PIR seems so... verbose. But the docs seem easier to find and more complete, and I wrong? 19:02
Eclesia jay: or if you prefer C like syntax. winxed is more adapted
whiteknight jay: not wrong at all. PIR is like the assembly language for Parrot, so it's a huge pain and it's ugly 19:03
jay: that's a big part of the reason why we have NQP in the first place, to sheild us from PIR
19:04 mj41 left
whiteknight I find that Perl6 also shares some of the "difficult to read" problems with perl5, but NQP being a relatively small subset seems to steer clear of most of them 19:04
Coke eh. difficult to read is in the eye of the beholder. 19:06
atrodo whiteknight> I disagree. I find nqp hard to read. Mostly because it's different from perl5 enough to make me think i have a clue what's going on
whiteknight Coke: yes, it is. You're right 19:07
jay I love a good debate. It's interesting (to me as an outsider) to hear the perspectives... 19:08
Parrot seems most interesting because of the ease with which it integrates these and allows for choice.
Eclesia is searching to test a string against a regex in winxed ... any idea ? 19:09
whiteknight Eclesia: what kind of regex? Like a perl-5 style regex? 19:10
Eclesia jay: if you want the opinion of a java developer. pir is not ugly but verbose and straight forward. perl and nqp are horrible syntaxes ^^
whiteknight Eclesia: we don't have regexs built in, but we have bindings to libpcre
Eclesia whiteknight: .. thanks, nevermind I'll do without ... 19:11
dukeleto jay: parrot is a good platform for research, precisely because just about everything is pluggable
whiteknight Eclesia: it's really not hard to do!
Eclesia whiteknight: I understand but I would like to avoid any dependency not already in parrot 19:12
whiteknight okay
19:12 everbrew joined
dalek nxed: ea50d17 | NotFound++ | t/harness:
use utf8 encoding to read test output in harness
19:13
Coke chromatic++ # 19:16
dukeleto everbrew: howdy 19:17
everbrew howdy
I'd forgotten about this channel until chromatic mentioned it 19:18
bubaflub everbrew: welcome
everbrew thanks
dalek nxed: 45ce12f | NotFound++ | t/advanced/01string.t:
some tests for hex escape sequences
19:21
19:23 fperrad left, giwi left 19:26 giwi joined
dalek nxed: cdd0246 | NotFound++ | token.cpp:
diagnose invalid or unsupported escape sequences in stage 0
19:29
nxed: 809488c | NotFound++ | winxedst (2 files):
new builtin function escape
19:36
Eclesia NotFound: if I want to print an object in 'say' or 'print' . I should provide a method 'get_string()' on my class but looks like it doesn't find it 19:50
NotFound: is it a different name in winxed ?
bubaflub Eclesia: you have to do something like
function get_string[vtable]() { ... }
benabik Eclesia: It has to be a get_string VTABLE. IIRC, it's something like method get_string[vtable]() in winxed
Eclesia: Ignore me, bubaflub appears to know the right syntax. :-D 19:51
Eclesia ^^ thanks both
bubaflub Eclesia: if you want it both as a vtable and a method you'll have to do some other stuff
Eclesia just want to be able to print the object directly 19:52
NotFound Yes, that's the way. 19:54
19:56 lucian joined 19:59 lucian__ joined 20:00 lucian_ left 20:03 lucian left, Eclesia is now known as Eclesia_afk
dalek kudo/nom: 3763c60 | pmichaud++ | src/core/Any.pm:
Add sub pick().
20:08
20:19 tempire joined
jay In squaak, b = [1,2,3] prints 3: what mechanism is causing this printing, rather than just giving the prompt? 20:20
(where 3 is the length of the thing, not the last element) 20:21
tadzik It stringifies and prints the last statement I suppose
benabik The last value.
tadzik where your last element is b
yes, value
benabik It's part of the REPL: Read-Execute-Print Loop.
jay No, b = [0,0,0] also prints 3.
whiteknight yeah, it's part of the REPR
Coke it's easier to see with b=[1,2,4]
tadzik yes, because b stringifies to 3 20:22
whiteknight you're running it from the commandline, not from a file?
Coke jay: yes, the value is "the whole thing."
jay Ok, so how do I turn this off and prevent the printing?
Commandline, yes.
Coke it's the REPL. it does that.
tadzik don't use REPL. REPL prints
it's the P in REPL, as benabik said
Coke if you just want to try one liners, use -e "foo" instead.
e.g. parrot-nqp -e "b=[1,2,3]" 20:23
jay Unless I'm missing something, I don't see any REPL anywhere in the squaak action or grammar, I really need more of a hint on what to modify, I would have thought something in the Actions.pm file?
tadzik it's inherited from HLL::Compiler I believe 20:24
and deal with this printing: it's the point of the whole thing! :)
benabik PCT::HLLCompiler, I think it is.
tadzik you can run your programs from files, that won't engage the REPL
jay Surely an interactive language should be easily customizable, I don't see any reason that doing an assignment should also trigger a print. 20:25
benabik Particularly PCT::HLLCompiler.interactive.
dukeleto jay: yes, i agree with you 20:26
whiteknight jay: it's just the nature of the beast. HLL::Compiler does that automatically when you're running interactively from the commandline
dalek rrot-libgit2: f8774f2 | dukeleto++ | / (2 files):
Add git_strarray and git_rtype datatype mappings
Coke jay: if you reaaaaaaaaaaaaaaally want to override it, you can. But all the interactive modes I know do that, and now you get it for free.
benabik jay: It will print whenever a statement returns a value. Assignment could be made to not return a value, but that makes chaining harder. (i.e. a = b = 1) 20:27
cotto_work ~~
jay So is this an option that I can override, or is this the cost of using HLLCompiler?
Coke: a language like R or matlab would not print on an assignment, for example.
tadzik that's not a case of a language I believe 20:28
Coke it's likely overridable.
in this case (and I know this almost never happens), you are the first person to ask.
jay lol ok, I'm willing to ask crazy questions. 20:29
dalek sella: b396626 | Whiteknight++ | src/harness/testfile/Factory.winxed:
Respect :recurse(0) in TestFile.Factory
benabik You can override <YOUR_HLL>::Compiler.interactive
github.com/parrot/parrot/blob/mast...r.pir#L604 20:30
20:30 Eclesia_afk is now known as Eclesia
tempire Is parrot, in its current state, considered stable? 20:31
cotto_work tempire: Parrot exposes many interfaces. Some are stable and will be aggressively support, some are known to be broken and will be ripped out when we find the tuits. 20:32
*supported
Coke we try hard not to say "stable", but go for "supported".
cotto_work tempire: what part of Parrot are you asking about?
tempire I'm not educated enough about it to even answer that question.
I've just gone through the intro and getting started docs
jay benabik: I'm a real newbie, thanks for the link. So if I care enough, then I make my own version of that interactive method, then figure out how to override the default? 20:33
cotto_work tempire: ok. If you depend on PIR, we'll try hard to make sure your code continues to work with future Parrots.
tempire: If you use the embedding API, same deal.
The extending API also got a major bump in test coverage from dukeleto++, so we should know pretty quickly if we break it. 20:34
benabik jay: Right. Although the easiest way is to have statement level assignment not result in a value.
jay: That's a matter of tweaking your grammar and actions.
Coke ... FSVO easy.
it's the wrong approach, IMO. if he doesn't want the output, he should disable the output, not muck with his language. 20:35
benabik If you never want output, then disabling the output is better.
If you just don't want output on assignments, teaching interactive to do that will be tricky.
tempire cotto_work: so pasm is in flux, correct?
Coke no. 20:36
cotto_work tempire: PASM should be avoided where possible. Its original goal was to be a textual form of bytecode, but it can't do that very well.
jay Well, I want output via functions like print() and say(), or if the statement is only a term (haven't gotten to this, yet). So it sounds like disabling the printing in interactive mode is the way to go.
dalek sella: c15fa01 | Whiteknight++ | src/harness/testfile/Factory.winxed:
Fix TestFile.Factory
cotto_work It's not in flux, but you'll be less sad if you write PIR and still less sad if you use something like winxed or nqp.
dalek rrot-linear-algebra: 87bf68f | Whiteknight++ | t/harness:
cleanups for harness
20:37
rrot-linear-algebra: c48ee89 | Whiteknight++ | t/ (44 files):
Many fixes to the test suite and harness. We run all test files (in the correct orders), but are failing several tests
jay cotto_work: you guys are funny... someone earlier would have argued that using PIR would make me less sad then nqp. Fortunately, I'm just a happy guy. 20:38
whiteknight tempire: PASM is an internal implementation detail. Use PIR instead. Or, better yet, use something higher level
tempire so NQP, and PIR if necessary
cotto_work jay: I guess it depends on your personality and how familiar you are with Perl 6 and nqp.
whiteknight tempire: we have two medium-level languages that should work for most needs: Winxed (Inspired by c++ and javascript) and NQP (inspired by PErl6)
tempire seems to be the impression i get
ah, ok 20:39
whiteknight tempire: if you want to waste your time writing the equivalent of assembly language, you're welcome to do that too :)
benabik Although I don't know it as well, my impression is that Winxed is much closer to how Parrot actually works.
(than NQP)
whiteknight tempire: I am going to guess your time is a little bit more valiable than that
dukeleto jay: happiness is a very relative function :) Some parrot hackers still really like PIR, but most would prefer something higher-level these days 20:40
NotFound dukeleto: Really? 20:41
dalek rrot: 96fac30 | NotFound++ | / (3 files):
minimal test of the bundled Winxed
rrot-libgit2: 71c27d4 | dukeleto++ | Makefile:
Add a target to generate pbc
20:43
kudo/nom: 9209833 | moritz++ | t/spectest.data:
four more passing test files
20:46
kudo/nom: 537ad6b | moritz++ | NOMMAP.markdown:
note MMD failure in NOMMAP
jay Ok, I'm ready to try to learn something by hacking the interactive method and the overriding the default. But I don't have a clue where to put my version or how to declare the override. My guess is Compiler.pm or src/nqr.pir (nqr is the name of my language)?
moritz Compiler.pm sounds right 20:47
in the class that inherits from HLL::Compiler (or whatever it's called in whatever version of the toolchain you're using)
jay So if I define .sub 'interactive' : method in my Compiler.pm, then my version would be used in place of the one that would have been inherited from the HLL::Compiler? 20:48
dalek kudo/nom: 45465fa | pmichaud++ | src/core/List (2 files):
Fix handling of $!nextiter in lists when a third-party triggers reification.

duplicate the elements of the List.
Coke jay: that certainly SOUNDS reasonable. ;) 20:49
jay lol... I should stop asking and just try it... thanks.
moritz if it's a .pm file, you shouldn't use PIR in it :-)
benabik It's not `.sub 'interactive'`. That's PIR.
Coke (I would say yes or no, but I'd have to try it myself first to try it...)
moritz then just method interactive(*%adverbs) { ... } 20:50
jay Ah -- and then wrap the PIR code in Q:PIR { } ?
moritz or jsut write NQP code, not PIR 20:51
jay moritz: well, it seems that getting the current PIR code working in "my" own version is less likely to be a disaster.
benabik jay++
jay: That's exactly what I've been doing in my PIR -> NQP translations. Start with a big Q:PIR block. 20:52
jay Here's feedback (no question): I think Q:PIR is really cool. I wrote a function for generating sequences in two ways, once in NQP and once in PIR via a Q:PIR block. Learned a lot. Cool. 20:53
dalek kudo/nom: 5327931 | moritz++ | t/spectest.data:
another passing integration test
20:59
whiteknight jay: everything we do around here turns into a disaster. Have fun with it! 21:03
jay Thanks. Hmm... getting error:imcc:The opcode 'is_cclass_i' (is_cclass<1>) was not found. Check the type and number of the arguments 21:04
in file 'src/gen_compiler.pir' line 151
included from 'src/nqr.pir' line 1
.... Would there have been changes to the interactive method between parrot versions 3.3.0 and 3.5.0?
21:04 mj41 joined
moritz is_cclass_i looks like it needs many more arguments than 0 (and returing 1) 21:07
jay Just tried my version, no difference. So having method interactive(*%adverbs) { return Q:PIR { ... }; } of the PIR code from HLLCompiler.pir just may not be a legal hack. 21:09
moritz it's fine, as long as you return a value from Q:PIR { ... } with %r = $P0 or so 21:10
jay This error seems unrelated to the return though? 21:11
moritz yep, it seems that the PIR inside the Q:PIR is wrong 21:12
jay AH: do I need something like .include 'cclass.pasm'
.include 'iglobals.pasm' as well?
moritz might be
whiteknight is_cclass_i is not an opcode 21:14
dalek kudo/podparser: b20c00f | pmichaud++ | src/core/Cool.pm:
Add Cool.rand.
kudo/podparser: 9e91676 | pmichaud++ | src/core/ (3 files):
Add List.pick, Any.pick, and Range.at_pos.
kudo/podparser: 1f8fe70 | moritz++ | src/core/Pair.pm:
Pair.ACCEPTS
kudo/podparser: 8aa37ff | moritz++ | src/core/Numeric.pm:
add Numeric.Bool -- but it does not seem to get called at all
kudo/podparser: 3763c60 | pmichaud++ | src/core/Any.pm:
Add sub pick().
whiteknight so it's definitely a parse error somewhere
kudo/podparser: 9209833 | moritz++ | t/spectest.data:
four more passing test files
kudo/podparser: 537ad6b | moritz++ | NOMMAP.markdown:
note MMD failure in NOMMAP
kudo/podparser: 45465fa | pmichaud++ | src/core/List (2 files):
Fix handling of $!nextiter in lists when a third-party triggers reification.

duplicate the elements of the List.
kudo/podparser: 2780997 | tadzik++ | / (10 files):
Merge branch 'nom' into podparser
kudo/podparser: 728d0f8 | tadzik++ | src/Perl6/ (3 files):
Construct Pod blocks from delimited blocks, use Lists instead of Arrays per moritz++'s suggestion
21:25 jevin left
dalek kudo/nom: bd3df2f | pmichaud++ | src/core/ (2 files):
Add List.roll, Any.roll, &roll and &join.
21:30
kudo/nom: a4a40c0 | pmichaud++ | src/ (2 files):
Make Range smart enough to return Int instead of Num, add temporary opcode
kudo/nom: 91f014c | pmichaud++ | t/spectest.data:
Add S02-builtin_data_types/range.t .
jay whitenight, I just posted to the users list, figuring I must be doing something trivial wrong in the way I try to override the interactive method. Not a big deal, but if I can fix and understand it, I'd probably learn something useful. 21:31
21:32 ambs left 21:34 rurban_ joined 21:37 rurban left 21:38 rurban_ is now known as rurban
dukeleto jay: glad to see you diving in head first :) 21:39
jay Diving... I don't know. I think I know enough to be dangerous... I think I can fly when I should probably concentrate on walking, first. 21:42
21:42 Psyche^ joined
NotFound jay: You need to include cclass.pasm to use .CCLASS_NEWLINE 21:43
dukeleto jay: the difference between swan diving and flying is vanishingly small :) Perhaps of measure 0 ...
jay NotFound. Yeah, sorry. I tried that, and it didn't get me anywhere so I deleted it. Maybe I didn't include it the right way and should try again... 21:44
include('cclass.pasm') inside the method? Ourside the method? I don't even know where to look for an example, sorry. It didn't generate an error, but gave the same complaint. 21:47
NotFound I don't know how to do it in nqp
21:47 Patterner left, Psyche^ is now known as Patterner
jay How about in PIR? Could it just go at the head of the Q:PIR block? 21:48
NotFound You can try: .include 'cclass.pasm' 21:49
21:50 mj41 left
benabik I've never quite figured out how to get that to work... I ended up just replacing the constant with it's value. 21:51
:-/
jay Yeah, tried that but it generated a syntax error (though someplace else, not at that line). benabik: you mean, go steal that definition rather than fighting the include? 21:52
plobsing you can't do that because NQP doesn't allow you to create PIR outside .sub-scope
benabik jay: Yeah, I looked at the included PASM and grabbed the value for the constant. I put the original constant name in a constant. 21:53
NotFound I think it will be cleaner to put the subs that need includes in a .pir file 21:54
21:58 Eclesia left
plobsing one approach might be to use a PIR eval to get at the constant 22:02
dalek kudo/nom: 8d597c2 | pmichaud++ | / (3 files):
Add infix:<=:=>, a major cheat for Parcel.Capture(), and three more spectest files.
jay Tried .const int CCLASS_NEWLINE = 4096, but didn't work... I note that there is a leading dot before CCLASS_NEWLINE when it is used, but don't understand why. 22:04
pmichaud recommended the autoprint method. Sounds elegant... if I knew what that was. 22:05
plobsing jay: that's just how the macro directives work in the lexer 22:06
jay I've tried definining the constant in the Q:PIR block: .const int CCLASS_NEWLINE = 4096 and then not using the dot before CCLASS... in the body. No luck, parse error. 22:08
plobsing Q:PIR won't work due to NQP limitations on generating PIR 22:10
you need to eval a string of PIR
22:10 zloyrusskiy joined
plobsing which means: getting the PIR compiler, building up a source string which returns the desired value, compiling the source string, and running the resultant code object. 22:10
I'm working on a running example ATM 22:12
jay plobsing: thanks. It's obvious I'm out of my league. I'm hacking HLLCompiler.pir directly to prove I can do what I want, then I'll repost asking what the ideal way of doing it is... so far I've had several completely different suggestions. Which is interesting, in itself. 22:13
nopaste "plobsing" at 192.168.1.3 pasted "PIR eval for constants" (5 lines) at nopaste.snit.ch/58162 22:14
plobsing jay: ^^working example^^ (in winxed)
22:16 darbelo left
jay plobsing: did that mean I should go look at winxed? Thanks, I think I need to do that anyway. 22:17
22:17 darbelo joined
jay plobsing: sorry, I got it. I see the URL now. 22:18
dukeleto jay: winxed.org and ext/winxed in parrot.git
plobsing jay: winxed is simply my prefered way to quickly express parrot-related ideas. the concept provided could readily be ported to any parrot language. 22:20
it also compiles down to relatively intelligible PIR, so if you don't understand it, you can always look at the generated PIR
benabik `my $pirc := pir::compreg('PIR'); my $eval := $pirc(...); say($eval())` should be the equiv NQP. 22:21
jay benabik: thanks... will try that. You guys are better at balancing many languages than I am. I'm going crosseyed.
benabik I'm going to grad school and studying language design. It's what I do. :-D 22:22
jay I've got my PhD and should have taken a course in language design.
NotFound jay: winxed snippets are easy to read if you know some javascript and pir. 22:23
dalek kudo/podparser: 46bcffa | tadzik++ | src/Perl6/Actions.pm:
Handle paragraphs properly
kudo/podparser: 959cd2b | tadzik++ | t/pod/01-delimited.t:
Add first Pod tests, not all of them yet, just those working
dukeleto jay: parrot hackers are very adept at juggling many languages in our heads at once, because we are forced to, all the time :)
jay This is something I've seen before, but not this extreme: 'insiders' all think it's easy... and maybe it is, once you know the answer. I might say that some statistical theory is trivial... maybe it is, maybe it isn't. Having a book helps. I'm struggling because there isn't really a book, here. 22:25
22:27 everbrew left, darbelo left
NotFound Well, maybe "easy" is too strong word ;) 22:28
22:29 dmalcolm_ joined
jay benabik: compreg perhaps requires something else? I got: error:imcc:The opcode 'compreg_p' (compreg<1>) was not found. Check the type and number of the arguments 22:29
NotFound: my fault, my word choice. But you get the idea, I'm sure. This is a pretty impressive and complex project. I think the only hope is to really become an expert... I'll keep trying, but am not sure I'll ever have the time to get there. 22:31
benabik jay: Might need to be pir::compreg__PS
cotto_work jay: that's a very succinct way to describe a big problem with today's Parrot. 22:32
In my mind, I think of PCT as a framework that lets pmichaud write compilers very quickly. 22:33
22:33 dmalcolm left
jay benabik: yes, that changed things, as step in the right direciton. I should give up for now and come back to it. 22:35
NotFound jay: if you work on parrot some time, you become an expert on the way. In the meantime, there are a bunch of people able to help. 22:37
And you don't need to be en expert in all parts of parrot, BTW.
jay cotto_work: Yikes. pmichaud just replied that I may be using HLL:Compiler from nqp-rx, "which isn't the same 22:38
as HLLCompiler.pir in compilers/pct/src/PCT/HLLCompiler.pir" He gave more hints, I'll have to try to track this down. I'm in 3.3.0.
pmichaud hello :) 22:40
jay AH: in nqp-rx/src/HLL/Compiler.pm, there does appear to be an autoprint method... thanks, pmichaud! I was just explaining your last email.
pmichaud yes. I'd like to eliminate PCT::HLLCompiler altogether 22:41
and, of course, this is all going to become even more complicated by the fact that there's a new HLL::Compiler in nqp (without the -rx)
that doesn't have exactly the same API as either the existing HLL::Compiler in nqp-rx or PCT::HLLCompiler
jay Oh good. < sitting here laughing at my own complete ignorance, but completely believing this is an important and difficult issue > 22:42
pmichaud right
whiteknight jay: We've probably made it much more complicated than it needs to be 22:43
pmichaud mainly because the original PCT::HLLCompiler has lots of false starts in it, and we've never really been able to remove them.
jay Hmm... my guess was adding nqr::Compiler.autoprint(0); inside the INIT of Compiler.pm was the right guess, but it didn't work. I must be close, though. 22:44
pmichaud I think you want to define a new method 22:45
method autoprint($value) { }
jay AH! You are a god. Sorry if that offended anyone. It's been about 2 hours. Bingo. So elegant! 22:46
whiteknight pmichaud: So that raises a good question. Is PCT on it's way out? 22:47
I mean, we're not developing new features for it, would the long term goal be to replace it completely with new NQP hotness? 22:48
pmichaud medium term goal, actually.
but yes, my intent is to have a fully nqp-sourced pct 22:49
including the regex engine
it'll also support native lexicals and attributes, since we have that capability in rakudo now
I'm also pushing to get rid of all of the new ['Undef'] crufty code 22:50
(that it generates)
whiteknight We get 6model into Parrot, then we can upgrade our snapshot from nqp-rx to nqp?
pmichaud yes.
cotto_work pmichaud: since you're here, I'd like to pick your brain a bit about an M0-related question.
pmichaud: I'm putting together a language that'll serve as the primary M0 overlay and am thinking about the workflow.
pmichaud: since it'll generate M0 (textual or binary; they're easily interchangeable), using PCT will mean also creating an alternate POST.
pmichaud but the pct that comes with nqp will be somewhat API incompatible with the existing pct
cotto_work er, nqp
pmichaud: Do you think this would be less work than writing a new compiler using flex/bison (or some other tools targeting C) or not? 22:51
pmichaud there are some mistakes and misdesigns in the existing pct (somewhat forced by the lexicals and binding implementations we were constrained by) that are fixed in the nqp version
cotto_work: well, the new pct that comes with nqp (I'm tentatively calling it "qct" for now :) is intended to have multiple codegen backends 22:52
22:52 dmalcolm_ left
cotto_work "quick compiler toolkit"? 22:52
pmichaud just Q, actually. From the Q in nQp :)
I'm open to better names. :-) 22:53
whiteknight quite compiler toolkit
plobsing aw. I was hoping for a quantum compiler
cotto_work pmichaud: ok. What's its current state?
pmichaud very preliminary at the moment.
cotto_work and eta? 22:54
pmichaud the first (and somewhat critical) step is to get the regex engine updated in the new nqp.
the one we have now doesn't quite fit in with rakudo well, because it's a mixture of old P6object and PAST and 6model
NotFound pmichaud: there is some example on how to use the regex engine from pir? In order to get rid of the usages of TGE regex
pmichaud NotFound: will answer fully in a bit (researching) 22:55
jay If I could interrupt... there were a bunch of enthusiastic posters who answered many of my questions today, some directly (and correctly), others probably indirectly with the best of intentions. I'm grateful. It is interesting, though, that in the end the solution to my question was pmichaud's method authprint... a one-liner. You have a community where many people, I think, are experts in sub-areas. And willing to offer their solutions a
nd approaches. Some work, some may not, and some are simpler than others. It's fascinating to watch, and I'll try not to be a burden. And I won't be shy about offering the outsider's perspective...
pmichaud jay++
jay and now I have to run to dinner... my wife is waiting. Many thanks!
pmichaud you're correct that this is all fairly complex
not because it has to be, but because we've accumulated a lot of mess over time and we need to clean it up :)
(and I'm one of the chief mess-makers, I'm afraid) 22:56
NotFound jay: as I said, you don't need to be an expert in all parrot areas.
pmichaud cotto_work: so, I'm expecting to have the new regex engine in about a week
whiteknight pmichaud: all that matters is that we work to decrease the mess, and increase the awesome going forward
stealing all the delicious 6model and nqp work will make up for many past infelicities
cotto_work pmichaud: it sounds like it will take some time before I can use qct for the M0 overlay. 22:57
pmichaud it'll use a new 6model-based AST structure for the regex nodes
NotFound The only problem is that sometimes we suggest approaches that are not the current best ways in the areas that each one know less.
pmichaud and it will have some shims to let the regex ast nodes fit inside of a PAST tree
depending on how well that goes, and how much time it takes to get rakudo-nom birthed, we'll likely go back and reimplement PAST with some 6model-based versions in the same way 22:58
at that point nqp will be almost entirely-self hosted, from regex engine to code generation for PIR.
cotto_work If nqp/qct is the way forward for mole (the M0 overlay), it may be a good time to polish M0, figure out mole's syntax and grammar, and to start on Parrot/6model in earnest. 22:59
pmichaud cotto_work: agreed.
whiteknight pmichaud: one question I do have is about the stability of 6model. jnthn suggested I hold off on porting, because 6model might change to suite Rakudo/nom work
pmichaud whiteknight: I agree with that assessment. We're still doing small tweaks here and there.
Once rakudo-nom is well along, I suspect 6model will be a lot more stable. (eta 2 months for some semblance of stability) 23:00
whiteknight okay, I don't want to jump in until things are relatively stable. Of course I am willing to work around small changes
cotto_work pmichaud: should we hold off on Parrot/6model until then?
pmichaud cotto_work: another feature of the new nqp is that it defines its own opcode space, and a really really small number of opcodes
well, "really small" is currently about 85.
whiteknight I may get started on the big parts sooner than later, I just wont expect to complete ut
it
23:01 alester left
cotto_work pmichaud: 2x M0, but that's way smaller than pir. I like. 23:01
pmichaud it will likely end up being close to 150 when we're done
also, nqp's opcode set includes things like nqp::while and nqp::loop 23:02
NotFound It will be possible to write a regex library with an api designed to be easy to replace its internals later? That way, the transition will be easier.
pmichaud the new regex engine lets you replace the underlying regex object classes, yes. 23:03
anyway, nearly all of rakudo and nqp will be definable using the smaller nqp:: opcdoe set and 6model.
NotFound I mean the other way, wraping the engine into a pir lib.
pmichaud NotFound: so, here's how one can use the existing regex library from PIR 23:04
load_bytecode 'P6Regex.pbc' # loads the regex engine
$P0 = compreg 'P6Regex' # get the regex compiler
$P1 = $P0.'compile'('ab*c') # compile the regex /ab*c/
(looking up rest of details for how to invoke) 23:06
$P2 = get_root_global ['parrot';'Regex'], 'Regex' # get the Regex protoobject 23:08
$P3 = $P2.'new'($P1) # wrap the compiled regex into a Regex object
$P4 = $P3.'ACCEPTS'('abbbbbbbc') # try to match 'abbbbbbbc' against the regex
$P4 ends up being the result of the match.
(a "Match" object) 23:09
I'm pretty sure that works... let me test it locally.
(and debug it as needed) 23:10
NotFound That's what I mean: that code has a lot of details that can change.
pmichaud oh, in general it's really
my $regex := P6Regex::Compiler.compile('ab*c'); 23:11
my $match := $regex.ACCEPTS('abbbbbbbc')
that part isn't likely to change much
cotto_work pmichaud: I'm also wondering if mole should avoid qct because it's intended to be a fairly small non-dynamic language. 23:13
NotFound pmichaud: looks like we need: compreg "Regex::P6Regex" 23:14
pmichaud NotFound: probably. 23:15
NotFound: I've forgotten quite a few of the details since December 2009
cotto_work: is mole a compiler or ... ?
I'm not sure what "M0 overlay" means here.
cotto_work pmichaud: it's a langauge.
Ah. It's what compiles down to M0. M0 is by design too low-level to write anything non-trivial directly. 23:16
pmichaud okay. So, I think your question is whether PCT/PAST (or their Q-equivalents) should used to generate the M0 23:17
cotto_work pmichaud: yes.
pmichaud I can see two answers
cotto_work That's my problem.
pmichaud (1) one can use nqp to create compilers without ever using anything beyond the regex engine part. This is what ops2c does, iiuc. 23:18
i.e. ops2c does translation without having to go through PAST/POST/etc.
cotto_work ok
pmichaud (2) depending on the opcode set available in M0, that will determine if it's a good fit for PAST/POST to be generating directly
dalek kudo/podparser: c26b9d5 | tadzik++ | src/Perl6/ (2 files):
Get back to using Arrays instead of Lists. Lists generate some weird Null PMC Access errors
23:19
pmichaud PAST tends to have somewhat higher level operations, like if/unless/repeat/while/lexicals/etc.
if those map well into m0 opcodes, it's a good way to go.
but if m0 is really low-level, I suspect a non-PAST translation is in order
cotto_work pmichaud: M0's ops are very low-level. There's 37 of them and I don't think we'll end up with more than 40.
pmichaud right
so it sounds to me like we don't expect PAST/POST to be generating M0 directly 23:20
iiuc, they'll be generating opcodes that are then interpreted by M0 thingies
cotto_work the impression I'm getting is that M0 is a different enough target from the typical *ct workflow that it'd require some wrangling 23:21
pmichaud right
but as in (1) above, one could still write a mole translator in nqp-rx... just not using pct for the code generation parts 23:22
cotto_work M0 ops are at github.com/parrot/parrot/blob/m0-s...d32_m0.pod under "List of Ops"
pmichaud what will mole look like?
cotto_work pct is a big part of nqp's charm
It's still being decided but it will be a C-family language. 23:23
pmichaud so, it'll have if statements and loops and the like?
cotto_work yes
pmichaud so, m0 is the assembly/machine code, and you want something to translate a HLL c-family language down to that machine code 23:24
cotto_work yes
NotFound pmichaud: get_hll_global $P1, [ 'Regex'; 'P6Regex'; 'Compiler' ], 'compile' gives null
pmichaud you have to look up "Compiler", not 'compile'
'compile' is a method.
cotto_work: nqp would help with writing the parser part. I'm skeptical that it would help much with the code generation part anytime soon. 23:25
so in that case you might be better with yacc/bison or something like that.
cotto_work pmichaud: Thanks. I think I know what I need to.
I was hoping to avoid those, but the compiler won't magically write itself. 23:26
pmichaud: do you know anything about lemon?
(parser generator)
pmichaud I can certainly keep m0 in mind as I'm writing qct and its various items... and will gladly take a stab at using it to generate m0... but I wouldn't want to rely on it as the final answer at this point. 23:27
(lemon) no.
NotFound: get_hll_global $P1, ['Regex';'P6Regex'], 'Compiler'
NotFound $ ./winxed -e 'load_bytecode("P6Regex.pbc"); var engine = new ["Regex", "P6Regex", "Compiler"]; var re = engine.compile("ab*c");' 23:28
Method 'parse' not found for invocant of class 'Undef'
pmichaud NotFound: gist.github.com/1068599 23:36
in the new version, the parts about "Wrap the Sub PMC into a Regex object" will go away
the compiler will return a Regex object directly.
so, it's basically: obtain the regex compiler, compile a regex, invoke the regex on whatever you want to match 23:37
afk, dinner
23:38 soh_cah_toa joined
NotFound I'm the only one that thinks that all that internal details will be better encapsulated in a pir library? 23:39
pmichaud isn't that a PIR library?
that's what P6Regex.pbc is.
you're just looking for a functional interface to the library instead of an object-oriented one, I guess. 23:40
NotFound Functional or OO, but one that doesn't need to know several implementation details to be used. 23:41
pmichaud how hard is?
1 look up the compiler
2 compile the regex 23:42
3 invoke the regex
dalek rrot-linear-algebra: 4ac7732 | Whiteknight++ | t/ (24 files):
Fixes to the test suite so it runs and all tests pass again
pmichaud ??????
NotFound pmichaud: is hard to have such details sparsed from the codebase waiting for a deprecation.
23:42 AzureSto_ joined
pmichaud I can't parse that last statement. 23:42
NotFound pmichaud: if we provide a simpler pir lib, when nqp change you just need to update the internal details in that lib, and all the code that uses it can remain untouched. 23:44
pmichaud fine, I can add a function to P6Regex.pbc.
no promises as to whether it will exist in the 6model version, though, which definitely thinks in terms of lexical scopes and object methods.
NotFound That way we can start cleaning the remaining usages of othe regex.
pmichaud I don't think there are that many, but I could be wrong. 23:45
gotta run -- bbl.
23:45 AzureStone left
NotFound pmichaud: that is part of the problem. We (at least me) tend to avoid using regex because of that. 23:45
23:46 zloyrusskiy left, losinggeneration joined
NotFound Because of depending on things that are deprecated or candidate to be. 23:46
23:46 zloyrusskiy joined
pmichaud even if I provide a function, I can't guarantee that I'll be able to support it in the next version of the engine. 23:47
that's kind of my point.
23:47 zloyrusskiy left 23:48 lucian__ left
pmichaud we really don't think in terms of global namespaces in nqp. 23:48
bbl
NotFound Then there is no point in providing it.
whiteknight that's a good habit to be in. If I have my way, NameSpaces will either disappear or be severely disempowered eventually 23:51
NotFound I don't care if it's a Namespace or some other beast. I care about the parrot goal of language interoperability. 23:52
If we don't have a regex engine easily accesible from pir, that is a severe limitation. 23:54
23:56 Limbic_Region joined