»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:09 raschipi joined 00:13 mcmillhj joined
timotimo m: say (1..20).grep({ $++ %% 2 }) 00:14
camelia (1 3 5 7 9 11 13 15 17 19)
timotimo m: say (1..20).grep({ $++ !%% 2 })
camelia (2 4 6 8 10 12 14 16 18 20)
00:18 mcmillhj_ joined
raschipi m: say (1..20).grep(* %% 2 ) 00:19
camelia (2 4 6 8 10 12 14 16 18 20)
timotimo raschipi: well, that only works for the actual list of 1 through 20 :)
raschipi Which range wouldn't work? 00:20
timotimo <foo bar baz quux>
raschipi Oh, I see
timotimo though tbh i didn't read the original question 00:21
raschipi If you want steps instead of multiples, starting with the first, be it even or odd, and adding a step each time.
That range should wield 1 3 5 7 9 11 13 15 17 19 00:22
00:23 mcmillhj_ left 00:24 mcmillhj left 00:25 eliasr left 00:26 mcmillhj joined 00:29 Khisanth left 00:31 mcmillhj_ joined, mcmillhj left 00:36 mcmillhj_ left 00:42 mcmillhj joined, Khisanth joined 00:45 comborico1611 left 00:46 mcmillhj left 00:47 raschipi left 00:51 shareable6 joined, ChanServ sets mode: +v shareable6
skids m: sub f (:$a) { $a.say }; my $c = 2; f(:a(--$c), :a($c*=5)); $c.say # would I be right in calling this behavior wrong? 00:55
camelia 10
10
01:15 mcmillhj joined 01:16 wamba left 01:19 mcmillhj left 01:45 ilbot3 left 01:56 ilbot3 joined, ChanServ sets mode: +v ilbot3 01:59 jaush joined
jaush Greetings! I'm encountered a problem whilst attempting first-ever zef install: 02:03
kurahaupo skids: do you mean wrong for failing to warn about the duplicate :a ?
jaush "zef install --/test cro" on Windows, with Rakudo Star version 2018.04.1 built on MoarVM version 2018.04.1 02:04
Enabled fetching backends [path pswebrequest] don't understand git://github.com/jnthn/p6-docker-file.git You may need to configure one of the following backends, or install its underlying software - [git curl wget]
kurahaupo Obviously only one value can go in a named scalar parameter
jaush i understand how to go about fixing this (dependency whack-a-mole), but it seems that the module manager should *just work* 02:05
02:05 mcmillhj joined
jaush re. chasing dependencies, is there some ready-made package with *all* necessary dependencies for windows 10 64-bit? 02:06
02:09 mcmillhj left 02:44 mcmillhj joined 02:49 mcmillhj left
skids kurahaupo: wrong for not performing the --$c 02:52
02:56 mcmillhj joined 03:01 mcmillhj left 03:03 Herby__ joined
MasterDuke jaush: i'd suggest creating an issue at zef's github suggesting there be a perl-perl fallback or something like that 03:05
Herby__ evalable6: usage 03:11
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/9S0Vx229x8
Undeclared routine:
usage used at line 1
Herby__ releasable6: usage
releasable6 Herby__, I cannot recognize this command. See wiki for some examples: github.com/perl6/whateverable/wiki/Releasable
Herby__ releasable6: help 03:12
releasable6 Herby__, status | status link # See wiki for more examples: github.com/perl6/whateverable/wiki/Releasable
AlexDaniel evalable6: uptime
evalable6 AlexDaniel, 2 weeks, 2 days, 2 hours, 56 minutes, and 3 seconds, 524.46875MiB maxrss. This is Rakudo version 2018.04.1-35-g8cd70d1ee built on MoarVM version 2018.04-39-gc702f4c66 implementing Perl 6.c.
AlexDaniel Herby__: the bot was not restarted yet 03:13
Herby__ ahh
AlexDaniel and omg 2 weeks uptime that's rather impressive :)
524MiB maxrss looks fine also
Herby__ nice! Where do all those bots call home?
AlexDaniel it's on my server 03:14
by the way, I will probably update rakudo on the server now
to see if everything is alright with the upcoming release
Herby__ squashable6: help 03:16
squashable6 Herby__, Available commands: status, log, quiet, loud # See wiki for more examples: github.com/perl6/whateverable/wiki/Squashable
Herby__ squashable6: status
squashable6 Herby__, Next SQUASHathon in 13 days and ≈6 hours (2018-06-02 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
03:16 coverable6 left, greppable6 left, evalable6 left, benchable6 left
Herby__ I killed them! 03:16
03:17 DataLinkDroid joined 03:18 notable6 left, nativecallable6 left, bloatable6 left, quotable6 left, releasable6 left, reportable6 left, undersightable6 left, statisfiable6 left, unicodable6 left, squashable6 left, committable6 left, shareable6 left, bisectable6 left
AlexDaniel Herby__: nah, it's me updating stuff 03:20
Herby__: by the way, any luck running tests?
Herby__ some but I'm thinking perhaps that my virtualbox aint beefy enough for the tests 03:21
cause it either crashes or hangs
AlexDaniel hmm
Herby__ it has been a day or two though. i'll try running them again when i'm at my desktop and i'll see if i can get some specifics 03:22
03:22 greppable6 joined, ChanServ sets mode: +v greppable6, reportable6 joined, notable6 joined, ChanServ sets mode: +v notable6, jaush left, quotable6 joined, ChanServ sets mode: +v quotable6, committable6 joined, coverable6 joined, evalable6 joined, ChanServ sets mode: +v evalable6, bloatable6 joined 03:23 bisectable6 joined, ChanServ sets mode: +v bisectable6, releasable6 joined, nativecallable6 joined, ChanServ sets mode: +v nativecallable6, unicodable6 joined, benchable6 joined, ChanServ sets mode: +v benchable6, statisfiable6 joined, squashable6 joined, undersightable6 joined, ChanServ sets mode: +v undersightable6, shareable6 joined
AlexDaniel Herby__: back online :) 03:24
03:24 mcmillhj joined
Herby__ greppable6: usage 03:24
greppable6 Herby__, Like this: greppable6: password # See wiki for more examples: github.com/perl6/whateverable/wiki/Greppable
Herby__ huzzuh!
greppable6: lookahead 03:25
greppable6 Herby__, 35 lines, 10 modules: gist.github.com/b7d807bf43c223de81...49f7c9fcef
Herby__ i never actually checked out the returned gist before. that's pretty handy 03:26
03:29 mcmillhj left 03:33 kybr left
Herby__ github.com/perl6/whateverable/blob...eppable.p6 03:34
AlexDaniel: do you know what is planned for that sub "process-ls-line" ? 03:35
AlexDaniel it works but is not markdownified
treegrep: foo
greppable6 AlexDaniel, gist.github.com/b79dd0c95ffdfd69c7...92ba0e66db
AlexDaniel ↑ that's the feature
Herby__: here's the ticket: github.com/perl6/whateverable/issues/210 03:36
hmmm maybe whateverable repo shouldn't be referring to perl 6 as 6lang :) 03:37
03:38 kybr joined
AlexDaniel it sends a wrong message I think… especially given that it's perl6 github org 03:38
03:40 stmuk joined
Herby__ greppable6: 6lang 03:40
greppable6 Herby__, 1 lines, 1 modules: gist.github.com/33e87bde740d431b7d...92b3d5e97d
03:42 stmuk_ left 03:44 Herby__ left 03:52 DataLinkDroid left 03:54 mcmillhj joined 03:56 benjikun joined
benjikun Does anyone here know how I can do html templating with cro 03:56
03:58 entonian joined 03:59 mcmillhj left 04:02 yy6p6 joined
yy6p6 hi 04:02
how can I generate an executable for a file?
I want a jar
I use 04:03
./perl6-j --target=jar --output="hello.jar" hello.p6
in hello.p6 i have
sub MAIN(){ say "hi"; }
evalable6 hi
benjikun I see a thread in which he uses `perl6 --target=jvm --output=name.jar name.p6` 04:05
yy6p6 java -jar hello.jar >>>>> no main manifest attribute, in hello.jar
benjikun you probably have to add a manifest file manually then 04:07
04:07 entonian left
yy6p6 @benjikun if I use --target=jvm I get null pointer exception; here github.com/rakudo/rakudo/blob/nom/...unning.pod it says that jar is an option 04:07
I think I did not write that MAIN sub as it should be 04:08
but I am not sure
benjikun Oops, jar is the correct option 04:09
Apparently you can't run the jar that's created with any typical JVM
According to this thread, there's some script that hasn't been implemented in rakudo to do this yet 04:11
yy6p6 I used rakudo
benjikun github.com/perl6/nqp/blob/standalo...-script.sh
yy6p6 isn't thare compiler that can do this? :( 04:12
MasterDuke yy6p6: the jmv rakudo has some known problems 04:13
recommend pinging bartolin if you have any questions, he's doing the most work on it right now 04:14
yy6p6 bartolin: is there any way to create a jar? 04:19
MasterDuke yy6p6: fyi, i don't know exactly what timezone he's in, but he isn't usually active around now 04:22
you can use the .tell command to leave him messages
yy6p6 thx 04:23
.tell
yoleaux Relay a telegram to someone
MasterDuke it's `.tell <name> <message>` 04:24
yy6p6 .tell bartolin is there any way to compile a file into an executable jar? 04:25
yoleaux yy6p6: I'll pass your message to bartolin.
04:31 mcmillhj joined 04:32 skids left, araraloren joined 04:36 mcmillhj left
TEttinger yy6p6: Java itself doesn't have a tool to compile a .java file into an executable jar, everything that does it just does the same steps you can by hand and makes a META-INF/MANIFEST.MF file with the main class in it 04:44
04:51 yy6p6 left 04:57 psychoslave joined 04:58 benjikun left 05:11 robertle joined 05:17 shareable6 left
Geth whateverable: sylints++ created pull request #318:
Resolve issue #297
05:18
05:19 mcmillhj joined 05:23 mcmillhj left 05:34 robertle left 05:37 ufobat_ joined 05:38 Herby_ left 05:40 xtreak joined 05:42 psychoslave left 05:48 pmmmmm joined 05:52 robertle joined 05:54 kurahaupo_ joined, kurahaupo left 05:55 kurahaupo joined 05:57 pmmmmm left 05:58 kurahaupo_ left 06:12 shareable6 joined 06:24 a3r0 left 06:32 dct left 06:48 ChoHag left, psychoslave joined, ChoHag joined 06:56 jmerelo joined
jmerelo squashable6: status 06:57
squashable6 jmerelo, Next SQUASHathon in 13 days and ≈3 hours (2018-06-02 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
07:04 sauvin_ joined 07:07 xtreak left
araraloren :) 07:15
07:25 avalenn left 07:28 a3r0 joined 07:32 rindolf joined 07:34 psychoslave left 07:46 HaraldJoerg joined 07:52 psychoslave joined 07:53 sauvin_ is now known as Bocaneri
Geth doc: 455ea24476 | (JJ Merelo)++ | doc/Language/traps.pod6
Explains sinkage of maps, closes #1718
08:02
doc: f2edaa34f9 | (JJ Merelo)++ | doc/Type/Mu.pod6
Clarified say return value closes #2033
synopsebot Link: doc.perl6.org/language/traps
Link: doc.perl6.org/type/Mu
08:11 isBEKaml joined 08:13 darutoko joined 08:25 mcmillhj joined 08:29 mcmillhj left 08:45 psychoslave left
Geth doc: 2b6644b411 | (JJ Merelo)++ | doc/Language/nativecall.pod6
Adds indexing to CArray methods

