»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
timotimo wondering if it's simple to create a mirroring service for the perl6 ecosystem 00:01
it would be easy to clone all the repos and make them available and make a new META.list that points to modified META.info files that point to the mirrored git repos
would the META.info files inside those git repos need to be updated, too? 00:02
i suppose i won't know unless i try 00:04
oh, i don't even need to touch the meta.list, i just need to get the projects.json and replace the urls 00:07
supernovus SCGI is working again, in its rather limited form. One day I'll get around to refactoring it to be far more feature complete, but at least it works again. HTTP::Easy up next. 00:08
timotimo why is the getfile method in Panda::Ecosystem written in PIR? :\ 00:10
supernovus Hmm, HTTP::Easy depends on the get() method working properly. Oh, also, it seems if you do IO::Socket.read() and there's no more data to send, instead of returning nothing, it just hangs. This makes writing while my $data = $socket.read(256) { ... } not work at all... 00:13
00:13 Celelibi joined
timotimo oh crud. would you need select instead? :| 00:14
so there's two different points at which panda could fail: feather could be down, thus projects.json could be unreachable. that could be easy to mirror. 00:20
but if github is down, how does one supply mirrors for git repositories?
i suppose a "mirrors" attribute for the META.info format could be devised and those mirrors could be tested if the main src-url doesn't work 00:21
but then having source-type for the mirrors could be super annoying to do :| 00:22
supernovus That's it for now. SCGI is back up and running, I've updated WWW::App::Ballet to use it for the example script. Hopefully some of the breakage in the Rakudo's IO stuff gets worked out soon so HTTP::Easy can get updated. Til then, good * #perl6
00:23 Celelibi left 00:24 supernovus left
timotimo things are always less simple than one would hope, i find. 00:24
00:26 Celelibi joined 00:28 PacoAir left 00:29 PacoAir joined 00:36 PacoAir left 00:37 PacoAir joined 00:39 fgomez left 00:47 am0c left 00:48 am0c joined 00:51 bitonic left 00:53 att__ left, spider-mario left 00:54 att__ joined
colomon r: use Test::Util; throws_like 'my @a = 1..*; @a[Inf] = "dog"', X::Item, index => Inf, aggregate => 1..*; 01:03
p6eval rakudo 6d4b90: OUTPUT«===SORRY!===␤Could not find Test::Util in any of: /home/p6eval/nom-inst/lib/parrot/4.10.0-devel/languages/perl6/lib, /home/p6eval/nom-inst/lib/parrot/4.10.0-devel/languages/perl6/vendor/lib, /home/p6eval/nom-inst/lib/parrot/4.10.0-devel/languages/perl6/site/lib, /h…
bbkr I wonder why such simple thing as throws_like is not built-in in Test.pm 01:05
01:06 thou left
colomon it's not actually simple? I'm trying to figure out how many tests the above line represents... seems to be something between 2 and 4. 01:06
inclusive, obviously. :)
looks like the answer in this case is 4. 01:08
01:08 thou joined, anuby joined, hypolin joined 01:09 thou left 01:10 thou joined
colomon n: say ([X~] [<a b>] xx 3) 01:17
p6eval niecza v24-12-g8e50362: OUTPUT«Unhandled exception: Excess arguments to ANON, used 2 of 3 positionals␤ at /tmp/yg_XJ7C_66 line 0 (ANON @ 1) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2558 (reduceop @ 12) ␤ at /tmp/yg_XJ7C_66 line 1 (mainline @ 4) ␤ at /home/p6eval/niecza/lib/COR…
alec what's a good IDE for perl6?
colomon n: say ([X~] [<a b>] xx 2)
p6eval niecza v24-12-g8e50362: OUTPUT«a ba b␤»
colomon alec: emacs? Personally I use TextMate and the command line, which is not really an IDE at all. 01:18
alec right 01:19
colomon n: say [X~] <a b>, <a b>, <a b>
p6eval niecza v24-12-g8e50362: OUTPUT«Unhandled exception: Excess arguments to ANON, used 2 of 6 positionals␤ at /tmp/urSEizJqSk line 0 (ANON @ 1) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2558 (reduceop @ 12) ␤ at /tmp/urSEizJqSk line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/COR…
alec i just want to be able to write/run scripts from the same window
i could use emacs i guess... but i don't really want to... 01:20
i'm just playing around at the moment so i don't need anything serious or complicated
colomon I don't blame you for not wanting to use emacs. :)
alec =)
colomon++
colomon I would guess pretty much any decent programmer's editor could do what you want with a bit of coaxing. Maybe Padre does it automatically, I haven't tried it recently. I think Padre and vim and emacs are probably the only ones that have p6 syntax coloring even as options. 01:23
01:33 MikeFair_ left 01:42 MikeFair_ joined 01:45 att__ left
alec padre suits my purposes 01:54
what's the perl6 equivalent of python def function(boolval1, boolval2): return(not boolval1 or boolval2) ? 01:55
moritz r: sub f(Bool $a, Bool $b) { not $a or $b }; say f False, True 01:57
p6eval rakudo 6d4b90: OUTPUT«True␤»
moritz (though I don't know about python's relative precedence of "not" and "or" 01:58
02:04 raiph left
alec ok 02:04
thanks
moritz++
i can't get say f False, True to run in padre/rakudo, moritz 02:09
any idea what i'm doing wrong?
i wrote out the function as you wrote it here... maybe i need semicolons in different places? 02:10
moritz alec: do you get an error message?
02:10 Guest97536 left
alec bareword found where operator expected 02:10
'did you forget to declare say?'
*predeclare 02:11
moritz alec: sounds like you're running it with perl 5, not rakudo
alec ah
good point
let's see
moritz (that's why I start my scripts with 'use v6;', but I don't do that on IRC)
alec ah 02:13
yes
i remember seeing that in the perl6 ebook
arghh... padre doesn't automatically notice perl6 02:14
when i apt-get it
ok, i still get an error when i run it with perl6
moritz what error?
alec 'invalid typename in parameter declaration at line 4 near " $a, bool " 02:15
moritz did you write Bool or bool ? 02:16
alec ahh 02:18
must have written Bool
er bool
thank you
moritz++
02:28 FROGGS__ joined 02:31 FROGGS left 02:41 AndChat|356841 joined 02:43 AndChat-356841 joined, quester left 02:44 FROGGS_ left 02:46 fgomez joined, AndChat|356841 left
dalek ast: ecd7e35 | (Solomon Foster)++ | / (14 files):
(Re)Fudge for Niecza.
02:47
diakopter rn: eval(('do 'x 2000)~'say 44') 02:48
p6eval rakudo 6d4b90, niecza v24-12-g8e50362: OUTPUT«(timeout)»
dalek ecza: 95f809a | (Solomon Foster)++ | lib/ (2 files):
Support infix:<->(Instant, Instant).
02:50
02:51 anuby_ joined 02:54 anuby left 03:23 am0c left 03:36 am0c joined 03:38 jaldhar_ joined 03:54 orafu left, orafu joined 03:59 PacoAir left 04:57 tokuhiro_ joined 04:58 PacoAir joined 05:00 tokuhiro_ left 05:02 tokuhir__ joined, PacoAir left 05:06 dayangkun left 05:07 tokuhir__ left 05:23 telex left 05:26 telex joined 05:37 telex left 05:39 jokar joined 05:40 jokar left, jokar joined 05:42 telex joined 05:49 dayangkun joined 06:08 PacoAir joined 06:12 PacoAir left 06:25 jokar left 06:26 alec left 06:28 alec joined
alec taps out bossa nova rhythms on his keyboard 06:34
07:02 quester joined 07:05 SamuraiJack joined 07:28 marloshouse left
Woodi hallo :) 07:33
forget .vi. for a while... who is using emacs and why it is good editor ? :) I gues it have big startup time so not quite good for quick fixes... 07:37
07:47 aindilis left 07:53 kaare_ joined 07:55 quester left
genehack Woodi: the startup time thing is handled by simply never restarting it 8^) 08:01
Woodi heh, nice trick :) 08:04
08:07 fgomez left 08:08 fgomez joined
Woodi but what realy is good in emacs ? buffers - even notepad have one buffer (copy and paste via OS :) and how often you need 2 or more ? screen splitting ? thats common now. scripting ? 08:11
08:17 thou left
Woodi "What you learn first you advocate later" - languages, oses, editors... it's too common. persons who change habits aren't so common... 08:18
08:21 PacoAir joined 08:24 thou joined
Woodi advocating progress in humanity :) We need to take next step ! Look what aliens done so far! 08:24
08:26 PacoAir left 08:28 GlitchMr joined 08:34 fgomez left 08:35 fgomez joined 08:36 AndChat-356841 left 08:37 FROGGS__ is now known as FROGGS 08:44 xinming left 08:45 tokuhiro_ joined 08:51 PacoAir joined 08:56 PacoAir left 08:57 Pleiades` left 09:02 Pleiades` joined 09:04 bitonic joined 09:12 kaare_ left
tadzik good morning #perl6 09:13
timotimo: where do you see the Pls reference?
dalek nda: 097fa4a | timo++ | README.md:
mention local file installation in the README.
09:14
nda: 430863f | tadzik++ | README.md:
Merge pull request #29 from timo/patch-1

