»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
00:10 silug joined 00:18 jack_rabbit joined 00:24 kjs_ left, Hor|zon joined 00:29 Hor|zon left 00:38 araujo joined
timotimo it seems kind of like I have been relying on software rendering all this time 00:42
that would explain why rendering took longer than calculating movement and collisions 00:43
00:48 Mouq joined
Mouq pmichaud: re: irclog.perlgeek.de/perl6/2014-10-17#i_9525946 that actually makes more sense with the spec'd semantics of [*] and [**], where the former is every element of one layer and the latter is more like every single element 01:10
01:17 aborazmeh left
TimToady but I don't think ** loses the structure, which is the opposite of flattening 01:25
01:36 jimgnosis joined 01:38 Mso150 left 01:39 Mso150 joined 01:45 jimgnosis left 01:47 Mso150 left 01:48 Mso150 joined 02:18 Mouq left 02:20 Mouq joined
Mouq TimToady: True.. 02:24
02:25 kurahaupo_ joined, kurahaupo left, Hor|zon joined
Mouq masak++: re: your latest blug, I don't know if it's been talked about, but how would the regex supplied to `is parsed` access the P6 grammar? 02:26
masak: I suppose one option would be to mixin to the regex
masak: But another might be a special slangy regex declarator 02:27
02:27 kurahaupo_ is now known as kurahaupo
Mouq
.oO( m:perl:s { } ? )
02:28
I guess that would be s/m/rx/
02:30 Hor|zon left, Mso150_u joined 02:32 aborazmeh joined 02:33 Mso150 left 02:50 noganex_ joined 02:53 noganex left 02:57 cognome left 02:58 cognome joined 03:02 cognome left 03:09 nebuchadnezzar left 03:14 mauke_ joined 03:17 mauke left 03:19 mauke_ is now known as mauke 03:23 ezra1 joined, ezra1 left 03:26 aborazmeh left 03:27 aborazmeh joined 03:32 aborazmeh left 03:49 flaviusb joined 04:08 cognome joined 04:13 cognome left 04:17 chenryn joined 04:18 raiph joined 04:26 Hor|zon joined 04:29 molaf left 04:31 Hor|zon left 04:45 ggoebel11111114 joined 04:46 chenryn left 04:49 ggoebel11111113 left 04:50 yeahnoob joined 04:54 yeahnoob left 05:10 raiph left 05:16 ezra1 joined 05:19 Mso150_u left 05:21 chenryn joined, Mso150 joined 05:25 kurahaupo left 05:38 kaare_ joined 05:43 aindilis left 06:15 anaeem1_ joined 06:18 _slade_ left 06:20 virtualsue joined 06:21 kurahaupo joined 06:27 Hor|zon joined 06:32 Hor|zon left 06:34 molaf joined 06:39 rindolf joined 06:44 gfldex joined
itz m: Any ~~ "Foo" 07:03
camelia rakudo-moar 09a84c: OUTPUT«use of uninitialized value $other of type Any in string context in block <unit> at /tmp/DGRy3MZoCL:1␤␤» 07:04
07:04 Mso150 left, notfix is now known as xfix 07:05 Mso150 joined 07:09 molaf_ joined
itz m: "Foo" ~~ Any 07:10
camelia ( no output )
07:12 molaf left 07:19 darutoko joined
itz m: "Foo" ~~ Any 07:31
camelia ( no output )
itz s: "Foo" ~~ Any
masak morning, #perl6 07:48
07:52 PZt left 07:54 anaeem1_ left 07:55 anaeem1_ joined 07:56 ezra1 left 07:59 anaeem1_ left
moritz \o 08:01
timotimo o/ 08:05
moritz m: say "Foo" ~~ Any # for itz 08:11
camelia rakudo-moar 09a84c: OUTPUT«True␤»
08:24 virtualsue left 08:29 Hor|zon joined 08:33 Hor|zon left 08:34 chenryn left 08:46 Ven joined 08:47 noganex_ left, Ven left
nine_ timotimo: and people thought force_gc() wasn't useful except maybe for my tests in Inline::Perl5 :) 08:51
08:57 spider-mario joined 09:07 rylo joined 09:09 lasse joined 09:11 Mso150 left, Mso150_c joined 09:12 rylo left 09:18 rmgk_ joined, rmgk left, rmgk_ is now known as rmgk 09:20 noganex joined
Mouq really wants some kind of return-if in core 09:26
09:30 Mso150_c left 09:37 nebuchadnezzar joined 09:42 haroldwu joined 09:54 flaviusb left, jack_rabbit left
dalek d: 14ad63b | (Elizabeth Mattijsen)++ | STD.pm6:
s/winner/earliest/
09:55
09:56 ezra1 joined
lizmat good *, #perl6! 09:56
Mouq: not sure what you mean 09:57
09:58 abraxxa joined, ezra1 left 09:59 ezra1 joined
Mouq Well.. I just can't find an idiomatic way to write my $ret = ...; return $ret if $ret 09:59
if ... -> $ret { return $ret } seems so clunky 10:00
abraxxa installs rakudo-star-2014.09 10:03
mauke what would that look like as a macro?
10:04 ezra1 left
abraxxa i'm wondering why class attributes are accessed with $!varname and not $.varname as the exclamation mark is not 10:04
'not' in my mind for almost all languages and '.' is the OO class and attr/method separator in most
10:04 ezra1 joined
mauke wasn't ! private or something? 10:04
abraxxa yes 10:05
moritz yes, ! is private in OO context
$.thing is really a method call
abraxxa that exists too?
i've only come in contact with p6 OO in DBIish
the DBDish modules all use private vars
moritz m: class A { method foo { 42 }; method bar { say $.foo } }; A.new.bar
camelia rakudo-moar 09a84c: OUTPUT«42␤»
moritz and if you say 'has $.thing', then the accessor method is generated for you 10:06
abraxxa ah, so $. does exist, great!
why was ! chosen for the private ones?
moritz m: class A { has $.a; method foo { say $.a; say $!a } }; A.new(a => 42 ) 10:07
camelia ( no output )
mauke as for reading ! as "not", try working in ocaml or haskell for a few weeks :-)
moritz m: class A { has $.a; method foo { say $.a; say $!a } }; A.new(a => 42 ).foo
camelia rakudo-moar 09a84c: OUTPUT«42␤42␤»
abraxxa i don't know ocaml nor haskell
moritz abraxxa: maybe because the negation thing can interpreted as "access denied" from the outside
abraxxa only Pascal, Perl, Python, a little bit of C# and C
mauke ocaml uses ! for deref 10:08
abraxxa moritz: ok, that might help remembering it
mauke haskell uses ! for array indexing and strictness annotations
huf it's a . with a bar on top, denying access :)
mauke nice 10:09
abraxxa so when I want to define an attribute I have to use 'has Str $varname;' or 'has Str $.varname;'?
10:12 ezra1 left
lizmat abraxxa: either $.var or $!var, depending on whether you want an accessor made for you 10:14
abraxxa lizmat: thanks!
lizmat if you want to have an attribute accessible from the outside but populated lazily
has $!foo; method foo { $!foo //= some calculation } 10:15
10:16 ezra1 joined 10:17 chenryn joined 10:22 chenryn left
abraxxa i'm still looking for a way to have a default value on a test file that gets evaled in other test files that should be able to override it's value 10:25
lizmat: i have attributes that are required to be set an instantiation time and are immutable 10:26
DBDish currently solves this using private attributers and a submetho BUILD
lizmat that sounds about right ? 10:27
moritz if it's a value type, you don't have to fear modifications from the outside, even if you expose it
dalek kudo/nom: 52c224b | (Elizabeth Mattijsen)++ | src/core/IO/Path.pm:
Introduce faster IO::Path creator for abs paths
abraxxa lizmat: ok
moritz has Int $.plan = die 'Attribute "plan" is required'
10:27 vendethiel joined 10:28 vendethiel- left
abraxxa moritz: yes, i tend to that solution as well 10:28
moritz lizmat: and reason not to call it new-from-absolute-path? 10:29
lizmat: new-fap sounds kinda obscure to me
lizmat I guess I had my inspriation from new-fp in bags and so
I guess I should rename them as well... :-)
10:29 Hor|zon joined
moritz aye :-) 10:30
10:30 ecocode joined
abraxxa anyone familiar with DBDish::Pg? 10:33
moritz is there already a branch for GLR?
abraxxa it seems Oracle requires the SQL placeholder ? quoted and the grammar in Pg seems to do that
moritz abraxxa: I think I wrote it originally
abraxxa github.com/abraxxa/DBIish/blob/mas...g.pm6#L453
lizmat moritz: no, don't think so
10:34 ezra1 left
abraxxa moritz: that does the grammer starting at line 147 do? 10:34
10:34 Hor|zon left
mauke basic tokenizing, it looks like 10:35
10:35 ezra1 joined
mauke and not handling comments 10:35
abraxxa reads doc.perl6.org/type/Grammar
moritz abraxxa: it replaces ?, ? by $1, $2 etc
abraxxa ah, because Pg doesn't use ? as placeholder in SQL?
moritz abraxxa: trying to not substitute ? inside quotes
mauke the \'\' case seems redundant 10:36
without it, 'foo''bar' would simply be parsed as two single-quoted chunks
abraxxa moritz: what would you recommend to do when I only want to substitute ? with '?'
mauke wait, if a DB treats '?' as a placeholder, how do you write an actual string containing a question mark? 10:37
moritz abraxxa: you basically need the same tokenization effort, because otherwise you don't know which question marks to escape
abraxxa mauke: www.techonthenet.com/oracle/errors/ora00911.php
moritz mauke: also it doesn't handle the $delim$...$delim$ syntax
abraxxa currently when I try to execute INSERT INTO nom (name, description, quantity, price) VALUES ( ?, ?, ?, ? ) I get an ORA-00911 10:38
mauke abraxxa: what
abraxxa it seems because of option #3 in the linked article
mauke using '?' wouldn't make it use placeholders
abraxxa i have a hard time trying to find out what Perl 5s DBD::Oracle does 10:39
mauke according to your link it would simply insert "?"
dalek kudo/nom: b450e9b | (Elizabeth Mattijsen)++ | src/core/IO/Path.pm:
s/new-fap/new-from-absolute-path/ moritz++
10:40
kudo/nom: 42c9a55 | (Elizabeth Mattijsen)++ | src/core/ (9 files):
s/new-fp/new-from-pairs/ moritz++

