»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! Set by sorear on 4 February 2011. |
|||
00:03
whiteknight left
00:06
dayangkun joined
00:21
raiph left
00:36
[Coke] left
00:37
[Coke] joined
|
|||
[Coke] | huh. couldn't reattach to my screen. had to start a new one. | 00:38 | |
(on feather) | |||
sorear | [Coke]: I think feather was rebooted recently, I had to restart dalek | 00:52 | |
diakopter | I had to touch /etc/apache2/httpd.conf | 00:53 | |
00:57
scott__ joined
01:06
FROGGS__ left,
FROGGS left
01:07
FROGGS__ joined
01:14
bluescreen10 left,
bluescreen10 joined
01:16
hypolin joined
01:19
dayangkun left,
FROGGS joined
01:20
tokuhiro_ left
01:24
benabik left
01:25
Circlepuller joined,
benabik joined
01:27
Circlepuller__ left
01:35
popl joined
|
|||
MikeFair | What's the distinction between $/ and $_? | 01:39 | |
in Actions.pm | |||
oh wait nm | |||
I think I see it now | |||
$_ is being used inside a loop | 01:40 | ||
$/ is still referencing "the thing that got passed in" | |||
01:49
woosley joined
01:59
jaldhar left
02:00
yarp joined
02:13
OuLouFu joined
02:17
orafu left,
dayangkun joined
02:24
Targen left
02:25
Targen_ joined
02:46
xinming left
02:55
xinming joined
02:59
gongyiliao joined
03:02
xinming left
03:09
xinming joined
03:15
hlin_ joined
03:19
nick joined,
nick is now known as Guest70688
03:20
hlin_ left
03:21
xinming left
03:23
xinming joined
03:25
Guest70688 left
03:33
Khisanth left
03:38
fgomez joined
03:42
fgomez left
03:43
fgomez joined
03:49
xinming left
03:51
Khisanth joined
03:54
thou joined
04:15
popl left
04:22
kaleem joined
04:42
fgomez left
04:53
kaleem left
05:03
kaleem joined
05:05
skids left
05:29
xinming joined
05:35
yarp left
|
|||
moritz | good morning | 05:36 | |
TimToady | o/ | ||
05:43
wtw_ joined
05:52
kaleem left
|
|||
sorear | o/ | 05:52 | |
diakopter | o/ | 05:53 | |
tadzik | o/ | 05:56 | |
__sri | o/ | ||
diakopter | heads up seven up | ||
diakopter wonders if the europans know what that is | 05:57 | ||
...doubtful | 05:58 | ||
FROGGS | I know 7up as a softdrink | ||
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,
FROGGS__ left
|
|||
diakopter | oh look, a wikipedia article on it | 06:00 | |
kids put their heads down so they can't see and raise their arms | |||
with thumb out | 06:01 | ||
the o/ o/ o/ o/ reminded me of it | |||
en.wikipedia.org/wiki/Seven_Up_(game) | |||
06:01
FROGGS left
06:09
marmay joined
06:23
marmay left
06:34
HarryS left
06:39
dayangkun left,
leont joined
06:41
thou left
06:50
leont left
06:53
dayangkun joined
06:58
hypolin left,
hypolin joined
|
|||
masak | good 莫宁, #perl6 | 07:01 | |
:) | |||
tadzik | hello masak | 07:02 | |
Timbus | nín hăo | 07:05 | |
(i only know pinyin :( ) | 07:06 | ||
masak | not bad. | ||
the pinyin for 莫宁 is "mò níng", by the way. | 07:07 | ||
Timbus | hah | ||
masak | seems to be a sound loan meaning "mourning" :) | ||
07:07
hoelzro|away is now known as hoelzro
07:08
leont joined
|
|||
Timbus | i figured it would be more useful to speak the language, then later on, spell it. still working on the first half | 07:08 | |
sorear misreads 莫宁 as | 07:10 | ||
sorear misreads 莫宁 as 漢字 | |||
scott__ | 莫宁 as morning | 07:11 | |
sorear | masak: mourning or morning? | 07:12 | |
07:13
brrt joined
|
|||
masak | sorear: "mourning", according to Google Translate. | 07:13 | |
sorear: or "Mornington". | |||
sorear | .oO( who are we mourning? ) |
07:14 | |
Su-Shee | the morning. | 07:15 | |
brrt | o/ p6 | 07:16 | |
scott__ | good 莫宁, good morming | ||
moritz | \o | 07:17 | |
masak | o/ | ||
sorear | scott__: hi! I think you are new here? | 07:18 | |
scott__ | 早上好! | 07:19 | |
sorear: yes i am new | 07:21 | ||
masak | welcome, scott__ who is new! | ||
scott__ | me | 07:22 | |
masak | rn: say "the machines greet you too" | ||
p6eval | rakudo f48867, niecza v21-1-ga8aa70b: OUTPUT«the machines greet you too» | ||
moritz | nr: say "welcome, ", "scot_".comb[0, 1, 2, 3, 3, 4, 4].join | ||
p6eval | rakudo f48867, niecza v21-1-ga8aa70b: OUTPUT«welcome, scott__» | ||
07:23
FROGGS__ joined
|
|||
scott__ | i came here half year. but not talks. | 07:23 | |
07:23
FROGGS joined
07:24
domidumont joined
|
|||
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 早. | ||
masak | we do? | 07:25 | |
scott__ | sorear: yes i am a lurker. | 07:26 | |
masak | not any more. | ||
sorear | ah, I was thinking of 卓明亮 | 07:28 | |
07:28
hypolin left
|
|||
sorear | not the same character | 07:28 | |
07:28
hypolin joined
|
|||
scott__ | ’早上好‘ not is a name. this is 'good morning' | 07:29 | |
masak | sorear: that makes a lot more sense. I don't think 早 is a common family name. | 07:30 | |
sorear | masak: JimmyZ | ||
FROGGS | o/ | 07:31 | |
sorear | and I found the correct spelling ^ | ||
07:31
brrt left
|
|||
sorear | someday I'll find tuits to finish learning, maybe... | 07:31 | |
there's just so much to learn in the world | |||
I'll never finish! | |||
masak | sure you will :) | 07:32 | |
shachaf | Come on, what's wrong with Finnish? | ||
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. | ||
shachaf ought to learn Finnish. | |||
scott__ | masak: your chinese is very good. | 07:34 | |
07:35
eiro left
|
|||
scott__ | masak: chinese is your first language? | 07:35 | |
masak | scott__: heh. | 07:36 | |
sorear | masak's first language is Swedish. | ||
he does speak impeccable English though | |||
in real time, too | |||
masak | scott__: first, thank you. second, no, my Chinese isn't very good. :) | ||
scott__: 我学习普通话了近两年。 | 07:37 | ||
did I get that right? | |||
masak , as usual, feels very uncertain bout the plcement of the 了 | 07:38 | ||
scott__ | masak: 'good 莫宁' chinese people will spelling this wrong word. | ||
sorear | I recognize about 6 characters from that | ||
masak | scott__: yeah. it was meant as an inter-language pun. | ||
scott__ | but, wo know it | 07:39 | |
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:40 | |
leont | It's all Chinese to me! | 07:42 | |
scott__ | masak: you study chinese in china? i study english in school manay years, | ||
bu my english is bad. | |||
sorear | masak: I notice a conspicuous lack of 二. | 07:43 | |
hoelzro | that's liang! | ||
moritz | scott__: it's all just a matter of practice | ||
leont | School was not a good place to learn languages for me, immersion worked better | ||
masak | scott__: no, I 在乌普萨拉 studied | ||
scott__: 瑞典 | 07:44 | ||
scott__ | moritz: yes, i not speak english. | ||
masak still remembers perlhack with fondness | |||
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 | ||
renormalist | spacebat: re cperl-mode: 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. | ||
masak | sorear: as long as you don't call the hanzi "kanji", you should be fine :P | ||
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. | ||
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 | ||
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? =( | ||
Su-Shee | hmmmm.. perl 6 and contiuations? how about that? | ||
conti-nu-ations. | 07:49 | ||
masak | hoelzro: not so much "prefer" as "use most of the time". | ||
moritz | Su-Shee: gather/tkae and lazy lists+map are continuations, sort of | ||
Su-Shee: though not serializable continuations | |||
hoelzro | simplified makes me sad | ||
sorear | Su-Shee: gather/take exposes the full power of *one-shot* continuations | ||
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... | ||
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///). | ||
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. | ||
hoelzro | I studied it for two years at Uni, but I've forgotten so much of it =( | ||
masak | hoelzro: basically, I don't. :/ | ||
hoelzro: I've also forgotten loads. | |||
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".. ;) | ||
hoelzro | whoa, cool! | ||
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. | ||
Su-Shee: Chinese *and* irony? really?? :P | 07:54 | ||
sorear | house of the flying daggers... sounds like a parliament building. | ||
scott__ | masak:you have some chinese friends, talk to you? | ||
Su-Shee | masak: well it's shi ma basically and it was pretty clear by the look on her face.. so.. :) | 07:55 | |
masak | scott__: 是的 | 07:56 | |
Su-Shee | sorear: it's a movie by the same director as "hero" | ||
scott__ | if everyone like study chinese. contact me use google talk. | 08:04 | |
my first language is chinese. | |||
08:05
fhelmberger joined
|
|||
masak | scott__++ | 08:05 | |
scott__ | [email@hidden.address] | 08:06 | |
sorear | scott__++ | ||
moritz | always easy to remember, those addresses :-) | ||
08:07
fhelmberger left
|
|||
sorear | it's in the logs :-) | 08:09 | |
08:19
Psyche^ joined
08:23
Patterner left,
Psyche^ is now known as Patterner
08:30
marmay joined
08:34
fhelmberger joined
08:40
dakkar joined
08:46
HarryS joined
08:51
obra left
08:53
kresike joined
|
|||
kresike | good morning all you happy perl6 people | 08:53 | |
masak | good morning, kresike! \o/ | 08:55 | |
08:56
leont left
|
|||
sorear | o/ | 09:03 | |
09:18
spider-mario joined
09:26
brrt joined
09:49
jaldhar joined
09:52
snearch joined
09:54
Gesh left
09:55
marmay left
09:56
daxim joined
10:02
xinming left
10:06
hypolin left,
marmay joined
10:11
scott__ left
10:26
eiro joined
10:33
topo left
10:35
dayangkun left
10:36
topo joined
10:41
xinming joined
10:45
mscha joined,
xinming left
|
|||
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» | ||
..niecza v21-1-ga8aa70b: OUTPUT«Hello, world!» | |||
mscha | Is there, or will there be, a method that transforms "hello, world!" into "Hello, World!"? (I.e. title case each word?) | 10:59 | |
moritz | yes | 11:00 | |
perl6: "hello, world!".capitalize | 11:01 | ||
p6eval | rakudo f48867, niecza v21-1-ga8aa70b: ( no output ) | ||
moritz | perl6: say "hello, world!".capitalize | ||
p6eval | rakudo f48867, niecza v21-1-ga8aa70b: OUTPUT«Hello, World!» | ||
moritz | I don't know if the name is still correct under the new spec | ||
11:04
Circlepuller left,
Circlepuller joined
11:05
Su-Shee_ joined
|
|||
mscha | Thanks, that was just a little bit too obvious to think of. ;) | 11:06 | |
moritz | doc.perl6.org/type/Str#wordcase # that's the new name | 11:08 | |
11:09
Su-Shee left
|
|||
mscha | That's even more logical. :) | 11:14 | |
masak | wordcase! \o/ | 11:22 | |
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 | ||
and then slowly adjust the functionality | |||
masak | +1 | 11:24 | |
sergot | hi o/ | 11:28 | |
tadzik | \o | ||
11:29
xinming joined
|
|||
masak | sergocie! \o/ | 11:29 | |
11:31
Su-Shee_ is now known as Su-Shee
11:34
xinming left
11:42
mscha left
11:44
colomon joined
11:45
benabik left
11:46
benabik joined
11:55
xinming joined
12:07
snearch left
12:11
xinming left
12:13
xinming joined
|
|||
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:16 | |
12:19
xinming left
12:20
FROGGS left,
FROGGS__ left,
FROGGS__1 joined
|
|||
masak | awwaiid: as far as I know, www.seaside.st/ and www.seaside.st/ both use CPS as a core ingredient. | 12:22 | |
er, second link liftweb.net/ | |||
awwaiid | they aren't using CPS, they're using actual continuations, if that makes sense | 12:23 | |
but what I was actually fishing for was whether Su-Shee has seen _new_ web frameworks that use continuations or CPS | |||
I wrote Continuity (see cpan), so I try to track these things at least a bit :) | |||
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 | ||
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:25 | ||
I feel like continuation-based web frameworks are dying out in favor of just having client-side control flow | 12:26 | ||
s/dying out/have died out/ | |||
12:27
xinming joined
|
|||
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 :) | ||
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:28 | ||
so... around when that was popular | 12:29 | ||
brrt | that is when we are talking about a /very/ small collection of hackers | ||
an tbh | |||
i never really got the point | |||
web apps are supposed to be about request -> response | |||
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 | |
more like writing a client application, like a command line apps | |||
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 | |||
really fun in any case though and I highly recommend you give it a try if you haven't :) | 12:32 | ||
brrt | i haven't :-) i just think that server-side state is a very dangerous tool too play with | 12:33 | |
awwaiid | many powerful tools are also dangerous | 12:34 | |
12:34
benabik left
12:35
FROGGS joined
|
|||
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:38 | |
12:39
PacoAir joined
|
|||
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:39 | |
but when you completely skip that serialize/reify in all situations, no matter how complex, you get a taste of the benefit | 12:40 | ||
12:41
Chillance joined
|
|||
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:41 | |
12:41
xinming left,
telex left
12:43
xinming joined
|
|||
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. | |||
awwaiid | masak, CPS, or actual continuations? :) | 12:45 | |
Su-Shee | awwaiid: "meteor" (very new javascript) seems to go down the seaside-style route. | ||
masak | awwaiid: either, I guess. | ||
Su-Shee | awwaiid: meteor.com/ | ||
awwaiid | Thanks, Su-Shee | ||
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. :) | ||
*engine | |||
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 | ||
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. | ||
jnthn | See the async/await stuff in C# 5 | ||
awwaiid | masak, I think that's called an automatic CPS-transform | ||
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 | |
awwaiid: ooh; will check it out. | |||
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! ) |
||
jnthn | I once tried a web framework that did it with harry potter, but it was too magical for me. | ||
12:50
xinming_ joined
|
|||
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, github.com/cperkins/js-cps | 12:50 | |
12:51
xinming left
|
|||
masak | groovy. | 12:51 | |
yes, that's exactly what I meant. | |||
12:51
atrodo joined
|
|||
masak | will look deeper into this. awwaiid++ | 12:51 | |
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. | ||
masak | jnthn: ok. | ||
jnthn | I've been looking at it and wondering how to do similar in Perl 6 :) | ||
__sri | meteor has absolutely no marketshare but $11M funding :) | 12:53 | |
moritz | well, as a developer, I'd take $11M funding any day :-) | ||
__sri | their only plan is to keep developing the framework | ||
awwaiid | __sri, sounds like the business to get into! | ||
__sri | they literally, have no plan for making money | 12:54 | |
jnthn | .oO( maybe spend some of the $1M on marketting... ) |
||
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
|
|||
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 | ||
now it's all syncing js between client and server with a direct connection from the browser to the database | |||
Su-Shee | awwaiid: well from what I've played around with so far, meteor seriously comes close... | ||
awwaiid | __sri I think that the database still counts as server state | 12:57 | |
__sri | true | ||
12:57
telex joined
|
|||
__sri | but in the end i don't think those single page apps will ever win | 12:59 | |
personally, i like the latest trend back to more conservative architectures like pjax | |||
single page apps may go a different route though, if operating systems start allowing them to leave the browser | 13:02 | ||
they could kill a few native apps | 13:03 | ||
13:04
obra_ joined
|
|||
masak | oh right, pjax. | 13:04 | |
13:04
fgomez joined
|
|||
brrt | no, don't do pjax | 13:04 | |
__sri | yes, do pjax :) | 13:05 | |
brrt | the problem with pjax is basically the callback problem | ||
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 :) | ||
brrt | flussence: i'm like that too | ||
no, seriously, pjax has Issues | |||
__sri | flussence: that's what pjax is all about! | ||
brrt | aside from the fact that it is Ugly in your server-side architecture | ||
__sri | the railscast is pretty good railscasts.com/episodes/294-playing-with-pjax | 13:06 | |
masak | flussence: that seems to be what the unobtrusive JS trend is all about. | ||
__sri | brrt: doesn't have to be, in mojolicious it can be quite pretty | ||
brrt | __sri: there are a number of basic issues with pjax | 13:07 | |
__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
krunen left
|
|||
brrt | the other thing is, you load a piece of html into the page | 13:08 | |
13:08
xinming joined
|
|||
brrt | and it contains <script> tags | 13:08 | |
when are they executed | |||
and what happens when they are | |||
and... | |||
what happens when they fail? | 13:09 | ||
13:09
xinming_ left
|
|||
flussence | that's all specced somewhere, lemme find it | 13:09 | |
moritz | code never fails!!!111!! | ||
brrt | moritz :-D | ||
what happens when you timeout | |||
masak hugs moritz | |||
brrt | what happens if the <script> in the html fragment causes a network requests and it times out | 13:10 | |
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!!! | ||
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.. | ||
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... | ||
brrt | tbh, that is not even such a bad strategy | 13:13 | |
13:13
bluescreen10 left
|
|||
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! :) | ||
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. | ||
Juerd | flussence: What's the problem with requiring JS for trivial things? | 13:15 | |
It's present in EVERY practical browser. | 13:16 | ||
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. | |||
masak | there are lots of good reasons not to trust random JS on the web. | 13:17 | |
13:17
xinming left
|
|||
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 | |
that crap is working since IE6, so it works everywhere | |||
masak | & | 13:18 | |
13:18
xinming joined
|
|||
tadzik | . o O ( marquee loop ) | 13:19 | |
moritz | Juerd: there are non-browser user agents as well | ||
Juerd: and I disable JS by default, simply because too many sites use JS for intrusive nonesense | |||
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
FROGGS left
|
|||
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 | |
13:20
FROGGS__ joined
|
|||
flussence | .oO( and HTML, unlike manpages, doesn't suffer from the problem that rendered pages only work on one window width... ) |
13:21 | |
13:21
FROGGS__1 left
|
|||
bonsaikitten | flussence: and you get insane scalability server-side for free | 13:21 | |
13:21
FROGGS joined
|
|||
bonsaikitten | flussence: newest performance hack btw, send a short html website and then use JS/Ajax to inject the rest of the content | 13:21 | |
FROGGS hast kernel panic | 13:22 | ||
hates | |||
bonsaikitten | on low-latency links that sometimes works out | ||
FROGGS: haven't seen one in quite some time, what did you do? | |||
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... | ||
FROGGS | brand new dell laptop (with ssd hdd) and ubuntu | ||
I dont know whats wrong since there is nothing in the logs | |||
system just freezes | 13:23 | ||
13:23
xinming left
|
|||
flussence | meh, I'm not going to convince anyone | 13:23 | |
bonsaikitten | FROGGS: any kinky drivers like nvidia? | 13:24 | |
FROGGS | no, its intel gfx card | ||
bonsaikitten | flussence: I've been convinced a long time ago already | ||
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. | ||
bonsaikitten | FROGGS: ah, those can be fun ... | ||
FROGGS | it got better since the last 5 kernel updates though | ||
flussence | intel gpu drivers are pretty crash-proof nowadays | ||
brrt | flussence: i kind of wish back for the days of 'progressive enhancement' too | 13:26 | |
13:26
bluescreen10 joined
13:27
skids joined
13:28
_jaldhar joined
13:29
jaldhar left,
kaleem left
13:31
_jaldhar left,
_jaldhar joined
|
|||
awwaiid | I've decided we're back in the days of client-server instead of thin-client :) | 13:32 | |
round and round it goes | |||
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:35 | ||
I should patent my ideas and then go around charging people licensing fees | 13:36 | ||
(kidding) | |||
FROGGS | I'm doing something similar for a mobile "app" | ||
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! | ||
prior art | |||
FROGGS | awwaiid gets a beer when he is in berlin | 13:41 | |
awwaiid | woo! | ||
FROGGS | its not much, but tasty ;o) | ||
13:42
krunen joined
|
|||
awwaiid | Here is at least one reference, second paragraph from the bottom - 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 | |
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
13:52
stopbit joined
|
|||
flussence | ooh, postgres 9.2 added a range type | 13:55 | |
cosimo | awwaiid: opera mini has being doing that since 2006 :) | ||
13:56
xinming left
13:57
xinming joined,
FROGGS__ left
|
|||
tadzik | :> | 13:59 | |
13:59
xinming left
|
|||
moritz | now you know who you can sue :-) | 13:59 | |
13:59
FROGGS__ joined
14:00
FROGGS left
|
|||
daxim | flussence, I've been waiting for that | 14:03 | |
now when pg 9.2 arrives at $ork is another question | |||
moritz | postgresql++ | 14:04 | |
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:07 | |
14:10
sctt joined
|
|||
awwaiid | cosimo, ah yes! good point | 14:11 | |
brrt | flussence: nice | ||
flussence | oh wow, someone pointed me to a thing in 9.3 that sounds awfully similar to an X metaop: www.postgresql.org/docs/devel/stati...URNING-SET | ||
awwaiid | pft. We're on perl 5.8.3 here | 14:12 | |
14:12
clkao joined,
FROGGS joined
14:16
benabik joined
14:18
kaleem joined,
GlitchMr joined
14:20
sctt left
14:21
kaleem left
14:24
sctt joined
14:25
obra_ is now known as obra
14:27
benabik left
|
|||
__sri wants to see jobs like this for perl6 :) groups.google.com/group/scala-inter...39a4fe745e | 14:27 | ||
moritz wants to see that too | 14:31 | ||
jnthn | ooh :) | 14:38 | |
14:40
kaleem joined
|
|||
dalek | ast: 04d2c1d | moritz++ | S11-modules/import.t: base tests for importing/exporting constants |
14:43 | |
FROGGS | moritz++ | 14:46 | |
moritz: so I can export enums too? | 14:48 | ||
jnthn thought that already worked | |||
FROGGS | ohh, okay | ||
moritz | you can export enums, but it won't export their elems | 14:49 | |
jnthn | ah... | ||
Well, it will in terms of the long names of course | |||
moritz | r: module A { enum A is export <b c d > }; import A; say A::b | ||
p6eval | rakudo f48867: OUTPUT«===SORRY!===Cannot import symbol A from A, because it already exists in this lexical scope Aat /tmp/c86V44qsrb:1» | ||
jnthn | But yeah, the short ones not. | ||
haha! | |||
moritz | r: module Foo { enum A is export <b c d > }; import A; say Foo::b | ||
p6eval | rakudo f48867: OUTPUT«===SORRY!===Could not find module A to import symbols from at line 2, near "; say Foo:"» | ||
moritz | r: module Foo { enum A is export <b c d > }; import Foo; say A::b | ||
p6eval | rakudo f48867: OUTPUT«b» | ||
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)» | ||
FROGGS | k | ||
got it | |||
jnthn wonders how to fix that one | |||
moritz | jnthn: who would I multi-dispatch to an enum? | ||
ie write a candidate that only triggers for an enum? | |||
jnthn | I think they always do a certain role | ||
moritz | r: enum A <b c >; say A.^roles | ||
p6eval | rakudo f48867: OUTPUT«No such method 'roles' for invocant of type 'Perl6::Metamodel::EnumHOW' in block at /tmp/7NrtvQCy0P:1» | ||
jnthn | r: enum Foo < a b >; say Foo.^roles | ||
p6eval | rakudo f48867: OUTPUT«No such method 'roles' for invocant of type 'Perl6::Metamodel::EnumHOW' in block at /tmp/Be_VN76xEg:1» | ||
jnthn | r: enum Foo < a b >; say Foo ~~ Enumeration | 14:51 | |
p6eval | rakudo f48867: OUTPUT«False» | ||
jnthn | r: enum Foo < a b >; say Foo ~~ NumericEnumeration | ||
p6eval | rakudo f48867: OUTPUT«False» | ||
jnthn | curious | ||
I wonder if the meta-object somehow treats those doings as an implementation detail or something | |||
14:53
sctt left
|
|||
dalek | rlito: ab55266 | (Flavio S. Glock)++ | / (4 files): Perlito5 - update Makefile (suggested by shlomif++) |
14:53 | |
15:01
kaare__ joined
15:02
wtw_ left
|
|||
jnthn | hotel & | 15:02 | |
15:04
xinming joined
15:05
thou joined
15:06
sctt joined
15:07
sctt left
|
|||
FROGGS | home & | 15:17 | |
15:17
FROGGS left,
FROGGS__ left
15:25
xinming_ joined,
xinming left
15:29
kaleem left
15:30
fhelmberger left
15:31
atrodo left
15:39
leont joined
15:40
FROGGS__ joined
15:41
FROGGS joined
|
|||
FROGGS | hi there | 15:41 | |
15:43
fgomez left
|
|||
kresike | bye folks | 15:50 | |
15:50
kresike left
15:56
benabik joined
|
|||
tadzik | home & :) | 15:56 | |
15:58
am0c joined,
am0c_ joined
|
|||
sjn | o/ | 16:00 | |
16:00
am0c left
|
|||
sjn | is there a decent vim syntax highlighter for perl6? | 16:00 | |
tadzik | it's linked somewhere on perl6.org | 16:01 | |
flussence | nope, only the one we have :) | ||
tadzik | that too :) | ||
16:01
atrodo joined
|
|||
[Coke] | flussence++ | 16:02 | |
Probably needs some love with all the spec changes since it was written. | 16:03 | ||
16:03
brrt left
|
|||
tadzik | it needs to be less terribly slow, I'd say | 16:03 | |
16:04
hoelzro is now known as hoelzro|away
|
|||
flussence | I don't envy the job of whoever ends up fixing it though, vimscript reminds me of intercal | 16:07 | |
16:07
fgomez joined
16:09
am0c_ is now known as am0c
|
|||
Su-Shee | note to self: avoid intercal. | 16:09 | |
sjn | hm :-\ | 16:10 | |
tadzik | :D | ||
flussence | r: say 70970/8382 | 16:11 | |
p6eval | rakudo f48867: OUTPUT«8.466953» | ||
flussence | wait, no... | ||
r: say 8382/70970 | |||
p6eval | rakudo f48867: OUTPUT«0.118106» | ||
flussence | perl6.vim is 11.8% backslashes. | ||
sjn | heheh | ||
tadzik | w00t :P | 16:14 | |
sjn wonders if this vim file could be generated somehow | |||
e.g. by introspecting perl6 | 16:15 | ||
flussence | I had that idea once, but then I realised it'd involve writing a vimscript code generator and ran far away | 16:16 | |
sorear | good * #perl6 | 16:17 | |
FROGGS | hi sorear | ||
16:17
MayDaniel joined
16:25
sisar joined
16:26
gongyiliao left
16:40
dakkar left
16:42
marmay left
16:52
fgomez left
16:55
MikeFair left
|
|||
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:57 | |
oh, I see people talked about error bars | 16:58 | ||
dalek | d: 942bb1c | larry++ | STD_P5.pm6: allow TCLish -foo => bar form |
17:02 | |
GlitchMr | Portably? Doesn't everything today support floating point numbers? | 17:04 | |
If it can run JavaScript it should be fine | |||
TimToady | does the JVM support it? | 17:05 | |
I suppose anything that can look at the bits of an IEEE floater can in theory support it... | 17:06 | ||
anyhoo, feel free to implement one in Perl 6 :) | 17:07 | ||
GlitchMr | JVM probably should support it... | ||
But... I think that JavaScript does... oh wait... it does | |||
TimToady | the long float forms would be problematic on systems that lack that type | 17:08 | |
er, long double | |||
jnthn | The JVM don't support unsigned types natively, iirc. | 17:12 | |
Don't recall it doing long double. | |||
17:13
fibo joined
|
|||
diakopter | correct & correct | 17:14 | |
17:15
fgomez joined
|
|||
dalek | d: cfe8d43 | larry++ | STD.pm6: don't translate ${0} to ${-1}, GlitchMr++ |
17:24 | |
GlitchMr | :) | 17:30 | |
"allow TCLish -foo => bar form" | 17:42 | ||
Also, isn't this the style which CGI.pm used? | |||
17:43
fgomez left
|
|||
geekosaur | yes, but I think it lifted the style from perl/tk originally | 17:46 | |
which used it for its tcl-ishness | |||
GlitchMr | Nice | 17:47 | |
I through that a => "b" is simply obsolete because it doesn't work | |||
(but well, I would expect better error message) | 17:48 | ||
Even if it would somehow work, it would be -"a" => "b". And - in Perl 6 doesn't work like - in Perl 5. | |||
moritz | well, it would be '-a' => 'b' | ||
GlitchMr | glitchmr@strawberry ~> perl -MO=Deparse -e'print -e => 2' | 17:49 | |
print -'e', 2; | |||
-e syntax OK | |||
moritz | (in Perl 6, that is) | 17:51 | |
TimToady | eval print +(-e => 2)[0] | ||
buubot_backup | TimToady: -e1 | ||
GlitchMr | I know that => is just fat comma | 17:52 | |
(in Perl 5) | |||
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)  … | ||
..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» | |||
GlitchMr | Why - has higher precedence than => anyways? | 17:54 | |
oh wait, it doesn't | |||
17:54
kst left
|
|||
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 | ||
TimToady | but then it would have worked | 17:55 | |
nr: say ((-e) => 2).key | |||
p6eval | rakudo f48867: OUTPUT«-2.71828182878434» | ||
..niecza v21-1-ga8aa70b: OUTPUT«-2.7182818284590451» | |||
TimToady | nr: say (e => 2).key | 17:56 | |
p6eval | rakudo f48867, niecza v21-1-ga8aa70b: OUTPUT«e» | ||
TimToady | nr: say (~e => 2).key | ||
p6eval | rakudo f48867: OUTPUT«No such method 'key' for invocant of type 'Str' in block at /tmp/MQ3g1LBGqh:1» | ||
..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… | |||
GlitchMr | Let me guess, magic in work | ||
TimToady | bareword=> is parsed as a term, as I said | ||
so tighter than unary | 17:57 | ||
GlitchMr | So, bareword on left is tighter than anything else | ||
TimToady | that's what "is a term" means :) | ||
well, that's what it means to me... | 17:58 | ||
let us by all means be properly postmodern | |||
GlitchMr | Hmmm... if Perl 5 is postmodern, Perl 6 is postpostmodern? | 17:59 | |
17:59
mcglk left
|
|||
geekosaur | prefuturistic? | 18:00 | |
TimToady | maybe it's postcontemporary | ||
but I think it's probably just postmoderner, in spots | 18:01 | ||
Su-Shee | <gibson>unevenly distributed futuristic</gibson> | ||
TimToady | the postmodern is unevenly distributed in Perl 5 :) | 18:02 | |
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. | ||
ok, float64 is not a requirement for that, but... does anyone get what i'm trying to say ? | 18:05 | ||
moritz doesn't | |||
but I haven't backlogged yet | |||
TimToady | maybe we should just define ϵ so you can say 1, *+ϵ, ... 2 | ||
GlitchMr | .u ϵ | 18:06 | |
phenny | U+03F5 GREEK LUNATE EPSILON SYMBOL (ϵ) | ||
doy | i can't think of any cases where you actually care about all possible values | ||
GlitchMr | Fun. My monospace font doesn't even have that symbol | ||
doy | if you're plotting a graph, you have some kind of resolution in mind | ||
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? | ||
GlitchMr | (ok, probably some other proportional font) | ||
[Coke] | do mean "to the resolution of float" ? | ||
do *you* mean? | |||
I think TimToady's sequence makes sense. | 18:08 | ||
is there some ϵ | |||
GlitchMr | It reminds me www.codinghorror.com/blog/2007/02/w...ogram.html | ||
[Coke] | Is there a ϵ that you expect by default? | ||
GlitchMr | "Write a program that prints the numbers from 1 to 100." | ||
What's wrong with this? | |||
TimToady | [Coke]: we're talking about "nextafter" and "nexttoward" semantics | ||
flussence | it doesn't say what printer to use :) | ||
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 | ||
But yeah, it probably should say prints to STDOUT | |||
The problem is... the number of numbers from 1 to 100 is ∞. | 18:10 | ||
TimToady | we're talking about fake numbers, not real numbers | ||
your font has ∞ but not ϵ? what's up with that? | 18:12 | ||
GlitchMr | Well, my proportional font has ϵ | ||
But my monospace doesn't, so IRC client refuses to show it | 18:13 | ||
It shows rectangle | |||
[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) | ||
moritz | then get a better monospace font :-) | ||
18:13
mucker left
|
|||
TimToady | I'd consider ∞ to need proportional more than ϵ does... | 18:13 | |
GlitchMr | ... hmmm... I'm using "Monospace" as font | 18:14 | |
It's "Ubuntu Monospace", I guess... | |||
TimToady | so am I, why doesn't yours work? | 18:15 | |
sisar | [Coke]: yes, i would not, that would be insane. | ||
I was just trying very hard to come up with a use case for nextafter :-) | |||
GlitchMr | Oh, wait, it isn't "Ubuntu Monospace" | 18:17 | |
18:17
fgomez joined
|
|||
GlitchMr | This is so confusing | 18:17 | |
It's simply called "Monospace" and "Ubuntu Monospace" is separate font | |||
flussence | monospace is a symlink of sorts to whatever the distro decides the default should be | 18:18 | |
GlitchMr | oh, ok | 18:19 | |
It appears to use "Droid Sand Mono" | |||
After trying every font installed on my PC | |||
Sans | |||
s/Sand/Sans/ | 18:20 | ||
18:20
hoelzro|away is now known as hoelzro
|
|||
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 :) | ||
Su-Shee | Monospace is usally Deja Vu Sans Mono or Bitstream Vera Sans Mono under many distributions. | 18:21 | |
GlitchMr: check your /etc/fonts/conf.d or conf.avail etc. and there should be a describtion for your "monospace" | 18:22 | ||
GlitchMr | Dejavu Sans Mono seems to work well | 18:23 | |
Two other fonts also have ϵ, but they look ugly for me | |||
Su-Shee | GlitchMr: dejavu sans mono works very well.. | 18:24 | |
but so does droid mono: frollein-schmidt.de/screenshots/dro...o-utf8.png | 18:25 | ||
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 | ||
GlitchMr | flussence: I remember having this issue with Kate on Windows once ;) | ||
Changing font helped too | |||
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* :) | ||
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 ;) | ||
Su-Shee | (or xfce..) | ||
GlitchMr | It's Kubuntu | ||
But whatever | |||
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 | ||
diakopter | TimToady: postcontemporary; haha | ||
GlitchMr | > 'a' =eq= 'a' | 18:34 | |
True | |||
I like having fun without custom operators | |||
Su-Shee | flussence: qt4 isn't the same stack as gtk. :) | 18:37 | |
flussence: ctrl-shift-u is an iso-standard btw :) | |||
flussence | eh? `ldd libQtGui.so` shows me fontconfig and freetype in use... | 18:38 | |
Su-Shee | flussence: there's more, pango, cairo, atk are all part of gtk underneath. | 18:39 | |
flussence: specifically pango is "the unicode part" | |||
18:43
mtk0 joined
|
|||
FROGGS | does somebody know how to do this? "text".MyClass.my-method | 18:45 | |
like "/path/to/something".IO.... | |||
18:45
mtk left
|
|||
FROGGS | does my class just needs a role or something? | 18:45 | |
FROGGS likes to go totally perl6y | 18:46 | ||
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? | ||
FROGGS | err, if that looks like what I posted then yes | 18:50 | |
Su-Shee | hm, never needed that.. | 18:51 | |
moritz | in case of 'path'.IO, there is simply a method called 'IO' in class Str | ||
FROGGS | meh | ||
I was hoping that IO has something special to allow that | 18:52 | ||
Su-Shee | to allow what? | ||
moritz prefers plain old method calls over magic | |||
you can write IO($something), and then it's the responsibility of the IO class | |||
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 | |
like "text".write-to-graphic-surface | |||
moritz | not without monkey-patching class Str | ||
FROGGS | (shorter names of course) | 18:54 | |
moritz | and you really shouldn't do that | ||
18:54
crab2313 joined
|
|||
FROGGS | okay, dont like monkey typing | 18:54 | |
moritz | FROGGS: method calls a.b(c) reads as subject.verb(object) | ||
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? | ||
"text".say | |||
18:55
mtk joined
|
|||
moritz | that's why I prefer to write say('text') | 18:55 | |
(or without the parens) | |||
FROGGS | basically I would like to supply both | ||
Su-Shee | FROGGS: it depends. | ||
18:56
daxim left,
[particle] left,
[particle] joined
|
|||
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') | ||
FROGGS | the first one, a bit | 18:57 | |
18:57
mtk0 left
|
|||
FROGGS | my object just draws that text to another surface | 18:57 | |
the object itself is just a big picture containing images for "all" chars | 18:58 | ||
so $text.write-to( $target ) would make more sense to me | |||
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 ) | ||
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) | ||
moritz | nr: say 'abc123' ~~ / <:isL>+/ | ||
FROGGS | right, three objects | ||
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» | ||
..niecza v21-1-ga8aa70b: OUTPUT«===SORRY!===ISL does not exist as a UCD table at /tmp/I80dDdCOya line 1:------> say 'abc123' ~~ / <:isL⏏>+/Unhandled exception: Check failed at /home/p6eval/niecza/boot/lib/CORE.setting line 1435 (die @ 5)  at … | |||
moritz | nr: say 'abc123' ~~ / <:L>+/ | ||
p6eval | rakudo f48867: OUTPUT«「abc」» | ||
..niecza v21-1-ga8aa70b: OUTPUT«#<match from(0) to(3) text(abc) pos([].list) named({}.hash)>» | |||
19:01
leont left
|
|||
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 | |
19:01
Celelibi left
|
|||
Su-Shee | FROGGS: because labels can have fonts as well. | 19:01 | |
19:02
Celelibi joined
|
|||
Su-Shee | FROGGS: just look how other painting/drawing systems do it, they're all quite similar. | 19:02 | |
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. | ||
doy | almost all of them are actually object oriented | ||
even if they are written in a non-object oriented language | |||
Su-Shee | FROGGS: what doy says. | ||
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 | ||
FROGGS | its not monospace-able | 19:05 | |
no other heights, no other colors to set | |||
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. | ||
FROGGS: details, unimportant. | |||
text = new Image. surface.foreground( | 19:06 | ||
err.. surface.foreground.rotate.distort('someimage') :) | |||
FROGGS | so we can agree that the text should be the "acting object", right? | 19:07 | |
not the target/canvas, not the font | |||
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 | ||
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 ) ? | ||
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
19:09
mtk left
|
|||
moritz | I'd expect a text object to have much more information than just a Str | 19:09 | |
like, a font size, a color etc. | |||
Su-Shee | FROGGS: usally, it's more generic along the lines of canvas.render or window.display or something like this... | ||
FROGGS | moritz: that all depends on the surface, it's not changeable | 19:10 | |
when I do like multi method canvas.render( Str ), that does different stuff with other arguments, than how to select the font? | 19:11 | ||
canvas.font ? | |||
19:12
fibo left
|
|||
Su-Shee | FROGGS: you're basically reimplmenting something like Cairo, look at its API. www.cairographics.org/tutorial/ | 19:12 | |
19:12
mtk0 left
|
|||
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
|
|||
Su-Shee | FROGGS: why are you trying to overdo it? just keep it simple.. | 19:12 | |
FROGGS | thats the point, it should be simple | 19:13 | |
letting all happen on a single object (the canvas) is... weird to me | 19:14 | ||
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 | ||
its like having 200 methods | |||
19:15
crab2313 left
|
|||
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:15 | |
no, it's not. | 19:16 | ||
FROGGS | I'm a bit confused | ||
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. | ||
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:18 | ||
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:19 | ||
19:20
sisar left
|
|||
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..) | ||
FROGGS | well, I basically just know libSDL, a C-lib, and the function are lib SDL_BlitSurface( surfaceA, surfaceB ) | 19:21 | |
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 | ||
moritz | well, C doesn't have methods | ||
19:22
hoelzro is now known as hoelzro|away
|
|||
Su-Shee | FROGGS: also, if I remember correctly, SDL isn't really a generic drawing lib but this game toolkit thingie? | 19:22 | |
FROGGS: in OO, you'd probably do surfaceA.blit(withsurfaceB) | 19:23 | ||
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 | ||
Su-Shee | something along those lines.. | ||
FROGGS | but I got ya | ||
Su-Shee | FROGGS: no idea, I care only for 2d painting and GUI widgets... | ||
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… | ||
moritz | n: say 'foo bar'.capitalize | ||
p6eval | niecza v21-1-ga8aa70b: OUTPUT«Foo Bar» | ||
dalek | kudo/nom: d1f4dc7 | moritz++ | / (4 files): implement wordcase, deprecate capitalize |
19:29 | |
19:33
simcop2387 left
19:36
simcop2387 joined
19:49
mtk0 joined
19:50
mtk left
19:52
mtk0 left
19:53
mtk joined
19:54
gongyiliao joined
19:58
Edument joined
20:00
kst joined
20:01
kst left
20:02
kst joined,
GlitchMr left
20:03
bruges_ joined
20:04
bruges left
20:21
stepnem left
|
|||
TimToady | moritz: 'my token identifier' seems unused (and with *%, wrongish) | 20:26 | |
20:27
lichtkind joined
|
|||
dalek | d: 1ab8225 | larry++ | Makefile: setup to recompile CORE5 setting |
20:30 | |
20:32
cognominal joined,
mtk left
20:34
mtk joined,
mtk left
|
|||
lichtkind | sorear: i can tell why we had err and orelse in parallel | 20:36 | |
split brain syndrom | |||
err was in the op table ebside // and orlese in anoother with andthen handlinbg pairs of blocks | 20:37 | ||
moritz: could you please show me orelse in test suite? | 20:38 | ||
20:44
bluescreen100 joined,
bluescreen10 left
|
|||
[Coke] | lichtkind: S03-operators/short-circuit.t S03-operators/assign.t S16-filehandles/chmod.t S16 | 20:46 | |
-filehandles/filestat.t S16-filehandles/dir.t S03-metaops/reduce.t S10-packages/ | |||
require-and-use.t | |||
sorry about crappy cutnpaste | 20:47 | ||
lichtkind | thanks | ||
20:50
MayDaniel left
20:53
cognominal left,
gongyiliao left
20:55
kaare__ left
21:03
cognominal joined
21:09
skids left
21:12
cognominal left
21:18
benabik left
21:19
Edument left
21:25
cognominal joined
21:37
cognominal left
21:38
cognominal joined
21:39
erkan left
|
|||
masak | good morning, #perl6! | 21:49 | |
FROGGS | \o masak | 22:00 | |
22:02
crab2313 joined
22:03
stopbit_ joined,
stopbit left
22:05
crab2313 left
|
|||
sorear | o/ masak | 22:11 | |
isn't this a bit early for you? | 22:12 | ||
masak | sorear: you're still not used to UGT, I gather ;) | 22:14 | |
22:14
PacoAir left
|
|||
masak | but yeah, actually getting up at this time of day would be ridiculously early. | 22:19 | |
I'm not sure I've ever done that, actually. and I've experimented some with turning the clock. | |||
TimToady | I really wish my font wouldn't say "Oh, it's not East Asian, so it must not be double wide" | 22:27 | |
22:28
FROGGS left,
FROGGS__ left
|
|||
masak | 'night, #perl6 | 22:37 | |
22:38
cognominal left
|
|||
TimToady | single wide: ⑳ double wide: ㉑ | 22:38 | |
22:44
stopbit_ left,
cognominal joined
|
|||
lichtkind | night mäsak | 22:49 | |
22:54
Celelibi left
23:31
benabik joined
23:32
Circlepuller_ joined
23:33
whiteknight joined
23:34
Circlepuller left
23:35
dayangkun joined
23:40
Circlepuller joined,
Circlepuller_ left
23:52
_jaldhar left
23:53
Celelibi joined
23:57
fgomez left
|