»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
00:02 smls left
timotimo ah, yes. 00:06
when it's nicely optimized and all, the initial start-up time of farabi6 isn't that terrible any more
however
with my changes, i get a nice speed boost there as well
m: say "i got a factor of { 0.197099208831787 / 0.000693559646606445 } improvement" 00:07
camelia rakudo-moar 315ec6: OUTPUT«i got a factor of 284.1849432794774540 improvement␤»
timotimo m: say ("a".."z").ords.join(", ") 00:10
camelia rakudo-moar 315ec6: OUTPUT«97, 32, 98, 32, 99, 32, 100, 32, 101, 32, 102, 32, 103, 32, 104, 32, 105, 32, 106, 32, 107, 32, 108, 32, 109, 32, 110, 32, 111, 32, 112, 32, 113, 32, 114, 32, 115, 32, 116, 32, 117, 32, 118, 32, 119, 32, 120, 32, 121, 32, 122␤» 00:11
00:11 chenryn left
timotimo m: say ("a".."z") 00:11
camelia rakudo-moar 315ec6: OUTPUT«"a".."z"␤»
timotimo m: say ("a".."z").ords
camelia rakudo-moar 315ec6: OUTPUT«97 32 98 32 99 32 100 32 101 32 102 32 103 32 104 32 105 32 106 32 107 32 108 32 109 32 110 32 111 32 112 32 113 32 114 32 115 32 116 32 117 32 118 32 119 32 120 32 121 32 122␤»
timotimo oooh 00:12
m: say ("a".."z")>>.ord.join(", ")
camelia rakudo-moar 315ec6: OUTPUT«97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122␤»
00:16 Alula left 00:17 Alula joined
colomon m: say ("a".."z").join("").ords 00:18
camelia rakudo-moar 315ec6: OUTPUT«97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122␤»
timotimo i wanted a representation i could copy & paste into a perl code file :) 00:23
00:24 vendethiel left
timotimo .tell azawawi i just sent out a pull request for HTTP::Easy that improves the time it takes to split a HTTP request into header and body by a factor of 300x, making the very first load of farabi6 much, much faster :) 00:28
yoleaux timotimo: I'll pass your message to azawawi.
00:28 anaeem1 left 00:33 pierrot left 00:34 pierrot joined 00:36 vendethiel joined
timotimo .tell azawawi my $index-file = '/home/azawawi/rakudo/install/languages/perl6/site/bin/index.data'; 00:38
yoleaux timotimo: I'll pass your message to azawawi.
00:44 vendethiel left
timotimo the p6doc-index has a super helpful entry "with C<m:s/a b/> or C<m:sigspace/a b/>, the blank in the regexes matches arbitrary whitespace" 00:46
00:49 pochi left
dalek c: 1452a95 | (Timo Paulssen)++ | bin/p6doc-index:
a little helper to locate the index file