Changes the CArray index itself to the CArray methods section, and makes small corrections on this section. Closes #2032.
08:46
synopsebot Link: doc.perl6.org/language/nativecall
08:50 isBEKaml left, isBEKaml joined 08:51 isBEKaml left 08:52 isBEKaml joined 08:53 domidumont joined, shareable6 left 08:59 domidumont left 09:00 domidumont joined 09:01 ufobat_ left 09:20 |oLa| left 09:28 FROGGS joined 09:33 isBEKaml left 09:47 shareable6 joined, ChanServ sets mode: +v shareable6 09:48 eliasr joined 09:57 espadrine_ joined 10:18 ufobat_ joined 10:44 ExtraCrispy left, ExtraCrispy joined 10:45 ExtraCrispy left, ExtraCrispy joined 10:46 shareable6 left 10:57 markong joined 11:13 ufobat_ left 11:29 psychoslave joined 11:32 ChoHag left 11:35 shareable6 joined, ChanServ sets mode: +v shareable6, psychoslave left, psychoslave joined 11:40 psychoslave left, psychoslave joined 11:49 FROGGS left 11:50 HaraldJoerg1 joined 11:52 HaraldJoerg left 11:57 wamba joined 12:01 jmerelo left
moritz ZofBot: please ping me in ##taustation when you're online; I have a few ideas regarding tau-alerts that I'd like to discuss with you 12:02
12:02 kaare__ left 12:03 shareable6 left 12:07 zakharyas joined 12:22 grumblr joined 12:23 grumble left, mcmillhj joined, grumblr is now known as grumble 12:30 psychoslave left, psychoslave joined 12:35 psychoslave left, psychoslave joined 12:50 psychoslave left, psychoslave joined 12:55 psychoslave left, psychoslave joined 12:57 shareable6 joined, ChanServ sets mode: +v shareable6 13:00 psychoslave left, ChoHag joined, psychoslave joined 13:04 atroxaper joined 13:05 psychoslave left, psychoslave joined 13:20 bazzaar joined
bazzaar o/ perl6 13:20
13:21 mcmillhj left 13:22 mcmillhj joined
timotimo o/ 13:24
bazzaar hi, does anyone know why I might get "Failed to find dependencies: python2-config" running "zef install Inline::Python", when python2-config is in /usr/bin. [Rakudo Star 2018-04]? 13:25
13:25 mahafyi joined
timotimo hm, if you have rakudo star 2018-04, surely your zef is new enough to understand that directive? 13:27
what's the zef version? i think you get it from "zef info zef"
bazzaar timotimo: Identity: zef:ver<0.4.2>, ... Installed: Yes, as zef:ver<0.3.1> 13:30
timotimo hm, maybe update that?
i have zef:ver<0.2.2> there and <0.4.2> available, but "zef install zef" doesn't think it should upgrade? hm. 13:31
ok, now it's up to date on my end, too 13:32
bazzaar it's the zef that came with Star 2018-04, I remember it installing I think? 13:33
13:33 mcmillhj left
timotimo ok, i see, 0.4.0 is only 4 days old 13:34
bazzaar not sure why "zef info zef" gives me two version numbers 13:37
timotimo well, one is the one available on the ecosystem, one is the one you have installed at the moment 13:38
El_Che install a local zef? zef --install-to=home install zef 13:40
and make sure ~/.perl6/bin is before the paths for star 13:41
timotimo that works?
like, literally putting "home" there?
13:45 Geth left, Geth joined, ChanServ sets mode: +v Geth 13:46 zakharyas left
bazzaar El_Che: just saw your hints, but "perl6 -Ilib bin/zef install ." seems to have found ....../rakudo-star-2018.04/install/share/perl6/site/bin automagically 13:52
13:52 titsuki joined
bazzaar now zef info zef reports ..... Identity: zef:ver<0.4.2>, Installed: Yes 13:53
13:55 psychoslave left 13:58 comborico1611 joined
bazzaar unfortunately I still get the same error with "zef install Inline::Python" ... "Failed to find dependencies: python2-config" 13:59
Geth doc: b0e67921af | (JJ Merelo)++ | 2 files
Adds a Type page for StrDistance

