00:13 MasterDuke joined
wayland As in "alternatives to MoarVM"? 00:45
I'm not attached to the JVM, but I'd like to see Raku run in the browser :). 00:46
01:02 rmv left 01:42 MasterDuke left 01:44 hulk joined, kylese left 01:53 MasterDuke joined
[Coke] Unfortunately I think the JS backend is in a worse state than the JVM 02:01
02:12 rmv joined, rmv left, rmv joined 02:15 hulk left, kylese joined 02:16 rmv left 02:36 MasterDuke left
disbot <simon_sibl> Raku in the browser could be great indeed 02:46
02:50 rmv joined
ugexe like im ok if some other backend shows up that passes the spec test. but given how far off the other existing backends are, let alone their viability for running ecosystem code, the tech debt isn't worth it 02:50
02:52 silug left, silug joined 02:54 rmv left
wayland I'm OK if they don't work now, as long as we're not ruling them out for the future. 03:27
03:58 dgl joined 03:59 dgl left 04:00 rmv joined, rmv left, rmv joined 04:06 rmv left 05:15 hurufu joined 06:46 merp left 06:47 hwj joined 06:48 merp joined 06:55 rmv joined, rmv left, rmv joined 06:56 Sgeo left 07:00 rmv left 07:57 dakkar joined
disbot <melezhik.> o/ 08:16
09:04 Pixi` joined 09:06 rmv joined, rmv left, rmv joined 09:07 wayland76 joined, wayland left 09:08 Pixi left 09:10 rmv left
Voldenet browser raku is an interesting project which would be very limited due to platform constraints 09:24
because of the limitations I think it's actually more ambitious than pure binary 09:27
it would have to somehow emulate threads and locks with condition variables for instance 09:29
wayland76 Would we be better rewriting it to use WASM? 09:31
dakkar for threads, you have web workers 09:33
Voldenet webworkers are closer to separate processes
dakkar true
Voldenet and yes, you could emulate threads with that
disbot <simon_sibl> I was actually wondering once raku++ is fully compliant, how easy it would be to target wasm 09:34
Voldenet I can't even imagine hosting a Cro webserver inside a browser, it sounds impossible 09:35
dakkar I'm pretty sure a browser can't open a listening socket 09:36
Voldenet I think it can't connect to pure tcp too
dakkar although developer.mozilla.org/en-US/docs/W...ce_Workers seems to imply a Service Worker can serve resources to a "client" in the same browser context? 09:37
ridiculous idea: don't duplicate your rendering in raku and js, ship half your Cro application to the browser instead! 09:38
Voldenet service workers are entirely different use case – once service worker is installed, it can ignore server being down and host resources anyway
it's for offline mode mostly
dakkar so it can pretend to be the server!
(if it weren't clear, I'm not serious) 09:39
Voldenet :>
though it's the closest you can get for Cro, I guess 09:40
wayland76 One thing I'd be interested in shipping in WASM is the data-oriented programming stuff I'm working on. My experience with frontend is that it involves a lot of a) transforming data into other data, and b) wiring events to things. Both of these (but especially the first) are things that Data-Oriented Programming is trying to solve. 10:15
Just discovered: "Web browsers prevent WebAssembly code from directly manipulating the Document Object Model. Wasm code must defer to JavaScript for this" (Wikipedia). If that's the case, that does away with half my use case. 10:17
timo yeah you always have to have some kind of wrapper that moves data back and forth between wasm world and DOM world 10:18
Voldenet it's one postMessage away, you could actually have Channel impl for this kind of thing 10:44
timo true, you just need to ideally have a protocol someone else came up with that defines what goes through that channel so you don't reinvent the wheel there 10:52
SmokeMachine I just read about raku++! That's amazing! I have a question: when running it on the browser, how do we do something like `EVAL :lang<JavaScript>, "..."` as we did with rakudo.js? (github.com/FCO/MemoizedDOM/blob/c8....p6#L3-L4) 10:55
timo if you can get it into the browser by compiling it to wasm, then you would have to communicate back and forth between the browser's javascript engine and rakupp inside the wasm sandbox using the "postMessage" thing Voldenet just mentioned 10:58
SmokeMachine That is used on this raku code running in the browser: fco.github.io/MemoizedDOM/todo6.html
timo or alternatively, just compile v8 to wasm as well inside the same blob, then also run the javascript inside the wasm sandbox. but then the javascript also has to go through postMessage to reach the DOM 10:59
SmokeMachine (but that takes too long to compile... I'm thinking on how couls I port that to raku++) 11:01
timo if you're okay with an implementation that's not 100% current roast passing, just use perlito6 or rakudo-js 11:02
lizmat I think we dropped the js backend a while ago ? 11:04
SmokeMachine I think I'm ok with that... that implementation is using rakudo-js from 8 years ago...
11:07 dakkar left, dakkar joined
timo you just check out commits from long ago. if you're lucky you can get the npm packages from back then as well and you won't need to change anything to get it to compile 11:11
SmokeMachine Sorry, I don't get it... it is compiling, it is compiling on the browser, but it takes too long. I was thinking on using raku++js to compile it faster (I don't want to pre-compile it because I like to look at the source code of the page and see raku on the browser) 11:21
Voldenet raku++ is really work in progress 11:28
it reimplements the compiler, so it has very arcane bugs 11:30
let's wait until most of the roast works 11:31
m: say [+] 6..9 Z- 1..4 # on rakupp it's 10 11:33
camelia 20
12:26 sergot left
[Coke] lizmat - i think the guts of the backend are still there, part of NQP - I just don't think we're building it anywhere. 13:11
[Coke] finds a checkout of nqp on his IRC box so old it's using master. 13:14
yah, I still see js in there. 13:15
github.com/perlconference/tprc-202...-To-Slides 13:18
From the US TPRC that just happened. I see Util's slides are linked.
13:47 Guest4 joined
[Coke] ... Trying to be stricter about typing. There's no way other than a junction to say Seq|Positional ? 13:52
ah, was looking at wrong typegraph. Iterable, aye? 13:53
14:07 dg left 14:37 hwj left 14:52 Guest4 left 15:02 rmv joined, rmv left, rmv joined 15:06 rmv left
Voldenet nope, Iterable is not Positional and Positional is not Iterable, junction it is 15:13
m: my $x where * ~~ Positional|Iterable = {}; # works
camelia ( no output )
Voldenet m: my $x where * ~~ Positional = {}; # doesn't work
camelia Type check failed in assignment to $x; expected <anon> but got Hash ({})
in block <unit> at <tmp> line 1
Voldenet m: my $x where * ~~ Iterable = Blob.new; # doesn't work
camelia Type check failed in assignment to $x; expected <anon> but got Blob (Blob.new())
in block <unit> at <tmp> line 1
Voldenet m: my $x where * ~~ Positional = Blob.new; # works
camelia ( no output )
Voldenet m: my $x where Positional|Iterable = {}; # even better 15:15
camelia ( no output )
SmokeMachine but most of implementations of Positional does Iterable, no? 15:17
m: say Array ~~ Iterable; say List ~~ Iterable 15:18
camelia True
True
Voldenet yes but Type system doesn't give you that guarantee 15:20
m: class MyList does Positional { }; my Positional $x = X.new; # boo
camelia You cannot create an instance of this type (X)
in block <unit> at <tmp> line 1
Voldenet m: sub Y(Iterable) { }; sub X(Positional $x) { Y($x) }; # meaning this 15:21
camelia ===SORRY!=== Error while compiling <tmp>
Calling Y(Positional) will never work with declared signature (Iterable)
at <tmp>:1
------> Y(Iterable) { }; sub X(Positional $x) { <HERE>Y($x) }; # meaning this
Voldenet but that makes me wonder why Positional is not Iterable 15:24
SmokeMachine Voldenet: yes, sure... I was just meaning that if you wanted only Array and List, that could be a solution...
Voldenet I mean, Blob is perfectly iterable 15:25
So iterable in fact, that NFC and Blob are iterated perfectly in for 15:34
yet they are not Iterable
[Coke] Iterable actually works here. 15:35
15:45 hwj joined 15:59 hwj left 16:12 johnjay left
disbot <melezhik.> news.ycombinator.com/item?id=48917772 16:20
16:25 kelt0m left 16:27 kelt0m joined 16:32 dakkar left 17:24 rmv joined 17:29 rmv left 18:41 hwj joined 19:28 Pixi` left 19:29 Pixi joined 19:41 rmv joined, rmv left, rmv joined 20:04 hwj left 21:18 rmv left 21:36 rmv joined, rmv left, rmv joined 21:50 hurufu left 22:08 leppard joined 22:16 dg joined 22:40 Sgeo joined