Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-04-26

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:03 geekosaur J has [ and ]
00:03 geekosaur (everything is an operator in J, and that's how you anonymously get left and right parameters)
00:05 geekosaur I have a vague recollection of some ancient language having that (ignoring even more ancient languages with arg(N)-type things)
00:06 dalek perl6.org: 3d5eea8 | (Steve Mynott)++ | source/ (2 files):
00:06 dalek perl6.org: Rakudo Star 2014.01 to .04
00:06 dalek perl6.org: review: https://github.com/perl6/perl6.org/commit/3d5eea8378
00:08 dalek star: 6fe68c5 | (Steve Mynott)++ | tools/star/release-guide.pod:
00:08 dalek star: mention perl6.org as announce vector
00:08 dalek star: review: https://github.com/rakudo/star/commit/6fe68c52c6
00:14 tardisx joined #perl6
00:16 AlexDaniel m: say ‘moo=meow ping=pong’.comb(/(\w+) ‘=’ (\w+)/, :match)».Slip».Str
00:16 camelia rakudo-moar f05c77: OUTPUT«(moo meow ping pong)␤»
00:16 AlexDaniel m: say ~«|«‘moo=meow ping=pong’.comb(/(\w+) ‘=’ (\w+)/, :match)
00:16 camelia rakudo-moar f05c77: OUTPUT«(moo meow ping pong)␤»
00:17 gtodd m:  sub stuff { loop (my $i = 0 ; $i++ < 5 ;) { $i } }  ;  say "sub == seq" if (stuff() == 1 .. 5 ) ;
00:17 camelia rakudo-moar f05c77: OUTPUT«sub == seq␤»
00:18 timotimo that's comparing the number of elemetns, btw
00:19 gtodd rats ... how to make an anonymous function do what I want  - with a better more correct example :-)
00:19 AlexDaniel gtodd: what do you want? :)
00:19 gtodd was only concerned about the anonymous bit really
00:19 timotimo i didn't see any anonymous stuff in there
00:19 AlexDaniel gtodd: “anon sub”?
00:20 gtodd I have a function that returns sequences of numbers so I guess assign it to a scalar and then check if the sequence is the same as well 1 .. 5 or whatever
00:21 pierrot joined #perl6
00:21 gtodd anonymous subroutine
00:21 * timotimo goes to bed
00:21 gtodd some of them were short so I was just sort of doing perl5 style ...
00:22 perlawhirl joined #perl6
00:22 gtodd I will do it in a more explicit and correct way :)
00:23 AlexDaniel gtodd: I don't really get it. If you want to compare lists then try eqv?
00:23 timotimo watch out, eqv will likely give False if you compare between Seq, Array, or List
00:23 AlexDaniel timotimo: any other options?
00:24 timotimo ~~
00:25 AlexDaniel and that will give True for a bunch of weird stuff
00:27 timotimo >>==<<
00:27 timotimo that will throw if the lengths don't fit, though
00:27 AlexDaniel does not work when lists are not equal
00:27 timotimo instead of just giving False
00:27 AlexDaniel yea
00:27 AlexDaniel equal in size*
00:28 timotimo @a == @b && [&&] @a Z== @b
00:28 AlexDaniel Yeah, that… That's gonna work
00:28 AlexDaniel timotimo: in RT #127980 I said that we probably need another metaop for comparing listy stuff
00:28 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=127980
00:29 timotimo mhm
00:29 AlexDaniel my suggestion is: @a M== @b # which would be equivalent to your code above
00:29 timotimo anyway, bedtime :)
00:30 AlexDaniel psch: ↑ maybe that will make it more clear :)
00:31 perlawhirl Alex: what would the M op do that is different from a set operator ?
00:31 gtodd I assigned the subroutine to a scalar and then  $seq() >>==<< <1 2 3 4 5> ;   worked ok and gave: (True True True True True)
00:32 AlexDaniel ah yea, one more difference would be that M should return one Bool…
00:32 AlexDaniel perlawhirl: which one exactly?
00:34 perlawhirl are you just wanting to check if the first list contains a subset of the second?
00:34 perlawhirl like ⊆
00:35 gtodd it is what I expected but it was more how to use anonymous sub that was bugging me :-)
00:35 AlexDaniel perlawhirl: no, the question is how check if both are equal
00:35 gtodd m:  { loop (my $i = 0 ; $i++ < 5 ;) { $i } }() >>==<< 1 .. 5 ;
00:35 camelia rakudo-moar f05c77: ( no output )
00:35 AlexDaniel perlawhirl: same size, same elements
00:36 gtodd m: say { loop (my $i = 0 ; $i++ < 5 ;) { $i } }() >>==<< 1 .. 5 ;
00:36 camelia rakudo-moar f05c77: OUTPUT«(True True True True True)␤»
00:36 gtodd hehehe
00:36 gtodd sorry for the distraction
00:36 AlexDaniel perlawhirl: I mean, that's the problem that I'm trying to solve with M :)
00:37 perlawhirl Alex: So it would allow elements in  a different order too?
00:37 AlexDaniel no
00:38 perlawhirl so why not @a eq @b ?
00:38 perlawhirl tho i guess that's not entireley accurate is it
00:38 AlexDaniel perlawhirl: eq is string equality
00:38 perlawhirl yeh
00:38 AlexDaniel so it's not even close…
00:40 perlawhirl what does @a ~~ @b do?
00:40 AlexDaniel magic
00:40 perlawhirl hah
00:40 AlexDaniel well, it seems like it does ~~ between elements
00:42 geekosaur Positional  List      lists are comparable    $_ »~~« X (but dwims ** wildcards!)
00:42 Juerd AlexDaniel: Yes. Note that [0,1,2] ~~ [True,True,True] is true.
00:42 Juerd So you can't just use @a ~~ @b to test equality.
00:42 AlexDaniel Juerd: awesome! Best comparison I could have ever imagined
00:42 Juerd Unless of course you are absolutely certain that everything is a number, for example.
00:43 AlexDaniel let's be honest here: ~~ is shit for comparing lists
00:44 dalek doc: 3cfe629 | (Tom Browder)++ | doc/Language/unicode_texas.pod:
00:44 dalek doc: column is too wide--remove some spaces to see if that helps
00:44 dalek doc: review: https://github.com/perl6/doc/commit/3cfe629d66
00:44 dalek doc: c7d583d | (Tom Browder)++ | doc/Language/unicode_texas.pod:
00:44 dalek doc: Merge pull request #464 from tbrowder/master
00:44 dalek doc:
00:44 dalek doc: column is too wide--remove some spaces to see if that helps
00:44 dalek doc: review: https://github.com/perl6/doc/commit/c7d583d52f
00:45 Juerd Comparing lists sucks in every language I've ever seen. Fortunately, comparing lists isn't something you regularly do in well written code.
00:45 perlawhirl hmmm... how about ?all( @a Zeqv @b )
00:46 AlexDaniel perlawhirl: does not work if your lists have different length
00:46 AlexDaniel or arrays
00:46 AlexDaniel whatever
00:46 perlawhirl right
00:46 Juerd It's mostly useful in tests (is_deeply), but apart from that it doesn't have many use cases. Wanting to compare lists is often a code smell.
00:46 perlawhirl i see
00:46 Juerd s/code/design/
00:47 AlexDaniel so the shortest code to do that is
00:47 AlexDaniel m: my @a = 0,1,2; my @b = True, True, True; say ?all(@a == @b [&&] @a Z== @b)
00:47 camelia rakudo-moar f05c77: OUTPUT«False␤»
00:48 Juerd gtodd: *Why* compare lists?
00:49 MadcapJakeDinner stmuk_++ # R*
00:49 AlexDaniel Juerd: that's a good question actually
00:50 Juerd If you're generating a list and then find out that it happens to be the same as a list you had earlier, then couldn't you have skipped generating the list at some earlier point?
00:51 Juerd And if you can't, then how likely is it that what you're skipping when they're equal, is expensive enough to prevent?
00:52 AlexDaniel the most common use case is probably in tests, but that's when you can probably just make sure that ~~ does nothing weird
00:52 vike joined #perl6
00:52 Juerd There are still situations in which you would need to compare list equality, but I don't think you should go for the shortest syntax in such rare cases.
00:52 Juerd Instead, be explicit. Maybe even add a comment about why you're doing this at all.
00:53 Juerd AlexDaniel: For unit tests, there's is_deeply.
00:54 AlexDaniel id_deeply is just eqv, isn't it?
00:55 Juerd Yes.
00:55 aborazmeh joined #perl6
00:55 aborazmeh joined #perl6
00:55 AlexDaniel which, as timotimo have mentioned, has its own problems
00:55 AlexDaniel has
00:56 Juerd Yes. Just mentioning is-deeply (not _ by the way) because it's better than "ok @foo eqv @bar"
00:56 AlexDaniel right
00:56 Juerd The thing about comparing list-like things is that you'll have to specify what, for your use case, should be considered equal.
00:57 Juerd The difference between Array and List might matter, or it might not.
00:57 Juerd Are "42" and 42 the same thing? How about 42e0 and 42?
00:57 AlexDaniel that's why with M you can specify your own op
00:58 Juerd And do the same things matter at the most shallow level, that matter also at deeper recursion?
00:58 AlexDaniel good question
00:58 Juerd I can imagine that you may not care about the difference between List and Array at the outermost level, but you do at inner levels.
01:00 Juerd Value equivalence is not an easy topic, and there doesn't seem to be much between situations where even ~~ will suffice, and situations where you have to be specific about details.
01:00 AlexDaniel Juerd: I'd say that if you specified == then it would just compare the number of elements, but that's also a bit weird
01:01 Juerd Most cases that I can think of, will have either one of those extremes.
01:01 Juerd AlexDaniel: Well, if for a certain use case, lists are equal enough if they have the same number of elements, it's a rather quick check... :)
01:01 Juerd And O(1) is nice.
01:01 dalek perl6.org: bc0bec5 | (Steve Mynott)++ | source/downloads/index.html:
01:01 dalek perl6.org: changed some missed refs to new ver
01:01 dalek perl6.org: review: https://github.com/perl6/perl6.org/commit/bc0bec5edf
01:03 AlexDaniel Juerd: I mean, my idea was that M would be a short Z thingy for comparing possibly differntly-sized lists. How does Z handle lists in lists?
01:05 AlexDaniel m: my @a = 0,3,2; my @b = True, True, True; say zip @a, @b, :with(&[==])
01:05 camelia rakudo-moar f05c77: OUTPUT«(False False False)␤»
01:05 AlexDaniel m: my @a = 0,3,2; my @b = True, True, True; say roundrobin @a, @b, :with(&[==])
01:05 camelia rakudo-moar f05c77: OUTPUT«Unexpected named parameter 'with' passed␤  in block <unit> at /tmp/fp7YXPBGmr line 1␤␤»
01:05 AlexDaniel ???…
01:10 AlexDaniel ok done: RT #127992
01:10 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=127992
01:11 AlexDaniel oh, we are approaching 128000
01:11 sue_ joined #perl6
01:11 aindilis joined #perl6
01:12 AlexDaniel oh, maybe it was done on purpose?
01:14 AlexDaniel because then you will be comparing something with Any
01:15 AlexDaniel or Nil?
01:22 BenGoldberg joined #perl6
01:22 pierre_ joined #perl6
01:26 Herby_ where am I messing up on this regex
01:26 Herby_ m: my $string = '<weather> 60 F, and sunny </weather>'; say $0 if $string ~~ / \<weather\> ( <-[ ^ ]> ) \<\/weather\> /;
01:26 camelia rakudo-moar f05c77: ( no output )
01:27 Herby_ m: my $string = '<weather> 60 F, and sunny </weather>'; say $0 if $string ~~ / \<weather\> ( <-[ ^ ]> + ) \<\/weather\> /;
01:27 camelia rakudo-moar f05c77: OUTPUT«「 60 F, and sunny 」␤»
01:27 Herby_ nm
01:27 Herby_ :)
01:30 molaf joined #perl6
02:05 kurahaupo joined #perl6
02:17 kurahaupo joined #perl6
02:18 tardisx joined #perl6
02:18 tphilipp joined #perl6
02:23 hotel joined #perl6
02:24 hotel Any reason running perl Configure.pl (...) should result in an "error while loading shared libraries: invalid argument"?
02:25 hotel trying to build rakudostar on "ubuntu"
02:27 noganex_ joined #perl6
02:29 xinming joined #perl6
02:31 geekosaur makes me think it's using an unsupported dlopen() flag. would this "ubuntu" be the new win10 subsystem? it's known to be a bit incomplete, and somewhat behind on syscalls
02:31 hotel got it in one
02:32 hotel what syscall would be causing these executable stack error things?
02:33 hotel "cannot enable executable stack as shared object requires" to be precise
02:35 kurahaupo hotel: one of the flags to mmap iirc
02:35 hotel ah, mmap was mentioned last time
02:35 geekosaur that's a different thing. real ubuntu disables that as well, but moarvm uses libffi which claims to require executable stack for ffi trampolines. (it is reported that it doesn't seem to actually need it though)
02:35 hotel hm
02:36 geekosaur you could try using "execstack -q" on the moarvm command and on any shared objects it needs, and "execstack -c" on any of them that say they require it, and see if things still work
02:38 geekosaur (execstack -q will show the state of the "exec stack needed" flag, execstack -c will clear the flag)
02:40 hotel how do I run that over the configure command? or do I have to go through and insert the execstack call over every command (or ??)?
02:40 * hotel scratches his head
02:42 geekosaur it's not the configure command that matters here, you will have gotten moarvm installed before it can build rakudo (it does this early) so you'd find that and use the execstack command on it
02:42 geekosaur I kinda don't see the point in running an ubuntu subsystem in windows running in vmware on ubuntu :) so I can't really provide more detail
02:43 hotel i want to use shiny tools
02:43 hotel well the main problem is that it fails when building moarvm
02:43 hotel on libmoar.so
02:48 hotel maybe it's fixed in the latest update, downloading now
02:48 hotel I understand that most of my problems would be solved by either using a true VM or even just using the windows version, but that would take all the fun out of it IMO
02:54 geekosaur it's a first release; welcome to the bleeding edge :)
02:54 geekosaur (the win10 ubuntu subsystem that is)
02:58 pierre_ joined #perl6
03:00 hotel :)
03:00 hotel in an hour or so I might have some bleeding edges too
03:01 geekosaur exactly :)
03:02 MadcapJakeDinner how do you make sense of exit codes?
03:03 geekosaur for the most part the only meaningful distinction is 0/non-0
03:03 MadcapJakeDinner ahh alright :\
03:04 geekosaur there are rare programs that use predefined exit codes. things run from a shell that dump core may have that reported via the exit code, but as there is no way to distinguish a program doing exit(143) from a program getting SEGV via "sh -c ...", this should be treated with suspicion
03:05 MadcapJakeDinner awesome :P
03:06 Ben_Goldberg joined #perl6
03:07 hotel so no error is exit(0), right? maybe they just add +1 for every error and you're left with something like exit($num-errors)
03:08 geekosaur that's one way. some programs have well-defined error code meanings --- but they're different for each program
03:08 hotel oh- I was totally joking. cool though >_<
03:08 geekosaur consistency is not a thing, mostly because 8 bits is not enough to convey meaningful information
03:09 hotel and that's why they made logs
03:10 Ben_Goldberg joined #perl6
03:12 Ben_Goldberg joined #perl6
03:12 MadcapJakeDinner is there a list of Perl 6 error codes? I can't find one
03:14 winger joined #perl6
03:15 geekosaur I don't think so. Also not sure it'd be useful, since you can't distinguish between perl6 itself generating an error and a perl6 script calling exit with the same error code
03:15 geekosaur er, exit status
03:16 MadcapJakeDinner yeah
03:17 hotel can perl6 fix my internet speeds? I'm still learning
03:17 geekosaur if only :/
03:18 hotel meep
03:18 * geekosaur using a hotspot right now for IRC because main internet is currently pretending to be a boat anchor
03:18 winger joined #perl6
03:19 hotel my isp/mobile provider put it in our contract that we can't use data for a hotspot :$
03:19 pierre_ joined #perl6
03:23 hotel it's been like this for about 10 minutes now http://puu.sh/ovYh5/6445fb73eb.png
03:28 cibs joined #perl6
03:31 pierre_ joined #perl6
03:41 pierre_ joined #perl6
03:50 pierre_ joined #perl6
03:53 pierre_ joined #perl6
03:55 pierre_ joined #perl6
04:02 pierre_ joined #perl6
04:06 pierre_ joined #perl6
04:13 geraud joined #perl6
04:20 jack_rabbit joined #perl6
04:20 pierre_ joined #perl6
04:31 Cabanossi joined #perl6
04:34 CIAvash joined #perl6
04:52 pierre_ joined #perl6
04:53 mr-foobar joined #perl6
05:04 diana_olhovik_ joined #perl6
05:04 dalek specs: 7bc7945 | (David Warring)++ | S07-lists.pod:
05:04 dalek specs: [S07] change .push example (which doesn't follow one-arg rule) to .append.
05:04 dalek specs:
05:04 dalek specs: As discussed - closes #104
05:04 dalek specs: review: https://github.com/perl6/specs/commit/7bc7945507
05:11 tardisx joined #perl6
05:23 jjido joined #perl6
05:23 kurahaupo joined #perl6
05:48 sno joined #perl6
06:02 xinming_ joined #perl6
06:03 winger joined #perl6
06:23 darutoko joined #perl6
06:24 firstdayonthejob joined #perl6
06:26 _mg_ joined #perl6
06:27 pierre_ joined #perl6
06:29 domidumont joined #perl6
06:34 domidumont joined #perl6
06:50 wamba joined #perl6
06:55 ufobat joined #perl6
06:56 rindolf joined #perl6
06:57 tardisx joined #perl6
07:11 abraxxa joined #perl6
07:18 brrt joined #perl6
07:21 sue_ joined #perl6
07:24 Relsak joined #perl6
07:27 brrt good *, #perl6
07:28 masak good brrt, morning!
07:28 masak yay, and a R* release!
07:29 brrt \o/
07:29 * brrt was confused for a second about the R language
07:29 masak I can fully understand why ufo was pulled out of Task::Star, but why remove Bailador? https://github.com/rakudo/star/commit/63da543569571319b35e80af589e3120288c1f28
07:30 masak isn't... has Bailador not been nice? *sniff*
07:30 hankache joined #perl6
07:32 hankache konnichiwa #perl6
07:33 masak こんにちは hankache-san
07:33 hankache perl6intro is available now in Japanese: http://ja.perl6intro.com
07:33 moritz masak: Bailador has started to collect quite a few dependencies (like new template systems etc.), so the options where to add them all to star, or to remove Bailador
07:34 moritz masak: and it seems the star and Bailador maintainers have agreed to do the latter
07:34 masak ok
07:34 masak I don't so much question that decision as I'm curious
07:34 masak so thanks :)
07:35 masak I may be missing the whole picture, but it still seems a bit strange to me...
07:35 masak "We're gonna provide this distribution of useful things..."
07:35 masak [later]
07:35 masak "Oops, too many dependencies! You're on your own!"
07:35 masak if Bailador has grown less useful over time (maybe in relative terms), I would understand it betters.
07:36 masak better*
07:37 nine_ I think the decision went along the lines of Bailador being useful to only a subset of users.
07:37 hankache does the perl 5 dist contain any web framework?
07:37 nine_ no
07:38 masak ...as opposed to... some module that 100% of the users use..._
07:38 masak ?
07:38 nine_ Most modules probably have fewer dependencies or larger audiences
07:38 masak sorry, I'm probably coming off as a bit too argumentative
07:38 hankache there was cgi but it's gone now
07:39 masak for all I know, it was the right decision to exclude Bailador
07:40 hankache i think what we should do is create multiple task::*
07:41 hankache and then depending on what the user wants they can install lets say Task::Web
07:42 masak sounds not bad
07:43 ufobat joined #perl6
07:43 ufobat oi! :D
07:44 stmuk_ I think we need to think more about exactly "star" is
07:46 wamba joined #perl6
07:46 stmuk_ its not an "early adopter" distro
07:47 stmuk_ maybe its a standard library
07:47 maybekoo2 joined #perl6
07:47 pmurias joined #perl6
07:47 stmuk_ or maybe its just p6doc, panda and zef
07:48 stmuk_ dunno
07:49 dakkar joined #perl6
07:49 masak stmuk_: there will always be modules that belong in the ecosystem but not in ::Star
07:49 g4 joined #perl6
07:50 masak stmuk_: I think what surprised me was that Bailador felt like such an obvious ::Star candidate, and still does.
07:52 stmuk_ I'm not anti Bailador in anyway, its still easy to install but it didnt seem tome
07:53 leont_ joined #perl6
07:53 stmuk_ to me to to be a standard library module given other mpdules
07:53 stmuk_ and noone seem
07:54 stmuk_ to
07:54 stmuk_ fell
07:54 stmuk_ efeel
07:54 brrt i think star maybe started of as a collection of 'look, cool, usable things in perl6'
07:54 stmuk_ feel strongly enough to revert
07:54 brrt and now the focus may be changing to 'the standard distribution for end users which is universally useful'
07:55 stmuk_ yes we need to think about what star is
07:56 araujo joined #perl6
07:57 brrt i think we can reasonably argue that 'http server writing toolkit' can be a part of a standard library
07:57 brrt we have perl5's CGI and pythons SimpleHTTPServer as precedent
07:58 stmuk_ I think SSL connections also should be in std lib more than MVC framewors
07:58 stmuk_ ks
08:01 stmuk_ also R* is getting harder to maintain especially on windows with various compilers and NC too
08:01 astj_ joined #perl6
08:02 zakharyas joined #perl6
08:03 El_Che w
08:08 stmuk_ I also wonder why panda is in R* and not zef
08:09 stmuk_ since zef can delete modules and panda cant
08:10 * masak .oO( Society for the restoration of apostrophes )
08:18 stmuk_ I still think having one perl 6 distribution based on MoarVM called "perl 6" and containing just p6doc, panda and zef might be best
08:19 rindolf joined #perl6
08:19 * sjn tries to compile nom-jvm for the first time in half a year
08:19 sjn bloody hell, it takes a long time!
08:19 El_Che stmuk_: you're describing my internal base docker image for perl6
08:20 El_Che stmuk_: in a docker scenario, Rakudo Star does not bring nothing to the table because it does not version pin the released modules
08:21 stmuk_ star is supposed to pin working module versions (which it does on linux and OS X)
08:22 stmuk_ the problem platform is Windows
08:22 El_Che stmuk_: ok, I need to recheck that again then
08:23 stmuk_ El_Che: Task::Star doesnt "pin" git versions whereas R* does
08:24 El_Che stmuk_: that's actually great news
08:28 stmuk_ the main problem with R* is that linenoise is unlikely to work on windows
08:28 stmuk_ which isn't a new problem since it didn't work in the last R*
08:30 winger_ joined #perl6
08:31 uruwi joined #perl6
08:38 stmuk_ I wondered whether linenoise should also be removed from R*
08:39 stmuk_ but I guess that working on linux and OS X is probably better for most users
08:39 stmuk_ and broken windows might encourage fixage :)
08:41 brrt doesn't linenoise work on windows?
08:45 stmuk_ maybe depending on arch (32 v 64 bit) or compiler
08:46 stmuk_ I've not seen it work on MSVC although I'm not a windows guy
08:47 stmuk_ and MSVC is used for the MSI build
08:49 RabidGravy joined #perl6
09:11 RabidGravy boom
09:13 psch here comes the
09:14 timotimo wobble base, wobble base, wobble wobble wobble
09:14 timotimo wobble, wobble, wobble wobblewobblewobble
09:15 timotimo https://www.youtube.com/watch?v=IfeyUGZt8nk <- Masterchef Synesthesia - Swede Mason
09:16 psch https://www.youtube.com/watch?v=qoLS9We9hl4
09:18 timotimo perhaps at some point i ought to put in the time to watch every single youtube video that has >1mil views
09:21 psch i am utterly astonished by the amount of practice and musical comprehension the harmonizator shows
09:22 timotimo huh, practice?
09:22 psch yeah, that's by ear afaik
09:23 psch and, well, it's a guy and not a program :P
09:23 timotimo oh
09:23 timotimo i thought it was a program :)
09:24 psch https://youtu.be/POgiuxb7xj0
09:24 psch well, first video unter the videos tab... :)
09:41 timotimo good stuff
09:53 Actualeyes joined #perl6
09:54 zakharyas joined #perl6
10:07 kerframil joined #perl6
10:31 dalek ecosystem: cc2a02b | RabidGravy++ | META.list:
10:31 dalek ecosystem: Rename META of WebService::Souncloud
10:31 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/cc2a02bfcd
10:39 ZoffixWin Souncloud? It's that an alternative to Soundcloud? :P
10:40 polyfloyd joined #perl6
10:40 ZoffixWin You listen to Soundcloud in a sauna
10:42 RabidGravy :)
10:48 dalek features: 8fc35e4 | timotimo++ | features.json:
10:48 dalek features: "arrow blocks" are called "pointy blocks"
10:48 dalek features:
10:48 dalek features: by pretty much everyone.
10:48 dalek features: review: https://github.com/perl6/features/commit/8fc35e4939
10:48 timotimo %)
10:48 timotimo finally did that major update to the features comparison matrix
10:48 dalek joined #perl6
10:49 timotimo now i wonder if the page will properly be updated by itself soon
10:50 timotimo Please note that this feature matrix generally represents the state of the latest development versions of the compilers, not that of the latest release.
10:50 timotimo ^- or the other way around!
10:58 psch hrm, formulating my reply to #127980 is hard /o\
10:58 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=127980
10:58 psch i'm having trouble finding the right way to approach it in general, fwiw
10:58 psch as in, i have a bunch of arguments that point to different future behaviors
10:59 psch ...probably should start with "the current behavior definitely seems wrong" then vOv
11:04 kid51 joined #perl6
11:06 psch language design is hard, let's just fix bugs /o\
11:11 * masak has a look
11:12 perlawhirl joined #perl6
11:13 timotimo you've got the look!
11:13 perlawhirl pcsh: I think best to treat it like a bug than a feature request. $item ~~ @list shouldn't check if the item is in the list... it should always be false
11:14 perlawhirl but the other thing with the empty list
11:14 perlawhirl ... that's odd i guess
11:14 tadzik what in the world can make a red test turn gre-en
11:14 masak psch: intersting discussion.
11:14 masak tadzik: the right implementa-a-a-tion! :D
11:15 psch perlawhirl: well, S03 says "Any ~~ Positional => lists are comparable: $_[] «===» X[]"
11:15 psch +plus a few chars so it makes sense outside of the table :)
11:15 masak I'd be instinctively against putting elementship semantics into ~~
11:15 masak we used to do that, and we backtracked away from it
11:15 * perlawhirl is off to read S03
11:16 psch perlawhirl: header "Smart matching" has the table about a page down
11:16 psch masak: right, if it was tried and decided to not work that's good enough for me
11:16 psch masak: i really don't understand the empty list or self[0] ~~ Match cases though
11:19 masak I think that's a recent tweak
11:19 masak ish
11:20 psch oh
11:20 psch right, looks like it's there because no one wants to champion the truthiness bit
11:21 perlawhirl on a slightly unrelated note... what is the defining difference between === and eqv
11:21 psch well, OKness type as it was called in the gist
11:23 psch ohh
11:23 psch m: say ("aaaa" ~~ m:g/./).WHAT
11:23 camelia rakudo-moar f05c77: OUTPUT«(List)␤»
11:23 psch that bit matters there i think
11:24 masak maybe I would've been more positive towards the OKness proposal if it'd happened back in 2005 or something
11:25 psch well, i think it's pretty much off the table by now anyway
11:28 psch m:g// returning a List *still* irks me :/
11:28 masak what would you like it to return?
11:28 psch m: class A { }; my A $a .= new; my A $b .= new; say $a eqv $b; say $a === $b
11:28 camelia rakudo-moar f05c77: OUTPUT«True␤False␤»
11:29 perlawhirl ahhhhh
11:29 wamba m: [\*] (2 .. *) ==> map *.sqrt ==> { say .[1000] }()
11:29 camelia rakudo-moar f05c77: OUTPUT«Inf␤»
11:29 perlawhirl psch++
11:30 psch perlawhirl: =:= is eqaddr, === is eqaddr && WHICH eq WHICH, eqv is "do these look the same"
11:30 perlawhirl yeah, reading... the docs do kinda spell it out for me :D
11:30 psch eqv and === are somewhat close semantically for value types i guess
11:31 psch if not even identical vOv
11:31 lizmat And another Perl 6 Weekly hits the net: https://p6weekly.wordpress.com/2016/04/26/2016-17-making-our-introductions/
11:31 masak lizmat++
11:31 psch lizmat++
11:31 perlawhirl psch: yes, for a lot of use cases they are comparable ('===' eqv 'eqv')
11:32 psch ZoffixWin++ # Audio::MIDI::Note
11:33 psch that's a strong superset of what i do in Music::Helpers :o
11:33 wamba [\*] (2 .. *) ==> { say .[1000].sqrt  }()
11:33 wamba m: [\*] (2 .. *) ==> { say .[1000].sqrt  }()
11:33 camelia rakudo-moar f05c77: OUTPUT«Inf␤»
11:33 masak sounds about right :P
11:33 moritz 1000! is a pretty large number
11:34 masak 1000! is! a! pretty! large! number!
11:34 wamba ye, but why sqrt form big numbers is Inf?
11:34 psch m: say &sqrt.candidates>>.signature
11:34 camelia rakudo-moar f05c77: OUTPUT«((Numeric \x) (Cool \x) (num $a --> num))␤»
11:35 moritz wamba: what do you think the sqrt of Inf is?
11:35 masak m: say sqrt(2 * pi * $_) * ($_ / e) ** $_ given 1_000
11:35 camelia rakudo-moar f05c77: OUTPUT«Inf␤»
11:35 masak yup
11:35 masak Sterling's approximation agrees :P
11:35 psch m: say (1000 / e) ** 1000
11:35 camelia rakudo-moar f05c77: OUTPUT«Inf␤»
11:35 wamba moritz: if i remove sqrt then its not Inf
11:35 perlawhirl m: ( [\*] (2 .. *) )[1000].chars
11:35 camelia rakudo-moar f05c77: ( no output )
11:35 perlawhirl m: say ( [\*] (2 .. *) )[1000].chars
11:35 camelia rakudo-moar f05c77: OUTPUT«2574␤»
11:35 perlawhirl that's a big number
11:36 masak meh
11:36 masak I've seen bigger
11:36 psch m: say ( [\*] (2 .. *) )[1000].Numeric
11:36 camelia rakudo-moar f05c77: OUTPUT«4035952266318452090518806286296408436845044275530751978706963977610491878128497049118615252008472869536910295360050080411996791369475389741951456038066137646595987724483431553460999362576257530948038840278601639397898421388354597263097357654866250729221451…»
11:36 perlawhirl HA!
11:36 moritz wamba: but it's an Int, which is an arbitrary precision type
11:36 moritz wamba: sqrt returns a Num, which is limited to roughly 1e308
11:36 wamba m: [\*] (2 .. *) ==> { say .[1112].Num }()
11:36 camelia rakudo-moar f05c77: OUTPUT«Inf␤»
11:36 wamba ok, ty
11:36 moritz m: say log( ( [\*] (2 .. *) )[1000] )
11:36 camelia rakudo-moar f05c77: OUTPUT«Inf␤»
11:37 wamba moritz: ty
11:37 psch oh duh, Int.Numeric is a noop
11:37 psch silly me
11:37 moritz the log thing is a bit sad
11:37 moritz though I don't know any good integer algorithms for calculating a natural log
11:40 perlawhirl m: say ( [\*] (2 .. *) )[168].sqrt # as far as you get before it craps out
11:40 camelia rakudo-moar f05c77: OUTPUT«2.6939590968142e+153␤»
11:40 perlawhirl m: say ( [\*] (2 .. *) )[169].sqrt
11:40 camelia rakudo-moar f05c77: OUTPUT«Inf␤»
11:42 timotimo good, the feature matrix page has successfully been updated with my changes
11:45 perlawhirl so, there are shaped arrays, tho... or are they still a WIP at this stage?
11:45 timotimo they are a bit NYI
11:45 moritz perlawhirl: they exists, but not with all the degrees of freedom that TimToady has dreamed up :-)
11:45 timotimo m: my int @a[4;5] = (0 xx 5) xx 4; say @a.perl
11:45 camelia rakudo-moar f05c77: OUTPUT«array[int].new(:shape(4, 5), [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0])␤»
11:45 timotimo m: my int @a[4;5] = (0 xx 5) xx 4; @a[*;4] = 1
11:45 camelia rakudo-moar f05c77: OUTPUT«Partially dimensioned views of arrays not yet implemented. Sorry. ␤  in block <unit> at /tmp/xasTIEdpJu line 1␤␤»
11:46 timotimo ^- this is the part that's missing
11:46 perlawhirl ah, i see
11:46 timotimo and shaped hashes are missing completely
11:47 lizmat what is a shaped hash other than a mutable Enum ?
11:47 perlawhirl well yeah that's why i as asking... i thought they would at least get a +- in the list
11:48 moritz yes, sounds sensible
11:49 perlawhirl yeah, it is Partially implemented (just the Array part (and only part of that))
11:49 timotimo lizmat: dunno, I would have to read the specs
11:58 tbrowder joined #perl6
12:02 tbrowder hi! the unicode_texas.pod file still needs help. the unicode 'e' renders nicely (thanks) but its row is now too high; html source shows a big gap in that line but I don't see any error in the html; the html generated on my machine has no error and renders nicely with iceweasel
12:05 nd3i joined #perl6
12:05 pierre_ joined #perl6
12:05 nd3i in the REPL, can I test subs from a file?
12:06 nd3i I tried: use /path/to/file, and load /path, and EVAL slurp /path ... no joy
12:11 timotimo if you have a path, you'll use "require" with a string argument
12:11 timotimo otherwise you'd make sure the file is in your library search paths and then just "use Folder::Inner::Modulename"
12:15 kaare_ joined #perl6
12:16 nd3i beautiful! require does the trick. Forgot about that one. TYVM
12:16 nd3i left #perl6
12:17 _rubio_ joined #perl6
12:20 XliffNap MadcapJake++ # HTML::MyHTML release.
12:22 cdf joined #perl6
12:23 cdf quit
12:43 perlawhirl exit
12:43 perlawhirl lol
12:43 * masak .oO( IRC is hard, let's exit... lol )
12:49 pierre_ joined #perl6
12:57 ZoffixW joined #perl6
12:59 tony-o MadcapJake: have you been using (or trying to use) modules.zef.pm?
13:02 MadcapJake tony-o: yeah! but does search work?
13:03 MadcapJake also needs a favicon and an opensearch provider http://www.opensearch.org/Home
13:06 tony-o MadcapJake: search does work
13:06 tony-o it's not great, yet
13:07 tony-o but it does bring back what you're looking for, for the most part
13:14 MadcapJake tony-o: if I put in HTML, not a single HTML::* module shows up
13:14 ZoffixW Any idea why Inline::Perl5 is choking on this code? https://gist.github.com/zoffixznet/7fe6677c507998a9b76b589da9433ea4
13:17 psch ZoffixW: ooc, did you see https://github.com/peschwa/p6-Music-Helpers ?
13:17 ZoffixW psch, yeah
13:18 ZoffixW What's "ooc"?
13:18 timotimo "out of curiosity" usually
13:18 psch i usually take it as "out of curiousity", yeah
13:19 timotimo eh. british english, american english, same difference
13:19 Sgeo joined #perl6
13:19 * timotimo AFK
13:19 psch some contexts have it as s/curiousity/character/, and i sometimes also use it as s/curiousity/context/ :S
13:19 huf it's the french way to say "coo"
13:19 huf just like OOP in french is POO
13:20 dalek ecosystem: 1450f3f | RabidGravy++ | META.list:
13:20 dalek ecosystem: Rename META for Chronic
13:20 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/1450f3f89e
13:20 psch ZoffixW: i like your interface a lot more, 'cause it takes all the portmidi handling away, fwiw
13:20 MadcapJake Xliff: have you given it a try yet? It's pretty fast for me (hope it doesn't give you errors like before)
13:20 psch on the otherh and, i wouldn't know how deal with chords as easily there vOv
13:21 psch s/h a/ha/
13:21 psch +a space...
13:22 psch but maybe i've just not really understood it heh
13:22 ZoffixW Just pass a list: .play(<C4 E4 G4>) play C major
13:22 skids joined #perl6
13:23 psch i'm wondering if should tear out Music::Helpers::Note and replace it with Audio::MIDI::Note, in any case
13:23 psch orr if maybe Music::Helpers is kinda bad anyway and i should trash it :P
13:23 ZoffixW And if, say, two of those notes are meant to sound longer than the third, you can use .aplay to sound longer ones asynchronously: .aplay(<E4 G4>).play('C4', 1/8).play('C4', 1/8) <-- plays C major with C4 note played twice in 8th notes
13:24 ZoffixW heh
13:24 ZoffixW Don't trash it.
13:24 ZoffixW Oh, Music::Helpers::NOTE...
13:25 psch nah, trashing was in reference to Music::Helpers
13:25 ZoffixW Nah, don't. With ::Note you actually have to know what notes C major has :) While Music::Helpers will tell you :)
13:26 psch ::Note should probably be replaced by something built upon Audio::MIDI::Note, although i think it's (a) somewhat misnamed and (b) i don't like passing strings around to tell what i'd like to have played
13:26 psch well, A::M::N feels misnamed, to be precise
13:27 psch it's more like a minimal sequencer, isn't it
13:27 ZoffixW I think I'll rename it to ::Instrument
13:28 ZoffixW And will have an ::Instrument::Guitar subclass that will be able to take tabs.
13:28 psch that sounds neat
13:28 ZoffixW I'm doing this stuff just for an article on grammars. I don't think I have much real use for it anywhere else :)
13:32 ZoffixW Well, I reported my Inline::Perl5 issue. No idea what's causing it. Gonna rewrite my .each() with a regular loop: https://github.com/niner/Inline-Perl5/issues/60
13:34 Xliff MadcapJake, as soon as I need something like that, I'm definitely giving it a whirl.
13:34 Xliff I've been playing with Mojo::DOM like Zoffix.
13:35 Xliff Mainly for eBook mangling.
13:35 Xliff s/eBook/ePub/
13:37 ufobat joined #perl6
13:39 takadonet morning all
13:41 MadcapJake Xliff: ok! It still needs more work (and MyHTML itself still needs some features) but I'm knee-deep in CompUnits right now so it'll be a little while before I get back to it.
13:45 Xliff No worries! Glad you got it released. I will update and see if I can break it, again! ^_^
13:47 dalek ecosystem: 158a0a4 | RabidGravy++ | META.list:
13:47 dalek ecosystem: Rename META file for Tinky
13:47 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/158a0a407e
13:49 Xliff Hmm.... MadcapJake, did you rename some classes? The tests aren't passing.
13:49 Xliff 020-basics.t -> "my MyHTMLTree $tree .= new($myhtml);"
13:49 MadcapJake oh my, I definitely left tests in disrepair :P
13:50 MadcapJake You can still --force install right?
13:52 moritz stmuk_++ # rstar release
13:53 tomboy64 joined #perl6
13:56 pierre_ joined #perl6
13:58 tbrowder is anyone else seeing the too-high row for unicode 'e' in this list: <https://doc.perl6.org/language/unicode_texas>?
13:59 [Coke] tbrowder: looks fine here.
13:59 [Coke] (os x/chrome)
14:00 Xliff MadcapJake, heh! I'm gonna take a stab at fixing them. Just for the halibut.
14:00 lizmat tbrowder: looks fine for me on OS/X Safari as well
14:00 ilmari tbrowder: exactly the same height as the surrounding rows in firefox/linux
14:00 ilmari 27.2px, according to the dom inspector
14:01 Xliff tbrowder, looks fine here (Win/Chrome)
14:02 tbrowder okay, thanks; my chrome seems weird, but iceweasel does show it fine (I don't use it much and forget to check it)
14:03 ilmari tbrowder: it's one pixel taller in chromium
14:03 ilmari 27 vs 26
14:04 ilmari and the 「 and 」 rows are 29px
14:05 Xliff .u 1d450
14:05 yoleaux U+1D450 MATHEMATICAL ITALIC SMALL C [Ll] (????)
14:05 Xliff ^ Speed of light?!
14:05 Xliff m: say ????
14:05 camelia rakudo-moar ce5dc0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ko9rnRT6gN␤Undeclared routine:␤    ???? used at line 1␤␤»
14:05 Xliff .u 1d452
14:05 yoleaux U+1D452 MATHEMATICAL ITALIC SMALL E [Ll] (????)
14:06 tbrowder weird!  my deb 8 chrome does have utf-8 encoding but I guess I'll have to fall back to another browser for a while; thanks all!
14:06 Xliff m: say ????
14:06 camelia rakudo-moar ce5dc0: OUTPUT«2.71828182845905␤»
14:06 khw joined #perl6
14:06 tbrowder bye
14:06 Xliff Who can I talk to to advocate for the addition of the ???? constant?
14:07 [Coke] Xliff: what would the # be?
14:07 Xliff Speed of light in a vacuum.
14:07 [Coke] (and that's why it's not going in, probably)
14:07 psch in meters per second
14:07 [Coke] Xliff: what units?
14:07 psch probably vOv
14:07 psch i don't like it, fwiw
14:07 Xliff 299 792 458 m / s
14:08 psch e and pi are mathematical constants
14:08 [Coke] yah, not going to happen, based on previous units based conversations.
14:08 geekosaur while I looked for it the other day, I actually agree it's module space
14:08 Xliff psch: So.... only unitless values?
14:08 geekosaur I could argue for pi and e also being module space
14:08 MadcapJake m: constant ???? = 2.99792458e8; say ????;
14:08 camelia rakudo-moar ce5dc0: OUTPUT«299792458␤»
14:08 [Coke] Xliff: where would you even hang the units?
14:09 psch Xliff: well, that's my naive reasoning, yeah.  but i also think "how fundamental" is a thing to think about as well
14:09 psch like, we don't need G64 for example vOv
14:09 Xliff Well. That makes sense, then. And MacapJake threw in a simple workaround.
14:10 geekosaur ...also I'd be happier with e if it weren't a single letter in its texas version
14:11 MadcapJake wrt module-space: I could see `use Constant::SpeedOfLight :meters;`
14:12 MadcapJake though tbh, is there really any other unit than m/s where it would be used?
14:12 Xliff Math::Constant::SpeedOfLight?
14:12 DrForr As long as alpha doesn't change (which it may) :)
14:12 Xliff Most equations that use it require m/s
14:13 colomon Math::Constant::SpeedOfLightInAVacuum
14:13 colomon errr, surely Physics::Constant::SpeedOfLightInAVacuum
14:13 DrForr I'd put that in Physics:: myself.
14:13 Xliff Fair enough.
14:14 Xliff No Physics:: modules in the ecosystem yet. LOL!
14:15 MadcapJake another idea would be Physics::Constants and leave the space open for more than just speed of light
14:15 Xliff I'm looking here: http://physics.info/constants/
14:15 DrForr Well, there are at least 19 constants that we ned...
14:15 DrForr *need
14:15 Xliff Unfortunately... subscripts!
14:15 blue_lizzard joined #perl6
14:16 tharkun joined #perl6
14:16 DrForr X_0 and friends?
14:16 Xliff Yup
14:17 MadcapJake you could make each one an instance of a Physics::Constant class that has a convert method
14:17 Xliff ε0, u0, and the whole m_ pantheon.
14:19 Xliff I like that idea, MadcapJake.
14:20 Xliff Only problem is that for completeness, there'd need to be some way to take care of symbols with subscripts.
14:21 Xliff Because the closer we get to this: 4πε0....the more useful it would be to the people who would actually use it.
14:21 lizmat Xliff: if they're part of an identifier, subscripts should just work ?
14:21 Xliff And that 0 should be subscript.
14:22 psch m: constant m₀ = "foo"; say m₀
14:22 camelia rakudo-moar ce5dc0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/dwke_FWkd1␤Missing initializer on constant declaration␤at /tmp/dwke_FWkd1:1␤------> 3constant m7⏏5₀ = "foo"; say m₀␤»
14:22 psch alphabetical subscripts work i think
14:22 Xliff m: constant e₀ = 8.854187817e-12; say e₀
14:22 camelia rakudo-moar ce5dc0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/lQ5b_5oa_F␤Missing initializer on constant declaration␤at /tmp/lQ5b_5oa_F:1␤------> 3constant e7⏏5₀ = 8.854187817e-12; say e₀␤»
14:23 psch well, if those constants had a formulaic progression it could be solved with postfix ops :P
14:23 psch hm, actually, even without it could
14:23 Xliff lizmat: Soo.... not yet.
14:23 psch m: sub postfix:<₀> { $^a }; say 2₀
14:23 camelia rakudo-moar ce5dc0: OUTPUT«2␤»
14:24 lizmat :-(
14:24 psch define a constant m, define a postfix to take only that constant, return the right value
14:24 psch it's a bit terrible, yes, but i think the "allow numeric subscripts in ident" discussion has happened a few times already
14:25 Xliff psch: That's a strategy. However how would that work for the m_e, m_p, and m_n constants?
14:26 Xliff psch: multis?
14:26 psch m: constant mₑ = "i don't know physics"; say mₑ
14:26 camelia rakudo-moar ce5dc0: OUTPUT«i don't know physics␤»
14:26 MadcapJake not to beat a dead horse, but I think subscripts should be allowed in ident because x₁ is a very common compsci/math concept/syntax
14:26 psch Xliff: Lo is fine in ident, No isn't afaik
14:26 psch .u ₑ
14:26 yoleaux U+2091 LATIN SUBSCRIPT SMALL LETTER E [Lm] (ₑ)
14:26 psch m: say uniprop 'ₑ'
14:26 camelia rakudo-moar ce5dc0: OUTPUT«Lm␤»
14:26 psch oh, isn't even Lo
14:26 Xliff Oh. Right. Letters work.
14:26 psch ...i don't know unicode :)
14:27 psch m: say uniprop '₀'
14:27 camelia rakudo-moar ce5dc0: OUTPUT«No␤»
14:27 Xliff So for any No, we need postfix ops.
14:27 MadcapJake actually though, I *could* see subscripts being more powerful than just simply numbers-on-ends-of-identifiers
14:31 Xliff LOL! And Hubble's constant doesn't seem so .... constant.
14:38 dalek ecosystem: 3d4b9d3 | RabidGravy++ | META.list:
14:38 dalek ecosystem: Rename META for Audio::Sndfile
14:38 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/3d4b9d3bf5
14:45 * masak .oO( Hubble's readonly parameter )
14:48 Xliff When declaring a unit class, how do you handle inheritance?
14:48 psch m: unit class Foo; also is Cool;
14:48 camelia rakudo-moar ce5dc0: ( no output )
14:48 psch m: unit class Foo is Cool;
14:48 camelia rakudo-moar ce5dc0: ( no output )
14:51 tailgate how does one write a custom "say" for an object?
14:51 psch tailgate: &say calls .gist on its arguments
14:52 tailgate so you override gist in your object?
14:52 tailgate class
14:57 mohae joined #perl6
14:57 lizmat m: class A { method gist { "foo" } }; say A
14:57 camelia rakudo-moar ce5dc0: OUTPUT«foo␤»
14:58 Xliff Thanks psch.
15:03 lostinfog joined #perl6
15:05 dalek ecosystem: 264a14e | RabidGravy++ | META.list:
15:05 dalek ecosystem: Rename META for Audio::Convert::Samplerate
15:05 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/264a14e03d
15:10 grondilu > use Clifford; say no*ni # now shows -1+????∧∞, which is neat
15:13 hoelzro stmuk_: there's no reason Linenoise shouldn't work on Windows; I can test it later
15:14 hoelzro I'm wondering if it's just the star MSI that has problems with Linenoise
15:18 muraiki joined #perl6
15:20 _mg_ joined #perl6
15:33 RabidGravy Oooh Tinky's tests fail with "latest" and not 2016.04
15:35 RabidGravy and only on Travis it seems
15:35 Xliff Is there a perl6 equivalent of 'prove'?
15:36 RabidGravy I think leont made one
15:36 abrakadabra joined #perl6
15:37 lizmat it's actually in nom now
15:37 ilmari rakudo.git:t/harness6
15:37 lizmat afk for a few hours&
15:37 RabidGravy also https://github.com/tony-o/perl6-flow
15:42 Begi joined #perl6
15:44 Begi is there an easy way to check if a number is pair or unpair? (a method maybe ?) thanks !
15:44 timotimo "pair"? "unpair"?
15:45 Begi euh, 1 is unpaire, 2, 4 and 6 are pair for example
15:46 huf even/odd
15:46 Begi sorry if it's not the good word :} Ah, thanks !
15:46 huf that's how they say it in english. not paired and unpaired.
15:46 arnsholt Doesn't look like there're methods for even/odd
15:46 huf &1
15:46 arnsholt But there's the %% operator
15:46 huf well, whatever binary and is
15:46 arnsholt Which returns true if the remainder is 0 and false if note
15:47 arnsholt *not
15:47 timotimo huf: bitwise and is +&
15:47 timotimo m: say 1 %% 2; say 2 %% 2; say 3 %% 2; say 4 %% 2; say 5 %% 2; say 6 %% 2
15:47 camelia rakudo-moar ce5dc0: OUTPUT«False␤True␤False␤True␤False␤True␤»
15:47 ilmari m: (1..4).map: * %% 2
15:47 camelia rakudo-moar ce5dc0: ( no output )
15:47 ilmari m: say (1..4).map: * %% 2
15:47 camelia rakudo-moar ce5dc0: OUTPUT«(False True False True)␤»
15:47 timotimo Begi: what language do you come from?
15:49 RabidGravy m: say (^10).classify({ $_ %% 2 ?? "even" !! "odd" })
15:49 camelia rakudo-moar ce5dc0: OUTPUT«{even => [0 2 4 6 8], odd => [1 3 5 7 9]}␤»
15:49 RabidGravy right there in the examples of List.classify
15:50 masak m: sub is-even($n) { $n %% 2 }; say 42.&is-even
15:50 camelia rakudo-moar ce5dc0: OUTPUT«True␤»
15:50 masak Begi: there.
15:51 timotimo if you don't come from an english background it may be hard to find "even" and "odd". in german, you say literally "straight" and "unstraight"
15:51 arnsholt Oooh, masak++ to the resecue!
15:52 Begi I'm French. And i was sure that pair and unpair was good... But now I know, thanks ! :)
15:52 arnsholt Norwegian uses pair-number and odd-number, French has pair and unpair, IIRC
15:52 timotimo pff, the french are always arrogant about language :D :D
15:53 arnsholt Well, usually English has the same terms as the French when it comes to mathematics. It's usually the *Germans* who are stubborn and insist on their own words ;p
15:54 timotimo yeah, the german words and terms are always better, though
15:54 huf timotimo: yeah, my first guess waaaay back when was paired/unpaired too :)
15:54 huf it's the english translation of the hungarian words, after all :)
15:55 huf also i think i may have seen the words on a roulette mat
15:56 arnsholt timotimo: I once heard a (Norwegian) professor of Philosophy say that Kant was *even* harder to understand in English translation than in Norwegian translations, since many of Kant's special terms are very hard to translate into English
15:56 arnsholt (Or translate well, at any rate)
15:56 |Tux| joined #perl6
15:56 timotimo i ought to read a bunch of his work some day
15:57 timotimo i don't think i've read a single piece of his :(
15:57 arnsholt I think I've read fragments
15:57 arnsholt And in the end, I think it's more important to be aware of Kant as a philosopher and roughly his position on things. There simply isn't enough time to read all of the seminal things
15:58 timotimo i also ought to read some kafka. for some reason the two are closely related in my mind
15:58 timotimo probably because their names are both "ka"-words :)
15:59 * grondilu was given 'the metamorphosis' to read during high-school.
16:00 psch "Auf der Galerie" is simply amazing
16:00 psch https://en.wikipedia.org/wiki/Up_in_the_Gallery#Text
16:00 psch by kafka that is
16:00 * grondilu forgot almost everything about it except the weird plot.
16:01 grondilu (it's crazy how little I can remember from books, especially fiction)
16:06 Begi I'm doing a little game. The goal is to write code with fewer characters possible. I'm sure Perl can win :)
16:06 Begi For now, I've that ? Can I reduce it ?
16:06 Begi my $n = prompt('>');my $m = prompt('>'); for 1..$n { if $_ %% 2 {say 'O' x $m } else { say 'X' x $m }}
16:07 grondilu my ($n,$m) = promopt('>') xx 2; comes to mind
16:07 grondilu *prompt
16:08 perlpilot using a ternary would make is smaller too
16:08 grondilu also, use the ternary operator
16:08 timotimo no, perl cannot win
16:08 perlpilot a post-fix for could shave off a couple of characters
16:09 timotimo the $n doesn't have to be a variable
16:10 psch my ($m,$n) = prompt('>') xx 2; my $l = $_ %% 2 ?? 'O' !! 'X'; $l x $_ for 1..$n # i'd say
16:10 timotimo m: say ('O', 'X' Xx 5)[^10]
16:10 camelia rakudo-moar ce5dc0: OUTPUT«(OOOOO XXXXX Nil Nil Nil Nil Nil Nil Nil Nil)␤»
16:10 timotimo m: say ('O', 'X' Xx 5 xx *)[^10]
16:10 camelia rakudo-moar ce5dc0: OUTPUT«(OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO OOOOO)␤»
16:10 timotimo m: say (('O', 'X' Xx 5) xx *)[^10]
16:10 camelia rakudo-moar ce5dc0: OUTPUT«((OOOOO XXXXX) (OOOOO XXXXX) (OOOOO XXXXX) (OOOOO XXXXX) (OOOOO XXXXX) (OOOOO XXXXX) (OOOOO XXXXX) (OOOOO XXXXX) (OOOOO XXXXX) (OOOOO XXXXX))␤»
16:10 psch oh, no, needs andthen instead of the second ;
16:10 psch which makes it a lot longer
16:10 timotimo ugh, sublists
16:11 Xliff m: So "my ($n,$m)=prompt('>') xx 2; for (^$n) { say $_ %% 2 ?? 'O' x $m !! say 'X' xx $m }
16:11 camelia rakudo-moar ce5dc0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/lnR8Fl14B7␤Variable '$n' is not declared␤at /tmp/lnR8Fl14B7:1␤------> 3So "my (7⏏5$n,$m)=prompt('>') xx 2; for (^$n) { say␤»
16:11 Xliff m: my ($n, $m)=prompt('>') xx 2; for (^$n) { say $_ %% 2 ?? 'O' x $m !! say 'X' xx $m }
16:11 camelia rakudo-moar ce5dc0: OUTPUT«>>Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5Céad slán ag sléibhte maorga Chontae Dhún na nGall' (indicated by ⏏)␤  in block <unit> at /tmp/yzMHZDQPLg line 1␤␤Actually thrown at:␤  in block…»
16:11 grondilu m: say <O X> Zx (2, 3)
16:11 camelia rakudo-moar ce5dc0: OUTPUT«(OO XXX)␤»
16:12 grondilu m: say <O X> Zx (2, 3)[$_ % 2] for ^2
16:12 camelia rakudo-moar ce5dc0: OUTPUT«(OO)␤(OOO)␤»
16:12 grondilu m: say (<O X> Zx (2, 3))[$_ % 2] for ^2
16:12 camelia rakudo-moar ce5dc0: OUTPUT«OO␤XXX␤»
16:13 timotimo m: say (<O X> xx *) Zx 6
16:13 camelia rakudo-moar ce5dc0: OUTPUT«(O XO XO XO XO XO X)␤»
16:13 leont_ joined #perl6
16:14 grondilu my ($n, $m) = prompt xx 2; say (<0 X> Zx ($n, $m))[$_ % 2] for 1 .. $n
16:14 grondilu I think I win
16:15 psch grondilu: no, the length the X and O strings is both $m :)
16:15 Xliff Yeah. Beat my "'my ($n, $m)=prompt(">") xx 2; for (^$n) { say $_ %% 2 ?? "O" x $m !! say "X" x $m }"
16:15 psch grondilu: so that's <O X> Xx $m instead i think
16:15 timotimo m: say (|<O X> xx *) Zx 6
16:15 camelia rakudo-moar ce5dc0: OUTPUT«(OOOOOO)␤»
16:16 timotimo m: say (|<O X> xx *) Xx 6
16:16 camelia rakudo-moar ce5dc0: OUTPUT«(...)␤»
16:16 timotimo m: say ((|<O X> xx *) Xx 6)[^20]
16:16 camelia rakudo-moar ce5dc0: OUTPUT«(OOOOOO XXXXXX OOOOOO XXXXXX OOOOOO XXXXXX OOOOOO XXXXXX OOOOOO XXXXXX OOOOOO XXXXXX OOOOOO XXXXXX OOOOOO XXXXXX OOOOOO XXXXXX OOOOOO XXXXXX)␤»
16:16 grondilu my ($n, $m) = prompt xx 2; say (<0 X> Xx $m)[$_ % 2] for 1 .. $n
16:16 psch timotimo++ wins i think, replace 6 with $m and ^20 with $n
16:16 grondilu m: say 'my ($n, $m) = prompt xx 2; say (<0 X> Xx $m)[$_ % 2] for 1 .. $n'.chars
16:16 camelia rakudo-moar ce5dc0: OUTPUT«64␤»
16:16 psch err, ^$n
16:16 * Xliff knows better than to get into a golfing contest with grondilu.
16:17 timotimo if the two numbers were reversed, it'd be easier, because then the variables could go completely
16:17 timotimo hm, actually ...
16:17 Xliff I don't think the variables are important, in this instance.
16:17 timotimo m: my @vals = 10, 5; say ((|<O X> xx *) Xx @vals.shift)[^@vals.shift]
16:17 camelia rakudo-moar ce5dc0: OUTPUT«(OOOOOOOOOO XXXXXXXXXX OOOOOOOOOO XXXXXXXXXX OOOOOOOOOO)␤»
16:18 timotimo nope, wrong way around.
16:18 * perlpilot notes that an explicit index is fewer characters than .shift  :)
16:19 timotimo in that case you've misunderstood my intention, perlpilot
16:19 grondilu m: say (@=<O X> X 3).shift for ^10
16:19 camelia rakudo-moar ce5dc0: OUTPUT«(O 3)␤This Seq has already been iterated, and its values consumed␤(you might solve this by adding .cache on usages of the Seq, or␤by assigning the Seq into an array)␤  in block <unit> at /tmp/1o99Qfc1Q2 line 1␤␤»
16:19 grondilu m: say (state @=<O X> X 3).shift for ^10
16:19 camelia rakudo-moar ce5dc0: OUTPUT«Cannot shift from an empty Array␤  in block <unit> at /tmp/2Rv7582yPU line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/2Rv7582yPU line 1␤␤»
16:19 perlpilot perhaps.  I just glanced at what you did
16:19 timotimo i was wondering which of the two shifts would be executed first
16:19 grondilu m: say (@=[<O X> X 3]).shift for ^10
16:19 camelia rakudo-moar ce5dc0: OUTPUT«(O 3)␤This Seq has already been iterated, and its values consumed␤(you might solve this by adding .cache on usages of the Seq, or␤by assigning the Seq into an array)␤  in block <unit> at /tmp/D_RZgPPlr9 line 1␤␤»
16:19 perlpilot ah.
16:20 timotimo if i had known, i would have been able to use indices
16:20 grondilu m: say (@=[<O X> Xx 3] xx *).shift for ^10
16:20 camelia rakudo-moar ce5dc0: OUTPUT«[OOO XXX]␤[OOO XXX]␤[OOO XXX]␤[OOO XXX]␤[OOO XXX]␤[OOO XXX]␤[OOO XXX]␤[OOO XXX]␤[OOO XXX]␤[OOO XXX]␤»
16:20 grondilu m: say (@=|[<O X> Xx 3] xx *).shift for ^10
16:20 camelia rakudo-moar ce5dc0: OUTPUT«OOO␤OOO␤OOO␤OOO␤OOO␤OOO␤OOO␤OOO␤OOO␤OOO␤»
16:20 timotimo %)
16:20 grondilu meh
16:21 grondilu *
16:21 psch m: say {((|<O X> xx *) Xx @^a[1])[^@a[0]]}(3, 4)
16:21 camelia rakudo-moar ce5dc0: OUTPUT«Too many positionals passed; expected 1 argument but got 2␤  in block <unit> at /tmp/hbBI5tYDZj line 1␤␤»
16:21 * [Coke] wonders if he missed what the goal of the code to be golfed was.
16:22 psch m: say {((|<O X> xx *) Xx @^a[1])[^@a[0]]}([3, 4])
16:22 camelia rakudo-moar ce5dc0: OUTPUT«(OOOO XXXX OOOO)␤»
16:22 timotimo [Coke]: ask the user for two numbers. the first one will be the number of results, the second one will the the number of characters in each result
16:22 psch [Coke]: afaict "print $n strings of lenght $m alternating between only O and only X, starting with O"
16:24 psch my @^a juggling there is only neccessary if $n has to be the first character prompted for
16:24 psch well, and inside the argument brackets it has to be < prompt('>') xx 2 > of course
16:25 perlpilot m: say {((|<O X> xx *) Xx $^b)[^$^a]}(3, 4)
16:25 camelia rakudo-moar ce5dc0: OUTPUT«(OOOO XXXX OOOO)␤»
16:25 psch but yeah, that's pretty much a variation on timotimos shift attempt above
16:25 psch perlpilot: ohh.  i thought that was in order of apperance, not lexicographically?
16:26 blue_lizzard joined #perl6
16:28 perlpilot psch: the only place it's mentioned is S06:1903 I think.  Easy to miss.
16:28 synopsebot6 Link: http://design.perl6.org/S06.html#1903_I_think
16:28 perlpilot blah S06:1903
16:28 synopsebot6 Link: http://design.perl6.org/S06.html#line_1903
16:29 perlpilot S06:1903  # blah
16:29 synopsebot6 Link: http://design.perl6.org/S06.html#1903
16:29 [Coke] the original had newlines between. doesn't matter?
16:31 molaf joined #perl6
16:31 psch m: {((|<O X> xx *) Xx $^b)[^$^a]}(3, 4)>>.say
16:31 camelia rakudo-moar ce5dc0: OUTPUT«OOOO␤XXXX␤OOOO␤»
16:32 [Coke] m: say @ARGS; #should this point the user to @*ARGS ?
16:32 camelia rakudo-moar ce5dc0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/95U50oqhdl␤Variable '@ARGS' is not declared␤at /tmp/95U50oqhdl:1␤------> 3say 7⏏5@ARGS; #should this point the user to @*␤»
16:34 [Coke] m: {((|<O X>xx*)Xx$^b)[^$^a]}(3, 4)>>.say #don't need that whitespace, fwiw.
16:34 camelia rakudo-moar ce5dc0: OUTPUT«OOOO␤XXXX␤OOOO␤»
16:39 grondilu aren't anonymous vars stateful by default?
16:40 grondilu m: say ($ = rand) xx 3
16:40 camelia rakudo-moar ce5dc0: OUTPUT«(0.873389677186383 0.873389677186383 0.873389677186383)␤»
16:40 grondilu ^ok
16:40 grondilu m: say class { method foo
16:40 camelia rakudo-moar ce5dc0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/vRbGQyHmS8␤Missing block␤at /tmp/vRbGQyHmS8:1␤------> 3say class { method foo7⏏5<EOL>␤»
16:40 grondilu m: say class { method foo { $ = rand } }.foo xx 3
16:40 camelia rakudo-moar ce5dc0: OUTPUT«(0.12095567275021 0.949202130224687 0.528641531443544)␤»
16:41 grondilu m: say class { method foo { state $ = rand } }.foo xx 3
16:41 camelia rakudo-moar ce5dc0: OUTPUT«(0.0667398521920298 0.0667398521920298 0.0667398521920298)␤»
16:41 grondilu m: say sub { $ = rand }() xx 3
16:41 camelia rakudo-moar ce5dc0: OUTPUT«(0.42887390855944 0.0981274916362383 0.726979193199287)␤»
16:42 grondilu m: say sub { state $ = rand }() xx 3
16:42 camelia rakudo-moar ce5dc0: OUTPUT«(0.606978223312708 0.410643969659601 0.241039878874842)␤»
16:42 grondilu that's slightly confusing
16:42 grondilu ok I suppose a new sub is made each time.
16:43 grondilu m: say ($ = sub { state $ = rand })() xx 3
16:43 camelia rakudo-moar ce5dc0: OUTPUT«(0.685959262855442 0.850307852496684 0.959541707007263)␤»
16:43 grondilu m: say (state $ = sub { state $ = rand })() xx 3
16:43 camelia rakudo-moar ce5dc0: OUTPUT«Cannot find method 'Any'␤  in block <unit> at /tmp/zr0wrj1hrS line 1␤␤»
16:43 psch ...neat
16:43 grondilu m: say (state $ = sub { state $ = rand })() for ^3
16:43 camelia rakudo-moar ce5dc0: OUTPUT«Cannot find method 'Any'␤  in block <unit> at /tmp/eQvnQ_pq0I line 1␤␤»
16:44 grondilu m: say (& = sub { state $ = rand })() for ^3
16:44 camelia rakudo-moar ce5dc0: OUTPUT«0.667076751686091␤0.239240499621915␤0.923056760645881␤»
16:45 psch m: state $ = sub { }
16:45 camelia rakudo-moar ce5dc0: ( no output )
16:45 psch m: (state $ = sub { })()
16:45 camelia rakudo-moar ce5dc0: ( no output )
17:07 zakharyas joined #perl6
17:09 sue joined #perl6
17:14 Actualeyes left #perl6
17:16 gregf_ m: say (& = sub { state $ = rand } ).^name
17:16 camelia rakudo-moar ce5dc0: OUTPUT«Sub␤»
17:17 gregf_ m: say (sub { state $ = rand } ).^name
17:17 camelia rakudo-moar ce5dc0: OUTPUT«Sub␤»
17:17 [Coke] MadcapJake: did you just open 127989?
17:18 [Coke] A code sample showing the code to generate the bad output would be great.
17:18 psch m: say (state $ = sub { state $ = rand } ).^name
17:18 camelia rakudo-moar ce5dc0: OUTPUT«Sub␤»
17:19 cale2 joined #perl6
17:19 Juerd Is there any difference between a bare '$' and 'state $'?
17:24 infina joined #perl6
17:25 tailgate what do I do to remove the last character from a string?
17:26 [Coke] m: "what?".chop.say
17:26 camelia rakudo-moar ce5dc0: OUTPUT«what␤»
17:26 gregf_ m: say [ $, state $ ].map: { [ $_.^name, $_ ] }
17:26 camelia rakudo-moar ce5dc0: OUTPUT«([Any (Any)] [Any (Any)])␤»
17:26 gregf_ chop?
17:33 _mg_ joined #perl6
17:36 sortiz joined #perl6
17:37 sortiz \o #perl6
17:38 vendethiel- o/
17:38 domidumont joined #perl6
17:45 timotimo \o
17:48 perlpilot tailgate: why do you want to remove the last character of a string OOC?
17:51 * [Coke] catches another 10 seconds of footage on the latest portuguese captain america teaser. :)
17:52 cale2 left #perl6
18:04 CIAvash joined #perl6
18:08 sno joined #perl6
18:12 ufobat joined #perl6
18:14 domidumont1 joined #perl6
18:20 infina joined #perl6
18:21 kurahaupo joined #perl6
18:21 * ufobat cries over his broken laptop
18:22 * moritz hugs ufobat
18:22 ufobat :-)
18:26 timotimo :(
18:26 timotimo mein beileid~
18:37 ufobat i am a victim of the dell pro support
18:37 timotimo >:(
18:37 ufobat my touchpad was semi broken, it got replaces, speakers sounded like a old modem.... then everything else was replaced.
18:38 ufobat the new touchpad is completly broken, and is getting so hot after a while...
18:38 ufobat but after 2 replacements dell will not create a new call for a 3rd hardware replacment. the technican told me i probably get a offer for a new notebook now.. :/
18:38 ufobat bla
18:38 ufobat anyway :D
18:39 ufobat i've got a newbie question again
18:39 ufobat m: sub bar {try {return foo; CATCH {given X::AdHoc {say "caught "}}}}; sub foo {die 1}; bar(); say "okay"
18:39 camelia rakudo-moar ce5dc0: OUTPUT«caught ␤1␤  in sub foo at /tmp/SDcMycTRvT line 1␤  in sub bar at /tmp/SDcMycTRvT line 1␤  in block <unit> at /tmp/SDcMycTRvT line 1␤␤»
18:39 timotimo personally, i'm pretty fond of lenovo support
18:39 ufobat <3 lenovo
18:39 timotimo will be AFK for a bit
18:39 stmuk_ I only really trust Apple and Lenovo laptops - and the latter less so recently
18:39 ufobat i've got a lenovo keyboard because i like the trackpoint so much
18:40 timotimo ufobat: you accidentally wrote "given" instead of "when"
18:40 ufobat omg
18:41 ufobat thanks!
18:43 tony-o MadcapJake: that's really bad.  i guess 'no' is the answer to your question
18:47 * masak can't help but think of Perl 6 when he sees an article called "Good Software Takes Ten Years. Get Used To it."
18:47 masak http://www.joelonsoftware.com/articles/fog0000000017.html
18:47 masak (written 15 years ago)
18:48 jjido joined #perl6
18:52 spider-mario joined #perl6
18:56 Xliff joined #perl6
18:59 stmuk_ I have a shirt with
18:59 stmuk_ https://www.einval.com/~steve/DebianT/grolsch-debian-open.gif
19:00 stmuk_ "we only release it when it's ready"
19:03 jamesneko joined #perl6
19:04 infina joined #perl6
19:05 infina joined #perl6
19:06 jack_rabbit joined #perl6
19:09 Xliff MadcapJake, sorry to be the bearer of bad news but p6-MyHTML is still generating SEGVs. I'm currently running on my Linux host, so it is not a problem limited to my VM.
19:10 MadcapJake awesome /s
19:10 MadcapJake :P I wonder what could cause it to work for me and not for you?
19:11 MadcapJake Is your host 32 bit?
19:11 MadcapJake [Coke]: ok, commenting now
19:13 [Coke] MadcapJake: danke
19:13 Xliff MadcapJake, host is 64-bit. VM is 32-bit.
19:13 Xliff Same error.
19:13 MadcapJake tony-o: You could just send a json of all the modules to the browser and then use fuse (a client-side JS fuzzy search engine) to give you per-character search
19:13 Xliff I'm writing up a gist, now.
19:15 polyfloyd left #perl6
19:15 Xliff https://gist.github.com/Xliff/80881b4b3f025af3a5cd1c0f95d4cca2
19:15 Xliff ^^ MadcapJake
19:16 dwarring joined #perl6
19:16 Xliff Over 2000 packages to update to go from Ubuntu 15.10 to 16.04... o_O
19:17 MadcapJake seriously...RT doesn't accept pre code blocks...
19:18 Xliff I wonder if I can recompile moar with debugging info.
19:19 MadcapJake omg I am totally fumbling with RT, now > does block quotes, is this markdown? I thought it was email style?
19:25 Sound joined #perl6
19:26 mst > is quotes, just like it is in email
19:28 moritz except for Larry, who use : for quoting :-)
19:30 DrForr Xliff: If you're using it in a vm there's supposedly an open-source version of the VirtualBox tools that fix a lot of issues.
19:32 vendethiel- masak: I can't think of anything when I read "good software", myself :P
19:32 Xliff DrForr, It's not an issue of VM or non-VM anymore.
19:33 Xliff I'm currently dual-booted to Linux and the same SEGV occurs in the same place.
19:33 Xliff Although I will look into the VB tools, as you've suggested. Thanks for the hint.
19:33 masak vendethiel-: :)
19:34 DrForr Ah. I don't know the circumstances, I'm just echoing something I saw on FB.
19:35 Xliff No worries.
19:36 Xliff So I'm trying to get debugging info into libmoar... and I don't know if I'm having much luck
19:36 Xliff Will find out, shortly.
19:38 MadcapJake mst: huh I thought in email you still had to do <blockquote> or somesuch
19:39 mst that's HTML, my email is plain text
19:39 MadcapJake Xliff
19:40 MadcapJake Xliff: nine_ taught me a great gdb command: `call MVM_dump_backtrace(tc)`
19:40 Xliff OK
19:41 Xliff Hum
19:41 MadcapJake mst: huh thought they were all the simplified email html format
19:41 Xliff $1 = 0
19:41 mst MadcapJake: wut
19:41 Xliff Maybe I need to be in the proper frame?
19:41 mst MadcapJake: I. er. I'm 33 and you just made me feel old.
19:41 mst MadcapJake: HTML email is an abomination, damnit :P
19:41 blue_lizzard joined #perl6
19:42 * skids pines for the days of USENET.
19:42 MadcapJake lol sorry! not much younger than you but I thought that plaintext email was completely gone from our world :P
19:42 skids Not at all.
19:43 Xliff I still use USENET
19:43 skids Go try posting HTML on lkml and see how much of your clothing is not melted to your flesh afterwards.
19:44 mst MadcapJake: my mail client doesn't even render HTML email
19:44 mst if there's no plain text part, generally I delete it unread
19:44 skids (Why something with the stated goal of human readability ended up like HTML did has always mystified me.)
19:45 Xliff I swear I can't get any debugging symbols into libmoar.so
19:45 MadcapJake where does it say html was designed for human readability?
19:45 skids (At least with SGML you could write more or less normally once you agreed on a DTD.)
19:46 skids Well, I guess maybe XML was the one making that claim.
19:46 skids That's hw I rmember it being sold, at the time.
19:46 MadcapJake html was designed to make the resultant page readable :)
19:48 zakharyas joined #perl6
19:49 vendethiel- html was designed so that electron could be used to build desktop applications :)
19:49 mst skids: old school semantic HTML is pretty reasonable
19:49 MadcapJake I actually think the move away from divs/spans in HTML5 is a huge step forward towards readability.
19:49 mst skids: see the source to trout.me.uk
19:49 mst MadcapJake: in favour of what? I'm still using tables
19:49 Xliff Waitasec?!
19:49 Xliff What is HTML5 replacing div's with?
19:50 Xliff And spans are evil.
19:50 MadcapJake mst: main, section, article, aside ,details, header, footer, nav, and more
19:50 mst oh, neat
19:50 mst span IIRC is mostly for hanging CSS off
19:50 mst beats <font>
19:50 Xliff True enough
19:51 MadcapJake span is an inline div
19:51 mst except a span isn't a box by default and a div is
19:51 mst so I don't think that's a good explanation of it
19:51 MadcapJake right, that's what i mean by "inline"
19:52 MadcapJake mst: actually though div has zero semantics technically, besides the fact that css does allow you to treat it like a box
19:53 MadcapJake but you could just use it to give things within certain properties and the div would be completely invisible
19:55 Xliff <div> - division?
19:55 MadcapJake html has two levels of interaction really: block and inline and div/span are respectively the zero-semantics tools to manipulate at each level.
19:56 Xliff So without div and span how is styling going to work?
19:56 MadcapJake Xliff: they aren't gone.
19:56 MadcapJake Xliff: and really the new tags have very little meaning (if any) outside of what you provide
19:57 sivoais joined #perl6
19:57 MadcapJake The point is, what is more readable <div class="main"></div> or <main></main>
19:58 MadcapJake It's like a DSL for divs xD
19:58 Xliff Ah. Gotcha.
19:58 Xliff HTML with a custom DTD?
20:00 MadcapJake yeah I think :P
20:00 MadcapJake not really knowledgeable on XML/SGML/DTDs
20:01 jamesnek1 joined #perl6
20:01 MadcapJake Xliff: I pushed a better test for the Raw stuff, give that one a go and see if it works (the code in your snippet doesn't appear current)
20:01 ufobat what does this mean: Missing serialize REPR function for REPR MVMContext? i am getting if from a my $dbh will leave { .dispose } = get-dbiish;
20:02 skids It means something is trying to be precomped which cannot be precomped.
20:02 skids Maybe a constant?
20:02 Xliff MadcapJake, OK
20:03 Xliff There we go. No more segfault.
20:03 Xliff I still don't get why my pull over an hour ago didn't get the latest code from origin/master
20:03 ufobat no :/
20:04 dolmen joined #perl6
20:04 MadcapJake Xliff: huh not sure!
20:04 Xliff Yup! I can run eg/attributes-high.pl6 with no problems now.
20:04 MadcapJake YESSSS! :D
20:05 Xliff Wonder what you changed. I will have to look at the last patch.
20:05 Xliff MadcapJake++
20:05 skids ufobat: I might have a more helpful hint if I had any clue what an MVMContext was (darn smurf words)
20:05 MadcapJake w00t w00t! My first user of my module xD Xliff++
20:05 Xliff =D
20:06 zacts joined #perl6
20:06 MadcapJake Xliff: I changed a lot, for one I moved all the raw into ::Raw (the only NativeCall pragma is in that file)
20:06 ufobat skids, no worries, i dont know nothing. if i do a $dbh.dispose in the end of my method it's fine
20:06 MadcapJake Xliff: all other module files are for sugary goodness :P
20:06 ufobat skids, the only "odd" thing i am doing is that my method is in a $coderef with .assuming
20:07 llfourn_ joined #perl6
20:07 geekosaur could this be related to the eval thing?
20:07 skids It could be EVAL related, .assuming still does that.
20:07 Xliff MadcapJake, Yeah. I noticed that. Was doing something similar in Audio::OggVorbis
20:07 geekosaur I was thinking more that EVAL is only the most visible version of it
20:08 Xliff Now why is SMPlayer not playing videos under Ubuntu? Maybe time for a reboot. BBL
20:08 Ven joined #perl6
20:08 MadcapJake Xliff: It helps with precomp time, I've noticed
20:08 geekosaur `will leave` happens at compile time but the block you pass it is at runtime; I believe these are as yet unfixed instances of the same failure
20:09 geekosaur which is that something run at compile time gets its stuff compiled into a separate context, but if that stuff includes a runtime block then it gets serialized missing its context, because the context only exists at compile time
20:09 geekosaur (as I understand it, at least)
20:11 geekosaur it's somewhat complex, it's obviously not that all such things will do that, it's only certain circumstances that trigger it. EVAL is a more consistent one but I recall seeing mention that phasers are also capable of triggering it under some circumstances
20:11 skids .oO(In order to understand how the word "context" is being used, you have to know the context.  Heh.)
20:11 geekosaur but that specific error is generally an indication that something didn't get a compile time context serialized for use at runtime
20:12 grondilu have you guys checked the article on HN about a new floating point type?  http://ubiquity.acm.org/article.cfm?id=2913029
20:14 [Coke] .seen flussense
20:14 yoleaux I haven't seen flussense around.
20:14 [Coke] .seen flussence
20:14 yoleaux I saw flussence 29 Feb 2016 20:55Z in #perl6: <flussence> (except for their idiotic anti-harvester mangling @array sigils)
20:15 masak grondilu: oh, interval math. nice.
20:18 cdg joined #perl6
20:19 Xliff joined #perl6
20:21 Xliff *sigh*
20:21 Xliff Ubuntu desktop FAIL. No environment after I upgraded.
20:25 firstdayonthejob joined #perl6
20:31 dalek ecosystem: 9db28f2 | jnthn++ | META.list:
20:31 dalek ecosystem: Add App::MoarVM::HeapAnalyzer.
20:31 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/9db28f2930
20:32 colomon joined #perl6
20:33 ZoffixWin joined #perl6
20:33 ZoffixWin joined #perl6
20:43 zacts are there any plans for a physical Perl6 book to be in print?
20:43 zacts (a la Programming Perl by O'Reilly press, or something)
20:43 ufobat night :D
20:48 as joined #perl6
20:49 colomon joined #perl6
20:55 jnthn zacts: Yes, plans, and even writing work in progress I believe.
20:57 zacts oh nice!
21:05 dogbert2 anyone up for some new documentation bashing?
21:06 dogbert2 tried to write some documetation for list.sum, strangely enough it's missing atm
21:06 dogbert2 it can be found here: https://gist.github.com/dogbert17/caa982701d8276c034a029a194c21eca
21:09 * masak looks
21:09 dogbert2 Hooray
21:10 masak s/unless all elements can be coerced/if an element can not be coerced/, perhaps?
21:10 dogbert2 sure
21:11 dogbert2 updated
21:11 masak rest looks fine
21:11 dogbert2 The it will go in :), thx for the review
21:11 dogbert2 *Then
21:22 TEttinger joined #perl6
21:25 grondilu is there an idiomatic way to parallelize something like this:  my @result; for @a -> $a { for @b -> $b { push @result, work($a, $b) } }   ?
21:25 tbrowder joined #perl6
21:26 grondilu forgot to mention:  the order of entries in @result does not matter.
21:27 dalek doc: f0e14bf | (Jan-Olof Hendig)++ | doc/Type/List.pod:
21:27 dalek doc: Added documentation for method sum
21:27 dalek doc: review: https://github.com/perl6/doc/commit/f0e14bffd7
21:28 mst grondilu: isn't that what .race is for?
21:28 grondilu tell me more.
21:29 mst err, I just remember somebody mentioning it at some point
21:29 mst now you get to find the docs and learn things I don't know, sorry
21:31 colomon joined #perl6
21:31 maybekoo2 joined #perl6
21:33 ZoffixWin grondilu, there's race, but it's a bit iffy
21:33 ZoffixWin (buggy)
21:34 ZoffixWin for @a.race -> $a { for @b.race -> $b { push @result, work($a, $b) } }
21:34 ZoffixWin That'll use batches of 64. Adjust it depending on whether you have a ton of fast things or a few of slow things
21:34 ZoffixWin http://docs.perl6.org/routine/race
21:35 grondilu thanks.  I had no idea it was this powerful.
21:35 ZoffixWin m: sleep 1 for ^4 .race: :1batch; say now - INIT now
21:35 camelia rakudo-moar ce5dc0: OUTPUT«1.00760413␤»
21:35 ZoffixWin ^ 4 one second sleeps; 1 second total runtime
21:36 tbrowder doc: please review <https://github.com/perl6/doc/pull/465>
21:36 grondilu very cool
21:37 jnthn Uh...don't push to an array from multiple things you're racing :)
21:37 ZoffixWin robot  #127965
21:37 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=127965
21:37 ZoffixWin jnthn, oh :(
21:37 jnthn Also, unless the number of items in @a is less than the number of CPU cores you have, parallelizing the inner and outer loop is probably too much work
21:37 jnthn Uh, *work division
21:39 ZoffixWin tbrowder, +1 looks good to me
21:39 jnthn my @result = @a.race.map(-> $a { slip @b.map(-> $b { work($a, $b) }) }) # or so
21:39 ZoffixWin Also, I didn't even realize >>=>> wouldn't work :)
21:40 grondilu jnthn: can I use the push method with hyper then?
21:41 zacts joined #perl6
21:41 jnthn grondilu: No, becuase that also means you're pushing from concurrent workers to a non-concurrent data structure (Array)
21:42 grondilu ok.
21:42 grondilu what about a gather/take then?
21:42 mst I kinda like the map + map version
21:43 grondilu the map + map looks too different from a non-parallel code IMHO
21:43 dalek doc: 4504706 | (Tom Browder)++ | doc/Language/unicode_texas.pod:
21:43 dalek doc: use nested [()] instead of (()) in sentence; specify that first list consists of single codepoints; add another table to document weird compositions such as the one explained by Larry Wall in a recent comment on bug #127965
21:43 dalek doc: review: https://github.com/perl6/doc/commit/4504706c3c
21:43 dalek doc: dcdf014 | (Tom Browder)++ | doc/Language/unicode_texas.pod:
21:43 dalek doc: Merge pull request #465 from tbrowder/master
21:43 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=127965
21:43 dalek doc:
21:43 dalek doc: use nested [()] instead of (()) in sentence; specify that first list …
21:43 dalek doc: review: https://github.com/perl6/doc/commit/dcdf014aff
21:43 grondilu I mean I'd like to stick with for loops
21:44 jnthn With a well-placed `do` or so you can :)
21:45 jnthn It's the `push`/mutation that's the thing to avoid
21:46 jnthn my @result = do for @a.race -> $a { slip do for @b -> $b { work($a, $b) } }
21:46 jnthn Or some such
21:47 jnthn If you really want to collect the results into something, then it's possible to make a Channel and .send them on it also, then get them out afterwards
21:49 jnthn I suspect that's still a decent bit more contention than the way I first suggested (and it's `for` spelling), though if work(...) is doing enough then that'd likely be noise.
21:50 jnthn *its
21:50 leont_ joined #perl6
21:55 grondilu the do for will do fine, thanks.
21:56 jnthn :)
21:56 jnthn Sleep time for me...'night o/
21:59 kid51 joined #perl6
22:00 jamesneko joined #perl6
22:10 grondilu hum... do doesn't do well with imbricated fors
22:10 grondilu m: say do for ^2 { for ^2 { rand } };
22:10 camelia rakudo-moar ce5dc0: OUTPUT«(Nil Nil)␤»
22:10 grondilu oh wait I need two do
22:11 grondilu m: say do for ^2 { |do for ^2 { rand } };
22:11 camelia rakudo-moar ce5dc0: OUTPUT«(0.941930929386464 0.593323531184251 0.518306449759161 0.784756936870671)␤»
22:11 grondilu ok
22:11 Sgeo joined #perl6
22:12 grondilu "I needed two do for doing what I wanted to do"   lol
22:12 timotimo joined #perl6
22:16 adu joined #perl6
22:20 masak 'night, #perl6
22:41 leont_ joined #perl6
22:41 ajr_ joined #perl6
22:43 ajr_ Has anyone encountered a problem with !# perl6 on vim? That line appears to send vim off on an adventure that only kill -9 will end.
22:44 ajr_ (Any path to perl6 apprears to be a problem, while plain perl is fine.)
22:44 tomboy64 joined #perl6
22:47 colomon joined #perl6
22:50 kurahaupo joined #perl6
22:52 Herby_ joined #perl6
22:52 Herby_ Afternoon, #perl6!
22:52 Herby_ o/
22:52 sortiz \o Herby_
22:56 tbrowder joined #perl6
22:59 Herby_ how does one iterate through all matches of a global regex?
22:59 Herby_ m: my $string = "abc\n cde\n fgh"; say ~$/<alpha> if $string ~~ m:g/ $<alpha>=(\w+) /;
22:59 camelia rakudo-moar ce5dc0: OUTPUT«Type List does not support associative indexing.␤  in block <unit> at /tmp/fPgvomR_Yn line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/fPgvomR_Yn line 1␤␤»
22:59 Herby_ was playing with it today, couldn't quite figure it out
23:02 tbrowder doc: pod processing is not handling format codes such as E<>, S<>, and I<>, at least in tables. Where in the pod processing code is the right place to start to fix that?  is the code to fix that to be found?
23:07 sortiz m: my $string = "abc\n cde\n fgh"; if $string ~~ m:g/ $<alpha>=(\w+) / { for @$/ { say $_<alpha> } }; # Herby_
23:07 camelia rakudo-moar ce5dc0: OUTPUT«「abc」␤「cde」␤「fgh」␤»
23:08 Herby_ great, thanks!
23:08 Herby_ I was trying all manners of things but not quite that
23:09 sortiz yw
23:19 tbrowder joined #perl6
23:24 timotimo Xliff: did you end up getting debug info working?
23:24 Xliff Nope
23:25 Xliff I've been searching the web, and I still can't find useful information on getting debugging symbols into rakudo.
23:25 Xliff I've found the --debug option in MoarVM's makefile, but by the time it's compiled and moved to the proper location, the symbols are gone.
23:26 Xliff So I'm wondering if there is a strip rule in the Makefile, somewhere.
23:28 Xliff Herby_, or you can assign the results of the smart match to an array.
23:29 Xliff m: my $string = "abc\n cde\n fgh"; my @m = $string ~~ m:g/ $<alpha>=(\w+) /; if (@a) { for @a -> $a { say $a<alpha> } }
23:29 camelia rakudo-moar ce5dc0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/LfXJqR8p5j␤Variable '@a' is not declared␤at /tmp/LfXJqR8p5j:1␤------> 3= $string ~~ m:g/ $<alpha>=(\w+) /; if (7⏏5@a) { for @a -> $a { say $a<alpha> } }␤»
23:29 Xliff m: my $string = "abc\n cde\n fgh"; my @m = $string ~~ m:g/ $<alpha>=(\w+) /; if (@m.elems > 0) { for @m -> $a { say $a<alpha> } }
23:29 camelia rakudo-moar ce5dc0: OUTPUT«「abc」␤「cde」␤「fgh」␤»
23:31 Herby_ Xliff: Thanks.  Thats the path I was going down earlier but I was some small bit
23:33 Herby_ s/missing//
23:33 Herby_ or is it s//missing/
23:33 Herby_ :(
23:34 tardisx joined #perl6
23:36 Xliff Herby_, I got the gist of it.=)
23:38 Xliff MadcapJake, getting SEGVs on the VM. This time I think it might be distro related.
23:40 nd3i joined #perl6
23:41 timotimo Xliff: sorry for taking so long to answer
23:41 timotimo Xliff: you just have to ./Configure.pl with --debug=3
23:41 timotimo and if you're debugging something nasty, you'll want to --optimize=1, too, so that not so many local variables get their value "optimized out"
23:42 nd3i I'm getting a crash with some simple code under the debugger (fine otherwise). Is that helpful to report?
23:43 nd3i I created a gist if anyone wants to take a look: https://gist.github.com/nd3i/1f5bca144d3e900f419d7b968ecd68f1
23:43 Xliff timotimo, is that done from the top-level Configure.pl or a deeper one?
23:43 Xliff timotimo, and thanks for the help!
23:45 timotimo moar's configure.pl, of course :)
23:46 stmuk_ https://www.reddit.com/r/perl6/comments/4gggdd/rakudo_star_release_201604/
23:46 timotimo moar's Configure.pl also accepts "--asan", but last time i tried it was bugged
23:46 stmuk_ that error sounds unlikely to me
23:47 timotimo stmuk_: rakudo really wants its source files to be utf8. maybe that user is using some other encoding that's incompatible? i.e. not latin-1
23:48 Xliff MadcapJake, https://gist.github.com/Xliff/80881b4b3f025af3a5cd1c0f95d4cca2
23:48 stmuk_ yes that sounds possible and I suspect user error somehow
23:49 Xliff timotimo, OK. Will try that. Back in a bit.
23:49 timotimo 'k
23:52 Xliff Now the big problem. If I've already built moar, how can I get the source tree cleaned up without nuking the entire installation?
23:52 timotimo god fucking damnit, could the connection stop being killed ...
23:52 timotimo you don't have to do anything
23:52 timotimo just run configure again, supply the right --prefix and "make install"
23:52 Xliff Cos I did: 'perl ./Configure.pl --gen-moar --backend=moar --moar-option='--debug=3' and it went right into the compiling. No Configure.pl output at all.
23:53 timotimo well, --gen-moar does compile for you
23:53 Xliff Yeah, but I've been here before and when I don't see output from Configure.pl I get no symbols.
23:53 timotimo you'd just go into moar's source folder and do the Configure there
23:53 Xliff Well, I will do a "make distclean" and just let it run and see.
23:53 timotimo that's not going to help
23:54 timotimo that'll only clean up rakudo, but not nqp or moar
23:54 damnlie joined #perl6
23:54 timotimo it could e that rakudo's Configure.pl doesn't know it has to completely re-make moar when --moar-option changes
23:55 Xliff Ahh! removing bin/nqp-m did the trick.
23:55 timotimo generally i'm not very happy about the --gen-moar stuff when you're compiler-internals-hacking
23:55 Xliff As you've stated, "make distclean" doesn't remove nqp.
23:56 timotimo yeah, Configure will build nqp and moar for you. the resultign makefile knows absolutely nothing about nqp or moar after that
23:56 Xliff Crap. Forgot to specify -O1
23:57 timotimo fortunately moar builds real fast
23:57 timotimo just have to -j4 it
23:59 timotimo which you can't do if you use the outermost Configure script

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

Perl 6 | Reference Documentation | Rakudo