»ö« 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:00 kurahaupo left 00:07 ajr_ left 00:21 thou joined 00:25 BenGoldberg joined 00:26 thou left 00:31 perltricks joined 01:02 kurahaupo joined 01:04 klapperl joined, perltricks left 01:07 klapperl_ left
dalek k-simple: ccc0f1b | (Timo Paulssen)++ | lib/GTK/Simple.pm6:
introduce ToggleButton and CheckButton
01:08
k-simple: 3993435 | (Timo Paulssen)++ | examples/02_toggles.pm6:
an example using toggle- and check-button.
01:30 hoverboard joined 01:44 [particle] left 01:46 FROGGS_ joined 01:47 Su-Shee_ joined 01:48 Sqirrel left 01:49 Sqirrel joined 01:50 FROGGS left, Su-Shee left 01:53 Psyche^ joined 01:57 dj_goku left 01:58 Psyche^ left 02:10 thou joined 02:14 thou left 02:30 dj_goku joined 02:34 hoverboard is now known as moistcherry 03:11 FROGGS_ left 03:24 xragnar_ joined, xragnar left, xragnar_ is now known as xragnar 03:41 pdurbin joined 03:50 SamuraiJack joined 03:58 thou joined 03:59 Sqirrel left 04:02 thou left 04:04 SamuraiJack left 04:05 SamuraiJack joined 04:06 moistcherry is now known as hoverboard 04:13 Sqirrel joined 04:18 hoverboard is now known as cholby 04:32 kurahaupo left 04:36 Sqirrel left 04:37 Sqirrel joined, BenGoldberg left 04:39 bjz joined 04:43 molaf joined 04:45 SamuraiJack_ joined 04:48 SamuraiJack left 05:01 autark left, cholby left 05:31 kaare_ joined 05:36 ggoebel111115 left
Woodi morning :) 05:38
hmm, delegetion for me means "delegation of responsibility", eg: class Car { has Engine $!e; method start { $!e.start() } } 05:40
05:41 woolfy joined
Woodi but for some time I think here ppls talk about something else... delegation throught handles ? 05:41
lizmat good *, #perl6! 05:42
yoleaux 23 May 2014 23:15Z <Mouq> lizmat: I really kind of can't add tests for List.rotor at the moment :( And yes, List.rotor(1,0) should be { self }
Woodi o/
lizmat .tell Mouq I'll add tests then
yoleaux lizmat: I'll pass your message to Mouq.
lizmat Mouq, timotimo, colomon, flussence: how about giving warnings the same treatment as deprecations? 05:43
aka, only tell how many times it happened where *after* the program has finished 05:44
05:46 thou joined 05:47 woolfy left
Woodi ah, found perlcabal.org/syn/S12.html#Delegation 05:49
05:50 thou left 06:03 Sqirrel left 06:39 lizmat left 06:42 sqirrel_ joined, Sqirrel joined 06:49 skids left 06:54 rindolf joined 07:08 FROGGS joined
FROGGS timotimo: yeah, v5 timings would be interesting... need to check if the benchmarks run on v5 though 07:11
but I guess the chance is high because you usually do not use many modules there
07:15 lizmat joined
FROGGS lizmat: about warnings at exit... I think I like it 07:16
lizmat part 2 of commute& 07:20
07:20 lizmat left
FROGGS timotimo: walking the things in my v5 folder takes 1m53.453s 07:20
dunno how to profile that offhand
that was moar btw, running now for other backends 07:21
07:25 kaare__ joined 07:27 sqirrel_ left 07:28 kaare_ left 07:33 Sqirrel left, Sqirrel joined 07:43 kaare__ left 07:53 Rotwang joined 07:57 darutoko joined
Woodi Release #76, nickname "Bajor" ? what Bajor is ? 08:00
08:02 Shozan left 08:03 SHODAN joined, Sqirrel left
moritz read the release announcement? 08:06
Woodi yes, R* 201405 "Bajor"... is there such .pm or it's singer name :) 08:08
08:18 virtualsue joined
moritz no R* yet 08:18
08:35 Sqirrel joined
sergot morning! o/ 08:37
Woodi hi sergot 08:42
08:43 dmol joined 09:00 SamuraiJack_ left
jnthn morning, #perl6 09:02
FROGGS "morning" :o) 09:03
jnthn heh, true :)
jnthn slurps airport coffee
FROGGS Woodi: en.wikipedia.org/wiki/Bajor#Homeworld
vendethiel FROGGS: OH: "Perl 6 is fast now, you just need to write the code in perl 5" 09:04
FROGGS vendethiel: I don't get that sentence
vendethiel FROGGS: I thought you said v5 would be okayish-fast
FROGGS ahh, Perl 5, not perl 5 *g* 09:05
vendethiel v5
FROGGS vendethiel: v5 builds and spectests very nicely
vendethiel FROGGS: hence the "OH" :P
FROGGS but I don't know how fast it is compared to, say, perl-5.20 09:06
vendethiel (and how fast is it compared, to, say, last R*)
cosimo jnthn: we're waiting for you here :-)
( @mojoconf ) 09:07
FROGGS I hope that running code using v5 is not much slower that running similar code on rakudo directly
but since there is some abstraction layer between some stuff, it must be slower at least to some degree 09:08
jnthn cosimo: Well, my flight looks to be on time, and it's a short flight, and flytoget is fast, so shouldn't be too much waiting ;) 09:10
cosimo jnthn: ah, i thought you were on this side already :) 09:14
jnthn flight & 09:24
09:26 chenryn left, chenryn joined 09:34 virtualsue left
dalek kudo/nom: 4bbe231 | (Tobias Leich)++ | src/core/IO.pm:
obtain $*CWD.chars once before the loop in IO::Path.contains