Closes #691
14:02
doc: c84098fd54 | (JJ Merelo)++ | 2 files
Gluing grapheme concepts

By de-indexing some of them, linking others, and generally reviewing what #891 requires. This closes #891 as far as the original issue title is concerned; however, I would say another issue should be open to actually explain how to work with that kind of regexes (if it's not done already)
14:03
doc: fe116ef5e7 | (JJ Merelo)++ | doc/Language/objects.pod6
Revises changes and adds some fixes.

  @skids' changes are OK, so this closes #1138
14:04
synopsebot Link: doc.perl6.org/language/objects
doc: 54d447c5a7 | (JJ Merelo)++ | doc/Language/operators.pod6
Revised text on hyperoperators

With some minor errors fixed, but basically checking that it addresses, and thus closes, #944
14:05
synopsebot Link: doc.perl6.org/language/operators
doc: 6d250e5f12 | (JJ Merelo)++ | 3 files
Adds warning about being non-spec

  (and some leftover change in StrDistance). Closes #1653
14:07
doc: 042b055c50 | (JJ Merelo)++ | 2 files
Adds documentation on how to build classes

Using the metamodel. Closes #1641
doc: 11cf24ea68 | (JJ Merelo)++ | doc/Language/operators.pod6
Revises docs on sequence operator