farabi6 wants to read out the index itself
00:53
00:55 gfldex left 00:58 pochi joined 01:00 vendethiel joined, rurban joined 01:08 xenoterracide left, skarn left, xenoterracide joined, sivoais left 01:13 xenoterracide left 01:14 xenoterracide joined 01:25 rurban left 01:26 leont left 01:31 sivoais joined 01:33 xenoterracide left 01:34 xenoterracide joined, skarn joined
timotimo works on making the ansi color detection work 01:34
01:34 xenoterracide left 01:35 xenoterracide joined 01:39 xenoterracide left, xenoterracide_ joined 01:50 silug left
timotimo and off to bed i go 01:57
colomon \o 01:58
02:01 xenoterracide_ left
japhb .ask timotimo Why does p6doc-index write it's own usage info manually, rather than just using #| doc comments for the MAIN multis and letting the magic do its job? 02:13
yoleaux japhb: I'll pass your message to timotimo.
japhb *its
.tell colomon For a fellow Perlish Forthwright: A Forth-in-Perl I wrote back in my Perl 5 days: www.broadwell.org/perl/ (gjbforth) 02:15
yoleaux japhb: I'll pass your message to colomon.
colomon o/
yoleaux 02:15Z <japhb> colomon: For a fellow Perlish Forthwright: A Forth-in-Perl I wrote back in my Perl 5 days: www.broadwell.org/perl/ (gjbforth)
colomon CamelForth? 02:18
japhb: that's some really nice looking p5 code. 02:22
Tekk_ japhb: forth in perl is really fun 02:30
Tekk_ wrote a really basic one once :)
02:30 dayangkun joined 02:39 chenryn joined
japhb colomon: Lemme find the reference 02:41
Holy cow, it's *active*! www.camelforth.com/news.php
I read the original articles 02:42
02:44 ilbot3 left 02:45 oetiker_ left 02:46 ilbot3 joined
colomon Woah, CamelForth isn't another Forth in Perl? :) 02:59
japhb Nope! :-) It caught my eye because it was a "teaching Forth" that I knew the assembly languages for (well, some of them, anyway) 03:03
colomon I cut my teeth on 6502 Forth on the C64. My first ever structured code. :) 03:04
japhb That is not a description that pops to mind when I think of an early Forth. :-) 03:07
colomon it was definitely more structured than C64 Basic. 03:08
japhb Heh
NOT HARD.
03:09 yeahnoob joined 03:13 noganex joined 03:16 noganex_ left 03:33 fhelmberger joined 03:38 fhelmberger left 03:43 bjz joined 03:50 BenGoldberg left 03:52 rmgk_ joined, rmgk is now known as Guest28978, Guest28978 left, rmgk_ is now known as rmgk 03:54 vendethiel left 03:56 vendethiel joined, yeahnoob left 03:59 xenoterracide_ joined, BenGoldberg joined 04:09 gfldex joined 04:10 yeahnoob joined 04:24 jack_rabbit joined 04:33 BenGoldberg left 04:35 bjz left 04:40 mauke_ joined 04:42 bjz joined 04:44 mauke left, mauke_ is now known as mauke 04:47 ggoebel111111117 joined 04:49 ggoebel111111116 left, chenryn left 05:02 gfldex left 05:04 xenoterracide_ left 05:12 [Sno] left 05:26 chenryn joined 05:46 oetiker joined 06:15 kaare_ joined, yeahnoob left 06:16 FROGGS joined
FROGGS lizmat: a big +1 to IO::Pipe 06:16
06:16 khisanth_ joined 06:17 Khisanth left 06:19 gtodd left 06:31 yeahnoob joined 06:40 kaleem joined 06:44 gtodd joined 06:50 [Sno] joined 06:56 esaym153 left 07:04 anaeem1 joined 07:05 anaeem1 left, anaeem1 joined 07:06 jac50 left 07:09 esaym153 joined 07:13 FROGGS left, darutoko joined 07:16 pecastro left 07:33 fhelmberger joined
grondilu rewrote 'draw a sphere' into something like: until start { do-this } { do-that } and wonders if a syntax like while { do-this } { do-that } would make sense or be usefeul. 07:35
(gist.github.com/grondilu/ab824d3fbeaf54f9f9ba) 07:36
07:38 fhelmberger left
lizmat grondilu: if I understand your code correctly, you basically writing the file async? 07:39
*made 07:40
07:40 FROGGS joined
grondilu lizmat: yes, so that I can watch the progress in real time. 07:40
lizmat is each of the iterations of the for {} independent of each other ? ( the pick(*) seems to indicate that) 07:41
if so, have you tried replacing the until start { for ... -> { 07:42
by await do for ... -> { start { ?
grondilu not sure it's the same
lizmat *that* would speed up calculation up a lot
if it doesn't break it :-) 07:43
grondilu 'until start {' repeats until the job has ended
lizmat it would be a stress test for async
grondilu oh
hang on
I see
FROGGS lizmat: in the end I guess we want an openpipe() sub, so that we don't have a sub like open() that returns very different stuff depending on the arguments 07:44
grondilu you're talking about making a thread for each pixel, right? That seems violent.
lizmat grondilu: in a world where you have 2K+ cores, it isn't :-) 07:45
grondilu but if I await do for, it won't write the file until everything is done, will it? 07:47
FROGGS renderes like brazil create threads per bucket (16 by 16px for example), and only run N threads at a time (N is often #cores - 1)
lizmat indeed
07:47 erkan joined
lizmat it will wait until *all* the promises returned, are either kept or broken 07:47
FROGGS: start {} only puts it in the scheduler
grondilu then I want until do for ... { start { } } { write-file(); sleep 1; } 07:48
lizmat so rakudo would do this automagically more or less (less at the moment, I know, but you get the idea)
FROGGS yes, so you already run only a few at a time
lizmat grondilu: the last time I tried something like this, rakudo crashed in interesting ways (like japhb++ noted yesterday) 07:49
FROGGS lizmat: about openpipe(), this would look like run() or shell() wrt signature, except that we also tell it that we want to read or write
lizmat so: if it works, great! if it doesn't, please keep the code around for when got thos wrinkles out of moar / libuv
07:49 immortal left
grondilu tries 07:50
07:51 JimmyZ joined, dayangkun left
grondilu use of uninitialized value of type Any in numeric context 07:52
JimmyZ grondilu: oh, you gist code got a segfault on moarvm :P
segfault or 'invalid status 830244808 in GC orchestrate'
grondilu Segmentation fault
lizmat I was afraid so :-(
JimmyZ a nice bug to report to moarvm
grondilu the truth is I hadn't actually tried the code currently on gist. The previous version worked and differed only in that the start was affected to a variable. 07:54
JimmyZ I will file a bug to moarvm
grondilu the previous version that worked: gist.github.com/grondilu/ab824d3fb...f3914bae68 Differs only in syntax. 07:55
(well, not in syntax actually, but in that there is an additional temp var) 07:56
(or maybe @pixels being out of MAIN, but I doubt that matters) 07:57
07:58 krunen joined
grondilu just checked. my $job = start { do-this }; until $job { do-that } # works 07:59
until start { do-this } { do-that }; # doesn't
moritz try 08:00
until (start { do-this }) { do-that };
ah no
never mind
until (start { do-this }) { do-that }; would start a new job for each iteration of the loop
not what you want
grondilu oh yeah 08:01
wait, I am confused now 08:02
08:03 chenryn left
grondilu m: until start { say "A"; sleep 1 } { say "B" } 08:03
camelia rakudo-moar 315ec6: OUTPUT«A␤B␤A␤B␤A␤B␤A␤B␤A␤B␤A␤B␤A␤B␤A␤B␤A␤B␤A␤B␤A␤B␤Memory allocation failed; could not allocate 8480 bytes␤»
grondilu m: until $ = start { say "A"; sleep 1 } { say "B" }
camelia rakudo-moar 315ec6: OUTPUT«A␤B␤A␤B␤A␤B␤A␤B␤A␤B␤A␤B␤A␤B␤A␤B␤A␤B␤A␤B␤A␤B␤Memory allocation failed; could not allocate 8480 bytes␤»
grondilu m: my $job = start { say "A"; sleep 1 }; until $job { say "B" } 08:04
camelia rakudo-moar 315ec6: OUTPUT«A␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤…»
grondilu it does indeed repeat the "do-this".
08:10 chenryn joined 08:14 zakharyas joined 08:15 baest joined
moritz m: my $job = start { say "A"; sleep 1 }; until $job { say "B"; sleep 0.1 } 08:23
camelia rakudo-moar 315ec6: OUTPUT«A␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤»
moritz m: my $job = start { say "A"; sleep 1; say 'A done' }; until $job { say "B"; sleep 0.1 }
camelia rakudo-moar 315ec6: OUTPUT«A␤B␤B␤B␤B␤B␤B␤B␤B␤B␤B␤A done␤»
08:34 rindolf joined 08:35 kjs_ joined, JimmyZ_ joined 08:37 JimmyZ left, JimmyZ_ is now known as JimmyZ, JimmyZ left 08:38 kjs_ left 08:42 tgt joined 08:52 tgt left 08:56 virtualsue joined 08:57 fhelmberger joined 09:00 brrt joined 09:03 bjz left, bjz joined 09:08 ptc_p6 joined 09:16 Ven joined
Ven masak: www.reddit.com/r/programming/commen..._6/clne3aq :) 09:16
o/, #perl6
dalek ast: 16bbdc6 | (Elizabeth Mattijsen)++ | S17-scheduler/ (4 files):
Make sure we cancel all cued code

Hopefully this will make the JVM spectest using the eval server a viable option again.
09:17
Ven .tell masak www.reddit.com/r/programming/commen..._6/clne3aq :) 09:20
yoleaux Ven: I'll pass your message to masak.
09:22 denis_boyun_ joined
brrt wow, reddit is capable of positivity? 09:22
lizmat 1/42 responses, afaics 09:24
brrt but still :-)
09:24 virtualsue left
moritz I wonder if it's meant ironically :-) 09:25
brrt nah.. reddit may not be a very positive place, but that doesn't mean we have to be the same 09:26
09:26 kjs_ joined
moritz also reddit has this disparity where the voting shows that the majority of readers like it, but the majority of commenters are very negative 09:27
Ven Well, I can understand a pill that's been sitting here for 14 years is a bit bitter to swallow. 09:28
09:29 yeahnoob left
brrt hmm... not I 09:29
perl6 has taken it's time to develop and mature 09:30
so what
it's a technological project
it's not as if this causes some irrepairable damage 09:31
dalek kudo/nom: 6159f1d | (Elizabeth Mattijsen)++ | src/core/CurrentThreadScheduler.pm:
CurrentThreadScheduler can now also .cancel
peteretep brrt: There are Perl 5 developers of the view that Perl 6 killed Perl 5 09:32
Ven brrt: that's not the issue. it was said "it's almost ready" a lot of times, and that gets people chewing on nothing
brrt wait, lizmat, how does that work, how can you cancel a task on the current thread
lizmat it doesn't, it's completely fake :-)
brrt peteretep: but that's kind of a passive world view right 09:33
as in, nobody could have improved / saved perl5 because perl6 was there
lizmat afk for a few hours&
brrt as if the pressence of other people working on another project inhibited the development of perl5 in any way 09:34
Ven: 'ready' is a moving target
:-)
Ven brrt: ...which doesn't address the issue at hand.
"I thought I was in *it*, but then they changed what *it* means, and I'm not in anymore"
brrt well, that happens 09:35
no reason to have hard feelings imho
Ven I don't have hard feelings. I couldn't care less, I don't know perl 5. It's just that I can empathize. 09:36
www.reddit.com/r/perl/comments/2kkf..._advances/ <- a more positive thread :P
brrt :-) 09:37
i guess i can empathize with broken expectations
but that should not lead to hate among reasonable people
09:37 pmurias joined
Ven It's reddit. Who talked about reasonable people? 09:37
huf programmers as a whole? reasonable people? 09:38
we hold intense discussions on which editor is factually superior
none of the discussions contain actual facts
Ven Especially r/programming. It's mostly a bunch of script kiddies in awe before the Next Big Thing and with hundreds of replies on clickbait-titled articles :/
huf: yeah, but vimscript is not as good as elisp.
*g*
huf i'll give you that
arnsholt Vimscript is nuts... 09:39
huf and elisp has had lexicals for a while now...
Ven
.oO( just use emacs with evil! )
huf i dont even understand the purpose of vimscript. why even have it? why not just some random language like lua or tcl or perl or whatever
or elisp!
brrt i thought vim was perl-scriptable 09:40
huf yeah, it is now
but i assume it was originally vimscript-only
and then the kitchen sink got added (perl, python, ruby, cake)
brrt well, to be fair, having your own scripting language kind of was a unix rite of passge at one time
(for a program)
pmurias vimscript was gradually evolved from the ex command language
huf :)
pmurias: ah! history. 09:41
pmurias my guess is by random mutation
Ven pmurias: very interesting. have got links on how that happened, maybe?
09:42 virtualsue joined
pmurias Ven: not really, I'm mostly guessing it was gradually evolved as it doesn't show any signs of being intelligently designed ;) 09:47
09:47 TuxCM left
Ven ha, that's harsh :P 09:47
(but true, just looking at my .vimrc...) 09:48
09:49 virtualsue left
masak Ven: www.reddit.com/r/programming/commen..._6/clne3aq -- :) 09:51
yoleaux 09:20Z <Ven> masak: www.reddit.com/r/programming/commen..._6/clne3aq :)
Ven eh. 09:52
masak++ anyways.
masak moritz: both reddit and HN have a mechanism that enhance disagreements in threads.
Ven do they? 09:53
masak yes. people who agree don't reply.
Ven they upvote, though
masak right; so you end up having a lot of upvoted comments arguing back and forth.
the fact that upvotes (agreement) are a property of comments (disagreement) is itself telling. 09:54
Ven: I'm assuming you saw the Lisp I wrote yesterday.
Ven: I now want to add macros to it. how should I do it? :)
Ven eh. How does variance works in c#? If I override a `List<T> where T=Foo` with a List<Foo>, it doesn't consider it an overload... 09:55
masak: I... didn't :)
Ven backlogs at various times in the day...
masak Ven: github.com/masak/ipso
Ven masak: debugger invoked on a: Y-U-NO-CAPS :P 09:56
masak within 200 lines, there's a Perl 6 implementation of eval, and a Lisp eval builtin.
Ven ...now make it a slang :DDD
moritz masak++
Ven masak++ indeed.
I'd leave caar and the family be generated by macros :P
masak well, I don't *have* macros yet. 09:57
Ven I know, I know :)
masak and besides realizing that they will somehow be a part of the reader, I don't have much of a clue for how to get them.
Ven (they probably want to be macros as well, though, so that (setf (car a) 'b) works)
moritz masak: once thing I don't understand is why you need to have caar etc. once in %SETTING, and once as a sub in eval
*one thing
feels redundant 09:58
masak moritz: I don't. I could probably remove those at this point.
moritz: but I wrote the Perl 6 part first, so then I couldn't use the setting.
Ven masak: I'm guessing you know how to get lexical scope at this point...
macros aren't reader-wise, btw.
(...except for reader-macros...)
masak Ven: I have a hunch how to get lexical scope, yes. the key is tying scope to functions instead of to the interpreter. 09:59
Ven masak: Your AST can just carry around a Scope, which is "inheriting" (in the prototype-based sense) parent scopes
or,if you want to do it visitor-style, you pass the scope
masak Ven: let's please do the Perl 6 thing and ban "parent" outright for scopes. 10:00
Ven: you mean "outer".
moritz basically lexical scoping means having more than one %env
10:00 spider-mario joined
Ven sure, sure, outer. 10:00
it means a tree of %env :D
moritz nope
masak moritz: and the envs that you have sit on the functions, and they are singly-linked back up to the root.
moritz masak: aye 10:01
but I don't think it ever needs to be a tree
masak it does mean a tree of %env. kind of.
Ven ...that's a tree for me...
masak because of block re-entry.
Ven The tree doesn't have to be filled at AST-time
masak what I said ("singly-linked back up to the root") induces a tree.
moritz if you support continuations, yes
masak nonono
if you support first-class closures! 10:02
moritz oh right
masak :)
moritz never mind, it's a tree :-)
masak haha
Ven masak: do you want phased macros or ..."in-place" macros?
hehe :P
masak Ven: please run me through their various merits.
I'll probably go for the simplest one first.
re-implementing pg's evaluator was delightfully simple. I'd like to keep it delightfully simple. 10:03
Ven masak: well, I'm a bit biased, as I don't really like phased macros. They probably allow for cleaner implementations, though. A phased macros means that a macro-in-a-macro is "level 2", and so you need to declare functions in a "nested level"
masak by the way, I plan to blog about this as soon as I have something with the eval function actually making macros easier/feasible.
Ven scheme and racket use (begin-for-syntax) and (begin-for-meta) (iirc) for that. Or, (require (for-syntax racket/base))/(require (for-meta 2 racket/base))
Though admittedly, racket and scheme also have a -1 level that corresponds to their templates 10:04
masak hm. ok.
Ven with the "in-place" (aka CL's, and the ones before), you just register the macro/function/variable as soon as you encounter it
masak Ven: stop me when I get it wrong: you register a macro, that is you put the macro in a lexical binding somewhere. 10:05
Ven: then, during parsing, before evaluation of a program, macros are matched and expanded in some order that makes sense. 10:06
Ven masak: no - here's the difference.
masak likes learning new stuff
Ven CL macros are part of the evaluation of the progrma... kind of
masak then they must at least be an early part.
Ven ...yes and know. But being "too early" would prevent, for example, reader macros 10:07
because you need to parse and execute code *before reading the rest of the file*
masak not sure I get that, but go on.
like, (list a b c) could probably be expanded into (cons a (cons b (cons c '()))) through some appropriately-defined macro.
10:08 TuxCM joined
Ven well, it's very simple. If the program was just reading->parsing->evaluating, I couldn't define a reader macro and use it just after, because it'd be a parse error 10:08
masak I see. 10:09
Ven (with that kind of parsing, by the time the macro would be defined, the read was already made and said invalid)
s/made/done/
masak I think I need to read up on reader macros. :)
arnsholt They're essentially lex-stage macros, IIRC
Ven .also... it's not really early. Fire up a SBCL and try this:
arnsholt (The reader being the lexer) 10:10
Ven (let ((a 5)) (defmacro bar () a)) (bar)
arnsholt: it's a bit more complicated than that are there are multiple readtables and al, but yes
^ and yes, the (bar) call *does* print 5 ;-)
Now, the really interesting one is, what do you think this prints? : 10:11
(let ((a 5)) (defmacro bar () (print a) a)) (bar)
masak: you don't "need" reader macros, though. clojure is doing fine without them! 10:13
masak back later &
Ven :P
I have no clue what I'm doing, btw. 10:14
10:20 yeahnoob joined 10:22 chenryn_ joined, chenryn left 10:23 Akagi201 left 10:24 chenryn_ left 10:25 chenryn_ joined, chenryn_ left, pmurias left, chenryn_ joined 10:26 exixt left, jack_rabbit left 10:31 exixt joined
moritz understanding is overrated 10:33
Ven :-) 10:34
I'm sure I'm not the only one that helps friends just by reading wikipedia pages and googling! 10:37
timotimo o/
yoleaux 02:12Z <japhb> timotimo: Why does p6doc-index write it's own usage info manually, rather than just using #| doc comments for the MAIN multis and letting the magic do its job?
timotimo .tell japhb i didn't write p6doc-index, i just wanted to add a little feature and didn't want to rewrite the code like that :)
yoleaux timotimo: I'll pass your message to japhb.
10:37 virtualsue joined, kurahaupo joined
Ven japhb: ooh, MAIN uses #| doc comments for each task? that's so amazing 10:38
timotimo it does?
brrt \o timotimo 10:39
timotimo reddit is severely rate-limiting my posting :S 10:40
i do think i have something worth adding to the conversation 10:44
but there'll inevitably be some hate, no matter what exactly i'd write ... because this is the internet
Ven timotimo: oh, don't say that... It's not the internet... 10:46
10:46 FROGGS left
Ven I hated you as much IRL. <3 10:46
timotimo <3
peteretep: i kind of find it weird to say "doesn't have non-blocking IO across all its backends" when we have that on JVM and MoarVM, just not on parrot (and never will) 10:51
tadzik just skip that part :D
arnsholt Or non-blocking IO on all backends except Parrot 10:52
timotimo on the reddit thread, someone seemed to think perl6 "still has no support for threads"
brrt it's somewhat easy to think that. we haven't exactly advertised it much 10:53
timotimo yeah, jnthns voice tends to be kind of low in these awesome presentations he's giving a few times per year displaying all the crazy-cool shit we (well, "he") have been making 10:55
brrt afk 10:59
11:01 yeahnoob left 11:04 sqirrel_ joined 11:13 pecastro joined, gfldex joined
masak "understanding is overrated" is a good slogan for some of the tests I write. 11:17
and I mean that in the best of ways.
it's like I'm outsourching to the unit tests some of the need to understand every detail.
timotimo if you don't understand something, you'll end up asking much tougher questions 11:18
which is what tests need in order to be really effective, right?
masak tests need to ask "what does the use look from the outside?" 11:19
if the implementation makes the tests happy, then *either* you've arrived, *or* you have more tests left to write.
I'm talking about the freedom that comes with relying on that fact.
timotimo OIC 11:20
masak I have this demo I do in some of my courses, as a way to sneak TDD into other topics. 11:21
I implement roman numerals. from integer 14 to string "XIV", etc.
one nice thing about that task is that I can ruthlessly focus on the task at hand, just adding more exceptions in the form of if statements. thinking only about making the tests happy. 11:22
and then with a little bit of refactoring afterwards, I still end up in a nice place. nicer, in fact, than one ends up with without tests (on average).
in fact, the task is very amenable to refactoring, because of the "symmetry" between ones, tens, and hundreds.
11:38 sqirrel_ left 11:46 chenryn_ left 11:49 salv0 left, salv0 joined 11:51 azawawi joined
azawawi hi 11:51
yoleaux 00:28Z <timotimo> azawawi: i just sent out a pull request for HTTP::Easy that improves the time it takes to split a HTTP request into header and body by a factor of 300x, making the very first load of farabi6 much, much faster :)
00:38Z <timotimo> azawawi: my $index-file = '/home/azawawi/rakudo/install/languages/perl6/site/bin/index.data';
azawawi timotimo++
timotimo: all the changes to farabi6 and http-easy are now merged 11:52
11:57 mauke_ joined
masak I still feel I don't have a good answer to the question "where do macros fire in the Lisp read-eval cycle?" 11:58
I guess it depends on the type of macro and so on. that's fine.
so I'll have to start by getting an OK overview.
11:59 notfix is now known as xfix, mauke left
azawawi .tell timotimo In HTTP::Easy, $first-chunk can become Any after the recv loop on rare occasions while using the firefox browser 12:00
yoleaux azawawi: I'll pass your message to timotimo.
12:01 mauke_ is now known as mauke 12:02 leont joined
azawawi feather.perl6.nl:8080/ # is way faster than before. timotimo++ 12:03
12:05 ggoebel111111117 left, smls joined
smls regarding perl6.guide, surely there are some more "recent" developments than JVM that could be listed? 12:06
MoarVM; implementation of the concurrency stuf; first few microbenchmarks beating Perl 5; etc 12:07
12:08 amkrankruleuen left 12:10 xinming_ joined
masak "Contrary to popular belief, LISP was not originally derived from Church's λ-calculus." -- say what now? 12:10
(from dspace.mit.edu/bitstream/handle/172...IM-453.pdf )
brrt that surprises me as well
12:10 ibo2perl6 joined 12:13 xinming left, kill joined, kill is now known as amkrankruleuen 12:14 amkrankruleuen left, amkrankruleuen joined
Ven masak: back! 12:16
ibo2perl6 azawawi: when I run farabi6 I get something like: farabi.js is not found in ~/languages/perl6/site/lib/Farabi6/files/assets
12:18 ggoebel111111117 joined
Ven masak: well, it's... "as-it-goes" 12:18
you evaluate code as you see it
12:19 ab5tract joined
Ven when you read the code, you always check your readtable to see if it matched something. Once you've expanded all reader macros, you have your lisp tree 12:19
you then start looking for macros to expand from the inside, then once everything is expanded, you evaluate it
12:21 denis_boyun joined, denis_boyun_ left
Ven Or something like that. I don't know, I can't common lisp :P 12:21
dalek rlito: 5961094 | (Flavio S. Glock)++ | / (2 files):
Perlito5 - parser - protect compiler lexical variables during BEGIN execution
12:22
Ven masak: macros carry around their lexical scope, as my pastes earlier showed
dalek rlito: a7bbc70 | (Flavio S. Glock)++ | TODO-perlito5:
Perlito5 - js - TODO update
12:25
azawawi ibo2perl6: the farabi6 server process has died because of a bug... are you using firefox? 12:26
ibo2perl6 azawawi: ok I set a symbolic link perl6/rakudo/install/languages -> languages
azawawi ibo2perl6: i see, you're running it locally, right? 12:27
ibo2perl6 azawawi: yes I am using ff and I am running it locally but now get "No such method 'subbuf' for invocant of type 'Any'" in method run at lib/HTTP/Easy.pm6:88 12:28
azawawi ibo2perl6: try chromimum for now 12:29
ibo2perl6: it is a parsing bug in http-easy
12:29 kaleem left
ibo2perl6 azawawi: yes in chromium it works azawawi++ 12:30
azawawi ibo2perl6: have fun :) 12:31
12:38 denis_boyun left 12:39 denis_boyun joined 12:40 amkrankr1leuen left
masak Ven: what's the outer scope of the scope that the macro carries? the outer where it was defined? 12:41
Ven masak: yes. 12:42
(let ((a 5)) (defmacro bar () (print a) (print "foo") "bar"))
then (bar) gives 5 "foo" "bar"
12:45 khisanth_ is now known as Khisanth
masak after the macro has been applied by whatever process, does it turn into a JS-style IIFE? otherwise, what's the mechanism that gives the macro-as-applied-in-code its own scope with its own outer? 12:46
Ven masak: erm, it's a bit.. different. 12:49
say, `(let () (defmacro x () 5) (x))` will blow up. The macro is not "defined" before the end of the top-level expr 12:50
12:51 ibo2perl6 left, ibo2perl6 joined
timotimo azawawi: i'll look into that Any bug 12:51
yoleaux 12:00Z <azawawi> timotimo: In HTTP::Easy, $first-chunk can become Any after the recv loop on rare occasions while using the firefox browser
Ven masak: that's the hard part, btw. 12:52
masak: but no, it doesn't need to carry anything out. CL isn't perl6 -- the subs/macros aren't lexical
12:52 ibo2perl6 left 12:53 guru joined, guru is now known as Guest59613, Guest59613 is now known as ajr_
timotimo i have a feeling that bug will be interesting to find. 12:54
Ven masak: as a "reminder", you need to pay attention to the fact that the lexical scope is used at *macro time*, not when returning stuff. That's very important
timotimo the only way i can think of that'd cause that behavior is if the first .recv gives us nothing at all
Ven (which *might* be related to my previous comments about `my $a = 1; quasi { ...} ` in perl6...)
12:55 jimisdam joined
jimisdam Hey ! 12:55
Ven \o
12:55 sqirrel_ joined 12:56 anaeem1 left, woolfy left, mephinet left 12:57 rmgk left, smls left, cosimo_ left, cosimo joined
timotimo hi there 12:57
Ven masak: macros really are functions that return syntax – nothing more. This works in perl6, as well: 12:58
12:58 rmgk joined
Ven m: my &foo; { my $a = 1; { &a = sub { $a++ } } }; say foo, foo; 12:58
camelia rakudo-moar 315ec6: OUTPUT«===SORRY!=== Error while compiling /tmp/3fDf8bj39H␤Undeclared routine:␤ &a used at line 1␤␤»
Ven m: my &foo; { my $a = 1; { &foo = sub { $a++ } } }; say foo, foo;
camelia rakudo-moar 315ec6: OUTPUT«12␤»
Ven masak: ^ the exact same happens in CL. 12:59
12:59 woolfy joined, jimisdam left
azawawi timotimo: it happens with firefox browsers and rarely with chrome 12:59
timotimo i've added a bit of debug print to see if my intuition is right
i'll use firefox to reproduce. thanks!
azawawi timotimo: i can replicate it on feather.perl6.nl btw 13:00
timotimo: i'll enable :debug
masak Ven: I notice that I am very, very confused. 13:04
Ven: not because of you. I'm sure your explanations are great.
Ven masak: I am so sorry. I'm terrible at explaining
masak Ven: I'm just not seeing the things I need yet for a solid mental model of the thing.
Ven okay. Just as you did for perl6, forget that a macro is more than a function. It's just a function that happens to return syntax. 13:05
What's preventing it from having a lexical scope? The access to the lexical scope is done *before* the macro is expanded. Just when it's preparing the code to return. In its body
masak this defmacro thing -- it's a primitive, yes? like lambda?
[Coke] bartolin++ # thanks for taking the lead on ticket wrangling! 13:06
Ven We're not using the macro's lexical scope in the quasiquoting part. We're using it in the body – like a function would.
masak: yes
masak ok, so the eval function handles it.
azawawi timotimo: added --verbose option to enable debug info in farabi6
Ven definitely
masak: will you be at FOSDEM2015?
masak no :/
I will start missing a bunch of conferences from now on for a while.
timotimo thanks :) 13:07
Ven won't be there either :P
13:08 dwarring left
[Coke] winner called at: src/gen/m-CORE.setting, line 20305 13:08
^^ today's roast run.
azawawi timotimo: paste.debian.net/129394/ # farabi6 crash log 13:09
Ven masak: when you encounter a defmacro, you just store the macro somewhere. In almost the same place as functions. But with a special flag instead
and then, when the reader returns a read tree, you recursively expands the macros you can find, from the inside out
masak ah! 13:10
this *does* resonate with me.
arnsholt IIRC CL stores macros as special functions in the same place as functions
timotimo [2014-10-30T13:10:36Z] Client connection received.
use of uninitialized value of type Any in numeric context in method run at lib/HTTP/Easy.pm6:89 13:11
masak ok, let's momentarily forget about the definition of macros. let's just say we have a bunch of macros defined somewhere.
Ven arnsholt: it probably does, that's why I said that :-)
timotimo got this in my debug; even though i added a say statement at the very beginning of the loop that'd tell how many bytes have been found
i'll have a look in wireshark to see what's up there
masak (I think that's where I'm going to start in Ipso anyway, since I haven't really worked out the story for defining things in general, and that'll change around anyway once we get lexical scoping.)
Ven :-)
I'll be around if you somehow need me...
arnsholt IIRC defmacro() compiles down to something like (setf (symbol-function $the-name) $macro-code) 13:12
masak so, the reader is about to return a big S-expression. before it does so, it does all the macro replacements, inside-out. correct?
azawawi what's better $filename.IO.slurp or $filename.path.slurp ?
masak arnsholt: ooh, setq and setf -- there's two of them because CL is a Lisp-2, right?
moritz azawawi: I'd go with .path, because it's more transparent to me what that does 13:13
azawawi: though maybe lizmat++ will correct me soon :-)
Ven masak: actually, no
arnsholt No, setf is a more general setter
masak oh.
Ven setq is just setf underneath
arnsholt Other way, no?
masak I think what I have so far is actually more of a Lisp-1. because I can put lambdas in the first position.
Ven setf is "set form", setq is "set quoted" (kinda)
arnsholt: is it?
masak oh. is one of them a macro? :)
arnsholt setf is a very magical macro
Ven ...very very magical.
to allow stuff like (setf (car a) 1) to work 13:14
arnsholt Yeah
masak o.O
Ven you can define your own ... "setf handlers" so that (setf (masak foo) 1) works
masak that's... kinda Perlish, actually.
masak backs away very slowly from setf
Ven please do...
arnsholt Perl is pretty much CL in Algol clothing
masak MJD would approve.
arnsholt Minus macros (for the time being ;)
Ven
.oO( PUT THE SETF DOWN! YOU CAN STILL GET AWAY WITH IT )
13:15
masak arnsholt: we'll see about that. bwhahaha
arnsholt Have you looked at loop() yet? =)
Ven setf is "set field", sorry.
arnsholt: he's a functional programmers. He doesn't wan' no stinkin' loops
masak arnsholt: was going to ask you to take your loop() and do something rude with it. stopped myself just in time. :P
arnsholt =D 13:16
Ven `loop` is one of the biggest hacks in CL I think
arnsholt I like loop when I program in CL. In part because is so very much *not* Lispy =)
timotimo azawawi: i'm kinda confused.
Ven arnsholt++: you are kind-of-right. setf falls back to setq if no handlers have been defined
(setf a 5) will indeed call setq (which itself will call set: `(setq a 5)` is `(set 'a 5)`) 13:17
however, "special" setf do whatever they want (setf car uses rplaca, for example)
arnsholt: do you even `collect` 13:18
(or :collect, you decide)
arnsholt Frequently (loop for stuff do (loop for other-stuff do (loop for more-stuff do things))) 13:19
For typical maps mapcar is fine =)
masak I think I will implement (set 'a 5) and nothing more.
maybe setq as a macro, we'll see.
arnsholt Sounds very reasonable =)
masak likes to think he is very reasonable :)
Ven arnsholt: I plead guilty. github.com/vendethiel/readlist.cl/...ls.lisp#L3 <- this one is "fine"
github.com/vendethiel/readlist.cl/...s.lisp#L53 <- this one isn't fine. I'm a bad person :( 13:20
It's kinda amazing that loop's `for` allows you to DESTRUCTURNG-BIND implicitly
arnsholt Yeah
Ven 's only CL experience is the code linked just here :P
arnsholt That loop isn't quite a straightforward map though
timotimo azawawi: it looks like firefox is just opening a connection and immediately closing it again 13:21
er, not "immediately"
about 6 seconds after opening it successfully
azawawi timotimo: i think for http pipelining
timotimo which matches with what i see on the console. i load up farabi6, it comes up fine, a few seconds later it crashes in the console
ah. may be. 13:22
Ven (5 . = . 5) #t HEHE RACKET!
timotimo http-easy is *not* equipped to deal with this :)
azawawi timotimo: maybe it is asking in the headers and http-easy should answer back
13:22 kaleem joined
timotimo probably 13:22
ah, yes. the browser asks for Connection: keep-alive
but http-easy doesn't answer, it just terminates the socket later 13:23
so i suppose firefox just expects it'd be fine to open a new socket even if there's no request yet
azawawi timotimo: http-easy should be refactored to use github.com/sergot/http-useragent/
13:23 NotJack left
azawawi timotimo: for the parsing part 13:23
timotimo probably, yeah 13:25
it's pretty annoying that github doesn't syntax highlight .pm6 files at all 13:26
[Coke] didn't hoelzro++ get that working?
timotimo [Coke]: for .pl and .pm files, but apparently not for .pm6
azawawi timotimo: that's why i built farabi6 :)
timotimo azawawi: anyway, we're not equipped to deal with nonblocking sockets on parrot ...
azawawi timotimo: and not equipped to work with EventSource 13:27
timotimo EventSource is fine 13:29
there we just send whenever we're interested in sending, we don't have to rely on hope or selecting or something for these sockets
it'd be good to have an EventSource connection open for every user to reliably display a "farabi backend has crashed" message when the socket gets closed by the server 13:30
and to push notifications like "building help index, please wait"
hum. using "Connection: " doesn't seem to prevent the pipelining thing firefox does 13:31
Ven ( masak: feel free to ping me, but I'm not reading actively the channel. just so you know ) 13:32
masak got it. 13:33
masak is a little bit curious about M-expressions
Ven from the mccarthy paper? 13:34
meh. they're pretty bad.
timotimo ah, Connection: close is how you signal "no keep-alive" 13:35
masak "S-expressions were originally intended only for data to be manipulated by M-expressions, but the first implementation of Lisp was an interpreter of S-expression encodings of M-expressions, and Lisp programmers soon became accustomed to using S-expressions for both code and data." -- from Wikipedia 13:36
I'm curious about (something like) was this an accident of history, or could M-expressions have worked? how well can you "hide" the S-expressions?
13:37 mephinet joined
timotimo azawawi: i send "connection: close", but firefox still opens a dummy connection for future use ... 13:37
Ven masak: really well. There a number of indented lisps, there are at-expressions (@Foo{bar} => (foo bar)) and some others 13:39
s/really/fairly/ # let's be honest here
timotimo azawawi: if we had something like "select" on all backends, i could just throw the socket back into the "accepted sockets" queue, so to speak .. 13:40
if nothing has been received
masak Ven: what I'm fishing for is something like "homoiconicity is so great that those who don't do everything with S-expressions are missing out" 13:41
[Coke] stares at masak. 13:43
azawawi timotimo: agreed
Ven masak: you can *hide* homoiconicity 13:44
timotimo azawawi: i'd like to move on to "only care about MoarVM and JVM" ASAP, but that has some consequences for including farabi6 in rakudo star ...
azawawi timotimo: we can always install Farabi6 via panda 13:45
masak [Coke]: what seems like utter crazy outside of an echo chamber is taken as evident truth inside sometimes. which makes it hard to decide exactly how true/crazy it is.
azawawi timotimo: so having it in rakudo star is not a big issue after i have given it some thought.
13:45 tinyblak joined 13:46 tinyblak left
timotimo hmm. 13:46
masak [Coke]: I mean, you can't say that S-expressions aren't extremely popular in the Lisp communities themselves. including but not limited to Arc, Clojure, and Racket.
13:46 tinyblak joined 13:47 cognominal left
masak [Coke]: in that light, it's interesting to ask what the reasons were that S-expressions took off but M-expressions didn't. 13:47
azawawi timotimo: im going to work on pruning unused codemirror js tomorrow so that "fetching" stage in `panda install Farabi6` is faster 13:48
arnsholt I suspect that homoiconicity is neat, but not the insane killer feature it is sometimes made out to be
timotimo oh, cool :)
13:48 mauke_ joined
azawawi timotimo: and upgrade to codemirror 4.7. they have a new api for defining new syntax highlighting modes btw... but it is experimental at the moment... codemirror.net/demo/simplemode.html 13:49
masak arnsholt: well, after spending some time in it yesterday, I can say that it's horribly confusing sometimes! everything's a bloody list, no matter if it should be one, or something more useful.
arnsholt Yeah
And Lisp isn't the only homoiconic language 13:50
masak arnsholt: I always loved how NQP essentially turns compilation into something that we can view in an OO light. that's awesome in my view.
arnsholt Indeed
azawawi wonders if Perl 6 grammars can be mapped to dynamically-generated regex as in codemirror.net/demo/simplemode.html to make simple syntax highlighting
masak arnsholt: what if we could do the same thing with compile-time program analysis/manipulation?
arnsholt Might be interesting
timotimo azawawi: neat. hoelzro would be interested in that, i'd believe; he doesn't have terribly much time these days, though
arnsholt There is this concept of tree transducers, but IIRC they have some pretty hairy complexities for exact solutions and matching 13:51
13:51 mauke left
arnsholt But that's one of my favourite jnthn quotes: "Optimisation is solving undecidable problems is linear (or sub-linear) time" 13:51
Or something like that. Quoting from memory 13:52
13:53 tinyblak_ joined
timotimo azawawi: do you know where the timeout comes from in that recv call inside HTTP::Easy? 13:54
13:55 mauke_ is now known as mauke 13:56 tinyblak_ left, tinyblak_ joined, tinyblak left
azawawi timotimo: no idea 13:57
dalek kudo/nom: ed8a987 | (Timo Paulssen)++ | src/core/IO/Socket/INET.pm:
eqat is way cooler than substr + eq.
13:58 kaare_ left 13:59 mauke_ joined 14:00 decafmainline left
masak Ven: ok -- when I think about it, I don't think my first thrust of introducing Ipso macros needs to relate to scopes at all. 14:01
14:01 mauke left
masak Ven: it can just do subtree substitution, basically. 14:01
14:01 tinyblak joined
timotimo azawawi: using the fullscreen mode makes the menu occlude the leftmost part of the editor widget 14:02
masak so `(list x y z)` turns into `(cons (x (list y z)))` in one step, and `(cons (x (cons (y (cons (z '()))))))` after two more steps. 14:03
14:03 anaeem1 joined, tinyblak_ left
masak that part requires no scoping, just re-ordering of terms. 14:03
azawawi timotimo: file an issue please so i can remember to fix it :)
timotimo will do 14:04
with a simple "if we didn't get any data, we close the socket" fix, HTTP::Easy no longer crashes when encountering a wild firefox
Ven masak: sure, you needn't any kind of scopes anyways :) I was just talking about it because you said it was missing as well
masak *nod* 14:05
I feel I have to start in an end I understand.
and then perhaps arrive at a situation where scopes would be clearly required, and evolve it from there.
14:06 thou joined, mauke_ is now known as mauke
azawawi hmmm this IO::Handle.spurt deprecation is a bit confusing in 2014.10 . If i have the file handle, why would i need to use the $file-name.path.spurt instead... isnt it more work than simply $file-handle.spurt ? 14:06
Ven masak: you're like an early lisp - dynamic scopes! 14:08
timotimo azawawi: if you've opened a handle already, why would you spurt rather than just write?
to me, spurt is "open, write, close"
azawawi: also, you have a http-easy pull request :) 14:09
azawawi timotimo: because spurt is cooler :)
masak Ven: yep. but aiming to fix that.
timotimo heh.
Ven masak: btw, I'm "seriously" suggesting you make that into a slang :-)
masak Ven: in the case of macros, it's more like "no scoping", though. my first attempt will be transparent to scoping.
Ven that'd be amazing
masak Ven: I want to get into slangs. I believe macros and slangs will be, like, best buddies. 14:10
Ven I think macros will just before slangs like functions do
masak that sentence no verb
14:10 rurban joined 14:11 sqirrel_ left
Ven I think macros will just sit before slangs like functions do. 14:11
timotimo thank you :)
azawawi timotimo++ :) 14:13
feather.perl6.nl:8080/ # works perfectly
Ven class Scope{has %.vars; has Scope $.outer; method get(Str $key) { %.vars{$key}:exists ?? %.vars{$key} !! $.outer.?get($key); }; method set(Str $key, $value) { %.vars{$key} = $value; }}; my $s = Scope.new(); $s.set("foo", 1); say $s.get("foo"); my $s2 = Scope.new(outer => $s); say $s2.get("foo"); $s2.set("foo", 2); say $s2.get("foo"); 14:14
^ look masak, scopes \o/ 14:15
m: class Scope{has %.vars; has Scope $.outer; method get(Str $key) { %.vars{$key}:exists ?? %.vars{$key} !! $.outer.?get($key); }; method set(Str $key, $value) { %.vars{$key} = $value; }}; my $s = Scope.new(); $s.set("foo", 1); say $s.get("foo"); my $s2 = Scope.new(outer => $s); say $s2.get("foo"); $s2.set("foo", 2); say $s2.get("foo");
camelia rakudo-moar 315ec6: OUTPUT«1␤1␤2␤»
brrt is that timotimo's work?
timotimo brrt: only tiny parts of it are
Ven m: class Scope{has %.vars; has Scope $.outer; method get(Str $key) { %.vars{$key}:exists ?? %.vars{$key} !! $.outer.?get($key); }; method set(Str $key, $value) { %.vars{$key} = $value; }}; my $s = Scope.new(); $s.set("foo", 1); say $s.get("foo"); my $s2 = Scope.new(outer => $s); say $s2.get("foo"); $s2.set("foo", 2); say $s2.get("foo"); say $s.get("foo");
camelia rakudo-moar 315ec6: OUTPUT«1␤1␤2␤1␤»
Ven :D
Perl6 makes it especially neat
brrt oh it's azawawi
timotimo yup
brrt azawawi++
Ven azawawi++ 14:16
14:16 ajr_ left
masak Ven: nice. 14:16
brrt is watching TimToady++'s APW keynote
Ven saw the electric poles live!
well, photo-live...
timotimo :))
they were amazing
brrt dunno if jnthn is here, but any idea what would be needed to add to the profiler /which op/ causes stuff not to JIT 14:17
hoelzro [Coke]: there's an open PR addressing that
14:17 guru joined 14:18 guru is now known as Guest41234, Guest41234 is now known as ajr_
timotimo brrt: to be honest, i'd find it much more interesting to see what causes a frame not to get speshd 14:18
hoelzro azawawi: that *is* a good idea 14:19
timotimo oh, it's hoelzro! :D
hoelzro o/ timotimo
brrt most likely a non-interned callsite
timotimo
timotimo mhm mhm 14:20
hmm. sometimes we have colored === around the SORRY! and sometimes it's not colored at all :\ 14:21
azawawi timotimo: fixed on feather.perl6.nl:8080/ . Please try it 14:22
timotimo fixed what exactly?
masak oh, I see what M-expressions are now, in www.softwarepreservation.org/projec...Manual.pdf -- yeah, that's not much of an improvement. :) 14:23
14:24 tinyblak left, tinyblak joined
timotimo azawawi: huh, it seems like i can't mousewheel-scroll in the output pane 14:25
i can *horizontally* scroll, though
there's only a horizontal scroll bar on chrome, though. not on firefox (even if it'd scroll horizontally)
er ... i can't scroll in the regular editor either? 14:27
i can only scroll in full screen mode, it seems
hoelzro timotimo: I have some time, but my wife really wants to beat Spelunky, and I'm mired down in two other projects at the moment =/
Ven masak: I should read those someday 14:28
timotimo ooh spelunky
that game is so harsh
hoelzro hence why it's taking us so long =)
it's fun, though
azawawi timotimo: i'll revise the full screen mode
ab5tract hoelzro: what are you hacking on?
timotimo last time i tried it in co-op, i ended up being more of a "friendly fire" kind of player
14:29 tinyblak_ joined
hoelzro ab5tract: working on a feature for ack2 that I can't seem to get out the door 14:29
and an offline GH issues browser in Ruby
timotimo: yeah, it's really hard together
you need a lot of practice and discipline
tadzik hmm, never played it
hoelzro but we've just discovered it's a *lot* easier if she plays on the TV and I play on my Vita =)
14:29 isBEKaml joined
hoelzro because we can explore the level separately 14:29
azawawi timotimo: what about github.com/azawawi/farabi6/issues/49 ? 14:30
timotimo: are u having the same issue?
14:32 tinyblak left
Ven github.com/azawawi/farabi6/blob/ma...or.pm6#L46 we should be able to get output as json, maybe? 14:32
text matching sucks :)
masak: btw, I disagree with arnsholt that s-expressions are overrated. I hate strings with a passion.
i.e. you want to store logs? Instead of "X encountered an error on thread Y with bar" just format it like data. it could be json or xml, no problem. But s-expression make it unified 14:33
moritz and s-expressions can't contain strings?
14:33 ajr_ left
Ven moritz: sure they can. 14:33
dalek rlito: 1071c28 | (Flavio S. Glock)++ | / (3 files):
Perlito5 - js - fix scope in while()
Ven moritz: I don't understand your comment
14:34 davido_ left
masak Ven: I think your comment sounded a little bit like a strawman argument. 14:34
moritz Ven: if you hate strings with a passion, and s-expressions contain strings, you hate s-expressions with a passion. No?
Ven moritz: uh. no. The world contains cancer. I'm sure you hate cancer. Do you have the world? That's a syllogism
moritz Ven: I hate the world a bit for containing cancer 14:35
Ven masak: mmh, maybe. It's more about having one unified syntax. If lisp used a json-like syntax, it'd be the same in the end
14:37 ajr joined, ajr is now known as Guest12913
masak aka "homoiconicity". 14:38
Ven ;-)
masak that's why I'm a little bit curious what will happen (with macros and such) if one wraps the whole Lisp in an ALGOL-like syntax.
timotimo azawawi: when i try to run the "farabi.pl" i have in my path it'll say "switching to panda installed farabi" and then fail to find farabi.js or something
14:38 Guest12913 left, pmurias joined
Ven masak: elixir is almost-homoiconic. dylan as well 14:39
14:39 tinyblak joined
masak they are both on my "to investigate" list. 14:40
14:40 ajr_ joined
isBEKaml Ven: Dylan? That's an ALGOL like language with Lisp forms too, right? 14:42
ab5tract m: (1,1,2,2,3,3).pairs.say
camelia rakudo-moar 315ec6: OUTPUT«0 => 1 1 => 1 2 => 2 3 => 2 4 => 3 5 => 3␤»
14:42 ajr_ left
ab5tract it seems like there should be a way to make pairs out of a list? 14:42
Ven isBEKaml: -ish, yes :)
14:42 tinyblak_ left
isBEKaml Ven: I heard about it recently [OpenDylan] 14:43
Ven apple killed dylan :(
14:43 ajr_ joined
rurban Dylan is a Lisp with Algol Syntax. Elixir erlang with macros and Python syntax 14:43
timotimo m: %((1, 1, 2, 2, 3, 3).rotor(2, 0)).perl.say # ab5tract 14:44
14:44 ajr_ left
isBEKaml Ven: that's what I heard. I'm not old enough to remember Dylan. :) 14:44
camelia rakudo-moar 315ec6: OUTPUT«Odd number of elements found where hash initializer expected␤ in method STORE at src/gen/m-CORE.setting:10116␤ in method hash at src/gen/m-CORE.setting:1637␤ in block <unit> at /tmp/gkNCGFAURk:1␤␤»
timotimo er
m: %((1, 1, 2, 2, 3, 3)).perl.say # ab5tract
camelia rakudo-moar 315ec6: OUTPUT«("2" => 2, "1" => 1, "3" => 3).hash␤»
timotimo even easier
Ven isBEKaml: I'm probably younger than you, so, me neither!
ab5tract rotor?? :(
Ven rurban: my point was – elixir is homoiconic (-ish)
ab5tract timotimo: i wanted a list of pairs though 14:45
muraiki yeah, it breaks down into pretty much a lisp
rurban Yes, elixir is very nice
muraiki sum(1,2,3) becomes {:sum, [], [1, 2, 3]}
timotimo m: %((1, 1, 2, 2, 3, 3)).list.perl.say # ab5tract
camelia rakudo-moar 315ec6: OUTPUT«("1" => 1, "2" => 2, "3" => 3).list␤»
ab5tract i don't see why .pairs should just re-implement .kv 14:46
14:46 ajr_ joined
timotimo .pairs gives you pairs, .kv gives you tuples 14:46
moritz .kv is very handy for iteration
14:46 ajr_ left
moritz m: for <a b c>.kv: -> $i, $v { say "$i: $v" } 14:47
camelia rakudo-moar 315ec6: OUTPUT«===SORRY!===␤Expression needs parens to avoid gobbling block␤at /tmp/mbD8YI288O:1␤------> r <a b c>.kv: -> $i, $v { say "$i: $v" }⏏<EOL>␤Missing block (apparently taken by expression)␤at /tmp/mbD8YI288O:1␤…»
ab5tract indeed it is moritz. no more counters
moritz m: for <a b c>.kv -> $i, $v { say "$i: $v" }
camelia rakudo-moar 315ec6: OUTPUT«0: a␤1: b␤2: c␤»
azawawi home &
moritz and .pairs on hashes for example is very handy for sorting
when you want to juggle around stuff without key and value getting separated 14:48
ab5tract i understand that this has been well thought out
but to me the syntax for that would %h.kv.each.pair 14:49
but i haven't thought about it much
moritz that's how you'd say it in human language 14:50
14:50 azawawi left
moritz but for programming, that doesn't work well 14:50
because at the time you've done kv.each, you've lost information on how to make pairs of it again
masak skimmed danielkeep.github.io/quick-intro-to-macros.html with interest
the lexical model is very reminiscent of what we have so far (and will probably stick with) in Perl 6. 14:51
Ven masak: you might be interested in www.greghendershott.com/fear-of-macros/all.html
isBEKaml masak: <pedant>how do you skim something *with* interest?</pedant> :P
moritz masak: read the first paragraph. Already loving it :-)
masak isBEKaml: I fail to see the contradiction.
isBEKaml: I can skim something in an interested way. 14:52
isBEKaml masak: well, if you're *interested*, you'd read it all the way through - not skim/skip stuff. :)
masak isBEKaml: I'm interested but I also have to manage my time.
isBEKaml: I don't see why interest as such would require careful reading. 14:53
Ven: all Racket pages I've seen so far have been beautifully syntax-highlighted.
isBEKaml masak: I'm not falling into this trap :P
masak what trap? the trap of arguing with pedants? :P 14:54
isBEKaml :-) 14:55
dalek rlito: 4ef0140 | (Flavio S. Glock)++ | / (2 files):
Perlito5 - js - emitter: while(), if() formatting
14:57
ab5tract i guess i would just prefer that @a.pairs DWIM against the contents of the array, ignoring the index 14:58
Ven masak: racket is good /o/
masak m: my @a = <a b c>; say @a.pairs.perl 14:59
camelia rakudo-moar 315ec6: OUTPUT«(0 => "a", 1 => "b", 2 => "c").list␤»
timotimo ab5tract: that seems like a very bad idea
masak ab5tract: the above is exactly what I expect from @a.pairs
ab5tract: if you expect something else, consider whether you're expectations are wonky :>
ab5tract haha 15:00
masak your*
ab5tract i've grown used to that fact :)
moritz ab5tract: what would you have exptected?
colomon m: my @a = <a b c>; say @a.map(-> $a, $b { $a => $b }).perl 15:01
camelia rakudo-moar 315ec6: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤ in block <unit> at /tmp/BuX6PEY4EV:1␤␤»
ab5tract in that case, i would expect an exception about uneven numbers of elements in list
colomon ab5tract: there you go
not the best exception, admittedly
m: my @a = <a b c>; say @a.map(-> $a, $b? { $a => $b }).perl
camelia rakudo-moar 315ec6: OUTPUT«("a" => "b", "c" => Mu).list␤»
ab5tract <a b c d>.pairs # ((a => b).Pair, (c => d).Pair).list 15:02
15:02 treehug88 joined
ab5tract btw, this is just an exercise in understanding the _right_ way to do it 15:02
not to say that my expectation is/was reasonable or correct in any way 15:03
masak m: my @a = <a b c d>; say @a.zipwith(&[=>]).perl
camelia rakudo-moar 315ec6: OUTPUT«No such method 'zipwith' for invocant of type 'Array'␤ in block <unit> at /tmp/qdeiS1T7ec:1␤␤»
masak hrm.
ab5tract m: <a b c d>.map( -> $a,$b { ($a,$b).pair.say })
camelia rakudo-moar 315ec6: OUTPUT«Unhandled exception: Method 'pair' not found for invocant of class 'Parcel'␤ at <unknown>:1 (/home/camelia/rakudo-inst-1/languages/nqp/lib/Perl6/BOOTSTRAP.moarvm::4294967295)␤ from /tmp/peeZFlbNMY:1 (<ephemeral file>::34)␤ from src/gen/m-CORE.set…»
15:03 [particle] left
ab5tract m: <a b c d>.map( -> $a,$b { ($a => $b).pair.say }) 15:04
camelia rakudo-moar 315ec6: OUTPUT«Unhandled exception: Method 'pair' not found for invocant of class 'Pair'␤ at <unknown>:1 (/home/camelia/rakudo-inst-1/languages/nqp/lib/Perl6/BOOTSTRAP.moarvm::4294967295)␤ from /tmp/NI_MZaPIjy:1 (<ephemeral file>::34)␤ from src/gen/m-CORE.setti…»
moritz ($a => $b) already is a Pair
ab5tract m: <a b c d>.map( -> $a,$b { ($a => $b).say })
camelia rakudo-moar 315ec6: OUTPUT«"a" => "b"␤"c" => "d"␤»
moritz m: say %(<a b c d>).pairs.perl 15:05
camelia rakudo-moar 315ec6: OUTPUT«("a" => "b", "c" => "d").list␤»
ab5tract right, that's reasonable enough for me
15:07 ptc_p6 left
masak ab5tract: for me, the important detail is that when you as an array for .keys, it gives you its indices. this is just in analogy with hashes; the indices are the "keys" of the array. therefore, when you ask it for (key-value) pairs, you get indices and elements. 15:07
lizmat .tell azawawi "foo".path is deprecated, "foo".IO is not 15:08
yoleaux lizmat: I'll pass your message to azawawi.
15:08 tinyblak left
lizmat re clarity of .path: I think the term "path" is ambiguous 15:08
15:08 tinyblak joined
timotimo mhm mhm 15:08
lizmat "/usr/local/bin/perl6" is a path 15:09
but it's not an IO::Path
15:09 tinyblak_ joined
lizmat "/usr/local/bin/perl6".path doesn't seem to change anything in that 15:09
moritz "/usr/local/bin/perl6" is a path in the same sense that "42" is an integer 15:10
that is, not really
lizmat "/usr/local/bin/perl6".IO is sufficiently different from the string, and shorter and a marker for something special happening
moritz just a string representing a $thing
lizmat moritz: so 42.Int strikes you as making it an Int, rather than not changing anything ? 15:11
ab5tract masak: indeed, and i don't think breaking that would be worth anything
moritz m: say '/usr/local/bin/perl6'.path.^name 15:12
camelia rakudo-moar 315ec6: OUTPUT«IO::Path␤»
moritz lizmat: "42".Int makes an Int, just as /usr/local/bin/perl6'.path makes an (IO::)Path
isBEKaml I can't put a finger on it - but isn't saying "anything that looks like a path is also a string" dangerous?
moritz isBEKaml: who says that? 15:13
15:13 tinyblak left
isBEKaml moritz: me :-) 15:13
moritz m: say 'sadfk'.IO.^name
camelia rakudo-moar 315ec6: OUTPUT«IO::Path␤»
15:14 [particle] joined
isBEKaml moritz: cool, no issues then. 15:14
moritz the old philsophical distinction between .IO and .path was that .path was supposed to work with path strings, and .IO was supposed to work with file handles
with the background that only by working with file handles, you can avoid race conditions
lizmat m: "foo".path.path.WHAT.say 15:20
camelia rakudo-moar 315ec6: OUTPUT«(Str)␤»
lizmat another reason I don't like .path on Str
timotimo ooooh
that's very silly
lizmat m: "foo".IO.path.WHAT.say # clearer
camelia rakudo-moar 315ec6: OUTPUT«(Str)␤»
timotimo yes, that should definitely be different 15:21
moritz that's why the old IO::Path.path was a no-op 15:22
Ven afk&
15:22 Ven left
lizmat which I think is a bit hackish 15:27
but even so: .path could be considered a coercer, no?
and don't we want coercers to be titlecased? .Str .Int .Bag .Set ? 15:28
shouldn't it be at least .Path then?
moritz except we have .list and .hash and .item 15:29
lizmat well, I can see we agree to disagree 15:30
15:33 tinyblak_ left, FROGGS joined, tinyblak joined
dalek kudo/nom: 6d7b37d | (Elizabeth Mattijsen)++ | src/core/ (2 files):
Fix 2 winner stragglers, spotted by [Coke]++
15:33
15:34 kaleem left, guru joined 15:35 guru is now known as Guest69127, Guest69127 is now known as ajr_ 15:40 isBEKaml left
lizmat azawawi: re. IO::Handle.spurt: If you have a handle, why .spurt? Why not .print ? 15:44
but perhaps the deprecation is not needed 15:45
FROGGS spurt is open+print+close... so .spurt makes sense when the handle is not opened 15:46
masak not sure it doesn't make sense when a handle is already opened, though.
lizmat ah, but that's just it: it is now very hard to get an IO::Handle object that did not open its handle
.IO gives you an IO::Path
.spurt on IO::Path will open / spurt / close 15:47
should .spurt on IO::Handle close the handle afterwards or not >
?
FROGGS I dunno
lizmat or should it just be a .print (which is what it is now ) 15:48
(and a deprecation message)
well, depending on whether your spurting a Blob or not
in the case of a Blob, it would do a .write
15:49 kaare_ joined, Timbus left
lizmat same for IO::Handle.slurp: should it close the handle afterwards? should it move the file pointer to the beginning > 15:50
?
15:50 brrt left
FROGGS fells weird to have .spurt on a handle that is open in almost all cases 15:51
moritz IMHO slurp/spurt only make sense with file names 15:52
lizmat hence the deprecation suggestion of using IO::Path.spurt
FROGGS so... "foo".IO.print("bar", :autoclose) would be the replacement?
lizmat moritz: "foo".path.spurt you mean? 15:53
moritz lizmat: or that, yes
15:53 isBEKaml joined
moritz and on file handles, maybe a .readall method? 15:53
FROGGS so Str.spurt
lizmat well, I would suggest "foo".IO.spurt
15:53 davido_ joined
lizmat the .IO indicates you want to do something IO-y 15:53
moritz +1
15:53 Timbus joined
FROGGS ahh, that's how I use it anyway 15:53
moritz but .spurt on *opened* file handles makes not much sense
lizmat hence the deprecation message :-) 15:54
FROGGS m: say $*PERL.compiler.build-date
camelia rakudo-moar 315ec6: OUTPUT«2014-10-22T20:30:08Z␤»
FROGGS :o(
pmurias if macros will be able to use pieces of Perl 6 grammar for parsing will that force use to have an official grammar? 15:56
masak pmurias: you mean, besides STD.pm6 ?
ab5tract btw folks, i've made some progress on baggifying the set comparator operators, ie (>), (<), (>=), and (<=) 15:59
timotimo ah, cool :) 16:00
ab5tract though for some reason, code that works exactly as expected in the repl does not seem to do the right thing when it is in the method definition and compiled
m: $a = bag <1 1>; $b = bag <1 1 1 3>; (so $a.keys.all (elem) $b and so ($a{$_} < $b{$_} for $b.keys).all).say 16:02
camelia rakudo-moar 315ec6: OUTPUT«===SORRY!=== Error while compiling /tmp/tr7MuK76uA␤Variable '$a' is not declared␤at /tmp/tr7MuK76uA:1␤------> $a⏏ = bag <1 1>; $b = bag <1 1 1 3>; (so $a␤ expecting any of:␤ postfix␤»
ab5tract m: my $a = bag <1 1>; my $b = bag <1 1 1 3>; (so $a.keys.all (elem) $b and so ($a{$_} < $b{$_} for $b.keys).all).say 16:03
camelia rakudo-moar 315ec6: OUTPUT«True␤»
ab5tract camelia: how strict you are :)
m: my $a = bag <1 1 3>; my $b = bag <1 1 1 3>; (so $a.keys.all (elem) $b and so ($a{$_} < $b{$_} for $b.keys).all).say 16:04
camelia rakudo-moar 315ec6: OUTPUT«False␤»
16:04 treehug88 left
ab5tract the second case will return True 16:04
masak pmurias: anyway, yes -- I think so.
pmurias: any platform-independent macro code that uses the underlying Perl 6 grammar will also make assumptions about that grammar. 16:05
16:05 treehug88 joined
ab5tract even though the expression is composed exactly the same in set_operators.pm 16:06
16:07 kurahaupo left
PerlJam wonders who's going to document the public parts of the standard Perl 6 grammar 16:14
(or decide which parts are public and which parts are private)
16:15 denis_boyun left
TimToady
.oO(token !don't-use-me {...})
16:17
16:17 tgt joined 16:19 tgt left, tgt joined
masak I am hopeful we are going to be able to abstract away from QAST. I don't think we'll be able to abstract away from the grammar. 16:19
TimToady it's really sort of a question of which genes are conserved and which ones are mutable
certainly the categories must be very public
masak yes. 16:20
they feel like "extension points" in themselves.
TimToady and we should take one pass through to look for missing ones
16:20 pmurias left
PerlJam Should that be a requisite of 6.0.0? (having a standardized (parts of) the grammar) 16:22
16:22 tgt left
TimToady suspects the standardardizable bits will show up in tests as macros and ast develop. 16:24
and arguably that's the main benefit of macros at the point 6.0.0 comes out, since hopefully we've de-incentivized people for overusing them :) 16:25
16:26 Alula left, tgt joined
TimToady Perl 6 is all "Here's your hovercraft full of eels, but you can still make more eels if you like." 16:27
16:27 kaleem joined, tgt left 16:32 zakharyas left
TimToady m: my @headers = <foo bar baz quux>; say %@headers.perl; # don't need the parens on %() 16:37
camelia rakudo-moar 315ec6: OUTPUT«("baz" => "quux", "foo" => "bar").hash␤»
TimToady timotimo: ^^
[Coke] masak: I was staring at you because I didn't know what any of the nouns meant. 16:40
m: IO::Path.dir("/tmp").say 16:41
camelia rakudo-moar 315ec6: OUTPUT«Too many positionals passed; expected 1 argument but got 2␤ in method dir at src/gen/m-CORE.setting:15601␤ in block <unit> at /tmp/E3UbfwJyKB:1␤␤»
lizmat [Coke]: shouldn't be called as a class method 16:42
huh, it has IO::Path:D: in signature ? 16:43
16:43 isBEKaml left
lizmat m: IO::Path.dir.say 16:44
camelia rakudo-moar 315ec6: OUTPUT«Invocant requires an instance, but a type object was passed␤ in method dir at src/gen/m-CORE.setting:15601␤ in block <unit> at /tmp/1kjlwQPe7O:1␤␤»
lizmat that would be the error I'd expect
[Coke] why do I need an instance?
m: IO::Path.new.dir('log').say
camelia rakudo-moar 315ec6: OUTPUT«Required named parameter 'path' not passed␤ in submethod BUILD at src/gen/m-CORE.setting:15301␤ in method BUILDALL at src/gen/m-CORE.setting:956␤ in method bless at src/gen/m-CORE.setting:939␤ in method new at src/gen/m-CORE.setting:923␤ in …»
lizmat [Coke]: it's either dir("/tmp")
or "/tmp".IO.dir 16:45
[Coke] That's not obvious from perlcabal.org/syn/S32/IO.html#dir()
16:45 tinyblak left
[Coke] that looks like I can call dir on IO::Path and pass in a dir. 16:45
16:45 tinyblak joined
TimToady if you're gonna use a class as a package, it's better to use package notation than method notation 16:45
lizmat [Coke]: this is about *sub* dir() ??? 16:46
what looks like you can call dir on IO::Path and pass in a dir? 16:47
TimToady we try to keep our functional semantics very separate from our method semantics most of the time; MyClass.meth should really only be used for constructors and such
[Coke] that's where I started, yes. Probably want some boilerplate at the functions level to explain how to call them for noobs.
which apparently I is.
lizmat I guess we're going from spec to documentation then 16:48
TimToady IO::Path.dir looks like a path factory
lizmat which would be fine to me
TimToady and factories are kind of an antipattern around here
[Coke] is there better documentation for IO::Path than that url at the moment? 16:49
lizmat reading perlcabal.org/syn/S32/IO.html#dir() I don't understand where the IO::Path.dir notion comes from :-(
TimToady it will be a common failing for people coming from languages with factories 16:50
[Coke] "I'm in IO path and I want to call a callable"
16:50 tinyblak left
TimToady it's a common idiom in languages that don't have packages, and make classes stand in for packages 16:50
[Coke] looks to me like dir is a class method there, esp. if I am thinking perl5 ways where there isn't really a difference between a method and a function. (also: "function"? Should that be "sub" ?)
lizmat TimToady: are you saying we need something better than "Invocant requires an instance, but a type object was passed" for IO::Path.dir ? 16:51
m: IO::Path.dir
camelia rakudo-moar 315ec6: OUTPUT«Invocant requires an instance, but a type object was passed␤ in method dir at src/gen/m-CORE.setting:15601␤ in block <unit> at /tmp/EQEaR2sTHs:1␤␤»
[Coke] lizmat++ # for giving me the right syntax, btw, thanks!
m: IO::Path.dir("here's an argument"); 16:52
camelia rakudo-moar 315ec6: OUTPUT«Too many positionals passed; expected 1 argument but got 2␤ in method dir at src/gen/m-CORE.setting:15601␤ in block <unit> at /tmp/KrZ7XSDn8J:1␤␤»
[Coke] ^^ that's the problem, I don't see the nice error message. :)
lizmat *that* I think is a MMD bug
TimToady just trying to figure out if there's a way to recognize the particular cultureo
[Coke] TimToady: documentation is a good start. :)
just for the idiots like me who think they have the right of it. :) 16:53
what would be the package notation you mentioned earlier that might have made more sense?
m: IO::Path::dir("hi");
camelia rakudo-moar 315ec6: OUTPUT«Could not find symbol '&dir'␤ in method <anon> at src/gen/m-CORE.setting:13676␤ in any find_method_fallback at src/gen/m-Metamodel.nqp:2725␤ in any find_method at src/gen/m-Metamodel.nqp:988␤ in block <unit> at /tmp/gn0iVUm3QK:1␤␤»
[Coke] (so those are really not in IO::Path?) 16:54
TimToady actually cringes as all the Promise.foo methods in S17 16:55
*at
lizmat m: class A { method foo(A:D:) { ... } }; A.foo(42) # feels like a bug in MMD to me 16:56
camelia rakudo-moar 315ec6: OUTPUT«Too many positionals passed; expected 1 argument but got 2␤ in method foo at /tmp/m2W709aqor:1␤ in block <unit> at /tmp/m2W709aqor:1␤␤»
lizmat m: class A { method foo(A:D:) { ... } }; A.foo # expect this error first
camelia rakudo-moar 315ec6: OUTPUT«Invocant requires an instance, but a type object was passed␤ in method foo at /tmp/8kvenEuQBB:1␤ in block <unit> at /tmp/8kvenEuQBB:1␤␤»
lizmat TimToady: re S17 Promise class methods: they all return an instantiated object, so are a bit like .new 16:57
TimToady though I suppose those are arguably all constructors
16:57 ajr_ left
lizmat my point :-) 16:58
16:59 guru joined
[Coke] I have no objection per se to class methods; but I do a lot of work in languages with no packages, as you say. 16:59
16:59 guru is now known as Guest95799 17:00 Guest95799 is now known as ajr_ 17:01 woolfy left
TimToady another oddity is that we're falling into talking about things like List.unique, which is funny since that is actually illegal, but where List is standing for a parameter that is List:D 17:01
lizmat takes note 17:02
TimToady perhaps that is benign, but maybe it's also confusing to people coming from those other languages
I don't think we should switch to List::unique for that usage, since we are, in fact, discussing the method
lizmat List:D:.unique, would that be better ?
masak the Ruby world (and Java, I think) have those as List#unique 17:03
TimToady no, that's even more confusing
lizmat $List.unique ?
17:03 kaleem left
masak that one just adds confusion. 17:04
17:04 tinyblak joined
nine_ Can there be a "unique" sub and a method with that name in List? 17:04
TimToady I suspect people can be educated that the Foo.bar metanotation means that the class is to be taken polymorphic, and the method to be taken literally
m: List.unique
camelia rakudo-moar 315ec6: OUTPUT«No such method 'unique' for invocant of type 'List'␤ in block <unit> at /tmp/LGJQ1uPCGf:1␤␤»
lizmat that's because Camelia is behind :-( 17:05
17:05 pdcawley left
[Coke] do we have a builtin for creating a temp file? 17:05
17:05 pdcawley joined
lizmat [Coke]: we don't, afaik 17:06
ab5tract m: role ToPair { method to_pairs { %(self).pairs } }; my @a = <a b c d>; @a does ToPair; @a.to_pairs;
camelia ( no output )
ab5tract m: role ToPair { method to_pairs { %(self).pairs } }; my @a = <a b c d>; @a does ToPair; @a.to_pairs.say;
[Coke] ^^ feature request. :)
camelia rakudo-moar 315ec6: OUTPUT«"a" => "b" "c" => "d"␤»
17:07 cognominal joined
ab5tract that more than satisfies my desire for an Array -> List of Pairs shorthand :) 17:07
17:08 ab5tract left
TimToady loses ordering though 17:08
nine_ +1 for a temp file builtin # hand rolled temp file creation is one of the top security failures of all time
17:09 Alula joined
TimToady +Inf to that 17:09
lizmat any prior art to copy from ?
TimToady Perl 5
17:09 ajr_ left
TimToady much work has gone into removing race conditions from theirs 17:10
17:10 woolfy joined 17:11 rurban left
lizmat aka File::Temp ? 17:11
TimToady it's one of the first places hackers will look for a security flaw
TimToady remembers the berkeley break fondly, where the kernel had a race condition in starting #! files :) 17:12
masak .oO( since `defmacro` defines a macro, a `defun` must be for defining an un ) 17:14
TimToady no, it just takes all the fun out 17:15
masak :)
[Coke] I am trying to do a s:g/// over a file; without the :g, it finishes instantly. with the :g, oh so slow, whether I slurp it in and do it on the whole file, or if I do .lines and do it per line.
lizmat hmmm... looking at P5's File::Temp code, it feels more like something ecosystemy to me 17:16
or we should be able to decide on a subset
nine_ lizmat: usually I'd agree, but this feels imporant enough to have a builtin. The secure way should also be the easiest way to create a temp file. 17:17
[Coke] module is probably a better default choice on this question, anyway.
(but not, as nine notes, maybe for this particular question) 17:18
lizmat also: one might want to upgrade temp file creation without upgrading the rest of the system
[Coke] um. wow. the jvm build broke pretty spectactularly.
lizmat e.g. when a vulnerability is found
[Coke] (jvm) oops, scratch that. 17:22
17:22 cognominal left
lizmat is not seeing an JVM build problems 17:22
[Coke] ^^ idiomatic "please ignore". sorry. 17:23
lizmat np 17:24
TimToady on linux, 'apropos temp' demonstrates how difficult it is to get it right; I count roughly 12 different calls in C for making temp files "safely"
lizmat so, maybe this should be done at the nqp level... 17:25
TimToady also notes that searching a user-specified path for File::Temp is going to depend on the user not doing anything stupid, which is...difficult to guarantee... 17:28
[Coke] ISTR parrot might have something already for us to use. I'm sure java does.
m: say %*ENV<HOME>
camelia rakudo-moar 315ec6: OUTPUT«/home/camelia␤»
TimToady one of the easiest ways to shoot yourself in the foot is to delegate the task to someone else 17:29
[Coke] m: my $a = "/home/camelia/some/path" ; $a ~~ s/ %*ENV<HOME> /.../; say $a;
camelia rakudo-moar 315ec6: OUTPUT«Potential difficulties:␤ Apparent subscript will be treated as regex␤ at /tmp/4mw2uUqIwg:1␤ ------> home/camelia/some/path" ; $a ~~ s/ %*ENV⏏<HOME> /.../; say $a;␤/home/camelia/some/path␤»
[Coke] m: my $a = "/home/camelia/some/path" ; $a ~~ s/ {%*ENV<HOME>} /.../; say $a; 17:30
camelia rakudo-moar 315ec6: OUTPUT«.../home/camelia/some/path␤»
nine_ Maybe of interest: O_TMPFILE (since Linux 3.11) Create an unnamed temporary file. The pathname argument specifies a directory; an unnamed inode will be created in that directory's filesystem. Anything written to the resulting file will be lost when the last file descriptor is closed, unless the file is given a name.
[Coke] heads back to S05 to see what's he's screwing up this time.
TimToady notes that Perl 5 considers both the command line and the environment to be tainted
17:30 tgt joined
[Coke] ah, {} is for the subst only, not the match, I'm guessing. 17:32
TimToady it's very, very easy to install a usage of external data that assume a benevolent user
17:34 nine_ is now known as nine
TimToady m: my $a = "/home/camelia/some/path" ; $a ~~ s/ "{%*ENV<HOME>}" /.../; say $a; 17:35
camelia rakudo-moar 315ec6: OUTPUT«.../some/path␤»
[Coke] so, I have a file with 2688 lines, 177K bytes; if I slurp in the data and use s::g, it takes 20s; if I loop over the lines, 19s. sed is at 0.019s. anything I can do in general to get a faster result here? 17:36
TimToady {} has no return value, and is used only for side effects, such as constructing the ast
[Coke] er, s:g
TimToady++ thanks. 17:37
17:37 kurahaupo joined
[Coke] wtf? now getting 1.3s with slurp... checking... 17:38
TimToady: hee: so, with slurp and this regexp, 19s: 17:39
my $home = %*ENV<HOME>; $guts ~~ s:g/ $home /.../;
with your regexp, just over 1s: 17:40
$guts ~~ s:g/ "{%*ENV<HOME>}" /.../;
I assume that variable lookup is expensive. I would expect those to optimize out to the same thing eventually.
TimToady now try: my $r = rx/ "{%*ENV<HOME>}" /; $guts ~~ s:g/ <$r> / 17:41
or so
17:41 Sqirrel left
TimToady or maybe that's the same 17:41
TimToady does not suggest using an EVAL on %*ENV<HOME>... 17:42
[Coke] 2.5s 17:43
japhb With the "{...}" form, does the interpolation happen only once?
yoleaux 10:37Z <timotimo> japhb: i didn't write p6doc-index, i just wanted to add a little feature and didn't want to rewrite the code like that :)
timotimo hey japhb :)
japhb timotimo: Fair enough
o/
TimToady the $home variant should be really a really fast literal match; dunno why it's so slow 17:45
colomon japhb: I've really enjoyed reading the Forth background material linked from the CamelForth page. :)
TimToady m: my $home = %*ENV<HOME>; say $home.WHAT; # just checking 17:46
camelia rakudo-moar 315ec6: OUTPUT«(Str)␤»
masak m: sub prefix:<∑>([$from, $to, &term]) { [+] ($from..$to).map(&term) }; say ∑(0, 10, { $^n ** 2})
camelia rakudo-moar 315ec6: OUTPUT«385␤»
masak \o/
TimToady wonders if it's reboxing a native string many times
masak so many cool things are possible in Perl 6 already.
vendethiel 's back and yawning 17:47
TimToady m: my $home = %*ENV<HOME>; say $home.DUMP; # just checking
camelia rakudo-moar 315ec6: OUTPUT«"/home/camelia"␤»
TimToady or however you check that
masak by the way, this slide deck faculty.washington.edu/ikalet/cours...macros.pdf is worth perusing. it ends with "When to use macros -- When nothing else will do: - conditional evaluation - access to generalized variables (places) -- For computation at compiler-time -- For implementing embedded languages" 17:48
I largely agree.
TimToady when you need a safer escape valve than BEGIN 17:49
colomon masak: why sub prefix instead of just sub?
17:50 FROGGS_ joined, ptc_p6 joined
colomon (in your ∑ example, I mean.) 17:50
TimToady [Coke]: my $home = "{%*ENV<HOME>}"; $guts ~~ s:g/ $home /.../; # how 'bout this one? 17:51
17:51 azawawi joined
azawawi hi :) 17:51
yoleaux 15:08Z <lizmat> azawawi: "foo".path is deprecated, "foo".IO is not
dalek rl6-roast-data: 1b14411 | coke++ | / (5 files):
today (automated commit)
17:52
rl6-roast-data: 86d11c4 | coke++ | bin/cleanse:
Add script for cleaning up homedir info.

  TimToady++ and lizmat++ for help.
