[00:00] *** labster joined [00:02] *** RabidGravy left [00:05] *** pdcawley_ joined [00:07] *** pdcawley left [00:08] *** woodruffw left [00:08] *** woodruffw joined [00:08] *** woodruffw left [00:09] *** tmch left [00:09] *** woodruffw joined [00:09] *** tmch joined [00:11] *** perlawhirl left [00:14] *** ggoebel16 left [00:14] *** woodruffw left [00:15] rakudo/nom: b243a96 | timotimo++ | src/Perl6/Metamodel/ (2 files): [00:15] rakudo/nom: "setdebugtypename" lives in metamodel Naming now instead of ClassHOW [00:15] rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b243a96632 [00:26] *** SCHAAP137 left [00:27] *** BenGoldberg joined [00:30] sortiz: Sorry for the late reply. Awesome, thank you. our works just fine. [00:30] Btw. is there a way to ignore the "is export" from a module. Like perl5's use Foo::Bar (); ? [00:30] *** musca` is now known as musca [00:34] *** rindolf left [00:34] *** pdcawley joined [00:35] rudi_s, That is the difference between 'use' and 'need': 'use' imply 'need' *and* 'import' [00:36] sortiz: Just to be sure. need Foo::Bar in perl6 works like use Foo::Bar () in perl5? [00:37] rudi_s, Exactly. [00:37] *** pdcawley_ left [00:39] sortiz: Perfect, thank you. - I didn't realize this when reading the docs and was confused that such an important could be missing, but now it's pretty clear (and I've no idea how I could miss that). [00:39] rudi_s, yw [00:41] *** spider-mario left [00:45] *** cbk joined [00:45] *** ggoebel16 joined [00:48] *** dfcarpenterak left [00:53] *** skids joined [00:59] *** dfcarpenterak joined [01:06] *** labster left [01:06] *** yeahnoob joined [01:07] *** dfcarpenterak left [01:09] *** labster joined [01:18] i think it'd probably be easier to write the "dump all QAST nodes to json" as a single method on QAST::Node that knows all about the individual nodes we have and such [01:18] rather than splitting it out into multiple methods like the rest of the code already does, with its "dump extra info" and such [01:18] individual nodes, but especially individual roles [01:18] which is, i assume, where the majority of the complexity comes from [01:29] *** yeahnoob left [01:31] *** yeahnoob joined [01:31] *** ZhangGong|2 joined [01:31] *** yeahnoob left [01:42] *** justine joined [01:52] *** kid51 left [01:53] *** Actualeyes joined [01:59] *** snarkyboojum joined [02:05] *** snarkyboojum left [02:07] *** kalkin-_ joined [02:11] *** kalkin- left [02:24] *** vendethiel joined [02:31] *** arcetera left [02:32] *** arc__ joined [02:33] *** arc__ is now known as arcetera [02:33] m: my $c = -1; (4 * [+] (1, 3 ... *)[0 .. 100_000].map({ ($c = -$c) / $_ })).say; # happy approximately pi day [02:33] rakudo-moar b243a9: OUTPUT«3.14160265348972␤» [02:33] *** arcetera left [02:33] *** arcetera joined [02:34] *** arcetera left [02:35] *** arc__ joined [02:35] *** arc__ is now known as arcetera [02:35] *** arcetera left [02:35] *** arcetera joined [02:45] *** ilbot3 left [02:47] *** ilbot3 joined [02:47] how can I do the FILE C type in nativecall? [02:49] *** vendethiel left [02:52] class FILE is repr('CPointer') { }; [02:52] *** TimToady left [02:53] *** TimToady joined [02:54] Note that in C, FILE is a struct, and you'd be using pointer-to-FILE all over the place, whereas 'class FILE ...' creates a class which behaves like a pointer... it's more like a c-level pointer-to-FILE. [02:57] *** BenGoldberg left [03:03] *** toddr joined [03:04] Hi, so perl6 doesn't have . in INC right? [03:07] *** toddr left [03:09] not by default [03:09] I keep wishing that . or ./lib was in there [03:09] Or at least ~/.lib [03:09] (Or something like it) [03:11] Better than having things hijacked because you didn't notice a .pm file in ./ IMO. [03:14] *** toddr joined [03:15] I guess [03:15] But what would be the reason not to have any homedir based thing in there by default? [03:16] I missed the answer when my IRC client crashed didn't I? [03:16] Yes. The answer was yes. [03:16] Or, actually: not by default [03:17] There's PERL6LIB=. or perl6 -I. or use lib '.'; [03:17] So I'm putting a presentation together. I'm wondering if there's any documentation on why this decision was made [03:17] Better than having things hijacked because you didn't notice a .pm file in ./ IMO. [03:17] is that how it works in Perl 5? [03:17] don't get me wrong. I applaud it. [03:18] I could see a subdir of homedir. Probably just NYI given the state of package installers, different systems have different conventions e.g. ~/.local [03:18] yes, perl5 doesn't include . in @INC [03:18] ? [03:18] or ~ or any subdir thereof, by default [03:18] no . is at the end of @INC in perl5 [03:18] MadcapJake`: No, . is in @INC in Perl 5. [03:19] * geekosaur sighs, too tired... [03:19] It is on my system. [03:20] MadcapJake`: And https://metacpan.org/pod/local::lib is sort-of popular. I wish something somewhere in ~ was in Perl6's include paths by default [03:20] Speaking of this. What is that array called in Perl 6? [03:21] I'm guessing it has to do with CUR [03:21] $*REPO? [03:23] hrm. So that's why I couldn't find the precomps in ~/.local where I thought I put them with --prefix. Hardcoded to ~/.perl6 apparently or something. [03:23] Seeing as technically modules are located in a separate precomped/mangled directory, it's more about maintaining true cross-platform unicode support [03:24] yeah precomps does not follow a make --prefix flag [03:24] is there a corresponding flag? [03:25] skids, https://github.com/rakudo/rakudo/blob/nom/docs/running.pod#affecting-precompilation [03:29] huh. But my hacked-up rakudobrew should be setting NQPs --prefix as well. [03:30] --prefix wasn't properly passing to nqp until recently, i believe [03:31] nqp --show-config | grep prefix shows moar::prefix=/home/me/.local, but my precomps are still in ~/.perl6. [03:33] *** lostinfog left [03:34] prefix only handles installs, precomp doesn't honor it [03:35] nqp dir only deals with prefix inside Configure.pl (iiuc) [03:35] *** geekosaur left [03:36] I think the only way you can adjust precomp location is with RAKUDO_PREFIX [03:37] Then I don't get https://github.com/rakudo/rakudo/blob/nom/src/core/CompUnit/RepositoryRegistry.pm#L69 [03:37] *** geekosaur joined [03:38] *** cognominal left [03:38] *** noganex_ joined [03:39] maybe RAKUDO_PREFIX is being set somewhere? I'm really an NQP noob but a glance at Configure.pl doesn't really show prefix going anywhere special (must be wrong though...) [03:39] *** cognominal joined [03:40] well, it's not in my shell's env. Too tired to figure this out now though. [03:40] https://github.com/rakudo/rakudo/blob/nom/src/vm/moar/ModuleLoaderVMConfig.nqp - could this be interesting? [03:41] maybe it's this: https://github.com/perl6/nqp/blob/master/Configure.pl#L93 [03:41] *** noganex left [03:43] yeah i think it's that and then it's stored here: https://github.com/perl6/nqp/blob/master/Configure.pl#L235-L239 [03:43] (for MoarVM) [03:44] oi, makefiles are totally brick walls for me :P [03:44] *** toddr left [03:45] honestly it looks like prefix is just used there to install to the right location, I'm not really understanding how nqp::backendconfig attains its data [03:50] It looks like the 'home' repo doesn't have a configurable to alter it. [03:52] *** cognominal left [03:52] *** buharin joined [03:53] *** cognominal joined [03:54] *** justine left [04:06] *** cpage_ left [04:07] *** cpage_ joined [04:28] *** wamba joined [04:29] *** skids left [05:09] *** buharin left [05:10] *** yqt left [05:12] *** khw left [05:12] *** buharin joined [05:31] is there a nicer way to write the following? (2..22).grep({not $_ % 6}).say [05:33] basically want to skip values in a range [05:43] *** cpage_ left [05:43] m: say (2..22).grep(*!%%6) [05:43] rakudo-moar b243a9: OUTPUT«(2 3 4 5 7 8 9 10 11 13 14 15 16 17 19 20 21 22)␤» [05:43] Like that saaki ? [05:44] m: say (2..22).grep(*!%6) [05:44] rakudo-moar b243a9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/NXsrKJ38xo␤Cannot negate % because multiplicative operators are not iffy enough␤at /tmp/NXsrKJ38xo:1␤------> 3say (2..22).grep(*!7⏏5%6)␤ expecting any of:␤ infix␤ infix stoppe…» [05:44] Okay [05:44] So yeah the first one [05:44] I assume [05:45] *** cpage_ joined [05:46] *** Cabanossi left [05:46] p6: (2..22).grep({not $_ % 6}).say [05:46] rakudo-moar b243a9: OUTPUT«(6 12 18)␤» [05:47] *** tmch left [05:48] Hotkeys: not the right sequence :| [05:50] *** Cabanossi joined [05:50] p6: (2..22).grep(* %% 6).say [05:50] rakudo-moar b243a9: OUTPUT«(6 12 18)␤» [05:51] let's say i want values in increments of 1_000_000, just doesn't make sense to use grep on a sequential range. guess the range class doesn't have a provision for skipping [05:53] maybe a gather-for-take i guess [05:55] *** adeeb joined [05:57] Hello guys I am adeeb. I need help in extracting email address along with first name and lastname using perl software from any given website. I would be grateful to y99ou [05:57] *** ZhangGong|2 left [05:58] *** darutoko joined [05:58] saaki: oh [05:58] i gave a bad example on the range side since i don't care about 2 [05:59] adeeb: maybe p5 is better at this task. i think there may be some cpan modules to so stuff like that already. [05:59] m: say (6, 12 ... 100) # all multiples of 6 to 100 [05:59] rakudo-moar b243a9: OUTPUT«(6 12 18 24 30 36 42 48 54 60 66 72 78 84 90 96)␤» [05:59] Like that? [05:59] s/so/do/ [05:59] if you want more general [06:00] thank you can you guide me a link [06:00] ask in #perl [06:00] Hotkeys: perfect! [06:01] m: say {($^a, * + $a ... $^b)}(1_000_000, 10_000_000) [06:01] rakudo-moar b243a9: OUTPUT«(1000000 2000000 3000000 4000000 5000000 6000000 7000000 8000000 9000000 10000000)␤» [06:01] There's essentially an anonymous function for multiples of a up to b [06:01] *** adeeb left [06:01] *** ZhangGong|2 joined [06:02] If you want the first n numbers [06:02] Hotkeys: cool. also, i missed out on the * [06:03] m: (6, 12 ... *)[^10] [06:03] rakudo-moar b243a9: ( no output ) [06:03] er [06:03] Inf [06:03] ? [06:03] m: say (6, 12 ... *)[^10] [06:03] rakudo-moar b243a9: OUTPUT«(6 12 18 24 30 36 42 48 54 60)␤» [06:03] First 10 [06:03] * is hard to explain [06:03] i see [06:03] It means 'whatever' [06:03] And does different things in different contexts [06:04] Like here's the Fibonacci sequence [06:04] m: say (0, 1, * + * ... 100) [06:04] rakudo-moar b243a9: OUTPUT«(0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 1346269 2178309 3524578 5702887 9227465 14930352 24157817 39088169 63245986 102334155 165580141 267914296 433494437 70140…» [06:04] Well I did that poorly [06:04] But you get the gist [06:05] yes, thanks [06:05] In a sequence like that * + * acts like $^a + $^b [06:05] But at the end of a sequence it basically acts as inf [06:05] Unless you make it a conditional [06:06] like ?p6> say (1,2,4 ... * > 30) [06:06] Er [06:06] Wrong command [06:06] And no new line [06:06] But [06:06] It does what it looks like it does [06:07] can't seem to find those uses of * in docs [06:08] http://design.perl6.org/S02.html#The_Whatever_Object [06:08] Here's some from the spec [06:09] really like the docs for the most part, just tough to find some of these cool little patterns there [06:10] yeah [06:10] the docs aren't perfect but they'll improve with time [06:11] you could grep the setting for * and Whatever maybe [06:11] Anything you can't find in the docs you can probably find in the specs with a little elbow grease [06:12] have managed to dig up some things from design.* via google, bit surprising sometimes. should probably just read them through. [06:12] lol [06:12] be aware not everything in the spec is implemented yet [06:12] but whatevers implemented is probably in the spec [06:13] if that makes sense :p [06:13] it does [06:17] would like to contribute, seems nqp needs some work [06:31] *** billj joined [06:32] p6: say 3; [06:32] rakudo-moar b243a9: OUTPUT«3␤» [06:32] * saaki may resolve to docos [06:35] *** billj left [06:51] *** jack_rabbit joined [06:57] *** ufobat joined [07:02] *** domidumont joined [07:05] *** jack_rabbit left [07:06] *** domidumont left [07:07] *** domidumont joined [07:09] *** FROGGS joined [07:23] *** sjoshi joined [07:26] *** abaugher left [07:27] *** abaugher joined [07:29] *** jack_rabbit joined [07:33] *** ChoHag_ is now known as ChoHag [07:35] *** CIAvash joined [07:36] *** atweiden joined [07:38] *** firstdayonthejob joined [07:39] *** nakiro joined [07:41] *** st_iron joined [07:42] *** el_amigo joined [07:42] *** st_iron left [07:43] morning, #perl6 [07:43] in rakudo source, in the case of `multi sub infix:(FatRat, FatRat)` [07:43] (https://github.com/rakudo/rakudo/blob/b243a9663273bf3f82c51109ab0eff9556d2177e/src/core/Numeric.pm#L32) [07:43] is this the intended behavior? [07:43] m: my FatRat $f = FatRat(989898988898989898980909090939838302233848473393040383234234509484.3489523478234723847238432423); say $f eqv FatRat(989898988898989898980909090939838302233848473393040383234234509484.3489523478234723847238432423); say $f eqv FatRat(989898988898989940247844191134641988224436627880004840480824357399.83933482381524942767485346932); [07:43] rakudo-moar b243a9: OUTPUT«True␤True␤» [07:43] or this [07:43] m: my FatRat $f = FatRat(989898988898989898980909090939838302233848473393040383234234509484.3489523478234723847238432423); say $f eqv FatRat(989898988898989898980909090939838302233848473393040383234234509484.3489523478234723847238432423); say $f == FatRat(989898988898989940247844191134641988224436627880004840480824357399.83933482381524942767485346932); [07:43] rakudo-moar b243a9: OUTPUT«True␤False␤» [07:44] *** el_amigo is now known as st_iron [07:44] *** jack_rabbit left [07:45] ...no? :) [07:45] seems they should only be == or eqv if they're numerically equal [07:46] which is a pretty clear-cut notion [07:46] *** AlexDaniel left [07:48] masak: good morning to ya :) i was thinking about writing a new multi sub handling FatRat [07:49] ok :) [07:49] good morning :) [07:49] *** fireartist joined [07:50] should the eqv sub go in rakudo/src/core/Rat.pm ? [07:51] i haven't tested but it's possible Rat is affected by this too [07:52] *** st_iron left [07:53] any thoughts on rewriting the existing one in Numeric.pm [07:54] I'd say go for it; see whether the result is better [07:54] this ought to be measurable in absolute passing-tests numbers [07:55] the above evals are obviously suspicious and a strike against the current implementation [08:12] *** pierrot left [08:14] *** cpage left [08:21] *** buharin left [08:22] *** papayaman joined [08:23] mst: hey man, i know you said on twitter that you don't like perlmaven. why don't you submit PRs or issues to its github repo ? https://github.com/szabgab/perlweekly/issues [08:23] mst: it's not going to fix itself you know.. [08:24] unless there's some telepathy going on between you and gabor.. [08:24] papayaman: does this discussion belong into #perl6? [08:25] *** papayaman left [08:26] wow, /quit'ing after leaving such a message isn't the best thing you can do to emphasize your point [08:28] *** zakharyas joined [08:29] trouble in paradise? [08:29] <[Tux]> test 21.717 [08:29] <[Tux]> test-t 13.739 [08:29] <[Tux]> csv-parser 49.050 [08:36] *** RabidGravy joined [08:37] moritz: you mean joining specifically to say your message and then immediately leaving isn't the way to do things??? [08:37] :p [08:39] *** firstdayonthejob left [08:42] marning! [08:45] *** wamba left [08:45] *** salv0 joined [08:45] moritz: I agree it wasn't on-topic... but everytime such a thing happens, I understand a bit better the lightning-rod role mst has taken on in the p5 community. [08:47] it's like... people who won't ever rise above ad-hominem anyway, end up thinking that mst is the cause of all their worries. (and so other people can get on with being productive.) [08:49] *** abraxxa joined [08:53] *** Actualeyes left [08:56] the best solution for the large minority of people who find mst toxic is to attempt to ignore him [08:57] Idk who mst is [08:57] *** Actualeyes joined [08:57] ah perl6-js grant? \o/ [08:58] Yeah we'll take over the web soon [08:58] And then the world [09:00] and after some years, we'll still be big in Japan! [09:04] *** dakkar joined [09:11] sorry, I've taken over the world already, I've just been subtle about it [09:13] you're the fifth person this month to come in and say that [09:13] RabidGravy: if that's the case, can you "fix" a few parking tickets I have, you know as master of the world [09:16] *** cpage_ left [09:16] I still find it interesting that python3 will not only fail on removed 2.x syntax (like circumfix:<` `> and infix:<< <> >>), but do so in a way that gives no indication it ever worked [09:16] it's like the total opposite of the Perl 6 approach [09:16] El_Che: that wouldn't be very subtle, now would it [09:17] *** cpage_ joined [09:17] masak: its hard when people think of perl 5 -> 6 like they think of python 2 -> 3 [09:17] Like perl 6 is brand new [09:17] masak: I think their goal is to make a clean-break and shed what they consider to be mis-features [09:18] Well [09:18] Its a long time in the making [09:18] But brand new kind of [09:18] that doesn't forego helpful errors, but it explains why they break backwards compatibility [09:18] In the sense that it isn't p5 [09:19] masak: backwards-compat is valuable, but it can also be a great burden sometimes. [09:19] oh, agree in general [09:20] *** daxim left [09:20] but here it just feels like a missed opportunity to put in the minimal amounts of code to recognize-but-flag-as-gone the old syntax [09:20] they do in the case of `print "hi"` vs `print("hi")`, thankfully [09:21] heh, it would be kindof amusing if you could import from past [09:21] from past import print_statement [09:21] *** cpage_ left [09:27] *** bjz joined [09:28] well, you can always do like the JavaScript community, and compile your private dialect of python3 to standard python3 :) [09:30] lol. [09:30] I do that in JavaScript too, because the dialects that are actually available where I need to run are broken and braindead in various ways. [09:30] *** ZhangGong|2 left [09:38] I'll just mention that I really don't like coffeescript at all [09:43] hi, is there a way to list all methods of an instance? [09:44] like so, class Foo { method bar() { } method baz(){} }; and then my $f = Foo.new; print $f.methods or something along those lines [09:46] m: class Foo { method bar() { } method baz(){} }; say Foo.^methods [09:46] rakudo-moar b243a9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/NgJveNd_F9␤Strange text after block (missing semicolon or comma?)␤at /tmp/NgJveNd_F9:1␤------> 3class Foo { method bar() { }7⏏5 method baz(){} }; say Foo.^methods␤ expecting any of:␤ i…» [09:46] m: class Foo { method bar() { }; method baz(){} }; say Foo.^methods [09:46] rakudo-moar b243a9: OUTPUT«(bar baz)␤» [09:46] Can do it on an instance too [09:47] jnthn: cheers [09:54] *** virtualsue joined [09:54] *** cognominal left [09:56] if I have a CStruct and I apply a role to it with an attribute will that mess up the representation in native-land? [09:58] RabidGravy: Compile-time composition, or mix-in? [09:58] *** cognominal joined [09:59] role Foo { has int32 $.x }; class C is repr('CStruct') does Foo { } # this should be fine since the attributes are flattened into the role, so it's no different from CStruct's point of view [09:59] afaik, anyways :) [09:59] *** rindolf joined [09:59] either really, in portaudio there is a struct DeviceInfo but everywhere else in the API it is reference by an "index" [10:00] so it would be nice to store the index in the class somehow but not make that appear to the native struct [10:00] Oh... [10:01] I'd probably solve that with delegation [10:01] yeah, that was the next option [10:01] class WrapperThingy { has TheCStructType $.foo handles *; has $.index; } [10:01] What does handles do [10:02] I haven't seen that one before [10:02] Is it a native thing [10:02] it makes the methods of the attribute appear as methods of the object [10:02] no not native [10:03] m: class Foo { method bar() { say "bar" } }; class Baz { has Foo $.foo handles = Foo.new }; Baz.new.bar [10:03] rakudo-moar b243a9: OUTPUT«bar␤» [10:04] Neat [10:04] the * in jnthn's example is "gimme everything" [10:04] Right [10:04] I assumed as much [10:04] I've gotten good at guessing what whatever does [10:04] you can also do it with a hash which is their-name => my-name [10:05] Oh so like [10:05] You could map bar to qux [10:05] And then call qux [10:05] yeah [10:05] m: class Foo { method bar() { print "Bar"; } }; class Baz { has Foo $.f handles *; method yay(){ self.bar(); } };Baz.new.yay(); #<== something like that i would imagine [10:05] rakudo-moar b243a9: OUTPUT«Bar» [10:06] m: class Foo { method bar() { say "bar" } }; class Baz { has Foo $.foo handles bar => 'bap' = Foo.new }; Baz.new.bap [10:06] rakudo-moar b243a9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/d1OfTI0aH_␤Cannot modify an immutable Str␤at /tmp/d1OfTI0aH_:1␤» [10:06] Handles in my mind brings up memories of when I had to do VB.Net in high school [10:06] And handles did evenets [10:06] Events [10:06] m: class Foo { method bar() { say "bar" } }; class Baz { has Foo $.foo handles (bar => 'bap') = Foo.new }; Baz.new.bap [10:06] rakudo-moar b243a9: OUTPUT«Method 'bap' not found for invocant of class 'Baz'␤ in block at /tmp/SV50oUkceS line 1␤␤» [10:06] or even the other way around [10:06] m: class Foo { method bar() { say "bar" } }; class Baz { has Foo $.foo handles (bap => 'bar') = Foo.new }; Baz.new.bap [10:06] rakudo-moar b243a9: OUTPUT«bar␤» [10:07] other way i would imagine, as thats how its in Moose :| [10:07] .tell azawawi I'd like to extend your Selenium::WebDriver to support BlackBerry devices... and I think I'd need guidance on how to setup Firefox testing. Would be nice if we could chat a little [10:07] FROGGS: I'll pass your message to azawawi. [10:08] *** cognominal left [10:09] Yes, it points from the name you expose to the name it'll map into [10:09] I always have to look [10:10] I also have to not use a '*' in about half of cases as it doesn't like some kinds of members [10:10] jnthn: can you tell me if this patch is just rubbish or sensible? https://github.com/rakudo/rakudo/commit/802a6db7be0c5f962c7ceadbb6b4929e3cddd7bc [10:11] Makes no sense [10:11] $s is already a native string [10:11] So it'll code-gen a box just so it has one to throw away :P [10:13] *** pmurias joined [10:14] aga do do do [10:16] jnthn: so my gut feeling was right... we got a Heisenbug here [10:17] maybe... if I'd add a serialize function to NativeRef, I'd dump its value and maybe get a clue what it is [10:18] * FROGGS wants Data::Dumper in C [10:18] *** cognominal joined [10:18] gdb ;) [10:18] ha! [10:18] p my_struct [10:19] well, I could potentially add a breakpoint... [10:19] hmmm [10:19] yes, will try that [10:27] *** espadrine joined [10:30] *** TEttinger left [10:31] *** espadrine_ joined [10:32] *** espadrine left [10:36] *** pierrot joined [10:38] *** virtualsue left [10:39] *** profan left [10:41] *** profan joined [10:42] *** cpage_ joined [10:44] *** atweiden left [10:44] *** espadrine joined [10:46] *** daxim joined [10:48] *** espadrine_ left [10:54] m: try 1e0 / 0e0; say $!.^name [10:54] rakudo-moar b243a9: OUTPUT«X::Numeric::DivideByZero␤» [10:55] * colomon is looking at the FatRat / Rat eqv patch and trying to figure out what it is meant to be doing. [10:59] *** pmurias_ joined [11:02] *** pmurias left [11:04] m: class Foo { method bar($a) { }; method baz($a, $b) { } }; print Foo.^methods.map(*.arity) [11:04] rakudo-moar b243a9: OUTPUT«2 3» [11:04] should'nt this be printing 1 2? [11:05] ah nevrmind, prolly self is included :| [11:06] *** mls_ joined [11:08] *** cognominal left [11:08] *** cognominal joined [11:09] gregf_: self is included; we don't consider self special. If you wanted to call the method as a code object directly you'd have to pass something to fill the invocant slot. [11:10] *** mls left [11:11] *** mls joined [11:12] *** mls_ left [11:13] *** musiKk_ joined [11:17] *** kid51 joined [11:23] *** cognominal left [11:23] *** cognominal joined [11:23] oh - ok [11:24] so Foo.^methods[0].(Foo.new, 10) #or whatever [11:25] do self/this thingies are realy necesarry ? it's "how it works" currently but you do not pass car somewhere so there car can start engine... currently objects "use" methods in the classes so method need to know which object called it but can it be another way ? objects "slurps" method from class storage and call it ? [11:25] hi today :) [11:27] Woodi: a method isn't necessarily called on an instance of the class that defines it. [11:27] *** labster left [11:27] tweakism: but that is special case of OO system you have [11:28] other languages provide a keyword like 'this', but I like the explicit-self-parameter style personally. [11:28] Woodi: I don't think 'allows inheritence' is very special among OO implementations, is it? [11:29] tweakism: no idea what is allow inheritance system... [11:30] Woodi: Vehicle defines wheels(). Car inherits from Vehicle. somecar.wheels() calls Vehicle.wheels() on an instance of Car. (assuming Car doesn't override wheels()) [11:31] *** Praise left [11:31] tweakism: and what is *popular* in industry is not important at all. what's is better is. [11:32] *shrug* [11:32] Woodi: self/this are not mandatory afaik [11:32] at the end you will hit valit range of specialisations usefull in particular cases :) [11:32] for example in this case: self 'is' needed: [11:33] gregf_: but it's like current OO implementations work internally. i wonder what about something else :) [11:33] class Foo { def bar;end }; class Bar < Foo; def baz; self.class.superclass.instance_method(:bar).bind(self).();end; end <== in ruby [11:34] Woodi : even in Java 'this' is not mandatory [11:35] gregf_: but it is there, i think. syntax isn't important [11:35] ultimately, they are just different syntaxes for the same thing, I think. not entirely certain, but I think. [11:36] the car object *does* get "passed" to the start_engine method in either case; making it an explicit parameter makes it easy to reason about. [11:36] gregf_: what this Ruby thing do ? you have variable bar in Foo but later use method bar... [11:36] some languages make a real mess w/ this (JavaScript). [11:37] tweakism: yes. but maybe something other have sense too ? and maybe it can be better in some cases ? [11:37] Woodi: its a mental way by which a specific class calls a different method from the generic/parent class :| #ofcourse s/{//; [11:39] right off out for a bit [11:39] gregf_: it's make sense. why clone methods into *every* object, would be waste. but this system just use objects like varibles... [11:39] Woodi: so you're saying design a language that requires neither a self parameter nor a self/this keyword? [11:40] tweakism: trying things (or just thinking) is like science works :) [11:40] Woodi: You might find CLOS interesting :) [11:41] jnthn: I need to learn Lisp first probably... :) [11:41] jnsso it's already invented ?? [11:41] jnthn* [11:42] using objects is indirection via pointer :) [11:42] Woodi: Well, they have a different way of looking at objects/methods is all. Objects don't have methods, and the "methods" can have multiple invocants [11:42] so you're thinking about a system to reference objects wihout referencing them? [11:43] Actors are also intereting to look at, and probably closer to the original thinking of OO. [11:43] jast: I think not. objects just take methods from class and use it on fields [11:43] *** RabidGravy left [11:43] *** kid51 left [11:43] depends. not all implementations of object orientiation even *have* classes... [11:44] The trouble with OO naming wise is it puts the focus on objects, whereas the interesting thing is the messages. [11:44] like javascript, to take random example [11:44] +a [11:45] * jnthn found OO design a lot easier when he started desining message first, then grouping them by invariants to discover the objects, rather than trying to work out what objects should exist [11:45] *designing [11:46] jnthn: discover ? you mean paper-pencil-design ? [11:46] m: say (989898988898989898980909090939838302233848473393040383234234509484.3489523478234723847238432423).nude [11:46] rakudo-moar b243a9: OUTPUT«(9898989888989898989809090909398383022338484733930403832342345094843489523478234723847238432423 9999999999999999583119736832)␤» [11:46] * colomon is trying to figure out how that makes any sense [11:46] a simplistic approach to OO design that works surprisingly well is to start with a bunch of subroutines, and see what data they need in common and pass around everywhere [11:47] I take a data-centric view, too, usually [11:47] then you can start putting the common data into one or several related objects, using Common Sense[tm] [11:47] Woodi: For many design tasks I use pen/paper or a whiteboard at first, but I quickly move to sketching in code instead. [11:47] what's almost never a good idea is starting with tons of base classes and building up a huge hierarchy [11:48] premature generalisation is the root of much mess [11:48] Woodi: But I mostly just mean that I found that "what classes should I have" and "what fields to they need" tend to come later than "what behaviors should the system have" for me. [11:48] you don't know what the general patterns are until you've implemented/designed several similar things [11:48] I quite like composition like with P6's roles [11:48] people want to inherit because you can, but has-a relations seem to usually be more appropriate, yes? [11:49] *** wamba joined [11:51] nqp: d811340 | (Pawel Murias)++ | src/vm/js/HLL/Backend.nqp: [11:51] nqp: [js] Switch from uglifyjs to js-beautify. [11:51] nqp: review: https://github.com/perl6/nqp/commit/d81134094d [11:51] nqp: 4e1979c | (Pawel Murias)++ | src/vm/js/nqp-runtime/ (2 files): [11:51] nqp: [js] Move up serialization format to version 18. [11:51] nqp: review: https://github.com/perl6/nqp/commit/4e1979c88d [11:51] *** pmurias_ is now known as pmurias [11:52] jnthn: are there any ways to determine if a given closure needs to be serializable? [11:52] *** tmch joined [11:53] *** cognominal left [11:54] *** cognominal joined [11:59] * timotimo generally develops dada-centric [11:59] jnthn: if I store lexicals using js lexicals it's more efficent but makes it hard to extract them for serializing closures :/ [12:00] *** spebern joined [12:02] pmurias: I'm pondering, but...I don't really have a good answer. [12:02] pmurias: Rakudo will get much more aggressive at lexical -> local lowering [12:02] nqp: 6f3aa41 | (Pawel Murias)++ | src/vm/js/nqp-runtime/serialization.js: [12:02] nqp: [js] Fix typo, ilmari++. [12:02] nqp: review: https://github.com/perl6/nqp/commit/6f3aa41f2e [12:02] *** spebern left [12:03] pmurias: So it may become less of a problem than today [12:03] *** spebern joined [12:03] pmurias: But yeah, potentially any closure might be serialized and the demand to do so may even come from a totally separate compilation unit. [12:04] *** wamba left [12:06] I could generate both a serializable and unserializable version and just switch to the latter once we know that no serialization will happen, but it seems like something that would just end up adding to much complexity [12:06] Plus you can't know so easily... [12:07] yes, it would require user "pragmas" or some other things, and compiling Perl 6 is when we care about NQP speed the most [12:08] more and more I'm coming to the conclusion that I should have a seperate analysis pass before actually compiling to js [12:09] m: say Rat.new(9898989888989898989809090909398383022338484733930403832342345094843489523478234723847238432423, 10000000000000000000000000000) [12:09] rakudo-moar b243a9: OUTPUT«989898988898989898980909090939838302233848473393040383234234509484.348952347823472397436717074015␤» [12:10] which could determine things like "this sub is never rebound and only called with named parameters from those 2 places and doesn't care about dynamic variable" [12:10] *** spebern` joined [12:12] jnthn: would SPESH benefit from being preseeded with facts, like if I could statically infer what the type of a given variable is [12:12] ? [12:12] pmurias: Not epsecially. The problem comes down to proof. [12:13] pmurias: That is, a bunch of what spesh does is throw out checks and virtualization [12:13] pmurias: But it has to know it's safe to do that [12:14] pmurias: We can in various cases generate simpler code from static analysis. [12:14] *** jolts left [12:17] jnthn: I'm thinking about stuff like "my class Foo {...}; my $foo := Foo.new; # we know what type $foo is once we close the classes" [12:17] *** Skarsnik joined [12:18] mere guess seem of very little value to SPESH as it runs at runtime and can just check the type [12:18] ...unless it's re-bound :) [12:20] *** spebern left [12:20] *** spebern joined [12:22] of course, which is why such type inference seems to complex to put in an adhoc manner inside the code generator [12:23] Yeah...well, I've figured we'll do better with dynamic optimization in general. [12:23] for moarvm it seems better and it seems like something that will be more predictable [12:23] Because people want their scripts to run fairly snappy too, and doing fancy analysis on something that won't do much at runtime anyway is kinda wasted [12:23] But at runtime you can discover what's hot and worth investing time optimizing [12:32] moritz: and in any case, as I *said* on twitter, when I submitted bug reports for perlmaven gabor yelled at me for criticising his code and didn't fix any of the bugs, so shrug, I already fscking tried :( [12:33] stmuk_: indeed; people are allowed to dislike me if they want to :) [12:33] * mst apologises for the noise, was just following up the highlight [12:36] 's ok [12:36] *** wamba joined [12:38] * mst suspects that because I forgot to do the reply-chaining thing he'll've seen an RT of the first tweet but not the subsequent one, so that's arguably my fault anyway [12:42] *** virtualsue joined [12:45] *** spebern left [12:47] *** johndau joined [12:48] * masak wonders if he would ever yell at a contributor, no matter who it was, for criticising his code [12:48] *** johndau left [12:48] meh, everyone has bad days / makes poor/hasty decisions. [12:48] some more often than others. [12:49] 'sooth [12:51] *** johndau joined [12:52] *** johndau left [12:56] *** kaare_ joined [12:57] .oO( how dare you insinuating that I make poor decisions! ) [12:59] * masak .oO( how dare you joke about serious subject matters! ) [13:04] *** Cabanossi left [13:06] *** Cabanossi joined [13:06] o/ #perl6 [13:15] *** cdg joined [13:21] *** Some-body_ joined [13:21] *** DarthGandalf left [13:22] *** Some-body_ is now known as DarthGandalf [13:22] *** spebern` left [13:23] *** cognominal left [13:24] *** cognominal joined [13:27] *** zakharyas left [13:28] *** kanishka joined [13:29] *** ilbot3 left [13:29] *** ilbot3 joined [13:30] *** tmch left [13:32] *** aborazmeh joined [13:32] *** aborazmeh left [13:32] *** aborazmeh joined [13:32] *** CIAvash left [13:33] *** molaf joined [13:35] *** RabidGravy joined [13:36] *** camelia joined [13:36] PSA: rakudo, nqp and roast commits will now be announced in #p6dev, not here anymore [13:37] *** ChanServ sets mode: +v camelia [13:38] I didn't know there was a #p6dev [13:40] That's because it didn't exist until recently :) [13:40] recently as in "just now"? [13:40] *** skids joined [13:40] *** Cabanossi left [13:42] yes [13:42] * RabidGravy gets in there [13:42] *** Cabanossi joined [13:48] i'm happy to hear that new channel day has arrived [13:49] hey sue :) [13:50] did you get to the hackathon last saturday? [13:50] yes! :D [13:50] kewl [13:50] i was just a little sad so many people that have been to the conference didn't attend the hackathon :| [13:51] but that just makes the reinforcement of "next time i'll sign up on time" stronger [13:52] if it would have helped, you could have had my registration [13:52] :o [13:52] i hadn't considered that avenue of thought at all! [13:52] however i enjoyed it no end [13:53] wait ... were you saying you weren't able to attend, or you would have offered to let me attend instead of you? [13:54] rakudo-star-daily: a3d4488 | coke++ | log/ (8 files): [13:54] rakudo-star-daily: today (automated commit) [13:54] rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/a3d44886b1 [13:55] i'd have watched stmuk do his talk through the window ;-) [13:55] no, i couldn't possibly have accepted that :) [13:56] surprised you weren't there but glad you made it on sat [13:57] i messed up big time. i've been told way in advance about things, been reminded at least once, but still procrastinated signing up until it was quite a bit too late [13:58] but i did manage to get some code done during the hackathon, which felt good [13:58] *** vendethiel joined [14:00] stmuk used your code in his talk i believe - SDL2::Raw [14:00] aye, i saw :) [14:01] i'm looking forward to the recording [14:01] lots of good feedback [14:01] but SDL2::Raw is really just the most straight-forward binding to SDL2 that you could possibly come up with [14:01] so there's not too much credit to be given ;) [14:01] the examples/ folder, on the other hand ... that stuff is kinda neat! [14:01] i'm using something quite similar with Go right now [14:02] virtualsue: something quite similar to Go? tell us more! [14:03] i heard virtualsue is actually the person who decides what moves AlphaGo makes [14:03] HA [14:03] remember the few blunders AlphaGo made in the last(?) match? that was just the cat walking over the keyboard [14:04] I heard it was the Higgs boson interfering with the circuitry [14:06] *** rindolf left [14:07] simple carelessness, not putting the cat out and blaming particle physics [14:08] When it gets confusing is where you're also puttingthe cat out. [14:08] I don't know, I rely on the "cat effect" for most of what I do [14:09] I did a set for a radio show a couple of years ago and the cat decided to attack my feet while I was about halfway through the "live" recotding [14:09] i know - i've heard some of your stuff :-) [14:10] :) [14:11] timotimo: have you used your Cairo bindings with Gtk::Simple? [14:11] yes, i have [14:11] have you ever been to one of my (rare) live gigs? [14:12] *** rindolf joined [14:12] I know ilmari has [14:12] unfortunately not [14:12] that's what powered my first shooter game (last year's GPW) and the live coding environment thingie [14:12] right, can you point me to that example? I can't find it on your github [14:12] https://github.com/timo/gtk_cairo_shooter [14:12] I decided to do my note editor thingy in p6 after all [14:12] or at least try [14:13] ah, there it is. Thanks! [14:13] i coulnd't get it to render with opengl back then; there ought to be some way to do it now, but it would have to be added to GTK::Simple, too [14:13] so it's doing everything in software rendering [14:13] should be good enough for me if it's on cairo side [14:14] yeah [14:16] good luck in any case :) [14:16] let me know how it goes [14:21] *** vendethiel left [14:26] yeah, will be a while, now that I realized that cpan's MIDI may not do real-time midi stream handling [14:26] ugh [14:26] ah, no, it seems to do [14:26] who ever needed that anyway [14:27] at least there was a conference talk about it :P [14:27] *** telex left [14:27] and I know the guy who did it :) [14:28] ah, no. There's MIDI::Realtime, but it only does writing to midi. Not reading. How convenient :D [14:28] *** telex joined [14:28] I hope p6's Bufs are up to this [14:29] if we'll get a nice midi module out of this, i'm all for it :P [14:31] There's a p6 live coding environment? [14:32] *** zakharyas joined [14:32] Hotkeys: just for cairo-using code [14:32] Ah [14:34] tadzik, timotimo I have sketched out Audio::PortMidi bindings right here, I may get round to it at some point [14:34] oo [14:35] PortMidi is the midi portion of PortAudio? [14:35] yeah [14:35] mhm, mhm. [14:36] It'll be subject to the same real-time constraints as portaudio but you have more wiggle room [14:36] RabidGravy: is it up somewhere? [14:39] *** musiKk_ left [14:39] *** YvargDibar joined [14:39] boo [14:40] network troubles? [14:41] ghost in the wire [14:41] *** RabidGravy left [14:43] *** SauceRageuse joined [14:43] yep, BT engineers messing with the overhead over the road [14:44] *** YvargDibar left [14:44] *** SauceRageuse is now known as RabidGravy [14:44] boo [14:45] I may have been rudely interrupted by the BT guys doing what BT guys do [14:47] (i.e. breaking everything) [14:52] *** RabidGravy left [14:53] nobody appreciates infrastructure. if they don't break it, you wouldn't realise how much you need it [14:55] it's probably in the schedule: x% tactical breakage randomly spread around the customer base [14:58] *** wamba left [14:59] *** aborazmeh left [15:03] hm, is there a way to get back a Version to its p6 syntax? Like my $version = v1; say $version.Str; #output v1 and not 1 [15:04] oh .gist >< [15:04] or .perl [15:04] (.perl sounds more like what you want) [15:05] Yes [15:05] that what I just though [15:06] *** RabidGravy joined [15:07] *** sjoshi left [15:07] *** nadim left [15:07] gah, if they don't stop that I'm going to go across the road and take their tools off them [15:07] BT guys? [15:08] yeah [15:09] I think they've stopped now. There's a telephone pole across the road that feeds our line and a few of our neighbours and it's right in a bunch of trees [15:10] so the lines keep getting broken by the trees [15:10] we had a completely new one a couple of years ago [15:10] better than the hundred year old bit of copper that was there before [15:15] hmmm [15:15] does P6M Merging GLOBAL symbols failed: duplicate definition of symbol NativeCall ring a bell to anyone? [15:16] yes, but it went away a few weeks ago [15:17] it was a bug in that require was merging the symbols into the local stash so things couldn't see it as being loaded [15:17] or is this a recent rakudo? [15:17] it's v6.c [15:22] that's a wee bit old by now [15:23] the bug was only in there for a short window in late january [15:23] *** virtualsue left [15:26] *** cognominal left [15:27] *** cognominal joined [15:31] *** donaldh joined [15:41] *** fireartist left [15:41] http://blogs.perl.org/users/steve_mynott/2016/03/german-perl-workshop-2016.html [15:46] stmuk_++ :) [15:52] stmuk_: "use Foo::Bar:from" can be used from Per... it ate your here [15:53] ah, yes, html tags [15:53] grrr [15:53] stmuk_++ [15:54] fixed [15:54] moritz: i expect we don't have anything like quota set up for hack and www; do we perhaps want quota set up so that processes that have gone berserk won't fill up the disk with garbage? [15:54] timotimo: I'd like to avoid that, and rather react when things go badly [15:55] timotimo: I set up some per-user resource limits, but it seems they don't apply to processes started by cron :( [15:55] in that case, do we want to set up collectd with some notification mechanism? [15:56] i think it already supports notification, we'd just have to turn it on and configure it some way. most probably sending mail [15:56] do we? or do we want to use a monitoring system? [15:56] also, so far I've avoided installing a mail server on hack [15:56] that's probably sane [15:57] I'm not opposed to somebody doing that, but only if they have an eye on it [15:57] collectd has many different ways to push out notifications. we could exec (or send a network message to) an irc bot [15:58] exec, log to file, send via network, run perl code, output to syslog, send to a unix domain socket [15:59] timotimo: on the one hand, it would be neat to have something like that. On the other hand, I can't help feeling it's busywork that we don't end up needing/using very much [15:59] i imagine we'd end up seeing a "hack freezes over" situation coming a bit better when we have something that pings us [15:59] timotimo: on feather, the homes simply ran full occasionally; then somebody would delete compiler and cpanm caches, and all was fine again [16:00] hm [16:00] I thought you were talking about disks filling up [16:00] that doesn't seem to be related to hack freezing [16:01] we have some monitoring for some variables going out of control (number of processes, load average), but it usually comes too late [16:01] I don't know what early indicators are that we could use [16:01] collectd seems to have a flexible configuration system for "thresholds" [16:02] *** TimToady left [16:03] *** khw joined [16:03] moritz: you know better than i how to administrate dalek; i don't see #p6dev in botnix.conf; is that by accident? [16:03] *** nakiro left [16:04] *** TimToady joined [16:04] *** dalek left [16:04] *** dalek joined [16:04] *** ChanServ sets mode: +v dalek [16:04] timotimo: yes :-) [16:09] what's with the multiple-months of packet.*.freenode,* files in dalek-poller/ ? [16:10] the queue file in there seems to still be appended to, but the beginning of it seems *really* old and it's 26 megabytes big [16:10] could be because of splits? [16:13] *** CIAvash joined [16:15] *** domidumont left [16:16] *** novice33-13 joined [16:16] *** DrForr_ is now known as DrForr [16:16] my $line='Node=1,Item=W22,Max 10'; $line ~~ /MYREGEX/; say $, $, $; #What is MYREGEX? [16:18] *** virtualsue joined [16:18] prolly something like (?(?:\w+)=(\w+)) ? [16:20] That's a very P5 looking answer for a channel about P6 :) [16:21] MYREGEX is a regex that matches any string that contains the literal "MYREGEX" in it [16:21] *** itaipu joined [16:21] <[Coke]> timotimo: wouldn't that be /'MYREGEX'/ ? [16:21] same thing [16:21] <[Coke]> kk [16:21] well, i should have included / in the front and end [16:22] [Coke]: all the characters are alphanumeric so no quotes needed [16:25] I need such REGEX so after matching I can say $, $, $ [16:25] Why? [16:26] It's a grammar then? [16:26] *** virtualsue left [16:26] Currently, it would have to be a grammar AFAIK (which is why I wanted to know "why?" :) [16:27] novice33-13: you can assign in regex to do / $=\w+ / and then $/ [16:28] or even just $ [16:28] Oh, I suppose he could do a really explicit regex like that. [16:29] But, again, why the constraint that $, et alia must be available? Why not just get a list of pairs out of it (for instance)? [16:30] are they ever out of order? not all available? [16:30] can someone come round and do this documentation for me? I'm losing the will to live [16:30] and why a regex instead of other, simpler techniques? [16:31] because it's more something or other to have two problems [16:32] *** perl6newbee joined [16:32] m: "Node=1,Item=W22,Max 10".split(/<[\s,=]>/).hash.perl.say; # an example [16:32] rakudo-moar b243a9: OUTPUT«{:Item("W22"), :Max("10"), :Node("1")}␤» [16:33] nice [16:34] m: "Node=1,Item=W22,Max 10".split(["\s", "=", ","]).hash.perl.say # does split take multiple needles? [16:34] rakudo-moar b243a9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/C0uDrt6SFa␤Unrecognized backslash sequence: '\s'␤at /tmp/C0uDrt6SFa:1␤------> 3"Node=1,Item=W22,Max 10".split(["\7⏏5s", "=", ","]).hash.perl.say # does spli␤ expecting any of:␤ double …» [16:34] m: "Node=1,Item=W22,Max 10".split([" ", "=", ","]).hash.perl.say # does split take multiple needles? [16:34] rakudo-moar b243a9: OUTPUT«{:Item("W22"), :Max("10"), :Node("1")}␤» [16:35] it does! [16:35] ^- this piece of code is probably 100x faster than the one using the character class (though it only accepts the one space, rather than every kind of space) [16:35] timotimo: nice [16:35] groovetastic [16:38] awesome [16:38] nice! [16:43] *** virtualsue joined [16:44] timotimo: I challenge your "probably 100x faster" :-) [16:46] but ... [16:46] "significantly faster" should fly [16:47] * perlpilot lunch & [16:47] *** wamba joined [16:47] RabidGravy: in my little test, it wasn't faster at all. I want other people to try [16:47] * perlpilot lunch for real this time & [16:48] *** lostinfog joined [16:53] for 33 iterations: [16:53] - regex: 0.171848 per iteration [16:53] + regex: 0.188091 per iteration [16:54] *** cognominal left [16:55] *** cognominal joined [16:55] *** donaldh left [16:59] is 33 iterations enough? [16:59] hm, why you can type constraint our variable? [16:59] *can't [17:00] i guess the string isn't long enough to give you a noticable difference [17:00] *** zakharyas left [17:01] 33 isn't very many iterations but it's probably close enough, the times include perl6 start up time and bash iteration times so take them with a grain of salt [17:05] how have you been, tony-o_? it feels like i haven't talked to you in a while [17:13] *** FROGGS left [17:16] m:my $s="Node=1,MaxR 45";$s~~/[ + ["=" | \s+] $=<-[,]>+ ]+ % ","/; for flat($ Z $) -> $x,$y { say("our \\$x = $y")} [17:17] not too shabby, have been travelling a lot so i haven't had much time for perl6 :-( [17:17] something like that but with EVAL instead of say and inside regular expression [17:18] p6:my $s="Node=1,MaxR 45";$s~~/[ + ["=" | \s+] $=<-[,]>+ ]+ % ","/; for flat($ Z $) -> $x,$y { say("our \\$x = $y")} [17:20] *** virtualsue left [17:23] *** kerframil joined [17:27] is there any way I could pass a Perl 6 file handle to a native call class expecting a FILE type? [17:27] nativecall sub [17:27] *** dakkar left [17:28] .native-descriptor? [17:28] what ugexe said [17:28] what's that? [17:28] MadcapJake`: .native-descriptor on the Perl 6 handle, then that C thingy that turns an fd into a FILE* [17:29] *** ufobat left [17:29] ok, so native descriptor is a handle method, what's this C thingy? :P [17:29] fdopen() [17:29] hm, how hard it would be to catch SIGSEG and display a Backtrace? [17:29] ohh so use a C function to create it [17:30] *** vendethiel joined [17:30] Well, it's the native component of the Io::Handle on the os, it's a FILE* on unix I guess [17:31] no? native-descriptor will be a file descriptor, which is just an int on Unix [17:31] (FILE *) is libc's stdio abstraction for buffered I/O on top of file descriptors [17:31] awesome! will this work with stdout? [17:32] mm, that's actually fairly complex [17:32] or perhaps more precise, is there a nativecall variable for stdout? [17:33] $*IN.native-descriptor? [17:33] other stuff already has access to the existing stdout FILE*, you might be better off using nativecall to get at that rather than creating a new FILE* over fd 1 [17:33] haha, seems to work? [17:33] buffering will get weird otherwise [17:34] Skarsnik, $*OUT.native-descriptor gives me 11, will that work? [17:34] ...? [17:34] 11? [17:34] afraid to ask [17:34] lol [17:34] geekosaur, could you elaborate on "other stuff"? [17:34] stdout is fd1 normally. something is presumably doing something "special" [17:35] not easily, no. stdout is a global variable that pretty much any C function could decide to use [17:36] hmm, I'm not sure I follow, I have a nativecall function that accepts a FILE type and it also states in comment that it can except `stdout` as well, I would like to cover both cases in my nativecall wrapper [17:36] stdout is just a specific, globally defined, (FILE*) [17:37] stdout is probably a macro x) [17:37] sometimes it is, sometimes it isn't [17:37] according to gnu.org, it's a regular variable on unix and a macro on other systems xD [17:38] would be nice if I could pass $*OUT to it and nativecall would Do The Right Thing :P [17:38] in the old days it was macroed to an indexed lookup in an array of FILE structs. what it is now will depend on what exact stdio implementation is in use [17:38] timotimo: how's it been going for you? [17:38] but if $*OUT.native-descriptor != 1 then I doubt The Right Thing is at all easy [17:39] bummer [17:39] tony-o_: it's been going all right. promises of performance improvements are keeping me hopeful :P [17:40] and buffering will still potentially be a problem because a FILE* maintains a buffer and presumably the libuv thing perl 6 wraps also maintains a buffer of its own [17:40] m: say .native-descriptor for $*IN, $*OUT, $*ERR [17:40] rakudo-moar b243a9: OUTPUT«0␤1␤2␤» [17:41] Hmm. [17:41] geekosaur, any suggestion on what I should do then? [17:41] ok, why'd MadcapJake` get 11 then? mistake in checking it? [17:41] i get 11 on my local as well [17:41] hrrr [17:42] why would mine and ugexe be 11 and camelia be right? [17:42] aaaaand I just got 11 as well. wtf [17:42] difference in eval server? [17:42] and $*IN is 9 [17:42] locally, I get 9, 11, 12 [17:42] Isn't it a libuv artefact? [17:43] or something to do with the wrapper or something [17:43] I tracked it down before but forgot what the results where [17:44] *** pmurias left [17:44] * geekosaur has no clue [17:45] I get an issue with calling a NC sub that free a struct. If I use Pointer in the sub definition instead of the struct it work. Even adding is rw does not help [17:45] *** pmurias joined [17:45] maybe it's got to do with one of these SO answers: http://stackoverflow.com/questions/6163504/linux-proc-pid-fd-for-stdout-is-11 [17:45] and no idea how this will affect anything. also no idea how exactly this is being used or whether mixing I/O abstractions will be problematic or not [17:45] ohhhhhhhhhhhh [17:45] it has no impact on anything that might use them no, I did a test and a "syswrite" using that fd works fine [17:46] why would it be using dup() though [17:46] that is the libc's write [17:46] damn my perl6-gdb-m does not work >< [17:46] geekosaur: that's what I was wondering [17:48] well, you can try it. I have no idea what you're actually trying to do with it, so can't even guess how it will turn out [17:48] *** vendethiel left [17:49] *** vendethiel joined [17:50] geekosaur, I will and I'll let you know if it's successful [17:51] Can I EVALuate string "my \Number = 10.5" and get variable named Number? [17:52] no [17:53] eval-ing cannot create new lexical variables in an outer/calling scope [17:53] timotimo: what are you working on these days? [17:54] also, even if you could make Number, it wouldn't vary. ;) [17:54] tony-o_: recently i've been spending some time on SDL2::Raw [17:54] and of course making rakudo and moarvm better in general is always something i strive for [17:56] IS there a way to get the addr of a NC struct (a cstruct repr class)? [17:56] *** vendethiel left [17:57] yeah, get its WHERE (or WHICH?) [17:58] m: use NativeCall; my $arr = CArray[int].new(1, 2, 3); say $arr.WHERE; say $arr.WHICH [17:58] rakudo-moar b243a9: OUTPUT«139811157521112␤NativeCall::Types::CArray[int]|102910000␤» [17:58] m: use NativeCall; my $arr = CArray[int].new(1, 2, 3); say $arr.WHERE.fmt("%x") [17:58] rakudo-moar b243a9: OUTPUT«7f55dc113130␤» [17:58] seems legit [17:59] Oh I found my issue >< [17:59] *** abraxxa left [18:03] *** firstdayonthejob joined [18:03] timotimo: then we can stream audio to one another w perl6 [18:04] Hm, I can't find how to export cglobal [18:05] tony-o well ... https://github.com/jonathanstowe/Audio-PortAudio/blob/master/examples/stream-source [18:05] just toshing it up, it should hit the ecosystem this evening [18:05] *** kerframil left [18:06] our $kGumboDefaultOptions is export := cglobal(LIB, "kGumboDefaultOptions", GumboOptions); I get (Any) when displaying this variable [18:08] RabidGravy: i'd love to hear 'm: "Node=1,Item=W22,Max 10".split(["\\s", "=", ","]);' spoken rather than written [18:11] *** FROGGS joined [18:11] o/ [18:11] *** SCHAAP137 joined [18:11] what *exactly* does require() evaluate to? S11 says "the value which is installed as the alias", but what is that? something representing the compunit that was loaded? the last package declaration in that compunit? [18:11] o/ FROGGS [18:12] *** pmurias left [18:13] hoelzro: I understand it as: if you 'require Foo' and Foo.pm exposes a Foo symbol, then that [18:14] ahhhh [18:14] that makes sense; maybe I'll update design/docs [18:14] what if it doesn't expose a Foo symbol? [18:15] I'm seeing some odd behavior; namely, if you already have a symbol named REPL in scope, and you require REPL; you get your original REPL package from require, rather than the new one [18:15] perlpilot: good question [18:15] tony-o_, "my $m = Proc::Async.new(:w, 'festival', '--tts'); $m.start; $m.print(""Node=1,Item=W22,Max 10".split(["\\s", "=", ","]);'")" [18:15] there you go ;-) [18:15] perlpilot: well, it will evaluate to ::('Foo') anyway [18:16] perlpilot: if you intend to use it as a value/type, it probably exposes that symbol... [18:16] perlpilot: if you use it by accident, you get a Failure [18:18] *** patrickz joined [18:19] m: my $x = require Foo; [18:19] rakudo-moar b243a9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/meaT9Y2fsW␤Undeclared name:␤ Foo used at line 1␤Undeclared routine:␤ require used at line 1␤␤» [18:19] What's up with that second message? [18:20] *** cdg left [18:21] *** cdg joined [18:22] "Undeclared routine require" [18:22] m: my $x = do require Foo; [18:22] rakudo-moar b243a9: OUTPUT«Could not find Foo in:␤ /home/camelia/.perl6␤ /home/camelia/rakudo-m-inst-2/share/perl6/site␤ /home/camelia/rakudo-m-inst-2/share/perl6/vendor␤ /home/camelia/rakudo-m-inst-2/share/perl6␤ CompUnit::Repository::AbsolutePath<139892912…» [18:22] m: my $x = do require Test; [18:22] rakudo-moar b243a9: ( no output ) [18:22] m: my $x = do require Test; say Test [18:22] rakudo-moar b243a9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/VAWrPYnIir␤Undeclared name:␤ Test used at line 1␤␤» [18:22] m: my $x = (require Test); say Test [18:22] rakudo-moar b243a9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/BhKeID9HFG␤Undeclared name:␤ Test used at line 1␤␤» [18:22] :o( [18:23] it is like how you put a while and for loop in statement level [18:23] *** sufrostico joined [18:25] *** nadim joined [18:25] *** cdg left [18:25] Aye, but that message is LTA. It points in the wrong direction. [18:30] *** domidumont joined [18:33] *** vendethiel joined [18:34] my $x = while 1; [18:34] m: my $x = while 1; [18:34] rakudo-moar b243a9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/pdvd5RwKgr␤Undeclared routine:␤ while used at line 1␤␤» [18:35] perhaps we want to specialcase these keywords in this exception? [18:35] is there a way to make a named argument optional in a multi method signature? I don't want to have a separate multi for every single named argument [18:35] *** pmurias joined [18:35] MadcapJake`: these are optional by default [18:36] *** novice33-13 left [18:36] is it because it's a multi method inside a CPointer class then? [18:36] I dunno what your problem is [18:37] I have 4 multis and all of them can optionally have :$enc left off, but I'm getting an error that there is no signature that matches [18:38] m: my $pack='Test'; my \M = (require ::($pack)); dd M; # Load Test [18:38] rakudo-moar b243a9: OUTPUT«Test␤» [18:38] sortiz++ [18:38] MadcapJake`: can you gist it? [18:39] m: my $x = (require Test); say $x [18:39] rakudo-moar b243a9: OUTPUT«(Test)␤» [18:39] of course [18:39] MadcapJake`: ohh wait [18:39] *** xinming_ joined [18:39] MadcapJake`: these methods are not native methods, are they? [18:40] m: my \r = require('Test'); r.ok 1==1; [18:40] rakudo-moar b243a9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/BvdCmjiu2t␤Two terms in a row␤at /tmp/BvdCmjiu2t:1␤------> 3my \r = require('Test'); r.ok7⏏5 1==1;␤ expecting any of:␤ infix␤ infix stopper␤ statement end␤ s…» [18:41] m: my \r = (require Test); r.ok(1==1); [18:41] rakudo-moar b243a9: OUTPUT«Method 'ok' not found for invocant of class 'Test'␤ in block at /tmp/aRC9iI27hi line 1␤␤» [18:41] well internally they call native methods but they are members of a class that is repr('CPointer') [18:41] do the signatures contain typed pointers or carrays? [18:42] yep [18:43] *** xinming left [18:43] that'll be it, they don't work nicely on methods for some reason, loosen the type consrtraint [18:43] is Test broken currently ? [18:45] *** perl6newbee left [18:45] RabidGravy, sweet that did it! [18:46] https://gist.github.com/tony-o/6e9634b0c43d22c44833 [18:49] that output is from a nuked/freshly built moar from rakudobrew [18:51] I can't seem to get DESTROY to work with a nativecall CPointer class, does it not happen automatically? [18:51] s/happen/get called/ [18:51] destroy dinnae got called until the GC happens [18:51] *** musiKk_ joined [18:51] dinnae? [18:52] "doesn't" [18:52] so if I add a say to my DESTROY submethod, will I see it print? [18:52] it may never get called [18:53] doesn't that mean I've leaked some memory? [18:53] if you want to guarantee something happening when the thing goes out of scope you may want to consider a phaser [18:54] well if the program ends then no [18:56] MadcapJake`, I use a form of Disposable patern in DBDish's drivers with a submethod DESTROY { self.dispose } as last resource, and works very well. [18:58] MadcapJake`, In the Pg and SQLite cases, the statement handlers are native allocated CPointers that need to be deallocated on time. [19:02] *** spider-mario joined [19:04] * sortiz Oops! I haven't pushed that DBIish branch yet :-( [19:04] yay for dbiish being updated [19:05] might have to test/update https://github.com/tony-o/perl6-db-orm-quicky [19:07] tony-o_, I forgot the push 'cus I'm adding ODBC support. [19:07] * sortiz Good excuse! ;-) [19:09] sortiz++ # one off my list ;-) [19:09] *** kaare_ left [19:10] *** pmurias left [19:12] sortiz: still an update and ++ [19:12] *** pmurias joined [19:12] *** TEttinger joined [19:12] is Pg more than prepared statement supported yet? [19:14] tony-o_, What you need? [19:15] in Pg it failed if you tried to prepare more than one statement up front and just call them as needed [19:16] that was over a year ago, i haven't played with anything DBIish since then [19:16] sortiz, I'm not seeing any DESTROY in the DBIish repo [19:16] tony-o_, That is solved, yes. [19:16] tony-o_, I have this on some code and it work [19:17] MadcapJake`, You will see in a few minutes, sorry. [19:17] tony-o_, https://github.com/Skarsnik/fimstuff/blob/master/StoryFactory.pm6#L21 [19:17] Skarsnik: sortiz awesome guys, thank you [19:17] oh no problem! I appreciate the advice! [19:20] *** sufrostico left [19:21] *** sufrostico joined [19:21] *** virtualsue joined [19:22] *** labster joined [19:25] m: https://gist.github.com/anonymous/e0019267b1320a45cf5c [19:25] rakudo-moar b243a9: OUTPUT«「abcabccaabbc」␤ abc => 「abc」␤ bc => 「bc」␤ c => 「c」␤ abc => 「abcc」␤ bc => 「bcc」␤ c => 「c」␤ c => 「c」␤ abc => 「a」␤ abc => 「abbc」␤ bc => 「bbc」␤ c => 「c」␤» [19:25] so how to change what tokens generate ? [19:26] *** yqt joined [19:28] *** bartolin left [19:28] *** bartolin joined [19:30] *** shlomif joined [19:30] Woodi: you change the selectors .. [19:31] *** rindolf left [19:31] *** shlomif is now known as rindolf [19:31] *** pierrot left [19:32] tony-o_: you mena in grammar ? I ask about action: how to change result in actions ? [19:32] *** sufrostico left [19:32] Woodi: perhaps you want what's in $r.ast ? [19:33] are you asking about the type that comes from actions? or ??..what would the end result look like ? [19:33] just don't get thet .ast stuff [19:33] *** nadim left [19:33] *** buharin joined [19:33] pleas look on example, last line in action: I changed c into 3 but it is ignored anyway [19:34] *** lichtkind__ joined [19:34] .oO( how to do s/c/3/g with grammar ? ) :) [19:36] DBIish: 8d8f00f | (Salvador Ortiz)++ | lib/DBDish (3 files): [19:36] DBIish: $dbh and $sth objects implements 'dispose' [19:36] DBIish: [19:36] DBIish: The Connection and StatementHandle roles implements an informal [19:36] DBIish: Disposable interface. [19:36] *** dalek left [19:36] *** dalek joined [19:36] *** ChanServ sets mode: +v dalek [19:37] m: https://gist.github.com/perlpilot/742924b6e1f6ffc6d1d6 [19:37] rakudo-moar b243a9: OUTPUT«[[3] [3 3] [] [3]]␤「abcabccaabbc」␤ abc => 「abc」␤ bc => 「bc」␤ c => 「c」␤ abc => 「abcc」␤ bc => 「bcc」␤ c => 「c」␤ c => 「c」␤ abc => 「a」␤ abc => 「abbc」␤ bc => 「bbc」␤ c => 「c」␤» [19:37] Woodi: does that help? [19:37] Woodi: I'm still not clear on exactly what you want. [19:37] * sortiz too much for dalek? ;-) [19:37] *** lichtkind_ left [19:38] sortiz: I think there's a rate-limiting bug. Occasionally gets triggered when many commits are pushed at once [19:39] *** CIAvash left [19:40] arnsholt, That was the case, seven commits in a row, sorry. [19:40] poor dalek [19:41] dalek is supposed to recognize many commits and aggregate the announcement. I wonder what its threshold is for that [19:43] perlpilot: it does something very unexpected :) [19:44] RabidGravy, BTW, I'm developing DBDish::ODBC as a separated module and want to stay that way to test the common services in DBDish for driver developers. [19:44] good plan, I was thinking of doing an Informix driver like that TBH [19:46] *** pmurias left [19:47] *** virtualsue left [19:47] The idea is that a driver only 'need DBDish' in its modules. (and NativeCall, if needed, in its DBDish::Foo::Native) [19:49] *** sufrostico joined [19:50] *** virtualsue joined [19:51] *** espadrine left [19:52] The drivers developer documentation will need a good expansion, btw. [19:53] sortiz: Don't worry about it; not your fault =) [19:53] *** pmurias joined [19:54] It's basically sign of having done solid stuff =) [19:54] *** sufrostico left [19:58] m: say “989898988898989898980909090939838302233848473393040383234234509484.3489523478234723847238432423”.Rat.nude [19:58] rakudo-moar b243a9: OUTPUT«(9898989888989898989809090909398383022338484733930403832342345094843489523478234723847238432423 10000000000000000000000000000)␤» [19:59] *** yqt left [19:59] m: say (989898988898989898980909090939838302233848473393040383234234509484.3489523478234723847238432423).Rat.nude; [19:59] rakudo-moar b243a9: OUTPUT«(9898989888989898989809090909398383022338484733930403832342345094843489523478234723847238432423 9999999999999999583119736832)␤» [19:59] why are those two not the same? [20:00] MadcapJake`, Now pushed, you can see https://github.com/perl6/DBIish/blob/master/lib/DBDish/StatementHandle.pm6#L27, and if you add there 'note "Destroing";' you can see it working when running the tests. [20:00] hmmm.... so why is dalek still here and where is #p6dev ? [20:01] *** sufrostico joined [20:02] * colomon is afraid something is broken in Rat literals in rakudo. [20:02] gah my blog post is totally mess up with the font change << [20:02] #p6dev !?!? [20:03] maybe #p6dev should be in the channel subject for the next few days or something [20:03] in case interested parties missed it earlier! [20:04] *** buharin left [20:04] * sortiz I'm interested and missing that [20:04] I dont get that: [20:04] m: class A { submethod BUILD ($thing = 111) { say $thing } }; class B is A { method new($thing) { self.bless: $thing } }; B.new(42) [20:04] rakudo-moar b243a9: OUTPUT«111␤» [20:04] m: class A { submethod BUILD (:$thing = 111) { say $thing } }; class B is A { method new($thing) { self.bless: :$thing } }; B.new(42) [20:04] rakudo-moar b243a9: OUTPUT«42␤» [20:05] what dont both output 42? [20:05] sortiz, I've implemented mine as you have but it doesn't appear to be working, how can I force perl6 to run DESTROY? [20:05] FROGGS: I thought new only passed named parameters to BUILD? [20:05] MadcapJake`: force GC ? [20:05] yeah [20:06] MadcapJake`: what are you doing that you need to force DESTROY? [20:06] well I'm just testing, but I'm confused that when I place a say statement in there it isn't being printed to stdout [20:06] *** Praise joined [20:07] MadcapJake`: if you use GC then you relay on it. an it frees and sestroys when it decides too. [20:08] but it should necessarily be run no matter what, right? [20:08] hoelzro: I was thinking that I kinda call BUILD directly when calling bless, but I probably dont [20:08] MadcapJake`: not necessarily [20:08] MadcapJake`: I think not [20:08] why? [20:08] not unless --full-cleanup is used with moar [20:08] MadcapJake`: No, we don't promise to run DESTROY blocks at exit. [20:08] MadcapJake`: no, there's no guarantee that a DESTROY will ever run [20:08] 14 Mar 2016 22:35Z nine: OK, maybe if that's going to land soonish I'll hold on :) [20:09] ohh, why is that? [20:09] FROGGS: oh duh, I didn't read closely enough and missed your impl of new =/ [20:09] *** pierrot joined [20:10] MadcapJake`: and it is industry standard to have such cleenup with GC :) [20:10] *** cognominal left [20:10] (this question/answer for DESTROY should probably be added to http://doc.perl6.org/language/faq) [20:10] Woodi, I don't follow what you mean by that [20:10] That a really bad if we can't easily ensure some cleanup easily x) [20:10] *** cognominal joined [20:11] *** cognominal left [20:11] MadcapJake`, that why I use the pattern 'with $foo = Foo.new { LEAVE { $foo.dispose } ... }' when need a native object deallocated when not needed any more. [20:11] MadcapJake`: https://en.wikipedia.org/wiki/Finalizer and related [20:11] *** cognominal joined [20:11] Skarsnik, are you saying that you would prefer it to be guaranteed to run? [20:11] MadcapJake`: Because the GC's job isn't management of non-memory resources, and DESTROY is simply a callback when the GC can free an object's memory. [20:11] Yes x) [20:12] MadcapJake`: We don't conflate the two in Perl 6, like in many other languages. [20:12] Well it can have another name? [20:12] No [20:12] Too late. [20:12] (as in, many other languaes *also* don't conflate the two) [20:13] *** buharin joined [20:13] jnthn, ok so you're saying that DESTROY is just a "hook" so to speak? is it because I'm using nativecall and the resources aren't managed by P6 that DESTROY isn't run? [20:14] MadcapJake`: I'm saying that it's just not meant to be a hook for freeing unmanaged resources, because you can't rely on when it will be run. [20:14] MadcapJake`: And so far not making it reliably run at exit is doing a good job of catching people mis-using it for that :) [20:14] so to use it with unamanaged resources is impropr? [20:14] Yes [20:14] ahhh i see [20:15] We provide LEAVE (do stuff at scope exit) and END (do stuff at program exit) for predictable we-promise-to-run-it things [20:15] The thing is that GC is generational also [20:15] *** darutoko left [20:16] aye, as soon as something gets considered old, it'll take quite a bit longer for it to be considered for eviction [20:16] So sure, in a small example you might find your objects get cleared up after a very short time [20:16] implementing phasers for variables would be helpful in this regard [20:16] But if the conditions are Just Right you could end up with things living for seconds or even minutes. [20:16] jnthn, if I'm writing a module that uses nativecall, how can I add to LEAVE/END when a user uses my module? [20:16] What are the way to handle clean up stuff without doing it manually? Because it feel like you need to have array or something to keep track of stuff to close/unlock/send quit msg and do it at END? [20:18] Well, that we really need is something like C#'s using, and a standard role that you implement. I think somebody was exploring this in module space recently... [20:18] But for now it's like with file handles, taps on supplies, and so on; the expectation is the code using them will .close them [20:18] you can do a trick with an add_phaser on the calling block I guess [20:18] Yep, the the idea of my (now informal) Disposable role. [20:19] sortiz: Ah, it was you :) [20:19] Skarsnik: help, i can't install gptrixie [20:19] Because it's handy to have something that say "I am done with this object" so you can do clean up [20:19] "Could not find GPT::FileGenerator in: [...]" [20:19] timotimo, damn why? [20:19] Oh [20:19] On time, with macros I can add 'using Foo.Allocate() { ..... }' and add the needed LEAVE { } inside. [20:20] *** kanishka left [20:20] sortiz: Ideally we'll add something to Perl 6 for this because people keep on asking :) [20:20] should be fixed [20:21] I forget to add the file to META [20:21] is there a way to add to LEAVE/END programmatically? [20:21] Skarsnik: also, i don't see how to get gccxml on my fedora 23 [20:22] oh, "castxml" [20:22] i can install that, but your readme says that's bad [20:22] timotimo, don't [20:22] check if you have gccxml.real [20:22] there's also no gccxml.real [20:22] there is for 22, weird [20:22] *** zakharyas joined [20:22] MadcapJake`: Well, ENDs are global so it doesn't matter really what does the END [20:23] well, my system is on 5.3.1 [20:23] gcc, that is [20:23] MadcapJake`: For LEAVE, no, not yet. [20:23] your readme says i'd need 4.9 [20:23] *** cdg joined [20:23] jnthn, so if i add an END to my module, and someone uses it, will the END get run? [20:23] MadcapJake`, Yes, but now is complicated, you need mangling the QAST, with macros should be easy. [20:23] MadcapJake`: ye [20:23] *yes [20:24] MadcapJake`: what id process gets kill -9 signal ? [20:24] MadCapJake`: https://github.com/skids/perl6-Control-Bail/blob/master/lib/Control/Bail.pm6#L107 if you care to go down to QAST. [20:24] Woodi, no idea [20:24] Skarsnik: maybe you can generate the binding for https://github.com/grimfang4/sdl-gpu/ for me; probably just include/SDL_gpu.h [20:25] jnthn, great! The C library I'm wrapping is a one go kind of thing and offers a clean function if you intend to parse something else, so I think using an END phaser makes sense [20:25] timotimo, maybe try with cast? It seem the last git version handle c99-c11 [20:25] Skarsnik, cool! [20:25] according to fedoraproject.org, gccxml is now obsolete as of f23 so it probably won't get packaged anymore [20:26] Installing : castxml-0.1-0.10.20160125gitfc71eb9.fc23.x86_64 1/1 [20:26] Yes, the cast/gccxml business is annoying [20:26] damnit, I have a case here where submethod BUILD is called twice... strange [20:26] I did not manage to compile the git version of cast [20:26] can i tell gptrixie to use "castxml"? [20:27] I mean I never managed to compile a project based on clang/llvm libs xD [20:27] GPT_GCCXML=castxml [20:27] ah, i see [20:27] I just added that today [20:27] lovely [20:27] error: unknown argument: '-fxml=plop.xml' [20:27] *sigh* [20:28] that's not how you castxml :) [20:28] *** domidumont left [20:28] need to patch gptrixie x) [20:28] *** domidumont joined [20:29] Skarsnik++ # GPT_GCCXML [20:29] could someone add some API to grammars, pleas ? [20:29] Woodi, what do you mean? [20:30] MadcapJake`: something... [20:30] o_O [20:30] Woodi: what are you talking about? [20:30] momento [20:31] * lizmat clickbaits https://p6weekly.wordpress.com/2016/03/14/2016-11-js-fueling-up/ [20:32] could someone add some API to grammars, pleas ?https://gist.github.com/anonymous/e0befbf2f05fd84e1c5b [20:32] *** chienjo joined [20:32] *** virtualsue left [20:33] Woodi: could you please try to explain the problem you experience? [20:33] *** domidumont left [20:35] *** kaare_ joined [20:35] *** virtualsue joined [20:36] FROGGS: I just want to work with parts catched by tokens but whatever i put into action methods is a) ignored or b) overrided somehow [20:36] *** AlexDaniel joined [20:36] I think make $ overrides $... [20:36] *** MadcapMobile joined [20:37] timotimo, it use sdl or sdl2? [20:37] *** chienjo left [20:37] it can do both, i'd like the one for sdl2, but i don't know how to ensure that's the one it uses [20:39] *** kaare__ joined [20:39] why it install me libudev with libsdl2 x) [20:40] is there a special incantation to make internal links in to an "anchor" in POD or is just L ? [20:40] Skarsnik: that's just suggested dependencies, i expect [20:40] *** kaare_ left [20:40] and just hope that whatever generator DTRT [20:40] Woodi: do you expect that the letters a and b show up in the output? [20:41] FROGGS, why you choose 'my str $s' when there are other '$s' in scope? Can that be related to your Heisenbug? [20:41] FROGGS: yes [20:41] sortiz: I did not choose that, that was already there [20:42] Woodi: but you dont capture these matches in e.g. BuuAbc1 [20:42] -I /usr/include/SDL2/ to make it use sdl2 x) [20:43] FROGGS, Oops, sorry, I'm reading the code and found that, seems 'unusual' at least :-) [20:43] a guess that makes sense [20:43] Woodi: it "makes" what c had matches, then in bc it makes what c had produces via make (a list of c's), and then in abc it makes what bc had produced (a list of lists of c's) [20:44] I should have a cache or something -Functions: 1328 [20:44] and it take a minute to parse the xml file x) [20:44] sortiz: aye, but should not be a problem [20:44] FROGGS: hmm, eg. is [ 'a' ] so $ should have it, IMO [20:44] *** pmurias left [20:44] Woodi: $/ in method abc will also have the a, yes [20:46] *** kaare__ left [20:46] *** pmurias joined [20:47] m: https://gist.github.com/FROGGS/8c9556cf97fb301f8f84 [20:47] rakudo-moar ba5270: OUTPUT«TOP => [a => [b => [c]] a => [b => [c c]] a => [b b => [c c]] a => [] a => [b => []] a => [b => [c]]]␤» [20:47] Woodi: are you looking for that? [20:47] *** kaare__ joined [20:50] *** kaare__ left [20:51] FROGGS: actually I want to have default say $r[.ast]? "view" with 'c' changed into '3'. just want to know how to operate on parts. [20:51] *** sufrostico left [20:52] timotimo, did you get my dcc? [20:52] Woodi: sorry, I dont understand [20:52] i just tried to accept it [20:52] then it immediately said failed [20:53] 225 bytes really isn't very much [20:53] what went wrong? [20:53] timotimo, http://www.nyo.fr/~skarsnik/sdlgpu.txt [20:54] *** wamba left [20:54] that's significantly more than 225 bytes [20:54] *** cognominal left [20:54] hm the uint32_t are standard? [20:55] yeah, why wouldn't they be? [20:55] *** cognominal joined [20:55] have you considered taking comments in doxygen style and turning them into pod attached thingies? [20:56] I will need to use doxygen for that [20:56] *** virtualsue left [20:56] They get catched because I go backward to find like a empty line or a ; to find the function definition (I only have the end line) [20:58] oh [20:59] m: https://gist.github.com/anonymous/3a768052cdfd807e6d00 [20:59] rakudo-moar 93d597: OUTPUT«「abcabccabbccaababc」␤ abc => 「abc」␤ bc => 「bc」␤ c => 「c」␤ abc => 「abcc」␤ bc => 「bcc」␤ c => 「c」␤ c => 「c」␤ abc => 「abbcc」␤ bc => 「bbcc」␤ c => 「c」␤ c => 「c」␤ abc => 「a」…» [20:59] *** kaare__ joined [21:00] Skarsnik: what are these things in the "Extras stuff" section? [21:00] does that even compile? [21:00] my priority is also writing a libxml2 binding or something to not have to wait a minute at each run [21:00] FROGGS: this is just what parse do without actions. how change 'c' into '3' in that output ? [21:00] It's supposed to be typedef [21:01] like if you have a typedef int myintbecause; it generate a constant myintbecause = int32; [21:02] in this case i'll just have to throw that section out? [21:02] *** sufrostico joined [21:02] It does not work very well when taking a file that include a lot of other stuff [21:03] *** n1cky joined [21:05] *** skids left [21:06] *** kaare__ left [21:07] Woodi: "make 3" in the c method [21:07] ecosystem: c2e3774 | RabidGravy++ | META.list: [21:07] ecosystem: Add Audio::PortAudio [21:07] ecosystem: [21:07] ecosystem: See https://github.com/jonathanstowe/Audio-PortAudio [21:07] ecosystem: Kudos to psch++ for starting it :) [21:07] ecosystem: review: https://github.com/perl6/ecosystem/commit/c2e377494d [21:07] *** kaare__ joined [21:07] There [21:07] timotimo, you can probably delete them. I will have a look tomorrow of what I can do to improve the case of single file that need lot of other stuff [21:08] FROGGS: it don't change anytching for me... [21:08] *** zakharyas left [21:08] FROGGS: but Match is ro ? [21:10] m: https://gist.github.com/FROGGS/8c9556cf97fb301f8f84 [21:10] rakudo-moar 93d597: OUTPUT«TOP => [a => [b => [3]] a => [b => [3 3]] a => [b b => [3 3]] a => [] a => [b => []] a => [b => [3]]]␤» [21:10] *** itaipu left [21:11] Woodi: why dont you edit the gist I showed you? [21:12] I can ? :) [21:12] well, you can at least improve on that code, so we are talking about the same :o) [21:13] timotimo, if you want to have fun http://www.nyo.fr/~skarsnik/sdluniverse.txt (everything the header imply) [21:14] FROGGS: ah, you made a and b into ()... [21:14] i wonder how long perl6 takes to parse that :D [21:15] *** kaare__ left [21:16] *** kaare__ joined [21:16] ------> enum ._27⏏ is export ( [21:16] starts out super well :) [21:17] must be an anonymous enum x) [21:17] yeah, multiple of those [21:17] Woodi: yes, and I put these captures into what the action methods make [21:17] *** musiKk_ left [21:19] hm, I should auto exclude ctypes.h probably [21:20] pthread or other stuff are autoexcluded [21:21] Skarsnik: it doesn't do any ordering of things? [21:22] or automatic stubbing [21:22] it ordered on how it appear on the headers [21:22] *** zakharyas joined [21:24] but the file order is whatever gccxml does with the id. I think it 'should' avoid putting something that need something that came after [21:29] could you do a topological sort of the classes and output stubs where needed? [21:29] otherwise i'd have to go through and do it manually now :) [21:29] also, uint32_t wants to become uint32 actually [21:29] when i said "of course it's defined", i misunderstood you [21:30] *** bjz left [21:32] *** bjz joined [21:32] I am not sure if it can happen. do you have an example in this? [21:32] *** buharin left [21:35] Oh right sdl_surface need a sdl_rect [21:36] *** yqt joined [21:36] *** bjz left [21:37] i've had to stub two things so far [21:37] GPU_Renderer and GPU_Target [21:37] (i'm not using the universe version) [21:38] *** kid51 joined [21:39] SDL_BlitMap seems to be an empty struct [21:39] *** ely-se joined [21:40] SDL_RWops is really a tiny bit b0rked :) [21:40] we need some better "name mangling" to make all of this work [21:40] i have a thing that compiled successfully! [21:41] i have no clue if it'll work, but it does exist now :) [21:41] *** kanishka joined [21:44] I use gccxml generated name for anonymous stuff x) [21:44] rakudo-star-daily: a421619 | coke++ | log/ (8 files): [21:44] rakudo-star-daily: today (automated commit) [21:44] rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/a4216195df [21:44] well the mangled name [21:44] anonymous enum are annoying :' [21:45] yeah, well, if they have dots in their name ... :) [21:45] anonymous struct have a name attribute empty, so I know they are anonymous [21:45] anonymous enum have a name x) [21:47] *** kaare__ left [21:51] *** zakharyas left [21:51] *** virtualsue joined [21:54] *** bjz joined [21:55] *** virtualsue left [21:55] fish: “perl6 -Ilib example.p6” terminated by signal SIGSEGV (Address boundary error) [21:55] so close now :) [21:58] just trying to print the $screen (an GPU_Target) got me into a segfault when trying to output one of its attributes [21:58] not printing it gives me a main loop that draws the black screen over and over :) [21:58] Skarsnik: GPT is well done! :) [21:58] can we has something to get #define in place? [21:58] there's a GPU_DEFAULT_INIT_FLAGS defined to be 0 [21:58] that could show up in the binding, too, imo [21:59] *** bjz left [22:01] i'll just go ahead and push the current state up to github and see where it leads me [22:01] https://gist.github.com/Skarsnik/155f3c8062054075d4b0 [22:01] *** pmurias left [22:01] *** zakharyas joined [22:02] you shouldn't be using | there [22:02] you need +| [22:03] This part is 'dumb' it's not a c preprocessor. I manually found #define starting_pattern* xxxx [22:04] oh, haha [22:04] well, you could have committed the code, too :) [22:04] I just run it with --define-enum=MYGPU:GPU_ [22:05] what does it mean for a C parameter to be "out"? [22:05] be out? [22:05] isn't that a C++ thing [22:05] the C doc says «@param[out] status of this operation» [22:06] it's only in the docs [22:07] what is the actual parameter signature? I'd guess that it's something that is only used as an "rw" parameter, typically a pointer that will be set by the function [22:07] @param[out] look like a doxygen stuff [22:07] yeah [22:08] https://github.com/lexborisov/myhtml/blob/master/include/myhtml/api.h#L886-L895 [22:08] it's the name of the parameter x) [22:09] It's probably to tell you the function will have this parameter becaming an output [22:10] I should translate to : myhtml_status_t $status is rw; [22:10] ah so it's *where* the status will get stored? [22:11] Yes [22:14] oh, yeah it's a pointer so the function can alter the value [22:16] *** rindolf left [22:17] with this type of lib you probably want to call myhtml_parse and visit the given tree based on how the structure are defined [22:19] Skarsnik: next up we need a binding for OpenGL with gptrixie :) [22:21] I need a libxml2 binding to speed us the parsing x) [22:22] I tried libminixml but this lib is buggy [22:22] I did not even managed to have a working thing in C xD [22:29] MadcapJake`: Presumably, an out parameter is a pointer that's written to by the library to pass out the result of the operation [22:29] *** lostinfog left [22:30] *** zakharyas left [22:34] *** Relsak joined [22:38] *** sufrostico left [22:39] *** sufrostico joined [22:39] Skarsnik: how would i handle things like "i know this pointer to uint16 is meant to be translated as "uint16 $foo is rw" rather than a Pointer[uint16]" [22:40] i know gpt takes a config file, but i'm not sure if it allows overrides like that [22:40] https://github.com/Skarsnik/gptrixie/issues/3 :) [22:43] i hope the title means more to you than it does to anybody [22:43] because sometimes you want Pointer[*] instead [22:46] It's only for fundamental type [22:46] yeah, but still [22:46] this library sometimes has "float *matrix" [22:46] for example [22:47] hm [22:47] It's not even a typedef? [22:47] *** FROGGS left [22:47] correct [22:48] https://github.com/timo/SDL2_GPU/blob/master/lib/SDL2/GPU/SDLGPU.pm6#L1940 [22:48] typedef are **** [22:48] just one example [22:48] duh 404 [22:48] ah, i renamed that [22:48] https://github.com/timo/SDL2_GPU/blob/master/lib/SDL2/GPU/Raw.pm6#L1940 [22:49] i find it strange that the paths i see here start in /root [22:49] Ok, so it's not always a good idea [22:49] correct [22:50] I work in root in this vm, don't ask why [22:50] OK [22:51] it seems like there are exactly two functions where the Pointer is needed to be turned into an "is rw" instead [22:52] GetVirtualCoords and GetVirtualResolution [22:57] I need to figure how to be able to say that in the conf file like function->GetVirtualCoords->param:isrw; [22:59] *** justine joined [23:09] *** ely-se left [23:09] *** labster left [23:12] *** hc_ joined [23:12] *** hc_ is now known as Guest95637 [23:13] *** Guest95637 left [23:13] *** salv0 left [23:15] *** spider-mario left [23:17] *** vendethiel left [23:21] Skarsnik, you have the wrong path to the FileGenerator.pm6 in the provides of the META.info for GPT [23:21] >< [23:21] I closed the vm [23:22] do it in the browser just needs /GPT adding to the line ;-) [23:23] *** Relsak left [23:27] *** kid51 left [23:28] 'night, #perl6 [23:29] toodles masak [23:29] Skarsnik, I fixed it locally and installed, no need to worry until next time you're in there [23:31] *** jack_rabbit joined [23:32] Oh it's nice the online edit stuff ^^ [23:34] *** justine left [23:36] *** chee is now known as CHEE [23:36] *** CHEE is now known as chee [23:37] yeah, not too shabby, I'm not sure I'd want to write a whole program with it but it can get you out of problems [23:39] Yeah to fix a typo it's nice [23:42] *** jameslenz left [23:44] *** RabidGravy left [23:46] m: sub infix:(@list, $exception) { @list.grep: * !~~ $exception }; say ^10 except 5; say except 'bar'; say ^24 except /^1/; [23:46] rakudo-moar 8cbb1e: OUTPUT«(0 1 2 3 4 6 7 8 9)␤(foo baz quux)␤(0 2 3 4 5 6 7 8 9 20 21 22 23)␤» [23:48] *** jack_rabbit left [23:48] *** Actualeyes left [23:56] *** [particle] left [23:57] *** SCHAAP137 left [23:57] *** coreyperry joined