Since they are essentially the same, they only get one listing. However, they are indexed and mentioned separately. This closes #1621.
14:08
14:12 psychoslave joined, psychoslave left, psychoslave joined
bazzaar timotimo, El Che: thanks for your help :-) 14:14
14:18 psychoslave left
timotimo twitter.com/tef_ebooks/status/9531...6913056768 - look, publicity! 14:19
i see raiph already saw it, too
14:25 ufobat_ joined
comborico1611 That guy feels threatened by p6. 14:26
So he is trying to bash it, in hopes his fears don't come true.
bazzaar that poll question could only have given one result 14:27
timotimo i wouldn't fault the guy for that 14:30
also, note that these polls are a couple months old 14:31
14:33 skids joined 14:39 ilmari[m] left
timotimo i only saw this because a friend just retweetet a different poll from that thread 14:40
14:41 jnap_ left, jnap_ joined 14:42 jhill__ joined 14:43 mienaikage left, jhill_ left, mienaikage joined, robinsmidsrod left 14:46 ilmari[m] joined 14:47 robinsmidsrod joined 15:05 skids left 15:12 kurahaupo left 15:16 kaare__ joined 15:17 uzl joined 15:19 mcmillhj joined 15:23 kurahaupo joined 15:28 mahafyi left, jmerelo joined
uzl Hello! 15:30
jmerelo Hi!
timotimo ohai 15:32
15:33 molaf joined, peteretep left, scott left, zostay left
uzl Unlike the `if` statement, the statement `with` tests for definedness. Can somebody provide a simple example that highlights this difference? 15:34
jmerelo uzl: also topicalizes docs.perl6.org/language/control#in...2C_without 15:35
15:35 squashable6 left, statisfiable6 left, unicodable6 left, releasable6 left, bloatable6 left, committable6 left, coverable6 left, reportable6 left, labster left
jmerelo uzl: just try an if with something that is undefined... 15:35
lizmat m: with "foo".index("f") { say "found at $_" } # uzl 15:36
camelia found at 0
15:36 committable6 joined, reportable6 joined, coverable6 joined, bloatable6 joined, releasable6 joined, unicodable6 joined, statisfiable6 joined, squashable6 joined
lizmat m: if "foo".index("f") { say "found at $_" } # uzl 15:36
camelia ( no output ) 15:37
15:37 peteretep joined 15:38 Herby_ joined
Herby_ o/ 15:38
15:38 zostay joined, scott joined 15:44 mcmillhj left 15:48 wamba left
uzl lizmat: So the fact that the index of "f" is zero makes the if condition false, 15:50
which might not be what we wanted. 15:51
lizmat yes, as only non-zero numerics are true
indeed
in Perl 5 -1 would be returned
in Perl 6 it returns Nil if not found
uzl Does the with does the job of if defined in Perl 5? 15:52
lizmat yes, but more
as it also topicalizes
m: with 42 { say $_ }
camelia 42
uzl Oh great, thanks! 15:53
lizmat in perl 5 you would have to do something like: if (defined ($_ = 42)) { }
Juerd Is there a name for things that set $_? 15:55
lizmat topicalizers ? 15:56
Juerd tnx 15:57
El_Che I see it more as a Linda 15:58
uzl El_Che: Like a beautifier? 16:07
El_Che sure, why not :) 16:10
uzl It seems reasonable. It makes a lot of constructs looks cleaner. 16:14
So it's a Linda or un/una embellecedor/a! 16:15
16:18 bazzaar left
AlexDaniel .seen jstruder 16:20
yoleaux I haven't seen jstruder around.
AlexDaniel .seen jstuder
yoleaux I saw jstuder 1 Apr 2018 15:51Z in #perl6-dev: <jstuder> yeah, don't understand why it would be performing that op on the iterator itself though
16:20 raschipi joined 16:21 uzl left, uzl joined
Geth doc: a034aa85d0 | (JJ Merelo)++ | doc/Language/traps.pod6
Including @jnthn's explanations in the documentation.

