»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend! Set by moritz on 25 December 2014. |
|||
psch | raydiak: it's ticketed, RT #111512. i didn't dig into specs, but the ticket exists might mean it should work but is bugged... :) | 00:09 | |
synopsebot | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=111512 | ||
psch | s/exists/existing/ | ||
raydiak | cool thanks psch | 00:10 | |
psch | i'm off to sleep o/ | 00:12 | |
00:24
KCL_ joined
00:33
colomon joined
00:40
yeahnoob joined
01:05
jack_rabbit joined
|
|||
raydiak | grr modern browsers...close 2 tabs, free up a gig of ram :P | 01:13 | |
01:24
avuserow joined
|
|||
raydiak | apparently sandboxing everything is necessary these days so malicious coders can't harm your computer via websites, but running you out of cpu and ram until the whole system slows to an unusable crawl due to 1 ill-tempered script or plugin is still totally acceptable | 01:24 | |
geekosaur | mm, browsers *try* to detect that these days | 01:25 | |
chrome seems pretty good at it of late | |||
on os x at least | |||
raydiak | seems like it only offers to kill stuff for me if the process doesn't repond for like...half a minute plus...which by that point everything else is often going just as slow | 01:29 | |
*respond | 01:30 | ||
01:31
anaeem1 left
01:35
Jablonski is now known as pjablons
01:58
petercom1and left,
petercom1and joined,
petercom1and is now known as petercommand
|
|||
pjablons | this is silly and trivial, but is there a good way to set the default value for a list at declaration? ie initialize to a list of eight 7's? x seems to just make it one value. | 02:00 | |
raydiak | pjablons: x is for making strings, xx for lists :) | 02:01 | |
m: say 7 xx 8 | |||
camelia | rakudo-moar 80b912: OUTPUT«7 7 7 7 7 7 7 7» | ||
pjablons | i don't even want to know what xxx does, then :P | ||
thanks | |||
raydiak | heh you're welcome .oO( xxx NYI...well volunteered! :P ) | 02:02 | |
raydiak tracks down his precomp heisenbug, does a momentary happy dance | 02:09 | ||
02:23
rmgk_ joined,
rmgk_ is now known as rmgk
02:39
Ben_Goldberg left,
Ben_Goldberg joined
02:40
Ben_Goldberg left,
Ben_Goldberg joined
02:47
pmurias left
03:00
sirdancealot joined
03:02
yeahnoob left
|
|||
Ven | wow. c++ got "fold expressions". when are they even gonna stop :P ? | 03:31 | |
it's like our meta-reduce op | 03:32 | ||
03:41
noganex_ joined
03:52
raiph joined
04:24
nwc10 left
04:26
nwc10 joined
04:30
raiph left
04:39
kaare__ joined
04:59
adu joined
05:04
kaleem joined
05:14
Ben_Goldberg left
05:16
adu left
05:34
kaleem left
05:42
kaare__ left
06:04
adu joined
06:05
kaleem joined
06:08
yeahnoob joined
06:12
kaare__ joined
|
|||
Woodi | morning #perl6 :) | 06:34 | |
raydiak | good morning Woodi | 06:44 | |
adu | good morning | 06:45 | |
raydiak | \o adu | ||
adu | o/ | ||
raydiak | adu: hopefully you don't need to worry about it often, but I added the "rakudobrew test" command I mentioned would have been helpful, just fyi | 06:46 | |
adu | raydiak: :) | 06:47 | |
raydiak | so instead of tracking down the dir and make spectest you can just 'rakudobrew test' | ||
adu | thanks, I'm sorry I suck at finding Makefiles | ||
Woodi | about current "modern" browsers: I moved back to firefox from chrome and looking for something better again... so many freezes. ~130Mb on start. just switching between 4 very plain pages makes it goes 10Mb more. IMO it's madness... | ||
adu | Woodi: me too, actually | 06:48 | |
Woodi | and: new R* yay ! \o/ | ||
raydiak | yeah browsers kinda irritate me, but then again a lot of modern software does | 06:50 | |
I have a computer that plays netflix but windows 7 solitare brings it to its knees | 06:51 | ||
adu | raydiak: I think the ideal browser would be something that JIT compiled a page to OpenVG would be kind of amazing | 06:52 | |
raydiak | hmm maybe I'll switch to links... | 06:53 | |
adu | I read a comparison of TUI browsers | 06:54 | |
kmandla.wordpress.com/2011/01/13/a...-browsers/ | |||
it's confusing because there are like 5 browsers that sound like "links" | 06:55 | ||
some of them are forks | |||
Woodi | I remember there was some TUI browser with javascript, links ? | 06:59 | |
raydiak | yeah I remember as a kid for a while my only access to the internet was the local library bbs that you could use lynx on | ||
Woodi | yea, even gopher was better then ftp :) | 07:00 | |
07:02
rurban joined
|
|||
Woodi | mozilla could do that 64bit binary for Windows now, it's 2015 ! ;) or they are waiting for some commercial compilation-only product, Librefox or something ? | 07:12 | |
07:15
jluis joined
07:16
LLamaRider joined
07:29
kaleem left
07:43
darutoko joined
07:45
yeahnoob left
07:46
yeahnoob joined
|
|||
LLamaRider | r: fork(); | 07:47 | |
camelia | rakudo-{parrot,moar} 80b912: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfileUndeclared routine: fork used at line 1» | ||
LLamaRider | Hi everyone, I'm looking for a fork :) | 07:48 | |
tadzik | wy would you want to fork :) | 07:52 | |
but you can get it from NativeCall | |||
github.com/jnthn/zavolaj/blob/mast...ix-fork.p6 | |||
07:53
rindolf joined
|
|||
LLamaRider | tadzik: I can't write a fork bomb if I can't write a fork :D | 07:53 | |
I'm also surprised you would hide it down in NativeCall, rather than have it as a low-level primitive in the p6 | 07:54 | ||
but this is handy, thanks :) | 07:55 | ||
Timbus | i think its being avoided because windows cannot do it | 08:01 | |
08:02
zakharyas joined
|
|||
LLamaRider | That's a fair point. perl5 just "faked" that somehow | 08:06 | |
raydiak | emulated fork w/threads iirc | 08:07 | |
08:08
rurban left
|
|||
LLamaRider | what I know is that perl5 has one of the briefest cross-platform fork bombs | 08:13 | |
"fork while 1" | |||
so I was just wondering how that would look in p6 :) | |||
raydiak | certainly some of our other concurrency constructs must be able to make entertaining explosions...???... | 08:15 | |
08:18
virtualsue joined
|
|||
raydiak | probably not as short, but something with Thread.start should be more portable I'd think | 08:21 | |
LLamaRider | I'm tinkering with something, but can't figure out how to wait for all start{} blocks to finish at the end of my program? | 08:26 | |
08:27
leonid joined
|
|||
LLamaRider | ah, I need to collect all promises and then .finish on each :/ | 08:27 | |
Timbus | await | ||
await @promises | |||
LLamaRider | r: sub bomb { start { bomb; bomb; } }; await { bomb; } # fuse is wet, no boom | 08:29 | |
camelia | rakudo-parrot 80b912: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfileUndeclared routines: await used at line 1 start used at line 1. Did you mean 'spurt', 'sqrt', 'sort'?» | ||
( no output ) | |||
LLamaRider | I am doing this wrong somehow | ||
Timbus | m: await { say 'test' } | 08:31 | |
camelia | ( no output ) | ||
raydiak | you have to pass await a promise, not a block | ||
Timbus | dunno why you think await takes a block | 08:32 | |
also, im pretty sure moarvm uses a threadpool, so its going to be more of a small pop, rather than an explosion | 08:33 | ||
LLamaRider | ah. because start{} takes a block. Wrong intuition | ||
removing the {} doesn't change anything though | 08:34 | ||
r: sub bomb { start { bomb; bomb; } }; await bomb; # fuse is wet, no boom | |||
camelia | rakudo-parrot 80b912: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfileUndeclared routines: await used at line 1 start used at line 1. Did you mean 'spurt', 'sqrt', 'sort'?» | ||
( no output ) | |||
raydiak | yeah you can sleep 1 while $*SCHEDULER.loads, but $*SCHEDULER.max_threads defaults to only 16 | ||
but if you do Thread.start, I *think* you circumvent the scheduler entirely | 08:35 | ||
08:37
Maddingue left
|
|||
raydiak | m: sub bomb () {Thread.start: &bomb while 1}; bomb | 08:38 | |
camelia | rakudo-moar 80b912: OUTPUT«Memory allocation failed; could not allocate 8824 bytesMemory allocation failed; could not allocate 8824 bytes» | ||
Timbus | m: Thread.start:{} while 1 | 08:40 | |
camelia | rakudo-moar 80b912: OUTPUT«Type check failed in binding &code; expected 'Callable' but got 'Hash' in method start at src/gen/m-CORE.setting:20402 in block <unit> at /tmp/hDmzLQe28r:1» | ||
Timbus | m: Thread.start:{;} while 1 | ||
camelia | rakudo-moar 80b912: OUTPUT«Could not spawn thread: errorcode -1» | ||
Timbus | well ok | ||
golf sucks anyway | 08:41 | ||
Timbus throws club away | |||
08:41
Maddingue joined
|
|||
raydiak | yeah I don't think we'll be anywhere near p5's golfability on this one | 08:42 | |
08:51
jack_rabbit left
|
|||
raydiak | g'night #perl6 o/ | 08:52 | |
moritz | \o | 08:54 | |
LLamaRider | \o raydiak | ||
08:56
zakharyas left
09:00
prime joined
09:01
zakharyas joined
09:05
xfix joined,
[Sno] joined
09:06
kaleem joined
09:12
kjs_ joined
09:13
jack_rabbit joined
09:22
virtualsue left
09:24
jack_rabbit left
|
|||
nine | .tell pmurias Have never tried that so probably serializing Python objects doesn't work. I also don't like having to initialize Python at BEGIN time, but I create a Python class for every Perl class that inherits from a Python class. And that's a very BEGIN time thing to do. | 09:24 | |
yoleaux | nine: I'll pass your message to pmurias. | ||
09:25
colomon left
09:31
mvuets joined
09:40
colomon joined
09:50
BigBear joined
10:05
yeahnoob left
10:08
TuxCM joined
10:12
kjs_ left,
Hor|zon joined
10:24
telex left
10:26
telex joined
10:28
Patterner joined,
adu left
10:31
kaleem left
10:32
adu joined
10:37
kjs_ joined
10:40
kaleem joined
10:53
kjs_ left
10:58
virtualsue joined
|
|||
xfix | r: [1, 2].map({$_, $_}).perl.say | 11:02 | |
camelia | rakudo-{parrot,moar} 80b912: OUTPUT«((1, 1), (2, 2)).list» | ||
xfix | r: [1, 2].for({$_, $_}).perl.say | ||
camelia | rakudo-{parrot,moar} 80b912: OUTPUT«((1, 1), (2, 2)).list» | ||
xfix | What is the difference between map and for? | ||
Oh, map doesn't flatten left side. It's not about right side. | 11:06 | ||
11:09
kjs_ joined
11:23
adu left
11:30
kjs_ left
11:31
Rounin joined
|
|||
moritz | xfix: currently, they are identical. .map will stop flattening though | 11:33 | |
11:33
pmurias joined
|
|||
pmurias | hi | 11:33 | |
yoleaux | 09:24Z <nine> pmurias: Have never tried that so probably serializing Python objects doesn't work. I also don't like having to initialize Python at BEGIN time, but I create a Python class for every Perl class that inherits from a Python class. And that's a very BEGIN time thing to do. | ||
11:34
jluis left
|
|||
pmurias | nine: the problem with doing things at BEGIN time is that the python objects will have to get serialized | 11:34 | |
if we precompile | |||
11:36
sirdancealot left
|
|||
nine | pmurias: I'm currently trying to defer Python class creation to runtime. This may also fix very strange errors Python is giving me in t/inherit.t. Of course, like so often, Python's error message is less than helpful... | 11:36 | |
11:40
jluis joined
|
|||
xfix | By the way, what is the equivalent of flat_map from Ruby in Perl 6? .map.flat? In Ruby, [1, 2, 3].flat_map { |item| [item, item] } gives [1, 1, 2, 2, 3, 3] | 11:40 | |
pmurias | the most significant problem is the we would have to load a python module twice | 11:41 | |
if we are doing precompilation | |||
assuming we want to import python modules at runtime | 11:44 | ||
nine | pmurias: precompilation seems to be a difficult topic anyway. AFAIU I'd actually have to serialize the Python interpreter's (or Perl5 in case of Inline::Perl5) whole state to allow for precompiling modules that use Inline::Python and run Python code at compile time. | ||
pmurias | that seems problematic | 11:47 | |
but it would be great to have 'use Foo:from<python>' work at some point | 11:48 | ||
Timbus | m: say [1,2,3].map: { $^a, $^a } | ||
camelia | rakudo-moar 80b912: OUTPUT«1 1 2 2 3 3» | ||
nine | Is 'use Foo::from<>' implemented at all in Rakudo? | ||
moritz | nine: I'm pretty usre that's how java interop is done | 11:49 | |
nine | I would love to play with that mechanism and see how far I come. | ||
pmurias | the precompilation barrier seems hard | 11:50 | |
* a hard problem | |||
one possible solution would be to just create the python interpreter twice, at first just look what the python modules contain and create stubs which will then be filled at runtime | 11:53 | ||
dalek | ecs: 70fe06b | ugexe++ | S32-setting-library/IO.pod: deprecated IO::Spec.splitpath -> $*SPEC.splitpath |
11:54 | |
ecs: b1c01d1 | moritz++ | S32-setting-library/IO.pod: Merge pull request #78 from ugexe/master deprecated IO::Spec.splitpath -> $*SPEC.splitpath |
|||
nine | Dill also provides the capability to: save and load python interpreter sessions | ||
Timbus | m: my $a = [1]; $a ,= 2; | ||
camelia | ( no output ) | 11:55 | |
Timbus | okay. guess i gotta update | ||
moritz | ok, perl6/doc has a slight problem | 11:57 | |
we have types int and Int | |||
if I check in a file lib/type/int.pod alongside lib/type/Int.pm | 11:58 | ||
pmurias | nine: doing that with perl5 would be more problematic | ||
moritz | people on case-insensitive file systems would be unable to work with it anymore | ||
pmurias | serializing an open socket wouldn't be easy | 11:59 | |
Timbus | m: my $a = [1]; say $a ,= 2; | 12:00 | |
camelia | rakudo-moar 80b912: OUTPUT«Memory allocation failed; could not allocate 174080 bytes» | ||
Timbus | well okay | ||
nine | pmurias: before starting any work into that direction, we should think about real use cases for this functionality. I guess serializing open sockets is not possible with plain vanilla Perl 6 modules either. Precompilation is just about saving load time after all. | 12:04 | |
dalek | c: a6c6eb2 | moritz++ | lib/Type/Int.pod: document Int.lsb and .msb |
12:08 | |
pmurias | Perl 6 modules are written with precompilation in mind, Perl 5 aren't | 12:09 | |
nine | Perl 6 modules may be written with precompilation in mind, Perl 5 can't. | ||
pmurias | and the python ones also assume that they are loaded at runtime | 12:11 | |
nine | Authors with a Perl 5 background like me will not write modules with precompilation in mind until they are first bitten by precomp problems. And maybe not even then (again like me). | ||
pmurias | currently the way modules are loaded in rakudo sucks | 12:12 | |
but things will be precompiled automatically in the future | 12:13 | ||
nine | I cannot even find anything about precompilation in the synopsis. | ||
pmurias | with our current compilation speed we are heavily dependent on precompilation | 12:15 | |
12:16
FROGGS joined
|
|||
pmurias | by precompilation I mean compiling things in a different process then the thing that uses them | 12:16 | |
nine | My current takeaway from this discussion is: avoid running Python/Perl5 code at compile time at any cost. | 12:17 | |
pmurias | that seems like a sane strategy | 12:18 | |
12:18
kjs_ joined
|
|||
nine | Then I already have to thank you for bringing this to my attention when I can still do something about it :) | 12:18 | |
pmurias | is it common for python modules to have side effects at load time? | 12:21 | |
nine | I actually don't know. I'm actually not that familiar with the Python ecosystem. | 12:22 | |
dalek | ast: d3aa62b | usev6++ | S03-metaops/cross.t: Add tests for RT #120973 |
12:23 | |
synopsebot | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=120973 | ||
12:25
KCL joined
|
|||
moritz | $ panda install Pod::To::HTML | 12:27 | |
Segmentation fault (core dumped) | |||
12:27
KCL_ left
|
|||
moritz | guess I should rebootstrap... | 12:27 | |
pmurias | nine: we could also load stuff with require | 12:28 | |
with something like: require Term::ANSIColor:from<perl5> <RED RESET>; say RED, "Hi", RESET; | 12:36 | ||
12:37
kjs_ left
12:39
kjs_ joined
12:42
BenGoldberg joined
|
|||
nine | That may be the best solution, yes. | 12:42 | |
12:52
kaleem left,
kaleem joined
12:55
BenGoldberg left
13:06
colomon left
|
|||
FROGGS | is it more like: require Term::ANSIColor:from<Perl5> <&RED &RESET>; say RED, "Hi", RESET; ? | 13:06 | |
13:07
kjs_ left
13:08
colomon joined
|
|||
nine | FROGGS: I'm not sure about that. I could pass on the <RED RESET> to $p5.use(...) unmodified. I'll have to figure out what the exported symbols are without the help of the importer anyway since I also want to support default exports. | 13:09 | |
dalek | ast: a3669d5 | usev6++ | S02-types/hash.t: Add tests for RT #77504 |
13:10 | |
synopsebot | Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=77504 | ||
FROGGS | nine: seems like S11 also states that the & is not needed | 13:11 | |
13:13
kjs_ joined,
pecastro joined
|
|||
dalek | c: 8500a6c | moritz++ | htmlify.p6: htmlify: include methods from roles that were provided by roles closes #37 |
13:14 | |
13:17
colomon left
13:18
pecastro left
|
|||
dalek | ast: 0e35f65 | lizmat++ | S03-metaops/ (3 files): Unfudge now passing tests related to #77114 |
13:23 | |
synopsebot | Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=77114 | ||
13:27
jluis left
13:43
kaare__ left
|
|||
pmurias | FROGGS: the synopsis doesn't use the & | 13:55 | |
FROGGS | pmurias: exactly | ||
pmurias | can we export/import classes in Perl6? | 13:56 | |
FROGGS | yes, using the 'is export' trait for example... IIRC NativeCall does that | ||
dalek | c: 8983621 | moritz++ | lib/Perl6/TypeGraph/Viz.pm: htmlify: Use FreeSans for SVG; Closes #9 |
13:58 | |
13:58
psch joined
|
|||
pmurias | is that anywhere in the spec? | 13:59 | |
psch | hi #perl6 \o | ||
pmurias | hi | ||
14:00
colomon joined
|
|||
psch | S11:Exportation | 14:01 | |
synopsebot | Link: perlcabal.org/syn/S11.html#Exportation | ||
psch | oh, that's not explicitly about classes | ||
lizmat | pmurias: why would you want to export a class ? | ||
moritz | why not? | 14:02 | |
lizmat | loading a module with a class already exposes it in the scope you do the -use- in | ||
moritz | that S11 link has an example for exporting an enum | ||
lizmat: unless it's a lexical scope | |||
there's nothing wrong with keeping classes lexical, and exporting them | |||
pmurias | how can you import them using require? | 14:03 | |
lizmat | feels like an "our" vs "my" argument here, and I'm not seeing why I would want to use "our" here | ||
pmurias | require Foo <foo> import &foo | ||
14:03
kaleem left
|
|||
moritz | pmurias: IMHO it would make sense to 'require Foo <&foo>' to import &foo | 14:05 | |
pmurias: exactly so that non-sigiled thingies (constants, terms,types) can be imported | |||
14:17
kaleem joined
14:19
gtodd joined
14:32
kjs_ left
14:35
KCL left
14:37
[Sno] left,
kjs_ joined
14:44
xfix is now known as ZoruaTrainer,
ZoruaTrainer left
14:51
kaare__ joined,
kjs_ left
14:52
rurban joined
14:55
kaleem left
14:59
Ven joined
15:01
kjs_ joined
|
|||
dalek | kudo/nom: 250c988 | lizmat++ | src/core/CompUnitRepo.pm: Introduce CREATE-INCLUDE-SPEC helper sub |
15:04 | |
kudo/nom: 83dedd5 | lizmat++ | t/01-sanity/52-parse-include-spec.t: Make sure we sanity test CREATE-INCLUDE-SPEC |
|||
15:06
millican joined
15:07
denis_boyun joined
15:09
kjs_ left
15:17
raiph joined
15:19
kjs_ joined
15:26
kjs_ left
15:27
sirdancealot joined
15:30
kjs_ joined
|
|||
dalek | ecs: ff72f24 | lizmat++ | S22-package-format.pod: Some elaboration: - CompUnitRepo.parse-spec's functionality is now an implementation detail - Spec CompUnit.precomp method |
15:33 | |
15:37
pecastro joined
|
|||
psch | $ ./perl6 -e'module Foo { enum Bar is export (a => 1) }; import Foo; say a' | 15:37 | |
a | |||
that's re #111512 | |||
synopsebot | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=111512 | ||
psch | although i think there's probably a better way to do it than i'm doing it, which is "if we have $<trait><trait_mod><longname> eq 'export' call its .ast for the value object and put the key as :SYMBOL" | 15:38 | |
gist.github.com/peschwa/4bfa8a5610b7b7488ef7 | |||
i was thinking if enums can somehow know they have to export their keys and values, but i don't think i know how that works :) | 15:39 | ||
s/works/would work/ | |||
15:43
virtualsue left
15:46
kjs_ left
15:47
kjs_ joined
15:50
virtualsue joined
15:51
pecastro left
15:58
rurban left
16:00
adu joined
16:02
kjs_ left
|
|||
dalek | kudo/nom: 33f7ab3 | lizmat++ | src/core/Inc.pm: We can't take all params here |
16:04 | |
16:07
millican left
16:14
virtualsue left
16:17
kjs_ joined
16:22
virtualsue joined
16:30
kaleem joined
16:36
kaleem left
|
|||
dalek | kudo/nom: e9a9724 | moritz++ | src/core/Metamodel/Primitives.pm: Metamodel::Primitives: use P6opaque as default representation |
16:42 | |
psch | where should jvm interop tests go? i've cleaned up my nqp and rakudo branches to look presentable, but they should definitely have tests before i PR them i'd say... | 16:48 | |
lizmat | .tell jnthn is it correct that we cannot serialize any Lock objects | ||
yoleaux | lizmat: I'll pass your message to jnthn. | ||
moritz | psch: imho into t/ somewhere in rakudo | ||
psch: possibly in a new subdirectory, and the Makefile-JVM.in modified so that 'make test-j' runs them | 16:49 | ||
or j-test | |||
or whatever I called it | |||
lizmat | .tell jnthn if not, is that an omission? or is that something we Just Cannot Do™ | ||
yoleaux | lizmat: I'll pass your message to jnthn. | ||
psch | moritz: alright. i'll add 03-jvm and add a few interop tests | 16:50 | |
moritz | psch++ | ||
dalek | kudo/nom: 003b358 | lizmat++ | src/core/CompUnit.pm: Allow specification of @*INC in CompUnit.precomp By default, CompUnit.precomp will now *only* use whatever is in @*INC (by default) to set up the @*INC in the external process doing the precompilation. This actually breaks a few spectests (and actually passes a todo test), but does not break panda (mostly because it doesn't use .precomp yet). Hopefully this will make it easier to trace some hard to find precomp related bugs and other oddness. If not, then please revert this one. |
16:54 | |
c: cbc03bc | moritz++ | lib/Type/Metamodel/Primitives.pod: document Metamodel.::Primitives |
16:56 | ||
moritz | oops, typo in commit message | ||
lizmat | too bad :-) | 16:57 | |
16:58
zakharyas left
|
|||
moritz | review of these docs would be very welcome; I'm not sure I understand the thiings I documented :-) | 16:58 | |
17:04
kjs_ left
|
|||
dalek | c: c8a6bc0 | lizmat++ | lib/Type/Metamodel/Primitives.pod: Fix some typos |
17:06 | |
lizmat | moritz: sorry, can't help more than that :-( | ||
dinner& | 17:08 | ||
TimToady | pjablons: we do have Xxx already, at least | 17:11 | |
m: say <a b c> Xxx 1,2,3 | |||
camelia | rakudo-moar 80b912: OUTPUT«a a a a a a b b b b b b c c c c c c» | ||
TimToady | m: .say for <a b c> Xxx 1,2,3 | ||
camelia | rakudo-moar 80b912: OUTPUT«aaaaaabbbbbbcccccc» | ||
TimToady | hmm | ||
m: (<a b c> Xxx 1,2,3).perl.say | 17:12 | ||
camelia | rakudo-moar 80b912: OUTPUT«(("a",), ("a", "a"), ("a", "a", "a"), ("b",), ("b", "b"), ("b", "b", "b"), ("c",), ("c", "c"), ("c", "c", "c")).list» | ||
TimToady | there we go | ||
moritz | m: (<a b c> Zxx 1,2,3).perl.say | 17:14 | |
camelia | rakudo-moar 80b912: OUTPUT«(("a",), ("b", "b"), ("c", "c", "c")).list» | ||
17:15
kjs_ joined
|
|||
psch | m: sub infix:<zz>(&lhs, $rhs) { sleep $rhs; lhs }; ({ say "a" }, { say "b" }, { say "c" }) Zzz (1, 2, 3) # scnr | 17:18 | |
camelia | rakudo-moar 80b912: OUTPUT«abc» | ||
psch | although i suppose infix:<zZz> looks better | ||
moritz | m: sub infix:<zz>(&lhs, $rhs) { Promise.in($rhs).then({ ; lhs }) }; await ({ say "a" }, { say "b" }, { say "c" }) Zzz (3, 2, 1) | 17:19 | |
camelia | rakudo-moar 80b912: OUTPUT«cba» | ||
psch | aah, .then it was | ||
i was trying it with .in().start | |||
moritz is now #perl6[TM] Certified Sleep-Sort Expert[R][TM] | 17:20 | ||
TimToady doubts that, due the absence of Unicode there | 17:21 | ||
17:21
denis_boyun left
|
|||
TimToady | well, I guess that's Unicode too, technically | 17:21 | |
masak .oO( 😴 ) | 17:22 | ||
moritz | s:g/'[TM]'/™/ | ||
s:g/'[R]'/®/ | 17:23 | ||
TimToady | the Texas version of that is Ⓡ | 17:24 | |
masak | or the IKEA version: R ⃝ | 17:25 | |
TimToady | .oO(falls apart easily?) |
17:26 | |
17:32
LLamaRider left
|
|||
moritz | left to your own assembly | 17:39 | |
hoelzro | good morning, #perl6 | 17:41 | |
17:42
Hor|zon left
|
|||
moritz | \o hoelzro | 17:49 | |
hoelzro | I had a thought (well, a few, actually) over the last few days about earliest { ... }, and I wanted to post them here for some feedback | 17:52 | |
17:53
pecastro joined
|
|||
hoelzro | first of all, is there any reason that earliest and friends are limited to operating on Channels? I was thinking something like earliest * { more $socket { ... } ; more $channel { ... } } could be of use, since sockets also have a notion of being done, and receiving more information | 17:53 | |
17:53
Alina-malina joined
|
|||
hoelzro | second, I was thinking about the implementation of earliest, and how for multiple channels, it currently uses busy waiting; I was thinking of adding a new NQP op to make things more efficient, and wanted to see if others had thoughts on the matter | 17:54 | |
17:54
pmurias left
|
|||
moritz | hoelzro: IMHO earliest could work on Promise/Channel/Supply, and we should have a Socket -> Supply (or Channel) bridge | 17:55 | |
(becuase they have a very well-defined notion of "value available", and the Socket -> Supply bridge could define what counts as a value) | 17:56 | ||
I can't comment on your second thought | |||
17:57
denis_boyun_ joined
|
|||
hoelzro | moritz: that's true, but my concern with that is that if a thread is reading from a socket to pump values into a channel/supply/etc, another thread might be trying to write to that socket, for example, when a message is received from a channel | 17:57 | |
and I think thread safety of socket operations is OS dependent | |||
you would definitely have to define what a "next value" of a socket is, though, yes | 17:58 | ||
moritz | hoelzro: well, the solution for thread safety thing is to have an owning thread, and communicate with that thread in some thread-safe manner | 18:01 | |
hoelzro | right | 18:02 | |
so let's say I have an owning thread that manages my socket | |||
moritz | hoelzro: and if we don't have the primitives yet for doing that, we need to create them | ||
hoelzro | my thread has two tasks: read bytes from the socket, parse them into protocol-specific packets, and send those along a Supply | 18:03 | |
moritz | or our high-level socket wrappers must do the locking | ||
hoelzro | the second task is to accept packets from another Channel and send them along the socket | ||
18:04
denis_boyun_ left
|
|||
hoelzro | so my thread needs to block until data are available on the socket, or on the channel | 18:04 | |
so my idea for earliest accomplishes that, but there may be a better, "sixier" way | |||
18:04
pecastro left
|
|||
hoelzro | moritz: I think, at least on MoarVM, the sockets are locked, because I can't write to a socket I'm trying to read from | 18:05 | |
18:07
isBEKaml joined
|
|||
moritz | hoelzro: maybe there should be an async-write which queues writes until the lock from reading is available | 18:10 | |
hoelzro | ah, but the protocol I'm implementing (XMPP) expects a write at the beginning before sending any more data from the server, so that would deadlock, I think | 18:11 | |
18:12
FROGGS_ joined
18:15
Sqirrel left,
FROGGS left
|
|||
moritz | then you shouldn't try to read before writing | 18:20 | |
hoelzro | so right now I have a stanzas method, which returns a lazy list of stanza objects parsed from reads from the server | 18:22 | |
another thread is reading stanzas from that list, and is determining what stanza to send next to the server | |||
if I wanted to prevent reading until writes are sent, I would have to wait for each stanza to be "handled" by invokers of stanzas | 18:23 | ||
so it seems that perhaps my design is flawed | |||
18:24
LLamaRider joined
18:25
Sqirrel joined
18:27
rindolf left,
jack_rabbit joined
18:31
raiph left
18:32
colomon left,
raiph joined
18:33
colomon joined
18:34
klaas_ joined
18:37
klaas_ left
18:39
Hor|zon joined
18:44
Hor|zon left
18:46
isBEKaml left
18:52
pecastro joined
18:57
colomon left
19:01
colomon joined
19:03
pecastro left
|
|||
moritz | hoelzro: I think exposing stanzas as a lazy list is dangerous, because it loses the information of which ones are read, and which ones aren't yet | 19:10 | |
19:18
kjs_ left
19:25
perl007 joined
|
|||
perl007 | 19:25 | ||
19:31
kjs_ joined
|
|||
perl007 | say [or](<asd, asd, asdasd> >>eq>> 'asd'); | 19:31 | |
does it short circuit? other/better ways to check the presence? | |||
19:31
colomon left
|
|||
perl007 | more like, when it short circuits | 19:32 | |
psch | perl007: <[or] @list | ||
19:33
Hor|zon joined
|
|||
psch | err | 19:33 | |
perl007: [or] @list means @list[0] or @list[1] .. @list[*-1] | |||
as you know | |||
i don't think it can shortcircuit, as in "not call eq" | |||
m: sub asd { say $++; "asd" }; say asdf { say $++; "asdf" }; say [or] (asd, asd, asdf, asdf >>eq>> "asd") | 19:34 | ||
camelia | rakudo-moar 80b912: OUTPUT«===SORRY!=== Error while compiling /tmp/3POaO0hQ3JPreceding context expects a term, but found infix >>eq>> insteadat /tmp/3POaO0hQ3J:1------> }; say [or] (asd, asd, asdf, asdf >>eq>>⏏ "asd")» | ||
psch | m: sub asd { say $++; "asd" }; say asdf { say $++; "asdf" }; say [or] ((asd, asd, asdf, asdf) >>eq>> "asd") | ||
camelia | rakudo-moar 80b912: OUTPUT«===SORRY!=== Error while compiling /tmp/0AYIIRrImbUndeclared routine: asdf used at line 1. Did you mean 'asd'?» | ||
psch | m: sub asd { say $++; "asd" }; sub asdf { say $++; "asdf" }; say [or] ((asd, asd, asdf, asdf) >>eq>> "asd") | ||
camelia | rakudo-moar 80b912: OUTPUT«0101True» | ||
psch | m: sub asd { say "asd " ~ $++; "asd" }; sub asdf { say "asdf " ~ $++; "asdf" }; say [or] ((asd, asd, asdf, asdf) >>eq>> "asd") # clearer | 19:35 | |
camelia | rakudo-moar 80b912: OUTPUT«asd 0asd 1asdf 0asdf 1True» | ||
avuserow | m: say <asd asd asdasd> ~~ 'asd' # not sure if this shortcircuits | 19:36 | |
camelia | rakudo-moar 80b912: OUTPUT«False» | ||
avuserow | or works apparently. | ||
psch | avuserow: that's List ~~ String | 19:37 | |
19:37
kjs__ joined,
kjs_ left,
kjs__ is now known as kjs_
19:38
denis_boyun_ joined
|
|||
psch | m: say so <asd asd asdasd>.Bag<asd>; # checks presence. applicability depends on context | 19:39 | |
camelia | rakudo-moar 80b912: OUTPUT«True» | ||
psch | actually, disregard the sub example above. i'm not concentrated enough :) | 19:40 | |
it increments the state because the lhs has to get a value first before it gets hypered with eq | 19:41 | ||
19:42
colomon joined,
kjs_ left
|
|||
psch | this could maybe be tested with gather/take, but i'm unsure how .elems on a lazy list works, i.e. if it reifies | 19:42 | |
19:43
virtualsue left
|
|||
colomon | yes, it has to reify in the general case | 19:45 | |
(maybe always, I dunno) | |||
Ven | perl007: looks like you're looking for any() :) | 19:47 | |
psch: any() is far better here, and should short-circuit | 19:48 | ||
19:48
anaeem1 joined
|
|||
ugexe | is there a general consensus on naming modules with .pm vs .pm6? I notice rakudos Inc::make-cur only checks for '.pm' | 19:48 | |
perl007 | thanks | 19:51 | |
psch | Ven: oh, right. any() actually does what's wanted. .Bag just has the side effect of checking for presence... | 19:55 | |
japhb | m: say 'asd' (elem) <asd asd asdasd>; | 19:56 | |
camelia | rakudo-moar 80b912: OUTPUT«True» | ||
japhb | psch: ^^ | ||
psch | japhb++ | 19:57 | |
setops exist as well | |||
Ven | m: say any(<asd asd asdasd>) eq 'asd' # :P | ||
camelia | rakudo-moar 80b912: OUTPUT«any(True, True, False)» | ||
20:09
mvuets left
20:10
telex left
20:12
telex joined
20:18
leonid left
20:22
anaeem1 left
20:24
pizza joined,
anaeem1_ joined
20:26
pizza left,
darutoko left
20:30
denis_boyun_ left
20:31
colomon left
20:34
colomon joined
20:35
flussence joined
20:40
sqirrel_ joined
|
|||
lizmat | ugexe: regarding checking for .pm: good spot | 20:43 | |
but that's only for loading a non-standard CompUnitRepo module | |||
20:48
rurban joined
|
|||
dalek | kudo/nom: 5058ff8 | lizmat++ | t/01-sanity/52-parse-include-spec.t: Make sure we don't fudge sanity test by accident |
20:49 | |
20:53
araujo joined
20:55
adu left
|
|||
ugexe | lizmat++ for latest precomp commit... dont have to work on this pr anymore :) | 20:56 | |
lizmat | :-) | ||
it's still not working like it should, though :-( | 20:57 | ||
at least not on OS X | |||
20:58
Vlavv joined
|
|||
ugexe | :delete'ing after precomp caught me off guard for doing something like something like: sub pc(*@modules) { CompUnit.new($_.path).precomp for @modules }; { temp %*ENV<RAKUDO_PRECOMP_WITH> = "$*CWD/lib"; pc('A.pm', 'B.pm'); } | 21:05 | |
i.e. $*CWD/lib is not in @INC for B.pm's precomp | 21:06 | ||
lizmat | ugexe: you should be able to pass the INC that you want using the :INC named param | 21:07 | |
and also: there are still dragons there :-( | 21:08 | ||
thanks for also looking at this :-) | |||
psch | maybe TDD isn't that great of an idea - as soon as i start writing tests i find all kinds of bugs! | 21:12 | |
more seriously: i'm stuck with True and False specifically | |||
21:13
LLamaRider left
|
|||
lizmat | you need a en.wikipedia.org/wiki/Ternary_computer | 21:14 | |
psch | trying to differentiate between a type object and True or False on the java side seems not-quite-possible. Ops.istype doesn't work 'cause it sees the boxed java type, and Ops.istrue and Ops.isfalse evaluate as bool... | ||
lizmat: maybe, yes. i'm afraid i'd just add another not-working case though :) | 21:15 | ||
maybe i just did something wrong with istype... | |||
dalek | ast: 4247b62 | lizmat++ | S22-package-format/local.t: Make tests more robust and fudge failing subtest |
21:16 | |
21:18
raiph left
|
|||
lizmat | $ perl6 --ll-exception -It/spec/packages -e 'CompUnit.new("t/spec/packages/Example/A.pm").precomp.say' | 21:38 | |
Missing serialize REPR function for REPR ReentrantMutex | |||
finally golfed the problem down to a one liner | 21:39 | ||
this is regardless of whether there is a precomped C.pm or not | 21:40 | ||
ugexe | i was getting that ReentrantMutex error earlier | ||
lizmat | the only thing with a ReentrantMutex REPR is Lock.pm | ||
21:41
virtualsue joined
|
|||
lizmat | on Parrot (which does not have Lock.pm really, it's an empty class there) | 21:41 | |
21:42
pecastro joined
|
|||
lizmat | it states: $ perl6-p --ll-exception -It/spec/packages -e 'CompUnit.new("t/spec/packages/Example/A.pm").precomp.say' | 21:42 | |
Could not find Example::C in any of: /Users/liz/Github/rakudo.parrot/install/lib/6.10.0-devel/languages/perl6/lib, /Users/liz/Github/rakudo.parrot/install/lib/6.10.0-devel/languages/perl6 | |||
which is odd, as apparently the -It/spec/packages is *not* on @*INC there | 21:43 | ||
ugexe | yeah same deal here. its not finding the required modules in @*INC (even though @*INC has the proper path) because it installs some modules but not others | ||
lizmat | however, checking @*INC[0], t/spec/packages *is* there | 21:45 | |
ugexe | fwiw it happens if i dont use rakudo_precomp_with and use %*ENV<PERL6LIB> directly | 21:46 | |
as well | |||
dalek | ast: 3391c81 | lizmat++ | S22-package-format/local.t: Remove deprecations |
22:04 | |
22:07
LLamaRider joined
|
|||
lizmat | ugexe: ok, got a little further: the error occurs when *deserializing* C.pm | 22:09 | |
I found out when I had a .moarvm around from another perl6 build | 22:10 | ||
22:10
pecastro left
|
|||
lizmat | it failed with missing or wrong dependency then | 22:10 | |
hmmm...? there is no compiled version for C.pm now, and it still fails with missing REPR ? | 22:11 | ||
22:13
sqirrel_ left
|
|||
ugexe | from what im seeing it *might* be related to roles. i say this because in a folder with multiple modules the only one it ends up compiling *doesnt* load any roles | 22:16 | |
then again it could just be a 'use' problem i suppose and they just all happen be be roles | 22:17 | ||
lizmat | you mean the usage of roles in the modules being compiled? | ||
ah, yes | |||
.oO( must read more carefully ) |
|||
ugexe: that one module, does it have any 'use' command in it ? | 22:18 | ||
ugexe | no | ||
and in a subfolder of *that* all of the modules get compiled (no 'use' statements) and in another subfolder they all fail (all have a 'use' statement) | 22:19 | ||
lizmat | I think *that* is the deciding factor :-) | ||
ugexe | yeah, getting ahead of myself heh | 22:20 | |
22:22
raiph joined
|
|||
lizmat | .tell jnthn perl6 --ll-exception -e 'CompUnit.new("t/spec/packages/Example/A.pm").precomp' fails with 'Missing serialize REPR function for REPR ReentrantMutex' on Moar | 22:27 | |
yoleaux | lizmat: I'll pass your message to jnthn. | ||
lizmat | .tell jnthn I would expected it to fail with Could not find Example::C in any of: .... Any ideas? | ||
yoleaux | lizmat: I'll pass your message to jnthn. | ||
dalek | kudo/nom: e12b86b | lizmat++ | src/core/CompUnitRepo/Locally.pm: Make .gist and .perl better |
22:30 | |
22:30
LLamaRider left
|
|||
lizmat | the plot thickens: on the JVM, if C.pm is not precomped, it correctly fails with: | 22:34 | |
When pre-compiling a module, its dependencies must be pre-compiled first. | |||
Please pre-compile /Users/liz/Github/rakudo.jvm/t/spec/packages/Example/C.pm | |||
after having precomped C.pm on JVM, trying to precomp A.pm fails with Missing serialize function for REPR ReentrantMutex | 22:35 | ||
on parrot it works | 22:37 | ||
so I guess we somehow have a live Lock object that is serialized, but cannot be deserialized | 22:38 | ||
22:38
pmqs_ joined
|
|||
lizmat is tired | 22:40 | ||
sleep& | |||
ugexe | i tried manually pushing each sub directory to @*INC and instead of reentrantmutex error it says 'no such short-id for invocant type str' | ||
lizmat | you should 'use lib' | ||
pushing strings to @*INC is another of those things that will break (or already break) | 22:41 | ||
really sleep& | |||
22:42
Rounin left
22:44
[Sno] joined
|
|||
ugexe | ah, yea, back to reentrantmutex | 22:44 | |
22:51
sirdancealot left
22:53
colomon left
22:55
colomon joined
22:59
raiph left
23:02
adu joined
23:03
raiph joined
23:29
ggoebel111111117 joined
23:36
kaare__ left
23:46
rurban left
23:49
virtualsue left
23:52
anaeem1_ left
|