mention local file installation in the README.
FROGGS morning 09:15
09:20 xinming joined 09:42 Psyche^ joined, PacoAir joined 09:43 PacoAir left, Patterner left, Psyche^ is now known as Patterner, PacoAir joined 10:04 hypolin left 10:09 dayangkun left 10:10 MayDaniel joined
FROGGS does anybody know what this :dba(STRING) does in the rakudo grammars? 10:26
sorear "doing business as". sets a human-readable name for the rule to use in error messages. 10:41
Woodi thanx sorear++ for some time I wanted to know it :) seriously. 10:48
but Perl6 use ':' in some places - it is kind of attribute or property of things ? 10:50
sorear It's introducing a colonpair. 11:06
11:18 spider-mario joined 11:20 wk joined, wk is now known as Guest58404 11:26 spider-mario left 11:31 not_gerd joined
not_gerd hello, #perl6 11:31
Rakudo seems to be broken on latest Parrot on Cygwin 11:32
see gist.github.com/4461110 and #parrot
masak g'day, #perl6 11:43
moritz \o masak
not_gerd o/ 11:45
felher o/ 11:46
tadzik seen timotimo
aloha timotimo was last seen in #perl6 11 hours 22 mins ago saying "things are always less simple than one would hope, i find.".
moritz www.infoq.com/interviews/conway-perl 11:50
TheDamian++
I like the C/C++ analogy
Perl 6 is Perl 5's successor in the same sense that C++ is the successor to C
that is, it was intended to be one, but turned out to evolve separately 11:51
felher moritz++ # for that link 11:56
Woodi watched this today too and like it :) one thing what caught my eye is that Perl6 still is considered to become BORG :) eg. "this block use grammar 'Ruby'". it realy can be good thing - inter-language cooperation becouse libraries need to be implemented in every language separately... 11:59
11:59 dayangkun joined
Woodi s/eye/ear/ ? :) 11:59
could someone draw niecza internals maybe ? it have representations, grammars, etc. subsystems ? 12:00
12:01 SamuraiJack left
Woodi comparing interpreters would be nice for mere mortals... 12:01
12:02 SamuraiJack joined
Woodi so in the future you distibute grammars with your programs probably :) 12:10
12:12 thou left
not_gerd bye, #perl6 12:13
12:13 not_gerd left 12:15 Pleiades` left 12:21 Pleiades` joined
timotimo tadzik: i'm here now :) 12:45
tadzik: the Pls reference is in the readme: "Pies itself is a specification (like masak's Pls)," 12:46
12:50 bbkr left
tadzik timotimo: my panda doesn't rebootstrap on the local-info branch, can you double-check that? 12:50
12:50 tokuhiro_ left 12:51 tokuhiro_ joined
dalek nda: 698d0cd | tadzik++ | README.md:
Fix the link to Pls in the readme, timotimo++
12:52
timotimo yes, sure can 12:56
but the last time i tried, rebootstrap didn't work at all for a clean checkout, too. but that was a month ago or so.
you're right. i seem to have made some mistake. i'll start fixing. 12:57
ah, a silly and simple mistake. i'll amend the commit and force-push it to my github again in a minute 13:00
huh! 13:01
upon reinstall i get SORRY: "No object at index 164"
that is, i run rebootstrap and after "==> Reinstalling" it says that 13:02
13:04 tokuhiro_ left
timotimo can't get rakudo-debugger up and running any more 13:04
13:08 tokuhiro_ joined
timotimo tadzik: can you try the commit i just pushed to the branch? (i amend-committed, so there's still only one commit) 13:16
tadzik I suspect git may get angry at me 13:37
it did :) 13:39
did you have to push --force?
13:43 marloshouse joined 13:45 erkan left
moritz norvig.com/mayzner.html 13:58
timotimo yes, i had to. just git reset --hard timo/local-info on your local local-info branch 14:02
14:02 erkan joined, erkan left, erkan joined
timotimo also, if you think git got angry at you, you haven't tried hg yet >_> 14:03
tadzik :D 14:16
yay, your branch seems to work fine 14:17
and my car is moving its wheels \o/ 14:18
dalek nda: c65536e | (Timo Paulssen)++ | / (2 files):
panda info works for local projects, too.
14:19
nda: 21ed651 | tadzik++ | / (2 files):
Merge branch 'timo/local-info'
14:20 pmurias joined
moritz r: say NaN === NaN 14:30
p6eval rakudo 6d4b90: OUTPUT«False␤»
FROGGS tadzik: what car? 14:33
tadzik FROGGS: www.youtube.com/watch?v=jMhcwCjpAOE :)
a university project 14:35
FROGGS tadzik: do I see an arduino board on top there? 14:36
tadzik that's right
FROGGS cool
tadzik it seems to be crashing every few loop iterations, it's not really supposed to stop every few wheel turns
FROGGS my arduino board should control my gearbox some time (have a project car too, but mine is a bit bigger :o) 14:37
s/time/day/
masak "Error messages seem like an unimportant and incredibly boring part of crafting a user experience. But the tonality of error messages can swing the experience around from an almost certain abandonment to a conversion." -- uxmag.com/articles/are-you-saying-n...-web-forms 14:46
wise words.
in fact, the more I design programs and applications, the more I realize that error messages are really central to the design, too.
or rather, the exceptions and the exception types.
and (taking a leaf from REST), both responses reporting success and responses reporting error conditions should provide "what to do next" verbs as part of their cargo. 14:49
14:52 chenryn joined, Guest84935 joined 14:53 chenryn left 15:01 Guest84935 left
FROGGS masak: thats what I do too, I try to guide the user in the right direction, not just printing "thats wrong, do something else" 15:01
because if you have to support the software, you actually save time later this way 15:04
(and it is better in every way)
masak the developer saves time, the user is happier. 15:12
FROGGS one thing I hate about php, if you have a syntax error, you get no error messages and no output at all 15:20
.u 离开 15:21
I thought that would work
.u 离开?
hmmm
seen phenny 15:22
aloha phenny was last seen in #perl6 1 days 17 hours ago saying "masak: I'll pass that on when grondilu is around.".
FROGGS ohh
what happened to her? is she ill?
masak FROGGS: "离开" is pronounced Líkāi (in Mandarin) and means "Leave". 15:24
FROGGS thanks mhasaky ;o) 15:25
masak the two characters mean "away" and "open", respectively.
FROGGS "open" like a door or "open" like that you dont know when to come back?
masak the former.
it's actually a pictogram, depicting two hands opening a door. 15:26
FROGGS if you say so
I dont see that there ;o)
masak takes practice :) 15:27
in fact, "depart" seems to be a better translation of 离. it's a simplified version of 離. 15:28
FROGGS I definitely dont have time for things like this
masak (which, as you see, contains the simplified character as a radical)
FROGGS simplified to a thing that looks like black-gray mashed something?
masak that suggests to me you need a better font. 15:29
FROGGS ya, might be true
ahh, the font used on the irclog page is better, I see what you mean 15:30
masak 離 is a pictogram too, meant to illustrate birds flying away.
so there you go. birds departing, hands opening a door. :)
FROGGS .oO( darmok and jalad at tanagra ) 15:31
15:32 phenny joined
gfldex rn: print ^10; say ^10; 15:32
FROGGS .oO( darmok, his hands open )
p6eval rakudo 6d4b90, niecza v24-13-g95f809a: OUTPUT«01234567890..^10␤»
FROGGS masak: I think I prefer klingon ;o)
15:32 spider-mario joined
FROGGS it is way easier 15:32
gfldex r: print ^10; say '---'; say ^10; 15:33
p6eval rakudo 6d4b90: OUTPUT«0123456789---␤0..^10␤»
gfldex why does print and say disagree on printing ranges?
FROGGS say is used for humans, print for "machines"
so say will print it nice for you to recognize 15:34
r: say 'abc' ~~ /$<text>=[\w+]/ 15:35
p6eval rakudo 6d4b90: OUTPUT«「abc」␤ text => 「abc」␤␤»
FROGGS r: print 'abc' ~~ /$<text>=[\w+]/
p6eval rakudo 6d4b90: OUTPUT«abc»
FROGGS see?
masak conceptually 'say x' is 'print x.gist, "\n"'
FROGGS btw, I vote for colored output of Match.say
masak FROGGS: show us how you envision that. write a module! 15:36
FROGGS k, will do (after the versioning thing)
still fiddling with the grammar 15:37
moritz: are you interested in writing something for $foo? 15:49
would be pretty cool
and I'd read it ;o)
15:51 spider-mario left 15:55 spider-mario joined
moritz FROGGS: if there's a good topic to write about, yes 16:05
though generally I reach a wider audience when I write in English
16:06 JJ_Brain joined 16:07 kaare_ joined
FROGGS moritz: sure, but $foo is the only german mag, and it would be sad if it vanishes because there are not enough writers 16:08
they sell 500 copies IIRC 16:09
moritz FROGGS: is there a lack of writers?
FROGGS I think so, yes
thats why renee is searching himself for writers, contacting module authors for example 16:10
moritz so far he hasn't contacted me, even though I've written articles for $foo previously 16:11
maybe he's looking for new authors specifically
FROGGS maybe, can't read his mind from this distance ;o)
moritz try rebooting your crystal ball :-) 16:12
FROGGS I do it like the centaurs, but mostly it is like: "mars is bright tonight" 16:13
hoelzro what exactly does the '::' prefix on type names do? 16:19
ex. What's the difference between Foo and ::Foo?
moritz in a signature, ::Foo makes it a type capture 16:20
r: sub f(::Foo $x) { say $x }; f 42
p6eval rakudo 6d4b90: OUTPUT«42␤»
moritz r: sub f(::Foo $x) { say Foo }; f 42
masak outside of it, ::Foo allows us to talk about Foo before it's declared.
p6eval rakudo 6d4b90: OUTPUT«Int()␤»
masak std: say ::Foo; class Foo {}
p6eval std a8bc48f: OUTPUT«ok 00:00 42m␤»
moritz masak: does it really?
masak r: say ::Foo; class Foo {}
p6eval rakudo 6d4b90: OUTPUT«===SORRY!===␤Could not locate compile-time value for symbol Foo␤»
moritz masak: I kinda recall it msotly doesn't work 16:21
hoelzro oooh, interesting...
masak hm.
I may be misremembering.
hoelzro I'm reading S10-packages, and the bit about predeclaring things is a bit murky to me
16:23 JJ_Brain left
moritz nr: say 42.rand 16:24
p6eval rakudo 6d4b90: OUTPUT«4.45350720949697␤»
..niecza v24-13-g95f809a: OUTPUT«1.5007969883739936␤»
FROGGS nr: say 42.rand 16:26
p6eval niecza v24-13-g95f809a: OUTPUT«7.1425184547633487␤»
..rakudo 6d4b90: OUTPUT«29.0559677149378␤»
moritz nr: @a = 0 xx 5; @a.pick[0] = 42; say @a 16:27
p6eval rakudo 6d4b90: OUTPUT«===SORRY!===␤Variable @a is not declared␤at /tmp/1J_VT6GjH7:1␤------> @a⏏ = 0 xx 5; @a.pick[0] = 42; say @a␤ expecting any of:␤ postfix␤»
..niecza v24-13-g95f809a: OUTPUT«===SORRY!===␤␤Variable @a is not predeclared at /tmp/6Gcibq6cmN line 1:␤------> <BOL>⏏@a = 0 xx 5; @a.pick[0] = 42; say @a␤␤Variable @a is not predeclared at /tmp/6Gcibq6cmN line 1:␤------> @a = 0 xx 5; ⏏…
moritz nr: my @a = 0 xx 5; @a.pick[0] = 42; say @a
p6eval niecza v24-13-g95f809a: OUTPUT«Unhandled exception: Writing to readonly scalar␤ at /tmp/F7xQFx_ypA line 1 (mainline @ 5) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4218 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4219 (module-CORE @ 580) ␤ at /home/p6eval/niecza/li…
..rakudo 6d4b90: OUTPUT«Cannot assign to a non-container␤ in block at /tmp/_5KbizARdO:1␤␤»
moritz nr: my @a = 0 xx 5; @a.pick(2)[0] = 42; say @a
p6eval niecza v24-13-g95f809a: OUTPUT«0 0 0 0 0␤»
..rakudo 6d4b90: OUTPUT«0 42 0 0 0␤»
masak hmm. 16:28
I've never thought of .pick as returning lvalues.
moritz it seems to be intentional in the implementation 16:29
.pick uses take-rw instead of take
it kinda makes sense; array elements are always containers
why should @a[0] keep the containery nature, but .pick not? 16:30
TimToady one wonders about relative efficiency/optimizability, of course... 16:38
it's harder to feed a list of lvalues through a GPU, but then sorear++ will claim I'm neglecting single-core machines :) 16:39
it should be possible to infer non-lvalue-context most of the time in such cases, though, so it's not clear how much it'd be worth for the user to specify it one way or the other 16:40
but then the same argument could be made for substr-rw, I suppose
the FP folks'll say "why the heck do you want lvalues in the first place?" :) 16:42
masak I'd like to add the psychological argument: I've never, until now, expected an lvalue out of .pick
TimToady Principle of Most Non-Surprise, or some such 16:43
masak it would seem to me that if there's any reason to expect a slowdown from returning lvalues from .pick, even if it only happens in very few cases, it's not worth it. 16:44
because most people would only use the rvalue anyway, but their performance would be punished.
TimToady well, naïvely, I'd expect lvalues to be faster from pick's point of view, since it has to do less dereferencing; that gets amortized elsewhere, of course 16:45
and vice versa; you have to deref it somewhere
so the main difference would be in how much difference in effort there is to return a possibly different composite structure; but I don't think we distinguish much right now in that regard 16:46
a list of values could come back as a compact value, though 16:47
whereas a list of lvalues can only compact the native pointers
(sorry, my diction seems a little off yet this morning, but I hope you understand the blather)
TimToady is still in mid-reboot, and expects the full reboot to take several weeks, given it's partially seasonal 16:48
masak I understand the blather :) 16:49
errand, bbl &
colomon TimToady! \o/ 16:53
TimToady orz
moritz TimToady: who or what are your rebooting? 16:54
TimToady is rebooting himself; had many hung threads the last several weeks, plus infestations of relatives and other diseases 16:55
moritz good reboot then :-) 16:56
colomon has lost the niecza object file cache again. :( 16:57
ah, .local/share/NieczaModuleCache 16:58
17:16 cognominal left
genehack Woodi: sorry, went to bed. the best thing about emacs is customizability. but maybe this is a conversation for freenode/#emacs ... 8^) 17:21
17:22 cognominal joined
moritz somehow the last ~5 rakudo patches that I tried all went wrong :( 17:23
TimToady maybe rakudo is somehow turning into a Haskell compiler? 17:24
masak o, cruel fate! 17:25
moritz I hope not :-)
17:26 cognominal_ joined 17:27 cognominal left 17:32 gaussblurinc_ joined 17:35 fgomez left
moritz nr: use Test; nok ([==] (^2**64).roll(10).map(* +& 15)), 'Range.pick has enough entropy'; # what a lovely test case for [perl #104514] 17:36
p6eval niecza v24-13-g95f809a: OUTPUT«not ok 1 - Range.pick has enough entropy␤# /tmp/PFi9IlDssg line 1␤»
..rakudo 6d4b90: OUTPUT«not ok 1 - Range.pick has enough entropy␤»
17:36 fgomez joined
tadzik uh-oh :) 17:37
moritz I'm working on a fix for that in rakudo, but it's not quite good enough yet
but I don't understand why niecza fails the test 17:38
$ niecza -e 'say .fmt("%b").substr(*-4) for (^2**64).roll(10)' 17:39
those not all the same
n: say [==] 0b110, 0b1100, 0b1000 17:40
p6eval niecza v24-13-g95f809a: OUTPUT«False␤»
moritz n: use Test; plan 1; nok 0, 'foo'
p6eval niecza v24-13-g95f809a: OUTPUT«1..1␤ok 1 - foo␤»
moritz n: say .fmt("%b") for (^2**64).roll(10).map(* +& 15) 17:41
p6eval niecza v24-13-g95f809a: OUTPUT«0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤» 17:42
17:42 [particle]1 joined
moritz n: say .fmt("%b") for (^2**64).roll(10).map({ $_ +& 15 }) 17:42
p6eval niecza v24-13-g95f809a: OUTPUT«0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤»
moritz n: say 14 +& 15
p6eval niecza v24-13-g95f809a: OUTPUT«14␤»
moritz n: say .fmt("%b") for (^2**64).roll(10)
p6eval niecza v24-13-g95f809a: OUTPUT«1010100100001000010110111001110100101011100101110001000000110101␤1010110010110000010001111110000110101001001101110001110101100011␤101011101101111111110001110110001010110101000100011001001011001␤11101010011000010001010000110111011001100010111100100010100010…
colomon 's interest has been attracted by this one...
moritz colomon: any idea while the +& 15 always returns 0? 17:43
n: say (2**64 + 1) +& 15
p6eval niecza v24-13-g95f809a: OUTPUT«0␤»
moritz ah, there you go
17:43 fgomez left
moritz seems that +& only works with machine-size ints? 17:43
rn: say (2**64 + 1) +& 15
p6eval rakudo 6d4b90: OUTPUT«1␤»
..niecza v24-13-g95f809a: OUTPUT«0␤»
17:43 [particle] left
moritz rn: say (2**64 + 15) +& 15 17:43
p6eval rakudo 6d4b90: OUTPUT«15␤» 17:44
..niecza v24-13-g95f809a: OUTPUT«0␤»
colomon whoops.
+& is not set up to handle bigints at all 17:45
17:45 fgomez joined
colomon is looking at what is needed to fix. 17:46
are there more normal spectests for binary ops on bigints?
dalek kudo-js: 5f72e41 | (Paweł Murias)++ | / (4 files):
very basic deserialisation, start passing test 9 again
17:54
colomon niecza> (^2**64).roll(10).map(* +& 15).map(*.fmt("%04b ")) 17:56
0001 1000 1010 0100 0100 0010 0000 1100 0011 0010
Ayiko r: (^2**64).roll(5).fmt('%x') 17:57
p6eval rakudo 6d4b90: ( no output )
Ayiko r: say (^2**64).roll(5).fmt('%x')
p6eval rakudo 6d4b90: OUTPUT«51010000 63780000 2a230000 62f20000 8d150000␤»
colomon is spectesting his fix, but so far it only works (?) for +&. 18:01
colomon worries there are not enough tests for this in roast and/or he doesn't know where the tests are. 18:02
masak n: say :16( 2**64 + 15 ) 18:11
p6eval niecza v24-13-g95f809a: OUTPUT«Unhandled exception: Numbers may not be passed :base(); if you wanted to render the number in the given base, use $number.base($radix); if you want to treat the number as a string, explicitly coerce it first␤ at /home/p6eval/niecza/lib/CORE.setting line 1…
masak oh, right. :)
n: say (2 ** 64 + 15).base(16)
p6eval niecza v24-13-g95f809a: OUTPUT«1000000000000000F␤»
18:11 MikeFair_ left
masak n: say (2 ** 64 + 15).base(16).substr(*-1) 18:11
p6eval niecza v24-13-g95f809a: OUTPUT«F␤»
masak n: say :16( (2 ** 64 + 15).base(16).substr(*-1) ) 18:12
p6eval niecza v24-13-g95f809a: OUTPUT«15␤»
masak there you go. voila! :P
18:13 cognominal_ left
moritz ok, I have a fix for the entropy thing 18:23
but
colomon so, I have niecza working +& on bigints (I think). Full spectest didn't have any failures. But it didn't have any TODO passes, either.
moritz it always comes with a "but", right?
colomon but is constant, yes.
moritz it uses the random number generator from libtommath
which in turn uses the one from libc
which we don't ever seed in parrot or rakudo
so, we always get the same .pick/.roll results, for each invocation of the program 18:24
that sucks
I could do it in nqp_dynop_setup, but IMHO that sucks too, because then all of NQP does that
ooh, we have a nqp_bigitn_setup op 18:25
18:29 awwaiid joined
masak .oO( you can't every "fix entropy" without something else coming un-fixed ) :P 18:33
ever*
TimToady
.oO(Fly softly and carry a big radiating surface.)
18:35
dalek p: b2e3f27 | moritz++ | src/ops/nqp_bigint.ops:
call srand in nqp_bigint_setup

nqp::rand_I uses mp_rand, which in turn uses the system rand() call
18:38
18:41 SamuraiJack left, kivutar joined 18:50 kivutar left 18:51 gfldex joined 18:56 xinming_ joined, cognominal joined 18:59 xinming left 19:02 cognominal left 19:08 dayangkun_ joined
dalek kudo/nom: a930588 | moritz++ | / (3 files):
RT #109586: .pick on a large range has too little entropy

fixed by using nqp::rand_I instead of Num.rand
19:08
colomon r: use Test; is 0xdeaddead0000deaddead0000dead +& 0xbeef0000beef0000beef0000beef, 0x9ead0000000000009ead00009ead, 'numeric bitwise +& of bigint'; 19:09
p6eval rakudo 6d4b90: OUTPUT«ok 1 - numeric bitwise +& of bigint␤»
colomon n: use Test; is 0xdeaddead0000deaddead0000dead +& 0xbeef0000beef0000beef0000beef, 0x9ead0000000000009ead00009ead, 'numeric bitwise +& of bigint';
p6eval niecza v24-13-g95f809a: OUTPUT«not ok 1 - numeric bitwise +& of bigint␤# /tmp/udDmisyJLT line 1␤# Failed test␤# got: -2147483648␤# expected: 3218327189491931657561814673170093␤»
masak p: use Test; is 0xdeaddead0000deaddead0000dead +& 0xbeef0000beef0000beef0000beef, 0x9ead0000000000009ead00009ead, 'numeric bitwise +& of bigint' 19:11
p6eval pugs: OUTPUT«pugs: *** Unsafe function 'use' called under safe mode␤ at /tmp/qrKUDUpe90 line 1, column 1␤»
masak p: say 0xdeaddead0000deaddead0000dead +& 0xbeef0000beef0000beef0000beef
p6eval pugs: OUTPUT«3218327189491931657561814673170093␤»
masak p: say 256.base(16)
p6eval pugs: OUTPUT«*** No such method in class Int: "&base"␤ at /tmp/_2PML_OYYz line 1, column 5 - line 2, column 1␤»
19:11 dayangkun left
masak aww :) 19:11
moritz you can still use .fmt or sprintf 19:12
TimToady at least for hex output
moritz aye 19:13
masak p: say sprintf '%x', 0xdeaddead0000deaddead0000dead +& 0xbeef0000beef0000beef0000beef
p6eval pugs: OUTPUT«(timeout)»
dalek ast: c384d77 | (Solomon Foster)++ | S03-operators/bit.t:
A few simple tests for bitops with bigints.
TimToady p: say sprintf '%x', 0xdeaddead0000deaddead0000dead 19:14
p6eval pugs: OUTPUT«(timeout)»
TimToady p: say sprintf '%x', 0xdead
p6eval pugs: OUTPUT«(timeout)»
dalek ecza: aea5a41 | (Solomon Foster)++ | lib/Builtins.cs:
Rewrite numor, numand, and numxor to handle BigIntegers.
19:15
TimToady p: printf "%x\n", 0xdead
p6eval pugs: OUTPUT«(timeout)»
TimToady p: printf "%d\n", 0xdead
p6eval pugs: OUTPUT«(timeout)»
TimToady consistency--
moritz brokenness-- 19:17
19:18 Targen joined, cognominal joined
dalek kudo/froggs_mergemulti: 70262f8 | moritz++ | src/utils/perl6doc (3 files):
delete old perl6doc files
19:20
kudo/froggs_mergemulti: 6d4b902 | moritz++ | src/core/Temporal.pm:
fix DateTime.Date (RT #114758)'
kudo/froggs_mergemulti: 1685f09 | (Tobias Leich)++ | src/ (4 files):
Merge branch 'nom' of github.com:rakudo/rakudo into froggs_mergemulti
kudo/froggs_mergemulti: a930588 | moritz++ | / (3 files):
RT #109586: .pick on a large range has too little entropy

fixed by using nqp::rand_I instead of Num.rand
kudo/froggs_mergemulti: ad93780 | (Tobias Leich)++ | / (3 files):
Merge branch 'nom' of github.com:rakudo/rakudo into froggs_mergemulti
colomon froggs_mergemulti? 19:23
moritz colomon: a branch where you can import the same multi from different modules 19:24
FROGGS right, like trait_mod:<is> from NativeCall and another module like Inline::C 19:25
(and the core ones of course)
btw, is there a reason for not moving &throws_like to Test.pm ? 19:26
moritz yes, it runs more than one test per call
FROGGS a fixed number of tests? 19:27
moritz no, depends on the arguments 19:28
FROGGS oaky, thanks
colomon took me a while to figure that one out yesterday.
FROGGS would it be possible to run these tests as subtests? so it is still one big test for the main plan? 19:30
because throws_like is really handy
moritz subtests? 19:31
does TAP have that facility? 19:32
19:32 sivoais joined
FROGGS moritz: search.cpan.org/~mschwern/Test-Simp...pm#subtest 19:33
don't know if prove can handle it
timotimo run-time module importing with require doesn't work yet? 19:34
r: my $modname = "Test; require ::($modname) <is>;
p6eval rakudo 6d4b90: OUTPUT«===SORRY!===␤Unable to parse expression in double quotes; couldn't find final '"'␤at /tmp/3T7IlvZcjd:1␤------> name = "Test; require ::($modname) <is>;⏏<EOL>␤ expecting any of:␤ postfix␤»
timotimo r: my $modname = "Test"; require ::($modname) <is>; 19:35
p6eval rakudo 6d4b90: OUTPUT«Could not find ::($modname) in any of: /home/p6eval/nom-inst/lib/parrot/4.10.0-devel/languages/perl6/lib, /home/p6eval/nom-inst/lib/parrot/4.10.0-devel/languages/perl6/vendor/lib, /home/p6eval/nom-inst/lib/parrot/4.10.0-devel/languages/perl6/site/lib, /home/p6eval/…
moritz r: my $modname = 'Test'; require $modname <&is>;
p6eval rakudo 6d4b90: OUTPUT«===SORRY!===␤Two terms in a row␤at /tmp/DnsBHBzNkx:1␤------> modname = 'Test'; require $modname <&is>⏏;␤ expecting any of:␤ postfix␤ infix or meta-infix␤ infix stopper␤ prefix or term␤ prefi…
moritz hm
r: my $modname = 'Test'; require $modname, <&is>; 19:36
p6eval rakudo 6d4b90: OUTPUT«Could not find Test &is in any of: /home/p6eval/nom-inst/lib/parrot/4.10.0-devel/languages/perl6/lib, /home/p6eval/nom-inst/lib/parrot/4.10.0-devel/languages/perl6/vendor/lib, /home/p6eval/nom-inst/lib/parrot/4.10.0-devel/languages/perl6/site/lib, /home/p6eval/.per…
FROGGS I love it, TimToady made the TAP protocol ;o)
moritz seems that only require <modul_name> allows an import list in Rakudo 19:37
TimToady didn't really make the protocol, just kinda prototyped it for Perl 1
timotimo wow, it's that old? impressive. 19:38
FROGGS TimToady: are there code snippets on the web of Perl 1 to 4 ?
FROGGS googles
sorear FROGGS: if you check out the perl5 git repository, the history contains the source for every version of perl that was released and some that weren't back to perl 1 19:40
including a full import of the perforce history from early perl5
FROGGS sorear: cool
timotimo how much space does the repo itself take? must be quite big 19:41
sorear I don't know who to thank for this heroic research work, but that's the only thing to call it
colomon anonymous hero++ 19:42
FROGGS timotimo: a few hundred megabytes IIRC
sorear timotimo: after "git pull; git gc; du -sh .git" I have 112M
but I think that perl 1 is an infinitesimal fraction of that :p
timotimo wow, i suppose git compresses pretty nicely. 19:43
sorear this repository contains source for 49,639 revisions (counting blead only) 19:44
timotimo i wonder how old the oldest line of code in the perl repo may be :) 19:45
not very important to know, though
sorear there are three versions of perl: 1-4, 5, and 6
timotimo perl5 was a rewrite? 19:46
sorear yes
FROGGS at some point you have to start from scratch
nwc10 however, it was a rewrite from the perl 4 code
not from scratch
timotimo mhm
sorear oh hai nwc10
nwc10 as at least one bit of perl 4 code survived, dead, for IIRC 10 years until it was purged
TimToady probably the regex engine out of Perl 1, which was stolen^Wborrowed from somewhere I don't even remember, Goslings emacs maybe 19:47
nwc10 I'm not the best person to ask. TimToady is :-)
TimToady doesn't matter if there was a complete rewrite; question was oldest code in the repo
timotimo who is this timtoady guy that everyone thinks he knows so much about perl! oh, wait ...
TimToady <-- reflexively 19:48
FROGGS but 49,639 doesnt sound right, I made over 10,000 commits to my work repo since 2009
nwc10 aha. oldest code is this: perl5.git.perl.org/perl.git/commit/perl-1.0
135M .git/
TimToady but the oldest line of code is obviously going to be older than that
nwc10 that's a fairly clean current perl 5 checkout
sorear I think nwc10 may have been present when I pried the history out of TimToady. also, he's a little tiny bit more knowledgable on p5guts than I am :D
(ok maybe more than that) 19:49
timotimo oh, i totally misspoke. i was wondering about the oldest bit/line of code that's still being compiled into a modern perl5 binary
TimToady I'll bet there's a curly or two that were in Perl 1 that are still in Perl 5 :)
timotimo moritz: can you estimate how hard it would be for a nqp/rakudo-guts beginner to improve rakudos support for run-time importation? 19:50
sorear timotimo: until you said "compiled" I would have guessed the oldest line was a copyright declaration :D
timotimo sorear: that was an attempt at making a sensible metric, but it's still flawed, as TimToady just ponited/curlied out ;)
TimToady: at what point is a curly still the same curly it was before? ;) 19:51
nwc10 there was an entire regression test that was line-for-line from perl 1 in perl 5 until 2 years ago
moritz timotimo: making require ::($name) <importlist>; work shouldn't be too hard
timotimo moritz: cool, can you point me at a particular file, function or class? 19:52
diakopter "Here is some breathtakingly efficient cheating"
masak timotimo: there's really only one curly, duplicating itself all over the universe, instantiating itself everywhere.
diakopter "this" "really" "screams" "eat" "dust" "sed" 19:53
moritz timotimo: in src/Perl6/Actions.pm method mumble:sym<require>
dunno what value 'mumble' takes here
FROGGS timotimo: maybe compare this method <require> with the <use> one 19:54
moritz timotimo: there's some logic that evaluates the module name; that needs to be fixed
timotimo thank you, i'll have a look and see if i can make sense of it :)
FROGGS timotimo: and maybe have a look at require and use in src/Perl6/Grammar.pm, if your require statements arn't recognized 19:55
moritz there should already be a method in Perl6::World that generates code for the module name 19:56
timotimo moritz: that "mumble:" was figurative and you were really refering to statement_control:sym<require>?
moritz timotimo: correct
something like dissect_longname or so
FROGGS timotimo: Grammar.pm and Actions.pm have a similar structure (almost same-named methods), World.pm is a collection of functions, if you see a $*W somewhere it's World.pm 19:57
timotimo okay, i should really do this on my desktop instead of my weak laptop :) 19:59
sorear masak: like the electron? 20:01
FROGGS sorear: is that why my electricity bill is that high? 20:02
masak sorear: there used to be one electron, but now there's two: the new one represents "green energy". 20:08
moritz and its spin is opposite to the old one 20:09
FROGGS moritz: that would be an anti-electron, if I remember my little hawkin book right 20:10
moritz FROGGS: nah, I'm merely talking about the value of the magnetic quantum number 20:11
+ℏ/2 or -ℏ/2 20:12
FROGGS okay, I better get back to hackery ;o)
masak moritz: the spin is Greenspun, of course. :P 20:15
20:37 quester joined
[Coke] wants a list of solitaire games he can search by how you play it, so he can figure out the name of this braindead time killer. 20:51
FROGGS [Coke]: maybe ask rindolf, he knows some 20:53
timotimo does scheme source code count as "searchable by how to play"? ;)
colomon rn: say (+^0x1234).base(16) 21:03
p6eval rakudo a93058, niecza v24-14-gaea5a41: OUTPUT«-1235␤»
colomon hurm 21:04
r: say (+^0x4345839048690348598349583490589034859034859084390583905890385903859).base(16)
p6eval rakudo a93058: OUTPUT«-434583904869034859834958349058903485903485908439058390589038590385A␤»
moritz colomon: note that rakudo's bigint ops aren't reliably when it comes to sign changes 21:05
colomon moritz: I just got to wondering what +^ is actually supposed to do 21:06
since I was thinking of trying to make it work on bigints in niecza.
sorear +^ is -*-1 21:09
21:10 JJ_Brain joined
colomon sorear: I was sort of coming to that conclusion. 21:11
21:12 JJ_Brain left
colomon but then, why isn't public static BigInteger operator~ a one liner? 21:12
21:13 GlitchMr left
colomon rn: say -1 +& 0xffffffffffffffffffffffff 21:13
p6eval rakudo a93058, niecza v24-14-gaea5a41: OUTPUT«79228162514264337593543950335␤»
colomon rn: say (-1 +& 0xffffffffffffffffffffffff).base(16) 21:14
p6eval rakudo a93058, niecza v24-14-gaea5a41: OUTPUT«FFFFFFFFFFFFFFFFFFFFFFFF␤»
colomon rn: say 1 +< (2**64 + 1) 21:24
p6eval rakudo a93058: OUTPUT«2␤»
..niecza v24-14-gaea5a41: OUTPUT«1␤»
colomon rn: say 1 +< (3)
p6eval rakudo a93058, niecza v24-14-gaea5a41: OUTPUT«8␤»
colomon rn: say 1 +< (2**63)
p6eval rakudo a93058, niecza v24-14-gaea5a41: OUTPUT«1␤»
colomon rn: say 1 +< (2**31)
p6eval niecza v24-14-gaea5a41: OUTPUT«1␤»
..rakudo a93058: OUTPUT«65536␤»
colomon rn: say 2 ** 31 21:25
p6eval rakudo a93058, niecza v24-14-gaea5a41: OUTPUT«2147483648␤»
colomon rn: say 2**(2**31)
p6eval niecza v24-14-gaea5a41: OUTPUT«(timeout)»
..rakudo a93058: OUTPUT«Inf␤»
colomon r: say 0xdeaddead0000deaddead0000dead +< 4 21:27
p6eval rakudo a93058: OUTPUT«72263525103072027874911344258837200␤»
dalek ast: d8704e0 | (Solomon Foster)++ | S03-operators/bit.t:
Add simple bigint +< and +> tests.
21:28
masak all this makes me think of 2-adic numbers. 21:36
pmurias jnthn: ping 21:48
21:53 mtk left 21:55 bruges left 22:06 xinming_ left 22:07 mtk joined
dalek ecza: 7986efc | (Solomon Foster)++ | lib/Builtins.cs:
Change numlshift and numrshfit to handle bigints.
22:07
masak pmurias: you can ping jnthn, but he's not likely to reply within the next 48 hours. 22:08
22:20 kaare_ left
pmurias masak: I just want to avoid asking him questions I might figure out the answer to before he sees them ;) 22:43
timotimo video recording frustrates me greatly. the only very workable solution i found so far makes my pretty colors unpretty 22:44
well, unpretty colors it is. 22:45
22:51 alec__ joined 22:53 alec left 23:09 MikeFair joined 23:10 MayDaniel left
masak TV Tropes calls an autopun a tvtropes.org/pmwiki/pmwiki.php/Main...ingArticle 23:22
23:23 cognominal left 23:26 aindilis joined 23:29 cognominal joined, alec__ left 23:31 alec joined 23:33 yakshavr joined
pmurias timotimo: you are making a screencast? 23:36
timotimo i'm trying, yes d)
:)
masak 'night, #perl6 23:41
timotimo 'night masak! 23:42
colomon \o
timotimo okay, i've recorded stuff. now i just have to convince myself that i've done it good enough so that i can put it up on the 'nets :P 23:56
23:59 gaussblurinc_ left