Since this is a purely internal method, no deprecation cycle appears to be needed.
abraxxa mauke: you mean i might get this error because I haven't bound a value to the placeholder and still execute it?
10:41 kjs_ joined, ezra1 left
mauke well, I don't know what syntax oracle uses for its placeholders 10:41
maybe it needs :param instead of ?
ooh, DBD::Oracle turns ? into $1 10:43
abraxxa mauke: in which file and line number? 10:44
mauke still looking 10:45
but the documentation says so :-)
10:49 ecocode left
mauke documentation is lying 10:51
abraxxa Oracle has multiple ways to bind: OCIBindByPos() OCIBindByName() OCIBindObject() OCIBindDynamic() OCIBindArrayOfStruct() 10:52
mauke: hihi
mauke it rewrites ? into :p1, :p2, etc
and :1 into :p1
10:53 ezra1 joined
mauke abraxxa: dbd_preparse in dbdimp.c 10:53
abraxxa wonderful SQL standard...
mauke: thanks, looking
as the input from a user to DBIish is always the same regardless of DBD used the grammer for parsing it should be shareable 10:55
it might even make sense to put it in a separate dist 10:56
10:56 ecocode joined
abraxxa i think I just found a read after end of string issue in dbdimp.c line 1463: if ((*src == '-' && *(src+1) == '-') || (*src == '/' && *(src+1) == '*')) 10:57
it doesn't check if src+1 is still contained in src
10:58 ecocode left 10:59 rindolf left
kurahaupo abraxxa: is the string null terminated at that point? 11:00
abraxxa kurahaupo: good question, I don't know
11:07 rindolf joined, Ven joined 11:08 Ven left
timotimo Mouq: return my $foobar if $foobar = 1 + 4 11:16
abraxxa what is the Perl6 equivalent of make test? 11:18
timotimo abraxxa: if you generate a makefile with ufo, you can straight up use "make test" 11:19
abraxxa what ufo?
i abuse panda install . at the moment for it 11:20
timotimo github.com/masak/ufo
11:20 anaeem1 joined
timotimo (which may currently be in a non-working state due to changes to rakudo and module installation stuff ) 11:20
dalek kudo/nom: 6556770 | (Elizabeth Mattijsen)++ | src/core/ (5 files):
Use IO::Path.new-fap where possible