[Coke] TimToady: that variant is about 19s. 17:53
TimToady with "" on the left?
azawawi i didnt know that $file-handle.spurt would produce such a long discussion on #perl6 :)
lizmat: thanks for the clarification
17:53 FROGGS left
TimToady forcing an unboxing of a native str? 17:53
[Coke] TimToady: yes. 17:54
lizmat sometimes the tiniest of remarks will do that, don't worry about it :-)
TimToady that's completely bizarre
[Coke] I feel almost masak-like.
github.com/coke/perl6-roast-data/c...86d11c4cfb << that has bin/cleanse, you can try it out yourself if you want to play with it. (note that my local version is only checking one log file, the one checked in runs against all of them) 17:55
This is perl6 version 2014.09-256-g8102da0 built on MoarVM version 2014.09-54-g03ac9a7
(I skipped the tempfile there and just overrode the original. "close enough") 17:56
17:58 pecastro left
TimToady perhaps the $home code is doing something silly like checking to see if the string has changed using operators that are slower than just doing the operation 17:58
17:59 virtualsue left
TimToady or maybe it's the check to see if $home contains a regex 17:59
18:00 Alula left 18:05 mls left 18:09 Alina-malina left 18:10 kjs_ left
azawawi lizmat: any idea why a ctrl-c handler can consume 100% of a cpu core github.com/MoarVM/MoarVM/issues/149 ? 18:10
18:11 ptc_p6 left
lizmat nothing other than it's continously polling ? 18:11
feels more like a libuv issue than a MoarVM issue, really :-(
azawawi i see
lizmat I hope jnthn will be able to say something about then when he's back from vacation
vendethiel "why don't google pursue with dart" uh because dart sucks maybb
lizmat on the "understanding is overrated" bit: 18:12
what is a "named pipe" in the context of IO::Path.p ?
S16:364
synopsebot Link: perlcabal.org/syn/S16.html#line_364
lizmat on an opened pipe, I can see .p returning True 18:13
timotimo named pipe is what you get when you mkfifo on linux, no? 18:14
18:15 ab5tract joined
lizmat possibly :-) 18:17
18:18 grettis joined 18:20 Alina-malina joined
dalek ecs: 8da8c15 | (Elizabeth Mattijsen)++ | S16-io.pod:
Introduce pipe() for opening a pipe
18:24
lizmat FROGGS_: ^^^ instead of openpipe() ?
ab5tract \o/ , set size comparator subs are working :D 18:25
(for baggies)
lizmat ab5tract?
FROGGS_ lizmat: wfm :o)
moritz taxonomy question: how do you call the little wood or plastic pieces of board games? 18:26
timotimo pegs? pieces?
lizmat a piece ?
timotimo it seems like they really are called "pieces" 18:27
moritz ok, thanks
ah, and "meeple" when they are person-shaped: en.wiktionary.org/wiki/meeple
ab5tract m: multi sub infix:<<(<)>>(Baggy $a, Baggy $b --> Bool) { so $a.keys.all (elem) $b and so ($a{$_} < $b{$_} for $a.keys).all; } (bag(<1 1>) (<) bag<1 1 1>).say 18:28
camelia rakudo-moar 315ec6: OUTPUT«===SORRY!=== Error while compiling /tmp/vANqODqG8e␤Two terms in a row␤at /tmp/vANqODqG8e:1␤------> so ($a{$_} < $b{$_} for $a.keys).all; } ⏏(bag(<1 1>) (<) bag<1 1 1>).say␤ expecting any of:␤ metho…»
moritz oh, and that one says "token" instead of "piece"
ab5tract m: multi sub infix:<<(<)>>(Baggy $a, Baggy $b --> Bool) { so $a.keys.all (elem) $b and so ($a{$_} < $b{$_} for $a.keys).all; }; (bag(<1 1>) (<) bag<1 1 1>).say
camelia rakudo-moar 315ec6: OUTPUT«===SORRY!===␤The 'bag' listop may not be called without arguments (please use () or whitespace to clarify)␤at /tmp/P9I0xBRz25:1␤------> for $a.keys).all; }; (bag(<1 1>) (<) bag⏏<1 1 1>).say␤ expecting any o…»
ab5tract m: multi sub infix:<<(<)>>(Baggy $a, Baggy $b --> Bool) { so $a.keys.all (elem) $b and so ($a{$_} < $b{$_} for $a.keys).all; }; (bag(<1 1>) (<) bag(<1 1 1>)).say
camelia rakudo-moar 315ec6: OUTPUT«True␤»
lizmat
.oO( me actually has some gummibear meeples )
ab5tract (sorry about that)
timotimo moritz: i didn't realize they'd actually call such pieces "meeples" outside of carcassone 18:29
carcassonne*
ab5tract lizmat: that seems like appropriate behavior for (<) when baggies are provided as args, no?
timotimo ab5tract: junctions have quite severe performance implications; too expensive to be used in the core setting IMO 18:30
i would suggest [&&] list-of-bools instead of so (list-of-bools).all
ab5tract thank you for the feedback
i can convert other set operators to this form as well
timotimo that would be appreciated :) 18:31
ab5tract there are junctions all over the comparators
lizmat timotimo: indeed 18:32
timotimo ab5tract: i say this with a great deal of pain in my voice, you see
ab5tract timotimo: if you have time, would you mind elaborating on the performance implications of junctions?
timotimo i personally love junctions 18:33
ab5tract and more importantly, what can we do about it?
lizmat ab5tract: so you're saying we should special case (<) for Bag/Bag ? What about Mix/Bag, Mix/Mix, Bag/Mix ?
timotimo for one, every time you want to do stuff with a junction, you create a full object that has all the values as a list
and the autothreader actually goes ahead and evaluates the values in a pseudorandom order, so that people don't get the idea to use junctions as ordered execution of things 18:34
.o( or is that just the hyper operators? )
18:34 azawawi left
timotimo what i do know - as i've measured it - is that the optimization that turns $foo == 1 | 2 | 3 into $foo == 1 || $foo == 2 || $foo == 3 was really worth it "back then" 18:35
lizmat diner&
ab5tract it's almost certainly me, but it seems to make (elem) usage more cumbersome 18:37
18:37 fhelmberger left
ab5tract m: my $a = <1 1>.Bag; my $b = <1 1 1>.Bag; so $a.keys.all (elem) $b 18:37
camelia ( no output )
ab5tract m: my $a = <1 1>.Bag; my $b = <1 1 1>.Bag; (so $a.keys.all (elem) $b).say 18:38
camelia rakudo-moar 315ec6: OUTPUT«True␤»
ab5tract m: my $a = <1 1>.Bag; my $b = <1 1 1>.Bag; (so $a.keys (elem) $b).say
camelia rakudo-moar 315ec6: OUTPUT«False␤»
ab5tract is this the syntax that you recommend? 18:39
m: my $a = <1 1>.Bag; my $b = <1 1 1>.Bag; ([&&] $a.keys) (elem) $b
camelia ( no output )
18:40 molaf joined 18:42 mls joined
ab5tract that doesn't work, nor make a lick of sense, which means it's not what you are recommending. 18:43
ab5tract goes golfing
FROGGS_ m: my $a = <1 1>.Bag; my $b = <1 1 1>.Bag; say ([&&] $a.keys) (elem) $b
camelia rakudo-moar 315ec6: OUTPUT«True␤»
raydiak I'm not familiar with (elem); which synopsis is it in? 18:48
18:49 ptc_p6 joined
FROGGS_ m: say <1 1>.Bag (elem) <1 1 1>.Bag 18:50
camelia rakudo-moar 315ec6: OUTPUT«False␤»
FROGGS_ m: say <1 1>.Bag (elem) <1 1>.Bag
camelia rakudo-moar 315ec6: OUTPUT«False␤»
FROGGS_ m: say <1 1>.Bag (elem) <1>.Bag
camelia rakudo-moar 315ec6: OUTPUT«False␤»
TimToady m: my $a = <1 1>.Bag; my $b = <1 1 1>.Bag; say [&&] $a.keys X∈ $b
camelia rakudo-moar 315ec6: OUTPUT«True␤»
TimToady m: my $a = <1 1>.Bag; my $b = <1 1 1>.Bag; say not first *.not, $a.keys X∈ $b 18:51
camelia rakudo-moar 315ec6: OUTPUT«True␤»
TimToady there's a lazy one
maybe [&&] is lazy enough 18:52
ab5tract thanks TimToady! 18:54
TimToady raydiak: the Texas versions of the set ops are not yet well documented
and the standard ones, are, well, standard... 18:55
ab5tract i saw the 'texas' label in the tests. what does it refer to?
TimToady originally, refereed to the << >> versions of « »
"Everything's bigger in Texas." 18:56
ab5tract ahh
:)
TimToady now it's the ASCII workaround for any fancy Unicode operator
and still generally bigger and uglier :)
ab5tract m: my $a = <1 1>.Bag; my $b = <1 1 1>.Bag; say [&&] $a.keys (elem) $b 18:59
camelia rakudo-moar 315ec6: OUTPUT«False␤»
ab5tract so how to explain the difference in behavior? 19:00
timotimo why would the list of keys of $a be an element in the bag $b?
ab5tract no, it wouldn't. 19:01
this is all stuff i learned yesterday, when investigating junctions
but isn't X\u2208 just (elem) ?
timotimo m: say "\u2208" 19:02
camelia rakudo-moar 315ec6: OUTPUT«===SORRY!=== Error while compiling /tmp/5fvxzDpBmL␤Unrecognized backslash sequence: '\u'␤at /tmp/5fvxzDpBmL:1␤------> say "\⏏u2208"␤ expecting any of:␤ argument list␤ prefix or term␤ …»
timotimo m: say "\x2208"
camelia rakudo-moar 315ec6: OUTPUT«∈␤»
timotimo no, just \x2208 is (elem)
ab5tract ahh
so what is X\u2208 ? TimToady's invocation just gives an undeclared routine exception 19:05
in my repl
FROGGS_ what the heck is this? 19:06
[2014-10-30T19:06:14Z] GET /recent HTTP/1.1
Commands out of sync; you can't run this command now
in method execute at lib/DBDish/mysql.pm6:170
ab5tract gar 19:07
don't worry folks, i do feel like i'm starting to get the hang of it :)
timotimo sadly you don't have proper spec tests for that yet, right?
dalek ecs: eeb0e4e | TimToady++ | S99-glossary.pod:
gloss "Texas operator"
19:08
TimToady ab5tract: your repl doesn't handle Unicode right 19:09
ab5tract hm. i can see all the unicode it replies to me 19:12
timotimo that doesn't have to mean anything %)
TimToady or maybe your copy pad is forcing non-Unicode?
we all pretty much assume a consistent UTF-8 datastream here these days 19:13
are you in a screen program or such?
timotimo and then out of nowhere comes a BOM and blows up our everything
ab5tract not to worry, the part that was really tricking me was that i was parsing the 'X' in X\u2208 as part of the unicode escaping, not as the operator :)
TimToady at least at one time, you had to say screen -u to get utf8, but that's shouldn't be necessary in newer versions 19:14
okay
ab5tract it might be irssi.
TimToady what's your LANG envvar set to? 19:15
did the epsilon show up as \u in irssi?
ab5tract it isn't actually. i'm on a mac, i guess it hasn't been necessary up until now
yes
TimToady try LANG=en_US.UTF-8 or so 19:16
ab5tract thanks TimToady, i will give it a try :)
TimToady guesses the ␤ is also not showing up correct either 19:17
.u ␤ 19:18
yoleaux U+2424 SYMBOL FOR NEWLINE [So] (␤)
ab5tract nope
i'll try restarting with the envvar
19:18 ab5tract left 19:19 ab5tract joined
TimToady hyper is »+« 19:19
ab5tract \o\ \o/ /o/ :D 19:20
it does the trick
TimToady m: say 42
camelia rakudo-moar 315ec6: OUTPUT«42␤»
TimToady and you should have an NL char there after 42
m: say "foo bar baz" ~~ / \w+ / 19:21
camelia rakudo-moar 315ec6: OUTPUT«「foo」␤␤»
TimToady m: say "foo bar baz" ~~ m:g/ \w+ /
camelia rakudo-moar 315ec6: OUTPUT«False␤»
ab5tract yeah, it looks snazzy now 19:22
TimToady m: say "foo bar baz" ~~ / (\w+)* % ' ' /
camelia rakudo-moar 315ec6: OUTPUT«「foo bar baz」␤ 0 => 「foo」␤ 0 => 「bar」␤ 0 => 「baz」␤␤»
TimToady \o/
ab5tract plus the cool 「braces」
the wool has been pulled from my eyes, and camelia's voice is prettier than ever 19:23
timotimo ooh
poor you
ab5tract once again i find myself thanking TimToady for changing everything :) 19:24
TimToady if you wax too poetical, we'll make you write an Advent entry :P
ab5tract i'd love to :)
masak \o/ 19:25
TimToady [Coke]: me has reproduced the sloth of /$home/ here and will investigate further after lunch and backlogging (and all the other yaks that crop up to be shoven) 19:26
timotimo /$home/ vs /"$home"/? 19:27
19:28 rindolf left, rindolf joined
lizmat m: say 1 elem <1 1>.Bag 19:29
camelia rakudo-moar 315ec6: OUTPUT«===SORRY!=== Error while compiling /tmp/JMXFdlQINA␤Two terms in a row␤at /tmp/JMXFdlQINA:1␤------> say 1 ⏏elem <1 1>.Bag␤ expecting any of:␤ postfix␤ infix stopper␤ infix or meta-…»
timotimo you want (elem), no?
lizmat m: say 1 (elem) <1 1>.Bag
camelia rakudo-moar 315ec6: OUTPUT«False␤»
lizmat hmmm
timotimo huh, interesting
(elem) just doesn't know what a bag is?
m: say (1 => 2) (elem) <1 1>.Bag 19:30
camelia rakudo-moar 315ec6: OUTPUT«False␤»
[Coke] TimToady: your gloss fo r texas operator uses a texas ellipsis, which I found amusing. 19:31
19:32 sorear left
lizmat update& 19:35
19:35 lizmat left
dalek href="https://cpandatesters.perl6.org:">cpandatesters.perl6.org: b816c3c | (Tobias Leich)++ | / (4 files):
implement view of most recent reports
19:35
ab5tract i noticed that last night, but figured it was by design 19:36
19:36 guru joined
TimToady m: say '1' (elem) <1 1>.Bag 19:36
camelia rakudo-moar 315ec6: OUTPUT«True␤»
ab5tract yup
TimToady bags are type sensitive 19:37
19:37 guru is now known as Guest78815, Guest78815 is now known as ajr_
ab5tract TimToady: is there any limit to what can be a key, then? 19:37
19:37 sorear joined
ab5tract i didn't find any while poking :) 19:37
19:38 rindolf left 19:39 lizmat joined, rindolf joined
lizmat TimToady++ :-) 19:42
m: say 1 (elem) (1,1).Bag
camelia rakudo-moar 315ec6: OUTPUT«True␤»
19:43 darutoko left
lizmat m: say (1 => 2) (elem) (1 => 2).Bag 19:46
camelia rakudo-moar 315ec6: OUTPUT«False␤»
lizmat not sure that is right... I guess Pairs are special...
19:46 kurahaupo_ joined
lizmat m: say 1 (elem) (1 => 2).Bag 19:46
camelia rakudo-moar 315ec6: OUTPUT«True␤»
ab5tract m: say (1 => 2) (elem) ( (1 => 2) => "could be useful" )
camelia rakudo-moar 315ec6: OUTPUT«False␤»
ab5tract ah, it's just another pair 19:47
m: say (1 => 2) (elem) ( (1 => 2) => "could be useful" ).hash
camelia rakudo-moar 315ec6: OUTPUT«False␤»
masak m: say 5 (elem) ( 5 => "OH HAI" ).hash 19:48
camelia rakudo-moar 315ec6: OUTPUT«False␤»
FROGGS_ m: say '5' (elem) ( 5 => "OH HAI" ).hash 19:49
camelia rakudo-moar 315ec6: OUTPUT«True␤»
ab5tract of courtse
m: say (1 => 2) (elem) ( (1 => 2) => "could be useful" ).bag
camelia rakudo-moar 315ec6: OUTPUT«No such method 'bag' for invocant of type 'Pair'␤ in block <unit> at /tmp/BaUpK5DwIz:1␤␤»
19:49 kurahaupo left
masak I'm not 100% sure what I would expect (elem) to mean with a Hash rhs... 19:50
ab5tract right, as it is a set operator
it's a strange way to lookup a value in a hash :)
moritz when it's a set operator, I expect coercion to set
masak of... the hash keys...?
I guess they are more set-like than the values. 19:51
moritz m: say (set %( a => 2, b => 53)).perl
camelia rakudo-moar 315ec6: OUTPUT«set("a" => 2,"b" => 53)␤»
moritz oh, that makes sense
a hash in list context dissolves into a list of pairs
masak it kinda does, yes.
19:52 jfredett joined 19:54 cognominal joined 19:57 cognominal left
lizmat m: say Mu.new.WHICH # hmmm.... 19:58
camelia rakudo-moar 315ec6: OUTPUT«Mu|58385456␤»
ab5tract moritz: wouldn't it make more sense to also add the values to the set, then?
moritz ab5tract: why the values?
ab5tract nevermind, i misread what you wrote
m: say (set %( a => 2, b => 53).kv).perl 19:59
camelia rakudo-moar 315ec6: OUTPUT«set("a",2,"b",53)␤»
ab5tract if you want it that way, its super clean to get it that way :)
dalek kudo/nom: a68a3ee | (Elizabeth Mattijsen)++ | src/core/io_operators.pm:
Simplify named params for open()
20:00
ab5tract o O ( not sure why i said 'you', when i meant 'i' ) 20:01
20:15 kurahaupo_ left 20:16 Ven joined
Ven www.reddit.com/r/programming/commen...iscussion/ <- ah/ 20:32
lizmat ah? 20:37
20:38 fhelmberger joined
lizmat nobody taking the bait, is what you're saying ? 20:38
20:38 spider-mario left 20:40 spider-mario joined
Ven yes :P 20:40
lizmat fwiw, I've said this a few days ago already, but it feels to me MoarVM and/or NQP has become a lot less stable of late 20:41
when running a spectest, I get ~6 test files with errors, that don't appear when run by themselves
and the ~6 test files are a different set each time
20:42 fhelmberger left
[Coke] lizmat: I'm seeing huge jit failures on a flapping basis. 20:43
bartolin lizmat, [Coke]: you're both on macosx? I haven't seen such problems lately (neither on linux nor on freebsd) 20:45
lizmat mac OS X, Mavericks
[Coke] 10.9.5 20:46
FROGGS_ moritz: also had flapping tests until he wiped his /install 20:47
20:47 anaeem1 left
FROGGS_ err, s/':'// 20:47
lizmat will try that *again*
FROGGS_ I have no osx machine, I can't help here 20:48
[Coke] this is a clean install every day here.
I do have an installed perl6, but that's not the install dir where the moarvm that's being built is being installed. 20:49
geekosaur should update his build and see what the testsuite does 20:54
20:55 [Sno] left
lizmat nuked install, rebuilt from scratch, ran spectest, and sees another set of 8 testfiles with fails :-( 20:58
an example:
t/spec/S02-literals/char-by-number.rakudo.moar (Wstat: 6 Tests: 28 Failed: 0)
Non-zero wait status: 6
Parse errors: Bad plan. You planned 42 tests but ran 28.
moritz :( 20:59
ingy heya moritz :) 21:01
moritz \o ingy
ingy moritz: do you do the irc logs?
#inline on irc.perl.org needs one
PerlJam ingy: I think the logs do themselves once he configures the bot :) 21:02
ingy :P
moritz ingy: did you ask in the channel if everybody is fine with public logs?
PerlJam ingy: Are you getting much participation on #inline?
ingy PerlJam: yes. 21:03
moritz: I can but it's pretty much just me and davido and mohawk, with others lurking
moritz ingy: please ask anyway
ingy: I've had too many people ask me to do logs, and then had serious opposition after the bot joined the channel 21:04
21:04 virtualsue joined
ingy moritz: bulk88, davido_laptop, dams, dg, garu, mst, nine_, rafl, silverdirk, sivoais, ugexe, willthechill: any of you object to having a logging bot in here? 21:06
asked
PerlJam ingy++
ingy The channel will be registered to me
need to do that today
but it's the communication point for the TPF grant 21:07
moritz started to work on github.com/moritz/igel-aergern today
ingy so I want it logged
moritz: is it possible to send you 10 days of prior weechat logging? 21:08
PerlJam ingy: btw, I don't know if you get enough warm fuzzies about the work on Inline::C that you guys are doing, but I think the blog and your reports are great. Tell davido I said so too.
moritz ingy: I don't have any ready-made import script or so 21:09
ingy PerlJam: thx
moritz: ok, maybe I can write one
if you want
moritz ingy: well, your choice 21:10
ingy ok, not top priority at the moment, but would be nice to have the whole grant work logged for posterity 21:11
moritz ingy: but if you want an import, and I can only start logging after the import
(auto-increment keys + reliance on ordering)
ingy moritz: I'll ping you tomorrow after everyone's had a chance to see the msg
21:11 davido__ joined
moritz ingy: ok, great 21:12
davido__ hi moritz :)
ingy moritz: you could start logging then I could apply the import to everything, and we could start over with that
so not really blocking on each other
moritz ingy: that's a bit icky 21:13
ingy ok
moritz (also means I can't log during import)
ingy ok forget it 21:14
I'll can just gist the prior log
21:14 cognominal joined 21:15 ptc_p6 left
ab5tract so i'm adding some tests for baggied set comparators 21:16
i kind of appreciate this style of output: ok 107 - bag(n, e(4), d, y) is not a strict superbag of bag(n, e(2), d) 21:17
geekosaur ok, so I can confirm on 10.9.5 that I get erratic behavior from the spectests 21:18
ab5tract but i don't see any other tests expressing their values that wayt
dalek kudo/nom: 49658c7 | (Elizabeth Mattijsen)++ | src/core/IO/Handle.pm:
Add $!pipe attr/method, conflate close/close-pipe
kudo/nom: ed2c12c | (Elizabeth Mattijsen)++ | src/core/IO/Path.pm:
Add .pipe method, as alternative to .open

This basically exposes flaws in the current setup: an IO::Path is supposed to be a path on a file system. Abusing it for the parameters of a pipe seems counterproductive. But I guess it will do as an intermediate step.
kudo/nom: 0eb4bc8 | (Elizabeth Mattijsen)++ | src/core/io_operators.pm:
Add pipe(), as loosely specced in S16
ab5tract i can compose it according to the existing style, of course. i'm just curious if anyone else sees value in seeing the variables themselves
lizmat ab5tract: it helps in debugging tests, at least they helped me 21:19
$ 6 'my $h = pipe "echo Hello"; say $h.get; say $h.close' 21:20
Hello
Proc::Status.new(exit => 0, pid => Any, signal => 0)
ab5tract to print the variables with the test output, you mean? ok, cool. none of the other set operator tests do it, so i wasn't sure
lizmat geekosaur: thanks for the reality check 21:21
geekosaur and that was from a fresh install
lizmat yeah, the last one was also from a fresh install for me 21:22
FROGGS_ lizmat++
masak 'night, #perl6 21:23
bartolin does anyone on non-OSX gets such erratic behaviour from the spectests?
moritz \o masak
ab5tract ciao masak 21:25
21:26 grettis left 21:28 grettis joined 21:29 cognominal left
FROGGS_ m: say uniname "\x0a".chr; say "\x0a".ord; say uniname "\n"; say "\n".ord 21:29
camelia rakudo-moar 315ec6: OUTPUT«NULL␤10␤LINE FEED (LF)␤10␤»
FROGGS_ what's going on here?
m: say "\x0a"; say "\n" 21:30
camelia rakudo-moar 315ec6: OUTPUT«␤␤␤␤»
FROGGS_ ohh
FROGGS_--
m: say "a".chr
camelia rakudo-moar 315ec6: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏a' (indicated by ⏏)␤ in method Int at src/gen/m-CORE.setting:13668␤ in method Int at src/gen/m-CORE.setting:6096␤ in method chr at src/gen/m-CORE.setting:…»
FROGGS_ m: say "\n".chr 21:31
camelia rakudo-moar 315ec6: OUTPUT«␀␤»
FROGGS_ weird
21:42 xfix is now known as notfix
moritz m: say +'' 21:43
camelia rakudo-moar 315ec6: OUTPUT«0␤»
moritz oh
numification strips whitspace
and treats the empty string as zero (without warning)
lizmat m: say "/".split("/").perl # unexpected, but I guess specced that way 21:44
camelia rakudo-moar 315ec6: OUTPUT«("", "").list␤»
21:46 kaare_ left 21:48 cognominal joined, rindolf left
lizmat FROGGS_: so, if I remember correctly, Win systems have been able to work with "/" on any version that we care to support with rakudo, right ? 21:53
21:54 Ven left
mauke / support goes back to something like DOS 2.0 21:54
in functions that deal with filenames, that is. the shell, not so much
FROGGS_ lizmat: correct
lizmat so if we start using "/" literally as directory delimiter, we should be fine ? 21:55
FROGGS_ yes
lizmat ok... :-)
FROGGS_ :o) 21:56
I've got no experience with symbian (which is windows-ish), but I also guess nobody is going to use rakudo there
lizmat let's cross that bridge when we get there, I would say... 21:57
Tekk_ FROGGS_: I may be wrong but I believe that symbian has officially been dead for some years now hasn't it? 21:59
FROGGS_ Tekk_: probably, yes 22:00
22:02 ruoso left 22:08 ruoso joined 22:09 funjon left 22:11 funjon joined 22:12 ruoso left, ntln left
lizmat I'm trying to make a lightweight IO::Dir object 22:13
22:14 ntln joined 22:15 funjon left 22:16 ruoso joined 22:21 funjon joined 22:22 treehug88 left
dalek nda/reporter: fa0ca63 | (Elizabeth Mattijsen)++ | ext/ (2 files):
Revert dir() --> List[Str] changes
22:23
nda/reporter: 7ba56ca | (Tobias Leich)++ | ext/ (2 files):
Merge branch 'master' of github.com:tadzik/panda into reporter
nda/reporter: 7785368 | (Tobias Leich)++ | lib/Panda/ (2 files):
fix check of closed pipe's status
nda/reporter: ee4588f | (Tobias Leich)++ | lib/Panda/Reporter.pm:
add Content-Length header to reporter http client
22:23 [Sno] joined 22:27 funjon left 22:31 funjon joined 22:32 grettis left 22:37 legrady joined 22:38 funjon left 22:41 ruoso left
lizmat sleep& 22:41
22:41 funjon joined 22:42 ruoso joined 22:50 gfldex left 22:57 grondilu left 22:59 Alina-malina left 23:02 tgt left 23:04 FROGGS_ left 23:06 spider-mario left 23:16 kjs_ joined, BenGoldberg joined, cognominal left 23:28 immortal joined 23:29 erkan left 23:43 BenGoldberg left 23:44 virtualsue left 23:46 kjs_ left 23:51 BenGoldberg joined