»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
00:30 grondilu left 00:39 logie joined 00:44 lizmat_ joined, lizmat left
ruoso is there any suppotr for calling regular java classes from rakudo already? 00:59
timotimo yeah, look into src/vm/jvm/core/Threading.pm for an example 01:03
01:03 benabik left, benabik joined
ruoso timotimo: thanks... 01:04
timotimo it'll probably get a layer of sugar on top some time.
ruoso is there a way to implement a java interface? 01:05
01:05 aindilis joined
ruoso ah, I see... Threading.pm does that already by implementing Runnable 01:07
TimToady though really, you'd like to be able to pull that in as a P6 role, I suspect 01:08
that'll take a bit more meta-introspection at compile time though... 01:09
ruoso I am not sure you would be able to call it a role
TimToady well, it's a role that doesn't give you any default implementations
01:09 ilbot_nextgen left
ruoso but it also has to feed into the JVM type system as an implementation of a Java Interface, which I'm not sure would be equivalent to role composition... 01:11
TimToady wasn't thinking it'd work in that direction 01:12
ruoso well, but that'd be the reason to use it... for instance, implementing the Servlet interface to serve as a Tomcat application 01:13
TimToady though there might eventually be some way of pulling the interfacey bits out of a role
TimToady waves hands; smart people are working on this :) 01:14
01:15 ilbot_nextgen joined
ruoso It probably makes sense to think of this as a JVM-specific "knowhow" (is that how it is still called?) 01:16
TimToady yes
ruoso something like: "use JVM::Interfaces; class Foo implements javax.servlet.Servlet { ... }" 01:17
TimToady the right person to discuss this with is probably jnthn-when-he-is-awake
ruoso nod 01:18
01:19 dayangkun_ left
TimToady we might not let you use the dot for that though, unless javax has a servlet method :) 01:19
benabik Something macro-ish? Can you have is parsed on a trait? 01:20
TimToady everything is possible, but not everything is expedient
ruoso fair enough, converting the . into :: makes a lot of sense 01:21
or even just take it as a lieteral 01:22
or even just take it as a lieteral 01:43
ruoso reflex-typing uparrow-enter 01:44
TimToady you can say that again
ruoso reflex-typing uparrow-enter 01:47
hah... this is getting ridiculous... I will move this window to a different desktop 01:48
TimToady hmm, still seems to be right here :) 01:59
TimToady will check to see if it's still here after dinner & 02:01
02:01 athomason_ left 02:13 abnorman left 02:35 danaj left 02:36 danaj joined 02:40 danaj left 02:46 lue left 02:47 konundra left, fridim__ joined 02:48 lue joined 03:23 clkao_ joined 03:26 cognominal joined
flussence wrote... something. www.reddit.com/r/PHP/comments/1iw0c...ld/cb904kq 03:26
03:33 eirini_k joined 03:34 preflex_ joined, ChanServ sets mode: +v preflex_, preflex left, preflex_ is now known as preflex, eirini_k left 04:11 xilo left 04:15 arlinius left 04:17 logie left 04:42 raiph joined 05:08 birdwindupbird joined 05:10 SamuraiJack__ joined
lizmat_ good *, #perl6! 05:11
and flussence++
05:18 fridim__ left
moritz \o 05:25
lizmat_ o/
nick lizmat 05:26
05:26 lizmat_ is now known as lizmat
lizmat is not awake yet 05:26
breakfast&
05:54 PacoAir joined 05:55 abnorman joined 05:59 iSlug joined 06:02 smash___ joined 06:03 ribasushi_ joined, noxgirl joined 06:04 ribasushi left, autumn left, FROGGS joined, smash left, ribasushi_ is now known as ribasushi
dalek kudo/nom: e9a8263 | jnthn++ | src/vm/parrot/guts/storage_spec.h:
Sync storage_spec.h with NQP one.
06:06
06:11 wtw joined 06:14 PacoAir left
FROGGS flussence++ # reddit 06:14
06:19 domidumont joined 06:25 salv0 joined
lizmat jnthn: attempting a clean build 06:25
06:26 domidumont left 06:27 domidumont joined 06:28 spider-mario joined, odoacre_ joined 06:29 odoacre left
lizmat jnthn: could it be that the "Stage parse" became slower since the Buf changes ? (looking at going from 115 seconds to 128 seconds on my machine) 06:35
jnthn: build completes ok after your last fix, running spectest now 06:36
06:36 spider-mario left
lizmat jnthn: clean apart from the IO-Socket-INET fails 06:44
06:47 wk joined, wk is now known as Guest56637 06:48 cognominal left, kaleem joined
jnthn lizmat: Well, we added a bunch of new types and roles... 06:51
yoleaux 23 Jul 2013 22:57Z <lizmat> jnthn: after nuking nqp/parrot and install dir and rebuilding from that, I still get a segfault when building RESTRICTED.setting
23 Jul 2013 23:02Z <lizmat> jnthn: seems to be changes in nqp that cause this, rolling back last 2 commits in nom doesn't fix the problem
lizmat actually, it;s more like 115 -> 120 06:52
so that could well explain
06:56 wtw left
dalek kudo/nom: 340fc12 | (Elizabeth Mattijsen)++ | src/core/metaops.pm:
Make sure we don't flatten type objects on either side of a hyper
06:58
kudo/nom: d12ecc5 | (Elizabeth Mattijsen)++ | src/core/Any.pm:
Make .list, .flat, .eager & .hash type object aware.