This should give about a 4% gain in startup time and module load times. Spectest seems to go from 176 -> 169 seconds, which sort of confirms this also.
11:30
timotimo ah, that looks like a good idea 11:31
dalek kudo/nom: 5f2cea3 | (Elizabeth Mattijsen)++ | docs/ChangeLog:
Some ChangeLog updates
11:36
timotimo getting easy access to an OpenGL-accelerated cairo drawing thingie on gtk is going to be available in march next year ... 11:37
11:37 kaare_ left
lizmat cycling& 11:39
abraxxa lizmat: have fun! 11:40
breinbaas bon courage (strong wind & rain) 11:41
abraxxa where can i read about grammars? doc.perl6.org/type/Grammar is a bit sparce and learnxinyminutes doesn't cover grammars
11:42 ghostlines joined
abraxxa perl6advent.wordpress.com/2009/12/2...d-actions/ is quite good as starting point 11:46
11:46 ghostlines left, Ven joined
timotimo everything that applies to regexes also applies to grammars 11:50
so that's a "starting point" on its own
doc.perl6.org/language/grammars - have you looked at this? 11:51
it's quite short, sadly
abraxxa no, haven't thanks 11:53
this alone is such a powerful Perl 6 feature 11:54
timotimo aye
abraxxa i want to parse my syslog messages with it
timotimo doc.perl6.org/language/regexes - this one is much less small
why not use an approach like journald that already allows you to build structured log messages?
that's much, much saner than parsing log messages
abraxxa is a token TOP required? 11:55
timotimo if you supply a :rule to the Grammar.parse, then no
abraxxa timotimo: tell that Cisco ;)
timotimo :rule("NOT_TOP") would allow parsing to start at a token NOT_TOP
otherwise, TOP is the default starting point
for parse and subparse and parsefile
abraxxa i see, thanks
it's confusing to list the object on which the method is called as the first param: doc.perl6.org/language/grammars#method_parse 11:57
timotimo you mean the invocant?
abraxxa as p6 has native classes and the method keyword it's an implementation detail that the object a method is called on is passes as the first param
timotimo that's right, it's kind of surprising when you're not used to it 11:58
hm, is that actually how we do it internally?
abraxxa and as you don't unpack @_ like in p5 I guess the user doesn't care as there is a special variable to access $self
Mouq abraxxa: It's not the first param
timotimo if you have a *@_, it won't have self in the first slot
that much i know
i don't know exactly how we handle all of that internally 11:59
abraxxa so the docs are wrong
Mouq abraxxa: It looks like it, but the signature is actually (Grammar:D \self : $str ...)
timotimo the docs are not wrong
just surprising to a non-experienced perl6 person
Mouq The term before the ":" describes the invocant
timotimo yes, that's the key point
the : doesn't seem helpful at all
abraxxa what does Grammar:D: mean?
timotimo especially if you don't know what :D is 12:00
the :D and : just kind of bunch up together into a single "what the fuck is this" thing if you don't know it yet
Mouq abraxxa: A defined Grammar object, e.g., something derived from Grammar that's been called .new on
abraxxa the code in DBDish::Pg does PgTokenizer.parse($statement), so $str is the first param
seeing something before it in the docs is confusing 12:01
timotimo i agree
it's confusing and it should be changed, but it's not "wrong"
abraxxa Mouq: what sense does it make to call GrammarA.parse($grammarbobj, ... )?
timotimo that's not how you do that
you would GrammarA.parse($grammarobj: $string, ...)
(there's the : again) 12:02
abraxxa what would that do?
timotimo it marks the $grammarobj as "the thing to be passed as the invocant"
abraxxa the description of the parse method doesn't mention Grammar:D: at all 12:03
Mouq timotimo: Pretty sure that's NYI
abraxxa why not write that as $grammarobj.parse($string, ...)?
Mouq std: Str.test("foo": "bar")
timotimo it may have to be GrammarA.^find_method("parse")(...)
camelia std 14ad63b: OUTPUT«(timeout)»
timotimo true, we parsefail that apparently 12:04
Mouq timotimo: If it's even correct %)
abraxxa: You don't explicitly pass the invocant, like that, in general 12:05
abraxxa looks like somebody tried to restore Perl's "you can't read it" cliche very hard when designing Perl 6...
Mouq abraxxa: The purpose of including the invocant in the signature is to put type constraints on it
timotimo if invocants in signatures is the only thing that makes you say that, we're at a pretty good spot with perl6 in general :)
abraxxa how is "foo" an object?
Mouq m: Grammar.parse("foo")
timotimo it's a string, strings are objects
Mouq abraxxa: It's an object of type Str
camelia rakudo-moar 09a84c: OUTPUT«(timeout)» 12:06
abraxxa so is "bar"
why would I want to pass in a type when i pass in the object of that type anyway?
what's the use case?
12:06 chenryn joined
Mouq And if you wanted to specify that you wanted to operate on only defined Strs and not `Str`, you'd write Str:D $param 12:07
timotimo if you have a method as an object
for higher-order-programming for example
and you can put more specific constraints onto your invocant in a signature, do some unpacking, give it a different name
abraxxa i could do that by subclassing and overriding parse or adding another method which gets called instead of parse and calls parse internally 12:08
timotimo that's not a sensible argument to make, IMO 12:09
you could also say "what do i need multiple dispatch for? i can do that with a single method that inspects the passed argument on its own and just has a list of candidates to match on"
Mouq abraxxa: Wait, you mean, why would you want to pass in a type to .parse? 12:10
abraxxa so Grammar:D: is no param hence why no comma between it and $str but something optional to be specified when passing in $str
Mouq: yes
12:10 lasse left
abraxxa timotimo: yes, but with the difference that multiple dispatch is something that might be useful way more often to validate as a core feature 12:11
timotimo FWIW, i'd actually use a grammar's type object for the .parse .subparse and .parsefile methods
12:11 chenryn left
Mouq Yeah, the doc's *are* wrong there 12:11
abraxxa p5 guys would oppose and thell you to write a module for it ;)
are the docs autogenerated?
Mouq src/core/Grammar.pm: method parse($target, ...)
abraxxa: Nope
timotimo parts of it, yes, not nearly all of it
abraxxa timotimo: the signatures? 12:12
timotimo the docs
Mouq Well, a lot of it is autogenerated from other parts of the doc, but nothing comes from outside, unfortunately
timotimo oh, you mean that part
abraxxa yes
timotimo i'm going to change these signatures in the grammars.pod now
abraxxa waits what it looks like afterwards 12:13
'Grammar' means the Class, but what does the :D: mean?
timotimo :D means defined
: after that means "the left side of this is the invocant" 12:14
abraxxa that's usually a smily
Mouq abraxxa: github.com/rakudo/rakudo/blob/nom/...mmar.pm#L2
abraxxa will be fun when people have emoticons turned on in their irc clients
Mouq abraxxa: :)
dalek c: a3852b7 | (Timo Paulssen)++ | lib/Language/grammars.pod:
remove wrong invocant parameter to Grammar's parse methods

they are not only confusing to beginners, but also wrong
  (as in: i use parse with a Grammar type object all the time)
