Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-09-10

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:06 dayangkun joined #perl6
00:37 [Coke] joined #perl6
00:38 [Coke] huh. couldn't reattach to my screen. had to start a new one.
00:38 [Coke] (on feather)
00:52 sorear [Coke]: I think feather was rebooted recently, I had to restart dalek
00:53 diakopter I had to touch /etc/apache2/httpd.conf
00:57 scott__ joined #perl6
01:07 FROGGS__ joined #perl6
01:14 bluescreen10 joined #perl6
01:16 hypolin joined #perl6
01:19 FROGGS joined #perl6
01:25 Circlepuller joined #perl6
01:25 benabik joined #perl6
01:35 popl joined #perl6
01:39 MikeFair What's the distinction between $/ and $_?
01:39 MikeFair in Actions.pm
01:39 MikeFair oh wait nm
01:39 MikeFair I think I see it now
01:40 MikeFair $_ is being used inside a loop
01:40 MikeFair $/ is still referencing "the thing that got passed in"
01:49 woosley joined #perl6
02:00 yarp joined #perl6
02:13 OuLouFu joined #perl6
02:17 dayangkun joined #perl6
02:25 Targen_ joined #perl6
02:55 xinming joined #perl6
02:59 gongyiliao joined #perl6
03:09 xinming joined #perl6
03:15 hlin_ joined #perl6
03:19 nick joined #perl6
03:23 xinming joined #perl6
03:38 fgomez joined #perl6
03:43 fgomez joined #perl6
03:51 Khisanth joined #perl6
03:54 thou joined #perl6
04:22 kaleem joined #perl6
05:03 kaleem joined #perl6
05:29 xinming joined #perl6
05:36 moritz good morning
05:36 TimToady o/
05:43 wtw_ joined #perl6
05:52 sorear o/
05:53 diakopter o/
05:56 tadzik o/
05:56 __sri o/
05:56 diakopter heads up seven up
05:57 * diakopter wonders if the europans know what that is
05:58 diakopter ...doubtful
05:58 FROGGS I know 7up as a softdrink
05:59 tadzik I thought it's something that Snow White says to the dwarves in the morning
05:59 diakopter it's a classroom game for ages 6-9 ish
06:00 kaleem joined #perl6
06:00 diakopter oh look, a wikipedia article on it
06:00 diakopter kids put their heads down so they can't see and raise their arms
06:00 diakopter with thumb out
06:01 diakopter the o/ o/ o/ o/ reminded me of it
06:01 diakopter http://en.wikipedia.org/wiki/Seven_Up_(game)
06:09 marmay joined #perl6
06:39 leont joined #perl6
06:53 dayangkun joined #perl6
06:58 hypolin joined #perl6
07:01 masak good 莫宁, #perl6
07:01 masak :)
07:02 tadzik hello masak
07:05 Timbus nín hăo
07:06 Timbus (i only know pinyin :( )
07:06 masak not bad.
07:07 masak the pinyin for 莫宁 is "mò níng", by the way.
07:07 Timbus hah
07:07 masak seems to be a sound loan meaning "mourning" :)
07:08 leont joined #perl6
07:08 Timbus i figured it would be more useful to speak the language, then later on, spell it. still working on the first half
07:10 * sorear misreads 莫宁 as
07:10 * sorear misreads 莫宁 as 漢字
07:11 scott__ 莫宁 as  morning
07:12 sorear masak: mourning or morning?
07:13 brrt joined #perl6
07:13 masak sorear: "mourning", according to Google Translate.
07:13 masak sorear: or "Mornington".
07:14 sorear .oO( who are we mourning? )
07:15 Su-Shee the morning.
07:16 brrt o/ p6
07:16 scott__ good 莫宁,  good morming
07:17 moritz \o
07:17 masak o/
07:18 sorear scott__: hi!  I think you are new here?
07:19 scott__ 早上好!
07:21 scott__ sorear: yes i am new
07:21 masak welcome, scott__ who is new!
07:22 scott__ me
07:22 masak rn: say "the machines greet you too"
07:22 p6eval rakudo f48867, niecza v21-1-ga8aa70b: OUTPUT«the machines greet you too␤»
07:22 moritz nr: say "welcome, ", "scot_".comb[0, 1, 2, 3, 3, 4, 4].join
07:22 p6eval rakudo f48867, niecza v21-1-ga8aa70b: OUTPUT«welcome, scott__␤»
07:23 FROGGS__ joined #perl6
07:23 scott__ i came here half year. but not talks.
07:23 FROGGS joined #perl6
07:24 domidumont joined #perl6
07:24 masak scott__: we call people who hang around but say nothing "lurkers". so you just de-lurked :)
07:24 sorear hmm. '早上好' we have a regular whose name starts with a 早.
07:25 masak we do?
07:26 scott__ sorear: yes i am a lurker.
07:26 masak not any more.
07:28 sorear ah, I was thinking of 卓明亮
07:28 sorear not the same character
07:28 hypolin joined #perl6
07:29 scott__ ’早上好‘ not is a name. this is 'good morning'
07:30 masak sorear: that makes a lot more sense. I don't think 早 is a common family name.
07:30 sorear masak: JimmyZ
07:31 FROGGS o/
07:31 sorear and I found the correct spelling ^
07:31 sorear someday I'll find tuits to finish learning, maybe...
07:31 sorear there's just so much to learn in the world
07:31 sorear I'll never finish!
07:32 masak sure you will :)
07:32 shachaf Come on, what's wrong with Finnish?
07:33 * sorear heads back to "How to Prove All NP Statements in Zero Knowledge"
07:33 masak sorear: yes, I know that's JimmyZ's name. I sometimes greet him with it on the channel.
07:33 * shachaf ought to learn Finnish.
07:34 scott__ masak: your chinese is very good.
07:35 scott__ masak: chinese is your first language?
07:36 masak scott__: heh.
07:36 sorear masak's first language is Swedish.
07:36 sorear he does speak impeccable English though
07:36 sorear in real time, too
07:36 masak scott__: first, thank you. second, no, my Chinese isn't very good. :)
07:37 masak scott__: 我学习普通话了近两年。
07:37 masak did I get that right?
07:38 * masak , as usual, feels very uncertain bout the plcement of the 了
07:38 scott__ masak: 'good 莫宁' chinese people will spelling this wrong word.
07:38 sorear I recognize about 6 characters from that
07:38 masak scott__: yeah. it was meant as an inter-language pun.
07:39 scott__ but, wo know it
07:40 masak sorear: Wǒ xuéxí Pǔtōnghuà le jìn liǎng nián. "I study Mandarin [LE] nearly two year." you should be able to map that to the hanzi.
07:42 leont It's all Chinese to me!
07:42 scott__ masak: you study chinese in china? i study english in school manay years,
07:42 scott__ bu my english is bad.
07:43 sorear masak: I notice a conspicuous lack of 二.
07:43 hoelzro that's liang!
07:43 moritz scott__: it's all just a matter of practice
07:43 leont School was not a good place to learn languages for me, immersion worked better
07:43 masak scott__: no, I 在乌普萨拉 studied
07:44 masak scott__: 瑞典
07:44 scott__ moritz: yes, i not speak english.
07:44 * masak still remembers perlhack with fondness
07:45 scott__ i only read same e book.
07:45 sorear I studied Japanese in school for 1.5 years, I'm doing my best to pretend I know Chinese
07:45 renormalist spacebat: re cperl-mode: https://github.com/jrockway/cperl-mode contains several branches. The "perl6-pugs" and "mxd-perl6-merge" contains my work and the merge of my work with Jonathan Rockway's MooseX::Declare features.
07:45 masak sorear: as long as you don't call the hanzi "kanji", you should be fine :P
07:46 scott__ sorear: some chinese and japanese is like.
07:46 renormalist spacebat: the issue is that my perl6 changes are based on the original cperl-mode from Ilja Zakharevich who targeted XEmacs.
07:47 renormalist spacebat: whereas jrockway used the version contained in GNU Emacs as base.
07:47 sorear masak: I just call them 漢字, that way everyone is happy.  except maybe the DPRK folks who abolished them from curricula and would prefer I use hangul
07:48 renormalist spacebat: I think the upstream version based on GNU Emacs works better with GNU Emacs, but I never got around to it to finally rebase that all to GNU Emacs.
07:48 hoelzro masak: you prefer simplified? =(
07:48 Su-Shee hmmmm.. perl 6 and contiuations? how about that?
07:49 Su-Shee conti-nu-ations.
07:49 masak hoelzro: not so much "prefer" as "use most of the time".
07:49 moritz Su-Shee: gather/tkae and lazy lists+map are continuations, sort of
07:49 moritz Su-Shee: though not serializable continuations
07:49 hoelzro simplified makes me sad
07:49 sorear Su-Shee: gather/take exposes the full power of *one-shot* continuations
07:50 masak hoelzro: I can see how it may make some people sad. I try to keep all options open by learning the historical hanzi, too.
07:50 Su-Shee moritz: I'm seeing more web frameworks implemented in "CPS" style recently, so I'm starting to wonder...
07:50 renormalist spacebat: it somehow works "ok" but it also has some known issues, eg. single character variable with twigils $.y seems to start a regex (same as tr///).
07:51 hoelzro masak: if you don't mind my asking, how do you keep your Mandarin "fresh"?
07:51 renormalist spacebat: summary: please try cperl-mode and if nothing else report the issues. but ideally you find someone (eg., yourself) who can contribute.
07:51 hoelzro I studied it for two years at Uni, but I've forgotten so much of it =(
07:51 masak hoelzro: basically, I don't. :/
07:51 masak hoelzro: I've also forgotten loads.
07:52 masak going to China in October, though. my plan is to pick up my old study books and refresh things a bit.
07:52 Su-Shee I was so proud when I understood an ironic "is that so?" in "house of the flying daggers".. ;)
07:52 hoelzro whoa, cool!
07:53 scott__ masak: you first study say chinese,but i first study read englsih.
07:53 masak scott__: I studied both reading/speaking at the same time.
07:54 masak Su-Shee: Chinese *and* irony? really?? :P
07:54 sorear house of the flying daggers... sounds like a parliament building.
07:54 scott__ masak:you have some chinese friends, talk to you?
07:55 Su-Shee masak: well it's shi ma basically and it was pretty clear by the look on her face.. so.. :)
07:56 masak scott__: 是的
07:56 Su-Shee sorear: it's a movie by the same director as "hero"
08:04 scott__ if everyone like study chinese. contact me use google talk.
08:04 scott__ my first language is chinese.
08:05 fhelmberger joined #perl6
08:05 masak scott__++
08:06 scott__ gll357542917@gmail.com
08:06 sorear scott__++
08:06 moritz always easy to remember, those addresses :-)
08:09 sorear it's in the logs :-)
08:19 Psyche^ joined #perl6
08:30 marmay joined #perl6
08:34 fhelmberger joined #perl6
08:40 dakkar joined #perl6
08:46 HarryS joined #perl6
08:53 kresike joined #perl6
08:53 kresike good morning all you happy perl6 people
08:55 masak good morning, kresike! \o/
09:03 sorear o/
09:17 spider-mario joined #perl6
09:26 brrt joined #perl6
09:49 jaldhar joined #perl6
09:52 snearch joined #perl6
09:56 daxim joined #perl6
10:06 marmay joined #perl6
10:26 eiro joined #perl6
10:36 topo joined #perl6
10:41 xinming joined #perl6
10:45 mscha joined #perl6
10:58 mscha perl6: "hello, world!".tc.say;
10:58 p6eval rakudo f48867: OUTPUT«No such method 'tc' for invocant of type 'Str'␤  in block  at /tmp/arm980YOeM:1␤␤»
10:58 p6eval ..niecza v21-1-ga8aa70b: OUTPUT«Hello, world!␤»
10:59 mscha Is there, or will there be, a method that transforms "hello, world!" into "Hello, World!"?  (I.e. title case each word?)
11:00 moritz yes
11:01 moritz perl6: "hello, world!".capitalize
11:01 p6eval rakudo f48867, niecza v21-1-ga8aa70b:  ( no output )
11:01 moritz perl6: say "hello, world!".capitalize
11:01 p6eval rakudo f48867, niecza v21-1-ga8aa70b: OUTPUT«Hello, World!␤»
11:01 moritz I don't know if the name is still correct under the new spec
11:04 Circlepuller joined #perl6
11:05 Su-Shee_ joined #perl6
11:06 mscha Thanks, that was just a little bit too obvious to think of. ;)
11:08 moritz http://doc.perl6.org/type/Str#wordcase # that's the new name
11:14 mscha That's even more logical.  :)
11:22 masak wordcase! \o/
11:23 masak I had missed that change. but I like the name.
11:23 moritz I think for now it would make sense to install wordcase as an alias for capitalize
11:23 moritz and then slowly adjust the functionality
11:24 masak +1
11:28 sergot hi o/
11:28 tadzik \o
11:29 xinming joined #perl6
11:29 masak sergocie! \o/
11:44 colomon joined #perl6
11:46 benabik joined #perl6
11:55 xinming joined #perl6
12:13 xinming joined #perl6
12:16 awwaiid Su-Shee, "I'm seeing more web frameworks..." what new ones do you mean that are using CPS style? Are any of them actually using continuations instead of explicit callback passing?
12:20 FROGGS__1 joined #perl6
12:22 masak awwaiid: as far as I know, http://www.seaside.st/ and http://www.seaside.st/ both use CPS as a core ingredient.
12:22 masak er, second link http://liftweb.net/
12:23 awwaiid they aren't using CPS, they're using actual continuations, if that makes sense
12:23 awwaiid but what I was actually fishing for was whether Su-Shee has seen _new_ web frameworks that use continuations or CPS
12:23 awwaiid I wrote Continuity (see cpan), so I try to track these things at least a bit :)
12:24 masak ah. I don't know any that fulfill those criteria.
12:24 awwaiid well I wouldn't be surprised if there were some nodejs frameworks that used CPS, since nodejs is a big ball of CPS
12:25 awwaiid and I keep watching for someone to build actual continuations into nodejs. I guess I have heard of people doing languages-on-js that have continuations, actually. But don't know if they then built a web framework
12:26 awwaiid I feel like continuation-based web frameworks are dying out in favor of just having client-side control flow
12:26 awwaiid s/dying out/have died out/
12:27 xinming joined #perl6
12:27 brrt where continuation based web frameworks ever a thing?
12:27 awwaiid well... when seaside was hot, but maybe I just surrounded myself by people who thought seaside was hot :)
12:28 awwaiid also one of the touted features of Arc (of Paul Graham, I think news.ycombinator.com is implemented in it) was it's server-side continuations good for makign webapps
12:29 awwaiid so... around when that was popular
12:29 brrt that is when we are talking about a /very/ small collection of hackers
12:29 brrt an tbh
12:29 brrt i never really got the point
12:29 brrt web apps are supposed to be about request -> response
12:31 awwaiid there is server side state though, in most web apps. continuations let you think of it as request -> response -> request -> response with lexical state carried in between each step :)
12:31 awwaiid more like writing a client application, like a command line apps
12:31 awwaiid but command line apps don't have back buttons and don't typically let you open new tabs in the middle of an operation... so yeah, doesn't map quite right
12:32 awwaiid really fun in any case though and I highly recommend you give it a try if you haven't :)
12:33 brrt i haven't :-) i just think that server-side state is a very dangerous tool too play with
12:34 awwaiid many powerful tools are also dangerous
12:35 FROGGS joined #perl6
12:38 awwaiid I have slowly devolved my server-side continuations style to not have a deep history. For the most part, I don't use it for more than keeping just one layer of lexical state. So I generate an HTML link (that expires after a while), and when that link is followed I execute something in the lexical scope.
12:39 PacoAir joined #perl6
12:39 awwaiid something like sub getDeleteLink { my ($self) = @_; return $self->addLink( 'Delete' => sub { $self->deleteClicked } ) }. All I'm really skipping is somehow serializing the state (the object/row ID typically) and then re-ifying it when processing an action.
12:40 awwaiid but when you completely skip that serialize/reify in all situations, no matter how complex, you get a taste of the benefit
12:40 Chillance joined #perl6
12:41 awwaiid the whole design approach ends up different. Anyway... not that I actually recommend it. But as I said, I do find it pretty fun :)
12:43 xinming joined #perl6
12:44 masak I'm still enthused about the "workflow" thinking that CPS affords. but CPS feels like too big a hammer for providing that.
12:44 * [Coke] yawns.
12:45 awwaiid masak, CPS, or actual continuations? :)
12:45 Su-Shee awwaiid: "meteor" (very new javascript) seems to go down the seaside-style route.
12:45 masak awwaiid: either, I guess.
12:45 Su-Shee awwaiid: http://meteor.com/
12:45 awwaiid Thanks, Su-Shee
12:46 masak awwaiid: for example, regex engines are perfectly capable of aborting and resuming execution mid-routine. I've implemented that without continuations or CPS.
12:46 jnthn Rakudo's parser entine manages that fine with plain old closures. :)
12:46 jnthn *engine
12:47 masak yeah. that seems more proportionate.
12:47 awwaiid masak, ah yes. They keep their state and know where to pick up where they left off. Just like all these server-side bits of web-apps
12:48 awwaiid though maybe not like that since the regex engine is still in memory, so doesn't have to serialize it's state or antyhing
12:48 masak I think it'd be interesting to use a language that could "fold" evenly-indented workflows into callback-based programs.
12:48 jnthn See the async/await stuff in C# 5
12:48 awwaiid masak, I think that's called an automatic CPS-transform
12:49 masak awwaiid: sure, it's in-memory, but it still needs to represent its current state somehow, even if it doesn't serialize it.
12:49 masak awwaiid: ooh; will check it out.
12:50 Su-Shee actually, for me it's about the concept/idea of this kind of web frameworks, not really whether it's done with continuations, closures or harry potter...
12:50 moritz .oO( web development with harry potter! It's magic! )
12:50 jnthn I once tried a web framework that did it with harry potter, but it was too magical for me.
12:50 xinming_ joined #perl6
12:50 awwaiid masak, there are a bunch of transformers for LISP that do that, but a more recent example are the js ones that do it that I mentioned above. Here is one that I just googled up but hadn't heard of, https://github.com/cperkins/js-cps
12:51 masak groovy.
12:51 masak yes, that's exactly what I meant.
12:51 atrodo joined #perl6
12:51 masak will look deeper into this. awwaiid++
12:52 jnthn masak: If you come along to Friday's event, I'll be doing a talk on the C# 5 CPS transform stuff they've added to the language.
12:52 Su-Shee the point is mostly the idea that every "item on a page" is a tiny objectlike thingie which connects to the server "itself" on one hand and a kind of implementation that makes templating and all this ajax stuff nicely wrapped into the language used.
12:52 masak jnthn: ok.
12:52 jnthn I've been looking at it and wondering how to do similar in Perl 6 :)
12:53 __sri meteor has absolutely no marketshare but $11M funding :)
12:53 moritz well, as a developer, I'd take $11M funding any day :-)
12:53 __sri their only plan is to keep developing the framework
12:53 awwaiid __sri, sounds like the business to get into!
12:54 __sri they literally, have no plan for making money
12:54 jnthn .oO( maybe spend some of the $1M on marketting... )
12:54 Su-Shee well I only took notice because it sounded very much like seaside's concept and seaside is _amazingly_ productive to use.
12:54 mucker joined #perl6
12:56 awwaiid Yeah Su-Shee, a js version of Seaside could certainly be killer, if only in terms of hipster-attractant
12:56 __sri server state is so out though
12:56 __sri now it's all syncing js between client and server with a direct connection from the browser to the database
12:56 Su-Shee awwaiid: well from what I've played around with so far, meteor seriously comes close...
12:57 awwaiid __sri I think that the database still counts as server state
12:57 __sri true
12:57 telex joined #perl6
12:59 __sri but in the end i don't think those single page apps will ever win
12:59 __sri personally, i like the latest trend back to more conservative architectures like pjax
13:02 __sri single page apps may go a different route though, if operating systems start allowing them to leave the browser
13:03 __sri they could kill a few native apps
13:04 obra_ joined #perl6
13:04 masak oh right, pjax.
13:04 fgomez joined #perl6
13:04 brrt no, don't do pjax
13:05 __sri yes, do pjax :)
13:05 brrt the problem with pjax is basically the callback problem
13:05 flussence seems like I'm in the minority these days - I'm one of those weirdos that still thinks JS should be to add features on top of a working site instead of a hard requirement :)
13:05 brrt flussence: i'm like that too
13:05 brrt no, seriously, pjax has Issues
13:05 __sri flussence: that's what pjax is all about!
13:05 brrt aside from the fact that it is Ugly in your server-side architecture
13:06 __sri the railscast is pretty good http://railscasts.com/episodes/294-playing-with-pjax
13:06 masak flussence: that seems to be what the unobtrusive JS trend is all about.
13:06 __sri brrt: doesn't have to be, in mojolicious it can be quite pretty
13:07 brrt __sri: there are a number of basic issues with pjax
13:08 __sri the difference between rendering a pjax response and a normal response is usually just a layout, which can be handled automatically
13:08 brrt that is one thing
13:08 brrt the other thing is, you load a piece of html into the page
13:08 xinming joined #perl6
13:08 brrt and it contains <script> tags
13:08 brrt when are they executed
13:08 brrt and what happens when they are
13:08 brrt and...
13:09 brrt what happens when they fail?
13:09 flussence that's all specced somewhere, lemme find it
13:09 moritz code never fails!!!111!!
13:09 brrt moritz :-D
13:09 brrt what happens when you timeout
13:09 * masak hugs moritz
13:10 brrt what happens if the <script> in the html fragment causes a network requests and it times out
13:10 brrt the fact that it is specified does not mean it will be used correctly
13:11 moritz brrt: all machines and all networks ar efast enough that they never timeout!!!
13:11 Su-Shee flussence: rich web apps aren't possible without javascript. I'm working for something which has an equivalent complexity of word or excel with a full blown gui - that's what I want and need to code _fast_ and _easily_. I'm not talking about a handful of interactions and some minor div overlay here and there..
13:12 moritz and yet gmail works fine without JS
13:12 flussence yeah, I get that those need JS. I see far too many sites using it for trivial things though. I've even seen a few that just dump markdown in the page then expect the client to render it...
13:13 brrt tbh, that is not even such a bad strategy
13:14 brrt going on the principle that all those clients have much more computing time than my few servers
13:14 Su-Shee flussence: OH GEE HOW COULD THEY ;) browsers are _amazing_ rendering engines these days, let's not use their capabilities! :)
13:14 masak one of the things I really liked about Jifty (back in the day) was that it seemed to fall back to a JS-less mode of everything, and without any code duplication.
13:15 Juerd flussence: What's the problem with requiring JS for trivial things?
13:16 Juerd It's present in EVERY practical browser.
13:16 Juerd It's no longer a matter of being compatible with software. Now it's about being compatible with people who for some reason don't trust the websites they visit.
13:17 masak there are lots of good reasons not to trust random JS on the web.
13:17 FROGGS Su-Shee: on my company-internal site I construct whole pages using JS just because the stuff I have to transmit is much much less this way
13:17 FROGGS that crap is working since IE6, so it works everywhere
13:18 masak &
13:18 xinming joined #perl6
13:19 tadzik . o O ( marquee loop )
13:19 moritz Juerd: there are non-browser user agents as well
13:19 moritz Juerd: and I disable JS by default, simply because too many sites use JS for intrusive nonesense
13:19 flussence That markdown thing is a good example - what's gained by making every client download a JS parser/HTML-iser and run it on every single page load instead of just doing it once and having the raw HTML on the server? It's not like disk space for caching formatted documents is costly...
13:20 Su-Shee flussence: and why send more than the actual data at all if you already send the client all rendering and behavioral gui directions it needs?
13:20 FROGGS__ joined #perl6
13:21 flussence .oO( and HTML, unlike manpages, doesn't suffer from the problem that rendered pages only work on one window width... )
13:21 bonsaikitten flussence: and you get insane scalability server-side for free
13:21 FROGGS joined #perl6
13:21 bonsaikitten flussence: newest performance hack btw, send a short html website and then use JS/Ajax to inject the rest of the content
13:22 * FROGGS hast kernel panic
13:22 FROGGS hates
13:22 bonsaikitten on low-latency links that sometimes works out
13:22 bonsaikitten FROGGS: haven't seen one in quite some time, what did you do?
13:22 Su-Shee bonsaikitten: so do I, because I'm not bothering to wrangle stuff through some templating parser engine first but send just data after some initial lines of code i've sent along...
13:22 FROGGS brand new dell laptop (with ssd hdd) and ubuntu
13:22 FROGGS I dont know whats wrong since there is nothing in the logs
13:23 FROGGS system just freezes
13:23 flussence meh, I'm not going to convince anyone
13:24 bonsaikitten FROGGS: any kinky drivers like nvidia?
13:24 FROGGS no, its intel gfx card
13:24 bonsaikitten flussence: I've been convinced a long time ago already
13:24 Juerd moritz: Non-browser user agents are not intended use, on most websites. Sites that intend to be usable for robots, provide some sort of API.
13:24 bonsaikitten FROGGS: ah, those can be fun ...
13:24 FROGGS it got better since the last 5 kernel updates though
13:24 flussence intel gpu drivers are pretty crash-proof nowadays
13:26 brrt flussence: i kind of wish back for the days of 'progressive enhancement' too
13:26 bluescreen10 joined #perl6
13:27 skids joined #perl6
13:28 _jaldhar joined #perl6
13:31 _jaldhar joined #perl6
13:32 awwaiid I've decided we're back in the days of client-server instead of thin-client :)
13:32 awwaiid round and round it goes
13:35 awwaiid hey this pjax thing is kinda similar to my server-side-dom-diff idea. Thought was to keep the dom on the server and client and then only send over what changed (or whole page if they can't handle diffs)
13:36 awwaiid I should patent my ideas and then go around charging people licensing fees
13:36 awwaiid (kidding)
13:36 FROGGS I'm doing something similar for a mobile "app"
13:36 FROGGS haha
13:37 moritz FROGGS: now you can sue awwaiid :-)
13:38 awwaiid I have documentation that I failed at a proof of concept in 2008!
13:38 awwaiid prior art
13:41 FROGGS awwaiid gets a beer when he is in berlin
13:41 awwaiid woo!
13:41 FROGGS its not much, but tasty ;o)
13:42 krunen joined #perl6
13:42 awwaiid Here is at least one reference, second paragraph from the bottom - http://thelackthereof.org/Hybrid_Approach_to_Templating (since I was four-years younger then than now, I can't say that I agree with old-awwaiid, mind you)
13:42 awwaiid unfortunately I was dumb and suggested that someone else had already throught of it. I would not make a good patent troll.
13:51 xinming joined #perl6
13:52 stopbit joined #perl6
13:55 flussence ooh, postgres 9.2 added a range type
13:55 cosimo awwaiid: opera mini has being doing that since 2006 :)
13:57 xinming joined #perl6
13:59 tadzik :>
13:59 moritz now you know who you can sue :-)
13:59 FROGGS__ joined #perl6
14:03 daxim flussence, I've been waiting for that
14:03 daxim now when pg 9.2 arrives at $ork is another question
14:04 moritz postgresql++
14:07 flussence I know I complain about my $dayjob being stuck on ancient code, but I might have a chance to get our production stuff off of pg 8.1 permanently by next week :)
14:10 sctt joined #perl6
14:11 awwaiid cosimo, ah yes! good point
14:11 brrt flussence: nice
14:11 flussence oh wow, someone pointed me to a thing in 9.3 that sounds awfully similar to an X metaop: http://www.postgresql.org/docs/devel/static/xfunc-sql.html#XFUNC-SQL-FUNCTIONS-RETURNING-SET
14:12 awwaiid pft. We're on perl 5.8.3 here
14:12 clkao joined #perl6
14:12 FROGGS joined #perl6
14:16 benabik joined #perl6
14:18 kaleem joined #perl6
14:18 GlitchMr joined #perl6
14:24 sctt joined #perl6
14:27 * __sri wants to see jobs like this for perl6 :) http://groups.google.com/group/scala-internals/browse_thread/thread/d66db739a4fe745e
14:31 * moritz wants to see that too
14:38 jnthn ooh :)
14:40 kaleem joined #perl6
14:43 dalek roast: 04d2c1d | moritz++ | S11-modules/import.t:
14:43 dalek roast: base tests for importing/exporting constants
14:43 dalek roast: review: https://github.com/perl6/roast/commit/04d2c1de22
14:46 FROGGS moritz++
14:48 FROGGS moritz: so I can export enums too?
14:48 * jnthn thought that already worked
14:48 FROGGS ohh, okay
14:49 moritz you can export enums, but it won't export their elems
14:49 jnthn ah...
14:49 jnthn Well, it will in terms of the long names of course
14:49 moritz r: module A { enum A is export <b c d > }; import A; say A::b
14:49 p6eval rakudo f48867: OUTPUT«===SORRY!===␤Cannot import symbol A from A, because it already exists in this lexical scope A␤at /tmp/c86V44qsrb:1␤»
14:49 jnthn But yeah, the short ones not.
14:49 jnthn haha!
14:49 moritz r: module Foo { enum A is export <b c d > }; import A; say Foo::b
14:49 p6eval rakudo f48867: OUTPUT«===SORRY!===␤Could not find module A to import symbols from at line 2, near "; say Foo:"␤»
14:49 moritz r: module Foo { enum A is export <b c d > }; import Foo; say A::b
14:49 p6eval rakudo f48867: OUTPUT«b␤»
14:50 moritz r: module Foo { enum A is export <b c d > }; import Foo; say b
14:50 p6eval rakudo f48867: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&b' called (line 1)␤»
14:50 FROGGS k
14:50 FROGGS got it
14:50 * jnthn wonders how to fix that one
14:50 moritz jnthn: who would I multi-dispatch to an enum?
14:50 moritz ie write a candidate that only triggers for an enum?
14:50 jnthn I think they always do a certain role
14:50 moritz r: enum A <b c >; say A.^roles
14:50 p6eval rakudo f48867: OUTPUT«No such method 'roles' for invocant of type 'Perl6::Metamodel::EnumHOW'␤  in block  at /tmp/7NrtvQCy0P:1␤␤»
14:50 jnthn r: enum Foo < a b >; say Foo.^roles
14:50 p6eval rakudo f48867: OUTPUT«No such method 'roles' for invocant of type 'Perl6::Metamodel::EnumHOW'␤  in block  at /tmp/Be_VN76xEg:1␤␤»
14:51 jnthn r: enum Foo < a b >; say Foo ~~ Enumeration
14:51 p6eval rakudo f48867: OUTPUT«False␤»
14:51 jnthn r: enum Foo < a b >; say Foo ~~ NumericEnumeration
14:51 p6eval rakudo f48867: OUTPUT«False␤»
14:51 jnthn curious
14:51 jnthn I wonder if the meta-object somehow treats those doings as an implementation detail or something
14:53 dalek Perlito: ab55266 | (Flavio S. Glock)++ | / (4 files):
14:53 dalek Perlito: Perlito5 - update Makefile (suggested by shlomif++)
14:53 dalek Perlito: review: https://github.com/fglock/Perlito/commit/ab55266859
15:01 kaare__ joined #perl6
15:02 jnthn hotel &
15:04 xinming joined #perl6
15:05 thou joined #perl6
15:06 sctt joined #perl6
15:17 FROGGS home &
15:25 xinming_ joined #perl6
15:39 leont joined #perl6
15:40 FROGGS__ joined #perl6
15:41 FROGGS joined #perl6
15:41 FROGGS hi there
15:50 kresike bye folks
15:56 benabik joined #perl6
15:56 tadzik home & :)
15:58 am0c joined #perl6
15:58 am0c_ joined #perl6
16:00 sjn o/
16:00 sjn is there a decent vim syntax highlighter for perl6?
16:01 tadzik it's linked somewhere on perl6.org
16:01 flussence nope, only the one we have :)
16:01 tadzik that too :)
16:01 atrodo joined #perl6
16:02 [Coke] flussence++
16:03 [Coke] Probably needs some love with all the spec changes since it was written.
16:03 brrt left #perl6
16:03 tadzik it needs to be less terribly slow, I'd say
16:07 flussence I don't envy the job of whoever ends up fixing it though, vimscript reminds me of intercal
16:07 fgomez joined #perl6
16:09 Su-Shee note to self: avoid intercal.
16:10 sjn hm :-\
16:10 tadzik :D
16:11 flussence r: say 70970/8382
16:11 p6eval rakudo f48867: OUTPUT«8.466953␤»
16:11 flussence wait, no...
16:11 flussence r: say 8382/70970
16:11 p6eval rakudo f48867: OUTPUT«0.118106␤»
16:11 flussence perl6.vim is 11.8% backslashes.
16:11 sjn heheh
16:14 tadzik w00t :P
16:14 * sjn wonders if this vim file could be generated somehow
16:15 sjn e.g. by introspecting perl6
16:16 flussence I had that idea once, but then I realised it'd involve writing a vimscript code generator and ran far away
16:17 sorear good * #perl6
16:17 FROGGS hi sorear
16:17 MayDaniel joined #perl6
16:25 sisar joined #perl6
16:57 TimToady GlitchMr: there is nothing like nextafter at the moment.  Is there a use case for it?  Can it be implemented portably?  Answers welcome...
16:58 TimToady oh, I see people talked about error bars
17:02 dalek std: 942bb1c | larry++ | STD_P5.pm6:
17:02 dalek std: allow TCLish -foo => bar form
17:02 dalek std: review: https://github.com/perl6/std/commit/942bb1cfc5
17:04 GlitchMr Portably? Doesn't everything today support floating point numbers?
17:04 GlitchMr If it can run JavaScript it should be fine
17:05 TimToady does the JVM support it?
17:06 TimToady I suppose anything that can look at the bits of an IEEE floater can in theory support it...
17:07 TimToady anyhoo, feel free to implement one in Perl 6 :)
17:07 GlitchMr JVM probably should support it...
17:07 GlitchMr But... I think that JavaScript does... oh wait... it does
17:08 TimToady the long float forms would be problematic on systems that lack that type
17:08 TimToady er, long double
17:12 jnthn The JVM don't support unsigned types natively, iirc.
17:12 jnthn Don't recall it doing long double.
17:13 fibo joined #perl6
17:14 diakopter correct & correct
17:15 fgomez joined #perl6
17:24 dalek std: cfe8d43 | larry++ | STD.pm6:
17:24 dalek std: don't translate ${0} to ${-1}, GlitchMr++
17:24 dalek std: review: https://github.com/perl6/std/commit/cfe8d43a58
17:30 GlitchMr :)
17:42 GlitchMr "allow TCLish -foo => bar form"
17:42 GlitchMr Also, isn't this the style which CGI.pm used?
17:46 geekosaur yes, but I think it lifted the style from perl/tk originally
17:46 geekosaur which used it for its tcl-ishness
17:47 GlitchMr Nice
17:47 GlitchMr I through that a => "b" is simply obsolete because it doesn't work
17:48 GlitchMr (but well, I would expect better error message)
17:48 GlitchMr Even if it would somehow work, it would be -"a" => "b". And - in Perl 6 doesn't work like - in Perl 5.
17:48 moritz well, it would be '-a' => 'b'
17:49 GlitchMr glitchmr@strawberry ~> perl -MO=Deparse -e'print -e => 2'
17:49 GlitchMr print -'e', 2;
17:49 GlitchMr -e syntax OK
17:51 moritz (in Perl 6, that is)
17:51 TimToady eval print +(-e => 2)[0]
17:51 buubot_backup TimToady: -e1
17:52 GlitchMr I know that => is just fat comma
17:52 GlitchMr (in Perl 5)
17:53 TimToady nr: say (-e => 2)[0]
17:53 p6eval niecza v21-1-ga8aa70b: OUTPUT«Unhandled exception: Cannot use value like Pair as a number␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /home/p6eval/niecza/lib/CORE.setting line 293 (Any.Numeric @ 6) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /tmp/vRyqhi1nkw line 1 (mainline @ 3) ␤ …
17:53 p6eval ..rakudo f48867: OUTPUT«Cannot call 'Numeric'; none of these signatures match:␤:(Mu:U \v: Mu *%_)␤␤  in method Numeric at src/gen/CORE.setting:713␤  in sub prefix:<-> at src/gen/CORE.setting:2371␤  in block  at /tmp/qeFmHoVzBo:1␤␤»
17:54 GlitchMr Why - has higher precedence than => anyways?
17:54 GlitchMr oh wait, it doesn't
17:54 TimToady foo => bar is parsed as a term when foo is a bareword
17:54 GlitchMr Well, I would expect that it would be negative e constant
17:55 TimToady but then it would have worked
17:55 TimToady nr: say ((-e) => 2).key
17:55 p6eval rakudo f48867: OUTPUT«-2.71828182878434␤»
17:55 p6eval ..niecza v21-1-ga8aa70b: OUTPUT«-2.7182818284590451␤»
17:56 TimToady nr: say (e => 2).key
17:56 p6eval rakudo f48867, niecza v21-1-ga8aa70b: OUTPUT«e␤»
17:56 TimToady nr: say (~e => 2).key
17:56 p6eval rakudo f48867: OUTPUT«No such method 'key' for invocant of type 'Str'␤  in block  at /tmp/MQ3g1LBGqh:1␤␤»
17:56 p6eval ..niecza v21-1-ga8aa70b: OUTPUT«Unhandled exception: Unable to resolve method key in type Str␤  at /tmp/CmQKzxsAie line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4138 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4139 (module-CORE @ 571) ␤  at /home/p6e…
17:56 GlitchMr Let me guess, magic in work
17:56 TimToady bareword=> is parsed as a term, as I said
17:57 TimToady so tighter than unary
17:57 GlitchMr So, bareword on left is tighter than anything else
17:57 TimToady that's what "is a term" means :)
17:58 TimToady well, that's what it means to me...
17:58 TimToady let us by all means be properly postmodern
17:59 GlitchMr Hmmm... if Perl 5 is postmodern, Perl 6 is postpostmodern?
18:00 geekosaur prefuturistic?
18:00 TimToady maybe it's postcontemporary
18:01 TimToady but I think it's probably just postmoderner, in spots
18:01 Su-Shee <gibson>unevenly distributed futuristic</gibson>
18:02 TimToady the postmodern is unevenly distributed in Perl 5  :)
18:03 GlitchMr I wonder how Perl would look if I would use BEGIN {} for every single statement
18:03 sisar a possible(?) usecase for nextafter: When plotting a graph for a function f(x), where x goes from [a,b]. One needs to traverse all possible values of x from a to b.
18:05 sisar ok, float64 is not a requirement for that, but... does anyone get what i'm trying to say ?
18:05 * moritz doesn't
18:05 moritz but I haven't backlogged yet
18:05 TimToady maybe we should just define ϵ so you can say 1, *+ϵ, ... 2
18:06 GlitchMr .u ϵ
18:06 phenny U+03F5 GREEK LUNATE EPSILON SYMBOL (ϵ)
18:06 doy i can't think of any cases where you actually care about all possible values
18:06 GlitchMr Fun. My monospace font doesn't even have that symbol
18:06 doy if you're plotting a graph, you have some kind of resolution in mind
18:07 GlitchMr But perhaps in future, people will use Comic Sans MS for programming
18:07 [Coke] sisar; you can't traverse /all/ possible values, can you?
18:07 GlitchMr (ok, probably some other proportional font)
18:07 [Coke] do mean "to the resolution of float" ?
18:07 [Coke] do *you* mean?
18:08 [Coke] I think TimToady's sequence makes sense.
18:08 [Coke] is there some ϵ
18:08 GlitchMr It reminds me http://www.codinghorror.com/blog/2007/02/why-cant-programmers-program.html
18:08 [Coke] Is there a ϵ that you expect by default?
18:08 GlitchMr "Write a program that prints the numbers from 1 to 100."
18:08 GlitchMr What's wrong with this?
18:08 TimToady [Coke]: we're talking about "nextafter" and "nexttoward" semantics
18:08 flussence it doesn't say what printer to use :)
18:09 sisar [Coke]: ideally you can't, but if you want a smooth graph, you need to traverse all the the possible float representations from a to b.
18:09 GlitchMr flussence: not that
18:09 GlitchMr But yeah, it probably should say prints to STDOUT
18:10 GlitchMr The problem is... the number of numbers from 1 to 100 is ∞.
18:10 TimToady we're talking about fake numbers, not real numbers
18:12 TimToady your font has ∞ but not ϵ?  what's up with that?
18:12 GlitchMr Well, my proportional font has ϵ
18:13 GlitchMr But my monospace doesn't, so IRC client refuses to show it
18:13 GlitchMr It shows rectangle
18:13 [Coke] sisar; but you wouldn't graph every possible float betwen those 2 extremes. If you did, I want your monitor. (I assume this is supposed to be a pedagogical example, but I'm not seeing the utility)
18:13 moritz then get a better monospace font :-)
18:13 TimToady I'd consider ∞ to need proportional more than ϵ does...
18:14 GlitchMr ... hmmm... I'm using "Monospace" as font
18:14 GlitchMr It's "Ubuntu Monospace", I guess...
18:15 TimToady so am I, why doesn't yours work?
18:15 sisar [Coke]: yes, i would not, that would be insane.
18:15 sisar I was just trying very hard to come up with a use case for nextafter :-)
18:17 GlitchMr Oh, wait, it isn't "Ubuntu Monospace"
18:17 fgomez joined #perl6
18:17 GlitchMr This is so confusing
18:17 GlitchMr It's simply called "Monospace" and "Ubuntu Monospace" is separate font
18:18 flussence monospace is a symlink of sorts to whatever the distro decides the default should be
18:19 GlitchMr oh, ok
18:19 GlitchMr It appears to use "Droid Sand Mono"
18:19 GlitchMr After trying every font installed on my PC
18:19 GlitchMr Sans
18:20 GlitchMr s/Sand/Sans/
18:20 GlitchMr And I was wondering why it this font looks identically to font I see when logging on SSH using my Android phone...
18:20 flussence `fc-match monospace` might help :)
18:21 Su-Shee Monospace is usally Deja Vu Sans Mono or Bitstream Vera Sans Mono under many distributions.
18:22 Su-Shee GlitchMr: check your /etc/fonts/conf.d or conf.avail etc. and there should be a describtion for your "monospace"
18:23 GlitchMr Dejavu Sans Mono seems to work well
18:23 GlitchMr Two other fonts also have ϵ, but they look ugly for me
18:24 Su-Shee GlitchMr: dejavu sans mono works very well..
18:25 Su-Shee but so does droid mono: http://frollein-schmidt.de/screenshots/droidmono-utf8.png
18:27 GlitchMr Why would Russian string have translation and Japanese wouldn't
18:27 flussence I had to change the monospace in my browser from that to something else today, because it wasn't displaying underscores for some reason. But yeah, it usually works fine
18:27 GlitchMr flussence: I remember having this issue with Kate on Windows once ;)
18:27 GlitchMr Changing font helped too
18:28 Su-Shee GlitchMr: because you can configure which unicode range should use which font with fontconfig/freetype/pango
18:28 flussence I remember in the bad old days, on something like kde 3.1, the default fonts and rendering were *horrible* :)
18:29 Su-Shee that's qt's font handling, no idea how that works. I was assuming ubuntu with gnome or unity and then it's fontconfig/freetype/pango underneath gtk.
18:29 GlitchMr Because you know, don't leave UNIX without UNIX tools ;)
18:29 Su-Shee (or xfce..)
18:29 GlitchMr It's Kubuntu
18:29 GlitchMr But whatever
18:31 Su-Shee uh, no "whatever", it's different..
18:31 flussence qt4 seems sane nowadays at least (same stack as GTK). I wish it had that ctrl+shift+u feature GTK has though
18:31 diakopter TimToady: postcontemporary; haha
18:34 GlitchMr > 'a' =eq= 'a'
18:34 GlitchMr True
18:34 GlitchMr I like having fun without custom operators
18:37 Su-Shee flussence: qt4 isn't the same stack as gtk. :)
18:37 Su-Shee flussence: ctrl-shift-u is an iso-standard btw :)
18:38 flussence eh? `ldd libQtGui.so` shows me fontconfig and freetype in use...
18:39 Su-Shee flussence: there's more, pango, cairo, atk are all part of gtk underneath.
18:39 Su-Shee flussence: specifically pango is "the unicode part"
18:43 mtk0 joined #perl6
18:45 FROGGS does somebody know how to do this? "text".MyClass.my-method
18:45 FROGGS like "/path/to/something".IO....
18:45 FROGGS does my class just needs a role or something?
18:46 * FROGGS likes to go totally perl6y
18:49 FROGGS I somebody could point me to a FM (as in RTFM) that would be super sweet too
18:49 Su-Shee you mean method chaining with class methods?
18:50 FROGGS err, if that looks like what I posted then yes
18:51 Su-Shee hm, never needed that..
18:51 moritz in case of 'path'.IO, there is simply a method called 'IO' in class Str
18:51 FROGGS meh
18:52 FROGGS I was hoping that IO has something special to allow that
18:52 Su-Shee to allow what?
18:52 * moritz prefers plain old method calls over magic
18:52 moritz you can write IO($something), and then it's the responsibility of the IO class
18:53 FROGGS right now I am doing MyObject.my-method( "text_goes_here" ), and I was just wondering if I could do "text_goes_here".MyClass.my-method
18:53 FROGGS like "text".write-to-graphic-surface
18:53 moritz not without monkey-patching class Str
18:54 FROGGS (shorter names of course)
18:54 moritz and you really shouldn't do that
18:54 crab2313 joined #perl6
18:54 FROGGS okay, dont like monkey typing
18:54 moritz FROGGS: method calls a.b(c) reads as subject.verb(object)
18:55 moritz FROGGS: if you write that "text".write-to-graphic-surface, it's object.verb -- that totally breaks the pattern
18:55 FROGGS buts that the current style, isnt it?
18:55 FROGGS "text".say
18:55 mtk joined #perl6
18:55 moritz that's why I prefer to write say('text')
18:55 moritz (or without the parens)
18:55 FROGGS basically I would like to supply both
18:55 Su-Shee FROGGS: it depends.
18:56 [particle] joined #perl6
18:56 FROGGS on what?
18:56 Su-Shee FROGGS: what makes more sense for your object? "hello".do_stuff_with_hello or object.do_stuff_with_this('hello')
18:57 FROGGS the first one, a bit
18:57 FROGGS my object just draws that text to another surface
18:58 FROGGS the object itself is just a big picture containing images for "all" chars
18:58 FROGGS so $text.write-to( $target ) would make more sense to me
18:59 Su-Shee FROGGS: then you paint stuff on the surface -> canvas.paint('hello')
18:59 FROGGS right now it is: $font.write-to( $target, $x, $y, $text )
19:00 Su-Shee FROGGS: the sheer amount of your parameters already tells you that it's not a good idea. also you're juggling three objects here: font, target and text
19:00 FROGGS if the canvas invokes this, I have to supply the font somehow... (intializing ot takes much time currently)
19:00 moritz nr: say 'abc123' ~~ / <:isL>+/
19:00 FROGGS right, three objects
19:00 p6eval rakudo f48867: OUTPUT«Unicode property 'isL' not found␤  in regex  at /tmp/Mdb2NYmbzq:1␤  in method ACCEPTS at src/gen/CORE.setting:10050␤  in block  at /tmp/Mdb2NYmbzq:1␤␤»
19:00 p6eval ..niecza v21-1-ga8aa70b: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤ISL does not exist as a UCD table at /tmp/I80dDdCOya line 1:â�¤------> [32msay 'abc123' ~~ / <:isL[33mâ��[31m>+/[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1435 (die @ 5) â�¤  at …
19:00 moritz nr: say 'abc123' ~~ / <:L>+/
19:00 p6eval rakudo f48867: OUTPUT«「abc」␤␤»
19:00 p6eval ..niecza v21-1-ga8aa70b: OUTPUT«#<match from(0) to(3) text(abc) pos([].list) named({}.hash)>␤»
19:01 leont left #perl6
19:01 Su-Shee FROGGS: you invoke the font on the text, because text is a painted thing when it comes to canvases, so the font usally is a property of text.
19:01 Su-Shee FROGGS: because labels can have fonts as well.
19:02 Celelibi joined #perl6
19:02 Su-Shee FROGGS: just look how other painting/drawing systems do it, they're all quite similar.
19:03 FROGGS ya, and not object orientated
19:03 Su-Shee FROGGS: and remember that in your context usally everything is a path which gets stroked on a surface and then stacked and manipulated. details like font, color, size etc are usally properties.
19:03 doy almost all of them are actually object oriented
19:03 doy even if they are written in a non-object oriented language
19:03 Su-Shee FROGGS: what doy says.
19:04 FROGGS Su-Shee: there are no other font properties except the font image file, its juft like blitting parts of the font image according to the given text
19:04 Su-Shee FROGGS: label = new Label; label font: monospace
19:05 FROGGS its not monospace-able
19:05 FROGGS no other heights, no other colors to set
19:05 Su-Shee FROGGS: it doesn't matter if it is an actual font or a font image. you place it on a surface and let the surface render it.
19:05 Su-Shee FROGGS: details, unimportant.
19:06 Su-Shee text = new Image. surface.foreground(
19:06 Su-Shee err.. surface.foreground.rotate.distort('someimage') :)
19:07 FROGGS so we can agree that the text should be the "acting object", right?
19:07 FROGGS not the target/canvas, not the font
19:07 Su-Shee should distort the image, rotate it, stack it fo the foreground and be placed on the surface which then usally does something like surface.display or canvas.render or whatever
19:08 Su-Shee FROGGS: no in that case it shouldn't, because the text is placed passively on the canvas.
19:08 FROGGS so you mean: canvas.write-to-me( $text, $x, $y ) ?
19:08 Su-Shee FROGGS: unless it's a postscript font based text which in itself is a path/vector then it certainly is a more powerful object on its own.
19:08 mtk0 joined #perl6
19:09 moritz I'd expect a text object to have much more information than just a Str
19:09 moritz like, a font size, a color etc.
19:09 Su-Shee FROGGS: usally, it's more generic along the lines of canvas.render or window.display or something like this...
19:10 FROGGS moritz: that all depends on the surface, it's not changeable
19:11 FROGGS when I do like multi method canvas.render( Str ), that does different stuff with other arguments, than how to select the font?
19:11 FROGGS canvas.font ?
19:12 Su-Shee FROGGS: you're basically reimplmenting something like Cairo, look at its API. http://www.cairographics.org/tutorial/
19:12 moritz canvas.render(Str, :font<Arial>)
19:12 FROGGS I'm reimplementing it, but using it in another case (libpango, libSDL_ttf)
19:12 mtk joined #perl6
19:12 Su-Shee FROGGS: why are you trying to overdo it? just keep it simple..
19:13 FROGGS thats the point, it should be simple
19:14 FROGGS letting all happen on a single object (the canvas) is... weird to me
19:15 FROGGS you have several ways to draw texts (using surface fonts, true type), than you have several other was to draw stuff (sprites, animated, smpeg). I cant let it happen all on the one canvas object
19:15 FROGGS its like having 200 methods
19:15 Su-Shee FROGGS: because that's where all the stuff is put on. and usally canvas knows only some basic methods like render and a couple of properties like its type, size etc
19:16 Su-Shee no, it's not.
19:16 FROGGS I'm a bit confused
19:17 FROGGS I thought you ment to let the canvas be the actor?
19:17 Su-Shee FROGGS: look how cairo does it, it's basically a constant creating of a path, assigning properties to that path, set placement directions and let the canvas render it.
19:18 Su-Shee FROGGS: it's the same as creating GUIs... you have some container (a window), it needs some placement directions (a grid) and then you create plenty of widget objects which have their properties and methods and just place them into the container. then you say "display" and that's it.
19:19 Su-Shee FROGGS: your container is a surface/canvas and it render "stuff" on it. you create plenty of "stuff", set the "stuff's" properties and arrange it on the canvas/surface and say "now render this shit".
19:20 FROGGS okay, think I know what you mean
19:20 Su-Shee FROGGS: and thankfully, tons of widget systems and painting libraries all work similar (seems noone has invented a much better system until now, which is quite interesting), so just do it "like everybody else" (at your first try at least..)
19:21 FROGGS well, I basically just know libSDL, a C-lib, and the function are lib SDL_BlitSurface( surfaceA, surfaceB )
19:22 Su-Shee FROGGS: and the decision if your lib counts as "simple" (preferably in the meaning of "elegantly clear and concise") is how easy it is to juggle all the tiny objects on the surface and how nice it is to call their methods...
19:22 FROGGS its not that surfaceA is doing something with B or vice versa
19:22 moritz well, C doesn't have methods
19:22 Su-Shee FROGGS: also, if I remember correctly, SDL isn't really a generic drawing lib but this game toolkit thingie?
19:23 Su-Shee FROGGS: in OO, you'd probably do surfaceA.blit(withsurfaceB)
19:24 Su-Shee or, create a surfaceC = new BlittedSurface(surfaceA, SurfaceB)
19:24 FROGGS well, its not wrong what you said but not actually true, sdl is a hardware+os independant layer that lets you draw, play music, handle controller, network, whatever
19:24 Su-Shee something along those lines..
19:24 FROGGS but I got ya
19:24 Su-Shee FROGGS: no idea, I care only for 2d painting and GUI widgets...
19:28 moritz n: say 'foo bar'.wordcase
19:28 p6eval niecza v21-1-ga8aa70b: OUTPUT«Unhandled exception: Unable to resolve method wordcase in type Str␤  at /tmp/7aYPpGWwu6 line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4138 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4139 (module-CORE @ 571) ␤  at /hom…
19:28 moritz n: say 'foo bar'.capitalize
19:28 p6eval niecza v21-1-ga8aa70b: OUTPUT«Foo Bar␤»
19:29 dalek rakudo/nom: d1f4dc7 | moritz++ | / (4 files):
19:29 dalek rakudo/nom: implement wordcase, deprecate capitalize
19:29 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d1f4dc7b40
19:36 simcop2387 joined #perl6
19:49 mtk0 joined #perl6
19:53 mtk joined #perl6
19:54 gongyiliao joined #perl6
19:58 Edument joined #perl6
20:00 kst joined #perl6
20:02 kst joined #perl6
20:03 bruges_ joined #perl6
20:26 TimToady moritz: 'my token identifier' seems unused (and with *%, wrongish)
20:27 lichtkind joined #perl6
20:30 dalek std: 1ab8225 | larry++ | Makefile:
20:30 dalek std: setup to recompile CORE5 setting
20:30 dalek std: review: https://github.com/perl6/std/commit/1ab822585c
20:32 cognominal joined #perl6
20:34 mtk joined #perl6
20:36 lichtkind sorear: i can tell why we had err and orelse in parallel
20:36 lichtkind split brain syndrom
20:37 lichtkind err was in the op table ebside // and orlese in anoother with andthen handlinbg pairs of blocks
20:38 lichtkind moritz: could you please show me orelse in test suite?
20:44 bluescreen100 joined #perl6
20:46 [Coke] lichtkind: S03-operators/short-circuit.t S03-operators/assign.t S16-filehandles/chmod.t S16
20:46 [Coke] -filehandles/filestat.t S16-filehandles/dir.t S03-metaops/reduce.t S10-packages/
20:46 [Coke] require-and-use.t
20:47 [Coke] sorry about crappy cutnpaste
20:47 lichtkind thanks
21:03 cognominal joined #perl6
21:25 cognominal joined #perl6
21:38 cognominal joined #perl6
21:49 masak good morning, #perl6!
22:00 FROGGS \o masak
22:02 crab2313 joined #perl6
22:03 stopbit_ joined #perl6
22:11 sorear o/ masak
22:12 sorear isn't this a bit early for you?
22:14 masak sorear: you're still not used to UGT, I gather ;)
22:19 masak but yeah, actually getting up at this time of day would be ridiculously early.
22:19 masak I'm not sure I've ever done that, actually. and I've experimented some with turning the clock.
22:27 TimToady I really wish my font wouldn't say "Oh, it's not East Asian, so it must not be double wide"
22:37 masak 'night, #perl6
22:38 TimToady single wide: ⑳   double wide: ㉑
22:44 cognominal joined #perl6
22:49 lichtkind night mäsak
23:31 benabik joined #perl6
23:32 Circlepuller_ joined #perl6
23:33 whiteknight joined #perl6
23:35 dayangkun joined #perl6
23:40 Circlepuller joined #perl6
23:53 Celelibi joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo