»ö« 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:00 cdg left 00:01 cdg joined 00:02 wander joined 00:06 cdg left 00:07 ggoebel joined, devmikey joined 00:08 psychoslave left 00:10 cog_ joined
lookatme o/ 00:13
00:14 cognominal left 00:16 g41j1n joined
wander \o 00:25
00:27 espadrine left 00:35 nebuchadnezzar joined, Guest11217 joined, Guest11217 is now known as Aceeri 00:58 yht joined
wander if I define "grammar G { token tok { ... } }", how can I refer tok outside G? 00:59
teatime G::tok ?
timotimo m: grammar G { token tok { . { say "hi!" } } }; grammar A { . <G::tok> { say "bye!"} } }; A.parse("fo") 01:00
camelia 5===SORRY!5=== Error while compiling <tmp>
Unsupported use of . to concatenate strings; in Perl 6 please use ~
at <tmp>:1
------> 3tok { . { say "hi!" } } }; grammar A { .7⏏5 <G::tok> { say "bye!"} } }; A.parse("fo
timotimo m: grammar G { token tok { . { say "hi!" } } }; grammar A { token TOP { . <G::tok> { say "bye!"} } } }; A.parse("fo") 01:01
camelia 5===SORRY!5=== Error while compiling <tmp>
Unexpected closing bracket
at <tmp>:1
------> 3oken TOP { . <G::tok> { say "bye!"} } } 7⏏5}; A.parse("fo")
timotimo m: grammar G { token tok { . { say "hi!" } } }; grammar A { token TOP { . <G::tok> { say "bye!"} } }; A.parse("fo")
camelia hi!
bye!
timotimo wander: ^
wander It works. Thank you ^_^ 01:02
01:02 cdg joined
timotimo YW 01:03
01:06 imcsk8 left 01:08 cdg left 01:18 yht left 01:28 markong left 01:37 g41j1n left 01:38 yht joined 01:58 wander left 02:10 mahafyi joined 02:15 dugword joined 02:36 wamba left, pilne left 02:45 eythian joined 02:46 ilbot3 left 02:49 aindilis left 02:54 FROGGS_ joined 02:55 ilbot3 joined, ChanServ sets mode: +v ilbot3 02:56 cdg joined 02:57 FROGGS left 03:17 unicodable6 left, squashable6 left, benchable6 left, reportable6 left 03:18 unicodable6 joined, ChanServ sets mode: +v unicodable6, squashable6 joined, ChanServ sets mode: +v squashable6, benchable6 joined, ChanServ sets mode: +v benchable6, reportable6 joined 03:19 konsolebox left 03:21 konsolebox joined 03:26 dugword left 03:29 xcm is now known as Guest11586, Guest11586 left 03:30 xcm joined 03:45 cdg left, mahafyi left 03:47 vichib joined 04:01 dugword joined 04:03 devmikey left 04:07 Aceeri left 04:14 dugword left 04:15 dugword joined 04:19 dugword left 04:25 khisanth_ left
piojo I'm getting this error again: "MoarVM panic: Memory allocation failed; could not allocate zu bytes" 04:30
I'm running Rakudo version 2017.12 built on MoarVM version 2017.12, and invoking as "perl6 --profile ./program.p6" 04:31
*on Windows, and with plenty of memory
The memory allocation is probably tricky, but the "zu bytes" is LTA 04:33
04:43 khisanth_ joined 04:44 konsolebox left 04:46 konsolebox joined, dugword joined
geekosaur looks to me like someone dropped a % 04:48
(%zu = (size_t) value as integer) 04:49
oh, windows. uh.
%zu is also glibc specific... 04:50
hm, guess freebsd picked it up too. or maybe the standards orgs finally got a clue about not handling size_t at all 04:53
but it's not portable to Windows 04:54
04:56 Cabanossi left 04:59 Cabanossi joined
geekosaur ugh. I think this is not only known but was rejected in the past, because it's an impossible situation 05:04
in the absence of a supported %z modifier or some other way to specify that the corresponding value is a (size_t) or (ssize_t), there is *no* portable way to printf such values.
05:06 piojo left
geekosaur of course. they'll be back with the same complaint, I'm sure. 05:06
"and solve the halting problem while you're at it" 05:07
05:07 piojo joined
piojo geekosaur: oh, thanks, that's unfortunate. Can we use a 64-bit format type and still have it work on 32-bit systems? 05:13
geekosaur no, and under certain conditions that can even cause a core dump
which is part of the reason why there's no portable way to do it 05:14
this was actually a widespread criticism of C99 and later standards, that they provided no standard way to handle this case
(unfortunately, real world standards tend to go with what vendors are willing to do... so just writing such into a standard does not mean e.g. Microsoft will adopt it. the ANSI C standard already has too many examples of that one as it is) 05:16
(...but the other ones are at least compile time errors) 05:18
05:35 zakame joined
piojo geekosaur: and there are two popular compilation toolchains for Windows 05:38
I'll file a MoarVM bug about this 05:39
geekosaur yes. I'd imagine this is MSC getting it wrong; msys2 would be using a modified glibc
MSVC
thing is, I seem to recall last time I ran into this was moarvm too, so I half expect any bug will be closed as WONTFIX / "get Microsoft to fix their damn toolchain" 05:40
piojo I compiled with GCC and strawberry perl
geekosaur don't know what that provides for a libc
gcc itself is not involved, it's a question of what printf library is used. and there are gcc ports that use msvcrt for libc 05:41
piojo geekosaur: A test program works, so it looks like a flub rather than an incompatibility 05:52
06:01 yht left
piojo I don't see anything wrong with the MoarVM code, and can't reproduce it even when I almost exactly copy the function. (I tried using varargs and vfprintf but that doesn't show any problem) 06:05
06:05 xcm left 06:07 xcm joined
piojo Oh! I was testing in c++, not c. Oops 06:24
06:52 aindilis joined 06:53 yht joined, someuser joined
piojo geekosaur: it's already special-cased for MS, but only for Visual Studio. I added another #elif case, and it's fixed. PR made. 06:57
06:57 darutoko joined 07:07 psychoslave joined 07:21 khw left 07:51 xcm is now known as Guest33767, Guest33767 left 07:52 xcm joined 08:03 wamba joined 08:12 traxex left 08:15 psychoslave left 08:17 geospeck joined, geospeck left 08:18 geospeck joined 08:20 geospeck left, setty1 joined 08:21 geospeck joined 08:22 traxex joined 08:34 psychoslave joined, xcm left 08:35 rindolf joined 08:36 xcm joined 08:41 astj left, astj joined 08:46 astj left 08:52 astj joined 09:13 geospeck left 09:14 scimon joined 09:26 traxex left, traxex joined 09:28 xcm is now known as Guest43192, Guest43192 left 09:29 xcm joined 09:30 traxex left 09:35 lizmat_ joined 09:37 lizmat left 09:46 markong joined 09:53 astj left 09:54 devmikey joined 09:57 s0me0ne-unkn0wn joined 10:08 geospeck joined, yht left 10:15 geospeck left 10:19 pmurias joined 10:36 lizmat_ is now known as lizmat
lizmat Zoffix: confusion around Mu ~~ * resolved 10:36
yoleaux 01:54Z <Zoffix> lizmat: why is the test wrong? (*) is Whatever:D and accepts everything, so it's True, while Whatever is Whatever:U and it's a type-check smartmatch, so it's False. Note, that along with the test there was a rakudo commit; you'll need it for test to pass
lizmat I was just in the middle of quite an extensive patch, when that test started to fail and it sent me on a goose chase for a bit 10:37
10:38 pmurias left 10:44 araraloren joined 10:46 rurban joined 10:47 pmurias joined 10:48 rurban left 10:55 mahafyi joined 10:56 rgrau joined 11:01 geospeck joined, synopsebot left 11:02 synopsebot joined, ChanServ sets mode: +v synopsebot
rightfold en.wikipedia.org/wiki/Industrial-grade_prime 11:12
is-prime ^ :’)
Also reminds me of i0.kym-cdn.com/photos/images/facebo...51/12e.png 11:13
11:13 konsolebox left, konsolebox joined
tadzik eyy, that's an Engie! 11:15
rightfold Not even bothering to round e up 11:16
Just truncate it
huf e, pi and 10/3 are all = 3? :) 11:18
11:26 psychoslave left 11:27 geospeck left 11:40 geospeck joined 11:46 eliasr joined 12:10 cog__ joined 12:13 cog_ left 12:19 pmurias left 12:44 greppable6 left, greppable6 joined 12:52 vichib left 12:57 dmaestro left 13:05 AlexDani` joined 13:06 AlexDaniel left 13:08 astj joined 13:12 astj left 13:19 stmuk_ joined 13:20 stmuk left 13:27 araraloren left 13:29 AlexDani` is now known as AlexDaniel 13:36 AlexDaniel left 13:43 AlexDaniel joined 13:48 cog__ left 13:51 cognominal joined
scimon Very interested in ValueObjAt sounds like it could be interesting. 13:57
14:04 geospeck left 14:09 avar left 14:10 literal left, Bucciarati left 14:18 xinming_ joined 14:19 Bucciarati joined 14:21 xinming left 14:22 zakame left
lizmat scimon: its implementation was very difficult: class ValueObjAt is ObjAt { } :-) 14:23
14:24 cognominal left
timotimo the smiley at the end is what adds all the necessary magic 14:24
yoleaux 10:10Z <Zoffix> timotimo: Can this branch be merged/deleted? github.com/rakudo/rakudo/tree/micr...de_numbers I may have did something to DIVIDE_NUMBERS a month ago that'd cause a conflict tho
14:24 rurban1 joined, rurban1 left
scimon :D 14:26
14:27 rurban2 joined, rurban2 left, rurban3 joined 14:28 rurban joined, rurban left, rurban4 joined 14:29 rurban5 joined, rurban5 left, rurban6 joined 14:30 rurban6 left 14:32 rurban3 left 14:33 rurban4 left
lizmat wow, that's a lot or rurban! 14:34
timotimo ? 14:35
lizmat timotimo: check entrance and leave message just now :-) 14:36
*messages
timotimo oh, now i see
i had the smart filter on
lizmat :-) 14:37
15:04 MasterDuke joined 15:06 bwisti joined 15:43 dmaestro joined 15:46 wamba left 15:52 silug joined 16:00 lasse_ joined 16:01 cdg joined 16:04 coverable6 left, nativecallable6 left, statisfiable6 left, quotable6 left, releasable6 left 16:05 coverable6 joined, ChanServ sets mode: +v coverable6, nativecallable6 joined, ChanServ sets mode: +v nativecallable6, quotable6 joined, releasable6 joined, ChanServ sets mode: +v releasable6, statisfiable6 joined, committable6 left, committable6 joined, ChanServ sets mode: +v committable6 16:07 ChoHag left 16:14 vichib joined 16:27 troys joined 16:30 cdg left 16:31 Bucciarati left 16:53 cdg joined 16:57 khw joined 17:19 rgrau left
moritz opened github.com/stmuk/pl6anet.org/pull/8 17:24
17:27 troys is now known as troys_ 17:32 scimon left 17:42 troys_ is now known as troys 17:43 aindilis left 17:44 aindilis joined 17:45 dct joined 17:48 rgrau joined 17:53 markong left 17:58 cdg left
stmuk_ moritz++ # thanks 17:59
18:09 dugword left, domidumont joined 18:10 cdg joined 18:12 cdg_ joined 18:15 cdg left 18:16 domidumont left, cdg_ left 18:17 domidumont joined 18:22 Actualeyes left 18:30 wamba joined 18:32 silug left 18:41 darutoko left 18:48 cdg joined 18:49 geospeck joined 18:50 geospeck left 18:52 cdg left
mspo moarvm is a stack machine, right? 18:57
19:01 devmikey left
MasterDuke mspo: no, register 19:06
19:12 cdg joined, Spot__ left, notbenh_ left, lumimies left 19:13 chansen_ left, ggherdov left, pnu__ left, kipd left, zostay left, SmokeMachine left, peteretep left, iviv left, jkva_ left, jhill_ left, clkao left, eliasr left, scott left 19:14 rodarmor left, olinkl left, PotatoGim left, tbrowder left, skaji left, mithaldu_ left, mrsolo left, timeless left, BuildTheRobots left, jnap_ left 19:15 parisba left 19:16 greppable6 left, reportable6 left, evalable6 left, imcsk8 joined 19:17 rightfold left 19:21 mahafyi left 19:30 Spot__ joined 19:35 tbrowder joined 19:37 jnap_ joined 19:38 bisectable6 left, bloatable6 left, squashable6 left, zostay joined, bisectable6 joined, coverable6 left, bloatable6 joined, ChanServ sets mode: +v bloatable6, squashable6 joined, ChanServ sets mode: +v squashable6, coverable6 joined, ChanServ sets mode: +v coverable6, greppable6 joined, ChanServ sets mode: +v greppable6, skaji joined, mithaldu_ joined 19:39 reportable6 joined, olinkl joined 19:41 mrsolo joined, parisba joined, lumimies joined 19:43 notbenh_ joined, jkva_ joined, PotatoGim joined, peteretep joined, eliasr joined 19:44 iviv joined, alexghacker left, alexghacker joined, SmokeMachine joined, timeless joined 19:46 BuildTheRobots joined 19:48 jhill_ joined, rightfold joined 19:51 clkao joined 19:54 kipd joined, cdg left 19:55 scott joined 19:57 Aceeri joined 19:58 Aceeri is now known as Guest32291 20:03 avar joined, avar left, avar joined, literal joined 20:06 rgrau left 20:10 troys is now known as troys_ 20:11 andrzejku joined
andrzejku hey 20:15
where can I find
Perl6 grammar
MasterDuke andrzejku: github.com/rakudo/rakudo/blob/mast...rammar.nqp 20:16
20:19 pilne joined 20:26 aindilis left 20:29 ChoHag joined 20:31 s0me0ne-unkn0wn left 20:33 s0me0ne-unkn0wn joined 20:39 xcm left 20:42 geospeck joined
aeruder m: say ((1..4).race.map({sleep 1; 1;}).list); say now - INIT now; 20:51
camelia (1 1 1 1)
4.01273257
aeruder is there some reason why that isn't parallelized?
lizmat aeruder: the default value for :batch is 64 20:53
aeruder d'oh, that makes sense
lizmat m: say ((1..4).race(batch => 1).map({sleep 1; 1;}).list); say now - INIT now;
camelia (1 1 1 1)
1.0527615
aeruder perfect, thanks
timotimo twitter.com/sarah_edo/status/946091648773013504 - anyone want to steal this? 20:55
20:55 espadrine joined 20:58 evalable6 joined, ChanServ sets mode: +v evalable6
lizmat looks interesting :-) 20:58
21:01 Possum left 21:05 rgrau joined 21:09 cdg joined 21:20 chansen_ joined 21:21 pnu__ joined 21:33 rodarmor joined, ggherdov joined 21:41 vichib left 21:44 cdg left
moritz fwiw, in the last years, the Perl 6 advent calendar had a separate post with a table of contents/index of the posts of that year 21:46
if somebody has some time to spare, creating such a post would be nice 21:47
21:47 vichib joined 21:49 domidumont left 21:52 geospeck left, dct left 21:53 rindolf left
lizmat it would be just a matter of copy-pasting parts of the last 4 p6weeklies 22:04
22:08 cdg joined 22:13 cdg left 22:19 dct joined 22:29 andrzejku left
mspo MasterDuke: interesting 22:33
22:34 Guest32291 is now known as Aceeri 22:39 lasse_ left 22:41 Herby_ joined
Herby_ o/ 22:41
\o
22:46 jeff_ joined 22:51 ChoHag left 22:53 ChoHag joined 23:01 ChoHag left
timotimo o/ 23:02
23:06 setty1 left 23:08 troys_ is now known as troys
Herby_ Rookie question: Has the LWP::Simple library that ships with Rakudo Star not been updated in 2 years? 23:12
Have there been improvements in p6 during that time that could improve a base library? 23:13
23:13 ChoHag joined
lizmat According to Matt Oates it has: perl6advent.wordpress.com/2017/12/16/ 23:14
Herby_ Thats what I was thinking
23:14 cdg joined
Herby_ Not that I have a strong enough base of knowledge to improve it, just seemed odd that a base library for a rapidly improving language hasn't been updated in a while 23:15
timotimo we do have multiple http clients 23:16
there's also WWW and Cro::HTTP
Herby_ yeah, was about to mention that
timotimo and more!
one based on libcurl, too
Herby_ do one of those server the rakudo star package better?
timotimo dunno. we'd better only add to it and not subtract too fast 23:17
bbiab
Herby_ o/
23:22 dmaestro left 23:27 vichib left 23:32 vichib joined 23:39 Herby_ left
lizmat sleep& 23:39
23:39 cdg left 23:40 rgrau left
AlexDaniel squashable6: next 23:46
squashable6 AlexDaniel, Next SQUASHathon in 8 days and ≈10 hours (2018-01-06 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
23:46 Perl6 joined
Perl6 How do I turn a string of numbers separated by commas into an array of those numbers? 23:46
yoleaux 25 Oct 2014 23:59Z <raiph> Perl6: to encourage someone to post a P6 version of the tiny reverse polish forthish "compiler" at www.reddit.com/r/perl/comments/2kb0...n_in_perl/ (I plan to have a go early next week if no one else gets to it and it's still in the top 10 on /r/perl)
12 Jan 2015 11:37Z <timotimo> Perl6: .new() isn't like __init__ or __new__, it's like python's .frob or .blubber or .yoink; also, new calls bless calls BUILDALL calls BUILD unlike what geekosaur said, and skids wrongly wrote bless(*, ...), but the * as first argument is wrong nowadays
geekosaur o.O 23:47
jnthn m: dd "1,2,5,42".split(",").map(+*)
camelia (1, 2, 5, 42).Seq
jnthn m: dd ["1,2,5,42".split(",").map(+*)]
camelia [1, 2, 5, 42]
23:48 ChoHag left
Perl6 jnthn: Thanks! What does .map(+*) do by the way? 23:48
jnthn +* is a shorter way to write the closure { +$_ } 23:49
geekosaur the leading + coerces to a number
jnthn The + prefix operator means "numify" 23:50
geekosaur split gives you a Seq of Str-s, you then map numification over the Seq
jnthn And map is just "do this operation for each value and make a new sequence of the results"