timotimo ^- looks good?
abraxxa: that's the Type Smiley 12:15
"A Type Smiley"
there's also :T and :U iirc
abraxxa timotimo: but now you don't what that a type can be passed too as well? 12:16
timotimo yeah
m: Grammar Foo { }; Foo.parse("hi")
camelia rakudo-moar 09a84c: OUTPUT«(timeout)»
abraxxa so can you pass a type or not? 12:18
timotimo yes, you can
the signature in that document was wrong
abraxxa because from the code Mouq linked to I can't see that
timotimo github.com/rakudo/rakudo/blob/nom/...Grammar.pm
abraxxa yes, but there is just $target 12:19
timotimo yeah
abraxxa can you pass a type to every parameter in Perl 6?
Mouq abraxxa: Yeah, the invocant isn't specified in that -- there's no need to if you're not changing what you call it or making sure you type check
timotimo if a method doesn't rely on self being defined, it's no problem 12:20
Mouq abraxxa: Yeah
abraxxa: If camelia wasn't timing out, it'd be easy to show
abraxxa like when you specify the signature of a method with method foo ( Str $string ) ?
timotimo that is correct, in that case you could supply Str itself as $string 12:21
abraxxa ok
12:23 anaeem1 left
abraxxa what does the . mean here github.com/abraxxa/DBIish/blob/mas....pm6#L153? 12:25
is it just a regular 'any-single-character' regex?
timotimo no, it's a "don't capture this" marker 12:26
"call double_quote_normal, but don't make a named capture"
12:27 anaeem1_ joined
abraxxa and the ( | | | ) are a list of possible tokens? 12:27
i just wonder why a | is in front of the first one and not just inbetween the possible tokens like a regular or 12:28
timotimo because it looks nicer
| is not like perl5's |
perl5's | is now called ||
| gives you "longest token matching" semantics
12:31 Hor|zon joined
Mouq m: say "aaaaa" ~~ /aa|aaaa/ 12:32
camelia rakudo-moar 09a84c: OUTPUT«「aaaa」␤␤»
Mouq m: say "aaaaa" ~~ /aa||aaaa/
camelia rakudo-moar 09a84c: OUTPUT«「aa」␤␤»
12:34 raiph joined 12:35 Hor|zon left
abraxxa yay ORA-01008: not all variables bound 12:38
i wonder why a grammar is used to detect and replace placeholders but not for quoting
the gammar should be moved to DBDish and each DBDish module should define a action class 12:39
Mouq That grammar looks questionable.. if you type 'a literal '' here' it'll produce "a literal '' here" instead of "a literal ' here" as far as I can tell 12:42
12:42 anaeem1_ left
Mouq Oh, wait 12:43
It doesn't even matter, cause everything is just joined back together?
12:43 kjs_ left
Mouq Just evidence I rarely actually know what's going on :9 12:43
12:43 kjs_ joined 12:46 kaare_ joined 12:48 anaeem1_ joined 13:05 Ven left
vendethiel in DBIsh, if you commit while in auto-commit, it warns. Seems okay. But I think rolling back should die. 13:07
abraxxa how do I know if a Str is defined or not in p6? 13:28
i could use chars as Oracle doesn't differentiate between an empty string and null 13:29
Mouq m: say Str.defined 13:34
m: say "foo".defined
camelia rakudo-moar 09a84c: OUTPUT«(timeout)» 13:35
Mouq True
False
Eff
*err
say "foo".defined # True
say Str.defined # False
abraxxa the error message 'Unsupported use of ?: for the conditional operator; in Perl 6 please use ??!!' could use some polishing 13:36
to show that the construct ? $something : is meant
i was looking for literal ?: in my code and couldn't find it 13:37
grondilu maybe 'ternary conditional operator' instead of just 'conditional operator' 13:43
mauke Unsupported use of X ? Y : Z ... please use X ?? Y !! Z
TimToady didn't it give a good line number? 13:45
unfortunately there's no good way to spell that operator that won't be misleading to someone 13:46
it's mostly "ternary operator" in the literature, but I actually kind of hate that usage, since it's not the only possible ternary operator 13:48
maybe ? : and ?? !! would be clearer than leaving the space out
or even '? and :' vs '?? and !!' 13:49
abraxxa mauke: yes, something like that 13:52
TimToady: the call has 10 parameters and in one of them i used it. the error message reported the line number where the call starts
TimToady maybe we could do better on operator locations 13:53
abraxxa TimToady: i'm not a native English speaker and 'ternary' does mean nothing to me
bonsaikitten abraxxa: it's a pretty well-defined term in mathematics and programming
TimToady which doesn't preclude it from being a form of cultural imperialism :) 13:54
bonsaikitten if I'm not completely confused it's them frenchies at work again ;) 13:55
should be a latin root
13:55 chenryn joined
TimToady certainly the parser knows which line the operator is on, so ought ot be able to report it 13:56
14:00 chenryn left
mst TimToady: call one of them a noddy operator? according to wikipedia, it's a type of Tern 14:01
of course, given wikipedia, I could've been gulled ... but it only claims gulls to be closely related rather an an isa relationship 14:02
TimToady if it's so difficult to fish for, perhaps we should call it the trout operator 14:05
dalek kudo/nom: 02f1e55 | TimToady++ | src/Perl6/Grammar.nqp:
improve LTA message on ?: for abraxxa++
14:09
abraxxa TimToady++ #thanks! 14:10
14:10 guru joined 14:11 guru is now known as ajr_
TimToady as for the line number, that does seem to be correct already 14:11
14:13 BenGoldberg joined
abraxxa as i say the call goes over multiple lines 14:13
TimToady but it does seem to point to the line containing the ? 14:14
at least for my test
abraxxa no the method call
sorry, my bad, yes it does 14:15
i need to pass a pointer to a value to OCI
the value can be an int or a string
TimToady is not blaming abraxxa for the clunky interface :) 14:16
abraxxa I've defined the param as CArray[int] and now need to convert the Perl 6 value to a bytestring
nah, i should have scrolled back to the error before
depending on the type I also need to set an additional parameter
what's the best way of doing that? 14:17
using ACCEPTS?
have to leave now, bye 14:22
14:22 abraxxa left, cognome joined 14:23 anaeem1_ left 14:26 rindolf left 14:28 anaeem1_ joined 14:29 anaeem1_ left, rindolf joined 14:32 Hor|zon joined 14:34 zakharyas joined 14:36 Hor|zon left 15:01 Akagi201 left 15:07 rindolf left 15:09 rindolf joined 15:13 rurban joined, gtodd joined 15:14 gtodd1 left 15:17 vendethiel left 15:18 vendethiel joined 15:19 spider-mario left, Ven joined 15:22 flaviusb joined 15:23 vendethiel left 15:25 Ven left 15:27 vendethiel joined 15:29 Ven joined 15:32 [Sno] left, Sandy joined 15:33 Sandy left 15:34 [Sno] joined, raiph left 15:39 vendethiel left, vendethiel joined 15:40 Ven left 15:41 chenryn joined, Ven joined 15:45 mattp_ joined 15:50 ajr_ left, guru joined, guru is now known as ajr_
dalek rlito: a4f5c34 | (Flavio S. Glock)++ | / (3 files):
Perlito5 - js - add "wantarray" context to regex emitter
15:51
rlito: 72be83f | (Flavio S. Glock)++ | / (2 files):
Perlito5 - command line - patch for -I, contributed by shlomif++ - github.com/fglock/Perlito/issues/21
15:58
ecs: 9282235 | TimToady++ | S06-routines.pod:
start revising the highly maligned macro specs :-)
rindolf fglock++ 15:59
15:59 rmgk left 16:00 rmgk joined
Ven m: say Tainted 16:07
camelia rakudo-moar 42c9a5: OUTPUT«===SORRY!=== Error while compiling /tmp/Q2XFcKVXhL␤Undeclared name:␤ Tainted used at line 1␤␤» 16:08
lizmat m: say NYI
camelia rakudo-moar 42c9a5: OUTPUT«===SORRY!=== Error while compiling /tmp/OJQRAMXw2C␤Undeclared name:␤ NYI used at line 1␤␤»
BenGoldberg m: X::NYI.new("Tainted").throw; 16:10
camelia rakudo-moar 42c9a5: OUTPUT«Default constructor for 'X::NYI' only takes named arguments␤ in method new at src/gen/m-CORE.setting:926␤ in block <unit> at /tmp/jAD4XHzitZ:1␤␤»
dalek rlito: c68d5aa | (Flavio S. Glock)++ | html/perlito5.js:
Perlito5 - remove html/perlito5.js - as discussed at github.com/fglock/Perlito/issues/21
16:11
kudo/nom: 5730d74 | (Elizabeth Mattijsen)++ | src/core/ (3 files):
Make some .pick()/.roll() situations ~15% faster