If called on just a type object, they will all return an empty list/hash.
07:13
jnthn lizmat: Should they perhaps not behave consistently with .[0] ? 07:21
lizmat could you give me a more elaborate code example? 07:25
jnthn r: 42.list.perl.say 07:27
camelia rakudo 340fc1: OUTPUT«(42,).list␤»
jnthn r: Int.list.perl.say
camelia rakudo 340fc1: OUTPUT«(Int,).list␤»
jnthn Those two look right to me
lizmat the former I agree, the latter I'm not so sure 07:29
the idea is that in situations like 'my Hash @a; say @a[0].keys' there will be no keys 07:30
otherwise, in complex data structure, you will always first have to check whether something in a potentially unused slot, is actually defined 07:31
before ascertaining that it has keys, or elems 07:32
r: my Hash @a; say @a[0].keys # currently fails for different reasons 07:33
camelia rakudo 340fc1: OUTPUT«Invocant requires an instance, but a type object was passed␤ in method keys at src/gen/CORE.setting:7564␤ in block at /tmp/HhoTIiHTAu:1␤␤»
JimmyZ r: my Hash @a; say @a[0] 07:37
camelia rakudo 340fc1: OUTPUT«(Hash)␤»
JimmyZ r: my Hash @a; say @a[0].?keys
camelia rakudo 340fc1: OUTPUT«Invocant requires an instance, but a type object was passed␤ in method keys at src/gen/CORE.setting:7564␤ in block at /tmp/2gpzG0_5N8:1␤␤»
07:41 wtw joined 07:42 sqirrel joined 07:45 Guest56637 left 08:10 domidumont left, domidumont joined 08:12 SamuraiJack joined, dmol joined 08:13 rindolf joined 08:14 SamuraiJack__ left 08:23 abnorman left 08:30 ilogger2_ joined 08:35 cognominal joined
dalek kudo/nom: c3a58f9 | (Elizabeth Mattijsen)++ | src/core/ (3 files):
Other changes to make type objects appear as Nil in non-scalar contexts

This typically makes something like:
   my Hash @a; say @a[42].elems # returns 0
instead of blowing up or saying there is 1 element with the type object.
08:44
08:50 snoopy left
lizmat Note that in the simplest case, this will let Hash.elems also return 0 08:56
Also note that at one point, if we agree this is a good thing, this will need to be implemented using MMD
but that would slow down things too much now 08:57
(or am I wrong about that?)
jnthn :D vs :U in the multi-dispatcher is well optimized
The multi cache knows about it
lizmat jnthn: if there was already a multi, I used that 08:59
if there wasn't, I didn't create one
I assume un-multi methods still dispatch faster than multi's, no?
jnthn yes, they do
Though it may not always be a huge difference 09:00
With multi subs, it can sometimes work out which candidate you're going to be calling at compile time
lizmat these are all multi methods
jnthn sure, just pointing out the trade-off is different. 09:01
tadzik diakopter++ # grant application 09:02
lizmat anyways, I'll do a spectest with these methods changed to multi-methods once we agree that this has been a sensible way forward
or nobody raises any objections in the next week or so
when I will take absence of comments as agreement :-) 09:03
jnthn Well, from Sautrday I won't be here to disagree with anything :P
lizmat ah, but shortly thereafter masak will be back, right ?
so far, it's only 2 commits to revert: c3a58f9 and 340fc12 09:05
the other commits didn't change any behaviour, they only caused problems in combination with the these two commits 09:06
(and they took a long time to figure out)
also for clarity: these changes spectest clean, but do not have specific spectests for them yet
I will add those again once we have agreement 09:07
JimmyZ oh, diakopter++
09:09 sqirrel joined 09:10 dakkar joined
dalek kudo/nom: 9ba5dde | (Elizabeth Mattijsen)++ | t/spectest.data:
move INET tests to last, so we can see how much time they take