The answers appeared in [this post in SO](stackoverflow.com/questions/504232...-context). Closes #1718 again :-)
16:33
synopsebot Link: doc.perl6.org/language/traps
16:47 Kaiepi left 16:49 Kaiepi joined 16:51 darutoko left 16:55 araraloren_ joined 16:58 araraloren left
Geth doc: b1551fe4db | (JJ Merelo)++ | doc/Language/variables.pod6
Clarifying list and item assignment.

This would close #1810. I have opted for deleting a single example and clarifying it by explaining it together with another example, and clarifying also what assignments we refer to in every line. It's a little less dense-ish, but my impression is that if there were better documentation supporting list and item context, this could probably go easily by just saying that list assignment occurs in list context, item assignment in item context. That documentation is not there yet, but when it's there, we might want to come back here to rewrite it completely.
17:03
synopsebot Link: doc.perl6.org/language/variables
cognominal Larry Wall embraced the qualification of perl as duct tape of Whatever. With Whatever varying over time (internet, web...). Vendethiel did not use the word but made a excellent presentation to that effect. slides.com/vendethiel/cool-subset-of-main#/ Perl 6 lives up to its reputation and will be poo pooed for that reputation. Interestingly Graeber duct taper is one of the category of second order bullshit jobs described by David 17:05
Greaeber in his eponymous book saying that it is an evergrowing category.
17:06 ChoHag left
cognominal Designing tools intended to be used using CLI being seen as the ultimate meta duct taping 17:08
raschipi Perl6 is the duct tape and WD-40 of whatever. And everyone knows how engineering works: www.taproot.com/content/wp-content/...cttape.jpg 17:14
17:18 uzl_ joined, uzl left 17:21 ChoHag joined
raschipi Another maxim is that Python is just linenoise nowadays. 17:22
jmerelo raschipi: since it includes @ in its "there's only one way to do it" syntax, it went down the drain. 17:25
Geth doc: 0a689ec802 | (JJ Merelo)++ | doc/Language/nativecall.pod6
Adds missing native types to list

The list includes also some that are not listed in the NativeCall code, but I guess that's OK. Closes #1511
17:26
synopsebot Link: doc.perl6.org/language/nativecall
raschipi Well, as far as I'm concerned there's still only one way to do it, but it's line noise: edxpiration.com/wp-content/uploads/...68x423.png 17:29
17:30 pmurias joined, ChoHag left 17:33 shareable6 left 17:36 shareable6 joined, ChanServ sets mode: +v shareable6 17:37 ChoHag joined
Geth doc: 25b5dcf4b8 | (Steve Mynott)++ | doc/Language/traps.pod6
typo
17:38
synopsebot Link: doc.perl6.org/language/traps
doc: dd1e3bd0f8 | (JJ Merelo)++ | doc/Language/testing.pod6
Adds "alternate test descriptions"

