»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋
Set by Zoffix on 25 July 2018.
00:06 patrickb left 00:10 mowcat joined 00:32 cfa left 00:38 aborazmeh joined, aborazmeh left, aborazmeh joined 00:43 w_richard_w joined, w_richard_w left
timotimo bryan cantrill just wat-ed at Inline::Go 00:55
on twitter 01:00
El_Che url me? 01:08
rjbs my %substitutions = (
'flag-au' => flag('au'),
'flag-us' => flag('us').
'sparkles' => "\N{SPARKLES}",
haha, oops
github.com/azawawi/perl6-inline-go
omg, I can't use computers anymore, friends
twitter.com/bcantrill/status/10907...2702123008
El_Che rjbs: you're a suit, now :) 01:09
rjbs meanwhile, I'm 100% fighting with base Moose in another window
01:13 markoong left
timotimo twitter.com/bcantrill/status/10907...2702123008 01:14
El_Che The dtrace thingie was fun until Oracle closed the kernel 01:18
01:19 guifa joined 01:21 cpan-p6_ left
guifa Okay, major brainfart moment. Why isn't nesting working here? tio.run/##K0gtyjH7/z@9KDE3N7FIwV2h...NZU13z/38A 01:21
01:21 cpan-p6 joined 01:28 guifa left, aborazmeh left 01:30 aborazmeh joined, aborazmeh left, aborazmeh joined, guifa joined 01:40 zachk left
leont guifa: because that misc will also match an opening parenthesis? 01:42
guifa leont: right, but by both rules of alternation, shouldn't it be checking that [ ~ ] matches first? 01:43
err by the rules of double bar
leont True, I guess it doesn't match that 01:44
01:45 MasterDuke left
leont I haven't used the regex debugger in ages, but it does exist 01:45
Changing the dot to \w does seem to fix it though 01:46
guifa Right, if I restrict <misc> in any way, matching works, which tells me the <group> is well formed. But for some reason the alternation priority is off 01:48
01:49 sena_kun left
leont Ah, it's because the dot will match the closing parenthesis! 01:50
token doesn't backtrack
Replacing it with <-[)]> fixes everything :-) 01:52
guifa Indeed. But then you have to hard code out the parentheses. Okay, I think I got it fixed now. I was an idiot last night and was playing around with a grammar that I could only get to work by changing a token to regex 01:53
But somehow did something and it stopped working
You actually have to put both <op> and <group> as regex, but TOP and <misc> can stay as token for it to work. 01:54
01:54 MasterDuke joined
guifa I guess the JSON standard is just restrictive enough to allow things to work without backtracking 01:54
01:55 MasterDuke left, MasterDuke joined
leont Yeah 01:55
JSON is very restricted, I don't think any character has a double meaning.
The thing doesn't even allow for raw newlines in strings 01:56
guifa The only reason I'm not hard coding is I want it to be possible to augment/extend the grammar in a modular way, but... there's no easy way to add in characters into a negative character class, so I had to use . 01:57
leont You can make that a rule too, but I see your point 01:58
tokens fail much faster than regexes though, in some cases that is relevant as well. 01:59
guifa Indeed. The parse time is going astronomically for longer strings, even without added complexity 02:04
02:05 AlexDani` joined
guifa Althoguh i'm not sure why. I can't reproduce it on that simple TIO page, but it's definitely happening in my (not much more) advanced code. Parsing ~60 chars was 11s, but ~61 was 30 (!) 02:08
02:09 lizmat left
guifa ~ 62 is 69 whoa 02:10
02:10 AlexDaniel left
leont The grammar engine needs some speed optimization :-( 02:35
guifa I dunno, maybe it's just my machine? I can't reproduce on the TIO 02:36
MasterDuke guifa: what version are you using? 02:38
02:39 Kaypie left, Kaypie joined
guifa weird, I'm still on 2018.01 ? 02:39
tf
And actually just got it to reproduce on TIO when I put copied my grammar in explicitly. 02:41
02:42 leont left 02:43 mowcat left
guifa tio.run/##rZFBT4MwFMfP8CleskNVLMk0...Jy397ZrvsB 02:49
There we go, so weird that only adding a single element can destroy the regex execution time so badly
MasterDuke backtracking can go exponential. changing those `regex` to `token` makes it go much faster 02:52
02:54 zacts joined 02:56 zacts left
guifa Masterduke: true, but then the parse fails to go as expected 02:56
MasterDuke ah, i didn't notice 02:57
guifa The nested operator seems to really need the regex if the <comment> is just .
02:58 zacts joined
guifa Although since it's using double-bar I would think it should just match the brackets and move on, but I'm also not a regex guru so maybe there's a situation where after a successful nesting match it should keep trying 02:59
b2gills guifa: Make `term` non-greedy with ? `token group { '(' ~ ')' <term>*? }` tio.run/##K0gtyjH7/z@9KDE3N7FIwV2h...msqa75/z8A 03:11
guifa b2gills++++++ 03:12
ugh I figured it would be something so simple
guifa is humbled 03:13
b2gills I wrote a BF parser that did things like combine ++++++ into a single add(6) op
guifa Yeah. I have that has an optimizer after the parsing, but because it uses .assuming it actually is slower (!) 03:14
hahainternet I don't think performance is something easily predicted in complex programs yet in 6, although that may be slander from me 03:15
guifa The copy operations should actually be worth it. And apparently I was told that assuming hasn't been remotely optimized yet
hahainternet i'd only worry about signs of complexity, like the exponential growth above
reducing copies and the complexity of your grammars/algorithms are general wins
guifa I think that's where some of the big wins (and pitfalls) are going to be with P6 are in the grammars 03:21
OT1H, you can toss together some mostly functional grammars really really fast. OTOH, it's easy to have something off by a character or two in said grammar and spend hours tracking it down :-) 03:22
b2gills My first pass at a BF to Perl6 translator: gist.github.com/b2gills/f5969e2f44...6786a6be0c 03:25
03:28 Khisanth left, daemon left, WqZtM52a joined
b2gills I wrote that back in July 2016. 03:29
03:31 oodani left 03:32 oodani joined
b2gills I started on a more robust version that same month which had a much simpler grammar, and did the combining as an optimization stage. 03:33
03:34 WqZtM52a is now known as daemon 03:38 zacts left
guifa b2gills: that's kind of what I'm doing 03:39
Trying to keep the grammar as simple as possible and everything very modular
03:41 Khisanth joined
guifa b2gills: my current way-to-many-options signature: pasteboard.co/HYW4MfY.png 03:48
b2gills I think you overdid on the modular thing 03:52
I would just bake []+-,.<> into the grammar, and let someone inherit from that grammar to change them. 03:53
03:55 isomorphismes joined
guifa That's fair. I'm going to change it to just :%opcodes adverb, the idea being that someone who inherits can then use that hash in their grammar and then someone else can use the new commands but attach different characters to them easily 03:56
But it's easy to do default values and type checks with :$left, but :%opcodes you really can only type check and not ensure default values, unless you want to force all 8 codes to be present. Not a huge deal though 03:57
(within the signature, I mean) 03:58
b2gills How many languages have all of the same operations as BF, but use different characters for them? What if a language doesn't have one of the ops and wants to set it to an empty str? 04:01
guifa There's a few for the first one (I mean, mostly all joke languages). In the case of a language without one of the ops, they'd need to override the token for the command to effectively delete it 04:05
I haven't seen one that removes one of the commands, I've only seen switching characters and adding ops so far though 04:06
04:08 jme` joined 04:31 dataange` joined 04:32 dataangel left 04:33 guifa left 04:40 aborazmeh left 04:42 zacts joined, aborazmeh joined, aborazmeh left, aborazmeh joined 04:44 _isomorphismes joined 04:47 zacts left 04:53 aborazmeh left 05:07 zacts joined 05:13 zacts left 05:15 molaf joined 05:19 w17t joined 05:25 molaf left 05:32 volkov joined 05:37 Actualeyes joined 05:42 dataange` left 05:59 AlexDani` is now known as AlexDaniel 06:02 w17t left 06:04 w17t joined 06:06 w17t left 06:07 w17t joined 06:25 jmerelo joined 06:27 kurahaupo joined 06:32 Sgeo left, Sgeo joined 06:38 _isomorphismes left 06:41 ferreira2 left
jmerelo releasable6: status 06:58
releasable6 jmerelo, Next release will happen when it's ready. 6 blockers. 162 out of 272 commits logged
jmerelo, Details: gist.github.com/acca4defa63333ab25...3adacc1cb7
07:02 domidumont joined 07:16 ravenousmoose_ joined
AlexDaniel releasable6: status 07:17
releasable6 AlexDaniel, Next release will happen when it's ready. 4 blockers. 162 out of 272 commits logged
AlexDaniel, Details: gist.github.com/fe92a6275a2c6264d5...3a752d1187
AlexDaniel jmerelo: hey look it's not too bad :)
in fact I'm hoping to get the release out around this weekend 07:19
07:21 ufobat_ joined
jmerelo AlexDaniel: great! 07:22
AlexDaniel: you see I'm delayed the squashathon, after a request by lizmat 07:23
AlexDaniel eahy
yeah*
lookatme_q Is the 2019.01 release available ? 07:24
AlexDaniel lookatme_q: no, not yet, still some blockers to go
lookatme_q okay, thanks :) 07:25
07:25 ufobat left 07:35 pmurias joined
Geth doc: 45d8c16b52 | (JJ Merelo)++ | doc/Type/Sub.pod6
Add operator declarations to Sub.

Actually, they were pretty well covered elsewhere, so it's basically a set of pointers. Closes #1573
07:38
synopsebot Link: doc.perl6.org/type/Sub
07:43 isomorphismes left, KDr2 joined 07:44 KDr2 left, KDr2 joined 07:49 ChoHag left 08:00 lizmat joined 08:06 reach_satori left 08:08 domidumont left 08:10 domidumont joined 08:22 volkov left 08:25 rindolf joined 08:27 zakharyas joined, patrickb joined 08:34 ravenousmoose_ left 08:36 ravenousmoose_ joined 08:43 dakkar joined 08:55 sno left 09:02 reach_satori joined 09:08 scimon joined 09:09 w17t left 09:10 ravenousmoose_ left, ravenousmoose_ joined 09:12 w17t joined 09:13 w17t left 09:17 w17t joined 09:20 ravenousmoose_ left 09:28 lookatme_q left 09:37 Tommy99 joined 09:41 Tommy99 left 09:43 kensanata joined 10:05 ravenousmoose_ joined 10:06 cpan-p6_ joined
cpan-p6_ New module released to CPAN! IO-Path-Mode (0.0.7) by 03JSTOWE 10:06
10:06 cpan-p6 left 10:38 reach_satori left 10:50 sno joined, reach_satori joined 10:55 sno left 10:56 zakharyas left 10:58 scimon left, scimon joined 11:02 leont joined 11:23 woolfy joined 11:25 ravenousmoose_ left 11:26 ravenousmoose_ joined
woolfy Last month's winner of the Squashaton got his Camelia from lizmat and me and seems to be happy with her: www.facebook.com/groups/perl6/perm...822787464/ 11:26
yoleaux 12 Nov 2018 12:24Z <holyghost> woolfy: we need to talk about music, new wave and metal
woolfy Remember: if you win the Squashaton, and you want the Camelia that you won, let lizmat or me know your address and we will send a package to you. 11:27
lizmat also: if you did in the past, and we forgot to send you one
11:29 reach_satori left
pmurias woolfy++ & lizmat++ # awesome prize for the Squashaton 11:31
11:37 dct joined 11:41 reach_satori joined 12:00 Actualeyes left 12:07 sena_kun joined
AlexDaniel oh wow, lizmat++ woolfy++ 12:14
weekly: squashathon next weekend! Previous winner: www.facebook.com/groups/perl6/perm...822787464/ 12:16
notable6 AlexDaniel, Noted!
tyil next weekend is fosdem ;~; 12:37
jmerelo Next to next... 12:43
Or Fosdem is this weekend, squashathon next weekend
woolfy Tomorrow evening, FOSDEM starts with the "Beer Event". Basically, people can choose from 4000+ different beers in Delirium Cafe. fosdem.org/2019/beerevent/ 12:51
Saturday, our booth starts (booth #16 on level 2 in K-building): fosdem.org/2019/stands/
jmerelo woolfy: have fun :-) 12:52
ravenousmoose_ Oh no, I can't make it to fosdem on saturday :(
woolfy In the evening, people can join us for dinner in La Porteuse d'Eau ( wendyga.wordpress.com/2019/01/29/m...ay-dinner/ ) but I like you to tell me (contact me personally) if you want one of the 50 seats I have reserved.
12:53 domm joined
woolfy raveousmouse : The booth starts on Saturday morning and ends on the end of Sunday afternoon. Plenty of time to visit FODEM! :-) 12:53
... oh oh... sausage fingers misspelling name... 12:54
ravenousmoose_ ^
ravenousmoose_ Hahah, great! I'll make sure to stop by on sunday then
woolfy Yay! Come get some free stickers and buttons and tuits! 12:55
12:55 zakharyas joined
woolfy People who want to join for dinner: really, tell me! Soon-ish. Tomorrow afternoon I will be busy loading our van, driving to Brussels, unloading, setting up our booth, and maybe the beer event, to check IRC, mail, or Facebook. 12:59
13:02 markoong joined 13:04 pmurias left 13:05 ravenousmoose_ left, ravenousmoose joined 13:06 pmurias joined 13:09 pmurias left 13:16 jmerelo left 13:18 TeamBlast left 13:24 pmurias joined 13:28 pmurias left 13:31 cpan-p6_ left 13:32 cpan-p6 joined 13:33 tomato_ joined 13:43 zacts joined
tomato_ Hi, please have a look on this question about INIT: when a module which contains an INIT phaser is used in different files, how many times the INIT pharser will run ? 13:43
13:44 w17t left
tomato_ I thought it would run at most once, but I found I was wrong 13:44
13:44 pmurias joined
tomato_ The page at docs.perl6.org/syntax/%20INIT says: "since the phasers are only installed the first time they're noticed" 13:47
13:49 pmurias left 13:54 ravenousmoose left, ravenousmoose joined 13:56 pmurias joined
lizmat tomato_: could you gist the problem and tell what you're expecting? 13:56
13:59 sno joined
ufobat_ assume you have A.pm6 with class A { INIT { say "hi" }}; you have B.pm6 and C.pm6 with use A; class B {}; (or C) 14:01
14:01 pmurias left
ufobat_ and when you do perl6 -Ilib -e 'use B; use C;' for me the init phaser gets executed 3 times 14:02
but only the first time. 14:03
phasters get executed during precompilation, maybe?
tomato_ I used the INIT for global initialization. It could not run more than once, or my program would crash. 14:06
But it did crash. :( 14:07
14:07 ravenousmoose left 14:08 leont left
tyil tomato_: docs.perl6.org/syntax/%20once 14:10
would this be of interest?
ufobat_ github.com/ufobat/phasers/blob/master/lib/A.pm6
i added a state $a = 0; $a++ to it, but it always says that $a is 1 14:11
soo ints executed a couple of times, but my assumption is that the 2 times are from precompilation and the last one from execution of the programm
14:12 pmurias joined
ufobat_ the first 2 rounds should be virtually not there for your programm execution 14:12
you're probably doing something in filesystem or so?
lizmat, there is your gist.. well repo :p
tomato_ ??? 14:15
evalable6 Stub code executed
in block <unit> at /tmp/b8cm2QNNvY line 1
14:16 ravenousmoose joined 14:17 pmurias left
ufobat_ tomato_, add "no procompilation" on top of the class where the INIT phaser is 14:19
and try it again, pls?
tomato_ ok
ufobat_ precompilation 14:21
typo, sorry
tomato_ Yeah, now it works well, but starts slow... 14:22
ufobat_ yeah :( 14:23
if you remove the line it only fails for the first time
it might be a bug, i dont know :(
you might want to open an issue
tomato_ tyil: 'once' gives the same result. 14:27
tyil :( 14:37
14:42 scimon left, scimon joined 14:45 tomato_ left 15:02 vrurg left 15:03 vrurg joined
lizmat ufobat_: R#2664 15:05
synopsebot R#2664 [open]: github.com/rakudo/rakudo/issues/2664 Precompilation should *not* run the INIT phaser / mainline when -use-d?
15:07 vrurg left 15:08 vrurg joined, sena_kun left 15:11 ravenousmoose left
ufobat_ lizmat++ 15:12
15:15 kensanata left 15:29 jme` left, ravenousmoose joined 15:30 zacts left 15:45 Actualeyes joined 15:47 reach_satori left 15:51 melezhik joined
melezhik Hi! how to check that object/container is Nil? 15:51
15:55 Ven`` joined, scimon left
melezhik probably .defined 15:56
m: my @a=(1,Nil,1); say @a[1].defined
camelia False
15:56 scimon joined
AlexDaniel melezhik: see also `with` 16:01
m: my @a=(1,Nil,1); with @a[1] { .say }
camelia ( no output )
AlexDaniel m: my @a=(1,Nil,1); with @a[0] { .say } 16:02
camelia 1
melezhik AlexDaniel: thanks 16:04
16:09 ravenousmoose_ joined
ufobat_ or grep? 16:09
m: say (1, Nil, 1).grep: *.so 16:10
camelia (1 1)
16:12 ravenousmoose left 16:15 patrickb left 16:17 zacts joined 16:19 ravenousmoose_ left, ferreira1 joined 16:20 pmurias joined 16:22 ferreira2 joined 16:23 ferreira1 left, MilkmanDan left 16:24 MilkmanDan joined 16:27 cpan-p6 left, cpan-p6 joined
ufobat_ can someone explain to me why this works? 16:35
16:35 dct left
ufobat_ m: perl6 -e 'sub a(:$test = 1) { say $test }; sub b(:$test) { a(|:$test) }; b()' 16:35
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3perl6 -e7⏏5 'sub a(:$test = 1) { say $test }; sub b
expecting any of:
infix
infix stopper
postfix
statement…
16:35 dct_ joined, jmerelo joined
ufobat_ m: sub a(:$test = 1) { say $test }; sub b(:$test) { a(|:$test) }; b() 16:35
camelia (Any)
ufobat_ ah well no forget it, it doesnt work 16:36
my question is how could i make the default test on sub a to work
jmerelo ufobat_: default test, as in the proto of a multi? 16:37
ufobat_ m: sub a(:$test = 1) { say $test }; sub b(:$test) { my %param; %param<test> = $test if $test.defined; a(|%param) }; b()
camelia 1
ufobat_ i want that the :$test that might be passed sub b only passed something to the call of sub a() if test is defined 16:38
my last example worked, but is clumsy :(
jmerelo ufobat_: if it works... 16:39
ufobat_ yeah :(
16:41 domidumont left 16:42 zacts left
ufobat_ jmerelo, query :) 16:43
jmerelo ufobat_: on my way 16:54
16:56 reach_satori joined
Geth doc: 1a5cb9f82f | (JJ Merelo)++ | doc/Language/operators.pod6
Format corrections and reflow
17:01
synopsebot Link: doc.perl6.org/language/operators
17:06 kensanata joined 17:09 jeek left 17:12 RubioTerra joined 17:13 reach_satori left 17:19 kensanata left 17:20 sena_kun joined 17:21 scimon left 17:32 dakkar left 17:37 skids joined 17:52 KDr2 left 17:55 zachk joined 17:56 zachk left, zachk joined 17:59 reach_satori joined 18:03 domidumont joined 18:15 zacts joined 18:19 reach_satori left 18:30 TeamBlast joined 18:35 melezhik left 18:47 ravenousmoose joined 18:49 pecastro joined 18:50 reach_satori joined 18:54 RubioTerra left 18:55 reach_satori left 19:07 reach_satori joined 19:10 _isomorphismes joined, zacts left
b2gills m: sub a(:$test = 1) { say $test }; sub b(:$test) { a(|(:$test with $test)) }; b() 19:16
camelia 1
jmerelo b2gills: cool
b2gills m: sub a(:$test = 1) { say $test }; sub b(:$test) { a(|(:$test with $test)) }; b(:test(4))
camelia 4
holyghost I've programmed more on my Xcode DAW and made a start of a hero's quest computer game, I donated the code to the pm. 19:22
19:22 holyghost left 19:27 zakharyas left 19:37 cpan-p6 left, cpan-p6 joined 19:38 Ven`` left 19:45 st_elmo joined 20:00 jmerelo left 20:09 _isomorphismes left 20:13 kurahaupo left 20:14 kurahaupo joined 20:21 zacts joined 20:24 domidumont left
ufobat_ b2gills, awesome! thank you! 20:39
b2gills, my other golf was my $test; sub b(:$test = 1) { say $test}; b( |(:$test).grep(*.value.so).Hash)' 20:40
20:41 [Sno] joined, _isomorphismes joined 20:42 sno left
b2gills m: sub a(:$test = 1) { say $test }; sub b( *%_ ) { a( |%_ ) }; b(); b( :test(4) ) 20:46
camelia 1
4
20:48 st_elmo left 20:51 ravenousmoose is now known as ravenousmoose[aw 20:53 ufobat_ left 20:55 Actualeyes left 21:00 drolax joined
pmurias do we have a way to warn when named arguments to methods end up mistyped? 21:00
El_Che will it match the signature? 21:04
pmurias methods get signatures that ignore unrecognized named arguments 21:06
El_Che ah, like strict new method modules,I see 21:07
21:08 ravenousmoose[aw left
timotimo i could imagine overriding find_method of ClassHOW to return a modified method for everything that checks if named arguments that got passed are not recognized by any candidate, but are similarly spelled 21:10
so you can basically have a "named arg sanitizer" run of your program
Geth doc/master: 6 commits pushed by Coke++ 21:41
21:47 robertle left
MasterDuke pmurias: isn't there a module that does that? 21:47
timotimo MasterDuke: i only know one for method new 21:48
MasterDuke ah, could be. i haven't actually used anything like that, it just sounded familiar 21:52
pmurias timotimo: I could imagine highlighting unrecognized named arguments would be a cool feature in an editor 21:54
timotimo pmurias: do you have an idea if SDL2 could be made available to rakudo.js? 21:56
SDL2 has an emscripten port that can build for wasm or asm.js 21:58
pmurias timotimo: checking... 22:04
22:04 rindolf left
timotimo You don’t actually need to compile SDL2 yourself if you don’t want to. By defining USE_SDL=2 on the emscripten commandline it will automatically download SDL2 and compile it instead of using the javascript implementation of SDL 1.2 22:04
kripken.github.io/emscripten-site/...pten-ports 45
^- pretty neat
pmurias timotimo: by SDL2 you mean the raw C library or a Perl 6 binding? 22:05
22:06 zacts left, isomorphismes joined
timotimo if SDL2::Raw could work as-is, that'd be amazing, otherwise it could just as well be a tailor-made SDL2::Raw::JS or whatever 22:08
pmurias timotimo: did people get wasm SDL2 to work in the browser (with a demo that can draw something rather than say load a .png for processing)? 22:10
timotimo i mean there's a port of UT99's intro scene where it flies through a bunch of geometry 22:11
that's more than loading a .png, right?
pmurias timotimo: that should be enough to demonstrate that SDL2 can draw something in the browser ;) 22:12
timotimo well, it uses WebGL rather than the regular canvas API
22:12 skids left, rindolf joined
pmurias main.lv/writeup/web_assembly_sdl_example.md - simple example I found 22:13
timotimo but the SDL2 renderer API also goes via OpenGL - which is only one of multiple backends it can choose from at run-time i guess
22:13 dct_ left
timotimo github.com/timhutton/sdl-canvas-wasm 22:14
this may also be interesting
pmurias timotimo: does OpenGL work in the browser? 22:15
22:15 drolax left
timotimo github.com/timhutton/opengl-canvas-wasm 22:15
does that answer it?
pmurias google answered it ;), it seems that it is emulated by webgl 22:17
timotimo yeah 22:18
TreyHarris Hm, I asked this on #perl but I just realized I might be thinking of a Perl 6 module. I'd like to expose some information to the shell in a way that can be sourced by the shell in the rc file (a la eval'ing ssh-agent), but I'd like it to be shell-independent for the common POSIX shells, so "export VAR=val;alias new=old", etc. for bash but "setenv VAR val; alias new old" on tcsh, etc. In Perl 5, local::lib
offers some functionality like that, but I thought I saw a CPAN module that was specifically for this purpose
pmurias timotimo: when I'm fresh in the morning I'll think how the part exposing the C functions to Perl 6 should work 22:19
timotimo cool! it isn't pressing or anything, just a thought i had 22:20
pmurias timotimo: calling things that are accessible to js should be a matter of fleshing the js interop layer
getting to C has a level of indirection 22:21
22:34 cpan-p6 left, cpan-p6 joined
pmurias timotimo: I feel like the point of the sdl ports is to call them for C so we would either have to write our own C to js binding or generate it from native call definitions somehow 22:43
timotimo i don't know, maybe someone has already built an SDL2 implementation in pure javascript 22:44
El_Che in pure javascript? 22:45
(∩`-´)⊃━☆゚.*・。゚
timotimo well, javascript with browser stuff 22:46
i guess you call that vanilla rather than pure
22:54 ravenousmoose joined 22:55 ravenousmoose left 23:06 silug joined 23:12 pmurias left
TreyHarris I can't fetch or clone moritz/perl6-all-modules -- getting a "fatal: pack has bad object at offset 4049732: inflate returned -3" "fatal: index-pack failed" ... is this just me? 23:12
timotimo you don't happen to have a full hard drive? 23:13
TreyHarris No, 230G free 23:16
timotimo not sure what that could be about 23:19
TreyHarris Huh; it's a problem with hub-clone; if I do straight "git github.com/moritz/perl6-all-modules.git" it works. very weird
timotimo oh? yeah that is weird
TreyHarris Looks to be that HTTPS works, but git:// does not 23:20
timotimo i tend to clone stuff from github via ssh
TreyHarris yep, me too 23:22
git:// is SSH. That's what isn't working
just moritz/perl6-all-modules though; other repos are fine 23:23
timotimo oh? i thought for that you need git+ssh:// or is that git+https:// that does that?
TreyHarris You're right. I have no idea why hub is creating "git:..." remotes 23:28
23:31 aborazmeh joined, aborazmeh left, aborazmeh joined 23:36 kudzo left 23:41 kudzo joined 23:42 hythm joined
hythm hello, I want to create Array::Matrix role, which should convert an array to 2d array. 23:44
p6: role Array::Matrix { has @.array; has $.col-count; method gist { say @!array.rotor($!col-count) } }; Array::Matrix.new(array => <a b c d>, col-count => 2).gist; 23:45
camelia ((a b) (c d))
23:45 dct_ joined
hythm I want to transfor this code instead of creating an object, I want to be able to do: my @a does Array::Matrix(:$col-count) 23:47
I know drom the docs : my @a does SomeRole; workds, but how to pass an attribute to the role if possible 23:49
sena_kun you can make it parametrized 23:50
like...
m: role A[:$a] { method get-a { $a } }; my $a does A[a => 5]; $a.get-a.say;
camelia 5
sena_kun ^
the code is quite golfed, but the main idea is that you can take a named parameter for a role. 23:51
and use it later.
the bad thing is that you likely cannot just `my @a does Array::Matrix[col => 3] = 1, 2, 3`. 23:52
hythm thanks sena_kun, I saw that in the docs but I thought I can parametrize with Types only. thats defiantly will help
sena_kun as you need `1, 2, 3` to be filled for `$.value` attribute of your role.
23:55 leont joined, pecastro left