Oddly enough, moving this test to an earlier location, only had adverse effects on the wallclock of spectest. Grrr. Wish I understood exactly what is going on here.
09:10
09:22 crab2313 joined
lizmat cycling& 09:49
09:59 pmurias joined 10:13 fhelmberger joined 10:21 crab2313 left
pmurias jnthn: do you think the op descriptions should be in qast.markdown or a seperate document? 10:23
10:34 daxim joined 10:37 crab2313 joined 10:43 wk joined 10:44 wk is now known as Guest9814 11:14 sqirrel left 11:18 crab2313 left
colomon has successfully parsed the 13M STEP file (using his 32G linux box) but creating the reverse lookup index using categorize is still running. current stats are 37G memory used, 459 minutes. 11:24
11:24 brrt joined
FROGGS O.o 11:24
colomon guess I might as well try a much smaller model on it under jakudo and see if it works 11:27
ruoso jnthn: do you think that for Java Interfaces interoperability would it make sense to try to disguise them as roles? or should we go with a new knowhow that maybe introduces the class trait "implements", such as: use JVM::Interfaces; class Foo implements 'javax.servlet.Servlet' { ... } 11:30
colomon the good news is, once the reverse lookup index is created, the rest of the script should be pretty quick, I think 11:31
daxim "get Damian to write Perl-7 which is Perl5+Moose-in-core" anonymoushash.vmbrasseur.com/2013/0...mment-2235 11:32
FROGGS ruoso: maybe more like ... implements jvm('javax.servlet.Servlet') { ..., that would be like the existing is repr('...') or is symbol('...')
colomon woah, jakudo did not do well on this test. ran for a minute longer than the parrakudo version took to complete, and then died with "GC overhead limit exceeded"
(that's on the small model, obviously) 11:34
ruoso FROGGS: jvm('javax.servlet.Servlet') makes some sense as well, maybe even more explicit jvm::type('javax.servlet.Servlet') 11:36
11:40 sqirrel joined
ruoso although it would probably make some sense to introduce a knowhow for build pure jvm classes without the wrapper 11:43
11:49 SmokeMachine joined
colomon 49.7G now 11:50
53.6G. Wonder if any practical p6 program has ever used this much memory before 11:59
colomon really needs this to work for $work
jnthn pmurias: Maybe a separate doc; I think there already is some file that tries to list the nqp ops, but maybe it's easier to generate that from the actual set of them in the compiler... 12:03
ruoso: There's no reason to write knowhow's for any of this, we can build them out of higher level things... 12:04
ruoso: But yeah, I expect we'll want a meta-object type or two for representing the Java stuff.
I can see a trait as a possibility too...
Maybe overloading does there is icky-ish. 12:05
ruoso that was my initial thought 12:06
because the way the thing is composed is completely different
pmurias jnthn: there exists a file, but seems to contain parroty and outdated stuff
jnthn pmurias: Well, it probably describes the mappings, which are not so interesting in a way
pmurias: They probably were then nqp:: ops were new and folks were used to the Parrot ops. These days, it's less that way :) 12:07
s/then/when/
colomon: You'll probably find that the memory limits for Rakudo on JVM are set quite low 12:08
pmurias yes, that's that plus a long and detailed description of nqp::deb
do we even use nqp::deb anymore? 12:09
daxim diakopter, fix the goo.gl links in your application. goo.gl/W5mI0 is access-restricted and goo.gl/WLJUQ is 404
colomon jnthn: how to change that? 12:12
jnthn colomon: Tweak the memory flags in the perl6.sh 12:14
There's probably one which is setting a limiti of 2g or so
12:14 benabik joined
jnthn Hm, and it'd be good for me to run what you're doing under an allocation profiler at soem point to work out where on earth all the memory is going :) 12:15
12:16 sqirrel left
colomon the code's all up on github, I can easily get you the test file and run you through how to invoke it 12:17
57.1G now
jnthn OK...though teaching at the moment :)
colomon -Xms100m ? 12:18
jnthn "teaching"...actually waiting while exercises get done :)
no, that's starting size
Is there a -Xmx option?
I tink that's the one to set 12:19
colomon no, not in perl6 the script
jnthn OK, you can add one after the -Xms
colomon RUN_PERL6 = $(JAVA) -Xms500m -Xmx2g in the Makefile....
jnthn Yeah, so that means "max 2 gigs"
So you can set it to whatever you think it'll need
colomon trying.... 12:21
diakopter í' 12:23
colomon woah, without the (default?) GC limit, jakudo performs much better 12:25
diakopter daxim: actually I forgot to redact those links entirely 12:26
colomon 1m11s under parrukdo, 46s under jakudo 12:28
jnthn :) 12:29
And this is before we start doing much optimization work :)
diakopter daxim: oops 12:30
jnthn (As opposed to Parrot where we've been trying to optimize stuff for a while...)
colomon jnthn: better be pre-optimization, we still need a at least an order of magnitude improvement! ;) 12:31
jnthn colomon: Indeed. 12:32
colomon: The optimizer isn't actually fully functional on JVM yet either...
colomon I'm guessing there are some good Java profilers out there?
jnthn yeah... 12:33
12:33 domidumont joined
colomon also, of course, I've made very little effort to optimize this script. I'm pretty sure reducing the memory usage by 14% should be quite easy. 12:34
12:35 logie joined
colomon this is the point in the conversation when I need to start whispering to myself "First get it right…" 12:35
jnthn Yes, that's what I keep reminding myself on the JVM port 12:36
"we still aren't quite there on spectets yet" :)
diakopter colomon: jvisualvm is quite good, but there are also some for-pay ones
and then there are those of us who include "long term designed for optimized performance" in that "get it right" definition 12:38
12:39 pmurias left
diakopter (in other words, if you can't ignore performance at any stage, where do yoy draw the line? 12:40
)
*you 12:41
my point is that you can't claim you are completely ignoring performance 12:43
bbiab
timotimo colomon: are you sure parrot isn't suffering heavily from GC sweeps when parts of your ram are swapped out? 12:44
12:45 logie left
colomon timotimo: I'd be surprised if that was the case on my tiny test model (which is what those timings correspond to) 12:46
timotimo ah 12:47
colomon diakopter: certainly, completely ignoring performance is a Very Bad Plan
timotimo i was thinking about the one that's been growing to almost 2x your ram size ;)
fwiw, i've just noticed a ridiculous ram usage for something not very big. perhaps you're being bitten by that, too.
colomon timotimo: well, that one almost certainly is suffering from GC sweeps, but I'm not comparing that timing to anything else right now, I'm just praying it finishes correctly sometime in the next few hours 12:48
timotimo (that was when running a recursive dir with a few maps and greps on the result and storing them into a list of pairs would take about 1.2 gb for ~150 files)
colomon it's not actually twice my ram yet, but it will be there pretty soon at the current rate.
59.6G virt, 32G actual
timotimo ah, ok 12:49
i don't think IO::Path objects are that big, so i'd call the memory usage ...
*puts on sunglasses*
pathological
12:50 pmurias joined
tadzik :D 12:50
pmurias jnthn: what do we use the fates list in a NFA repr for? it's set, serialized and deserialize but doesn't seem to be used anywhere? 12:51
12:54 crab2313 joined 12:57 konundra joined 13:02 logie joined, rindolf joined
colomon Arrrgh! the script died. :( 13:05
timotimo aaw man :( 13:09
colomon nothing for it but to try jakudo now
with -Xmx64g 13:10
timotimo huh. i can't ConfigureJVM.pl --with-nqp=nqp/install/nqp, because it throws an NPE at org.perl6.nqp.runtime.Ops.invokeMain(Ops.java:1622) at org.perl6.nqp.runtime.CompilationUnit.enterFromMain(CompilationUnit.java:61) at nqp.main(src/stage2/gen/NQP.nqp)
anyone seen this before?
13:12 PacoAir joined 13:13 kaare__ joined
colomon woah, using -Xmx64g, java went right out and allocated 68G! 13:13
moritz because you told it to!
or, something similar :-)
pmurias that should be enough for even the most greedy of rakudos ;) 13:14
colomon moritz: I thought I was telling it, "You can get this big", rather than "You MUST get this big!" 13:18
13:19 ecocode joined 13:21 ajr joined 13:22 ajr is now known as Guest75637
Woodi hallo :) 13:22
in filesystems files have links counter and when counter hit zere file is deleted, GCed in some kind with nice optimization (NoOp :) ) for area cleaning... 13:24
I wonder about objects and finalization... objects are like files visible in FS, when ref cound hit zero finalizers starts and memory is collected... 13:26
13:26 Guest75637 is now known as ajr_
Woodi but, for me, there are two kinds of "finishing" objects: low level memory GC and declared finalizers (eg. manual structure cleaning) 13:27
I think declared finalizers can be fired just after reference counter hits zero and GC work can be postponed/run in paraller/ommited... 13:28
moritz but Perl 6 doesn't mandate reference counting 13:29
refcounting has obvious problems with circular references, so the idea is to use "proper" GC instead
Woodi but objects "disappear" from namespace probably is equal to 0 ref count... 13:30
and in that time finalizers can be fired...
and GC work is low level cleaning... 13:31
moritz but we don't refcount.
doing refcounting AND gc is just wasteful
and '"disappear" from namespace' isn't well defined 13:32
Woodi I say that becouse erlier talks goes straight from finalizers to memory gc...
when in Perl 6 objects stops to be visible ?
colomon okay, 13M STEP file read and parsed, took 24 minutes
so now it's doing the reverse lookup table 13:33
colomon is starting to suspect jakudo may crush parrakudo on performance here….
pmurias jnthn: I figure out that on parrot .fates is used for determining the size of an array (while diagnosing a segfault ;)
13:34 grondilu joined
colomon crap, java run fails with java.lang.StackOverflowError 13:36
I guess at least it was fast
arnsholt There's an -Xfoo option to increase the stack size like -Xmx does for the heap 13:37
colomon -Xss
arnsholt -Xms maybe?
Right, right
colomon I'm trying to ponder why the stack would overflow before I just do that
arnsholt Parsing perhaps? 13:38
colomon the parsing stage is already done at that point.
arnsholt In that case, I have no idea 13:39
Woodi I think finalizers are important and need to fire them should be somehow detected earlier then full gc is fired becouse mem collection can be sometimes ommited... 13:41
just naive thinking, of course... 13:42
13:43 skids joined
crab2313 failed building nqp-cc using the latest nqp and parrot, gist.github.com/crab2313/6070706, anyone seen this before? 13:47
13:48 xilo joined
FROGGS crab2313: I can just say it works using parrot 5.2.0 13:49
never tested 5.6 though
brb
crab2313 FROGGS: thanks 13:50
13:52 btyler joined 13:59 dmol joined
dalek p: 9e2d04c | (Pawel Murias)++ | t/nqp/74-nfa.t:
Add a very basic test for our NFA matcher.
14:02
14:11 eirini_k joined, orafu joined 14:12 eirini_k left 14:23 FROGGS joined
[Coke] moritz: ping. 14:30
14:32 woosley1 joined
moritz [Coke]: pong 14:32
14:33 kingbeast joined
[Coke] moritz: we had the first Albany.pm meetin glast night in ages. Your name was dropped, and not by me. 14:34
pmurias moritz: actually a lot of the reference counting implementations also do a gc run from time to time to collect cycles
[Coke] Guy apparently "knows" you from your p5 (&p6) posts on perlmonks.
I disagree with RT #119001 - Main's arguments are *special*. if Rob doesn't want an Int, he should pick Any. meh? 14:36
Probably needs a documentation patch to make it more clear, I'd expect.
14:37 stevan_ joined, Psyche^_ joined
pmurias Woodi: doing ref counting on some of the platform we target would be super inefficent (like on the JVM), so Perl 6 can't guarantee when the finalizers will run 14:37
moritz [Coke]: nice to hear :-) 14:38
[Coke]: re Main, the spec says that the return values from val() (which MAIN_HELP should use) should still comply to type Str
hoelzro [Coke]: I'm ok with that, as long as things are less surprising when developing =) 14:39
but it *is* a little misleading to users if they type an argument and Perl 6 says "hey, you need to provide an argument" 14:40
[Coke] moritz: so it is just reduced to "we don't have IntStr yet?"
hoelzro: the error message shows the type, IIRC.
hoelzro my example doesn't 14:41
[Coke] hokay. 14:42
hoelzro I think that converting arguments to sensible types makes sense, but if no candiates are found with the signature, there should be a fallbcak 14:44
*fallback
14:47 cognominal left 14:54 FROGGS left
moritz [Coke]: yes 14:57
14:57 JimmyZ joined 15:02 kaare_ joined 15:03 konundra left, crab2313 left
dalek ast: deadbef | coke++ | S32-io/slurp.t:
refudge for rakudo.jvm
15:03
15:03 kaare__ left 15:04 woosley1 left 15:07 woosley1 joined, woosley1 left 15:10 Rix joined 15:11 crab2313 joined 15:12 rindolf left, rindolf joined 15:17 crab2313 left 15:19 brrt left 15:20 rindolf left 15:21 rindolf joined, ajr_ left
colomon Huh. It seems categorize is really slow? 15:21
15:23 ajr joined, cognominal joined, timotimo left, ajr is now known as Guest54954
colomon well, the operation I am doing with categorize. might be something else in that line of code 15:23
even on the small model it takes longer to do my categorize call than it does to read the file and parse it completely 15:24
15:26 Guest54954 is now known as ajr_
arnsholt Yeah, that sounds wrong. Might be worth profiling it and see if there's something fishy in Rakudo's implementation? 15:26
15:29 timotimo joined
colomon arnsholt: yeah. definitely seems like a priority. but I don't know the right way to tackle profiling this. 15:30
colomon has developed a fear that it's iterators that are the problem here… 15:31
15:31 rindolf left 15:32 rindolf joined
arnsholt First thing is probably to profile your code and see if the hotspot is actually in Rakudo rather than your code 15:32
Not sure how to best profile Rakudo itself though. But IIRC there're some Parrot-level tooling 15:34
15:41 kaleem joined 15:44 dmol left 15:47 rindolf left, rindolf joined
dalek rlito: a6bb050 | (Flavio S. Glock)++ | / (5 files):
Perlito5 - fix strictness in eval() and require()
15:47
perigrin_ I have a question ... is there a reference on attribute initialization somewhere I can see? (test are fine, I'm trying to sort out a syntax question for p5-mop-redux) 15:51
PerlJam perigrin_: S12:762 maybe? 15:54
synopsebot Link: perlcabal.org/syn/S12.html#line_762
perigrin_ PerlJam: thanks ... the links to the tests there helped I think. 15:56
16:01 dmol joined 16:03 rindolf left, rindolf joined 16:14 logie left, pmurias left 16:16 cognominal left, kaleem left 16:19 rindolf left, rindolf joined 16:20 domidumont left 16:25 fhelmberger left
lizmat colomon, jnthn: categorize is *dead* simple. The only optimization I can think of there is to use postfix for 16:25
but jnthn told me, that shouldn't make a difference if there are no lexicals inside the scope 16:26
I wonder though whether each store in the hash creates a .WHENCE that doesn't get GC'd ?
colomon lizmat: I understand it's dead simple. That doesn't mean it's fast. 16:27
lizmat: I mean, I don't know where the problem lies here.
it could be for, it could be push, it could be something in the code block I pass in
lizmat I wouldn't be at all surprised it's the .WHENCE that's causing the problem there 16:28
colomon All I know is the performance is *terrible*
when it's slower than file I/O and parsing the entire file, you know something is up.
lizmat I wonder: do you need all the categorized entries as well, or would a count do for you as well ?
colomon I need them 16:29
The goal is basically to set up a bi-directional graph, so that given an entity I can find all the entities that reference it.
(and all the ones it references)
lizmat also: in the current setup, the push() is *copying* values 16:30
I wonder whether how the memory usage would be if we would bind instead
possibly as an adverb on push as well ?
colomon In this case, at least, the values being copied are just short (approx 7 characters on average) strings. 16:31
lizmat @a.push(@b, :bind )
colomon We really need to profile instead of guess, I just don't know the best approach for doing that currently.
lizmat I think it's the number of containers with the associated .whences 16:32
16:35 rindolf left, rindolf joined
moritz what do I use for === in NQP? 16:41
maybe =:= 16:44
lizmat colomon: spectesting some performance tweaks on push() 16:46
colomon lizmat++ 16:48
16:53 Guest1337 joined, rindolf left, rindolf joined 17:02 rindolf left, rindolf joined 17:03 spider-mario joined 17:12 SamuraiJack joined 17:18 dakkar left, xinming joined, abnorman joined 17:22 rindolf left, ajr_ left, rindolf joined 17:23 ajr joined, ajr is now known as Guest50979, Guest50979 left 17:27 ecocode left
lizmat colomon: adding another candidate for .push for a single value, breaks the spectest massively 17:39
I have no idea what's going on
colomon lizmat: I'm trying a different approach here, to see if it helps.
lizmat gist.github.com/lizmat/6072726 is what I've done so far 17:40
I'm off to see a movie, will be back later&
17:41 rindolf left, FROGGS joined
colomon lizmat++ 17:41
17:41 rindolf joined 17:50 abnorman left, rindolf left 17:51 rindolf joined 17:53 logie joined 18:00 abnorman joined
colomon now has a significantly faster solution which uses sets instead of categorize. :) 18:00
18:07 Guest1337 left, FOAD joined
colomon tries it on the 13M model 18:10
18:11 rindolf left 18:12 rindolf joined 18:19 pochi joined
colomon It's actually a really fun use of sets. the original code took a given face in the file and followed the references until it had a list of all the face's edges. The it started from each edge and used the reverse index (created by categorize) to walk back to the faces. 18:21
The new version just creates a set of edges for each face in the model, then looks for those sets that intersect the given face's set.
note that the jakudo version takes a crazy long time to start-up -- about ten seconds. Must have something to do with module loading? 18:26
[Coke] rakudo.jvm loading is slow to begin with. 18:27
colomon right, but that's more on the order of 2 or 3 seconds, I think 18:28
18:29 rindolf left 18:30 rindolf joined, daxim left 18:31 bluescreen10 joined 18:37 iSlug joined 18:47 rindolf left 18:48 rindolf joined 18:52 rindolf left, rindolf joined 18:59 iSlug left
dalek rlito: f4ffaad | (Flavio S. Glock)++ | / (5 files):
Perlito5 - indirect-object - all tests pass
19:01
jnthn evening, #perl6 19:08
FROGGS jnthn: o/ 19:10
timotimo heyo jnthn :)
19:10 ajr joined 19:11 ajr is now known as Guest6345, Guest6345 is now known as ajr_ 19:12 logie left 19:18 rindolf left 19:29 konundra joined 19:30 sqirrel joined
dalek rl6-roast-data: 4f01b22 | coke++ | / (5 files):
today (automated commit)
19:34
[Coke] jnthn: the buf skip was still protecting a skippable offense. 19:35
19:40 Guest9814 left
colomon skips behind skips... 19:44
[Coke] jnthn: gist.github.com/coke/6073852 19:45
different error, on the jvm. looks like $/ in an exception handler is wonky?
jnthn [Coke]: Yeah, never got to the bottom of that one yet... 19:51
19:55 eirini_k joined 19:57 stevan_ left
eirini_k \msg FROGGS 20:00
20:01 kaare_ left 20:07 logie joined
dalek rlito: bad489f | (Flavio S. Glock)++ | TODO-perlito5:
Perlito5 - parser - TODO list
20:12
timotimo i left my desktop in a state that doesn't seem to let me ssh toit:( 20:20
all my recent work is on that computer :| 20:21
20:22 iSlug joined
lizmat Now You See Me 20:31
20:32 zakalwe joined, zakalwe left, zakalwe joined
lizmat
.oO( teaches you all about preparation, like all the work that has been done that now allows VM's to be added to rakudo so easy)
20:32
easily
20:35 sqirrel left
grondilu suggested adding .entropy to Bag: rosettacode.org/wiki/Entropy#Perl_6 Not that it'd be terribly useful, but it'd be cool. 20:39
20:43 pmurias joined, wk joined 20:44 wk is now known as Guest94658
lizmat jnthn, FROGGS: do I need to nqp::unbox_i() a native int, or is this just for Int ? 20:46
jnthn lizmat: An int is already unboxed 20:47
lizmat: That's almost the definition of a native type :)
lizmat thought as much, :-)
jnthn ffs, it's humid... 20:48
lizmat Still 25+ here
jnthn We're due some rain tomorrow, which I hope will cool things 20:49
lizmat it did over here, but that was yesterday :-(
is there a way to select a MMD candidate depending on the value of a method call on that object? 20:50
dalek kudo-js: 4038197 | (Pawel Murias)++ | / (2 files):
Implement nfafromstatelist and a partial nfarunproto.
lizmat thinking maybe we should have a candidate for handling infinite lists, so self.infiinite would be true 20:51
jnthn I guess you can do it in a where clause? 20:53
where .infinite
No promises on efficiency :)
lizmat let's see how it works out :-)
__sri words.steveklabnik.com/beware-subcl...re-classes # go home ruby, you're drunk! 20:55
20:56 SamuraiJack left
lizmat jnthn: Any contains a proto for push(), but List doesn't 21:01
is the fact that List ~~ Any enough to "see" that prototype in List?
I guess that makes sense, yes, forget it :-) argle bargle 21:02
too much Baileys at the movies :-)
21:08 BenGoldberg joined 21:13 skids left
BenGoldberg rn: my @foo := 42 xx 1e5; @foo.Int.say 21:13
camelia rakudo 9ba5dd: OUTPUT«(timeout)»
..niecza v24-88-g1f87209: OUTPUT«100000␤»
21:13 eirini_k left 21:14 konundra left
jnthn lizmat: Yes, it's enough. 21:16
(Enough proto, and apparently enough Baileys :P) 21:17
lizmat actually, they ran out of Baileys :-( and probably won't have any new tomorrow when we're going to see Wolverine
fwiw, I never realized how important .push was in rakudo 21:18
every sub call seems to do a .push on the stack 21:19
21:19 donaldh joined 21:22 spider-mario left
jnthn Huh? 21:22
BenGoldberg I've got a really silly question: How useful would it be (and how hard would it be to create) a Bool::Unknown object, which would throw a runtime exception whenever it's tested for truth (especially, when used in an if () or similar) 21:23
benabik Nil? 21:24
jnthn r: class Bool::Unknown { method Bool() { die "Can't test this" } }; my $a = Bool::Unknown.new; if $a { say 'hmm...' }
camelia rakudo 9ba5dd: OUTPUT«Can't test this␤ in method Bool at /tmp/1VD46mboC1:1␤ in block at /tmp/1VD46mboC1:1␤␤»
lizmat Nil is False
BenGoldberg rn: my $foo = Nil; if( $foo ) { say True } else { say False }
camelia rakudo 9ba5dd: OUTPUT«===SORRY!===␤Word 'if' interpreted as 'if()' function call; please use whitespace instead of parens␤at /tmp/cDgOd8L4Tx:1␤------> my $foo = Nil; if⏏( $foo ) { say True } else { say False }␤Unexpected block in infix position (two …
..niecza v24-88-g1f87209: OUTPUT«===SORRY!===␤␤Word 'if' interpreted as 'if()' function call; please use whitespace instead of parens at /tmp/_POK2gy_Vy line 1:␤------> my $foo = Nil; if⏏( $foo ) { say True } else { say False }␤Unexpected block in infi…
BenGoldberg rn: my $foo = Nil; if ( $foo ) { say True } else { say False }
camelia rakudo 9ba5dd, niecza v24-88-g1f87209: OUTPUT«False␤» 21:25
BenGoldberg And the section part of my silly question? For example, I definitely think .infinite should Bool::Unknown, rather than Nil or Mu 21:26
s/section/second 21:27
lizmat how about Bool ?
the type object ? 21:28
BenGoldberg rn: my $foo = Bool; if( $foo ) { say True } else { say False }
camelia niecza v24-88-g1f87209: OUTPUT«===SORRY!===␤␤Word 'if' interpreted as 'if()' function call; please use whitespace instead of parens at /tmp/mtqAaOGinu line 1:␤------> my $foo = Bool; if⏏( $foo ) { say True } else { say False }␤Unexpected block in inf…
..rakudo 9ba5dd: OUTPUT«===SORRY!===␤Word 'if' interpreted as 'if()' function call; please use whitespace instead of parens␤at /tmp/5_wW9_GqOp:1␤------> my $foo = Bool; if⏏( $foo ) { say True } else { say False }␤Unexpected block in infix position (two…
BenGoldberg rn: my $foo = Bool; if ( $foo ) { say True } else { say False }
camelia rakudo 9ba5dd, niecza v24-88-g1f87209: OUTPUT«False␤»
benabik BenGoldberg: So that your code explodes if you try to find out if something is infinite?
lizmat rn: my $foo = Bool; if $foo.defined { say "Dunno" } elsif $foo { say True } else { say False } 21:29
camelia rakudo 9ba5dd, niecza v24-88-g1f87209: OUTPUT«False␤»
lizmat rn: my $foo = Bool; if !$foo.defined { say "Dunno" } elsif $foo { say True } else { say False }
camelia rakudo 9ba5dd, niecza v24-88-g1f87209: OUTPUT«Dunno␤»
BenGoldberg So that your code explodes if you try to find out if something is infinite, and the answer is "I don't know" and you foolishly treat "I don't know" as a true or as a false
donaldh correct me if I'm wrong but doesn't idiomatic Perl expect undefined values in Boolean context to return false? 21:31
lizmat it does
donaldh Kinda relied on for code like die "blah" unless $option;
hence, if you care about definedness then you use .defined 21:32
BenGoldberg Basically, I'd like (1..Inf).infinite to return True, (1..5).infinite to return False, and (gather { ... }).infinite to return Bool::Unknown 21:33
lizmat which is essentially Bool as a type object
benabik Except that Bool is False. 21:34
BenGoldberg r: if ( Bool ) { say "Foo!" }
camelia rakudo 9ba5dd: ( no output )
BenGoldberg I guess I'd like it to be class Bool::Unknown { method Bool() { die "Bool::Unknown is neither true nor false" } }; 21:35
lizmat the problem is that I don't think we actually have anything like a "Boolean" context 21:36
FROGGS benabik: Bool::Unknown in boolean context can either be trueish or falseish, so if that tends to be falseish you can use Bool instead
BenGoldberg trueish falsish and dieish?
FROGGS BenGoldberg: that should do 21:37
21:38 donaldh left
BenGoldberg It's too bad that none(True,False) doesn't do what I want :) 21:38
FROGGS what if .infinite would return a Failure? would that get thrown?
benabik FROGGS: I see how Unknown would work, which has nothing to do with what I said. I said Bool::Unknown isn't Bool because Bool is false and Unknown is explodey.
jnthn booleanization defuses fails
uh, boolification
lizmat: (boolean context) prefix:<?> is the boolean contextualizer, and calls .Bool 21:39
lizmat but is that what happens inside of an if {} ? 21:40
FROGGS benabik: yeah, I think I had put your sentence in the wrong context :o)
21:40 fridim_ joined
FROGGS lizmat: I think so 21:41
r: my class A { method Bool { say "what?" } }; my $a = A.new; say "uhh" if $a
camelia rakudo 9ba5dd: OUTPUT«what?␤uhh␤»
FROGGS r: my class A { method Bool { say "what?"; 0 } }; my $a = A.new; say "uhh" if $a 21:42
21:42 PacoAir left
camelia rakudo 9ba5dd: OUTPUT«what?␤» 21:42
FROGGS r: my class A { method Bool { say "what?"; 0 } }; say "uhh" if A
camelia rakudo 9ba5dd: OUTPUT«what?␤»
BenGoldberg class B::U { method Bool() { die "neither true nor false" } }; my $foo = B::U; say "?" if $foo; 21:43
r: class B::U { method Bool() { die "neither true nor false" } }; my $foo = B::U; say "?" if $foo;
camelia rakudo 9ba5dd: OUTPUT«neither true nor false␤ in method Bool at /tmp/D3UksPEygn:1␤ in block at /tmp/D3UksPEygn:1␤␤»
pmurias is there a common use for .infinite?
lizmat it's used as a check on many list methods 21:44
e.g., you cannot push onto an infinite list
21:44 iSlug left
lizmat nor can you pop from an infinite list 21:44
pmurias and what happens if we pop from a list of unknown finiteness? we hope it's finite? 21:46
lizmat it will then try to reify the list completely and hang if it turns out to be infinite after all
pmurias so for our purposes the current semantics are optimal 21:48
BenGoldberg That's what it does right now, because .infinite returns Nil (which acts like false) if a list is unknown finiteness. If we treat lists whose finiteness is unknown *separately* from True and False, we could do something different... like reify the first few thousand elements, and if the list keeps going and going, throw an error. 21:49
21:50 yoleaux joined, ChanServ sets mode: +v yoleaux
BenGoldberg Sort of like how perl5 produces a warning if you recurse too deeply 21:50
Naturally, since this is perl6, it would be a *resumable* error that gets thrown
lizmat sounds like a plan to me, let's see what TimToady / pmichaud think about it (since pmichaud wrote most of the lazy list stuff, I believe) 21:52
r: my %h=a=>1,b=>2; my $p=<a b>; say %h{$p} # is this a rakudobug, or expected behaviour? 21:53
camelia rakudo 9ba5dd: OUTPUT«(Any)␤»
jnthn waves at the halting problem
lizmat: Yeah
lizmat: We have a bug like that in the past.
pmurias BenGoldberg: does the distinction between a list of unnknown finitneness and a fininite one offer us much?
jnthn r: my @a = 1,2,3; say @a[[1,2]] 21:54
camelia rakudo 9ba5dd: OUTPUT«3␤»
jnthn That used to slice.
BenGoldberg rn: gather { }.[0].say
camelia niecza v24-88-g1f87209: OUTPUT«(Any)␤»
..rakudo 9ba5dd: OUTPUT«Nil␤»
lizmat jnthn: is that something I broke?
jnthn Which is rather surprising if you don't expect an item to flatten ;)
lizmat: The 3 there is correct.
lizmat: It used to give back (2,3) I think
lizmat then so the the Any in the "say %h{$p}" case ? 21:55
jnthn lizmat: Yeah, $p is an item
lizmat: So it's treated as a single thing, not as a list of elements to look up.
lizmat so we use the stringification of the item as the key, and then don't find anything
pmurias BenGoldberg: finite list could be so large that for practicall purposes it will be infinite (like a range) 21:56
BenGoldberg pmurias: it could allow rakudo to avoid completely hanging, if an infinite list is mistaken for a finite one
benabik r: my %h=a=>1,b=>2; my $p=<a b>; say %h{@$p}
camelia rakudo 9ba5dd: OUTPUT«1 2␤»
jnthn lizmat: correct
pmurias BenGoldberg: but a very large one will also cause rakudo to hang 21:57
jnthn lizmat: btw, the build problems you had last night are all gone now?
lizmat jnthn: yes, they were all fixed by that one commit you did early this morning
jnthn lizmat: OK, good
Realized what it was while failing to sleep... 21:58
BenGoldberg pmurias: Suppose I've got a finite list, and I .push an element onto the end. No problem, you just do it. Suppose I've got an infinite list, and I .push an element onto the end. No problem, just die with an error. Suppose I've got a list of unknown finite-ness... if we treat it as infinite, we could be wrong (dieing when we shouldn't), and if we treat it as finite, we could be wrong (hanging 21:59
forever, when we should die). By identifying it as unknown, and treating it sepearately, we can repeatedly reify $X elements, and die with a resumable exception, until the list runs out or the user chooses not to resume the exception
22:00 bluescreen10 left, logie left
lizmat fwiw, makes sense to me 22:01
BenGoldberg pmurias: Right now, lists of unknown-finiteness are treated as finite lists. The get reified when you .push onto the end. and, yes, sometimes it hangs :( 22:02
lizmat r: my $p=<a b>; my @a; @a.push($p); say @a.perl 22:05
camelia rakudo 9ba5dd: OUTPUT«Array.new($("a", "b"))␤»
pmurias r: my $foo=1..(10**(10**10));say $foo[0];
camelia rakudo 9ba5dd: OUTPUT«1␤»
BenGoldberg r: my @foo := 1..1e99; @foo.push(42); say "Alive" 22:06
camelia rakudo 9ba5dd: OUTPUT«Cannot call 'push'; none of these signatures match:␤:(Any:U \SELF: *@values, Mu *%_)␤ in method push at src/gen/CORE.setting:1448␤ in block at /tmp/oqTt9RL_Le:1␤␤»
jnthn YOu can't push to a range.
pmurias BenGoldberg: There are lists that are finite but will cause as to hang forever when we reify
BenGoldberg r: my @foo := gather { take for 1..1e99 }; @foo.push(42); say "Alive"
camelia rakudo 9ba5dd: OUTPUT«(timeout)» 22:07
jnthn .take
BenGoldberg r: my @foo := gather { .take for 1..1e99 }; @foo.push(42); say "Alive"
jnthn But yeah, will likely still time out :)
camelia rakudo 9ba5dd: OUTPUT«(timeout)»
BenGoldberg What does take with no args do?
jnthn take an empty parcel, I guess... 22:08
lizmat r: my @a; @a.push; say @a.perl # what does .push without params do?
jnthn yeah.
camelia rakudo 9ba5dd: OUTPUT«Array.new()␤»
BenGoldberg Seems kinda pointless :) but it's probably not worthwhile to make it illegal :)
jnthn Well, it's the degenerate case of take $this, $that, $the-other 22:09
lizmat r: my @a; @a.push(@a); say @a.perl # what does .push without params do?
camelia rakudo 9ba5dd: OUTPUT«Array.new()␤»
jnthn Nice try ;)
r: my $a = []; $a.push($a); say $a.perl # you wanted this :P 22:10
camelia rakudo 9ba5dd: OUTPUT«(timeout)»
lizmat jnthn: is it correct that the signature "multi method push(List:D: @values)" would accept a Parcel as @values ?
getting "No such method 'shift' for invocant of type 'Parcel'" 22:11
22:11 sqirrel joined
lizmat on @values.shift 22:11
jnthn lizmat: yes, but should it not have been *@values? 22:12
r: my @a = 1,2,3; my @b; @b.push(@a); say @a
lizmat well, that's the slurpy case
camelia rakudo 9ba5dd: OUTPUT«1 2 3␤»
jnthn Um, there must be a bit more to it...
multi method push(List:D: *@values) {
lizmat I'm trying other candidates to speed things up
hmmm… let's try it without the @values candidate again 22:13
jnthn *nod*
That'll need a little care
If you add a $foo candidate then a single array will bind to it, then not be flattened correctly. 22:14
lizmat you mean like "multi method push(List:D: Mu $value)" ?
jnthn yeah
If you just add that, I bet it breaks stuff. 22:15
lizmat yes, that's why I added the @values candidate
jnthn yeah, but you can't just .shift that, as you'd mutate the original thing. 22:16
it'll need iterating.
lizmat indeed
I'll do that
ok, that seems to work, spectesting 22:23
still one spectest failing, will look at it tomorrow 22:27
gnight, #perl6!
22:29 pmurias left
jnthn 'night, lizmat 22:30
22:30 Guest94658 left 22:35 skids joined 22:38 ajr_ left
jnthn 'night, #perl6 22:46
22:49 mtk joined 23:19 btyler left 23:41 stevan_ joined