By providing a MMD candidate without parameters
16:26
kudo/nom: 2587462 | (Elizabeth Mattijsen)++ | src/core/Cool.pm:
Make Cool.round also about 15% faster

By providing a MMD candidate
kudo/nom: 987ce8e | (Elizabeth Mattijsen)++ | src/core/ (4 files):
Remove unneccesary default initializations
rlito: bd8a88e | (Shlomi Fish)++ | src5/lib/Perlito5/Javascript2/.Emitter.pm.swp:
Remove a temporary vim file.
16:28
rlito: ba4e482 | (Shlomi Fish)++ | .gitignore:
Add generated files to .gitignore.
rlito/JavaScript_proper_case: b89e750 | (Shlomi Fish)++ | / (6 files):
Correct the capitalisation of "JavaScript".
vendethiel erm, at that point, should perlito still get logged in here? 16:30
lizmat Fwiw, I don't think Flavio cares either way 16:32
16:33 Hor|zon joined 16:37 Hor|zon left
raydiak good morning #perl6 16:38
16:38 rurban left
b2gills m: pi.Rat.perl 16:41
lizmat m: say pi.Rat.perl 16:42
camelia rakudo-moar 42c9a5: OUTPUT«(timeout)»
lizmat
.oO( camelia is sleepy )
raydiak what's the story with camelia lately? timeouts are all I've gotten for like 2 days
lizmat the new host08 seems to be underpowered for handling camelia and other (jvm) stuff 16:43
a new server is being set up, afaik
raydiak ah
b2gills pi.Rat.perl says 335/113 which is nowhere near 3.14
raydiak 3.14159292...isn't near? 16:45
oh, you got 335
locally it gave me a numerator of 355
geekosaur I wonder if that was a typo... 16:46
b2gills oops sorry
geekosaur (355/113 is one of the classic ratios approximating pi, ftr)
BenGoldberg m: say 'ok'; 16:47
camelia rakudo-moar 42c9a5: OUTPUT«(timeout)»
BenGoldberg std: say 'ok';
camelia std 14ad63b: OUTPUT«(timeout)»
b2gills sometimes it is hard for me to tell which character is repeating, and many times it is repeating 16:48
BenGoldberg Is std done using perl5 or perl6?
moritz BenGoldberg: it's perl 6 compiled to perl 5
grondilu > say pi.FatRat.perl 16:50
BenGoldberg This isn't the best workaround, but maybe camelia should detect the cpu usage of the machine it's on, and set a longer timeout when the machine is loaded?
grondilu FatRat.new(355, 113)
grondilu was expecting a different, more accurate approximation here
(though 355/113 is pretty good already) 16:51
TimToady
.oO(LazyRats)
16:54
a real LazyRat would of course be attached to a pi spigot... 16:55
as opposed to a Garfield which would be attached to a pizza spigot 16:56
BenGoldberg A real LazyRat would be some sort of continued fraction. Then you could have pi spigots, e spigots, etc 16:58
grondilu A LazyRat would actually be an accurate representation of a real number, for real numbers are defined as limits of sequences of rational numbers. 16:59
one issue being that such representation is not unique, making it a bit difficult to use in a computer language. 17:01
17:02 molaf_ left
TimToady detailsese̅s̅ 17:05
huh, gnome-term does the overlines right, but firefox screws 'em up here... 17:06
17:08 Mso150_c joined
mst I had a FatRat and a LazyRat once 17:08
Mouq TimToady: Might have something to do with the font
mst the LazyRat was insane, a dope fiend, and tried to eat the cat
17:10 Mso150_c_r joined 17:13 Ven left, Mso150_c left
BenGoldberg The bigger issue with an infinitely long rat is not the lack of uniqueness, but that some operations can take an infinitely long time, depending on the representation. I recall a continued fraction library, where getting the integer portion of sqrt(2)**2 would go into an infinite loop. 17:23
masak salutationes, #perl6 17:33
so, earlier this week I was toying around with `my @.things` inside classes and roles. felt pretty clever about the whole design. 17:34
until I wrote my second unit test.
vendethiel boom!1 17:35
masak the input data from my first unit test interfered with the input data from my second one. why? because all the `my @.foo` things were essentially globals.
we keep talking about how "unit tests promote/encourage/induce a testable architecture, making everybody win"
this was the most violent and somehow ironic case I have experienced. 17:36
it gave me a new dis-appreciation of the singleton pattern, as I now more clearly see the structure of its badness.
17:37 Mso150_c_r left, zakharyas left, grondilu left, nickpatch left, xfix left, woolfy left
masak choosing Singleton means saying "I stake my architecture on the fact that there will ever only be one universe in which this particular data set can exist... contrary to the norm" 17:37
17:37 bloonix joined, grondilu joined, woolfy joined 17:38 sorear joined, nickpatch joined, hobbs joined, Mso150_c_r joined, dylanwh joined, zakharyas joined
mst masak: my view is 'the Singleton is a pattern invented by java developers to fake global variables' 17:38
17:38 xfix joined
mst masak: in a language which actual global variables, using one tends to be an improvement 17:38
masak so I'm now migrating over to an architecture where I have an outermost `$db` object, and all the things that were effectively singletons are defined as attributes on `$db`. 17:39
mst right, precisely where I try and send people
masak mst: what bit me here was using class attributes (as opposed to instance attributes). so, essentially globals.
vendethiel masak: did you not *expect* them to be globals??
mst yes. I actively discourage the use of class attributes in M* perl5 code 17:40
specifically because it's basically a magic global variable, except really easy for people to forget
masak vendethiel: yes, sure. but I didn't mind until the second test bit me.
17:40 ggherdov joined
vendethiel I actually think php's global variables are a better solutions than singletons 17:40
masak vendethiel: I even started down the path of manually "resetting" all the data between the first and the second test. but then I went "this is stupid, I'm doing extra work because the architecture is wrong".
mst vendethiel: realising the consequences of their being globals seems to be much harder to do when it's a class attribute and doesn't "look" like a global
vendethiel maybe I've actually been bit by this bug in other languages and I know how terrible it is, so I just know NOT TO use them now :p 17:41
masak for me it was more of a case of "welcoming the consequences" :)
BenGoldberg Sounds a bit like Perl5's CGI.pm
vendethiel masak: I for one welcome our new my twigil overlords. 17:42
masak vendethiel: I honestly didn't see the problem, even though I know globals/singletons are bad. I share it here because I believe communities grow by sharing stories about failure :)
BenGoldberg It pretends to be OO, but there're heaps of hidden globals. 17:43
vendethiel masak: I'd probably have the same reaction if I didn't get the very same issue doing so much js
masak my JavaScript programming these days leans heavily on a style of "clusters of objects", all instances, no classes.
kurahaupo BenGoldberg: does anyone in their right mind use CGI.pm other than to instantiate a request object?
vendethiel masak: sure, but still - PROTOTYPES!1
mst nobody in their right mind has used CGI.pm for a decade at all
vendethiel I still use classes for performance reasons
17:44 chenryn left
mst masak: right, the interesting thing is that the term 'class attribute' seems to magically make it so people who'd normally find it obvious don't foresee the problems 17:44
vendethiel making it easy for your JS engine to see the classes is a nice perf imp. when you're js-bound
mst masak: I really can't work out why, but I've seen it repeatedly
masak mst: I'm struggling to work out why I fell for it, too.
mst: part of it is that it really felt like a good solution, until I tried to unit test it. 17:45
mst: that is, the concept of class variables triggers neither the "globals" neurons nor the "singleton" neurons.
it should, but it doesn't.
mst right
masak next time this happens, I'm sure it will :>
mst that's why I jumped in and gave the spiel 17:46
because I've seen sooo many people fall for it :)
masak mst: re your "nobody in their right mind" above -- you're fortunate to know a whole lot of people who keep in touch with the Perl community, and update their module usage... :)
I know some who do neither. I would consider them to be "in their right mind"... just very out of date. 17:47
I wonder how they would react to hearing SawyerX talk about killing CGI.pm.
mst masak: "running screaming from CGI.pm" was one of the major contributors to my joining the perl community in the first place.
dalek kudo/nom: dcd32e5 | (Elizabeth Mattijsen)++ | src/core/Baggy.pm:
Make Bag.pick/roll/grab ~2x as fast
17:49
masak another nice thing that fell out from getting a $db object to contain it all, is that this object can now soak up some of the "algebra" of my domain.
masak lizmat++
kurahaupo CGI.pm seemed an awful mash-up 17 years ago, mixing up html constructors, http requests, and http responses 17:50
ajr_ masak: " I believe communities grow by sharing stories about failure " You are absolutely right; that's why aviation has become so much safer in the last 50 years; examining and confronting failures.
17:50 ajr_ left
masak ajr_: one day I will give a talk about all the kinds of opposition that are good and make us better. most games people play are zero-sum, because that creates the most interesting dynamics. bug reports are all about the disconnect between desires and reality. I would much rather hear the story about a failed project than a successful one. good designs arise in the forge of massive forces acting on them from all directions, and a balance being found. 17:52
17:52 yogan joined
kurahaupo "sharing failures" is probably the fastest way a community can make progress, by spending effort on new failures instead of old ones. :) 17:53
masak in some sense, avoiding some repetition of other communities' failures is impossible.
but it's worth trying.
I remember some of my early interaction with the Perl 5 people while developing Web.pm -- they quite clearly said "please don't make the mistakes we made -- make new, more interesting ones!" 17:54
actually, it's interesting to think about the Perl 5 and Perl 6 communities from this angle. both communities have kind of a "fingerprint", a set of preferred failures. 17:55
kurahaupo For me the archetypal "improvement by sharing failures" is "how did the indigeous Mãori people here discover that the lethally toxic Karaka berries could be edible if subjected to a 4-step process?" 17:56
It certainly puts the cost of software development into perspective 17:59
BenGoldberg Discovering that something poisonous can be made edible probably happens as follows: "I've got this poison, and I want to kill such-and-such type of animal with it. But those animal *know* it's poison; how can I treat the stuff to disguise it." followed by "The animal ate it, but didn't die! Why not? Is the stuff somehow not poisonus anymore?" 18:01
vendethiel kurahaupo: hahahaha nice one!
18:01 _slade_ joined
masak kurahaupo: I read about the steps here: rsnz.natlib.govt.nz/volume/rsnz_04/...002360.pdf -- yeah, it's quite a discovery. but the steps do make a certain sense, at least after the fact. they're not just random. 18:02
kurahaupo: they're of the kind where you can go "ok, what do I need to do to de-poison these berries?"
...or what BenGoldberg said. that's ingenious.
what's the software development equivalent of testing your maybe-poisonous berries on wild animals? having good unit tests, I guess. 18:03
kurahaupo masak: I have to admit, the option of animal testing in prehistoric times hadn't occurred to me 18:06
masak it probably occurred to the prehistoric people.
kurahaupo however the only native mammals here are bats
masak though the question is how similar the animals need to be for the results to apply to humans. 18:07
kurahaupo Another option is that *weaponized* berries sometimes failed 18:08
masak sounds more like end-to-end tests. 18:09
though maybe that is taking the analogy too far :) 18:10
geekosaur would have thought *that* would be those coffee beans that need to go through the GI tract of a civet cat... 18:11
kurahaupo masak: berry testing on wild animals would be like having good unit tests with some randomized real-world inputs 18:13
geekosaur: rofl
breinbaas wikipedia says maori imported dogs
18:14 molaf joined
kurahaupo wikipedia would be wrong then, or at least, not clear on the timeline 18:14
breinbaas oh wait it says 1250. that's a bit lateish 18:15
kurahaupo They imported rats, but they're a bit tricky to catch *living* so you can feed them berries 18:16
and the rats are smart enough to share failures too: timmy ate those yummy looking berries and curled up his tail; I don't think I'll bother 18:17
18:17 Ben_Goldberg joined 18:18 BenGoldberg left, Ben_Goldberg is now known as BenGoldberg, anaeem1_ joined
kurahaupo what's the software equivalent of an uncooperative test subject? 18:19
masak geekosaur: on my latest visit to .cn I was "fortunate" enough to get to try a kind of tea the had been through the digestive tract of some insect or other. 18:20
geekosaur: it had the exactly-what-it-says-on-the-tin name "bug poop tea".
geekosaur kurahaupo: anything with a bug :) 18:21
18:22 jack_rabbit joined 18:23 ezra1 left
kurahaupo more like, software that has extra inputs to detect the mood of the operator, so it can adapt its perversity to their frustration 18:24
18:24 ivanshmakov is now known as ivanshmakov|
kurahaupo has actually encountered timing bugs that were triggered by the relaxed "I've fixed all the bugs" operator's typing patterns, and suppressed by the anxious operator's typing timing 18:26
that was a hellish weekend 18:27
18:27 cognome left 18:28 cognome joined, ivanshmakov joined 18:30 cognominal joined 18:31 cognominal left, cognominal joined
moritz spontaneously caramelized cashews today. Quite tasty! 18:33
18:34 Hor|zon joined
vendethiel I read "cashier"... 18:34
18:38 Hor|zon left
mst kurahaupo: that's ... wow 18:38
18:39 ivanshmakov| left, amkrankruleuen left
lizmat I wonder whether there is a faster way to create a clone of a list of Pairs than doing list.map: { (.key => .value) } 18:39
moritz: something with nqp::clone maybe ? 18:40
18:41 cognome left
moritz lizmat: that's shallow, so it would have to list.map: { nqp::clone($_) ] 18:43
masak .oO( how dare you call my idea shallow! ) :P 18:47
kurahaupo masak: thanks for the link on the preparation of Karakine 18:48
masak np. I found it out of self-interest :)
kurahaupo mst: it got more consistent as fatigue set in 18:49
lizmat moritz++ 18:50
vendethiel kurahaupo: I don't even understand what you said :p 18:52
18:52 amkrankruleuen joined 18:53 _slade_ left 18:55 molaf left 18:57 slavik left
masak moritz: where can I learn more about caramelization of foods? 18:58
kurahaupo vendethiel: the timing bug got more obvious as the operator became fatigued
vendethiel ooh. that kind of operator hahahaha 18:59
mauke EXOI www.oocities.org/hanson_c/haha/assembler.txt 19:01
hmm, wrong list. doesn't have BBW
svr-www.eng.cam.ac.uk/~trn/OpCodes.html this one does 19:02
vendethiel ZEOW 19:04
timotimo hmm 19:05
fuzzing is a kind of test that feels like testing with an uncooperative test subject
though I may have test subject and tester switched 19:06
19:10 ezra1 joined 19:11 slavik joined 19:12 anaeem1_ left, darutoko left 19:15 Exodist joined
Mouq gist.github.com/Mouq/c4be050479e563c71408 19:17
19:18 virtualsue joined
kurahaupo timotimo: when working in large corporates, I've sometimes planted deliberate "bugs" to see if the testers are awake 19:18
timotimo hah 19:23
ezra1 question about use of perl6 on the jvm 19:27
19:27 xfix is now known as notfix
timotimo go ahead 19:27
ezra1 ive setup libgdx imported the proper jar and classes in p6
how would i do something like public class MyGdxGame extends ApplicationAdapter 19:28
19:28 leont joined
timotimo doesn't actually know >_< 19:28
ezra1 me either? 19:29
tried "is" but thats not really the case
guess ill bang my head on it for a few days 19:31
19:33 ezra1 left 19:35 anaeem1_ joined
vendethiel Mouq: gist.github.com/Mouq/c4be050479e56...-a1-p6-L42 is that 0-safe? 19:36
timotimo m: say "".substr(* - 1) 19:37
Start argument to substr out of range. Is: -1, should be in 0..0
camelia rakudo-moar 42c9a5: OUTPUT«(timeout)»
vendethiel m: say "a".index("a") 19:38
timotimo hm, actually
camelia rakudo-moar 42c9a5: OUTPUT«(timeout)»
timotimo "foobar".index("") gives you
0
so it would return out of the sub before it'd hit that substr call
i don't understand what this code is even supposed to do
the output (or is that input?) at the bottom doesn't tell me anything 19:39
19:39 ezra1 joined, Mouq left 19:52 Mso150_c_r left 19:54 Mso150_c_r joined 20:05 kaare_ left 20:14 Mouq joined 20:15 _slade_ joined
Mouq timotimo: Err, yeah, I just kind of dropped that link and walked away. It stitches together text from fragments. The input that came with the problem produces: all is well that ends well 20:16
lizmat
.oO( spending ~hour on an obscure setting bug is no fun )
20:18
I'm getting a Cannot invoke this object (REPR: Null, cs = 0) on simple code as $pair.value 20:19
Mouq lizmat++ that's the worst :(
(not that bug in particular)
lizmat is glad the settings build in <1 minute 20:20
but it stays annoying nonetheless
raydiak thanks to everyone helping with all my questions the last few days, I'm starting to make real progress: gist.github.com/raydiak/6fb0016cf397bf1420f5 20:21
woolfy goes over to lizmat and pat her on her back and hug her because she needs it (I think)... 20:22
carlin m: class Foo { has @.drinks; method drink { @.drink.push: 'water'; } }; Foo.new.drink; # that typo causing an infinite loop was annoying to track down 20:23
lizmat feels better :-)
camelia rakudo-moar 02f1e5: OUTPUT«(timeout)»
woolfy :-)
raydiak++ 20:24
"everyone"++
20:24 Mso150_c_r left 20:25 avuserow left
raydiak everyone++ indeed. have a round of ++s on my tab! :) 20:25
20:28 Araq joined
lizmat it would seem the problem can be solved by *not* using private methods 20:29
.tell jnthn I think there is some codegen issue with private methods, contact me for an example 20:30
yoleaux lizmat: I'll pass your message to jnthn.
lizmat .tell jnthn I would not be surprised if this would be the source of a lot of flappines, specifically in async modules 20:31
yoleaux lizmat: I'll pass your message to jnthn.
masak raydiak: that looks interesting. what is it?
lizmat: reminds me of rt.perl.org/Ticket/Display.html?id=120919 20:32
maybe related? probably not...
20:33 avuserow joined
lizmat feels related to me 20:33
in one of my tests, I also got the typecheck error
20:33 vendethiel- joined
raydiak masak: I'm sure you educated folk have names for it, but it parses math equations and expressions, turns them in to trees, and am now working on the part where it can manipulate or solve them 20:33
lizmat well, an error in the error reporting of a typecheck error: 20:34
No such method 'item' for invocant of type '$?CLASS'
moritz raydiak: a computer algebra system?
raydiak moritz: sounds apt :)
20:35 Hor|zon joined
moritz looking forward to seeing it 20:35
masak ooh, reminds me of my old en.wikipedia.org/wiki/TI-92_series
I used to love the CAS in that one
it was definitely smarter than I was :)
moritz raydiak: I've long wanted to implement one, but always shyed away from the complexity
20:35 vendethiel left
raydiak masak: nice...I had an 82, 83, 86, and 89 at various points in my life...wrote a raytracer on the 89 lol 20:36
moritz: yeah it's been nagging at me a long time too
moritz raydiak: remind me some day to send you a patch for derivation 20:37
raydiak moritz: this is what my weird regex interpolation question yesterday was about
moritz I'm sure that's *much* easier than integration :-)
20:37 avuserow left
raydiak moritz: thanks! will do 20:37
20:38 Araq left
masak moritz: it... is, yes. 20:39
still some interesting special cases even in derivation.
20:39 Hor|zon left
masak in other news, it's been a long journey, but I'm finally warming up to using the Unicode set operators in my own code. 20:39
I just wrote the line `$!games ∪= $game;` 20:40
's nice
raydiak sweet...
Mouq raydiak: I did see that one gist -- have you seen how Rakudo's grammar does new terms? Something like `role Circumfix[$left, $right] {...}; self does Circumfix["<", ">"]` 20:44
raydiak Mouq: no, that looks like something I should learn more about...this is my first serious usage of grammars, so I've been taking it all in in peices at a time 20:45
the grammar is generated from an array of syntax components, so I'm probably procedurally hacking around my own ignorance in places :) 20:47
Mouq raydiak: Haha, well you're obviously doing a pretty good job. But here's the start of what I was talking about github.com/rakudo/rakudo/blob/nom/....nqp#L4178 20:49
20:50 avuserow joined
raydiak oh yes looks like I definitely need to learn more about that... Mouq++ 20:50
masak ho boy, did the design ever come out better after I stopped doing that class attribute silliness! 20:53
20:53 rindolf left
masak on the way, I was mildly surprised that I can't just do $set>>.method 20:54
...but I was also delighted that I can have a set in an attribute $.things, and then just loop over @.things (rather than $.things.list)
Mouq raydiak: Best of luck! :) 20:55
21:01 _sri is now known as mramberg
raydiak Mouq: thanks! I appreciate the encouragement...positive community is one of the most important aspects of perl 6 for me 21:02
timotimo
21:02 mramberg left
raydiak timotimo: how goes the game? 21:04
timotimo annoying
i'm going to have to restructure it a lot in order to get any better performance 21:05
getting a gl-backed piece of cairo rendering is surprisingly difficult unless you're willing to ignore portability
raydiak hm 21:06
I've never used cairo
21:06 pochi joined
timotimo cairo is pretty nice 21:07
the GtkDrawingArea widget gives you a callback that it calls with a properly initialized cairo context
but it only does software rendering
it'll never give you opengl-backed cairo :( 21:08
21:08 _sri joined
raydiak that does sound like a pain... 21:08
21:08 avuserow left
timotimo yes 21:09
i'm going to switch over to sdl2 instead
raydiak I was just asking myself what I would do, and that's what I came up with too :)
timotimo yeah 21:10
i'm probably going to just pre-render all my littl eenemy sprites for all directions into a sprite set and then use sdl2 to compose the scene for me
21:13 yogan left, yogan joined, Mouq left, kurahaupo left, kjs_ left 21:14 zakharyas left
raydiak too bad...that's really easier than getting a cairo gl context yourself w/o the gtk callback? 21:14
21:14 kjs_ joined 21:15 araujo left
timotimo well, if you want to do that, you'll need GLUT/GLFW/SDL/XGL/WGL/CGL/EGL/... 21:15
21:16 erkan joined, erkan left, erkan joined
raydiak oh right, I see 21:16
21:16 araujo joined
timotimo and even if you use sdl2, it can "MakeCurrent" for you, but in order to create a pixmap for cairo to render onto, you'll need a proper call from the right API still - though i'm expecting i can get SDL to do that for me, too 21:16
only very little example code can be found on-line
github.com/cubicool/cairo-gl-sdl2/...le.cpp#L51 - this should really be replacable with something else 21:17
21:19 anaeem1_ left
raydiak sounds like you've been concentrating too much on the fiddly stuff 21:20
timotimo only for a day ;( 21:21
raydiak I spent a day golfing one bug recently :) 21:22
timotimo did you play my game yet? :) 21:23
if you have a beefy machine, the software rendering isn't that terrible actually
raydiak no, but I should give it a shot...haven't played anything besides Skyrim recently
heh, I don't think it's going to work very well in this ssh session I just used to clone your game 21:25
21:27 kurahaupo joined
timotimo my game doesn't quite compare to skyrim 21:27
in terms of graphics fidelity or gameplay ...
21:27 gfldex left
raydiak oh of course not...I guess I meant "a non-serious diversion might be fun" 21:28
once I figure out which of these mint packages I have to install to get gtk3... 21:29
timotimo oh, is this on a mac?
oh, *mint*
yeah, that's fine
raydiak hrm, why do I not see libgtk3... 21:31
oh I see why
timotimo 32bit vs 64bit?
raydiak there is something weird about the way this system searches for shared libs, sometimes I have to go manually make aliases in lib dirs to make stuff work 21:32
timotimo huh. 21:35
21:37 pochi left
timotimo cgit.freedesktop.org/cairo/tree/src/cairo-gl.h - it seems like i don't have to handle glx and stuff 21:37
21:38 virtualsue left
timotimo oh, damn 21:38
i *do* have to create a cairo_device_t
raydiak okay, got gtk::simple working...now to see if cairo cooperates more easily 21:39
timotimo cool :)
21:40 pochi joined
raydiak sweet, it runs :) 21:41
it reminds me of quickbasic games I used to make with my friend as a kid :)
timotimo i did something similar when i was smaller :) 21:42
raydiak unfortunately, even though I just bought this laptop a few months ago, it's a 3-yr-old budget machine 21:43
timotimo and it runs on software rendering, too ;(
raydiak are you drawing each star seperately? 21:44
I mean, I don't see a whole lot on the screen, it's hard to believe rendering is the bottleneck, even if it is software 21:45
oh right, cairo is a vector lib 21:46
timotimo that's right 21:47
the stars are pre-rendered onto a surface
oh hold on 21:48
it may be that your current version has a broken star field
does it do parallax scrolling?
raydiak yes, looks like 3 layers? 21:49
timotimo try a git pull
ah, ok
the new version may be a bit more performant; the star background seems to be a noticable chunk of render time, sadly
raydiak goes to comment it out and try to play again :)
timotimo and try a git pull, too 21:51
raydiak yeah commenting out the stars helps 21:55
21:55 cognominal left
timotimo damn 21:55
i was proud of how smartly i front-loaded the calculation to make the stars
raydiak collision detection needs a sweep algorithm so it doesn't fail when my shot jumps from in front to behind an enemy in 1 frame
timotimo since i created a "memoize path" thingie, i may just render "just the stars" every frame 21:56
yes, indee
the game doesn't like having too long frames
another thing i could do for the sdl2 stuff is just render the vector graphics "in software" onto a gl texture and i won't have to do anything with glx api and crap like that 21:58
raydiak I like how it feels though...the way the enemies turn when hit and bounce off the sides and such is neat...and the star-zooming-out death screen is sharp
timotimo thanks :) 21:59
22:05 kjs_ left 22:32 avuserow joined 22:36 Hor|zon joined 22:40 Hor|zon left 22:43 ezra1 left 22:47 kurahaupo left 23:00 vendethiel joined 23:03 vendethiel- left
dalek osystem: 58158f3 | ugexe++ | META.list:
Add P6TCI module