It is about 25% faster for a very simple test.
09:35
FROGGS okay, we really need to optimize gather/take now
hmmm, no, maybe it is not the gather/take 09:38
wow, IO::Path.d is very slow... do we need a stat cache? 09:41
turning a string 500 times into a path takes 0.3s 09:44
calling .d on a IO::Path takes 2.2s when doing it 500 times
ewww 09:45
method d() {
self.e && nqp::p6bool(nqp::stat(nqp::unbox_s(IO::Spec.rel2abs(self.Str)),
nqp::const::STAT_ISDIR))
}
why do we turn our IO::Path into a string?? 09:46
there must be a better way 09:48
09:48 SevenWolf left 09:51 bowtie left 09:57 bowtie joined
masak indeed 10:02
10:06 xinming_ joined 10:08 SamuraiJack_ joined 10:09 xinming left, spider-mario joined 10:10 kaare__ joined, kaare__ is now known as kaare_ 10:11 araujo left 10:22 rindolf left 10:23 rindolf joined 10:29 Alula left 10:31 Alula joined, denis_boyun joined 10:53 anant joined 10:57 SamuraiJack__ joined 11:02 SamuraiJack_ left
anant what's the fastest way to loop from 0 to million in perl6? 11:06
I tried "for ^1e6 -> $i { 'some code' }" but it takes a really long time (more than 10s on my computer) 11:07
In contrast perl5 takes less than a second
11:08 Psyche^ joined
FROGGS anant: while loops are faster than for loops 11:09
timotimo when i print one million 1s it takes 15s with your method
in contrast, for ^(1e6.Int) -> $i takes only 11s 11:10
FROGGS m: my int $i = 0; while $i < 1_000_000 { $i = nqp::add_i($i, 1) } # this might be the fastet way
camelia ( no output )
timotimo for ^(1e6.Int) -> int $i takes one second less 11:11
anant FROGGS: thanks 11:13
FROGGS m: my int $i = 0; while $i < 1_000_000 { $i = nqp::add_i($i, 1) }; say nqp::time_n() - BEGIN nqp:time_n
camelia rakudo-moar 4bbe23: OUTPUT«===SORRY!===␤Cannot invoke null object␤»
FROGGS eww
p: my int $i = 0; while $i < 1_000_000 { $i = nqp::add_i($i, 1) }; say nqp::time_n() - BEGIN nqp:time_n
camelia rakudo-parrot 4bbe23: OUTPUT«===SORRY!===␤Could not find sub &nqp␤»
timotimo :: at the end
FROGGS m: my int $i = 0; while $i < 1_000_000 { $i = nqp::add_i($i, 1) }; say nqp::time_n() - BEGIN nqp::time_n
timotimo :)
camelia rakudo-moar 4bbe23: OUTPUT«0.647788047790527␤»
FROGGS :o) 11:14
timotimo oh wow.
anant wow!
FROGGS m: for ^(1e6.Int) -> int $i { }; say nqp::time_n() - BEGIN nqp::time_n
camelia rakudo-moar 4bbe23: OUTPUT«5.74020648002625␤»
FROGGS :o)
timotimo ah, ok, when i had a print "1" in there, that's probably what took the most time
FROGGS knows stuff :D
timotimo m: for ^(1e6) -> int $i { }; say nqp::time_n() - BEGIN nqp::time_n 11:15
camelia rakudo-moar 4bbe23: OUTPUT«(timeout)»
timotimo wow.
that really makes a big difference
anant are these tricks documented somewhere? :)
timotimo ideally, you wouldn't need any of those tricks ;)
anant for a newbie its pretty difficult (and frustrating) :)
dalek kudo/nom: f538dce | (Tobias Leich)++ | src/core/IO.pm:
make .IO.{d|s|z} by about 40% faster
11:16
timotimo well, whenever you write a scientific notation number you are signaling "i really want a Real here, not a Rat"
so it may be a bad idea to try to use that for an "Int with many zeros"
anant oh
timotimo m: say 3.14159.WHAT 11:17
camelia rakudo-moar 4bbe23: OUTPUT«(Rat)␤»
timotimo m: say 3.14159e0.WHAT
camelia rakudo-moar 4bbe23: OUTPUT«(Num)␤»
timotimo m: say Rat ~~ Real
camelia rakudo-moar 4bbe23: OUTPUT«True␤»
timotimo my mistake
i meant to say Num up there, not Real.
anant ok
11:21 denis_boyun left
timotimo in general, arithmetic with native integers (when you write "int" instead of "Int") can be much faster 11:25
and arithmetic with Rats (whenever you don't write an e inside your numbers) will be quite slow
on the other hand, it will be perfectly precise up to a certain point
11:26 Psyche^ left 11:28 anant left 11:29 lizmat joined 11:30 prevost joined 11:33 Psyche^ joined 11:36 FROGGS left 11:41 anant joined
lizmat is back home for a little while) 11:42
11:42 Psyche^_ joined, Psyche^ left 11:47 Psyche^_ left
lizmat .tell FROGGS looks like your changes break t/spec/S16-filehandles/filetest.t , at least on moar 11:52
yoleaux lizmat: I'll pass your message to FROGGS.
lizmat .tell FROGGS: "doesnotexist.t".IO ~~ :z dies rather than returning False 11:53
yoleaux lizmat: What kind of a name is "FROGGS:"?!
lizmat .tell FROGGS "doesnotexist.t".IO ~~ :z dies rather than returning False 11:54
yoleaux lizmat: I'll pass your message to FROGGS.
lizmat afk again&
11:59 SamuraiJack__ left
dalek k-simple: df0b11c | (Timo Paulssen)++ | examples/02_toggles.pm6:
lots of comments for the second example
12:01
timotimo .tell FROGGS other than the failures, good eye for optimization, those 40% will really mean a lot 12:02
yoleaux timotimo: I'll pass your message to FROGGS.
12:05 denis_boyun_ joined 12:10 mr-foobar left 12:35 telex left 12:36 telex joined 12:43 anant left
dalek kudo/nom: 2dd18de | (Elizabeth Mattijsen)++ | docs/ChangeLog:
Mention increase of speed of .IO.{d|s|z}
12:58
12:59 thou joined 13:03 thou left 13:08 rindolf left
dalek kudo/nom: cb77438 | (Elizabeth Mattijsen)++ | src/core/IO.pm:
Fix .IO.z brokenness
13:13
lizmat .tell FROGGS .z is now fixed, but .s seems to always return 0 13:14
yoleaux lizmat: I'll pass your message to FROGGS.
lizmat afk until much later&
13:29 dmol left 13:35 ggoebel111115 joined 13:36 dmol joined
timotimo m: say 1 && 55 13:36
camelia rakudo-moar f538dc: OUTPUT«55␤»
13:37 molaf left
masak does a double-take on that, but it's actually correct 13:37
13:38 Su-Shee_ is now known as Su-Shee
timotimo hoelzro: could you teach the pygments lexer about pod formatting codes inside comments to make them stand out a little bit? 13:52
github.com/perl6/gtk-simple/blob/m..._world.pm6 - looks much much better in vim
13:54 denis_boyun_ left, denis_boyun_ joined 14:13 anaeem1_ joined
dalek k-simple: 58d1964 | (Timo Paulssen)++ | examples/02_toggles.pm6:
fix example
14:16
hoelzro timotimo: I could add an option or something 14:35
timotimo an option? 14:36
it would be nice if it would always work, because i'm not sure if i can convince github to turn on an "option" :)
hoelzro oh, good point
I'll put it on the TODO list =)
14:46 anaeem1_ left
timotimo thank you :) 14:47
also 14:48
14:48 thou joined
colomon is impressed at how well github is doing at p6 code-formating now... 14:48
timotimo method s() { ... } makes the whole method body look like regex, because it sees the s :)
colomon: they just use pygments, which hoelzro patched to have perl6 highlighting
14:48 prevost left
timotimo hoelzro++ # for syntax highlighting again 14:48
colomon what triggers the p6 highlighting? is it the .pm6? 14:49
14:50 FROGGS[mobile] joined 14:52 thou left
FROGGS[mobile] thanks for fixing. z 14:56
.z 14:57
will care about .s in a few hours
hoelzro colomon: .pm6 will do it, but upstream pygments is more intelligent 15:05
also, they have a Bayesian classifier that they never update 15:06
colomon hoelzro: how about use v6 ?
hoelzro colomon: I do
github.com/github/linguist/pull/900
open for 4 months =/
bitbucket.org/birkenfeld/pygments-...lt#cl-2321 15:07
that's the Python code for guessing whether or not it's Perl 6
colomon hoelzro: use v6 needs to be the first non-comment text in the file? I think that's how I do it... 15:08
hoelzro either use v6, or a class/module/role/grammar decl 15:10
15:10 guru joined
hoelzro it's pretty reliable, and it's following S02 15:10
15:10 guru is now known as Guest86884, Guest86884 is now known as ajr_
dj_goku timotimo: so a few weeks back I tried I think r * but was getting heap space/out of memory. you were right but didn't find the right make file until search today rakudo/nqp/tools/build/Makefile-JVM.in 15:11
I wonder if the readme.md is out of date where it says to update the runner (nqp-j) 15:12
15:19 sunnavy left 15:22 BenGoldberg joined
moritz or try the moarvm backend, it needs far less memory 15:34
15:34 cooper left 15:35 erdic left 15:39 thou joined 15:42 dayangkun left 16:00 jercos left, erdic joined 16:01 bjz left, jercos joined, bjz joined 16:06 Ben_Goldberg joined, BenGoldberg left, Ben_Goldberg is now known as BenGoldberg 16:26 molaf joined 16:27 hummeleBop joined
FROGGS[mobile] m: say $*EXECUTABLE.IO.s 16:35
camelia rakudo-moar cb7743: OUTPUT«True␤»
FROGGS[mobile] O.o 16:36
timotimo dj_goku: you can also directly change the Makefile 16:40
dj_goku: and i'm not sure what you mean with "update the runner" 16:41
dj_goku in the readme it talks about updating nqp-j if you get outofmemory errors 16:42
github.com/rakudo/rakudo/blob/c1bd...on-the-jvm
16:48 virtualsue joined
timotimo yay for the nlpw recording of jnthn's talk <3 16:59
colomon indeed 17:01
17:03 ajr_ left
moritz URL? 17:03
www.infoq.com/presentations/invokedynamic # also by jnthn++, about JVM's invokedynamic 17:04
timotimo www.youtube.com/watch?v=JROvKKei4u...e=youtu.be
sadly, i cannot watch that presentation on my linux machines :(
colomon oh, wait, I was thinking of the invokedynamic talk. :) 17:07
masak hi #perl6. 17:08
today, I'm thinking of stories as software abstractions.
timotimo i'd like to see that one, too
17:08 virtualsue left
masak it seems to me that a lot of what we're just starting to do with promises and reactive programming as an industry, has as its logical endpoint the concept of workflows, or stories. 17:09
BDD people talk of "user stories". maybe we should reify them more in our programs.
moritz timotimo: works fine with firefox on linux for me (with js enabled) 17:10
masak couldn't for example a web app be designed and implemented as a set of flows through the application, consisting of various screens/views and actions taken in those? I guess the notion of "wizards" captures that, but it's a bit linear.
sad paths kind of "hook into" the main happy path in different places. 17:11
17:11 guru joined, guru is now known as Guest73375 17:12 japhb left, Guest73375 is now known as ajr_
moritz masak: sounds like state machines rediscovered :-) 17:12
flows/stories sound like paths through a state machine
masak moritz: well, people talk a lot about "callback hell" these days. it's the unfortunate state that many frameworks want to abstract you from.
moritz: and yes, what I'm suggesting is close to the CPS transform approach, which does turn your program into a state machine. 17:13
timotimo moritz: what plugin handles the video for you?
masak (and yes, this could probably be *implemented* as a state machine)
moritz timotimo: dunno, how can I tell?
timotimo all i get is the "play" icon in a plugin box and nothing happens when i click play
good question
about:plugins? 17:14
masak but what I'm suggesting shouldn't look like a state machine implementation, because then the point is lost. it should look like a linear flow of things that happen in the application.
timotimo maybe right-clicking it will give a hint?
haha
moritz timotimo: do you have flash installed?
vendethiel "callback hell" is an implemention issue 17:15
masak maybe a good way to phrase it is this: Rails suggests to treat models, views and controllers as first-class entities. I suggest to treat stories as first-class entity, and have models, views, etc, hang off of a story.
moritz application/x-shockwave-flash
timotimo huh? really?
it seems to have started a gnome medial player thingie in there
masak vendethiel: that's like saying "scaling problems" are an implementation issue :P
vendethiel masak: no, not really. You can reason about scaling problems 17:16
timotimo in chrome it starts a flash player
vendethiel callback hell is just a style problem
masak vendethiel: it's not that it's false, it's just not a very prescriptive statement.
timotimo then it just shows a white box
"movie not loaded..."
vendethiel masak: I'm just saying that "callback hell" is pretty irrelevant
moritz masak: my problem with "stories" is that they sounds very linear, and linear only covers the most common case 17:17
vendethiel just get better tools
timotimo ah, in chrome in an incognito window it works!
moritz R* JVM module precompilation fails for JSON::RPC::Clinet :( 17:18
perlpunks.de/paste/show/5380d464.7e2c.25e
timotimo i really should dig deeper into how the pyside thing works so that we could have a perl6 qt binding
moritz I guess that means that LWP::Simple precomp also failed, but I don't have that in my backlog
17:23 denis_boyun joined 17:24 denis_boyun_ left
moritz and rakudo-m precomp of LWP::Simple hangs 17:37
17:39 virtualsue joined
virtualsue o/ 17:40
moritz \o virtualsue
and JSON::RPC::Client precomp also hangs on rakudo-m 17:41
this is going to be lots of work, or a very sad star release
timotimo oh crap. 17:42
17:45 itz joined
colomon reactive programming talk was great. 17:54
jnthn++
17:55 Ben_Goldberg joined, BenGoldberg left, Ben_Goldberg is now known as BenGoldberg
timotimo agreed 17:59
masak vendethiel: "just get better tools" seems to occupy much of the industry right now. I find your dismissiveness of the problem unhelpful. 18:16
moritz: yes, me too. though I think of it as the trunk being linear, and the non-linearity being added in from the outside.
vendethiel masak: there are two problems. But for the style issue, really, there's not much more to that 18:17
masak moritz: compare aspect-oriented programming (with interesting concerns being added in through cutpoints) and literate programming (with the main loop being explained first, and details filled in piecewise)
vendethiel masak: for nodejs people, it's basically "it's getting hard to read". I created or contributed several alternatives because I disliked it too
masak vendethiel: I consider the style issue a fairly minor part of it. having many small disconnected functions on the same indentation level calling each other is just as bad, in my opinion. 18:18
vendethiel masak: not indenting your functions (which is not something requiring any tool) is not a suggestion I have either 18:19
generators are another solution, for JS land, and a very good one iomho 18:20
(well, much better to pyramid code or non-indented code :).)
vendethiel just realized perl6's a.&b is like C++'s a.*b 18:23
masak yes, generators are powerful enough to support the kind of story-based programming I'm thinking of. 18:24
vendethiel masak: that asks for a PoC of how a story would look like - I have a hard time grasping that, no prior experience
masak I'll try to put together a proof-of-concept. 18:25
it's not completely clear to me either at this point.
vendethiel usually likes discussing seeing how something would look like 18:26
(that's probably my not-academic side speaking here) 18:27
masak m: class C { has $.x = "functions"; has $.y = "concept" }; { sub neat($self) { say "yes, adding lexically scoped $self.x() and then using them as methods is a very powerful $self.y()!" }; C.new.&neat }
camelia rakudo-moar cb7743: OUTPUT«yes, adding lexically scoped functions and then using them as methods is a very powerful concept!␤»
masak vendethiel: no, I'm the same. I want to discuss things around a concrete example. 18:28
vendethiel masak: :), :)
18:28 anaeem1 joined 18:31 denis_boyun left 18:33 denis_boyun joined 18:37 anaeem1 left 18:39 anaeem1 joined 18:40 cooper joined, cooper left, cooper joined
timotimo now seems like a decent time to start work on a cairo binding 18:53
masak vendethiel: ended up writing this for stories: gist.github.com/masak/c3a638aa9eed83c1bf26 18:54
vendethiel: it's kind of rough, but should give an idea of what I'm envisioning. 18:55
vendethiel masak: reminds of cucumber testing :)
I'm really not a fan of natural language programming 18:56
(for I think they're bad :P)
masak same. 18:59
that's not my point.
it's just that I don't have a real syntax for this.
vendethiel masak: do you know cucumber ? 19:00
masak yeah, and I have the same objections to it as you seem to.
I would prefer my example to be much closer to method calls than it currently is.
moritz I think masak++ uses natural language as an example, but the "real thing" would probably be ordinary method calls, or so
masak *nod*
moritz feels a tiny bit creepy right now 19:01
masak :)
the main point is that a story is a sequence that threads together the actions of a user, an app and an outside environment.
hm, I think that's a nice way to put it, actually.
19:01 raiph joined
masak it's like in a two player game of chance. 19:01
vendethiel masak: what feels weird is that you're mixing what the app does and what the user does
masak actions are threaded together by two players and the dice. 19:02
vendethiel which seems to be what you want
masak vendethiel: that's the whole point.
vendethiel that doesn't seem very natural to reason about
masak creating a "dialogue" between those two. three, really.
vendethiel I wonder if there's literature about mixing both of these styles (push & pull)
masak well, how natural it turns out to be is what I'm really wondering.
vendethiel how hard can it be to reason about ? 19:03
masak vendethiel: Python generators mix push and pull. so it does happen.
vendethiel masak: I didn't mean in that sense
masak vendethiel: basically giving you something that's both an iterator and an observer at the same time.
I know it's a difference of scale.
but really, an application is both push and pull, too.
vendethiel outside of scale, it's just in your code
masak what I mean to capture is something like (a) human brains are good at stories, and (b) in most application code, the story aspect is lost or never even considered. 19:04
vendethiel you don't have any IO (where IO being interaction) with generators
masak you mean except in Python's implementation of generators, or...? 19:06
vendethiel well, generators might be push and pull
but with you're stories, as you said, you have 3 things, the app, the user, and the actions 19:07
masak s/actions/outside world/
such as "server was unreachable"
19:07 hoverboard joined
masak I guess the relationship is really user <--> app <--> world 19:08
vendethiel masak: "user clicks on 'DONE'" <- which part is that ?
user seems logical 19:09
masak yes.
timotimo m: enum Foobar <<:hello(-1) goodbye howareyou>>; say hello; say goodbye;
camelia rakudo-moar cb7743: OUTPUT«===SORRY!=== Error while compiling /tmp/vTv4XjXyGX␤Undeclared routine:␤ goodbye used at line 1␤␤»
timotimo m: enum Foobar (:hello(-1), "goodbye", "howareyou"); say hello; say goodbye; 19:10
camelia rakudo-moar cb7743: OUTPUT«hello␤goodbye␤»
timotimo m: enum Foobar (:hello(-1), "goodbye", "howareyou"); say +hello; say +goodbye;
camelia rakudo-moar cb7743: OUTPUT«-1␤0␤»
timotimo mhm
masak timotimo: first one should work, no?
raiph masak: have you explored seaside's web site/ui flow control mechanisms? 19:11
masak raiph: no! but clearly, I should.
raiph: I've only been vaguely aware of seaside.
timotimo masak: according to specs, yes
masak: nagare is similar, but in python if you prefer to look at something written in python instead 19:12
masak raiph: I'm a bit wary of doing everything through continuations, though. it has... drawbacks.
timotimo: thank you.
19:14 Vlavv left
raiph masak: I just recalled the continuations stuff from way back when and thought it might be interesting to at least research how it's panned out 19:18
timotimo so ... which type most closely matches a "binary blob of data i could feed to cairo to use as raw pixel data"? is that a Blob?
masak timotimo: think so. 19:19
m: Blob; say "alive"
camelia rakudo-moar cb7743: OUTPUT«alive␤»
19:19 darutoko left
masak timotimo: a Blob is an immutable Buf. 19:20
raiph masak: seaside's use of callbacks: www.seaside.st/documentation/call-and-answer
masak looks 19:21
by the way, my thoughts today about stories may have been triggered by some ideas sjn++ had once that he told me about. I'm not sure exactly how close his idea was to mine, but I think it may have inspired mine. 19:22
19:22 thundergnat left
masak now that I think about it, I think a story-based layout of a program can be achieved with today's technology; maybe using promises, for example. 19:23
timotimo are our bufs mutable by now? >_>
19:24 kaare_ left
masak m: my $buf = Buf.new(1, 2, 3); $buf[1] = 42; say $buf 19:24
camelia rakudo-moar cb7743: OUTPUT«Cannot modify an immutable Int␤ in method assign_pos at src/gen/m-CORE.setting:1794␤ in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:2494␤ in block at /tmp/AEiET9agY6:1␤␤»
masak no :/
timotimo mumble mumble 19:25
19:26 hoverboard left 19:27 Vlavv joined
timotimo say False ~~ Cool 19:28
m: say False ~~ Cool
camelia rakudo-moar cb7743: OUTPUT«True␤»
timotimo something cool about having a parameter "Cool $stride"
19:29 itz left 19:32 FROGGS joined 19:35 itz joined 19:38 bjz left, bjz joined
timotimo when i return a failure from a sub and the result isn't caught, it gets sunk and the exception gets thrown, right? 19:49
m: sub tias { return Failure.new("omg") }; say "before"; tias; say "after" 19:50
camelia rakudo-moar cb7743: OUTPUT«before␤No such method 'throw' for invocant of type 'Str'␤ in method sink at src/gen/m-CORE.setting:12841␤ in block at /tmp/0jx2Eq1BCq:1␤␤»
timotimo m: sub tias { fail "omg" }; say "before"; tias; say "after"
camelia rakudo-moar cb7743: OUTPUT«before␤===SORRY!===␤omg␤»
timotimo excellent
(lack of stack trace: not so excellent
but we'll get there)
19:55 hoverboard joined 19:58 japhb joined
timotimo m: enum Foo::Bar <hello goodbye>; say hello; 20:03
camelia rakudo-moar cb7743: OUTPUT«hello␤»
timotimo hooray, a black square png file 20:06
dalek kudo/nom: dca1724 | (Tobias Leich)++ | src/core/IO.pm:
fix copy&pasto about .IO.s and .IO.z
20:11
timotimo duh! i could have spotted that! :D 20:12
FROGGS++ # good optimization
this ought to shave off a bunch of time for directory.contents, right? 20:13
FROGGS yeah
yoleaux 11:52Z <lizmat> FROGGS: looks like your changes break t/spec/S16-filehandles/filetest.t , at least on moar
11:54Z <lizmat> FROGGS: "doesnotexist.t".IO ~~ :z dies rather than returning False
12:02Z <timotimo> FROGGS: other than the failures, good eye for optimization, those 40% will really mean a lot
13:14Z <lizmat> FROGGS: .z is now fixed, but .s seems to always return 0
FROGGS still, 1m11s to run Build clean is kinda too much :/
lizmat++ # btw
timotimo "Build clean"? 20:14
i don't know what that refers to
how do i set a private attribute of a foreign object that's of "my" class again? 20:16
neither $other!attribute = nor $other!$attribute = seem to work
vendethiel timotimo: (you don't ! or you write a setter) 20:18
(that's a terrible feature of c++, btw ...)
timotimo this is for my "new" method >_> 20:20
20:20 araujo joined, araujo left, araujo joined
timotimo well, now i have a BUILD instead. 20:21
FROGGS timotimo: it is supposed to remove all *.moarvm from v5/*
but right now it just was all dirs/files
timotimo ah
yeah, that's not so nice :(
FROGGS and that takes 1m11s, without actually deleting a file
vendethiel timotimo: I don't think you should be able to specify it from outside of bless() :/ 20:22
timotimo i wonder how much time we pay for doing the $test thingie
FROGGS timotimo: wouldn't nqp::bindattr do the trick?
timotimo the none(".", "..")
FROGGS I dunno
timotimo FROGGS: that's not Perl 6 :)
FROGGS I know :o) 20:23
20:34 colomon left 20:47 ajr_ left 20:51 hoverboard left
masak timotimo: you can use a private method. 20:59
21:00 prevost joined
masak m: class C { has $!priv; method !update-priv($value) { $!priv = $value }; method update($other, $value) { $other!update-priv($value) }; method spill { say $!priv } }; my $x = C.new; my $y = C.new; $x.update($y, 42); $y.spill 21:01
camelia rakudo-moar cb7743: OUTPUT«42␤»
timotimo :\
masak has, over the past year or so, come to the conclusion that private attributes are not worth it
or, to be more exact, that information hiding belongs on an abstraction level that's larger than object/class. 21:02
vendethiel well, private attributes are cool for implementation details 21:03
timotimo mhh
masak I'm not against privacy as such. but privacy as it's implemented in most languages fails to answer the question "who are we hiding this from?" -- and then you get all these ridiculous hoops you jump through when it turns out you're someone the attributes shouldn't have been hidden from. 21:05
case in point: what timotimo just wanted.
my currently favored solution: make everything public by default, greatly simplifying the way objects work. hide stuff on the API level.
vendethiel my currently favored solution: private is the default. Start with private. 21:06
if you need to make something part of the API, make it public.
masak that's the way Perl 6 does it.
vendethiel how so ?
masak $!x is the default.
vendethiel how is it the "default"?
masak if you want to expose it, you do $.x or you add a method.
vendethiel yeah, so I don't see how it's a "default". You don't need to *add* something to make it public 21:07
masak it's the default because $.x is $!x plus an auto-generated accessor.
it's the default because the MOP only ever talks about $!x
vendethiel but that's irrelevant to the code I type
if I type $.a or $!a it's the same amount of code
masak it's the default because $!x is the actual storage location, and $.x is something that uses $!x
vendethiel one is not "the other + something else" in terms of code
yeah I agree, but for me a default is a derived case, so syntactically it has to be based on the previous case 21:08
masak it's the default because community best practices advise (or should advise) to create a $!x unless you already know you need a $.x
the interesting thing from a historical perspective is that we arrived at this set of features gradually, over the years. 21:09
21:09 raiph left
vendethiel then we disagree on what "default" is, I don't include "community best practices" here 21:09
timotimo a white square on black background \o/
masak well, I listed all the ways I could think of that a thing like this could be the default.
oh, and maybe one more: if you write 'has $x' for some reason, you get 'has $!x'
vendethiel masak: this one is correct ! 21:10
masak heh.
vendethiel that does seem like a default, definitely
masak but don't do that.
21:12 anaeem1 left
timotimo now that i can fill & stroke colored rectangles and write them out to png, i should release the first "version" of Cairo 21:18
masak timotimo++ 21:24
dalek osystem: fd5edb0 | (Timo Paulssen)++ | META.list:
add GTK::Simple and Cairo to ecosystem
masak interesting post about why scaling kindness is difficult: rs.io/2014/02/26/why-online-communi...-time.html
21:43 itz left 21:51 Sqirrel left
timotimo i'm not sure how to handle this: 21:52
i have a package GTK::Simple and a package Cairo
in GTK::Simple, i'll have a GtkDrawingArea that has a method that'll be called with a Cairo context 21:53
which is just class cairo_t is repr('CPointer')
how do i manage this without explicitly pulling in Cairo as a dependency? :\
if i have a second class cairo_t is repr('CPointer'), would that be accepted in these methods? 21:54
21:55 kurahaupo joined
sjn masak: stories? 22:00
22:01 Ben_Goldberg joined, BenGoldberg left, Ben_Goldberg is now known as BenGoldberg
vendethiel masak: I don't know, I don't manage so big communities 22:04
masak: is there an issue with the perl 6 community ;) ?
22:06 volodin661 joined
masak sjn: something about journalistic aspects of programming. 22:06
sjn: about a year ago or so.
vendethiel: decidedly not. but I'm pre-emptively learning about the scaling properties of communities. 22:07
volodin661 perl6: @aaa=8,78,9,0,6; say min @aaa;
masak vendethiel: so far what I've got is basically "seeding the community with the right stuff is extremely important -- but there is only so much you can do after certain tipping points"
camelia rakudo-{parrot,jvm,moar} dca172: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Variable '@aaa' is not declared␤at /tmp/tmpfile:1␤------> @aaa⏏=8,78,9,0,6; say min @aaa;␤ expecting any of:␤ postfix␤»
..niecza v24-109-g48a8de3: OUTPUT«===SORRY!===␤␤Variable @aaa is not predeclared at /tmp/tmpfile line 1:␤------> <BOL>⏏@aaa=8,78,9,0,6; say min @aaa;␤␤Variable @aaa is not predeclared at /tmp/tmpfile line 1:␤------> @aaa=8,78,9,0…»
masak volodin661: 'my @aaa' 22:08
vendethiel volodin661: missing that `my`
22:08 spider-mario left
volodin661 my @aaa=1,4,5,68,0,9; say min @aaa; 22:08
vendethiel volodin661: also, if you're not interested in comparing implementations, I'd suggest using `m:` (for rakudo-moar)
masak: mmh, I don't know
22:09 Sqirrel joined
vendethiel masak: I actually think youtube is a great community for its size, you just have to know where to look for 22:09
sjn masak: ah, yes
vendethiel which is what the article is saying with "get smaller subreddits", i guess
sjn more than a year ago; I pitched it first at a Perl 6 hackathon in Oslo :) 22:10
think it was in 2011
22:10 raiph joined
sjn masak: "Journo-literary programming" :) 22:10
masak sjn: ah, yes. 22:11
vendethiel masak: even only on github, I find stupid people and I get insulted :'(.
sjn crazy ideas
vendethiel (well, I'm *very* active on github, so that's probably not the average, but it still is bad enough when you're trying to help)
masak sjn: I like the intersection between literature/prose and programming. it makes a lot of sense. 22:12
vendethiel ^ +1
masak: maybe you need to fragment your community to keep it heartful ?
masak vendethiel: well, programming languages sorta-kind have that, with modules and frameworks and stuff. 22:13
vendethiel masak: yeah, definitely.
masak (aka "#moose and #catalyst are very friendly channels, too")
22:13 Rotwang left
masak but I'm not sure that leaves much hope for things like #perl or #perl-help 22:13
vendethiel I think you really ought to be strict in the beginning. 22:14
Don't leave people be anonymous. Don't leave them starting on a wrong path, either...
That's tremendously hard. No idea how to do it properly, and nobody else seems to know either ...
masak that's why community crafting is interesting. it's still very much experimentation and exploration. 22:15
vendethiel oh, definitely.
22:15 ren1us joined
vendethiel masak: I'm on a lot of (node) JS repos on github, and even if I'm not contributing, I always try to help where I can, but sometimes people just can't be dealt with : i.imgur.com/hJcSb4Y.png 22:16
ren1us When Rakudo tells me that "Slurpy positionals with type constraints are not supported," is that really saying that they are not supported YET or just plain not supported?
vendethiel ren1us: if it says sorry, then it's a "not yet" :P 22:17
ren1us Awesomeness.
vendethiel masak: I think programming is pretty okay in general 22:18
masak: (except for hacker news. I hate it)
masak vendethiel: written discussions on the internet between people who have never met is risky. it's all too easy to assume bad intent even on something that isn't badly meant.
escalating things pretty quickly most of the time. 22:19
vendethiel masak: yeah, and even worse, not everybody speaks correct english
masak I bet it's something about "I've never met this person, how dare they speak to me like that"
vendethiel I'm french, pretty young, and when I read what I wrote back in 2008, it was pretty horrible, and I could not convey the point clearly
masak :)
we're all on some Path or other...
vendethiel so it's even easier to misunderstand somebody when they're not native 22:20
masak aye.
vendethiel and that's why I use a *lot* of smileys. I know some people look down on it like "kiddo", but I really think it's important
masak sometimes, yes.
that's why they were invented, after all.
vendethiel
.oO( Emoji driven community )
22:21
masak: on coffeescript/#coffeescript, we sometimes have people that are pretty hard to deal with, but they're mostly "jelly trolls" :P 22:23
like #perl6 has pseudo-elitist-perlists, we have pseudo-elitists-jsers
masak (╯°□°)╯︵ ┻━┻ 22:24
┬──┬ ¯\_(ツ)
vendethiel hehehe 22:25
masak vendethiel: have you been here long enough to have experienced the "hugging trolls" effect?
oh, you know au, so yes.
vendethiel ha
masak: oh, yeah, I have. I just respond normally. Just answer seriously to their trolling, or to the little serious part :-)
masak I answer seriously to everything. 22:26
vendethiel masak: have you read that ? gist.github.com/quchen/5280339 #haskell hugging trolls.
masak I have :)
it's a good example :)
BenGoldberg . o O (National give a troll a hug day)
vendethiel I especially like " Iceland_jack . o O ( feels like Haskellers would invite Jehova's witnesses in for tea just to proselatize Haskell to them )" 22:27
22:29 Ben_Goldberg joined, BenGoldberg left, Ben_Goldberg is now known as BenGoldberg
raiph masak: "Online communities are just like vampire bats sharing blood" 22:30
masak fsvo "just like" 22:31
but yeah, I noticed that one too :P
I guess the important point was the prisoner's dilemma stuff
22:32 dmol left 22:33 Sqirrel left 22:34 Sqirrel joined, Psyche^ joined
vendethiel masak: I don't know. You're certainly not caring about people you're not gonna see again, but then ... 22:36
This is something we should/could fix, isn't it ?
22:38 thou left
raiph masak: "There’s no incentive not to defect [at] the end of [a] relationship,. ... That’s what happens in large internet communities. ... I have no real incentive to be polite or to put much effort into anything I say. Even my reputation will remain intact – who’s going to witness it?" seems off to me, to put it mildly 22:39
-
22:40 Psyche^ left
vendethiel raiph: why so ? That's what happens, though, no question : people don't care because nothing is going to happen next. 22:41
Even when youtube integrated G+ comments, at first, people expected the interaction to be friendlier since people had their name on public display etc ... but no
masak well, the prisoner's dilemma thing has a ring of truth to it. but it's certainly not the whole story. 22:43
raiph my quibble is with the last bit -- "who's going to witness it?"
masak the "people tend to read you the wrong way and respond defensively or aggressively" thing mentioned above also explains some things.
raiph: yeah. 22:44
22:44 Sqirrel left
vendethiel raiph: can you explain why you disagree ? 22:44
masak raiph: one thing I've learned that seems to work well in online games is to make people invest time and energy in their character. after that, banning them carries an actual cost; the loss of that investment.
which I guess translates to helping people contribute usefully somehow to a language community, so that they won't go burn up that investment. 22:45
vendethiel masak: I've seen a lot of stuff. But usually, you really have to go far to get somebody banned out of a game, even for 3 hours
masak: other games try to have player judge other players, and it just doesn't work :(
raiph i think the game theory view is spot on
22:48 virtualsue left 22:50 kurahaupo left 22:53 BenGoldberg left 23:01 Sqirrel joined
ren1us vendethiel: I think the inherent problem with player judges is that it assumes that the average person is going to be fair. In reality, the average person, given anonymity, will usually try to unleash their inner badness. Even if the person being judged is a great guy, given the opportunity, people will choose anonymous cruelty. 23:06
It's cathartic. 23:07
vendethiel ren1us: I think "inner badness" is a pretty bad way to consider it; they'll just take the time to feel powerful
I agree that it's cathartic tho
ren1us I have a nasty theory that when decent players just stomp all over weaker or less experienced players, it traces to insecurity. I think that it's especially true if someone feels the need to use mods or hacks to "win". Sure, maybe you smashed someone's pixels, but what is there to be gained from it that's worth going to the time, effort, and desperation of cheating? 23:10
I think it's because people have a need to feel validated somehow, and unfortunately, that need can appear to be fulfilled by somehow "beating" someone in a game. The resulting flame wars and trolling are just trying to milk that validation of worth. 23:11
vendethiel ren1us: the idea of "triumph without peril brings no glory" is not new :) 23:12
ren1us But the problem I often see whenever I'm playing games online is, people will seek out the triumphs that require no peril, then claim glory. 23:13
23:13 denis_boyun left
vendethiel ren1us: but what people show and what they really feel happens to be very different 23:13
well, later, because for 12 years old, it's the same
ren1us And that's part of a bigger concern, then. If all of these people are desperate for that validation/glory, and they act like they've achieved glory, but they still feel that emptiness, then the need can build up and lead to more and more misbehavior, among other things 23:15
And in some cases, when violence in a game just isn't giving the required fulfillment, people may try a more... realistic attempt? 23:16
vendethiel ren1us: and then the bigger concern is why society makes us feel like we need to be validated
etc, etc, that's going a bit too OT anyway :)
ren1us: no, definitely not. I won't leave anybody say "violence in a game can lead to violence IRL" 23:17
23:18 effbiai_ left
masak well, it's kind of fascinating how few hard facts we still have about how best to (a) learn, and (b) form groups where the sum is somehow better than its parts. 23:19
ren1us vendethiel: Oh I didn't mean it like that. In fact, I think that having a game to act as another outlet reduces violent tendencies, for the most part. I do, however, think that regardless of the original medium, if someone's attempts to be validated continue to fail (ie: If they get no positive reinforcement for hard work at a job), it has the tendency to cause a more drastic attempt. 23:20
vendethiel ren1us: I disagree, strongly.
ren1us: as I've seen (and I've managed game servers with 2 to 10k concurrent players); if people can't get validated by their plays, they'll just pretend.
They'll pretend, they'll taunt other people by pretending they know everything, and they'll get happy off that 23:21
(that's really my only experience with that bigcommunities, and players are the worst kind to handle imho ...) 23:22
ren1us vendethiel: I've always found that, if someone doesn't really get the reaction they've been pursuing, they have a tendency to try harder and harder to get that reaction. Like, if someone PKs another player, and nothing happens, they'll then try to PK more players, or PK people who are doing more important/difficult things, ie making themselves more and more of a nuisance until they get a reaction 23:24
to validate that they're having an effect
vendethiel yeah, but that's on the same scale
ren1us I also find that any time I need to reaffirm my distaste for people, all I need to do is play a game with a small community and a pvp aspect. Works every time. 23:25
masak ren1us: "the definition of insanity is trying the same thing again and expecting a different result" -- by what you're saying (and much of my experience), it's not just the definition of insanity, it's pretty standard behavior. 23:34
masak stops trying to stay awake :) 23:40
'night, #perl6
vendethiel 'night :) 23:42
timotimo gnite 23:50
23:53 BenGoldberg joined 23:54 raiph left 23:58 woolfy joined