Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-03-23

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:02 Cabanossi joined #perl6
00:04 TEttinger joined #perl6
00:13 dct joined #perl6
00:14 bdmatatu joined #perl6
00:26 mcmillhj joined #perl6
00:32 Cabanossi joined #perl6
00:48 mcmillhj joined #perl6
01:09 aborazmeh joined #perl6
01:09 aborazmeh joined #perl6
01:13 mcmillhj joined #perl6
01:40 mcmillhj joined #perl6
01:52 samcv ugh how do i use captures again with .subst i never get it right. so confusing
01:53 samcv m: 'word'.subst(/(\w+)/, $0).say
01:53 camelia rakudo-moar 43e090: OUTPUT: «Use of Nil in string context␤  in block <unit> at <tmp> line 1␤␤»
02:02 mcmillhj joined #perl6
02:28 dj_goku joined #perl6
02:28 dj_goku joined #perl6
02:32 Cabanossi joined #perl6
02:32 b2gills joined #perl6
02:33 llfourn m: 'word'.subst(/(\w+)/, $[0]).say
02:33 camelia rakudo-moar 43e090: OUTPUT: «0␤»
02:33 llfourn m: 'word'.subst(/(\w+)/, $/[0]).say
02:33 camelia rakudo-moar 43e090: OUTPUT: «Use of Nil in string context␤  in block <unit> at <tmp> line 1␤␤»
02:34 llfourn m: 'word'.subst(/(\w+)/, $/).say
02:34 camelia rakudo-moar 43e090: OUTPUT: «Use of Nil in string context␤  in block <unit> at <tmp> line 1␤␤»
02:34 llfourn hmmm
02:37 llfourn m: "word".subst(/(\w+)/, { $0 } ).say # seems to work
02:37 camelia rakudo-moar 43e090: OUTPUT: «word␤»
02:40 mcmillhj joined #perl6
02:40 cibs joined #perl6
02:55 Geth ¦ whateverable: f03f0a2780 | (Aleks-Daniel Jakimenko-Aleksejev)++ | build.p6
02:55 Geth ¦ whateverable: Start from 2015.07 instead of 2015.10
02:55 Geth ¦ whateverable:
02:55 Geth ¦ whateverable: This change has been there for a long time, but it was never committed.
02:55 Geth ¦ whateverable: review: https://github.com/perl6/whateverable/commit/f03f0a2780
02:55 Geth ¦ whateverable: 9dc5935cba | (Aleks-Daniel Jakimenko-Aleksejev)++ | build.p6
02:55 Geth ¦ whateverable: Commit build.p6 as is
02:55 Geth ¦ whateverable:
02:55 Geth ¦ whateverable: For a long time this script was suffering due to various instabilities
02:55 Geth ¦ whateverable: in rakudo (see issue #24). As of today, some of the bugs were fixed,
02:55 Geth ¦ whateverable: but at the same time this script itself was wiggled into some stable
02:55 Geth ¦ whateverable: state. I am afraid to touch it.
02:55 Geth ¦ whateverable:
02:55 Geth ¦ whateverable: Therefore, committing what we have without any clean up.
02:55 Geth ¦ whateverable:
02:55 Geth ¦ whateverable: In fact, there are some issues I can see right now, but the script is
02:55 Geth ¦ whateverable: proven to work in practice… ????
02:56 Geth ¦ whateverable: review: https://github.com/perl6/whateverable/commit/9dc5935cba
03:02 Cabanossi joined #perl6
03:06 mcmillhj joined #perl6
03:10 xtreak joined #perl6
03:22 samcv thanks ilbelkyr
03:22 samcv err illfourn
03:23 TEttinger https://www.xkcd.com/1813/
03:25 vike joined #perl6
03:29 noganex joined #perl6
03:29 mcmillhj joined #perl6
03:29 samcv lol
03:31 hobbs joined #perl6
03:31 samcv i have read that new laptops aren't really much faster than older ones, i have sandybridge. do you guys think this is true. i need more speed but am thinking about maybe using another laptop i have and swapping in a quad core, if i can't get much faster speed by getting a newer 2 core laptop
03:32 Cabanossi joined #perl6
03:37 TEttinger woah, sandy bridge is rather old
03:37 TEttinger how's the GPU, if any?
03:38 samcv gpu is fine for not gaming
03:38 samcv i don't play games so that doesn't matter much
03:38 samcv but i have 16GB ram and SSD but i need more cpu speed
03:39 samcv have a 2.4GHz i5-2540M
03:39 KDr2_c joined #perl6
03:39 TEttinger ram performance has improved a lot if you have ddr2
03:39 samcv er 2.6ghz. that's prolly stock
03:40 samcv 2.6-3.3ghz
03:40 mcmillhj joined #perl6
03:40 samcv i think i have ddr3
03:40 samcv yeah i have ddr3
03:40 TEttinger there's ddr4 now and GPUs often have GDDR5
03:40 samcv well i need cpu power though :)
03:41 TEttinger yes
03:41 TEttinger I'd check notebookcheck
03:41 samcv i have a t540p and x220 (only laptop i actually use)
03:44 samcv so for 160 bucks i can buy a i7-4800MQ with 4 cores and 2.7Ghz to 3.7ghz. forget how much ram is in the other laptop. probably 8
03:44 samcv and stick it in the t540
03:44 TEttinger yours isn't bad, http://www.cpubenchmark.net/cpu_lookup.php?cpu=Intel+Core+i5-2540M+%40+2.60GHz&amp;id=812
03:44 TEttinger motherboard?
03:44 samcv what?
03:44 TEttinger new ones probably use a newer socket
03:45 TEttinger can't just update processor usually
03:46 MasterDuke ryzen is looking pretty nice...
03:46 MasterDuke so many cores
03:47 samcv these are all with 4 cores with the right sockets 46TDP or under https://ark.intel.com/Search/Advanced?s=t&amp;SocketsSupported=FCPGA946&amp;CoreCountMin=4&amp;MaxTDPMax=47
03:47 samcv got an ebay search to search for all 8 lol
03:47 samcv checking cpubenchmark.net
03:48 TEttinger hm, your i5-2540 isn't on that list, samcv
03:48 samcv that's another laptop
03:48 TEttinger ohhh
03:48 samcv point is the one i use atm has that i5 cpu
03:49 samcv other one is heavy but if it were super fast would probaby use it
03:51 mcmillhj joined #perl6
03:51 samcv and those quad core cpu's aren't on that list
03:51 samcv none of them
03:53 TEttinger mmmm
03:53 TEttinger https://www.microsoftstore.com/store/msusa/en_US/pdp/productID.333475500
03:53 samcv maybe i need to search for it
03:54 samcv ok here https://www.cpubenchmark.net/cpu_lookup.php?cpu=4800mq
03:54 samcv 8,515 vs 3,756
03:54 TEttinger quite a bit better, mostly the twice as many cores thing
03:54 samcv yeah
03:55 samcv hopefully the TDP is not too much. but it's the chipset with nvidia gpu so has more cooling so i'm hoping i'll be fine
03:55 TEttinger are you in the US or somewhere in europe or somewhere else?
03:55 samcv disable the nvidia to save heat since they're 15TDP different i think
03:55 samcv US
03:56 TEttinger ok, I also know of some sites for buying laptops in europe, since people sometimes ask for help on that
03:56 TEttinger the price range is ridiculous if you are buying something at a bad time for it
03:56 samcv because of currency?
03:57 TEttinger no, more sales
03:57 u-ou perl6 rules
03:57 u-ou i mean, hi
03:57 samcv hi
03:57 TEttinger if something's being discounted heavily due to a new processor version coming out, the last version is way better on price
03:57 samcv ah
03:57 TEttinger hey u-ou
03:58 u-ou I'm a beginner
03:58 u-ou but I know perl5
03:58 mcmillhj joined #perl6
03:59 samcv this is a good intro: https://learnxinyminutes.com/docs/perl6/ and then there's also docs.perl6.org if you know what yo uwant to look up
04:00 u-ou I started to read that one but didn't like it
04:01 u-ou I'm watching this youtube thing and reading the docs
04:01 Cabanossi joined #perl6
04:06 cibs joined #perl6
04:27 astj joined #perl6
04:30 cibs joined #perl6
04:30 jraglin joined #perl6
04:32 Cabanossi joined #perl6
04:39 u-ou how do you test if a value is of a given type?
04:39 AlexDaniel ~~
04:40 AlexDaniel m: say 42 ~~ Int
04:40 camelia rakudo-moar 43e090: OUTPUT: «True␤»
04:40 u-ou ty
04:42 u-ou is !~ the inverse of that?
04:42 AlexDaniel !~~
04:42 u-ou ty
04:43 geekosaur note there's corner cases here, because of subtyping (e.g. Bool values match Int because enums are subtypes of Int)
04:43 astj joined #perl6
04:45 Cabanossi joined #perl6
04:46 kyan joined #perl6
04:47 u-ou > say True ~~ Int
04:47 AlexDaniel m: say True ~~ Int
04:47 camelia rakudo-moar 43e090: OUTPUT: «True␤»
04:48 u-ou but I got that as False :o
04:48 u-ou it looks like I'm using a really old version.
04:49 wamba joined #perl6
04:51 samcv perl6 --version
04:51 samcv what is the output u-ou
04:51 u-ou 2015.11 lol
04:51 geekosaur that one might still have Bool as a boot-enum
04:51 samcv could be newer. how did you install it
04:51 u-ou apt
04:52 u-ou on ubuntu
04:52 geekosaur (because Bool had to exist before enums did, in the setting)
04:52 samcv buggable, deb
04:52 samcv did i do that right
04:52 geekosaur huggable, deb
04:52 huggable geekosaur, CentOS, Debian, Fedora and Ubuntu Rakudo packages: https://github.com/nxadm/rakudo-pkg/releases
04:52 samcv there we go
04:53 u-ou I will just use docker run rakduo-star :p
04:53 samcv what os do you have?
04:53 u-ou ubuntu
04:53 samcv i would just install the deb file from there after uninstalling with apt-get
04:54 u-ou alright
04:54 samcv sudo deb -i blah.deb # i think that's how
04:54 samcv err
04:54 samcv dpkg i mean
04:55 samcv dpkg -i will work right
04:55 samcv just make sure to remove the old one first
04:57 u-ou cool
04:57 u-ou thanks
05:04 AlexDaniel commit: 2015.11 say True ~~ Int
05:04 committable6 AlexDaniel, ¦2015.11: «False»
05:04 AlexDaniel heh
05:05 AlexDaniel I wonder when this happened exactly
05:05 AlexDaniel bisect: old=2015.11 say True ~~ Int
05:05 bisectable6 AlexDaniel, Bisecting by output (old=2015.11 new=43e0902) because on both starting points the exit code is 0
05:05 bisectable6 AlexDaniel, bisect log: https://gist.github.com/c01b7442ea01f5918b5d041758b32cc8
05:05 bisectable6 AlexDaniel, (2015-11-23) https://github.com/rakudo/rakudo/commit/a06069b1d7c582f62439db1360080ad77f6a71ec
05:07 mcmillhj joined #perl6
05:10 bwisti joined #perl6
05:21 Tonik joined #perl6
05:29 mcmillhj joined #perl6
05:35 xtreak joined #perl6
05:46 curan joined #perl6
05:49 mcmillhj joined #perl6
05:52 xtreak joined #perl6
05:56 Todd_ joined #perl6
05:56 parv joined #perl6
05:57 Todd_ File question:  If I open a file handle, then read the entire file, do I have to close it and reopen it to overwrite the file?  In other words, how do i set the file pointer back thh\o the biginning?
06:00 mcmillhj joined #perl6
06:01 samcv Todd_, https://docs.perl6.org/routine/seek
06:01 samcv look and you shall Seek
06:02 Todd_ Thank you Master!
06:04 Xliff_ joined #perl6
06:05 smash joined #perl6
06:08 literal_ joined #perl6
06:08 kshannon_ joined #perl6
06:09 Todd_ mumble, mumble: Undeclared routine:     seek used at line 43
06:09 samcv it's a method
06:09 Todd_ 43: seek( $LogFileHandle, 0 );
06:09 samcv so get an IO object and save it to a variable and then perform things on that handle
06:09 reveres joined #perl6
06:09 samcv $var.seek(blah blah)
06:10 Todd_ what do you mean?  I already have the handle and have been reading from the file as a test.  Now I want to overwrite the file, also as a test
06:11 Todd_ How does "$var.seek(blah blah)" set my pointer back to the beginning?  And is the beginning zero or one?
06:11 samcv 0
06:12 samcv well the offset is from the specified location
06:12 eythian_ joined #perl6
06:12 drrho_ joined #perl6
06:12 samcv $var.seek(0, SeekFromBeginning) # i think
06:13 samcv that's odd. how you specify the seeking tbh. as a SeekType type object. though i already knew our IO stuff had some oddities
06:13 cibs joined #perl6
06:15 john51 joined #perl6
06:15 Todd_ Sam: that worked.  Thank you again!
06:16 Todd_ $LogFileHandle.seek(0, SeekFromBeginning); for @Log -> $Line { $LogFileHandle.print( "$Line\n" ) };
06:16 samcv yay
06:16 Todd_ By the way, thanks to you guys, I can not use $_ in a for loop.  I MUST name the guy!
06:17 samcv yay
06:17 samcv for @whatever -> $var { } like that you mean Todd_ ?
06:18 Todd_ yes!  Makes what I am doign inside the {} far more maintainable as I knwo what $_ is suppose to be!  I adore the feature!
06:18 samcv :) so many great perl 6 features
06:21 mcmillhj joined #perl6
06:22 Todd_ Sam: I am doing a first in, last out file.  I read the file into an array, add something(s) to the end of the array, remove some stuff from the beginning or the array (maybe) and overwrite the original.  I can see two ways of doing this.  1) remove elements from the beginiing of the array and writing the whole array back to the file, or 2) using a (gulp!) C loop and start writing from an index that skips over the lines to be removed.  Y
06:23 samcv Todd_, you could just ditch the filehandle and use spurt
06:23 samcv and it'll overwrite everything instead of like writing into the file itself
06:23 samcv if i'm describing things correctly
06:24 samcv seek will seek to a position and it will write from then onward. so if the changed array is shorter than the original one by the number of bytes, it will retain some old data at the end of the file
06:24 Todd_ I want to remove lines from the top of the file and add lines to the bottom
06:24 Xliff_ joined #perl6
06:24 samcv so best to use `"Filename.txt".IO.spurt(@array.join("\n"))`
06:25 Todd_ okay, so remove N elements from the beginning of the array first.
06:25 samcv usually simpler to spurt and replace original file unless the file is big enough you want to get fancy
06:26 Todd_ right now it is six line.  The real file when I migrate it will be close to 1000 lines of text.  Mostly "date time, no errors found" type stuff
06:27 Todd_ If i spurt, do I need to seek first?
06:27 samcv nope
06:28 samcv if you use linux it's like doing `cat file > output.txt`
06:28 Todd_ Also, does shift have an option to shift N elements? or is it one at a time?
06:28 samcv yeah i think it does
06:28 Todd_ cat is a perfect example!  Thank you!
06:28 samcv should be @array.shift(4) or something
06:28 samcv if it doesn't support it i'll eat my hat
06:29 Todd_ would it be a "Red Fedora"?  Chuckle!
06:29 Todd_ trying it now!
06:29 samcv m: my @a; for ^5 { @a.push('a') }; say @a.shift(3)
06:29 camelia rakudo-moar 43e090: OUTPUT: «Too many positionals passed; expected 1 argument but got 2␤  in block <unit> at <tmp> line 1␤␤»
06:29 samcv m: my @a; for ^5 { @a.push('a') }; say @a.shift
06:29 camelia rakudo-moar 43e090: OUTPUT: «a␤»
06:30 samcv i guess i need to eat my hat now. also no it's a generic metaphorical hat :)
06:32 samcv well Todd_
06:32 samcv m: my @a; for ^5 { @a.push('a') }; say @a.shift xx 2
06:32 camelia rakudo-moar 43e090: OUTPUT: «(a a)␤»
06:32 samcv you can do this
06:32 Todd_ Ya, me too.  Too many positionals passed; expected 1 argument but got 2
06:32 samcv yeah just use xx operator
06:33 samcv will perform the command specified number of times and turn results into a Seq
06:33 mcmillhj joined #perl6
06:33 samcv m: my @a = ('a'..'z'); say @a.shift xx 5; say @a
06:33 camelia rakudo-moar 43e090: OUTPUT: «(a b c d e)␤[f g h i j k l m n o p q r s t u v w x y z]␤»
06:34 Todd_ Yippee!
06:34 Todd_ what did the xx do?
06:34 darutoko joined #perl6
06:34 samcv <samcv> will perform the command specified number of times and turn results into a Seq
06:34 Todd_ Like a loop.
06:35 samcv so shift's that many times, and the results of the shifts are a sequence of things
06:35 Todd_ please tell me on the code level, you guys are just moving the element pointer and not moving data from one element to another down the line
06:36 samcv well it removes that many elements from the start of the array
06:36 samcv and returns them
06:37 Todd_ I mean at the assembly code level.  Are you  just moving a pointer or are you actually moving data?
06:37 samcv similar to how shift will remove the 1st element in the array and return one value. xx performs the command specified times and the result is a Seq object
06:37 geekosaur Todd_, that's internals and likely depends on the underlying type
06:37 samcv oh
06:37 samcv moving data
06:37 samcv well at least the array changes things
06:37 geekosaur also, "assembly code level"? this is mostly done at nqp level currently iirc
06:37 samcv the array has elements removed
06:38 samcv and yeah what geekosaur said. it's removed from the array and if you don't use it, it'll probably be removed. if you do use it
06:38 samcv then it'll just not be in the array
06:38 samcv but be in some other object
06:39 Todd_ I really don't want to do $x[0]=$[1]; $x[1]=$x[2] and so forth.  Areyou guys telling the reference that the array starts in a differnt location?
06:39 samcv elements are removed from the start of the array
06:39 ufobat joined #perl6
06:40 samcv you are discarding them right Todd_ ? just need them removed? shift can do that. or if you assign the result of shift to a variable you can hold onto that data
06:41 Todd_ into the big bit bucket int he sky.  I don't want them.  Changing the poitner would be extremely fast.  moving 1000 lines or more of text, not so much
06:41 samcv m: my @array = 10, 20; @array[0].WHERE.say; my $var = @array.shift; $var.WHERE.say
06:41 camelia rakudo-moar 43e090: OUTPUT: «140376078134104␤140376078134104␤»
06:41 samcv in this case it is exactly the same object that gets put into `$var`
06:42 samcv Todd_, i would think shift should be pretty fast.
06:42 Todd_ cool!
06:42 mcmillhj joined #perl6
06:42 samcv m: my @array = lines; say @array.elems
06:42 camelia rakudo-moar 43e090: OUTPUT: «88␤»
06:42 samcv m: my @array = lines; @array.append(@array); say @array.elems
06:42 camelia rakudo-moar 43e090: OUTPUT: «176␤»
06:43 samcv m: my @array = lines; @array.append(@array) xx 1000; my $t1 = now; @array.shift xx 1000; say now - $t1;
06:43 samcv ok maybe shouldn't have made it so big
06:43 camelia rakudo-moar 43e090: OUTPUT: «(timeout)»
06:44 samcv m: my @array = lines; @array.append(@array) xx 10; my $t1 = now; @array.shift xx 1000; say now - $t1;
06:44 camelia rakudo-moar 43e090: OUTPUT: «0.0022920␤»
06:44 samcv m: my @array = lines; @array.append(@array) xx 100; my $t1 = now; @array.shift xx 1000; say now - $t1;
06:44 camelia rakudo-moar 43e090: OUTPUT: «(timeout)»
06:44 samcv oh yeah. cause uh. it appends each doubly long array to itself. so i'm sure it grows pretty fsat
06:45 samcv but yeah it shifted 1000 elements in 0.002 seconds Todd_  so that's pretty fast
06:45 Cabanossi joined #perl6
06:45 samcv m: my @array = lines; @array.append(@array) xx 100; say @array.elems
06:45 samcv m: my @array = lines; @array.append(@array) xx 10; say @array.elems
06:45 camelia rakudo-moar 43e090: OUTPUT: «(timeout)»
06:45 camelia rakudo-moar 43e090: OUTPUT: «90112␤»
06:46 samcv hahah. so xx 10 is 90,000 elemns, can't even imagine what xx100 is at the rate it grows
06:46 Todd_ Then on the assembly code (or p code or whater is is being called) you are just moving an pointer.  This is awesome and well though out.
06:46 Todd_ thought
06:46 samcv yeah i guess that's an alright c analogy. though it's not 100% accurate. but essentially in perl 6 terms
06:47 samcv geekosaur, why don't we have a .shift(10) ? should we?
06:48 parv samcv, would 10 be number of first n elements or an index k?
06:48 samcv it would shift the first 10 elements and return a sequence or something
06:48 geekosaur samcv, isn't that splice?
06:49 parv ok.
06:49 geekosaur shift was modeled after the shell
06:49 samcv geekosaur, well splice implies splicing some other thing in there
06:49 samcv as opposed to just removing them
06:50 geekosaur but even from the earliest perl version that had it, the some other thing could be empty
06:50 samcv m: my @array = 1,2,3,4; @array.splice(0, 2).say
06:50 camelia rakudo-moar 43e090: OUTPUT: «[1 2]␤»
06:50 samcv ok looks like man page can be updated for splice
06:51 samcv splice geekosaur ?
06:51 RabidGravy joined #perl6
06:51 geekosaur ?
06:51 samcv you mean splice in perl 5 or whatever
06:51 geekosaur yes
06:52 geekosaur (but splice predates perl 5 iirc.)
06:52 geekosaur think it came in in one of the later perl 3 patchlevels?
06:52 mcmillhj joined #perl6
06:53 samcv so that means we should not allow you to shift(Int) number of elements?
06:53 geekosaur Todd_, btw, the problem with that kind of optimization is that Perl 6 does not require that a thing that quacks like an array actually be an array. Such a pointer swizzling optimization could be provided for things backed by an actual array, but you need a fallback for when it's not.
06:54 geekosaur samcv, well, it could be allowed but you have to think about duplication of work
06:54 Todd_ and that would be why you can develope 10 times faster in Perl than in C.
06:54 samcv true geekosaur
06:54 geekosaur (also splice is generally slower than the others because it always works from a fixed position)
06:55 geekosaur er
06:55 samcv slower than shift?
06:55 geekosaur backwards that
06:55 samcv shift is slower?
06:55 geekosaur splice is slower because it can start anywhere, shift is faster because it starts at the same place always
06:55 samcv k
06:55 samcv so that means there may be a reason to allow you to shift X number of elements
06:55 geekosaur ...but that's older-perl, where you always used it on an actual array, vs. perl 6 where it might not actually be a vm array
06:56 geekosaur probably want to discuss this with lizmat
06:56 samcv kk
06:56 samcv i mean if it simply performs shift specified number of times, the normal shift will do its work right?
06:56 samcv and act accordingly
06:57 Todd_ oh bugger, I keep capitizing My and If.  mumble
06:57 samcv heh Todd_
06:57 geekosaur .oO { use Slang::Todd_ }
06:58 samcv geekosaur, you can unshift an array
06:58 geekosaur (could probably do that, starting from Slang::Tuxic or something)
06:58 Todd_ does .oO correspond to a bad word?
06:58 samcv err iugnore me
06:58 geekosaur thought bubble
06:58 samcv misread something
06:58 samcv wait nvm. you _can_ unshift an array of things onto another array
06:58 samcv so would make sense if you can shift a certain number of things off an array
06:58 domidumont joined #perl6
06:59 xtreak joined #perl6
06:59 samcv that may be a more compelling reason than my others for adding this. will talk with lizmat
07:00 geekosaur right. the questions are (a) older-perl decided not to do them because of overlap with splice; (b) while .shift(N) can be optimized when backed by an actual array, it ends up degrading to a loop when not so backed
07:00 Todd_ uh oh.  Back to my Modula2 days.  I just declared `my Int $NewNumLines;`  Bad Todd.  No soup for me!
07:01 parv thanks samcv (about your proposed shift function, regardless of that being available later)
07:01 geekosaur possibly other questions as well, depending on where this fits in types vs. roles like Positional
07:02 samcv Todd_, the capitalization thing you mean?
07:02 mcmillhj joined #perl6
07:02 samcv yeah of course geekosour
07:02 geekosaur (I suspect, the way things are currently set up, there is no good way to optimize for the array-backed case if you put it in Positional)
07:02 brrt joined #perl6
07:02 geekosaur (but that's likely a lizmat question)
07:03 rindolf joined #perl6
07:04 mst joined #perl6
07:08 Todd_ `My $var` and `If $var > 0`.  Drives me nuts
07:09 Todd_ I am capitilizing the first letter of a sentence
07:13 mcmillhj joined #perl6
07:14 Todd_ at least I am FINALLY remembering to add my semicolons at the end.
07:14 Todd_ I am going to call it a night
07:14 Todd_ Thank you guys for all the wonderful help!
07:25 nadim_ joined #perl6
07:28 samcv night Todd_
07:28 wamba joined #perl6
07:28 Todd_ :-)
07:34 Woodi hallo #prl6 :)
07:35 parv holla
07:36 Woodi samcv: if you want more CPU power I will strongly suggest desktop - laptop cpus always are weeker. aaaand on top of that shiny, paper-thin laptop with moderate cpu :)
07:36 samcv i have a desktop. i never use it though
07:37 mcmillhj joined #perl6
07:37 * parv was admiring iPad Mini w/ keyboard few hours ago. Don't tell to Woodi noone.
07:37 Woodi samcv: other option is remote work/testing. but not for business stuff, IMO.
07:38 samcv though the cpu i'm looking at is 2x the speed of the one i have now. so that is plenty good enough for my uses
07:38 Woodi samcv: even x220 is haevy, and T series is even better ;)
07:38 samcv though wish the t540p were lighter and smaller. x220 is smaller and lighter. well heavy for today i guess
07:38 samcv but t540 is like more than double the weight it feels like
07:39 Woodi that's why I proposed paper-thin laptop :)  but this excludes powerfull cpu
07:39 samcv also if networking goes out how will i work if i remote into something. i cannot have that
07:39 kurahaupo__ joined #perl6
07:40 Woodi and in last days we had first Ryzen bugs :)
07:40 samcv desktops are power inefficient as well. kind of wasteful to keep on
07:40 Woodi samcv: just GPUs are power ineficient :)
07:41 samcv need to see if the quad core that was an option on the t540p had a different heatsink/fan.
07:42 tojo joined #perl6
07:42 bjz joined #perl6
07:43 samcv Woodi, well the whole motherboard + power supply it all adds up
07:43 samcv plus cpu's not designed to be as power efficient because when you don't have a battery, minimum tdp is not as important for the motherboard and chipset as a whole
07:43 Woodi samcv: but I just planning to switch from X series back to T. or even from whole Lenove thanx to backdors... China ppls realy know how to destroy their own good product...
07:44 samcv backdoors?
07:44 Woodi smash: Intel have 65 Watt desktop cpus
07:44 Woodi fish-something...
07:44 samcv i like sushi
07:45 Woodi samcv: I'm afraid of sushi :) it's raw food...
07:45 u-ou how do I use the bot?
07:45 Woodi huggable: hug u-ou
07:45 * huggable hugs u-ou
07:45 u-ou lol ty
07:46 u-ou but how do you run perl?
07:46 u-ou 6
07:46 Woodi u-ou: there are some docs I think, will try to find
07:46 u-ou huggable: 1 + 1
07:46 huggable u-ou, nothing found
07:46 Woodi m: say 1+1
07:46 camelia rakudo-moar 43e090: OUTPUT: «2␤»
07:46 u-ou cool thanks
07:46 Woodi np :)
07:46 u-ou i like sushi too!
07:47 kurahaupo__ Woodi: sushi is to cooking as a bikini is to tayloring: there's nowhere to hide if you make a mistake, so it's generally more trustworthy than ordinary food
07:47 Woodi I like butter cream from raw eggs :)
07:47 samcv u-ou, how to run perl6?
07:47 samcv as in how to install? or like documentation or tutorials on programming
07:47 u-ou m: say 1+1
07:47 camelia rakudo-moar 43e090: OUTPUT: «2␤»
07:47 u-ou how to do that :P
07:47 Woodi kurahaupo__: I know it's safe :) just never tried becouse it's feel scary :)
07:48 samcv u-ou, you just did it!
07:50 u-ou I know
07:50 u-ou because Woodi showed me how
07:51 samcv i wasn't sure what the question was though :P
07:52 g4 joined #perl6
07:52 u-ou that's why I told you lol :p
07:53 kurahaupo__ joined #perl6
07:55 u-ou what's an idiomatic way to insert a Pair into a hash? just %h{p.key} = p.value?
07:56 mcmillhj joined #perl6
07:57 u-ou s/p/$p/g
07:59 * parv found Go to require drastic reorientation (feels low level & verbose; Java-like) than Perl 6 or Python when coming from Perl 5, shell; may try Go again when have more free time to pay attention.
08:01 brrt joined #perl6
08:06 mcmillhj joined #perl6
08:07 u-ou ahh, method push
08:16 wdna joined #perl6
08:16 u-ou pony
08:22 Woodi some story: for years I was looking on thinkpads business-grayish displays with pity... but not so long ago I got "new" 99% sRGB, wide screen with Reader Mode. I turned ON this becouse on my previous gaming monitor I used reader mode all the time (discovered it few months ago) - with this I can look on monitor without half-close eyes... some days later in the office I look on thinkpad and something started
08:22 Woodi to bother me... "Why it is so gray? ...
08:22 Woodi ... I din't turn readr mode on... Do it even have such mode?" And then I got some DING moment: It's build in! TaDa! My dear ThinkPad !
08:22 Woodi ok, maybe it's not good story...
08:24 Woodi anyway, with 430 or 440 old keyboard is gone... one more reason to drop thinkpads... is it realy so big problem to keep best keyboard in new models ???
08:26 TEttinger heh
08:26 brrt left #perl6
08:27 TEttinger yeah, the old thinkpads were supposed to be amazing, my brother had one that I think was an IBM thinkpad, dropped it from arm to concrete multiple times while walking to class, around 2008-2012 era. it still runs
08:27 TEttinger very slowly, but it still runs
08:28 timotimo my first one was a t23, it was fantastic
08:28 mcmillhj joined #perl6
08:28 timotimo i ran gentoo on it for no good reason
08:31 ChoHag joined #perl6
08:32 timotimo i'm replacing my mouse with one that can keep a drag going and usually only clicks once when i press the mouse button once!
08:33 Woodi I play CS1.6 on T41 fo years... legs on the table, laptop on legs, me on sofa :>  too bad for me that 41 was last model with some part un-soldering from heat and non-rigid base :)
08:34 * moritz just returned from a small cross-country skiing tour o/
08:35 Woodi hi back moritz :)
08:35 Woodi moritz: nice blue picture you got :)
08:35 timotimo huh, you can't cross the country on skiis!
08:35 dakkar joined #perl6
08:36 moritz depends on the country :-)
08:36 timotimo clearly there's only one The Country
08:37 moritz and it's blue?
08:37 Peter_R joined #perl6
08:38 zakharyas joined #perl6
08:40 mcmillhj joined #perl6
08:40 moritz https://perlgeek.de/images/view-beitostolen.jpg
08:41 timotimo now i get it
08:42 Wanderer68 joined #perl6
08:43 Woodi nice and blue but I wasn't talking about that - don't have spy software installed in moritz++ camera :)  I means picture with origami butterfly and blue background :)
08:44 moritz Woodi: yes, I thought so, but couldn't resist :-)
08:45 Woodi to the topic: flow based programming could be relevant to hyper/race... it even use buffers like lizmat++ prototype...
08:45 Cabanossi joined #perl6
08:50 lizmat Files=1180, Tests=55954, 192 wallclock secs (11.65 usr  4.55 sys + 1151.96 cusr 103.22 csys = 1271.38 CPU)
08:50 Woodi and as I understand Sponge approach it gets methods and seq and work on it in paraller but internally. that's one of the ways of working with data - prepare all data, define work, execute. it have adventage that it [can] know size of work. but I thinked hyper/race was more like adding paralleism to pipe, size of elements to transform is not know, you can only request more (maybe with buffering internally)
08:50 samcv can i get bisectable to run a code from a gist or something? anyone know
08:51 Woodi samcv: not me. but you have a gist ? you can try :)
08:51 samcv lol i suppose
08:51 samcv bisectable6, https://gist.github.com/samcv/0df9fcc0c119f5ada443aefbee6f24d7
08:51 bisectable6 samcv, It looks like a URL, but mime type is ‘text/html; charset=utf-8’ while I was expecting something with ‘text/plain’ or ‘perl’ in it. I can only understand raw links, sorry.
08:51 samcv bisectable6, https://gist.githubusercontent.com/samcv/0df9fcc0c119f5ada443aefbee6f24d7/raw/3837f01efecd6318c08b30d6df2884d4b86808de/concat.t
08:51 bisectable6 samcv, Successfully fetched the code from the provided URL.
08:51 Woodi yay
08:51 samcv \o/
08:52 bisectable6 samcv, Bisecting by exit signal (old=2015.12 new=43e0902). Old exit signal: 1 (SIGHUP)
08:52 TheovdH joined #perl6
08:52 samcv oh no
08:52 TEttinger ?
08:52 samcv will have to narrow the bisect i think
08:52 TEttinger 2015.12, heh
08:52 samcv as soon as it tells me when it stopped exit code 1
08:53 samcv though it is a .t file so maybe it failed 1 test? or just totally was broken. idk
08:53 samcv lemme check exit code
08:53 samcv yeah i get exit code 1 currently. so maybe it's always been this way
08:53 bisectable6 samcv, bisect log: https://gist.github.com/a293e9e03bc844d693a024afdd42fdf3
08:53 bisectable6 samcv, (2016-03-20) https://github.com/rakudo/rakudo/commit/f6c45b817aeb2b90054df11936e4ccc131744403
08:55 samcv evalable6, https://gist.githubusercontent.com/samcv/0df9fcc0c119f5ada443aefbee6f24d7/raw/3837f01efecd6318c08b30d6df2884d4b86808de/concat.t
08:55 evalable6 samcv, Successfully fetched the code from the provided URL.
08:55 evalable6 samcv, rakudo-moar 43e09022b: OUTPUT: «(exit code 1) ok 1 - ␤ok 2 - ␤ok 3 - ␤ok 4 - ␤ok 5 - ␤ok 6 - ␤ok 7 - ␤ok 8 - ␤ok 9 - ␤ok 1…»
08:55 evalable6 samcv, Full output: https://gist.github.com/f3dedf562375bb85175b9b16dbab7b72
08:55 samcv bisectable6, help https://gist.githubusercontent.com/samcv/0df9fcc0c119f5ada443aefbee6f24d7/raw/3837f01efecd6318c08b30d6df2884d4b86808de/concat.t
08:55 bisectable6 samcv, On both starting points (old=2015.12 new=43e0902) the exit code is 1 and the output is identical as well
08:55 bisectable6 samcv, Output on both points: «===SORRY!=== Error while compiling /tmp/IFjR0Uw1S0␤Confused␤at /tmp/IFjR0Uw1S0:1␤------> help https:⏏//gist.githubusercontent.com/samcv/0df9f␤    expecting any of:␤        colon pair»
08:56 samcv bisectable6, help
08:56 bisectable6 samcv, Like this: bisectable6: old=2015.12 new=HEAD exit 1 if (^∞).grep({ last })[5] // 0 == 4 # See wiki for more examples: https://github.com/perl6/whateverable/wiki/Bisectable
08:56 samcv bisectable6, old=2016.04 https://gist.githubusercontent.com/samcv/0df9fcc0c119f5ada443aefbee6f24d7/raw/3837f01efecd6318c08b30d6df2884d4b86808de/concat.t
08:56 bisectable6 samcv, Successfully fetched the code from the provided URL.
08:56 bisectable6 samcv, Bisecting by exit code (old=2016.04 new=43e0902). Old exit code: 0
08:57 samcv hopefully i was not the one who broke it
08:57 bisectable6 samcv, bisect log: https://gist.github.com/eced94a0890dd13e19a4ebc6bdb8aaf9
08:57 bisectable6 samcv, (2017-03-22) https://github.com/rakudo/rakudo/commit/027aa544e80a4163b379b2e4370795b23afc1f96
08:57 samcv heh i broke it :P
08:57 samcv hehe
08:58 wamba joined #perl6
08:59 mcmillhj joined #perl6
09:01 Woodi samcv: don't worry :)
09:04 Woodi btw. I know it's very old school to have project code "tree" like in old days in Linux but I see a lot of merges with a lot of changes... maybe it would be good to slow down a little and having branches that are parallel to head for some time, for testing purposes ?
09:17 shdb joined #perl6
09:20 cibs joined #perl6
09:21 mcmillhj joined #perl6
09:29 samcv well this is just something we don't have test coverage yet. and as long as it's not close to the end of the month
09:30 samcv change seemed sane and fine and i even added tests to support it. but today added some more tests for more exotic cases like korean text (three codepoints per visible character aka grapheme) and \r\n newlines
09:30 timotimo i really prefer short-lived branches over long-lived branches
09:30 samcv yes
09:30 aborazmeh joined #perl6
09:30 aborazmeh joined #perl6
09:31 samcv i use personal branches though
09:31 timotimo don't show anybody! :)
09:31 samcv then merge in or cherry-pick the commits into master
09:31 samcv heh timotimo
09:32 mcmillhj joined #perl6
09:32 timotimo ugh, i have only looked at moar-gdb for a minute and a half and i'm already feeling like quitting
09:35 masak don't give up!
09:35 masak you can do this! :+1:
09:35 masak (hi, #perl6)
09:35 masak (good... antenoon)
09:40 lizmat m: dd ^10 .grep({ FIRST say "first"; LAST say "last"; $_ %% 2 })  # looks like FIRST phaser not working either  :-(
09:40 camelia rakudo-moar 43e090: OUTPUT: «(0, 2, 4, 6, 8).Seq␤»
09:41 lizmat m: dd ^10 .map({ FIRST say "first"; LAST say "last"; $_ if $_ %% 2 })   # map does
09:41 camelia rakudo-moar 43e090: OUTPUT: «first␤last␤(0, 2, 4, 6, 8).Seq␤»
09:41 timotimo i now have written something in python that uses exceptions to cause a fall-back to be returned from a decorated function further up the stack
09:41 timotimo not sure if terrible or genius
09:43 lizmat sometimes I wonder whether we shouldn't disallow phasers in grep altogether
09:43 lizmat afk&
09:45 Cabanossi joined #perl6
09:46 mtsd joined #perl6
09:48 masak lizmat: huh! phasers in grep...
09:48 masak lizmat: on the *one* hand, it seems consistent with control-flow keywords working in grep...
09:48 * masak stops to think if there is a counterargument
09:50 masak lizmat: on the *other* hand, if it already works in .map, then that's at least an inconsistency, the kind we prefer to avoid ;)
09:51 masak so, I guess, either un-implement it in .map (with a sufficiently stern motivation as to why You Did Not Actually Want phasers in .map and .grep), or implement it in .grep (with a mixture of pride and fear that that even works)
09:51 masak 007 chickens out on this one, big time. it just says "no" to anything lexotic.
09:52 masak see https://github.com/masak/007/issues/145#issuecomment-232278144
09:53 TheovdH left #perl6
09:53 TheovdH joined #perl6
09:53 mr-foobar joined #perl6
09:54 mcmillhj joined #perl6
09:55 n1ce joined #perl6
09:55 Sound joined #perl6
09:57 lukaramu joined #perl6
10:07 bjz_ joined #perl6
10:07 spider-mario the release notes for rakudo 2017.03 say:
10:07 spider-mario “It includes bugfixes and optimizations on top of the 2015.12 release of Rakudo, but no new features”
10:07 spider-mario are they supposed to refer to 2015.12?
10:08 spider-mario oh, right, that was the “official ‘1.0’ release”, wasn’t it?
10:08 spider-mario (wow, already)
10:09 mtsd left #perl6
10:10 timotimo right
10:13 Woodi samcv, timotimo: I was proposing there to cherry-pick or merge head into branch with new big feature and test it fer few days, maybe a week with normal development patches. and then merge into head. but that require that testing would be done by someone or automatically, without it there is no point in one more step on the way...
10:13 aborazmeh joined #perl6
10:13 aborazmeh joined #perl6
10:13 samcv well we have a full suite of tests in roast repository
10:14 samcv but if it's not catched by that, often it can be catch by people using the dev build, then it's fixed before release and tests are added so it never breaks again
10:16 mcmillhj joined #perl6
10:17 Woodi samcv: I probably thinked that "catching" by ppls doing dev make one more temporal problem for them. but not saying everything is wrong now, no...
10:31 bjz joined #perl6
10:38 mcmillhj joined #perl6
10:54 yqt joined #perl6
10:58 samcv Woodi, turns out it wasn't me who broke it :P
10:58 samcv i merged it though. so. i guess maybe i'm to blame too. idk lol
10:58 samcv it is all okay though :) tests are now better
11:00 Cabanossi joined #perl6
11:01 mcmillhj joined #perl6
11:02 abraxxa joined #perl6
11:10 pmurias joined #perl6
11:10 pmurias hi
11:10 masak \o
11:12 mcmillhj joined #perl6
11:16 moritz o/
11:18 samcv yes
11:20 samcv ok fix is now in MVM master will get somebody to bump nqp and mvm version for rakudo since i'm going to bed
11:23 mcmillhj joined #perl6
11:25 moritz can do (I hope :-)
11:27 timotimo good night!
11:43 bjz joined #perl6
11:45 robertle joined #perl6
11:47 mcmillhj joined #perl6
11:50 cibs joined #perl6
11:50 duncan_dmg joined #perl6
11:51 wamba joined #perl6
12:00 mcmillhj joined #perl6
12:04 m44st4 left #perl6
12:14 mcmillhj joined #perl6
12:28 mcmillhj joined #perl6
12:34 gdonald joined #perl6
12:36 * [Coke] finds https://open.segment.com/fellowship (grant for open source developers)
12:42 effbiai left #perl6
12:43 faraco joined #perl6
12:47 mcmillhj joined #perl6
13:01 awwaiid joined #perl6
13:10 sufrostico joined #perl6
13:10 sufrosti1o joined #perl6
13:10 sufrosti2o joined #perl6
13:22 skids joined #perl6
13:31 cschwenz joined #perl6
13:33 cschwenz given that IO::Notification.watch-path() watches the given path (https://docs.perl6.org/type/Supply#method_IO::Notification.watch-path), how do you 1) list all of the watched paths, and 2) un-watch a path?
13:34 cibs joined #perl6
13:35 lukaramu_ joined #perl6
13:36 jnthn For 1 you'd have to track yourself; For 2, should be handled by closing the tap
13:37 cschwenz thanks jnthn :-)
13:37 jnthn (On 1, we don't have that info around to hand back, so we'd have to explicitly do so also)
13:45 Cabanossi joined #perl6
13:46 cibs joined #perl6
13:48 MilkmanDan joined #perl6
13:52 timotimo it'd be cool if there were a way to watch a path recursively ... but at least linux doesn't offer that afaik
13:54 jnthn If recursive dir is for module-space then this surely is also :)
13:57 timotimo fair enough
14:00 cschwenz left #perl6
14:10 Ven joined #perl6
14:19 sufrostico joined #perl6
14:19 ChoHag joined #perl6
14:21 pmurias why do we use 72 characters as the wrapping limit for commit messages?
14:23 Ven` git convention IIRC.
14:23 masak 80 - 4 spaces indent - 4 spaces for symmetry
14:24 [Coke] RT #131048 - this a Linenoise bug, I wonder?
14:24 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=131048
14:31 masak Ruby has a new "absent" operator: https://medium.com/rubyinside/the-new-absent-operator-in-ruby-s-regular-expressions-7c3ef6cd0b99 -- but I struggle to understand what I would use it for
14:36 tokomer joined #perl6
14:36 [Coke] the main example seems to be "does not contain", but that seems better done for literals with a ! .contains
14:42 pmurias the example that matches /* */ style comments is the one that makes sense in the blog post
14:43 Ven` masak: it removes the need for some lookaheads
14:43 Ven` negative* lookaheads
14:46 nhywyll joined #perl6
14:56 pmurias Ven`: is it really useful for anything other than matching something ending with a multi character delimiter?
15:03 cdg joined #perl6
15:04 Ven` pmurias: it's useful when you want to make sure e.g. a delimiter is not present
15:04 Ven` <<I want \d+ \d+ with something inbetween that isn't "ven">>
15:04 cibs joined #perl6
15:07 wamba joined #perl6
15:08 pmurias Ven`: how do you combine the absent operator with \d+?
15:08 Ven` \d+(?~ven)\d+
15:13 b2gills m: say '123 ven 32' ~~ /(\d+) (.*) <!{ $1.contains('ven') }> (\d+) /
15:13 camelia rakudo-moar a123eb: OUTPUT: «「123」␤ 0 => 「12」␤ 1 => 「」␤ 2 => 「3」␤»
15:14 b2gills It would take more work to get the same semantics as (?~ )
15:15 Ven` ^ that's very very ugly and probably doesn't have very good performance due to backtracking (?)
15:18 b2gills m: #`(There is space available) say '123 ven 32' ~~ /(\d+) <- 'ven'> (\d+) /
15:18 camelia rakudo-moar a123eb: OUTPUT: «5===SORRY!5===␤Unrecognized regex metacharacter < (must be quoted to match literally)␤at <tmp>:1␤------> 3available) say '123 ven 32' ~~ /(\d+) <-7⏏5 'ven'> (\d+) /␤Unable to parse regex; couldn't find final '/'␤at <tmp>:1␤------> …»
15:34 cdg_ joined #perl6
15:52 perlpilot The implied * in (?~absent) bothers me for some reason.
15:58 Wcool joined #perl6
15:58 Wcool hi
15:58 faraco hi
15:59 Wcool Does anyone know how to assign STDOUT or STDIN to a (file) variable?
15:59 Wcool like perl5:    my $fh_out = *STDOUT;
16:00 jnthn The handle is in the $*OUT varialbe
16:00 jnthn (And $*ERR and $*IN)
16:00 jnthn So my $fh_out = $*OUT
16:00 Wcool great, cheers
16:00 Cabanossi joined #perl6
16:01 faraco question, is this a good practice just for STDOUT? perl6 -e 'my $message = q:x/ls -a/; say $message'
16:02 faraco I mean, TIMTOWTDI right?
16:02 tokomer joined #perl6
16:04 gfldex faraco: &say will be a bad idea in many cases
16:10 jraglin joined #perl6
16:10 faraco can I see an example, if you don't mind.
16:12 nhywyll joined #perl6
16:14 mcmillhj joined #perl6
16:16 lucs Holy cow! JH Conway will be in Montreal to give a conference in a couple of weeks.
16:16 * lucs won't miss it
16:17 * DrForr loos at his Math::Game module :)
16:23 * [Coke] uses perl 6 to safely truncate a utf8 string to fit into a 4000 byte varchar without having to worry about cutting a character into pieces.
16:25 * DrForr senses mySQL.
16:27 mcmillhj joined #perl6
16:29 mst as if a million developers cried out, and were suddenly silently trunca
16:33 mcmillhj joined #perl6
16:33 [Coke] DrForr: Oracle
16:34 [Coke] I was truncating to 4000 chars at first, but that failed because it's 4000 bytes.
16:34 DrForr mst++
16:44 araujo joined #perl6
16:50 mcmillhj joined #perl6
16:55 thowe_work joined #perl6
17:00 Cabanossi joined #perl6
17:02 mcmillhj joined #perl6
17:10 gfldex faraco: say will truncate lists at 100 elements or output whatever an overloaded .gist returns on the object you call say with
17:13 xzhao joined #perl6
17:15 xzhao joined #perl6
17:15 kurahaupo__ joined #perl6
17:16 m44st4 joined #perl6
17:17 m44st4 Hi ! I'm currently trying to use socket in perl6, but i'm in front of a problem: when i use $socket.recv, i only receive the first 12 chars, i have to $socket.recv again to receive the rest. Does anyone have an idea about that?
17:25 [Coke] m44st4: are you passing any args to the .recv call?
17:25 m44st4 i tried without and with a length
17:25 m44st4 but it looks like it stopped receive after the first whitespace
17:26 geekosaur if it's non-blocking, as libuv's sockets almost certainly are, all bets are off as to how many reads / how much data
17:26 geekosaur if you were trying to rely on read lengths, on a stream socket, you are doing it wrong
17:28 m44st4 i don't understand what you mean
17:28 m44st4 i thouth recv just receive data until \n
17:28 geekosaur I would expect it to mimic the C recv() call
17:29 geekosaur which just does binary data, it cares not about newlines
17:29 m44st4 hmm ok
17:30 m44st4 but i did not understand the reason why it stop receive
17:31 rindolf joined #perl6
17:32 geekosaur because there is no guarantee that (a) the sending kernel (b) the receiving kernel (c) any network equipment between them will retain any notion of how it was sent
17:32 geekosaur if you write out a line all at once in the sender, it's entirely possible for each character to be received in its own packet and potentially a separate recv() call needed for each.
17:33 m44st4 ok! that's clear :)
17:33 m44st4 thanks
17:33 geekosaur if you need packets to be retained as packets, use UDP. (but I don't think libuv supports UDP sockets yet, so rakudo doesn')
17:33 geekosaur you might also just want to use normal handle-based I/O and .lines
17:37 duncan_dmg left #perl6
17:41 raschipi joined #perl6
17:42 jnthn There is basic UDP support in IO::Socket::Async, fwiw :)
17:42 jnthn (And libuv does support UDP)
17:43 geekosaur heh
17:43 * mst takes a moment to bemoan the absence of unix sockets
17:44 geekosaur also, while it's possible for that case I mentioned to happen, I'd probably be taking a close look at the network equipment if it actually did that
17:45 Cabanossi joined #perl6
17:45 geekosaur (that doesn't mean yours indicates a problem; lots of stuff can happen. 12 octets + header makes a bit more sense for a packet than 1 octet + header)
17:49 andrzejku joined #perl6
17:50 zenon joined #perl6
17:51 zenon p6: say "生"~&"死";
17:51 camelia rakudo-moar a123eb: OUTPUT: «愛␤»
17:59 cpage joined #perl6
18:01 sufrostico joined #perl6
18:02 n1ce joined #perl6
18:09 faraco p6: say "生"~&"死".ords
18:09 camelia rakudo-moar a123eb: OUTPUT: «␤»
18:18 mcmillhj joined #perl6
18:23 gdonald left #perl6
18:24 mcmillhj joined #perl6
18:24 AlexDaniel joined #perl6
18:24 cibs joined #perl6
18:27 Geth ¦ doc: 787882b6ab | (Zoffix Znet)++ | doc/Language/5to6-perlfunc.pod6
18:27 Geth ¦ doc: Update `pipe` info
18:27 Geth ¦ doc:
18:27 Geth ¦ doc: IO::Pipe does not offer what Perl 5's `pipe` routine does.
18:27 Geth ¦ doc: review: https://github.com/perl6/doc/commit/787882b6ab
18:30 Geth ¦ doc: 61ef0f6a4e | (Zoffix Znet)++ | doc/Language/5to6-perlfunc.pod6
18:30 Geth ¦ doc: s/suttle/shuttle
18:30 Geth ¦ doc: review: https://github.com/perl6/doc/commit/61ef0f6a4e
18:33 domidumont joined #perl6
18:33 Sound joined #perl6
18:35 samcv can somebody tell me why i get this error? https://gist.github.com/samcv/0df9fcc0c119f5ada443aefbee6f24d7
18:35 samcv Variable '@ords' is not declared. line 29
18:36 samcv but it is declared.
18:37 geekosaur in perl 5 it'd often mean a missing semicolon before it
18:38 eroux joined #perl6
18:39 samcv maybe you can dl and tell me what's going on. it's happened other times, and i've done really weird things to make it go away like restructuring all the code
18:39 samcv this could be different than that, i really have no clue why
18:41 geekosaur oh
18:41 geekosaur line 23
18:41 geekosaur you're missing the replacement part from the S:g
18:41 geekosaur (boy is that a lousy error to report for that)
18:45 Cabanossi joined #perl6
18:47 andrzejku hi:)
18:48 andrzejku I find a leak in Perl6 probably documentation leak
18:52 Tonik joined #perl6
18:55 cibs joined #perl6
19:01 cibs joined #perl6
19:06 Geth ¦ doc: 69d32dab7a | (Zoffix Znet)++ | doc/Type/IO/Handle.pod6
19:06 Geth ¦ doc: [io grant] Remove IO::Handle.z
19:06 Geth ¦ doc:
19:06 Geth ¦ doc: IO::Handle never had this method.
19:06 Geth ¦ doc: review: https://github.com/perl6/doc/commit/69d32dab7a
19:06 samcv thanks Geth
19:06 samcv geekosaur,
19:08 FROGGS joined #perl6
19:17 TEttinger joined #perl6
19:18 Geth ¦ doc: d02ae7d5b2 | (Zoffix Znet)++ | doc/Type/IO/Handle.pod6
19:18 Geth ¦ doc: [io grant] Remove IO::Handle.rw and .rwx
19:18 Geth ¦ doc:
19:18 Geth ¦ doc: IO::Handle never had these methods
19:18 Geth ¦ doc: review: https://github.com/perl6/doc/commit/d02ae7d5b2
19:21 samcv ty much geekosaur
19:22 geekosaur andrzejku, details?
19:23 andrzejku geekosaur I need a secret document how to smuggle Perl6 in your company
19:23 andrzejku I think many people just don't know how to
19:24 geekosaur generally you just start writing stuff in it, preferably to show coworkers how you'd easily solve some problem that's harder or requires more work in other languages
19:24 andrzejku geekosaur personally I know one way which I practice with Perl that was "write Perl script" every time when you need write somekind of script and commit it silenty
19:24 andrzejku I commit this way some good scripts before my coworker see it
19:24 geekosaur I don't like that way because it gets you in trouble when someone else has to change it and has no idea what is going on
19:25 geekosaur you really need to *sell* it, not try to sneak it in; you're just antagonizing your coworkers otherwise
19:25 timotimo oh samcv is already back :)
19:25 samcv :O
19:25 samcv yes
19:26 andrzejku geekosaur ye but right now I am the worst case, my coworkers doesn't like perl they don't know perl6 and there no official perl6 compiler on production servers
19:26 geekosaur [Coke]'s example is a good one, most common languages will have problems of one kind or another with truncating by whole Unicode characters instead of by bytes
19:26 geekosaur (assuming utf8 representation)
19:26 andrzejku geekosaur I think working underground is the best thing
19:27 andrzejku commit perl everywhere you can
19:27 andrzejku before your manager admit
19:27 geekosaur until someone gets back at you by committing idris code and making you maintain it :)
19:27 andrzejku or even more agressive way, rewrite existing scripts for refactoring or fixing bugs and commit perl
19:27 geekosaur or cobol
19:28 andrzejku that's no problem I can maintain perl it is even better
19:28 andrzejku the problems become when people ask this "Can I write this in Perl?"
19:28 andrzejku and the people say: "NO"
19:29 andrzejku so I think working underground is the best thing which we can do for Perl
19:29 andrzejku become Perl6 partisanen
19:29 jdmmmmm joined #perl6
19:31 [Coke] I think if you do that "underground", you're going to end up alienating more people against perl.
19:33 [Coke] Using any perl here, I end up using it for things have a high time pressure on me, and usually an implicit one-use. if I need to use it for something longer laster, I make sure I get buyin on the technology side that I'm going to use a language that no one else here is necessarily an expert on because of the time issue. If you want longer term adoption, you're going to need buyin. if not, they'll just be cur
19:33 [Coke] sing your name as they rip our your code.
19:34 geekosaur that exactly, yes
19:34 geekosaur that's why I said you should be selling it, not sneaking it
19:35 geekosaur *show* how you can do something more easily in perl 6. otherwise you annoy everyone else and potentially get fired for not being a team player or something
19:37 andrzejku geekosaur are you from USA?
19:37 geekosaur yes
19:37 andrzejku geekosaur so you don't know how IT look in my country
19:37 geekosaur but you can get in trouble by annoying coworkers regardless of country
19:37 lichtkind joined #perl6
19:37 geekosaur maybe not get fired for it, but still, people will find ways to get back
19:37 [Coke] Yup. do what you will, we're just giving you our advice.
19:38 andrzejku in my country IT is pretty different
19:38 andrzejku we earn shit here
19:38 andrzejku we do all things for USA/Germany etc. etc.
19:38 andrzejku so the people in projects change very quickly
19:39 andrzejku and the most companies here is like that
19:39 andrzejku we just do cheap it work for you
19:39 andrzejku so perl6 here didn't exist and it is hard to talk with someone about it
19:39 [Coke] perl6 doesn't exist anywhere. :)
19:40 [Coke] we're not that different in that regard, at least.
19:40 lichtkind in my mind it exists :)
19:40 andrzejku many US companies come here because they want to rewrite Perl into another language fast and cheap
19:40 andrzejku so it is pretty different situation
19:41 andrzejku and more difficult though
19:43 andrzejku the rich US programmers will never understand poor programmers
19:59 samcv andrzejku, what country?
20:00 Cabanossi joined #perl6
20:01 andrzejku samcv Poland
20:02 samcv andrzejku, on the internet we are all equals :)
20:02 andrzejku we pretend to be equal
20:03 lizmat .oO( eating our own dogfood if we're lucky )
20:06 cdg joined #perl6
20:07 andrzejku I think if the one country will go into it independent way
20:07 andrzejku then I am pretty sure the Perl Golden Era will come
20:13 atweiden-air joined #perl6
20:13 mst geekosaur: I would love an excuse to work on idris for money
20:14 labster joined #perl6
20:14 geekosaur you would, I probably would, most other folks likely to give it the side-eye :)
20:14 atweiden-air the method `make` docs say: "Sets the AST to $ast, and returns it."
20:15 atweiden-air can/should a grammar-actions method like `method abc($/) { make ~$/ }` be `is pure`?
20:15 lichtkind hai lizmat (h)
20:15 lizmat lichtkind o/
20:15 lichtkind andrzejku: what exactly ou think rich programmer dont understand?
20:15 atweiden-air jw for code optimization's sake
20:15 lichtkind :)
20:16 timotimo i dont think we will ever optimize "is pure" methods
20:16 timotimo znless they are private methods
20:17 timotimo but the only thing "is pure" currently will do is execute the function at compile time and substitute its result in place of the call
20:17 timotimo so make is definitely not something that would wotk with that in general
20:18 atweiden-air timotimo: right, ok
20:18 atweiden-air about use of `make` in grammar-actions method... is it mutating the AST behind the scenes, or are the methods like `method abc($/) {...}` pure functions?
20:20 timotimo yiu mutate the ast attribute on the match obj passed in via $/
20:20 bjz joined #perl6
20:20 pecastro joined #perl6
20:20 timotimo i.e. make 1 is the same as $/.make: 1
20:21 timotimo which behaves as if it were $/.ast = 1
20:21 atweiden-air so what should be the return type of a method that ends with a `make`?
20:22 atweiden-air i've experimented and it appears to be returning a container
20:22 timotimo shrug :)
20:22 RabidGravy anyone know enough abiout SSL to see if there is something *funny* about https://httpbin.org/ ?
20:22 timotimo put --> Nil in the sig
20:22 timotimo that makes it easy :D
20:23 timotimo also better performance, though the overhead of the grammar engine is immense
20:23 atweiden-air timotimo: http://ix.io/pd2
20:24 timotimo "returns" is going to go awqy
20:24 timotimo away
20:24 timotimo please use -->
20:24 espadrine joined #perl6
20:25 atweiden-air with --> the return type does not make any difference
20:25 atweiden-air timotimo: why retire `returns`?
20:25 RabidGravy I do hope someone is going to send me 65 pull requests or there will be a lot of broken
20:26 timotimo heh.
20:26 timotimo i can have a try
20:27 timotimo you can ask TT why. i dont remember the exact reason except parsing makes it a bad thing
20:29 setty1 joined #perl6
20:29 timotimo like with "returns $foo or so?
20:29 timotimo ill drive home now
20:30 timotimo so no irc for a bit
20:32 cibs joined #perl6
20:38 RabidGravy ah openssl s_client -connect httpbin.org:443
20:38 RabidGravy CONNECTED(00000003)
20:38 RabidGravy 139647781410680:error:14077438:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error:s23_clnt.c:769:
20:43 gfldex is zef creating the wrappers in /share/perl6/site/bin/ ?
20:45 Cabanossi joined #perl6
20:50 AlexDaniel joined #perl6
20:53 lichtkind_ joined #perl6
21:05 araujo joined #perl6
21:12 AlexDaniel committable6: why are you still here?
21:12 committable6 AlexDaniel, ¦why: «Cannot find this revision (did you mean “all”?)»
21:15 sufrostico joined #perl6
21:15 Cabanossi joined #perl6
21:24 n1ce_ joined #perl6
21:26 cibs joined #perl6
21:37 rburkholder joined #perl6
21:45 Cabanossi joined #perl6
21:48 cibs joined #perl6
21:51 eroux joined #perl6
21:54 gfldex lolibloggedalittle: https://gfldex.wordpress.com/2017/03/23/for-your-convenience/
22:03 jferrero m: my Str enum Mass (uno => "3", dos => "2"); say dos.value
22:03 camelia rakudo-moar a01d67: OUTPUT: «2␤»
22:04 jferrero m: Str enum Mass (uno => "3", dos => "2"); say dos.value
22:04 camelia rakudo-moar a01d67: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3Str7⏏5 enum Mass (uno => "3", dos => "2"); say␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        statement m…»
22:06 gfldex jferrero: the type of an enum value is infered from the first value of the first pair
22:07 cibs joined #perl6
22:07 jferrero m: use NativeCall; enum Mass (uno => int32(1), dos => 2); say dos.value
22:07 camelia rakudo-moar a01d67: OUTPUT: «===SORRY!===␤Cannot invoke this object (REPR: P6int; int32)␤»
22:08 jferrero thanks, gfldex
22:10 jferrero gfldex: I need to defined int32 NativeCall type for enum constants. Is possible?
22:11 mcmillhj joined #perl6
22:13 gfldex I have very little knowledge about NativeCall
22:14 gfldex jferrero: if I would want to change that I would go and read other ppls code
22:15 Cabanossi joined #perl6
22:16 jferrero From enum docs: "As value types Numerical and Str are supported." So... not.
22:17 AlexDaniel jferrero: well, it does not mention natives :)
22:19 mcmillhj joined #perl6
22:20 geekosaur iirc it is intended that that will change someday but currently it's not possible to handle anything else?
22:25 pytuger joined #perl6
22:27 n1ce joined #perl6
22:31 n1ce_ joined #perl6
22:32 benchable6 joined #perl6
22:32 committable6 joined #perl6
22:32 evalable6 joined #perl6
22:32 bisectable6 joined #perl6
22:32 unicodable6 joined #perl6
22:32 statisfiable6 joined #perl6
22:36 committable6 joined #perl6
22:36 bisectable6 joined #perl6
22:36 benchable6 joined #perl6
22:36 unicodable6 joined #perl6
22:36 evalable6 joined #perl6
22:36 statisfiable6 joined #perl6
22:36 Geth ¦ routine-map: 21daef5c27 | (Zoffix Znet)++ | 2 files
22:36 Geth ¦ routine-map: Fix incorrect report of `.file`
22:36 Geth ¦ routine-map:
22:36 Geth ¦ routine-map: ... for routines whose proto is not in the same file as the routine
22:36 Geth ¦ routine-map: itself.
22:36 Geth ¦ routine-map: review: https://github.com/perl6/routine-map/commit/21daef5c27
22:36 timotimo good catch
22:37 Geth ¦ routine-map: 98c45fba9c | (Zoffix Znet)++ | 2 files
22:37 Geth ¦ routine-map: Include compiler name and version on HTML page
22:37 Geth ¦ routine-map: review: https://github.com/perl6/routine-map/commit/98c45fba9c
22:37 bloatable6 joined #perl6
22:47 Voldenet joined #perl6
22:47 Voldenet joined #perl6
22:49 pytuger joined #perl6
22:50 BenGoldberg joined #perl6
22:51 pytuger joined #perl6
22:56 Sound joined #perl6
23:08 pytuger joined #perl6
23:08 pytuger joined #perl6
23:14 skids joined #perl6
23:24 llfourn joined #perl6
23:28 TheovdH left #perl6
23:33 cibs joined #perl6
23:40 cibs joined #perl6
23:43 rindolf joined #perl6
23:50 pytuger joined #perl6
23:58 adu joined #perl6

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

Perl 6 | Reference Documentation | Rakudo