Tying it actually to using or not test routines in sink context, and using the example provided as an example. This closes #1586
17:40
synopsebot Link: doc.perl6.org/language/testing
17:45 shareable6 left 17:46 ChoHag left 17:47 ChoHag joined 17:56 mcmillhj joined 18:02 kaare__ is now known as kaare_ 18:10 shareable6 joined 18:20 araraloren_ left, isBEKaml joined 18:21 atroxaper left 18:25 slayergames joined
slayergames How does 1, 1, * + * ... * (Fibonacci sequence) work? Is it the ... operator? 18:27
18:28 espadrine_ left
jmerelo slayergames: that, and everything else. … is a "generator", that makes the * + * lazily generate the sequence. 18:29
slayergames is * a shortcut for a function? 18:30
jmerelo slayergames: * is called "Whatever"
slayergames: it's variable, actually, or rather a "slot". It might be a bit confusing here, since the two * mean a different thing, but maybe see this 18:31
m: say (1, 1, {$^a + $^b} ... Inf)[^30]
camelia (1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040)
jmerelo slayergames: so first * is actually the first argument of the generating expression, which I call here $^a, second * is $^b, third * means "All elements of this sequence", and can be substituted by Inf (or Infinity) 18:32
slayergames: ^30 is for the first 30 elements, as you might have seen.
slayergames: check out this bit of docs for Whatever docs.perl6.org/type/Whatever 18:33
m: say (1, 1, anon sub ($a, $b) {$a + $b} ... Inf)[40..50] 18:34
camelia (165580141 267914296 433494437 701408733 1134903170 1836311903 2971215073 4807526976 7778742049 12586269025 20365011074)
jmerelo slayergames: another way of writing the same: as an anonymous subroutine, which is what it is... (that's also in the documentation)
raschipi The first two splats make an anonymous subroutine, and the … sequence operator knows to feed it the last two values of the sequence. It also knows that when it gets a plat on the other side it means "keep going". 18:36
18:37 Birdman joined 18:38 domidumont left
raschipi m: say 1, 1, * + * ... * > 10 #Splat can also create a lambda on the right side 18:39
camelia (1 1 2 3 5 8 13)
18:44 Birdman left 18:48 zachk joined, zachk left, zachk joined
Geth doc: bb45ed4f7b | (Elena Merelo)++ (committed using GitHub Web editor) | README.es.md
Minor changes
18:49
doc: a8a0bcd0a9 | (Elena Merelo)++ (committed using GitHub Web editor) | README.es.md
Merge pull request #2031 from ElenaMerelo/patch-1

Minor changes
18:51 Ven`` joined 18:52 comborico1611_ joined 18:54 shareable6 left
slayergames how do you concisely represent the sequence of square numbers? is there any way other than (1 .. Inf).map(* ** 2)? 19:05
timotimo m: say (1, 2, 4 ... *)[^50] 19:07
camelia (1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536 131072 262144 524288 1048576 2097152 4194304 8388608 16777216 33554432 67108864 134217728 268435456 536870912 1073741824 2147483648 4294967296 8589934592 17179869184 34359738368 68719…
timotimo ... can do that for you :)
TEttinger m: say (1, 4, 9 ... *)[^50]
camelia Unable to deduce arithmetic or geometric sequence from 1,4,9 (or did you really mean '..'?)
in block <unit> at <tmp> line 1
timotimo m: say (1, 10, 11, 20, 21 ... *)[^20] 19:12
camelia Unable to deduce arithmetic or geometric sequence from 11,20,21 (or did you really mean '..'?)
in block <unit> at <tmp> line 1
timotimo how did this go again ...
m: say (0, 10, 11, 20, 21 ... *)[^20] 19:13
camelia Unable to deduce arithmetic or geometric sequence from 11,20,21 (or did you really mean '..'?)
in block <unit> at <tmp> line 1
timotimo i seem to recall something like that was also in there
19:15 Zoffix joined
Zoffix slayergames: the starting point of the sequence operator can take a Callable that gens the elements 19:16
m: say ({$++²} … ∞).head: 20
camelia (0 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361)
Zoffix $ is an anonymous state variable, and on each pull the ++ increments it by 1
19:16 avuserow left 19:17 Herby_ left
Zoffix
.oO( anonymous state WhateverStars... `say (٭++² … ∞).head: 20` )
19:18
19:18 avuserow joined 19:19 uzl__ joined 19:21 uzl_ left
Zoffix m: say (1, (*.sqrt+1)² … ∞).head: 20 19:22
camelia (1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400)
Zoffix :P
timotimo m: say (2, { $^a + 1 / $^a } ... *)[^20] 19:23
camelia (2 2.5 2.9 3.244828 3.5530104 3.834461842816 4.095254632258779 4.339439692724345 4.569884190357676 4.7887081163796905 4.997532704493449 5.197631445038131 5.390026771750771 5.575554607204394 5.754908962142979 5.92867365704575 6.097345447373015 6.261351…
timotimo m: say (2, 1 + 1 / * ... *)[^20] 19:24
camelia (2 1.5 1.666667 1.6 1.625 1.615385 1.619048 1.617647 1.618182 1.617978 1.618056 1.618026 1.618037 1.618033 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034)
timotimo m: say (2.FatRat, 1 + 1 / * ... *)[^20]
camelia (2 1.5 1.666667 1.6 1.625 1.615385 1.619048 1.617647 1.618182 1.617978 1.618056 1.618026 1.618037 1.618033 1.618034 1.618034 1.618034 1.618034 1.618034 1.618034)
Zoffix m: say (^20)».&[**]: 2
camelia (0 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361)
timotimo m: say (2.FatRat, 1 + 1 / * ... *)[^20]>>.nude
camelia ((2 1) (3 2) (5 3) (8 5) (13 8) (21 13) (34 21) (55 34) (89 55) (144 89) (233 144) (377 233) (610 377) (987 610) (1597 987) (2584 1597) (4181 2584) (6765 4181) (10946 6765) (17711 10946))
timotimo m: say (2.FatRat, 1 + 1 / * ... *)[100].nude
camelia (1500520536206896083277 927372692193078999176)
timotimo (i just saw a little video about this very series) 19:26
Zoffix What does the result give?
timotimo that's the golden ratio
Zoffix sqrt2 approximation?
m: say 8/5
camelia 1.6
Zoffix ah, right
timotimo what i didn't know about this before is that there's another value that is stable for this, which is 1 - phi 19:27
but if you're not close enough, you'll eventually swing around and land on phi itself again
19:28 jmerelo left
timotimo m: my @phis = (2.FatRat, 1 + 1 / * ... *); my @otherphi = (1 - @phis[200], 1 + 1 / * ... *); say @otherphi[^10, |(20, 30 ... 100)] 19:28
camelia ((-0.61803398874989484820458683436563811772030918 -0.61803398874989484820458683436563811772030918 -0.61803398874989484820458683436563811772030918 -0.61803398874989484820458683436563811772030918 -0.61803398874989484820458683436563811772030918 -0.618033…
timotimo cool, that's close enough, eh?
m: my @phis = (2.FatRat, 1 + 1 / * ... *); my @otherphi = (1 - @phis[100], 1 + 1 / * ... *); say @otherphi[^10, |(20, 30 ... 100)]
camelia ((-0.61803398874989484820459 -0.61803398874989484820459 -0.61803398874989484820459 -0.61803398874989484820459 -0.61803398874989484820459 -0.6180339887498948482046 -0.6180339887498948482046 -0.6180339887498948482046 -0.6180339887498948482046 -0.6180339…
timotimo m: my @phis = (2.FatRat, 1 + 1 / * ... *); my @otherphi = (1 - @phis[50], 1 + 1 / * ... *); say @otherphi[^10, |(20, 30 ... 100)]
camelia ((-0.6180339887499 -0.6180339887499 -0.6180339887499 -0.61803398875 -0.61803398875 -0.61803398875 -0.61803398875 -0.61803398875 -0.61803398875 -0.61803398875) -0.618033989 -0.618034 -0.618056 -1 1.619048 1.618034 1.61803399 1.6180339887 1.61803398875) 19:29
timotimo m: my @phis = (2.FatRat, 1 + 1 / * ... *); my @otherphi = (1 - @phis[10], 1 + 1 / * ... *); say @otherphi[|^10, |(20, 30 ... 100)]
camelia (-0.618056 -0.617978 -0.618182 -0.617647 -0.619048 -0.615385 -0.625 -0.6 -0.666667 -0.5 1.619048 1.618034 1.61803399 1.6180339887 1.61803398875 1.61803398874989 1.6180339887498948 1.618033988749894848 1.618033988749894848205)
timotimo there it swings around
it also does that in the one before, but it's in the second half of the output where the steps are far bigger 19:30
so not as nice to see
slayergames: did you get a good answer out of that? :D 19:31
slayergames yes 19:33
thanks
what is .&[**]?
timotimo ... is just super awesome in general
slayergames is .& some kind of map?
timotimo &[**] is syntactic sugar for &infix:<**>, i.e. the "real name" of the ** operator
slayergames oh 19:34
timotimo and foo.&bleh(bar) is syntax for &bleh(foo, bar)
well, bleh(foo, bar) really
since the & is not necessary when you're calling a sub
Zoffix slayergames: &[**] is short for &infix:<**> which is a noun form of the `2 ** 2` verb. The `.` is the method call. So you're using the operator as a method, giving the invocant as the first arg and in the eval above there's also the second arg: the power to raise the invocant into
slayergames i discovered perl 6 last week, it's really intuitive
Zoffix slayergames: and » is a hyper metaop, it hypers that method call over elements of that range, similar to how a map would work 19:35
slayergames is there a tk library for perl 6? 19:36
Zoffix (^20)».&[**]: 2 => (^20)».&[**](2) => (^20).map(* ** 2) => (0..19).map(* ** 2) # this is just equivalent for this case. hyper metaop has extra features like descending into iterables and autothreadin g
timotimo we don't have tk directly in perl6, but you can get a tk via Inline::Python or Inline::Perl5, or you can use GTK instead of TK
slayergames gtk library? link plz 19:37
19:37 kaare_ left
timotimo modules.perl6.org/search/?q=GTK - GTK::Simple or GTK::Simpler 19:38
time to start cooking dinner
19:48 espadrine_ joined 19:49 slayergames left 19:50 Zoffix left 19:51 shareable6 joined, ChanServ sets mode: +v shareable6 19:52 martinfb joined 19:53 kaare_ joined 20:06 softmoth joined
raschipi timotimo: just saw that video too, but there's no way to represent -1/φ in Perl 6. Eventually that sequence will flip and go to φ. 20:14
THe closer you start to -1/φ, the more steps it will take, but eventually it will converge to φ. It has to be exactly -1/φ, which can't be represented. 20:15
20:15 n0tjack joined 20:17 mcmillhj left 20:18 kaare_ left 20:23 martinfb left
raschipi m: 127, { $^a %% 2 ?? $a/2 !! 3×$a+1 } ... 1 20:30
camelia Potential difficulties:
Useless use of ... in sink context
at <tmp>:1
------> 03127, { $^a %% 2 ?? $a/2 !! 3×$a+1 } ...7⏏5 1
raschipi m: say 127, { $^a %% 2 ?? $a/2 !! 3×$a+1 } ... 1
camelia (127 382 191 574 287 862 431 1294 647 1942 971 2914 1457 4372 2186 1093 3280 1640 820 410 205 616 308 154 77 232 116 58 29 88 44 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1)
20:30 slayergames joined 20:36 dct joined
slayergames How do I install a module (in my case GTK::Simple)? "zef install GTK::Simple" doesn't work. 20:37
TimToady m: say [\+] 1,3...99 20:38
camelia (1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400 441 484 529 576 625 676 729 784 841 900 961 1024 1089 1156 1225 1296 1369 1444 1521 1600 1681 1764 1849 1936 2025 2116 2209 2304 2401 2500)
20:39 mcmillhj joined
raschipi Noice, literally using square numbers. 20:39
TimToady that way doesn't even use any multiplication, let alone exponentiation 20:40
20:47 itaipu joined 20:50 ufobat_ left 20:52 cognominal left
El_Che slayergames: did you have a look here? github.com/perl6/gtk-simple#prerequisites 20:52
slayergames I'm on Windows. 20:53
El_Che "Precompiled GTK3 DLLs are installed automatically with module installation."
if it doesn't work, raise an issue
github.com/perl6/gtk-simple/issues 20:54
TimToady doesn't install on my Linux either, but that's probably becuase there's no symlink from the .so to the .so.0 20:58
El_Che TimToady: it seems to be a common problem. Same with the Readline bindings :(
21:00 Summertime joined
TimToady slayergames: I assume you saw my entry above for easiest way to generate the sequence of squares? 21:01
slayergames Yes I did
Nice solution!
21:02 mcmillhj left
jnthn slayergames: Looking at the error, the issue appears to be that the module is located on GitHub, and no Git program is installed, so it's unable to fetch it from there. 21:07
slayergames So should I install git?
jnthn Seems so :)
21:14 n0tjack left 21:19 Summertime left
slayergames I installed git, tried 'zef install GTK::Simple' and no success. 21:19
21:20 uzl_ joined, uzl__ left 21:21 uzl_ left
jnthn slayergames: Does typing "git" at that terminal where you're running zef find it, or give an error? 21:23
(If you didn't close and re-open the terminal window, you'd probably need to for it to have the updated path)
slayergames git finds it
and I reopened the window 21:24
jnthn Hmm. :S Is the error exactly the same? 21:26
slayergames No.
===> Searching for: GTK::Simple ===> Building: GTK::Simple:ver<0.1.9> Malformed UTF-8 in block at C:\Users\mcsla\.zef\store\gtk-simple.git\4707622d9fd1d828b76a241713d99f0ec982c1ef\Build.pm line 62 in block at C:\Users\mcsla\.zef\store\gtk-simple.git\4707622d9fd1d828b76a241713d99f0ec982c1ef\Build.pm line 102 in method build at C:\Users\mcsla\.zef\store\gtk-simple.git\4707622d9fd1d828b76a241713d99f0ec982c1ef\Build.pm line 49 21:27
That's the error.
jnthn OK, that one I don't have a guess at, though update the issue with it. 21:33
21:33 raschipi left 21:40 HaraldJoerg1 left
timotimo $hash = run("CertUtil.exe", "-hashfile", $path, "SHA256", :out) 21:40
that's what that line is 21:41
slayergames: can you clone gtk-simple locally?
we don't really have many people who can test stuff out on windows
21:47 ChoHag left
slayergames It installed (had to use --force-install --force-build), but even using GTK::Simple::App throws an error! 21:48
(I cloned it locally)
timotimo it could be the download didn't work right 21:49
what kind of errors do you get?
21:51 mcmillhj joined
slayergames i have to go 21:51
21:51 slayergames left 22:00 comborico1611 left, ChoHag joined 22:03 comborico1611 joined 22:05 mcmillhj left 22:06 ChoHag left, ChoHag joined, stmuk_ joined 22:08 stmuk left 22:10 wamba joined 22:14 ChoHag left 22:20 ChoHag joined
buggable New CPAN upload: P5chdir-0.0.3.tar.gz by ELIZABETH modules.perl6.org/dist/P5chdir:cpan:ELIZABETH 22:22
New CPAN upload: P5each-0.0.5.tar.gz by ELIZABETH modules.perl6.org/dist/P5each:cpan:ELIZABETH
New CPAN upload: P5caller-0.0.5.tar.gz by ELIZABETH modules.perl6.org/dist/P5caller:cpan:ELIZABETH
New CPAN upload: P5chomp-0.0.5.tar.gz by ELIZABETH modules.perl6.org/dist/P5chomp:cpan:ELIZABETH
New CPAN upload: P5chr-0.0.5.tar.gz by ELIZABETH modules.perl6.org/dist/P5chr:cpan:ELIZABETH
22:46 cognominal joined 22:48 ZofBot left, ZofBot joined, ChanServ sets mode: +v ZofBot 22:53 ChoHag left, Ven`` left 23:07 ChoHag joined 23:11 dct left 23:20 Kaiepi left 23:24 rindolf left 23:25 pmurias left 23:29 n0tjack joined 23:30 markong left 23:32 markong joined 23:53 wamba left