P6TCI is an empty module with a .travis.yml that can be used as an example for testing perl 6 modules on travis-ci.org. The module will likely turn into a .travis.yml generator once configuration options are figured out.
23:23
tadzik nice :) 23:24
timotimo that sounds cute 23:26
tadzik: do you think the c part of steroids is still needed?
except maybe for performance? 23:27
23:27 amkrankruleuen left 23:28 amkrankruleuen joined
tadzik timotimo: I wrote it for the laziness 23:28
also to avoid some complicated nativecall stuff that works sometimes 23:29
it may work more consistently nowadays :)
but the primary reason was my partial distrust towards nativecall
I didn't want to stress it too much
timotimo OK 23:30
tadzik as for performance things, we could gain a lot by avoiding copying 23:31
potentially avoid (almost) all GC runs
I experimented with binding a bit, in examples where in theory no garbage collection should occur, but it still did
timotimo with the profiler you can see where what types of things get allocated 23:33
my game usually has very quick GC runs which end up promoting 0kb and keeping 0kb around 23:34
that's pretty neat.
your use of lists of names for things ... i prefer enums to be honest :) 23:35
tadzik hm? 23:37
what kind of names? 23:38
timotimo @button_names 23:39
doesn't matter
i may end up building more sdl binding stuff myself 23:40
23:43 avuserow left, ezra1 joined 23:44 vendethiel left 23:50 ezra1 left 23:52 vendethiel joined 23:55 avuserow joined