Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-08-13

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:01 dubi0us joined #perl6
00:02 Cabanossi joined #perl6
00:07 raschipi Thanks for the explanation guys.
00:17 lizmat joined #perl6
00:32 Cabanossi joined #perl6
00:37 zengargoyle joined #perl6
00:37 Cabanossi joined #perl6
00:45 pierre_ joined #perl6
00:48 dj_goku joined #perl6
00:48 dj_goku joined #perl6
00:57 pharv_ joined #perl6
00:59 dubi0us joined #perl6
01:01 dubi0us_ joined #perl6
01:03 Kyo91_ joined #perl6
01:07 AlexDaniel m: say %*ENV<ME>.comb.pick(*).join
01:07 camelia rakudo-moar 30584d: OUTPUT: «lixAelenDa?»
01:10 raschipi m: say %*ENV<ME>
01:10 camelia rakudo-moar 30584d: OUTPUT: «raschipi?»
01:18 dubi0us joined #perl6
01:23 tadzik joined #perl6
01:30 tadzik joined #perl6
01:32 Cabanossi joined #perl6
01:38 unclechu joined #perl6
01:38 tyil[m] joined #perl6
01:38 wictory[m] joined #perl6
01:38 M-Illandan joined #perl6
01:38 mack[m] joined #perl6
01:38 Matthew[m] joined #perl6
01:38 ilmari[m] joined #perl6
01:38 xui_nya[m] joined #perl6
01:38 CIAvash[m] joined #perl6
01:38 mienaikage joined #perl6
01:40 dubi0us_ joined #perl6
01:51 ilbot3 joined #perl6
01:51 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:59 ugexe m: m: use lib "inst#/home/camelia/star-2017.07/share/perl6/site"; use Zef::Client; use Zef::Config; my $client = Zef::Client.new(:config(Zef::Config::parse-file( Zef::Config::guess-path()))); .dist.name.say for $client.search("HTTP");
02:00 camelia rakudo-moar 30584d: OUTPUT: «HTTP::Server::Tiny?HTTP::Server::Simple?HTTP::UserAgent?HTTP::Easy?HTTP::Status?»
02:00 ugexe i'm leaving installing modules onto camelia as an exercise to the user
02:01 dubi0us joined #perl6
02:01 mspo where should lib sources go?
02:04 ckraniak Question 10 or so about Native Call: how does one declare a function pointer in a CStruct? With a Pointer?
02:08 noganex_ joined #perl6
02:09 Kyo91_ joined #perl6
02:11 dubi0us_ joined #perl6
02:16 astj joined #perl6
02:18 zengargoyle joined #perl6
02:22 astj joined #perl6
02:41 skids joined #perl6
02:41 timotimo ckraniak: you should be able to nativecast from Pointer to any function pointer type you can imagine and backwards, too
02:42 timotimo ckraniak: btw, i can compile your nativecall issue code just fine, what exact perl6 --version do you have so i can maybe reproduce the issue?
02:43 ckraniak perl6 --version outputs 2017.07, 6.c
02:43 ckraniak Is there a more verbose version somewhere?
02:43 [Coke] that version should be slightly more verbose than what you C&P'd
02:44 ckraniak IRC on phone not computer, cannot copypaste
02:44 timotimo that's as verbose as you can get
02:45 ckraniak Hmm. Well I downloaded whichever it was on Friday I think
02:45 ckraniak This would have been the msi version
02:45 timotimo oh, right, you're on windows
02:46 timotimo i don't have a windows rakudo to test things out with, but it shouldn't matter
02:46 ckraniak Wednesday, actually, idk how fast y'all change stuff
02:47 ckraniak Try deleting the whole SHUT-UP class and see what it does
02:47 timotimo we release the compiler monthly, but we only build msi for Rakudo Star, which is compiler + modules + documentation
02:47 timotimo sure
02:47 timotimo same output
02:47 ckraniak Outputting 284?
02:48 ckraniak Welp just chalk it down to MS just knocking it out of the park again I suppose
02:48 ckraniak Thanks for looking into it anyway
02:56 timotimo i find it hard to believe MS is at fault here o_O
02:58 dubi0us joined #perl6
02:58 timotimo i'll try falling asleep again :|
03:00 wamba joined #perl6
03:03 dubi0us joined #perl6
03:04 wamba joined #perl6
03:06 ckraniak Doesn't matter if it works
03:06 ckraniak Even if the code looks completely stupid
03:06 ckraniak s/if/so long as/ # for clarity
03:07 dubi0us_ joined #perl6
03:10 epony joined #perl6
03:16 Cabanossi joined #perl6
03:16 pierre_ joined #perl6
03:17 dubi0us joined #perl6
03:32 dubi0us joined #perl6
03:37 dubi0us joined #perl6
03:52 dubi0us joined #perl6
04:01 zengargoyle joined #perl6
04:01 dubi0us joined #perl6
04:17 dubi0us joined #perl6
04:19 zengargoyle joined #perl6
04:46 Cabanossi joined #perl6
04:54 haha_ joined #perl6
04:55 zengargoyle joined #perl6
05:07 dubi0us joined #perl6
05:14 zengargo1le joined #perl6
05:14 andrzejku joined #perl6
05:16 dubi0us joined #perl6
05:19 andrzejku joined #perl6
05:23 dubi0us joined #perl6
05:27 zengargoyle joined #perl6
05:28 dubi0us joined #perl6
05:43 haha_ joined #perl6
05:46 haha_ left #perl6
05:46 Cabanossi joined #perl6
05:53 dubi0us joined #perl6
06:03 dubi0us joined #perl6
06:23 dubi0us joined #perl6
06:31 Cabanossi joined #perl6
06:36 stmuk you can use choco install rakudostar and appveyor to easily test windows via MSI
06:37 dubi0us joined #perl6
06:55 skids joined #perl6
06:55 |oLa|1 joined #perl6
06:57 moritz ok, I forgot to reboot irc.p6c.org yesterday night; doing it now
06:57 stmuk dont forget to replace systemd by sysvinit ;)
06:59 moritz ok, it came back up
07:00 moritz I guess www.p6c.org comes next
07:01 dubi0us joined #perl6
07:07 dubi0us joined #perl6
07:12 darutoko joined #perl6
07:16 rindolf joined #perl6
07:17 zengargoyle joined #perl6
07:21 Koong joined #perl6
07:22 Koong I don't to know about for perl6.
07:23 Koong -_-'
07:23 Koong Hi
07:23 moritz hello Koong
07:24 Koong hello moritz
07:30 ckraniak Want to say I am enjoying the language so far
07:33 ryu0 That was odd.
07:36 pierre_ joined #perl6
07:42 moritz ckraniak: that's great to read
07:44 ryu0 Though nothing compared to the weird web chat visitors we get in #learnprogramming. lol
07:53 zengargoyle joined #perl6
08:01 Cabanossi joined #perl6
08:04 yqt joined #perl6
08:06 moritz thinking about parsing a bit more, I think there could be a relatively simple way to improve pasing errors from grammars
08:07 moritz we could have an assertion that makes a failure fatal for the whole whole parse after the grammar got there
08:08 lisbeths joined #perl6
08:08 moritz oh, it seems <commit> is meant to do just that
08:09 ryu0 moritz: i assume perl 6 grammars are meant as a substitute for stuff like YACC and LEX?
08:10 moritz ryu0: yes
08:10 moritz jnthn: what would it take to implement <commit> in regexes?
08:10 ryu0 interesting. never seen that built into a language before.
08:10 ryu0 usually it's an addon.
08:11 moritz the really cool thing is that regexes are code objects in Perl 6
08:11 moritz so you can use all the usual techniques for code reuse (role composition, inheritance, delegation) for regexes and grammars as well
08:11 ryu0 Not an opaque compiled engine like other implementations?
08:14 moritz it's more like a declarative way to write a recusrive descend parser, with regexes (optionally without backtracking) for tokenization
08:15 zengargoyle joined #perl6
08:16 moritz *recursive
08:20 ryu0 i also saw that the JVM is being targeted by nqp/rakudo. is there plans to expand it to other VMs too?
08:21 moritz pmurias is working on a js backend
08:21 ryu0 ah.
08:21 lisbeths The main three targets are llvm, jvm, and webassembly
08:21 lisbeths perhaps .net core
08:21 ryu0 I take it CIR isn't very popular. heh
08:22 moritz and I think it's pretty far along; like rakudo.js being able to compile the setting, and even use Test.pm
08:23 ryu0 but i assume MoarVM will continue to remain the default VM, hm?
08:24 moritz until something better comes along :-)
08:24 ryu0 lol. i thought you were developing one to have your own regardless of where the 3rd party ones go.
08:25 moritz we are very pragmatic around here when it comes to such choices
08:25 moritz like, parrot used to be target of choice
08:25 aborazmeh joined #perl6
08:25 aborazmeh joined #perl6
08:25 moritz until moarvm became better in basically all dimensions
08:25 as_ joined #perl6
08:25 moritz if we find a 3rd party VM that does better than MoarVM, less maintainence effort to us
08:26 moritz though it's going to be pretty hard to beat something that implements grapheme-level strings at VM level, and I don't see other VMs doing that right now
08:26 ryu0 that makes me wonder. Is stuff like NativeCall standardized across backends?
08:27 moritz somewhat, yes
08:27 ryu0 ah.
08:30 as_ Morning! Anyone can tell why do we need both Supply and Supplier classes? Looks a bit confusing and overcomplicated to have Supplier.new and then Supplier.new.Supply. Supplier is only to be used as a factory? Why are they split?
08:30 gfldex m: my @a = [{a=>1, b=>2}, {a=>3, c=>55}]; dd @a».<c>.grep(*.values.defined)
08:30 camelia rakudo-moar 30584d: OUTPUT: «(Any, 55).Seq?»
08:30 gfldex m: my @a = [{a=>1, b=>2}, {a=>3, c=>55}]; dd @a».<c>.grep(*.values».defined)
08:30 camelia rakudo-moar 30584d: OUTPUT: «(55,).Seq?»
08:31 gfldex It's like Perl 6 was made to work with JSON. :)
08:31 Cabanossi joined #perl6
08:34 moritz it's like Perl 6 was made to work with data structures :-)
08:44 lisbeths Some perl developers could learn a bit from minimal languages like forth where you deal with direct memory addresses and the only type is a byte
08:44 lisbeths All you really need for a type system is ints
08:44 wamba joined #perl6
08:45 lisbeths all you need for most things is arrays of ints
08:45 ryu0 lisbeths: i've used languages that are typeless before. shell script is also typeless, since everything is a string more or less.
08:45 lisbeths Strings are a bit easier to get into than just ints
08:46 dubi0us joined #perl6
08:48 lisbeths The problem with most string typed languages is escaping strings
08:49 ryu0 that's a problem in many languages when you're embedding a string type of a different context.
08:49 ryu0 especially C or C++.
08:50 lisbeths Nesting strings is very painful, especially because most languages use the same symbol for the left hand and the right hand of the string.
08:52 dubi0us joined #perl6
09:02 dubi0us joined #perl6
09:10 moritz good thing we offer more data structures than just strings
09:11 lisbeths Yeah thats what makes the perls so much better than bash.
09:11 lisbeths In part.
09:12 moritz PSA: I'm going to reboot the server that hosts www.perl6.org and other Perl 6 websites
09:14 moritz ... back up
09:14 lisbeths Jeez what os are you running on that?
09:16 moritz now Debian Stretch
09:16 moritz used to be Jessie
09:16 lisbeths That was a pretty fast reboot
09:17 moritz not many services running
09:17 moritz and it's a VM, so no ultra-slow server bios
09:18 moritz rebooting the hypervisor spends about a minute or so just in the bios
09:18 lisbeths When I reboot my machine in azure it takes maybe four minutes but that's on hdd
09:18 gfldex JSON::Tiny got a broken test with This is Rakudo version 2017.07-152-g30584da built on MoarVM version 2017.07-378-g5e94da0
09:19 moritz gfldex: yes, we have a rakudo bug report for that
09:19 * gfldex goes to find a fresh bug
09:20 dubi0us joined #perl6
09:20 moritz RT #131881
09:20 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=131881
09:20 lisbeths` joined #perl6
09:21 lisbeths` joined #perl6
09:21 lisbeths` joined #perl6
09:27 dubi0us joined #perl6
09:31 nadim joined #perl6
09:48 dubi0us joined #perl6
10:01 Cabanossi joined #perl6
10:01 pmurias joined #perl6
10:02 pmurias ryu0: re standardized, all the VMs generally try to implement the same layer of low level operations
10:02 pmurias ryu0: the differences are mostly some of them lacking features
10:04 pmurias ryu0: re have our own we can always take over and fork an existing VM
10:05 pmurias ryu0: the main reason for MoarVM is that JVM has a slow startup so the MoarVM developers wanted something tailor built for Perl 6
10:05 ijneb joined #perl6
10:14 pmurias lisbeths: for me the most interesting thing we could target that we aren't is the graal/truffle thing on the JVM
10:30 TEttinger aaaargh graaaaaaaal
10:31 TEttinger it's so frustrating to build
10:31 TEttinger and if you want slow startup time, graal has that covered
10:31 Cabanossi joined #perl6
10:33 pierre_ joined #perl6
10:40 dubi0us joined #perl6
10:52 pmurias_ joined #perl6
10:53 pmurias_ TEttinger: didn't they reduce the startup time with substrate VM?
10:54 pmurias_ TEttinger: AFAIR I got graal to build by just following the instructions they provided
11:01 Cabanossi joined #perl6
11:08 pierre_ joined #perl6
11:11 evanm joined #perl6
11:14 pierre_ joined #perl6
11:19 zengargoyle joined #perl6
11:23 AlexDani` joined #perl6
11:29 TEttinger pmurias: i'm on windows.
11:30 ChoHag joined #perl6
11:32 dubi0us joined #perl6
11:33 sena_kun joined #perl6
11:44 Kyo91_ joined #perl6
11:56 dubi0us joined #perl6
12:01 Cabanossi joined #perl6
12:02 dubi0us joined #perl6
12:10 gfldex m: sub f(|c){ dd c }; constant term:<GMT> = :0timezone; f GMT
12:10 camelia rakudo-moar 30584d: OUTPUT: «\(:timezone(0))?»
12:15 gfldex First time I found a good use for term:<>
12:30 piojo9 joined #perl6
12:33 piojo9 p6: sub returns_int(--> Int) { return "a"; }
12:33 camelia rakudo-moar 30584d: ( no output )
12:33 piojo9 According to the docs, that should be a compiler error
12:34 piojo9 Good to confirm that it's not just my computer that's misbehaving
12:34 nhywyll joined #perl6
12:34 piojo9 Are compile-time restraints on return types not implemented yet? (https://docs.perl6.org/language/functions#Return_Type_Constraints)
12:40 xtreak joined #perl6
12:42 xtreak joined #perl6
12:44 dubi0us joined #perl6
12:46 audiatorix joined #perl6
12:47 gfldex piojo9: the docs are wrong, return type constraints are always runtime checks
12:47 gfldex (and I hope I didn't write that part)
12:48 audiatorix I have a question about the react/whenever structure. Let's say I'm working with IO::Socket::Async for example, and I have two whenevers inside a react block (react { whenever ... -> $connection { whenever ... { ... } } })
12:49 audiatorix will the outer whenever block until the inner processing is done?
12:49 audiatorix by block I mean wait, not as in a block of code
12:49 piojo9 @gfldex: Thanks. Would it be appropriate to submit a feature request about this? I'm new to the p6 world.
12:50 gfldex piojo9: that would be very helpful
12:50 piojo9 Obviously static checking on return types is wildly useful
12:50 piojo9 will do, as soon as I register an account. Thanks!
12:51 gfldex piojo9: Perl 6 is inherently dynamic, you can't even bet on a static type check of a constant value.
12:52 piojo9 gfldex: Yes, but some things can be guaranteed. For instance, a type check will fail statically if you use a function returning Int as a parameter where a Str is required
12:53 piojo9 p6: sub returns_str(-->Str) { return "a"; }; sub returns_int(--> Int) { return returns_str(); }
12:53 camelia rakudo-moar 30584d: ( no output )
12:53 piojo9 the compiler should know what's going on in that case.
12:54 Kyo91_ joined #perl6
12:55 piojo9 p6: sub needs_str(Str $val) { }; sub returns_int(--> Int) { return 0; }; sub tester { needs_str(returns_int()); }
12:55 camelia rakudo-moar 30584d: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Calling needs_str(Int) will never work with declared signature (Str $val)?at <tmp>:1?------> 3nt(--> Int) { return 0; }; sub tester { 7?5needs_str(returns_int()); }?»
12:55 gfldex m: class A {}; role R { method m { say 'oi?' } }; sub f(--> R){ A.new but R }; say f
12:55 camelia rakudo-moar 30584d: OUTPUT: «A+{R}.new?»
12:55 piojo9 That fails, as it should--the type checking for parameters works like you would expect, and it takes advantage of knowledge about return constraints.
12:55 gfldex piojo9: ^^^
12:57 ryu0 hm.
12:58 gfldex piojo9: the type of any value in Perl 6 is determied at runtime _by_definition_.
13:00 piojo9 gfldex: That's not how it looks from a user perspective. From a static background (with dabbling in dynamic languages), I expect gradual typing to be as static as it can be (based on the knowledge that's supplied)
13:01 piojo9 Isn't static checking the point? Otherwise, it's not much different than throwing exceptions when argument types don't match
13:01 gfldex piojo9: the documentation of the MOP is indeed incomplete
13:01 ryu0 either way, the explicit typing syntax is more convenient than doing manual runtime type checking.
13:01 piojo9 And the 20:55 example I sent does show the compiler doing a static check and failing
13:02 piojo9 I didn't call any function--it fails when they're defined (as it should)
13:02 gfldex the compiler can cheat when it comes to native types, because it's the stated user intend to be unsafe.
13:03 piojo9 Okay, I'm sure this will become clearer as I use the language more (and read more)
13:03 piojo9 thanks!
13:05 ryu0 piojo9: there's languages with very sophisticated static typing if you know where to look.
13:06 ryu0 and i'm not talking about any of the top 10 languages.
13:06 timotimo you mean like dependent types?
13:06 piojo9 Haskell?
13:06 ryu0 functional languages tend to have very advanced stuff from what i've seen.
13:06 piojo9 Pattern matching as part of the type system is pretty cool
13:06 ryu0 I was impressed by SML.
13:10 pierre_ joined #perl6
13:12 AlexDaniel m: sub returns-int(--> Numeric) { ‘a’ }; returns-int
13:12 camelia rakudo-moar 30584d: OUTPUT: «Type check failed for return value; expected Numeric but got Str ("a")?  in sub returns-int at <tmp> line 1?  in block <unit> at <tmp> line 1??»
13:12 AlexDaniel m: sub returns-int(--> Numeric) { ‘a’ }; use MONKEY-TYPING; augment class Str does Numeric { }; returns-int
13:12 camelia rakudo-moar 30584d: ( no output )
13:12 AlexDaniel m: sub returns-int(--> Numeric) { ‘a’ }; use MONKEY-TYPING; augment class Str does Numeric { }; returns-int.say
13:12 camelia rakudo-moar 30584d: OUTPUT: «a?»
13:14 AlexDaniel m: sub returns-int(--> Numeric) { ‘a’ }; use MONKEY; EVAL ‘use MONKEY; augment class Str does Numeric { };’; say returns-int
13:14 camelia rakudo-moar 30584d: OUTPUT: «a?»
13:14 ryu0 piojo9: it's a shame though. the compile time type checking should only be deferred to runtime if it can't be determined at compile time.
13:14 AlexDaniel ryu0: how can you determine it with my snippet above? ?
13:15 ryu0 which one?
13:15 AlexDaniel m: sub returns-int(--> Numeric) { ‘a’ }; use MONKEY; EVAL ‘use MONKEY; augment class Str does Numeric { };’; say returns-int
13:15 camelia rakudo-moar 30584d: OUTPUT: «a?»
13:15 AlexDaniel this for example
13:16 ryu0 Well. it should be able to perform type-checking within the function definition as well.
13:16 ryu0 all exit pathes should return a type compatible with "Numeric", but as you can see it doesn't.
13:16 piojo9 but EVAL is runtime
13:17 piojo9 I now see the problem with trying to augment perl6's static type checking--the types aren't static, as gfldex said.
13:17 ryu0 indeed it is. dynamic languages are hard to add static features to.
13:18 ryu0 because dynamic opens up a lot of possible scenarioes that don't exist when you start statically.
13:18 piojo9 It all comes down to "what do you mean by dynamic?"
13:18 piojo9 And if the types themselves are open for modification at runtime, all bets are off
13:18 piojo9 For a less permissive "dynamic", like $a can be a string, then $a can change to Int, the checking would be much easier.
13:19 eater how do I include a lib path relative to the file I'm currently in?
13:19 ryu0 eater: try using -Ilib or w/e as an argument to perl6.
13:20 eater but how do I do it from inside perl?
13:20 eater s/perl/perl6
13:20 AlexDaniel piojo9: well, we can fantasize about some strict-er mode where some things are disallowed and compile-time type checking works… but let's not hold our breath for this :)
13:20 piojo9 eater: use lib <the script's directory>;
13:21 piojo9 but I need to look up the perl6 equivalent of abs_path and __FILE__
13:21 eater piojo9: `use lib "{$?FILE.dirname}/../lib"` doesn't work :(
13:21 piojo9 you can do it with pure perl and not including a static path
13:21 eater or any type of variable there
13:21 piojo9 really? wow
13:21 eater m: use lib "{$?FILE.dirname}/../lib";
13:22 camelia rakudo-moar 30584d: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Could not evaluate arguments?at <tmp>:1?------> 3use lib "{$?FILE.dirname}/../lib"7?5;?»
13:22 eater m: say "{$?FILE.dirname}/../lib";
13:22 camelia rakudo-moar 30584d: OUTPUT: «No such method 'dirname' for invocant of type 'Str'?  in block <unit> at <tmp> line 1??»
13:22 eater well
13:22 AlexDaniel m: say "{$?FILE.IO.dirname}/../lib";
13:22 camelia rakudo-moar 30584d: OUTPUT: «/tmp/../lib?»
13:22 AlexDaniel m: use lib "{$?FILE.IO.dirname}/../lib";
13:22 camelia rakudo-moar 30584d: ( no output )
13:22 eater .-.
13:22 * eater grabs the skillet
13:23 eater I guess I need to educate myself for a bit, brb
13:23 ryu0 piojo9: so what do you think of perl6 so far? i'm looking into it mostly because i find that i end up relying on runtime type checking anyway in certain static languages so it seems to be not too different in that respect.
13:25 * timotimo waiting almost patiently for more TPCiA videos to hit the youtubes
13:25 piojo9 eater: looks like: use lib $?FILE.IO.parent.parent.add("lib");
13:25 eater piojo9: :')))
13:25 eater well that's one way
13:26 ryu0 it seems like Perl6 has a better design than most for mixing permissive and restrictive type checks.
13:26 eater but ayy, TimToady :)
13:26 piojo9 I didn't test that--I'm not casting it back to a string. It may not work...
13:26 eater piojo9: see AlexDaniel his solution
13:26 eater that also works :)
13:27 piojo9 Okay, that makes a lot more sense :)
13:27 ryu0 what does?
13:28 piojo9 AlexDaniel gave a better solution than mine
13:28 ryu0 oh.
13:28 eater piojo9: not exactly better tho
13:28 eater your solution is more verbose
13:28 piojo9 OTOH, ".." doesn't seem to work well in cygwin
13:28 eater his more implicit
13:28 * AlexDaniel blushes
13:28 piojo9 I had to use .parent to get the paths to clean up
13:28 ryu0 better is relative. if you need to include multiple files from the same directory, it might be better to add to the search path instead, assuming you can do that from the module.
13:28 piojo9 But in this case, there's no need to make the path look nice
13:29 jnthn audiatorix: No, nesting one whenever inside another doesn't imply any relationship between the two at all. A server written that way will be able to process concurrent requests.
13:30 piojo9 ryu0: Perl6 seems like a pretty huge language. I mildly don't like the ways the syntax breaks with what all the other programming languages do (like the snake string concatenation operator)
13:30 piojo9 But that stuff is minor
13:30 dubi0us joined #perl6
13:30 ryu0 uh, perl6 isn't the only language to use that convention.
13:30 ryu0 D is the same.
13:30 piojo9 oh! Sorry
13:31 piojo9 I've not used D
13:31 ryu0 they may not be mainstream but that's beside the point.
13:31 piojo9 right
13:31 dubi0us joined #perl6
13:31 piojo9 I have no problem with Perl trying to start from scratch
13:32 ryu0 D is also a complex language that likes to advertise themselves as C++ done right.
13:32 piojo9 I've heard of it--just not had an opportunity to use it
13:33 ryu0 course it's not as feature packed as Perl6 it seems like.
13:33 Alikzus joined #perl6
13:33 piojo9 ryu0: I haven't seen any language that is
13:34 ryu0 part of me feels like a language is really broken if people write tools to overcome major shortcomings :x
13:34 ryu0 JavaScript. People actually wrote a static type checker for it called flow.
13:34 piojo9 Haha. I've heard of a static type checker for python, but I didn't investigate. *shudder*
13:35 piojo9 You could say Boost was a workaround for the limitations of C++, but that mostly just got incorporated into the language :)
13:35 ryu0 wasn't that a weakness of the stdlib rather than the language though?
13:35 piojo9 C++ is an awfully big language, but I wouldn't call all of its complexity "features"
13:36 piojo9 ryu0: most of it, yeah, but the lack of lambda features, and the lack of first class functions/currying was more fundamental to the language
13:37 ryu0 C++ lacked lambda because C does.
13:37 ryu0 iirc, closest thing is C blocks extensions, but only clang supports it.
13:38 piojo9 I think C++ stopped trying to be "c with classes" some years ago...
13:38 timotimo haven't heard of blocks extensions
13:38 ryu0 https://en.wikipedia.org/wiki/Blocks_%28C_language_extension%29
13:39 ryu0 not too surprising. C is one language i've learned a lot about.
13:39 ryu0 Hardly anyone uses blocks outside of Mac OS X or so.
13:40 ryu0 but it's a way to get something resembling closure and such.
13:41 ryu0 iirc, it's mostly used an auxiliary feature to Objective-C.
13:41 mr-foobar joined #perl6
13:41 ryu0 as an*
13:41 timotimo mhm
13:42 piojo9 ryu0: I think one problem with a) being a big language, and b) having uncommon syntaxes: you need to use it all the time or you forget it.
13:43 ryu0 is that a remark about Perl6?
13:43 piojo9 That's what I'm afraid will happen. It happened to me with ruby--I just couldn't remember all the class names and method names
13:43 piojo9 and their docs aren't as good as perldoc
13:43 piojo9 ryu0: Yeah, but it's just speculation.
13:44 piojo9 Time will tell. I remembered a reasonable amount of the core ideas of perl5 after using it for a few weeks at work, then not using it again for years
13:44 piojo9 I don't think I could remember perl6 the same way.
13:45 piojo9 But it's damn useful to be able to pick up a language even if you're not fluent in it. C# and Java seem that way--they just follow the conventions you'd expect, and the compilers are pretty helpful
13:45 ryu0 i've looked for a language to supplement C and never quite found one i wanted to stick with yet.
13:46 moritz piojo9: perl 6 has some advantages over Perl 5 here, with more regular syntax
13:46 moritz don't need to remember the @a vs. $a[0] stuff, for example
13:46 piojo9 moritz: right, and you can always call functions, no matter what the context is
13:46 moritz and since you can just write signatures, you don't need to remember to get elements for @_ or by calling shift()
13:46 moritz s/elements/arguments/
13:46 piojo9 p6: sub xxx() {}();
13:46 camelia rakudo-moar 30584d: ( no output )
13:47 ryu0 but i've gotten fed up with how much work it takes to do anything in C.
13:47 piojo9 moritz: I thought s/elements/replacements/ was perfect in perl5--just like sed and vim, but a little more powerful.
13:47 ryu0 even when using libraries the pains of how careful you have to be gets old.
13:47 piojo9 I guess that says more about me than about perl
13:48 ryu0 perl6 seems promising because it's a hybrid of the unix languages i already rely on.
13:49 dubi0us joined #perl6
13:49 piojo9 ryu0: I feel the same about C++. I can do it, but it's a constant effort. I liked it when I was younger, but I wonder if I'll still tolerate it when I'm older.
13:49 ryu0 piojo9: C is worse, honestly. The language is less complex but you pay the price in greater code complexity.
13:50 piojo9 I believe that. Using void pointers instead of templates is like celibacy.
13:50 piojo9 (That's an example as seen from the outside, since I don't really know C.)
13:51 ryu0 C is like telling all the atoms how to reform themselves in the form that happens to be the result you want.
13:51 ryu0 lol
13:51 piojo9 haha
13:51 ryu0 and there's even different specialized uses for C.
13:52 ryu0 how you write userspace C is different from embedded or even kernel space C.
13:52 piojo9 Oh, I forgot about that "little detail"--I never actually understood kernel space C
13:52 ryu0 Ever write raw userspace ASM?
13:53 ryu0 A hello world takes more instructions than few lines of C. lol
13:53 piojo9 Haha, I never got good at low-level code (or even profiling based on generated assembly)
13:54 ryu0 first i had to allocate storage space for the string.
13:54 Rawriful joined #perl6
13:55 ryu0 then i had to write the instructions to make a system call for write and then exit.
13:55 ryu0 not very hard to do but it gives you a lot of perspective on how much work it is.
13:55 piojo9 in the snow, uphill both ways :)
13:56 ryu0 I imagine we'd still be using ASM if we had all agreed on a single CPU architecture.
13:56 ryu0 But that never happened.
13:57 AlexDaniel moritz: hm, or: sub foo($foo, $bar = 50) { say $foo; say $bar }; foo 42
13:57 piojo9 It seems hard to imagine people wouldn't have added more and more shortcuts to compilers, until it was considered a programming language.
13:57 ryu0 how do you think C can to be?
13:57 AlexDaniel moritz: it's still experimental even in v5.26 it seems, but maybe a worthy option anyway
13:57 ryu0 lol
13:58 piojo9 though it might have taken a lot longer before someone thought to make a language that was completely divorced from the hardware.
13:58 ryu0 it started as a portable way to describe general ASM characteristics.
13:58 andrzejku :-)
13:58 piojo9 ryu0: yeah, that's what I was taught
13:59 piojo9 But eventually, it still would have happened, even without the need for aid in portability
13:59 ryu0 course it doesn't have a standard way to check stuff like CPU flags.
13:59 piojo9 because people are lazy, in a good way.
13:59 moritz AlexDaniel: the experience with smartmatching and given/when kinda keeps me off experimental p5 features
13:59 AlexDaniel moritz: yes :(
14:00 moritz not to mention that Debian Stretch comes with 5.24, and at $work we use system perl on Debian for most stuff
14:00 moritz (and we're still struggeling with getting rid of wheezy, which comes with perl 5.14)
14:00 AlexDaniel it's available since v5.20
14:01 ryu0 wheezy? debian 7?
14:01 ryu0 wow. ancient.
14:01 AlexDaniel there is this ticket but no information in it: RT #121481
14:01 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=121481
14:02 ryu0 i imagine the introduction of systemd doesn't make upgrading easy.
14:02 AlexDaniel not even a mention of what could possibly make them non-experimental and when
14:02 Juerd I encountered 0 problems on the dozens of Debian installations that were upgraded to a version with systemd.
14:02 moritz ryu0: not really; systemd hasn't been a pain point for us
14:02 ryu0 oh.
14:02 moritz in fact, it makes writing our own services easier
14:03 Juerd They did a good job to make that process pretty smooth.
14:03 moritz the pain points come more from the fact that some of these systems have been up 12+ years, and there's not much documentation on what they actually do
14:03 moritz (upgraded from one debian version to the next, that is)
14:03 ryu0 aka the legacy systems everyone seems to have.
14:03 Juerd moritz: I have 3 of those and I'm always scared shitless to upgrade them :)
14:04 moritz and now we want to rsync them to virtual machines so that we can snapshot them
14:04 Juerd root@c4:~# ls -lh /etc/hostname
14:04 Juerd -rw-r--r-- 1 root root 3 Feb 17  2004 /etc/hostname
14:04 Juerd 2004... :)
14:04 moritz and ideally build replacements using some config management systems, and then get rid of the auld ones
14:04 Kyo91_ joined #perl6
14:05 Juerd The only things this thing still does is syslog and auth dns.
14:05 Juerd Still, upgrading it is scary. There's a lot of software on the thing, even if it doesn't run anymore.
14:05 moritz we have done this with a few of the systems, and it's always been way more work than anticipated
14:06 moritz Juerd: yes, that does sound scary
14:06 moritz and some of our stuff runs on blade centers that haven't had maintenace contracts for the last 6 years or so :-)
14:09 moritz and then there's always the issue with firewall rules; if we don't know who talks to the system, the only reliable way is to give the new system the old IP
14:09 Juerd That's also the case with this c4 thing; it's the auth dns server, so changing the IP is at least a month of work :)
14:09 xtreak joined #perl6
14:09 moritz (we have firewall hardware/appliances all over, and they are managed by another team)
14:12 masak joined #perl6
14:15 eater zoffix, does IRC::Client support SSL?
14:16 pochi joined #perl6
14:17 dubi0us joined #perl6
14:18 eater I'm afraid the answer is no :(
14:18 ryu0 eater: if it doesn't, you can use stunnel as a fallback.
14:18 ryu0 or try it i assume.
14:18 BenGoldberg joined #perl6
14:18 eater no, we'll create a MR that adds SSL support! :D
14:19 ryu0 ok, have fun. just an idea if you didn't want to implement it.
14:19 eater ryu0: thanks for the tip tho :)
14:19 ryu0 oddly, i've seen people use it to implement HTTPS in obscure HTTP servers.
14:20 ryu0 does follow unix principles though.
14:20 ryu0 socket pipelines. lol
14:21 moritz ok, time to dist-upgrade hack.p6c.org, I guess
14:22 moritz "what could possibly go wrong?"
14:22 eater :')
14:22 eater gl moritz
14:22 piojo10 joined #perl6
14:22 AlexDaniel hm, I should do that also
14:23 eater \o/ rolling releases
14:23 AlexDaniel or maybe wait for a few more years… :P
14:26 ryu0 moritz: http://assets.amuniversal.com/9a085dc06d6301301d80001dd8b71c47
14:27 Zoffix joined #perl6
14:27 Zoffix eater: no, it doesn't. When I wrote it, we didn't have IO::Socket::Async::SSL yet
14:27 eater Zoffix: cool, you'll have 1 PR soon then :)
14:28 ryu0 Zoffix: does it support SASL authentication?
14:29 Zoffix ryu0: no, it's not much more than an opened sock with a bit of processing on its data on top.
14:29 ryu0 ok.
14:32 nadim hi, do we have a tool, or an ambrio of tool, which can listen to a port and when data is received diplay it on the terminal. debuging NCurses apps kinda sucks.
14:33 konsolebox joined #perl6
14:34 Zoffix second code block on https://docs.perl6.org/type/IO::Socket::INET
14:34 nadim Zoffix++
14:35 nadim I was still looking in the modules list but simple is better
14:35 Zoffix left #perl6
14:39 kent\n joined #perl6
14:54 HTTP_____GK1wmSU joined #perl6
14:54 leah2 joined #perl6
14:56 piojo10 Nice meeting you guys. It's getting late, I've gotta go. I'll file that feature request about type checking, on the off chance that it's not impossible.
14:57 HTTP_____GK1wmSU left #perl6
15:06 zakharyas joined #perl6
15:12 Kyo91_ joined #perl6
15:13 llfourn joined #perl6
15:17 Sgeo_ joined #perl6
15:25 dubi0us joined #perl6
15:36 nadim joined #perl6
15:40 dubi0us joined #perl6
15:51 nhywyll joined #perl6
16:24 ckraniak m: use NativeCall; sub foo (Pointer $x = Pointer[void].new(0) ) { say "ok; } foo();
16:24 camelia rakudo-moar 30584d: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Unable to parse expression in double quotes; couldn't find final '"' ?at <tmp>:1?------> 3inter[void].new(0) ) { say "ok; } foo();7?5<EOL>?    expecting any of:?        argument list?      …»
16:24 dubi0us joined #perl6
16:24 ckraniak m: use NativeCall; sub foo (Pointer $x = Pointer[void].new(0) ) { say "ok"; } foo();
16:24 camelia rakudo-moar 30584d: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Strange text after block (missing semicolon or comma?)?at <tmp>:1?------> 3x = Pointer[void].new(0) ) { say "ok"; }7?5 foo();?    expecting any of:?        infix?        infix stopper?   …»
16:24 ckraniak m: use NativeCall; sub foo (Pointer $x = Pointer[void].new(0) ) { say "ok; }; foo();
16:24 camelia rakudo-moar 30584d: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Unable to parse expression in double quotes; couldn't find final '"' ?at <tmp>:1?------> 3nter[void].new(0) ) { say "ok; }; foo();7?5<EOL>?    expecting any of:?        argument list?      …»
16:25 ckraniak Hang on
16:26 sena_kun m: use NativeCall; sub foo (Pointer $x = Pointer[void].new(0) ) { say "ok"; }; foo();
16:26 camelia rakudo-moar 30584d: OUTPUT: «ok?»
16:27 ckraniak m: use NativeCall; sub foo (Pointer $x = Pointer[void].new(0) ) { say "ok"; }; foo();
16:27 camelia rakudo-moar 30584d: OUTPUT: «ok?»
16:27 ckraniak Ok now:
16:27 ckraniak m: use NativeCall; sub foo (Pointer[void] $x = Pointer[void].new(0) ) { say "ok; } foo();
16:27 camelia rakudo-moar 30584d: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Unable to parse expression in double quotes; couldn't find final '"' ?at <tmp>:1?------> 3inter[void].new(0) ) { say "ok; } foo();7?5<EOL>?    expecting any of:?        argument list?      …»
16:27 ckraniak m: use NativeCall; sub foo (Pointer[void] $x = Pointer[void].new(0) ) { say "ok"; }; foo();
16:27 camelia rakudo-moar 30584d: OUTPUT: «Type check failed in binding to parameter '$x'; expected NativeCall::Types::Pointer[NativeCall::Types::void] but got NativeCall::Types::Pointer (NativeCall::Types::Po...)?  in sub foo at <tmp> line 1?  in block <unit> at <tmp> line 1??»
16:28 ckraniak There
16:28 ckraniak Adding [void] to the type is killing ot
16:28 ckraniak *it
16:28 sena_kun hmmm.
16:30 sena_kun not sure about expected behavior. ckraniak, you probably want to fill a rakudo issue.
16:30 xinming joined #perl6
16:31 Cabanossi joined #perl6
16:32 espadrine joined #perl6
16:34 itaipu joined #perl6
16:37 andreoss joined #perl6
16:37 BenGoldberg m: use NativeCall; my constant voidP = Pointer[void]; sub foo( voidp $x = voidp.new(0) ) { say "ok" }; foo();
16:37 camelia rakudo-moar 30584d: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Invalid typename 'voidp' in parameter declaration. Did you mean 'voidP', 'void'??at <tmp>:1?------> 3nt voidP = Pointer[void]; sub foo( voidp7?5 $x = voidp.new(0) ) { say "ok" }; foo()?»
16:37 BenGoldberg m: use NativeCall; my constant voidp = Pointer[void]; sub foo( voidp $x = voidp.new(0) ) { say "ok" }; foo();
16:37 camelia rakudo-moar 30584d: OUTPUT: «Type check failed in binding to parameter '$x'; expected NativeCall::Types::Pointer[NativeCall::Types::void] but got NativeCall::Types::Pointer (NativeCall::Types::Po...)?  in sub foo at <tmp> line 1?  in block <unit> at <tmp> line 1??»
16:38 BenGoldberg m: use NativeCall; my constant voidp = Pointer[void]; sub foo( voidp $x is default(voidp.new(0)) ) { say "ok" }; foo();
16:38 camelia rakudo-moar 30584d: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Can't use unknown trait 'is default' in a parameter declaration.?at <tmp>:1?    expecting any of:?        rw?        readonly?        copy?        required?        raw?        leading_docs…»
16:40 BenGoldberg ckraniak, As a simple workaround, any undefined instance of a pointer type can be used to represent a C NULL value.
16:40 khw joined #perl6
16:41 itaipu joined #perl6
16:41 BenGoldberg m: use NativeCall; sub foo( Pointer $foo ) { say "ok" }; foo();
16:41 camelia rakudo-moar 30584d: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Calling foo() will never work with declared signature (NativeCall::Types::Pointer $foo)?at <tmp>:1?------> 3; sub foo( Pointer $foo ) { say "ok" }; 7?5foo();?»
16:41 BenGoldberg m: use NativeCall; sub foo( Pointer $foo = Pointer ) { say "ok" }; foo();
16:41 camelia rakudo-moar 30584d: OUTPUT: «ok?»
16:41 BenGoldberg m: use NativeCall; sub foo( Pointer $foo? ) { say "ok" }; foo();
16:41 camelia rakudo-moar 30584d: OUTPUT: «ok?»
16:42 ckraniak ... The question mark is what I'll try
16:42 ckraniak That makes more sense in the context I'm using this
16:43 ckraniak Although I don't think I suffer anything by using Pointer instead of Pointer[void]
16:44 ckraniak Thanks
16:48 andreoss is it possible to not inherit Any for a new class?
16:52 andreoss seems only through MOP
16:53 pharv_ joined #perl6
16:56 dubi0us joined #perl6
16:57 timotimo m: class Foo is Mu { }; say Foo.^mro
16:57 camelia rakudo-moar 30584d: OUTPUT: «((Foo) (Mu))?»
16:57 timotimo andreoss: ^
17:01 Cabanossi joined #perl6
17:01 yqt joined #perl6
17:10 dubi0us joined #perl6
17:15 dubi0us joined #perl6
17:15 cdg joined #perl6
17:16 zakharyas joined #perl6
17:17 cdg joined #perl6
17:24 dubi0us joined #perl6
17:29 Kyo91_ joined #perl6
17:31 wamba joined #perl6
17:33 dubi0us joined #perl6
17:42 skids joined #perl6
17:46 Cabanossi joined #perl6
17:47 dubi0us joined #perl6
17:47 dubi0us joined #perl6
18:15 eater hmm, is there a catch-all function for classes? like __call in php?
18:18 moritz there's FALLBACK
18:18 moritz and for direct invocation of the class, CALL-ME
18:18 dubi0us joined #perl6
18:18 eater \o/
18:18 eater thanks moritz
18:19 moritz you're welcome
18:25 Kyo91_ joined #perl6
18:27 pepe__ joined #perl6
18:30 pepe__ Hi, (for a school task) I'm looking for implementations of strings in different systems. I know in language C strings are arrays (continuous positions in memory). In haskell strings are linked lists. I'm looking for a description about perl 6 implementation, because somewhere I read that it was in trees.
18:31 pepe__ Can you confirm that? Where can i read about that implementation?
18:31 timotimo it's trees, but we try to keep them flat
18:32 timotimo you'd want to look at MoarVM/MoarVM on github, especially src/6model/reprs/MVMString.h and src/strings/stringops.c
18:32 timotimo pepe__: ^
18:32 pepe__ ok. Thats great. Thanks.
18:32 ryu0 pepe__: you're describing a rope data structure i believe.
18:33 pepe__ Yes.
18:33 timotimo the tree-ish parts we call "strands"
18:35 moritz the more interesting part is NFG
18:35 timotimo aye, that has its own .h and .c
18:35 moritz which encodes grapheme clusters as a single, synthethic codepoint
18:36 timotimo the datastructure that manages synthetic codepoints is a trie with some concurrent-access-safe mechanisms in place
18:48 moritz lockless reads, iirc
18:49 timotimo right
18:50 timotimo we have the "free at safepoint" mechanism we use in many places to ensure things don't blow up
18:50 timotimo and we'll use them in more places in the future
19:02 dubi0us joined #perl6
19:04 * moritz finds he doesn't understand the $!highwater stuff
19:08 mspo is this because my rakudo is old? Serialization Error: missing static code ref for closure 'BUILD'
19:15 b2gills pepe__: There was a talk video posted to https://www.facebook.com/theperlconference/ called “Unicode Internals of Perl 6” that may be of interest to you.
19:15 AlexDaniel m: sub foo(:color(:$colour)) { $colour + 1 }; my $s; for ^1000000 { $s += foo(:color($_)) }; say $s; say now - INIT now
19:15 camelia rakudo-moar 30584d: OUTPUT: «Unexpected named argument 'color' passed?  in sub foo at <tmp> line 1?  in block <unit> at <tmp> line 1??»
19:16 zakharyas joined #perl6
19:16 mspo also is there an 08 coming soon?
19:19 setty1 joined #perl6
19:20 dwarring joined #perl6
19:21 AlexDaniel mspo: yes
19:21 AlexDaniel soon-ish :)
19:22 pharv_ joined #perl6
19:28 mscha joined #perl6
19:29 mscha sub foo { ($^a+$^b) % 13 }; my @bar = [\[&foo]] 1..10; say @bar;
19:29 mscha m: sub foo { ($^a+$^b) % 13 }; my @bar = [\[&foo]] 1..10; say @bar;
19:29 camelia rakudo-moar 30584d: OUTPUT: «[1 3 6 10 2 8 2 10 6 3]?»
19:29 mscha Is there a way to do this without a named sub?
19:29 mscha m: my @bar = [\[&{ ($^a+$^b) % 13 }]] 1..10; say @bar;
19:29 camelia rakudo-moar 30584d: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Two terms in a row?at <tmp>:1?------> 3my @bar = [\[&{ ($^a+$^b) % 13 }]]7?5 1..10; say @bar;?    expecting any of:?        infix?        infix stopper?        postfix?        statement…»
19:29 mscha m: my @bar = [\[{ ($^a+$^b) % 13 }]] 1..10; say @bar;
19:29 camelia rakudo-moar 30584d: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Two terms in a row?at <tmp>:1?------> 3my @bar = [\[{ ($^a+$^b) % 13 }]]7?5 1..10; say @bar;?    expecting any of:?        infix?        infix stopper?        postfix?        statement …»
19:30 mscha m: my @bar = [\[sub { ($^a+$^b) % 13 }]] 1..10; say @bar;
19:30 camelia rakudo-moar 30584d: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Two terms in a row?at <tmp>:1?------> 3my @bar = [\[sub { ($^a+$^b) % 13 }]]7?5 1..10; say @bar;?    expecting any of:?        infix?        infix stopper?        postfix?        statem…»
19:31 AlexDaniel joined #perl6
19:32 b2gills m: my @bar = [\[{($^a+$^b)%13}]] 1..10; say @bar;
19:32 camelia rakudo-moar 30584d: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Two terms in a row?at <tmp>:1?------> 3my @bar = [\[{($^a+$^b)%13}]]7?5 1..10; say @bar;?    expecting any of:?        infix?        infix stopper?        postfix?        statement end…»
19:33 geekosaur joined #perl6
19:33 b2gills m: my @bar = [\[&({($^a+$^b)%13})]] 1..10; say @bar;
19:33 camelia rakudo-moar 30584d: OUTPUT: «[1 3 6 10 2 8 2 10 6 3]?»
19:33 AlexDaniel b2gills: /o\
19:33 AlexDaniel I need to configure my editor to highlight matched brackets in random colors
19:33 AlexDaniel it feels like I had this already, hmm…
19:34 b2gills There can't be any spaces and you need an & after the [ that denotes the code to use as an infix operator
19:35 cdg joined #perl6
19:36 b2gills m: my @bar = [\[&((*+*)%13)]] 1..10; say @bar;
19:36 camelia rakudo-moar 30584d: OUTPUT: «[1 3 6 10 2 8 2 10 6 3]?»
19:37 AlexDaniel why is there no :triangle named arg in reduce?
19:37 AlexDaniel like, is [\…] the only way to do it?
19:37 renormalist I know I do it every year and often it stalls again but anyway - perl6 is gettign better and better, I even wrote my first little Perl6 program this time (Rakudo*2017.07). It feels very polished, just like a normal programming language. Thank you all.
19:37 b2gills produce
19:37 renormalist me stalls again with it, that is, not perl6
19:38 AlexDaniel ah, it's produce!
19:38 AlexDaniel Okay
19:38 renormalist (in the past)
19:38 AlexDaniel m: my @bar = (1..10) .produce: (* + *) % 13; say @bar
19:38 camelia rakudo-moar 30584d: OUTPUT: «[1 3 6 10 2 8 2 10 6 3]?»
19:38 AlexDaniel b2gills++
19:38 AlexDaniel m: my @bar = 1..10 .produce: (* + *) % 13; say @bar
19:38 camelia rakudo-moar 30584d: OUTPUT: «Seq objects are not valid endpoints for Ranges?  in block <unit> at <tmp> line 1??»
19:39 * AlexDaniel squints
19:39 mscha Thanks b2gills, AlexDaniels...
19:39 moritz AlexDaniel: precedence
19:39 mscha The "no spaces in the code" is really weird...
19:40 moritz AlexDaniel: parsed 1..(10.produce: ...)
19:40 mscha But produce is probably better - less “golfy”.
19:40 AlexDaniel moritz: I see that, but how come I expected it to do something different…
19:41 moritz what is produce, btw?
19:41 AlexDaniel moritz: [\…] @a
19:41 moritz ah
19:41 AlexDaniel m: say ^10 .Str
19:41 camelia rakudo-moar 30584d: OUTPUT: «0 1 2 3 4 5 6 7 8 9?»
19:41 moritz reduce with intermediate results
19:41 AlexDaniel m: say 0..10 .Str
19:41 camelia rakudo-moar 30584d: OUTPUT: «0..10?»
19:41 AlexDaniel this is why I wrote that
19:41 mscha m: say produce({ ($^a + $^b) % 13 }, 1..10)
19:41 camelia rakudo-moar 30584d: OUTPUT: «(1 3 6 10 2 8 2 10 6 3)?»
19:42 moritz m: infix:<@>($a, $b) { ($a + $b) % 13 }; say [\@] 1..10
19:42 camelia rakudo-moar 30584d: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Variable '$a' is not declared?at <tmp>:1?------> 3infix:<@>(7?5$a, $b) { ($a + $b) % 13 }; say [\@] 1..?»
19:42 moritz m: sub infix:<@>($a, $b) { ($a + $b) % 13 }; say [\@] 1..10
19:42 camelia rakudo-moar 30584d: OUTPUT: «(1 3 6 10 2 8 2 10 6 3)?»
19:42 b2gills mscha: It can be hard to tell if ?[+] List? should be parsed as a left fold or an array literal, so there are no spaces allowed in ?[+] List?
19:43 Sgeo joined #perl6
19:43 dubi0us joined #perl6
19:46 b2gills m: my \term:<R+> = 5; say [ R+ ] # array literal
19:46 camelia rakudo-moar 30584d: OUTPUT: «[5]?»
19:46 b2gills m: my \term:<R+> = 5; say [R+] # left fold
19:46 camelia rakudo-moar 30584d: OUTPUT: «0?»
19:48 AlexDaniel renormalist: that's great to hear :) Thank you for your feedback
19:55 pepe__ b2gills: Thanks. I'm starting the video now. As I see, Perl 6 doesn't implement real ropes in strings because ropes are full trees with several levels of depth. Perl 6 implements something lighter: a list of substrings.
19:57 b2gills pepe__: Note that is an implementation detail, and is not visible within the language
19:57 pilne joined #perl6
20:01 b2gills A Str is a singular opaque object in Perl 6, that consists internally of a list of graphemes. It is opaque in that you can't use array indexing operations on a Str, instead you use methods and subroutines to access parts of it
20:01 timotimo a list of substrings where each substring is allowed to be repeated
20:03 raschipi joined #perl6
20:09 lizmat joined #perl6
20:17 dubi0us joined #perl6
20:22 cpage_ joined #perl6
20:31 Cabanossi joined #perl6
20:33 TEttinger joined #perl6
20:37 g0d355__ joined #perl6
20:38 rgrau joined #perl6
20:44 mspo AlexDaniel: okay I'll wait for it
20:44 AlexDaniel NeuralAnomaly: status
20:44 NeuralAnomaly AlexDaniel, [?] Next release will be in 5 days and 7 hours. Since last release, there are 49 new still-open tickets (2 unreviewed and 3 blockers) and 151 unreviewed commits. See http://perl6.fail/release/stats for details
20:45 AlexDaniel mspo: I mean, 5 days
20:45 mspo blah
20:45 mspo nqp never got a 07.1
20:45 mspo how about an early release for that/ :)
20:45 AlexDaniel I think we can wait for 5 days :)
20:45 AlexDaniel sorry :(
20:45 mspo np
20:46 mspo I can't do crap during the work week anyway
20:46 raschipi m: ?('aaa0001'..'zzz9999')[^91].grep('aaa0100') # Why false?
20:46 camelia rakudo-moar 30584d: OUTPUT: «WARNINGS for <tmp>:?Useless use of "?" in expression "?('aaa0001'..'zzz9999')[^91].grep('aaa0100')" in sink context (line 1)?»
20:46 raschipi m: say ?('aaa0001'..'zzz9999')[^91].grep('aaa0100') # Why false?
20:46 camelia rakudo-moar 30584d: OUTPUT: «False?»
20:48 AlexDaniel not string ranges again…
20:48 AlexDaniel but
20:48 AlexDaniel m: .say for (‘01’..‘99’)[^15]
20:48 camelia rakudo-moar 30584d: OUTPUT: «01?02?03?04?05?06?07?08?09?11?12?13?14?15?16?»
20:48 AlexDaniel 10 is missing
20:49 AlexDaniel m: .say for (‘00’..‘99’)[^15]
20:49 camelia rakudo-moar 30584d: OUTPUT: «00?01?02?03?04?05?06?07?08?09?10?11?12?13?14?»
20:49 raschipi I see that, but why? I had tested the 'aaa0000' case and I saw that it works.
20:50 raschipi m: .say for (‘06’..‘99’)[^15]
20:50 camelia rakudo-moar 30584d: OUTPUT: «06?07?08?09?16?17?18?19?26?27?28?29?36?37?38?»
20:50 AlexDaniel raschipi: it does some kind of per character increment thingy. I never really understood it, sorry :(
20:51 ugexe a string range could work so many different ways its natural that it will seemingly do what you want in some cases but not others
20:51 raschipi I see now, thanks. It wraps around to the number specified as the start of the sequence.
20:51 AlexDaniel raschipi: https://docs.perl6.org/language/traps#String_Ranges/Sequences
20:52 raschipi Thanks everybody.
21:01 Cabanossi joined #perl6
21:11 samb1 joined #perl6
21:17 dubi0us joined #perl6
21:18 itaipu joined #perl6
21:27 dubi0us joined #perl6
21:47 lisbeths` joined #perl6
21:52 konsolebox joined #perl6
21:53 imcsk8 joined #perl6
22:00 andreoss joined #perl6
22:01 Cabanossi joined #perl6
22:13 mscha joined #perl6
22:15 mscha m: say 0.1e0 + 0.2e0 == 0.3e0; say 1e-1 + 2e-1 == 3e-1
22:15 camelia rakudo-moar 50f050: OUTPUT: «False?False?»
22:15 mscha m: say 0.1e0 + 0.2e0 == 0.3e0;
22:15 camelia rakudo-moar 50f050: OUTPUT: «False?»
22:15 mscha m: say 1e-1 + 2e-1 == 3e-1
22:15 camelia rakudo-moar 50f050: OUTPUT: «True?»
22:15 mscha Huh?
22:17 jdv79 Attempt to unlock mutex by thread not holding it
22:17 jdv79 thats a new one for me
22:20 sufrostico joined #perl6
22:20 sufrosti1o joined #perl6
22:21 raschipi m: (1e-1).^name
22:21 camelia rakudo-moar 50f050: ( no output )
22:21 raschipi m: (1e-1).^name.say
22:21 camelia rakudo-moar 50f050: OUTPUT: «Num?»
22:28 dubi0us joined #perl6
22:29 raschipi joined #perl6
22:30 lizmat joined #perl6
22:31 _28_ria joined #perl6
22:33 dubi0us joined #perl6
22:46 jdv79 looks like its on a supplier.emit call
22:46 timotimo hm, supplier isn't thread-safe?!
22:47 dubi0us joined #perl6
22:47 jnthn jdv79: The only place I know that can happen is when using 6.d.PREVIEW
22:48 jnthn (Supplies need changes to work properly with it. Those haven't happened yet.)
22:49 jdv79 i am
22:49 jdv79 NO
22:49 jdv79 ok
22:49 jdv79 haha
22:49 sullivan joined #perl6
22:50 jnthn In theory, will be working on that in September. :)
22:51 dubi0us_ joined #perl6
22:52 sullivan I want to build Rakudo 2017-07 so the executables are in the standard system directories
22:52 sullivan So is it enough to give the argument "--prefix=/usr" to Configure.pl,
22:52 sullivan Or do I need also to give an arg to "--libdir=" and what should it be?
22:53 timotimo i think --prefix can very well be enough
22:53 timotimo but i've not installed rakudo into /usr or similar before
22:54 raschipi sullivan: You should look into what distros are doing, I will look for you in a minute.
22:54 jdv79 it seems like i run into a bunch of issues everytime i try to make headway with the only real app i'm trying to do in p6.  well, at least i'll be on vaca til september this time:)
22:54 timotimo no harm installing it to /opt/foobar and investigating if everything would end up looking correct
22:54 timotimo jdv79: thanks for sticking with us and pointing out problems along the way!
22:54 jdv79 i think this one is a blocker
22:55 sullivan raschipi, good idea ..
22:55 sullivan QUIT
22:55 jdv79 cause if i go back to blocking await and up to the thread count i need (maybe ~64 or so) i'll run out of mem
22:55 timotimo hmm, will we one day look back at texas operators (both in perl6 and the equivalents in other languages) and think of them the same way we think of trigraphs nowadays?
22:55 timotimo "we used to need them because you couldn't enter *those characters* on a regular keyboard"
22:55 timotimo back then it was curly braces, now it's ?
22:59 raschipi timotimo: Yes, because soon every operating system will have an on-screen keyboard to input emoji and these symbols will be available there. Therefore it will be easy to input them everywhere, even without changing keyboards.
23:00 timotimo "on-screen keyboard", "easy" ... :\
23:01 AlexDaniel timotimo: IMO for that to happen we should throw away the idea of keyboard layouts being static and unmodifiable
23:02 timotimo time for LCARS
23:04 AlexDaniel hm, now I wonder if there's a way to have the keyboard layout file located outside of standard xkb paths
23:05 AlexDaniel so that it's at least editable by non-root
23:06 AlexDaniel setxkbmap has -I option, so YES!
23:06 eponym joined #perl6
23:09 dubi0us joined #perl6
23:10 timotimo nice
23:10 timotimo i wonder, can you get code execution with a malicious xkbmap file? :)
23:15 _28_ria joined #perl6
23:17 timotimo "Supposedly there’s a JIT in the works, but it appears to have been in the works for a number of years, so I’m not holding my breath." - snrk
23:18 dubi0us joined #perl6
23:19 epony joined #perl6
23:21 sjn https://www.reddit.com/r/perl/comments/6thwqq/a_review_of_perl_6/
23:23 timotimo i wish i could point out to him that he can instead of .out-supply literally just .out.Supply
23:24 timotimo i'll post a little tweet
23:24 dubi0us joined #perl6
23:28 pierre_ joined #perl6
23:31 pierre_ joined #perl6
23:31 Cabanossi joined #perl6
23:42 dubi0us joined #perl6
23:45 dubi0us_ joined #perl6
23:47 dubi0us joined #perl6
23:54 dubi0us_ joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo