»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! Set by moritz on 22 December 2015. |
|||
00:08
Ben_Goldberg joined,
Ben_Goldberg left
00:09
BenGoldberg joined
00:10
BenGoldberg_ left
00:15
nadim joined
00:18
_nadim left
00:20
vendethiel joined,
_nadim joined
00:21
nadim left
00:26
Actualeyes joined
00:31
znpy joined
00:32
tmch left
00:35
telex left
00:39
kurahaupo joined,
kurahaupo left
00:40
spider-mario left
00:43
dvinciguerra left,
vendethiel left
00:48
telex joined
00:50
bjz left
01:12
cognominal left
01:14
vendethiel joined
01:18
perturbation left
01:37
Fatalnix_ left
01:38
Fatalnix_ joined
01:40
bjz joined
01:44
kalkin- joined
01:45
ilbot3 left
01:47
ilbot3 joined
01:48
kalkin-_ left
02:00
BenGoldberg left
02:02
BenGoldberg joined
02:16
perlawhirl left,
vendethiel left
02:19
er2 left
02:26
kid511 left
02:48
noganex_ joined
02:51
noganex left
03:01
sno left
03:15
bjz_ joined,
TeamBlast joined
03:16
bjz left
03:21
BenGoldberg left
03:37
cdg joined
03:48
cdg left
03:58
kaare_ joined
03:59
woosley joined,
woosley left
04:03
bjz_ left
|
|||
skids | m: my @s = (supply { my $l = 5000 + $_ * 100; emit [*] $l..^$l+100; done } for 0..^10); my $s = [*] await(@s); say now - BEGIN now; | 04:05 | |
camelia | rakudo-moar d0c675: OUTPUT«0.064998» | ||
skids | m: my @s = (supply { my $l = 50000 + $_ * 1000; emit [*] $l..^$l+1000; done } for 0..^10); my $s = [*] await(@s); say now - BEGIN now; | ||
camelia | rakudo-moar d0c675: OUTPUT«(signal ABRT)» | ||
skids | m: my @s = (supply { my $l = 500000 + $_ * 10000; emit [*] $l..^$l+10000; done } for 0..^10); my $s = [*] await(@s); say now - BEGIN now; | ||
camelia | rakudo-moar d0c675: OUTPUT«7.65016807» | 04:06 | |
skids | the middle one reliably gets an Abort on my local machine as well. | ||
04:09
bjz joined
|
|||
Hotkeys | skids: i.imgur.com/o94Yusy.png | 04:09 | |
skids | Hrm... | 04:10 | |
I wonder if it's a magic number depending on machine speed/cores. | 04:12 | ||
Or -- are you on Linux? | 04:13 | ||
Oh wait -- try it by -e not in the REPL. | 04:15 | ||
Hotkeys | I am on the windows | 04:16 | |
oh | |||
still workin' okay i.imgur.com/t2bobPT.png | 04:17 | ||
but I am also on windows so | |||
/o\ | |||
skids | interesting that REPL is 2 slower. | 04:18 | |
Hotkeys | yeah | 04:19 | |
much faster on the 500000 one | 04:20 | ||
i.imgur.com/0cvR6Fh.png | |||
oops | |||
forgot to up the other numbers | |||
about 2 seconds faster on the big one | 04:21 | ||
skids | For me the 500000 one aborts in the REPL. | ||
Maybe something to do with handling of the "BEGIN now". | 04:22 | ||
(the REPLY being slower, I mean) | |||
Oh, actually I can't get an abort without doing the 'BEGIN now' part. | 04:25 | ||
Hotkeys | the repl does it in 10 and the -e does it in 7.8 | 04:32 | |
for me | |||
also I thought the idiom was now - INIT now | |||
is BEGIN the better way to do it? | |||
skids | Hrm dunno. | ||
Yeah I guess INIT is better. | 04:36 | ||
well anyway, time for bed | 04:40 | ||
04:42
skids left
04:45
znpy left
04:48
Cabanossi left
04:50
Cabanossi joined
04:59
bjz_ joined
05:00
bjz left
05:15
khw left
05:41
ponbiki joined
05:50
TimToady left
05:52
TimToady joined
06:04
ZoffixWin left
06:07
labster left
06:15
labster joined
|
|||
sortiz | m: say ?IterationEnd; # Why True? | 06:16 | |
camelia | rakudo-moar d0c675: OUTPUT«True» | ||
06:23
jameslenz left
06:28
ZoffixWin joined
06:41
CIAvash joined
06:48
domidumont joined
|
|||
timotimo | why care about the details of IterationEnd? its only quality is its identity | 06:52 | |
06:53
domidumont left,
domidumont joined
|
|||
timotimo | i thought we would've put IterationEnd into RakudoInternals by now | 06:54 | |
06:56
firstdayonthejob joined
|
|||
kaare_ | If I 'panda install App::GPTrixie' should I be able to find the bin/gptrixie somewhere? | 07:04 | |
teatime | kaare_: I ran into this the other day | ||
kaare_: you probably need to do 'panda rehash' afterward | |||
timotimo | you mean "rakudobrew rehash" | 07:05 | |
i think? | |||
m: say uniname(0x180e) | |||
camelia | rakudo-moar d0c675: OUTPUT«MONGOLIAN VOWEL SEPARATOR» | ||
teatime | heh yes I guess so. | 07:06 | |
and I guess that assumes the use of rakudobrew. | |||
so, I still don't know how it works in the general case. | |||
timotimo | in the general case, you'll have put the folder that binaries land in into your $PATH | ||
like panda tells you at the end of bootstrap, iirc | |||
teatime | ok. | 07:07 | |
maybe I should make a PR to add 'rakudobrew rehash' to the rakudobrew README. it befuddled me for quite a while. | |||
timotimo | could be a good idea, yeah | ||
07:16
jameslenz joined
07:18
fireartist joined
07:37
firstdayonthejob left
07:39
atweiden left
07:43
fireartist left
07:44
fireartist joined,
Actualeyes left
07:49
_nadim left
07:50
_nadim joined
|
|||
sortiz | timotimo, If Iterable is a public API, IterationEnd should be. I understand with should be tested by identity, can't be other way. But as a Mu, I expect to be False :) | 07:56 | |
07:56
CIAvash left
|
|||
sortiz | s/with/why/ | 07:57 | |
07:57
wamba joined
|
|||
timotimo | it's a defined Mu, though | 07:59 | |
m: say so Mu.new | |||
camelia | rakudo-moar d0c675: OUTPUT«True» | ||
08:03
Actualeyes joined
|
|||
sortiz | Yep, at first that surprises me, but it's irrelevant, though | 08:03 | |
timotimo | Iterelevant :) | 08:04 | |
08:08
sivoais left
08:12
sivoais joined
08:14
darutoko joined
08:29
ufobat joined
08:30
sno joined
08:36
rindolf joined
|
|||
masak | antenoon, #perl6 | 08:44 | |
teatime | wb. | 08:45 | |
masak needs regular scheduled downtime, much like other alie^Whumans | |||
anyone here good at database design (or wants to discuss it regardless of skill)? | 08:48 | ||
I have a design I'm about to commit to, and I'd like for someone to check if it's sane... | |||
teatime | can you link it? I'm curious, if unskilled. | 08:49 | |
masak | yeah. about to put together a gist. | ||
nine | masak: shoot | 08:50 | |
masak | basically this: gist.github.com/masak/b357e469b40403672839 | 08:53 | |
(I don't know how to best transmit a database schema, but I think that gets the idea across) | |||
teatime | you could use explicit foreign keys. | 08:55 | |
and auto-increment IDs | |||
masak | both of those are good ideas. consider it done. | ||
teatime | and do you have to store JSON rather than create more DB structure | ||
that's kindof a red flag, but may make sense for your specific case. | 08:56 | ||
masak | (I'm actually going to go with postgres, not sqlite3. but I wanted an environment to type my commands into to double-check them) | ||
teatime: yes, that red flag is why I brought it up here. | |||
and it's borderline off-topic, except that my web application is running Perl 6. | |||
teatime: the JSON blob is basically saying "hands off, DBMS, I'm a black box and schemaless!" | 08:57 | ||
which is a red flag until proven innocent, kind of | |||
teatime | yes. | 08:58 | |
08:58
TEttinger left
|
|||
masak | and that's where I'd like to be further enlightened, too. I know about the normalization forms, and I basically know why they are good and desirable. | 08:59 | |
but under which circumstances should and shouldn't I use a JSON blob like this in a database design? | |||
what's the underlying principle that makes this a red flag, and how can I check whether I qualify? | |||
DrForr | AKA "I could have any random cr*p in me, have fun guessing what my data layout might look like!" | 09:00 | |
09:00
ninjaaron joined
|
|||
masak | yes, I appreciate that point. | 09:01 | |
teatime | one benefit of RDMS is auto-checking referential integrity. kindof like how in a typed language the compiler can detect more errors than in a loosely typed language. if you use blobs like that, you at least lose that benefit for that data. | ||
masak | the Move table basically quickly descends into being... CouchDB. | ||
teatime | yes, if you're just going to store schema-less JSON blobs, might as well use a nosql DB. | ||
ninjaaron | is there a simple way to do "my @x = `ls -l`" in Perl6? | 09:02 | |
masak | nine: qx[ls -l] | ||
er, ninjaaron | |||
sorry, nine :) | |||
moritz | ninjaaron: my @x = qx/ls -l/.lines | ||
masak | ah, moritz++ saw the need for .lines which I missed :) | 09:03 | |
ninjaaron | moritz, masak Thanks! Does that grant a shell to the command? | ||
Timbus | yo.. just a headsup. postgres has json specific support: www.postgresql.org/docs/9.3/static/...-json.html | ||
masak | teatime: it seems to me that if I don't have *references* in my JSON -- and I don't -- then I don't need to feel bad about losing checking for those. | ||
teatime: remains then checking data types. | 09:04 | ||
Timbus | not that i'd suggest using it, but its there | ||
teatime | masak: and there's also checking on- exactly, the types of data, and existence/non- of items. | ||
masak | Timbus: why wouldn't you suggest using it? | ||
Timbus | teatime is handling that argument for me | ||
teatime | also I dunno how efficient variable-length field lookups are, but I don't know much about SQL. | ||
Timbus | :P | ||
masak | teatime: checking types/existence is a benefit that might do me some good in the future, yes. | 09:05 | |
teatime | there are also disadvantages to laying everything out in SQL. | ||
masak | teatime: but I have to weigh it against the cost of increased schema complexity. | ||
right. | |||
teatime | exactly. | ||
masak | I have three types of moves. | ||
teatime | you could always use an ORM :) | ||
masak | so if I started laying this out, I'd have to model a sum type in SQL. | 09:06 | |
yes, I could use an ORM, of course :) | |||
it doesn't sound more attractive than "serialize the stuff into JSON"... :) | |||
moritz | you could not use an ORM, of course :-) | ||
teatime | that's a fair enough assessment. | ||
masak .oO( <intuitionist> you could not not use an ORM, of course :) ) | 09:07 | ||
teatime | in general, though, you may find that thinking about your data model up-front is time well spent, regardless of whether it's to create an SQL schema or not. | ||
09:07
ninjaaron left
|
|||
masak | oh, no doubt | 09:07 | |
teatime | while we're on the subject. is there any mature / non-painful JSON schema tool? | 09:08 | |
masak | it's that kind of thinking that led me to storing the *moves* rather than the board state | ||
Timbus | www.compose.io/articles/is-postgre...-database/ here ya go btw, masak. nice overview and stuff | ||
moritz | teatime: for Perl 6, or in general? | ||
teatime | in general. | ||
moritz | jsonschema is mature, but not painless | 09:09 | |
teatime | the last time I tried to make use of actual "JSON Schema" I eventually gave up, it was terrible. | ||
I don't remember in what way, just that it was infuriating. | |||
sortiz | masak, I'm interested in the details_json structure: what's a "move". | ||
? | 09:10 | ||
Timbus | rjbs (?) made a json schema tooly thingy.. which looked okay. | ||
masak | sortiz: detailed here: github.com/masak/nex/blob/master/README.md | ||
Timbus | was it rx? yes. google says it's rx | 09:11 | |
masak | sortiz: besides those two move types, there's also "swap", "resign" and (I guess) "timeout" | ||
teatime | a generic schema language w/ a validator that could do both JSON and YAML would be sweet. even if it only handled the most basic types. | ||
Timbus | thats the one. | ||
teatime | I mean it could even do Python/Perl/etc. aggregate datastructures. | 09:12 | |
09:13
perlawhirl joined
09:14
RabidGravy joined
|
|||
teatime | Timbus: looks like what I asked for :) | 09:17 | |
09:17
Actualeyes left
|
|||
sortiz | masak, ok, so for every move type, the data to store is different; so json seems good to me. The other option is to create a table per type, per move store the type and the row-id of the specific entry. I don't see the need. | 09:18 | |
masak | right; that's what I meant by "sum type" | 09:22 | |
it seems over-the-top to me too | |||
if I could imagine some situation where I'd get returns from having all that structure in the database... but I can't | 09:23 | ||
timotimo | to be fair, postgresql outperformn many "nosql" DBs out there in some benchmarks :) | ||
sortiz | Yep, RDBMS are good for *regular tabular* data, otherwise nonsql are better options. | ||
masak | right; great. | ||
so the underlying principle is "follow the normalization principles for regular tabular data; disappear into a blob when the data gets heterogenous" | 09:24 | ||
that's the kind of rationale I was looking for :) | |||
timotimo | the thing with nosql is that you almost never have something truly schemaless | ||
masak | indeed; I *could* make this into a schema | ||
it's a sum type, and I know how to model one in SQL | 09:25 | ||
timotimo | for this use case, i'd say a json field is fine | ||
masak | cool. | ||
sortiz | timotimo, Yes, but many *other* "nosql" outperform any SQL solution. | ||
Sometimes a simple KV store can suffice. | 09:26 | ||
RabidGravy | with Sofa I'm working toward being able to do a Document Object Mapping thing, where your class definitions are the schema | ||
also see rethinkdb which is "NoSQL" but has some relational and schema capabilities | 09:27 | ||
Hotkeys | m.imgur.com/xY2xDxo?r | 09:29 | |
Oops wrong chan | |||
timotimo | poor doge | 09:30 | |
masak | such scorpion. much regrets. | ||
teatime | oh god, Hotkeys, that's terrible. | ||
masak | poor scorpion | 09:34 | |
Woodi | hi today :) | 09:35 | |
masak .oO( always jam yesterday or jam tomorrow, never jam today... ) | 09:37 | ||
timotimo | suppe.tobold.cc/post/681686396/Image - have a pleasant animal picture/gif to compensate | 09:39 | |
DrForr | No boom today. Boom tomorrow. | ||
masak | teatime, Timbus, DrForr: thank you for your input on schemas. that was valuable to me. | ||
timotimo | big badaboom | ||
teatime | thank you. | ||
for the eyebleach. | |||
timotimo | YW | ||
:3 | |||
DrForr | Or "*Raspberry*. Only one man would *DARE* give me the raspberry." | ||
timotimo | Whatever Starrr! >:( | 09:40 | |
Woodi | masak: about: CREATE TABLE Game(id INTEGER PRIMARY KEY); looks like perfect but players ids or just description could be added | ||
masak | Woodi: yes, of course. | 09:41 | |
I guess I like to focus on one slice of the problem space at a time. ;) | 09:42 | ||
there's also no mention of the game type, or the board size. | |||
or timestamps for the moves. | 09:43 | ||
DrForr | Go, by chance? | ||
timotimo | not quite | ||
it's called nex and lives on github under masaks user | |||
masak | github.com/masak/nex | ||
DrForr | You have my interest :) | 09:44 | |
masak | I already have a working game engine, in 189 LoC Perl 6. | ||
timotimo | DrForr: so far you know it's a game that has moves to it ... so ...? :D | ||
DrForr | Ah, got it. (having played Hex...) | ||
Woodi | masak: as with 99% things, schema depends on how you use it. even redundand columns are usefull. eg. you can have column with values that are in json blob but you use them a lot. a bit like extracting some data from raw data in data mining | ||
masak | now I "just" need to expose it on the web so I can play it with a friend... | ||
timotimo | Woodi: why not just use a view for that? | ||
Hotkeys | Nice masak | ||
nine | masak: note that PostgreSQL also supports inheritance of tables. That could work for your different move types, too. | ||
masak | nine: intriguing -- even if I don't believe I'll make use of it :) | 09:45 | |
nine: url? | |||
Woodi | timotimo: for no-players-ids thing or second one ? | 09:46 | |
masak | Woodi: are you familiar with the distinction between OLTP and OLAP? | ||
nine | masak: what I don't like about your use of JSON is, that your JSON does actually have very limited options for the structure. So it's far from schemaless. Question is: is it imaginable that you'd ever want to query only parts of this JSON-data or use parts of it in a where clause or an aggregate? | ||
timotimo | Woodi: for whatever's in the json blob | ||
Woodi | masak: not from my head, but I'm sure wiki will have short definition for them :) | ||
masak | nine: actually, for my use of the JSON I might as well use a comma-separated list | 09:47 | |
nine: the only thing JSON gives me over that is descriptive key names | |||
nine | masak: www.postgresql.org/docs/9.5/static/...herit.html | ||
Woodi | timotimo: becouse it is blob and situation is that that data are black boxed. but some part can be copied to some column, if usefull | ||
masak | Woodi: my point is that the shape of the schema depends a lot on whether you're doing mostly-reads or mostly-writes on the database | 09:48 | |
nine | masak: then you can as well use PostgreSQL's arrays for these lists and get Perl 6 arrays back from your queries. | ||
AFAIK DBIish already supports that | |||
timotimo | i don't understand why you would copy that data out instead of just using a view, though | ||
DrForr | If I were back in the US I'd have access to my Hex strategy book. | ||
masak | Woodi: your advice wrt denormalization is good for mostly-reads, but bad for mostly-writes :) | ||
nine: ooh, excellent | |||
09:48
labster left
|
|||
masak | nine: so in the end I had an XY problem, and you managed to suggest the right solution. awesome. | 09:49 | |
nine++ | |||
nine | masak: I think your biggest problem is that PostgreSQL really has excellent support for all the possible designs. Even if you want to select only part of the JSON or need an index on it, you can do that. | ||
masak | sounds like a nice problem to have, at least in the long run | 09:50 | |
DrForr: would that be the Cameron Browne book, by any chance? | |||
Woodi | masak: right. but you need to analize that data later and parse that blob anyway :) | 09:51 | |
DrForr | The name rings a bell, let me look. | ||
masak | www.amazon.com/Hex-Strategy-Making-...1568811179 | ||
DrForr | Yes, it is. | 09:52 | |
masak | that book is... decent. nothing wrong with it. but at some point I felt that we had a much bigger corpus online than was collected in that book. | ||
at www.hexwiki.org/ to be exact. | |||
still hoping to bring that site back at some point... :/ | |||
timotimo | MadcapJake: i've had an expert friend tell me what the difference between VAO and VBO is. interested? | 09:53 | |
Hotkeys | After reading the Nex readme I was like "this sounds like go" but then I read the wiki and it isn't go | ||
masak | Hotkeys: connection games have quite a different feel than Go. | ||
DrForr | No, it's not. | ||
Woodi | timotimo: I assume parsing json is not sql db job. so: no possibility to create view | ||
masak | Hotkeys: in Go the main resource is territory. in Hex and Nex, your main abstractions tend to be chains and connections. | 09:54 | |
Hotkeys | Ah | ||
timotimo | postgres has json and jsonb fields along with operators to operate on them, and it can also create views and indices from json blobs | ||
sortiz | Btw, what's the best/fastest perl6's JSON engine? Need to use that in DBIish for the JSON column types. | ||
Hotkeys | Provably json::fast | ||
masak | provably! | ||
Hotkeys | Probably* | ||
tadzik | provably too | 09:55 | |
masak .oO( it has "::fast" in the name. QED! ) | |||
Hotkeys | Yeah I realized that I can't just leave that typo :p | ||
Masak++ | |||
Actually isn't there a json::faster | |||
masak | *groan* | ||
timotimo | there was, but it got nommed by JSON::Fast | ||
masak | I'd skip directly to json::fastest | ||
DrForr | I keep meaning to finish writing my Kamisado solver. en.wikipedia.org/wiki/Kamisado - There's apparently a 43-move forced win. | ||
timotimo | json::faster only provided a to_json that was fast, while json::fast only provided a from_json that was fast | 09:56 | |
Hotkeys | Ah ok | ||
sortiz | timotimo, there are in core? | 09:57 | |
masak | DrForr: by the looks og images.google.com, looks like a fun game (with no sense of color scheme) :P | ||
timotimo | sortiz: there are what in core? | ||
sortiz | json::faster and/or json::fast | 09:58 | |
timotimo | no, both in the ecosystem | ||
DrForr | masak: If you're coming to NLPW I'll bring my set. | ||
sortiz | timotimo, There are plans for something in core? | 10:00 | |
timotimo | not for json, as far as i know. | ||
sortiz | ok, thks | 10:01 | |
timotimo | we do have to_json and from_json in rakudo, but that's not per perl6 spec | ||
m: say from_json('["hi sortiz", "how are you"]') | |||
camelia | rakudo-moar d0c675: OUTPUT«5===SORRY!5=== Error while compiling /tmp/rB9ZFrs6bnUndeclared routine: from_json used at line 1. Did you mean 'from-json', 'to-json'?» | ||
timotimo | m: say from-json('["hi sortiz", "how are you"]') | ||
camelia | rakudo-moar d0c675: OUTPUT«[hi sortiz how are you]» | ||
timotimo | m: say from-json('["hi sortiz", "how are you"]').perl | ||
camelia | rakudo-moar d0c675: OUTPUT«$["hi sortiz", "how are you"]» | ||
Hotkeys | How do those compare to the functions in json::fast | 10:02 | |
timotimo | they are slower | 10:03 | |
10:03
araujo joined
10:04
araujo left
10:05
araujo joined
|
|||
sortiz | Umm, oki. | 10:05 | |
10:06
araujo left
|
|||
timotimo | i think they were brought in for supporting older variants of our compunitrepo spec | 10:07 | |
10:07
araujo joined
|
|||
sortiz | timotimo, and seems buggy! | 10:07 | |
timotimo | or maybe we still need it for that? | ||
masak | DrForr: I'll not be at NLPW, sadly :/ | 10:08 | |
sortiz | m: my @a = from-json('["hi sortiz", "how are you"]'); say @a.elems | ||
camelia | rakudo-moar d0c675: OUTPUT«1» | ||
10:09
_nadim left,
araujo left
|
|||
timotimo | yeah, it returns an itemized array there | 10:09 | |
masak | DrForr: have to be much more selective now that @family > 0 | ||
timotimo | m: my @a = from-json('["hi sortiz", "how are you"]'); say @a.list.elems | ||
camelia | rakudo-moar d0c675: OUTPUT«1» | ||
timotimo | uhm... | ||
10:09
araujo joined,
araujo left,
araujo joined
|
|||
timotimo | m: my @a = from-json('["hi sortiz", "how are you"]'); say @a.perl; say @a[0].perl | 10:10 | |
camelia | rakudo-moar d0c675: OUTPUT«[["hi sortiz", "how are you"],]$["hi sortiz", "how are you"]» | ||
timotimo | ah, yeah | ||
when you assigned the itemized list to the array, you got an array with a single element in it | |||
that's why .elems and .list.elems gave 1 | |||
sortiz | Yep, the itemized return is the bug. | 10:11 | |
10:11
_nadim joined
|
|||
timotimo | IMO it could move to Rakudo::Internals | 10:14 | |
DrForr | masak: I understand, no worries. | ||
Woodi | anyway, "schemaless" things are recipe for disaster or unhappines at least :) usually stable schema skeleton is known and free form data can be put into "extension". I think never protocols are designed with ways to extend them | 10:20 | |
newer* ? | |||
teatime | Is it safe to assume that this syntax for regexes is not available in rakudo? en.wikipedia.org/wiki/Parser_Gramm...#Internals | 10:24 | |
for defining regexes/grammars, not Perl operators. | 10:25 | ||
timotimo | the operator precedence parser is a special feature built in a grammar, but it's not a feature of perl6 grammars in general | 10:26 | |
teatime | forgive me, I don't understand. | 10:27 | |
do you mean, operator precedence is something you have to explicitly/manually implement for a given grammar? | |||
if so, is there many a module to help? | |||
s/many/maybe/ | |||
timotimo | you understood correctly | 10:28 | |
we don't seem to have an OPP in the ecosystem yet | 10:29 | ||
teatime | I really enjoy this perl6 feature. I should probably learn more about parsing in general. | ||
tadzik | OPPa grammar style | ||
masak | teatime: I implemented that once, if you're interested | ||
timotimo | for 007? :) | ||
masak | for GGE | 10:30 | |
teatime | masak: sure. I've seen one or two methods. | ||
masak | oh yeah, and for 007 | ||
teatime: strangelyconsistent.org/blog/what-y...nt-without | |||
perlawhirl | does p6 have an equivalent to PERL5LIB ? | ||
tadzik | yes, it's called PERL6LIB | ||
teatime | there's supposedly a PERL6LIB, but the doc said it may go away | ||
masak | the doc is wrong | 10:31 | |
or at least alarmist | |||
teatime | I think there are lots of wrong perl6 docs out there :) | 10:32 | |
perlawhirl | yeah i tried PERL6LIB but it still doesn't find my module | ||
masak | try harder! :) | ||
teatime: yes, but there's an excellent team here working quite hard on making it less wrong all the time. | |||
RabidGravy | yeah it definitely works as half the modules tested on travis use it | 10:33 | |
teatime | masak: no offense intended. | ||
perlawhirl | right... commencing try harder :D | ||
teatime | and there's nothing you can do about blog posts from e.g. 2006 anyway. | ||
masak | m: class C { method foo {}; method bar { self!foo() } }; C.new.bar | 10:34 | |
camelia | rakudo-moar d0c675: OUTPUT«5===SORRY!5=== Error while compiling /tmp/zJP3e7gf8_No such private method 'foo' for invocant of type 'C'at /tmp/zJP3e7gf8_:1------> 3 { method foo {}; method bar { self!foo(7⏏5) } }; C.new.bar» | ||
masak | this error message leaves something to be desired. the most likely problem is that the author wanted to make `method foo` private, but forgot/failed somehow. | 10:35 | |
teatime: oh, none taken. and I'm actually not part of that team, even though I've told myself many times that I should put some tuits on that. | 10:36 | ||
10:40
dvinciguerra joined
|
|||
teatime | masak: do GGE::Exp / GGE:: OPTable still exist/work ? | 10:41 | |
10:42
spider-mario joined
|
|||
teatime | 'Tests: 43 Failed: 42' hehe, nice. | 10:43 | |
masak | teatime: was gonna say 'probably not' | ||
this is where I also hand you that all-uppercase NO WARRANTY part of the license :P | 10:44 | ||
teatime | thank you for the inspiration nonetheless | ||
masak | hold on, I'll link you to the working one in 007 :) | 10:45 | |
RabidGravy | well, I just tested 48 of my modules and they all pass | ||
masak | github.com/masak/007/blob/00fac05d...#L289-L399 | 10:46 | |
actually, github.com/masak/007/blob/00fac05d...#L218-L399 | 10:47 | ||
in 007 things happen in two levels, sort of. | |||
because EXPR is basically `rule EXPR { <termish> +% <infix> }` | 10:48 | ||
we handle infix precedence resolution in `EXPR`, and prefix/postfix precedence resolution `termish` | |||
Perl 6 is not so lucky, since the precedence of infixes and prefixes/postfixes can mix | |||
teatime | perhaps I am just being overly ambitious, given my compsci-fu. | 10:51 | |
kaare_ | teatime, timotimo: Thanks for panda/rakudobrew help. | 10:52 | |
timotimo | sure :) | ||
masak | teatime: I for one encourage you heading down this road :) | 10:54 | |
I've had a lot of fun on it over the years | |||
10:58
FROGGS joined
11:01
Actualeyes joined
|
|||
sortiz | m: use Test; is \(:id(1), :name('First')), \(:name('First'), :id(1)); # I don't see that before! | 11:04 | |
camelia | rakudo-moar d0c675: OUTPUT«This representation (VMIter) cannot unbox to a native string in sub is at /home/camelia/rakudo-m-inst-1/share/perl6/sources/C712FE6969F786C9380D643DF17E85D06868219E (Test) line 136 in block <unit> at /tmp/p8rcCdmq55 line 1» | ||
masak | looks like a bug of some kind | 11:09 | |
11:17
vendethiel joined
11:19
edehont joined
|
|||
teatime | <![{]> # }], you're welcome vim | 11:19 | |
lolol, I suspect will use this trick. | 11:20 | ||
timotimo | yeah :| | 11:22 | |
jnthn | Guess it needs to learn about Perl 6 char classes :) | ||
teatime | yeah. there's a perl6 syntax definition but hard to tell how old it is | 11:24 | |
and/or how old the typical distro vim release is | |||
11:24
kid51 joined
|
|||
timotimo | that has recently (well, maybe a year ago now) gotten a really nice overhaul | 11:25 | |
but i don't know if that version is shipped with your vim | |||
it is on github, though. as "vim-perl" i think? | |||
RabidGravy | yeah | 11:27 | |
teatime | installed. we'll give it a shot. | ||
11:41
vendethiel left
|
|||
RabidGravy | today I am hating the interaction of roles and BUILD :( | 11:45 | |
11:46
Begi joined
|
|||
timotimo | i think many people aren't quite happy with that, either | 11:47 | |
RabidGravy | is there any way at all to ensure the role's attributes get initialised in the presence of a BUILD in a consumer without the consumer doiing anything special? | 11:50 | |
timotimo | you can probably call $?PACKAGE's BUILD or some trick like that | 11:51 | |
RabidGravy | but the consumer has to do that | 11:52 | |
timotimo | not if you override the BUILD via the role? | ||
RabidGravy | role's BUILD doesn't get called at all | 11:53 | |
timotimo | darn :| | ||
lizmat | RabidGravy: even if it's the only BUILD in town | ||
RabidGravy | oh, if the role has a BUILD and the consumer doesn't then it's fine | 11:54 | |
11:54
kid51 left
11:55
vendethiel joined
|
|||
RabidGravy | but if the role is part of a public interface then you can't guarantee that to be the case | 11:55 | |
lizmat | I guess we will need some compose trickery, because if the client has a BUILD, the role's build is never really composed, right ? | 11:56 | |
timotimo | .o( will we create a ROLEBUILD that gets special magic added to it? ) | 11:57 | |
jnthn | We've sometimes speculated that submethods will compose in such a way that all of them get called | 12:09 | |
Probably a 6.d feature, which will be made 6.d+ only by passing an option to the .^compose method | 12:10 | ||
(As in, having the compiler do so) | |||
teatime | masak: what is the purpose of 007? Exercising features of Perl6? Personal learning/playing? | ||
jnthn | teatime: So far as I know, research/exploration of macros/slangs to inspire an implementation of these features in Perl 6. | 12:11 | |
And probably some amount of other reasons :) | 12:12 | ||
teatime | hrm, you know what would be sweet (and might exist): an aggregator of perl6 blogs. | 12:15 | |
planet.perl6.org ? :) | |||
tadzik | perl6planet is like that | ||
yeah | |||
lizmat | pl6anet.org | 12:16 | |
timotimo | we could totally redirect to pl6anet.org from planet.perl6.org | 12:17 | |
to be fair, the "Blogs" link in the footer of perl6.org already links to the pl6anet | 12:19 | ||
12:23
sufrostico joined
12:26
Josh4all joined
|
|||
MadcapJake | timotimo: yes, do tell! | 12:27 | |
12:34
perlpilot joined
|
|||
RabidGravy | right, having reviewed all the options I have concluded that there is no hack I can do in a role that will ensure its attributes will get initialised whatever the consumer does so am going for the "document in bold" option | 12:41 | |
[Coke] | ORM-- # my 2¢ on a backscroll | ||
RabidGravy | I think that could be simplified to "software--" without the need for backscroll | 12:42 | |
stmuk_ | RabidGravy: does github.com/stmuk/MoarVM/commit/eba...ae0d4b0fc3 fix your FreeBSD 8 issue? | 12:48 | |
12:48
Actualeyes left
|
|||
Begi | m: say 'yes !' if 'a' ~~ ('a', 'b', 'c'); #how can I do ? | 12:48 | |
camelia | ( no output ) | ||
12:48
Fatalnix_ left
|
|||
jnthn | m: say 'yes !' if 'a' (elem) ('a', 'b', 'c'); # one way :) | 12:50 | |
camelia | rakudo-moar e5174b: OUTPUT«yes !» | ||
RabidGravy | or | ||
m: say 'yes !' if 'a' ~~ any('a', 'b', 'c') | |||
camelia | rakudo-moar e5174b: OUTPUT«yes !» | ||
Begi | Okey, thanks ! I've forget the 'any' :-° | 12:51 | |
RabidGravy | stmuk_, let me see | ||
12:57
cdg joined
|
|||
timotimo | MadcapJake: so, a VAO combines configuration options, so to speak, of multiple VAOs into one object that you can bind in one step. sadly, it seems like you can't use a VAO without writing a tiny little pixel shader to work it, as opposed to VBOs, for which there are sufficiently many functions to set up all kinds of stuff | 12:57 | |
stmuk_ does the clang 3.4 src/core/interp.o wait :/ | 12:58 | ||
timotimo | hah | ||
MadcapJake | timotimo: neat, so stick to the VBOs ;) | ||
timotimo | ideally, we'd bind all functions necessary to work shaders, though | 12:59 | |
sortiz | RabidGravy, In DBIish I have the same problem with the roles. :-( | 13:02 | |
RabidGravy | stmuk_, it appears to help yes | 13:03 | |
stmuk_ | ty | ||
RabidGravy | but yeah that thing after interp.o taking forever is a pain, I've abandoned building on FBSD10 on a VM here more than once | 13:07 | |
13:07
Actualeyes joined,
Ven joined
|
|||
stmuk_ | clang 3.6 at least (which is in ports) works fine | 13:08 | |
there are probably NC problems with using a diff compiler to the system one however, hopefully FB 11 has a more recent cd lang | 13:09 | ||
^ recent clang | |||
13:12
Sgeo left,
Josh4all left
|
|||
masak | teatime: what jnthn said. | 13:15 | |
teatime: 007 emerged as a basically-necessary side project to prototype Perl 6 macros in something more "fluid" than Rakudo (and where the consequences of failed experiments are smaller) | 13:16 | ||
(and feel free to take the "fluid" as meaning "I understand the 007 code base better than the Rakudo code base") :P | 13:17 | ||
teatime | :) | 13:18 | |
as a much-smaller-scope language parser, it is a super-useful example. | |||
13:24
perlawhirl left
13:26
edehont left
13:28
Ven left
13:29
skids joined
13:38
mullagain joined
13:41
ufobat left
|
|||
rudi_s | Is this expected? | 13:42 | |
m: sub foo(:%args) { say %args.perl }; foo :args(a => 1); foo :args(a => 1, b => 2); | |||
camelia | rakudo-moar e5174b: OUTPUT«:a(1)Type check failed in binding %args; expected Associative but got List ($(:a(1), :b(2))) in sub foo at /tmp/DPyNLmRhpz line 1 in block <unit> at /tmp/DPyNLmRhpz line 1» | ||
rudi_s | Do I have to call it with foo :args(%(a => 1, b => 2)) or is there a better way? | ||
13:42
zakharyas joined
13:43
molaf joined
|
|||
masak | I use private methods in Perl 6 more than I thought I would | 13:43 | |
rudi_s: you do have to do that, to a first approximation | |||
jnthn | It's expected | 13:44 | |
masak | rudi_s: `a => 1, b => 2` is definitely a List and not an Associative | ||
jnthn | m: sub foo(:%args) { say %args.perl }; foo(:args{a => 1, b => 2}); | ||
camelia | rakudo-moar e5174b: OUTPUT«{:a(1), :b(2)}» | ||
jnthn | That's the shortest way to force a hash | ||
rudi_s | Yeah. Automatic "conversion" would've been nice in this case, but I can live with it. | ||
Thanks. | |||
jnthn | Well, when you can be explicit about the hash in the same number of chars... :) | 13:45 | |
RabidGravy | or "foo(args => { a => 1, b => 2 })" | ||
rudi_s | Yeah, {..} is really nice. Thanks. | ||
13:46
ecocode joined
|
|||
teatime | you could also take a list of pairs as varargs, and make it into a hash yourself at the beginning of the function? would that be a bad idea? | 13:49 | |
I thought arbitrary/not-validated variable-length kwargs was built-in | |||
masak | they are | 13:51 | |
m: sub foo(*%_) { say %_.perl }; foo(oh => "hai", how => "are you?") | |||
camelia | rakudo-moar e5174b: OUTPUT«{:how("are you?"), :oh("hai")}» | ||
jnthn | We just generally don't confuse a list of pairs with a hash, 'cus they ain't the same thing. Something somewhere has to say it wants to make a hash of them, 'cus it's an information-losing operation | ||
masak | even in Perl 5 they are not the same thing | 13:52 | |
14:09
sue joined
|
|||
[Coke] | jnthn++ for the work on the heap analyzer. | 14:14 | |
14:14
Roamer` joined
|
|||
masak .oO( the ultimate heapster ) | 14:14 | ||
sortiz | m: my $f = sub :: { (1,2,3,4) }; say $f(); # So far, so good | 14:16 | |
camelia | rakudo-moar e5174b: OUTPUT«(1 2 3 4)» | ||
14:16
pmurias joined
|
|||
sortiz | m: my $f = sub :: { (1,2,3,4) }; for $f() { say $_ }; # What! | 14:17 | |
camelia | rakudo-moar e5174b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/KyjgNPrCLcThis appears to be Perl 5 codeat /tmp/KyjgNPrCLc:1------> 3my $f = sub :: { (1,2,3,4) }; for 7⏏5$f() { say $_ }; # What!» | ||
sortiz | m: my $f = sub :: { (1,2,3,4) }; for $f.() { say $_ }; # Works, LTA | ||
camelia | rakudo-moar e5174b: OUTPUT«1234» | ||
Roamer` | Hi, is it expected that I can't do a ~~ match within a grammar's action method? | 14:18 | |
m: grammar a { token TOP { \w } }; class Actions { method TOP($/) { if "abc" ~~ /b/ { say "yep" } } }; a.parse("w", :actions(Actions)) | |||
camelia | rakudo-moar e5174b: OUTPUT«Cannot assign to a readonly variable or a value in method TOP at /tmp/eCiUnztAtu line 1 in regex TOP at /tmp/eCiUnztAtu line 1 in block <unit> at /tmp/eCiUnztAtu line 1» | ||
masak | sortiz: congratulations, you managed to trigger a p5 warning false positive! | ||
moritz | Roamer`: yes, because you specified $/ as a parameter, which makes it read-only | 14:19 | |
Roamer` | moritz, ah, it works if I rename the parameter. Thanks! | ||
moritz | Roamer`: if you name it $m or so, a smart-match which sets $/ is possible again | ||
sortiz | rakudobug, I hope ;.) | ||
masak, if it were only a warning, but is a compiler error :-( | 14:23 | ||
masak | sortiz: arguably the p5 compat error overreaches a bit here, yes | 14:24 | |
sortiz: in order for it to be p5 code, it'd have to be `$f` without the `()` after | |||
sortiz | m: my $f = 1; for $f { .say }; # and this works well. | 14:25 | |
camelia | rakudo-moar e5174b: OUTPUT«1» | ||
masak | oh! | 14:26 | |
the compiler thinks that the parens are for the Perl 5 list! | |||
$ perl -Mstrict -wE 'my $f; for $f() {}' | 14:27 | ||
syntax error at -e line 1, near "() " | |||
but that still doesn't make sense. seems there has to be whitespace there. | |||
sortiz | m: my \f := sub :: { (1,2,3,4) }; for f() { say $_ }; # and this | 14:28 | |
camelia | rakudo-moar e5174b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/M4xOpe7wiaVariable '&f' is not declaredat /tmp/M4xOpe7wia:1------> 3my \f := sub :: { (1,2,3,4) }; for 7⏏5f() { say $_ }; # and this» | ||
jnthn | The form f() always looks up &f (unless there's some type f, in which case it's a coercion type) | 14:29 | |
m: my &f := sub :: { (1,2,3,4) }; for f() { say $_ } | |||
camelia | rakudo-moar e5174b: OUTPUT«1234» | ||
jnthn | m: my \f := sub :: { (1,2,3,4) }; for f.() { say $_ } | ||
camelia | rakudo-moar e5174b: OUTPUT«1234» | ||
sortiz | jnthn, In my use case f (or $f) is in fact an object with a defined CALL-ME method | 14:30 | |
diakopter | m: class f {}; my &f := sub :: { (1,2,3,4) }; for f() { say $_ } | 14:31 | |
camelia | rakudo-moar e5174b: OUTPUT«Method 'shortname' not found for invocant of class 'Perl6::Metamodel::CoercionHOW' in block <unit> at /tmp/JrxCb7whpD line 1» | ||
diakopter | You're a CoercionHOW! | ||
14:32
telex left
|
|||
jnthn | sortiz: $f.() will also work as a workaround for now, while the Perl 5 warning is toned down some | 14:32 | |
I guess making it insist on whitespce before teh ( would help | |||
14:33
sufrostico left
14:34
telex joined,
khw joined
|
|||
sortiz | jnthn, ok. At the moment I'll live with that. ;-) | 14:39 | |
14:40
fireartist left
14:45
sufrostico joined,
znpy joined
14:46
ptolemarch joined
|
|||
[Coke] | m: role Foo[$x] { }; say Foo[42].WHO.^name | 14:49 | |
camelia | rakudo-moar e5174b: OUTPUT«VMNull» | ||
masak | VMNull!? :) | ||
teatime | if cwd has lib/ and resources/ and t/, 1) how do you run the tests in t/, and 2) how do you allow use'ing your module and accessing your resources as-if installed? is PERL6LIB="." or something sufficient? or can you tell panda to install-editable like you can w/ python virtualenvs? just looking for a pointer to the basic dev workflow. | 14:50 | |
jnthn | Interesting answer. :) A CurriedRoleHOW really has no meaningful .WHO, though I guess we could shove some throw-away Stash on there | ||
[Coke] | rt.perl.org/Ticket/Display.html?id=123488 | 14:51 | |
RabidGravy | teatime, I usually just "panda-test" | ||
[Coke] | it used to segfault back in 2014, so, progress. | ||
jnthn | Yeah | ||
teatime | oh, and 3) how do you make scripts in ./bin/ able to find modules in ./lib/ | 14:52 | |
jnthn | I guess desired behavior is perhaps an empty Stash | ||
Though if you access the .WHO here, it's hugely likely that you're actually very confused about how things work :) | 14:53 | ||
masak | getting VMNull is a bit like the VM coming to the small convenience store that you run, going "nice little store you got here -- would be a real shame if something were to... happen to it", and then just leaving | 14:55 | |
teatime | is this really not something all of you do like every day? | 14:56 | |
RabidGravy: I appreciate that, v. helpful. | |||
jnthn | masak: It's the "you deserved a segfault but I did better than that" value :) | ||
masak | yes, that's what I mean :) | 14:57 | |
RabidGravy | teatime, as to the bin thing, once they are installed they don't need anything special, to test I tend to just do "perl6 -Ilib bin/foo" | ||
teatime | oh right, I forgot -I works for other-than-REPL. | ||
14:57
spider-mario left
|
|||
moritz | right, what RabidGravy said | 14:57 | |
hoelzro | it works for REPL now too | 14:58 | |
teatime | hoelzro: since the last couple of days? | ||
hoelzro | since...Thursday? | ||
hoelzro forgot when he merged | |||
teatime | k, excellent! | ||
14:59
dbohdan left
|
|||
RabidGravy | the %*RESOURCES also just works if you specify the -I or PERL6LIB as the CUR it uses is clever enough to work it out | 15:00 | |
masak | I tend to just `export PERL6LIB=lib` in the terminal tab where I do development :) | 15:08 | |
no need for -I after that | |||
15:10
maybekoo2 joined
15:12
ufobat joined
|
|||
[Coke] | RT: 1298; SEGV: 11; LTA: 129; WEIRD: 14; NOM: 7; GLR: 7; PERF: 13; JVM: 58 | 15:16 | |
15:29
zakharyas left
|
|||
teatime | since I abuse virtualenvwrapper for all of my projects (not just python), I shall add a post-activate hook to set PERL6LIB :) | 15:31 | |
15:40
Ven joined
|
|||
ufobat | i want to use a "is rw" on an optional paramter.... but it is not supposed to work, isn't it? | 15:43 | |
15:43
sue left
|
|||
jnthn | m: sub foo($x is rw = 42) { }; foo() | 15:45 | |
camelia | rakudo-moar 27dca5: OUTPUT«5===SORRY!5=== Error while compiling /tmp/4dYN8jz_MmCannot use 'is rw' on an optional parameterat /tmp/4dYN8jz_Mm:1» | ||
jnthn | Seems it's outright refused | ||
You'd have to write something like | |||
ufobat | i thought to myself that with a default value it actually makes sense | 15:46 | |
jnthn | m: sub foo($x is raw = 42) { }; foo() | ||
camelia | ( no output ) | ||
jnthn | But note that then you can't be sure $x is assignable | ||
Might be easier to write a pair of multi subs | 15:47 | ||
One that takes an rw thing, one that doesn't | |||
ufobat | omg! yeah of course | ||
thanks for the hint | 15:48 | ||
i am going to read the "is raw" thingy, i dont know it yet | |||
*being curious* | |||
15:49
jameslenz left
|
|||
sufrostico | teatime: I run the tests with prove -e perl6 | 15:49 | |
teatime: and for the test files... I usually add the line «use lib 'lib'« | 15:50 | ||
teatime: use lib 'name-of-the-folder-with-my-private-library'; | 15:51 | ||
teatime | does it make any sense to mix perl5 and perl6 code in the same repo and/or lib/ directory? | ||
15:55
cognominal joined
15:58
sue joined
|
|||
awwaiid | teatime: depends on what you're doing, but I imagine that it would be mostly one or the other | 16:00 | |
ufobat | if i do the multi method way, and in one method i want to call the other with the additional is rw parameter, do i use samewith(..oldparams.. $rw-int) or callwith(..oldparams.., $rw-int) | 16:01 | |
lizmat is working on the Perl 6 Weekly | |||
so let me know of anything you would like to see in the weekly! | |||
jnthn | lizmat: I'd like to see a worse pun that the one in my blog post this week :D | 16:02 | |
*than | |||
timotimo | it's hard to pun "bunny" to "punny" | ||
lizmat | .oO( very punny ) |
16:03 | |
awwaiid | lizmat: I don't have it posted, but on April 16 in Baltimore we'll have a short intro-to-Perl6 tutorial from myself and more advanced nativecall/async tutorial from [Coke]. dcbpw.org | ||
jnthn | Damn, that place name makes me hungry... :) | ||
lizmat | yeah, the DCBaltimoreW is on my list :-) | ||
awwaiid | lizmat++ # lists! | ||
MadcapJake | reCaptcha added to sixbug, now just the final gmail smtp integration and this should be good to launch! | 16:05 | |
diakopter | MadcapJake: probably have it relay to other individuals (such as your self) who can also shut it off in case of emergency (in case it gets spammed) | 16:06 | |
ufobat | if i do the multi method way, and in one method i want to call the other with the additional is rw parameter, do i use samewith(..oldparams.. $rw-int) or callwith(..oldparams.., $rw-int) | 16:07 | |
oups sorry | |||
this keystroked was supposed to go to my emacs :) | |||
MadcapJake | diakopter: yes agreed, reCaptcha should be enough, if anyone wants to help they can take a peak through the code it's on github (pushing latest work after lunch though) | 16:08 | |
16:09
cdg_ joined,
cdg left
|
|||
hoelzro | o/ #perl6 | 16:11 | |
MadcapJake | still planning on adding the ability to shortcut using the smtp impl and just get a redirect mailto, then I want to add a redirect to the actual ticket after submission, and I also still have to finish issue templates too. But the basics are there and ready to be used! | ||
MadcapJake off to lunch & | |||
hoelzro | how do people feel about easter eggs in rakudo? I know we have this: | 16:12 | |
m: say "Life, the Universe, and Everything".WHY | |||
camelia | rakudo-moar 27dca5: OUTPUT«42» | ||
lizmat | hoelzro: could you explain in a few lines the state of the REPL since you merged your work ? | ||
hoelzro | sure! | 16:13 | |
basically the higher-level features of the REPL (line editing, tab completion, etc) are now implemented in Perl 6, not NQP | |||
this will allow new users to read, understand, and modify the REPL itself more easily | |||
and make the lives of those of us who would like to extend it a little easier | 16:14 | ||
it also works with -I now | |||
and it saves your history to ~/.perl6/rakudo-history or RAKUDO_HIST | |||
16:15
Dunearhp joined
|
|||
lizmat | hoelzro: thanks! | 16:16 | |
dinner& | |||
hoelzro | anyway, the reason I ask about easter eggs is in a fit of feeling silly, I added this: hoelz.ro/files/lod.png | 16:18 | |
and I was wondering if I should include it in rakudo, or if that's just too silly for the compiler | |||
dalek | Iish: f1e36d2 | (Salvador Ortiz)++ | t/ (3 files): Add missing 'use' |
16:23 | |
Iish: 07226c7 | (Salvador Ortiz)++ | lib/DBDish/ (2 files): Pg/mysql: Propagate conn params |
|||
16:23
espadrine joined
16:30
espadrine left
16:32
spintronic joined,
TEttinger joined
|
|||
dalek | Iish/data-sets: 1ed8466 | (Salvador Ortiz)++ | / (4 files): WIP/RFC: A new DataSet interface for DBIish See added t/50-DataSet.t for details |
16:36 | |
16:47
spintronic left,
spintronic joined
16:51
espadrine joined
|
|||
MadcapJake | anyone know if I can just save an SSL certificate or should I request it freshly every time I need it (to send data to an SMTP server) | 16:56 | |
16:56
sufrostico left
16:58
Ven left
|
|||
spintronic | Why can't rakudobrew build panda correctly? I keep getting "Cannot find Shell::Command" | 17:02 | |
Begi | spintronic : with "$ rakudobrew build panda " ? | 17:04 | |
17:05
spintronic_ joined
17:06
sue left
|
|||
spintronic_ | I'm running on Centos 6.7. Maybe it's too old... | 17:06 | |
17:07
pnu joined
17:09
spintronic left
|
|||
moritz | spintronic_: which rakudo did you build? | 17:11 | |
Hotkeys | moritz: spintronic_ I've been getting that too | ||
17:13
sufrostico joined
|
|||
Hotkeys | Something broke a couple weeks ago in panda (Shell::Command?) That won't let it build on windows for me | 17:13 | |
17:16
spintronic joined
|
|||
spintronic | I'm running the latest rakudobrew and perl6 | 17:16 | |
17:20
Relsak joined
|
|||
spintronic | something breaks in panda all the time. My local perlmongers say just wait and try building again in a couple of days. | 17:27 | |
pnu | masak, about heroku and (data) persistence... yes, you'd want to use postgresql, redis etc. for any storage. Lookup heroku _addons_ for those two. Dynos' local storage doesn't survive even restarts/scaling; dynos (and build process) are completely isolated. Only things shared are the slug (code image created by the build), heroku config (copied to system env | ||
on startup) and the attached addons. | |||
17:30
mullagain left,
jameslenz joined,
Dunearhp left
|
|||
pnu | .. for manual testing and seeing how your slug looks like you can do "heroku run bash". That too will be a separate new dyno, not a "live" server. | 17:31 | |
MadcapJake | spintronic: you could try nuking your install | 17:33 | |
17:34
abaugher left
|
|||
spintronic_ | Ok I'll try that | 17:34 | |
17:35
abaugher joined
|
|||
spintronic | do we still download rakudobrew from github.com/tadzik/rakudobrew ? | 17:42 | |
Begi | spintronic: yes, and just follow the installation instructions | 17:43 | |
spintronic | ok rebuilding moar now... | ||
RabidGravy | yeah, you may also try simply "rakudobrew self-upgrade; rakudobrew nuke moar; rakudobrew build moar; rakudobrew build-panda" | 17:44 | |
pnu | RabidGravy, masak, I think 12factor.net/ describes pretty well the ideas how/why heroku lifecycle goes as it goes. | 17:45 | |
spintronic | yeah I did but nuke moar didn't seem to work. | ||
So I'm starting all over again. | |||
nuke jvm did work. | |||
17:45
cpage_ left
|
|||
spintronic | Is zef working for anyone yet? | 17:46 | |
Hotkeys | Zef and panda both worked for me on Linux last time I tried | 17:49 | |
But I can't get panda to build on windows | |||
spintronic: | |||
I ended up just building an older version of panda | |||
You can specify the commit you want to build with rakudobrew | |||
spintronic | Hotkeys: building panda now. If it doesn't work I'll go with an older rev. Which one are you useing? | 17:50 | |
Hotkeys | I don't remember and I'm not at my computer right now | ||
If you look at the commits | 17:51 | ||
Its the one before stuff was squashed into shell__command | |||
I think | |||
On Feb 22 | 17:52 | ||
There might be a later one that works | |||
Not sure | |||
MadcapJake | Does Nil work for nativecall subs as NULL? | ||
hoelzro | MadcapJake: for calling? | 17:53 | |
MadcapJake | yeah for calling a native sub, I want to pass NULL | ||
hoelzro | I've always just used the type object for the required type | 17:54 | |
spintronic | Hotkeys: oh ok. Well it the latest still doesn't work. | ||
hoelzro | ex. something_that_takes_a_null_string(Str) | ||
MadcapJake | will that work with a repr('CStruct') class? | ||
Hotkeys | Yeah | ||
I think panda occasionally pulls shell command into an include | 17:55 | ||
MadcapJake | spintronic: also take a look at the paths it tries to find shell::command in | ||
Hotkeys | And I think it just hasn't for a month now | ||
MadcapJake: I tried putting a newer version into its local copy of shell::command like last week and it refused to work | 17:56 | ||
I suppose I should file an issue | |||
MadcapJake | I think the problem is that panda uses shell:command to build itself so it's inside panda's build dir somewhere | 17:57 | |
Hotkeys | It is | ||
MadcapJake | strange | ||
Hotkeys | Its in ext/Shell__Command | ||
I tried replacing that with a new version and it didn't help any | 17:58 | ||
MadcapJake | strange | ||
does rakudobrew build-panda give you a list of paths it searches for it in? | 17:59 | ||
so looking at bootstrap.pl right now (in panda repo) | 18:00 | ||
why no «use lib 'ext'» github.com/tadzik/panda/blob/41888...trap.pl#L5 | 18:01 | ||
that might be enough to make it work actually | |||
18:04
spintronic_ left,
spintronic__ joined
|
|||
MadcapJake | tadzik: shouldn't bootstrap.pl in panda have «use lib 'ext'» instead of the paths to each of the modules internal lib dirs? | 18:05 | |
18:09
Ven joined
|
|||
moritz | MadcapJake: but the modules aren't directly unlder ext/ | 18:09 | |
MadcapJake | aren't they? | ||
18:10
Relsak left
|
|||
moritz | MadcapJake: no, they are under ext/File__Find/lib/File/Find.pm and the likes | 18:10 | |
MadcapJake | the module files you mean | ||
hmm, trying to figure out why Hotkeys and spintronic were getting "cannot find shell::command" error | 18:11 | ||
DrForr | This.. is interesting. Subjecting a Crust servr to 15 concurrent users under siege(1) for a single request works. 16 hangs consistently. | 18:12 | |
I don't suppose 'grep -r 15' is going to find anything useful, but here goes :) | 18:13 | ||
18:22
cpage_ joined
18:24
cdg_ left
18:25
cdg joined
|
|||
RabidGravy | DrForr, perhaps it is the number of threads available to the scheduler? | 18:25 | |
18:26
Ven left
|
|||
DrForr | Entirely possible. | 18:26 | |
RabidGravy | this would be easily provided, just set $*SCHEDULER to a ThreadPoolScheduler with a smaller number | ||
proved | |||
DrForr | Hadn't really yet looked into the threading mechanism, but I'll scribble a note for a few minutes hence :) | 18:27 | |
18:28
dha joined
|
|||
DrForr | I also managed to trigger an error in Crust that I can't replicate. | 18:29 | |
18:29
cdg left
|
|||
RabidGravy | is it possible that it is failing to close the client connections in a timely fashion and is getting deadlocked before it is able to do when it reaches the max number of threads | 18:30 | |
(I haven't looked in the code) | |||
DrForr | Nod. | ||
Its behavior *after* trying to handle 16 threads is also reminiscent of a deadlock. | 18:31 | ||
diakopter | notably, these 15 would be in addition to the main program thread, right? | 18:32 | |
DrForr | Power of 2, I don't believe this to be a coincidence :) | ||
18:37
dbohdan joined
|
|||
dbohdan | A person on Hacker News asks, "What would you use to build a super simple web app?" and says "I don't care if it's in Ruby, PHP, Golang, Perl 6..." | 18:39 | |
news.ycombinator.com/item?id=11374752 | |||
Perhaps you could recommend a Perl 6 approach to making a simple web app to him/her. :-) | 18:40 | ||
DrForr | Funny you shoud mention that :) | 18:41 | |
Hotkeys | Are you making a simple web app DrForr | 18:42 | |
dbohdan: I'm just surprised they mentioned perl 6 as an option to be honest | |||
perlpilot too (happily surprised) | |||
RabidGravy | well if I wanted a super-super-simple web app I'd just hook up a shell script to inetd ;-) | ||
diakopter | to be fair(-ish), it may be the "absurd final option" | 18:43 | |
Hotkeys | we need something like django or flask for p6 | ||
RabidGravy | do feel free to write it :) | ||
Hotkeys | >_> | ||
perlpilot | diakopter: except that it's not. It's in between Golang and JS | ||
spintronic__ | MadcapJake: I'm trying to move the shell::command library now to see if panda can find it. | ||
diakopter | oh | ||
Hotkeys | I was gonna say "We can call it Oyster" but apparently that's a thing | 18:44 | |
diakopter | it's hard to find things that aren't already things | ||
Hotkeys | perhaps "Chaos" as a play on the butterfly effect (see: camelia) | ||
but chaos might be a bad word for a thing | 18:45 | ||
diakopter | camelot? | ||
cameliot | 18:46 | ||
perlpilot | camelion ;) | ||
MadcapJake | Crust is pretty nice already, a sugary wrapper around it would make for a super simple webapp experience (there's got to be a good name there too: crust + sugar) | ||
Begi | For what's the name you're looking for ? | ||
dbohdan | My approach to naming tiny HTTP frameworks is "${language}http" if that isn't take. :-) | ||
diakopter | Crust sounds like something for Rust | ||
Hotkeys | lol | ||
RabidGravy | MadcapJake, I think that's precisely what DrForr is doing | ||
Hotkeys | ah | 18:47 | |
dbohdan | *taken | ||
DrForr | Aroo? | ||
RabidGravy | Boop boop sheboop | ||
dbohdan | "Tea"? | 18:48 | |
DrForr files a Crust bug and returns to testing... | |||
dbohdan | (Tea's species name is Camellia sinensis.) | ||
Hotkeys | nice | ||
DrForr | Ooo, I might have to rename mine to Marzipan. | 18:49 | |
MadcapJake | some sugar + crust ideas: pie, bundt, canoli, truffle | 18:50 | |
18:51
espadrine left
|
|||
diakopter | CARBanana | 18:51 | |
RabidGravy | (Creme) Brulée | ||
dbohdan | "Truffle" would clash the JVM: wiki.openjdk.java.net/display/Graa...Guidelines | 18:52 | |
*on the JVM | |||
MadcapJake | bummer, I think canoli is my favorite (mostly cus they're my favorite treat) | 18:53 | |
DrForr | Hotkeys: github.com/drforr/perl6-App-prancer for an idea. | ||
18:54
spintronic__ left
|
|||
MadcapJake | DrForr: looks like I need to take it for a spin again! | 18:54 | |
Woodi | DrForr: is "glaze" taken ? :) | 18:55 | |
masak | if it's crust and sugar you want, just call it "cougar" :D | 18:56 | |
Begi | O_o | ||
perlpilot | Woodi: link.springer.com/chapter/10.1007%2...03655-2_95 not quite the same space, but close | ||
Woodi | perlpilot: damn :) | 18:57 | |
DrForr | Hrm. 9 transaction/sec on a rather overworked VM, holding up at 300k/sec transfer. | ||
Woodi: No idea. I'd go for Krispy::Kreme but would run afoul of branding laws. | 18:58 | ||
And now I'm wishing my NLPW trip went through Heathrow. | |||
Woodi | DrForr: if you want something more chocolte-y then ganache maybe ? :) | ||
DrForr | And the wish just passed, as I remember how much I despise it. | ||
(Heathrow, not KK) | 19:00 | ||
19:00
cpage_ left
|
|||
Hotkeys | I think I might try to make Inline::Factor | 19:01 | |
because Factor is dope | |||
MadcapJake | DrForr: I'm noticing the same freezing at >15 connections on Crust | 19:02 | |
19:03
cpage_ joined
|
|||
DrForr | MadcapJake: Yeah, I haven't dug into the code yet, just scoping out performance in general. | 19:03 | |
19:04
labster joined
|
|||
MadcapJake | I'm only getting 3 Req/Sec on my machine (just using it right on my rig though) | 19:05 | |
DrForr | I'd guess if I had to that it's assuming that the thread pool is infinite so it simply spawns what it needs, and when resources run out it deadlocks trying to allocate the new threads rather than puts requests in a queue. | ||
MadcapJake | oops that's per thread! I'm getting 29 req/sec in total | ||
DrForr | Better than I'm doing here, but my VM is somewhat overworked. | ||
MadcapJake | I was a little worried that my dev rig was slower than a VM ;) | 19:06 | |
DrForr | I could put it on my linode, but that puts me at the tender mercies of my network connection. | ||
19:06
dvinciguerra_ joined
|
|||
MadcapJake | Hopefully, moritz will let me put this up on the p6c server | 19:07 | |
DrForr | Even locally I'm seeing ~700k/sec and ~20 req/sec. | ||
19:07
dvinciguerra left
|
|||
DrForr | Doing a longer run right now, we'll see what the results are. | 19:07 | |
MadcapJake | Wow I am only getting 300kb/sec locally | ||
19:08
sue joined
|
|||
MadcapJake | Every once in a while I am getting these core.settings errors in my log | 19:08 | |
DrForr | Heh, I just coredumped siege, FD table overflow. | ||
MadcapJake | broken pipe | ||
i'm using wrk | |||
HTTP::Server::Tiny keeps throwing this at me hastebin.com/ejisizodim.txt | 19:09 | ||
DrForr | Regardless my original problem with Crust not being able to handle >1 connection per client seems to have vanished. | 19:10 | |
MadcapJake: Without looking I"m guessing that's what I filed on GH. | |||
MadcapJake | no "broken pipe" errors on MoarVM repo | 19:11 | |
DrForr | You're right, that's a different error. | 19:12 | |
MadcapJake | I submitted on there, not really sure what's going on, just happy that HTTP::Server::Tiny seems to just trudge right on through it :) | 19:14 | |
19:15
dogbert joined
19:16
dogbert is now known as Guest73352
|
|||
Hotkeys | oh neat | 19:18 | |
DrForr | 18.5 transactions/sec, 800K/sec, concurrency 12.42. Not great, but better than I'd expected. | ||
Hotkeys | NativeCall can do cpp | ||
I have no idea how to do an inline thing | 19:19 | ||
fun learning adventure time | |||
DrForr | Hotkeys: Inline::Scheme::Guile :) | 19:20 | |
Hotkeys | Yeah I've been perusing all the inline modules | ||
19:20
yqt joined
|
|||
Hotkeys | does guile use cpp :D | 19:20 | |
19:21
kaare_ left
|
|||
Hotkeys | it seems the answer is no | 19:21 | |
timotimo | well, gnu people do their glibc stuff | ||
which is "their own" object system | |||
DrForr | It'll let you link in c libraries, probably c++ as well FAIK. | 19:22 | |
Hotkeys | nativecall does c++ apparently | ||
so that's fun | |||
MadcapJake | Hotkeys: no docs though, but you can also just create a C wrapper of C++ functions | ||
timotimo | yeah | 19:23 | |
Hotkeys | the base of Factor's compiler is written in c++ | ||
so I assume that's what I need to use | |||
DrForr | Inline::Scheme::Guile builds a C helper library if it helps. | ||
19:24
domidumont left
|
|||
DrForr | Hotkeys: I should also point out I'm testing with a custom Prancer app that spits out about 100K of HTML per query. | 19:25 | |
Hotkeys | ah | ||
I found factor.hpp | |||
this seems like what I need | |||
maybe | 19:26 | ||
Guest73352 | Hi #perl6, anyone up for a simple/stupid newbie question? | 19:27 | |
I have a problem with SetHash | 19:28 | ||
diakopter | probably! give it a try | ||
Guest73352 | m: my $numSet = (0..10).SetHash; $numSet<5> = False; say $numSet.keys.sort; # why is the 5 still there? | ||
camelia | rakudo-moar 27dca5: OUTPUT«(0 1 2 3 4 5 6 7 8 9 10)» | ||
Begi | i've a newbie problem with LWP::Simple, I guess. My header doesn't work : gist.githubusercontent.com/Emeric5...request.p6 | 19:29 | |
Any idea why ? thanks ! | 19:30 | ||
[Coke] | m: my $numSet = (0..10).SetHash; $numSet.perl.say | ||
camelia | rakudo-moar 27dca5: OUTPUT«SetHash.new(5,7,9,4,8,3,0,1,6,2,10)» | ||
[Coke] | m: my $numSet = (0..10).SetHash; $numSet<5>:delete; say $numSet.keys.sort; | ||
camelia | rakudo-moar 27dca5: OUTPUT«(0 1 2 3 4 5 6 7 8 9 10)» | ||
[Coke] | m: my $numSet = (0..10).SetHash; $numSet{5} = False; say $numSet.keys.sort; | 19:32 | |
camelia | rakudo-moar 27dca5: OUTPUT«(0 1 2 3 4 6 7 8 9 10)» | ||
[Coke] | ^^ | ||
5 NE "5" | |||
<5> is "5". {5} is a raw 5. | |||
Guest73352 | Aha, thanks Coke++ told you it was simple :-) | 19:33 | |
19:33
ptolemarch left
|
|||
MadcapJake | m: (SetHash.new(1..10) (^) SetHash.new(5)).keys.sort | 19:33 | |
camelia | ( no output ) | ||
MadcapJake | m: (SetHash.new(1..10) (^) SetHash.new(5)).keys.sort.say | ||
camelia | rakudo-moar 27dca5: OUTPUT«(1 2 3 4 6 7 8 9 10)» | ||
Guest73352 | Ah, nice | 19:34 | |
MadcapJake | Guest73352: doc.perl6.org/language/setbagmix#infix_%28%5E%29 | 19:35 | |
Guest73352 | Thx MadcapJake, will take a look | ||
MadcapJake | I love a good chance to use those operators :) If I wasn't worried that you'd leave IRC, I'd have taken the time to use the unicode version (⊖) xD | 19:36 | |
diakopter | m: (SetHash.new(1..10) (^) SetHash.new(5)).keys.sort.say | 19:38 | |
camelia | rakudo-moar 27dca5: OUTPUT«(1 2 3 4 6 7 8 9 10)» | ||
diakopter | m: (SetHash.new(1..10) ⊖ SetHash.new(5)).keys.sort.say | ||
camelia | rakudo-moar 27dca5: OUTPUT«(1 2 3 4 6 7 8 9 10)» | ||
19:39
buharin joined
|
|||
diakopter | m: SetHash.new(1..10 ⊖ 5).keys.sort.say | 19:39 | |
camelia | rakudo-moar 27dca5: OUTPUT«(1 2)» | ||
MadcapJake | So I'd say 34 reqs/sec is pretty respectable (especially because right now we're--artificially?--restricted to 15 connections) | ||
m: (SetHash.new(1..10) (^) 5).keys.sort | |||
camelia | ( no output ) | ||
diakopter | where does that rank on www.techempower.com/benchmarks/ | 19:40 | |
MadcapJake | m: (SetHash.new(1..10) (^) 5).keys.sort.say | ||
camelia | rakudo-moar 27dca5: OUTPUT«(1 2 3 4 6 7 8 9 10)» | ||
MadcapJake | diakopter: thanks was looking for something like this! | ||
MadcapJake is really tempted to try Ur/Web | |||
RabidGravy | I think I am going to set fire to my computer, then all the other computers in the world | 19:41 | |
MadcapJake | please leave mine out of this! | ||
RabidGravy | I have just spent *hours* typing in the docs for this module, got distracted, forgot I hadn't saved and exited without saving | 19:42 | |
MadcapJake | oi! pretty much the worst thing in the world right there. I feel your pain. | ||
japhb | RabidGravy: autosave FTW? | ||
DrForr | MadcapJake: Yep, respectable. I may dig into the queueing aspect later in the week, but bedtime waits for no person. | 19:43 | |
diakopter | the fastest Perl one on there is 5.9% the performance of the fastest | ||
(for the fortunes benchmark) | 19:44 | ||
has someone written a fortunes benchmark for rakudo? | |||
MadcapJake | diakopter: their payload is quite a bit smaller than mine (several CSS files, icon fonts, a few external CDN resources) so I'd be curious to try to match their benchmark and see how it goes! | 19:45 | |
diakopter | MadcapJake: sounds like you're the right person for it! | 19:46 | |
MadcapJake | diakopter: It doesn't look too bad really | 19:47 | |
diakopter | I had thought jnthn's blog posts from earlier this year were building toward a simple http server | 19:48 | |
(and maybe they still are ;) | |||
MadcapJake | The best one out there right now is HTTP::Server::Tiny (I think) | ||
I think it's the only one (that I know of) that can send binary data :P | 19:49 | ||
19:52
spider-mario joined,
sufrostico left,
o_sutur joined
|
|||
MadcapJake | I can't seem to make this debug env variable go away! | 19:54 | |
19:55
musiKk_ joined
19:56
perlawhirl joined
19:57
sufrostico joined
|
|||
geekosaur | ? | 19:58 | |
MadcapJake | aha I know what's going on here | 20:00 | |
HTTP::Server::Tiny puts the HST_DEBUG environment variable in a constant, so the no matter what I do to the HST_DEBUG in my shell, it's already been set when it compiled | 20:01 | ||
20:03
dha left
20:05
m0li joined
20:06
kmwallio left
20:07
kmwallio joined
20:08
cdg joined
20:10
cdg left,
cdg joined
20:14
cdg left,
cdg joined
20:18
darutoko left
|
|||
MadcapJake | RabidGravy: can I change the $*SCHEDULER to one with a higher max_threads? | 20:20 | |
masak | m: say $*SCHEDULER.clone(max_threads => 32) | 20:21 | |
camelia | rakudo-moar 27dca5: OUTPUT«ThreadPoolScheduler.new(initial_threads => 0, max_threads => 32, uncaught_handler => Callable)» | ||
RabidGravy | yeah | 20:22 | |
masak | dunno how to install that new scheduler in $*SCHEDULER, though | ||
MadcapJake | right that's what I want to do | ||
diakopter | m: $*SCHEDULER.=clone(max_threads => 32) | ||
camelia | rakudo-moar 27dca5: OUTPUT«Cannot modify an immutable ThreadPoolScheduler in block <unit> at /tmp/12KVD0Gqey line 1» | ||
RabidGravy | just | ||
diakopter | m: $*SCHEDULER.:=clone(max_threads => 32) | ||
camelia | rakudo-moar 27dca5: OUTPUT«5===SORRY!5=== Error while compiling /tmp/VIda26nwvTMalformed postfix callat /tmp/VIda26nwvT:1------> 3$*SCHEDULER.:7⏏5=clone(max_threads => 32)» | ||
RabidGravy | m: my $*SCHEDULER = ThreadPoolScheduler.new(max_threads => 32) | ||
camelia | ( no output ) | ||
RabidGravy | before you do anything that requires the scheduler | 20:23 | |
diakopter | m: say $*SCHEDULER.clone(max_threads => 9*9*9) | ||
camelia | rakudo-moar 27dca5: OUTPUT«ThreadPoolScheduler.new(initial_threads => 0, max_threads => 729, uncaught_handler => Callable)» | ||
RabidGravy | (or anything that you want to be affected thus) | ||
diakopter | m: say $*SCHEDULER.clone(max_threads => 9**9**9) | ||
camelia | rakudo-moar 27dca5: OUTPUT«(timeout)» | 20:24 | |
diakopter | ETOO....JUST....TOO | ||
masak | don't immanentize the eschaton | 20:25 | |
diakopter | Immanuesch | 20:26 | |
MadcapJake | it doesn't work just putting it in my app's script, would probably need to be in the server module | ||
diakopter | one would think TreadProolSchreduler would lazily allocate | 20:27 | |
MadcapJake | the `my` means that the scheduler is probably only limited to my script's scope and any sub routines I call inside it. the way Crust works, it EVAL's your script, so it would need to be higher that Crust's EVAL calls | 20:29 | |
diakopter | mod_perl did eval, very early on | ||
MadcapJake | still not working :( | 20:32 | |
20:32
labster left
|
|||
MadcapJake | RabidGravy: I've tried placing that in both HTTP::Server::Tiny and Crust::Runner but i'm still getting 0 requests with anything over 15 connections | 20:32 | |
20:33
perlawhirl left,
ecocode left
|
|||
MadcapJake | ok i got strange results now :P | 20:35 | |
If I place it in Crust::Runner.run(), it gives me 6 requests/sec! Why is it lower!? o_O | |||
20:40
pmurias left
20:41
labster joined
20:43
itaipu joined,
ptolemarch joined,
Begi1 joined
|
|||
RabidGravy | because you don't have that many cores in your computer so it takes longer waiting to sort them out? or something. I'm not au-fait with the minutae | 20:44 | |
20:44
Begi left,
Begi1 is now known as Begi
|
|||
kmwallio | So I did my int32 $blah = 1; but when I pass it into a nativecall method, I'm getting "Native call expected argument that references a native integer, but got P6int" | 20:44 | |
20:46
rindolf left
|
|||
kmwallio | the code I'm trying to run is: gist.github.com/kmwallio/8565b36d1fe9e2b18401 | 20:47 | |
20:48
geraud joined
|
|||
MadcapJake | kmwallio: you're call is missing the final argument, just has a type | 20:48 | |
kmwallio | isn't that how you pass null? | 20:49 | |
or no... | |||
MadcapJake | oh yeah that is | ||
kmwallio | or maybe I should pass 0 since it's an int... | ||
Xliff | kmwallio, couldn't hurt to pass 0 just to see. | ||
MadcapJake | if it expects NULL then you should pass the type not 0 | ||
Xliff | MadcapJake, he's already passing the type and getting an error. | 20:50 | |
kmwallio | creating another variable set to 0 make it seem to run happy | ||
MadcapJake | passing the type won't make the method think you gave it a P6int though | ||
so it must be the other two arguments causing the error | |||
weird then i guess i'm wrong, could be some sort of reportable bug | 20:51 | ||
20:51
buharin left,
bjz_ left
|
|||
Xliff | Hrm. OpenCL not in Ubuntu? | 20:51 | |
kmwallio | not by default | ||
you need to install some packages | |||
MadcapJake | Xliff: gist.github.com/rmcgibbo/6314452 | 20:52 | |
20:52
rindolf joined
|
|||
Xliff | Well, hell. Probably won | 20:53 | |
kmwallio | packages.ubuntu.com/search?keywords...chon=names | ||
Xliff | Probably won't work inside a VM, then. | ||
*sigh* | |||
tadzik | MadcapJake: everything in panda's bootstrap.pl runs by black magic | ||
Xliff | When I have to fill out a form to download a file, my interest wanes. | 20:54 | |
MadcapJake | tadzik: lol seems so! | ||
tadzik | MadcapJake: every "why" can be answered with "really, we tried" | ||
kmwallio | Xliff: if you have an extra graphics card, you might be able to do a PCI passthrough | ||
Xliff | kmwallio, I do. Don't know if I can do that using Virtualbox, tough. | ||
MadcapJake | tadzik: I've had that shell::command not found error, but I don't remember how I fixed it, probably just reinstalled everything :P | 20:55 | |
Xliff | s/tough/though/ | ||
tadzik | MadcapJake: it may be that things got saner these days and a lot of these things is not needed anymore | ||
kmwallio | Xliff: www.virtualbox.org/manual/ch09.htm...assthrough | ||
not sure if it's worth it though | |||
tadzik | with precomp being in place and stuff being generally relocatable it may be completely unnecessary these days even | ||
MadcapJake | tadzik: can you change where modules are installed now? | ||
tadzik | I have some time allocated for the toolchain stuff | 20:56 | |
Xliff | kmwallio, yeah. Well I also have dual-boot into KUbuntu on this box, so I may try again next time I am on the other side. | ||
tadzik | MadcapJake: that's not my responsibility anymore | ||
Xliff | Still. I hate it when I have to fill out a fscking form to download a file. | ||
MadcapJake | tadzik: ah, someone (nine?) mentioned that it was almost there a few days ago | 20:57 | |
tadzik | MadcapJake: yeah, it's his child now :) I think panda can still overwrite it with DESTDIR iirc | ||
MadcapJake | Xliff: what kind of form is it? no-looky-at-sourcy? no-writing-your-own-similar-sourcy? | ||
no-suey-in-courty-for-anythingy? :P | 20:58 | ||
Xliff | No. It's the gimme-your-email-before-downloady type. | 20:59 | |
In other words: "download this file so we can spam you!" | |||
MadcapJake | tadzik: eventually, I plan on writing a gx-p6, but I need to be allowed to do local module installs for it to work | ||
20:59
Begi left
|
|||
MadcapJake | Xliff: lol | 20:59 | |
Xliff | MadcapJake, do you have intel_sdk_for_ocl_applications_2013_xe_sdk_3.0.67279_x64.tgz | 21:00 | |
tadzik | MadcapJake: oh, it's definitely possible' | ||
I think DESTDIR is what you're after | |||
21:00
Begi joined
|
|||
tadzik | I also think sergot wrote some thing that installs dependencies in the app directory, quite like Carton | 21:00 | |
21:00
Begi left
|
|||
MadcapJake | tadzik: I'll take a look, cus that's exactly what I'm trying to do | 21:00 | |
tadzik | MadcapJake: github.com/sergot/bamboo | 21:01 | |
MadcapJake | Xliff: nope, I've never delved into OpenCL (just barely getting my feet wet in OpenGL!) | ||
Xliff | *shudder& | ||
*shudder* OpenGL *shudder* | |||
MadcapJake | lol it doesn't help that I have basically zero experience with matrix math xD | 21:02 | |
kmwallio | MadcapJake: I saw your OpenGL stuff and was going to try using it, but OpenGL is limited to 4x4 matrices | 21:03 | |
I also tried the latest gist, and the animation is pretty smooth | |||
MadcapJake | kmwallio: what would you need bigger matrices for? I think you're supposed to use VertexArrayObject's to manage multiple sets of them | 21:04 | |
kmwallio | MadcapJake: for markov chains, you can use a transition matrix which has rows and columns equal to the number of nodes | 21:06 | |
Xliff | I used to love matrix math. I was good at it. Like.... 25 years ago. | ||
MadcapJake | kmwallio: woah that would be quite a huge matrix then, right? | 21:07 | |
kmwallio | yeah :/ | ||
Xliff | Now my matrix neurons have shriveled. | ||
kmwallio | So for github.com/kmwallio/p6-Lingua-EN-Summary , it takes a little over a minute to generate summaries for some of the samples | 21:08 | |
the Dr. Jekyll and Mr. Hyde takes ~10 minutes | |||
but then again, my implementation probably isn't that great | |||
but if you use the GPU, it's pretty instance | |||
instant* | 21:09 | ||
MadcapJake | I've been trying to delve into neural networks a bit (didn't realize how much math is at the core of them :S ) but I noticed that most people say "we *could* do each node at a time but that would mean lots of concurrency so instead we use matrices!" has anyone ever tried to just do the concurrent approach? Didn't have any luck finding anything. But I | ||
instantly though, "hey that could be a neat Perl 6 experiment" | |||
s/though/thought/ | |||
kmwallio: are there any C libaries that implement GPU-based math? we could wrap one up. | 21:10 | ||
teatime | "Recursive descent allows you to hook in custom-written bottom-up logic at every top-down choice point, and it is a technique which is completely understandable to programmers with little or no training in parsing theory. When dealing with recursive descent parsers, it is more useful to be a seasoned, far-thinking programmer than it is to be a mathematician." this gives me hope, heh. | ||
kmwallio | developer.nvidia.com/gpu-accelerated-libraries | ||
21:11
FROGGS left
|
|||
masak | teatime: that quote reminds me of how action methods work. | 21:11 | |
MadcapJake | probably most of them are C++ though | ||
teatime | MadcapJake: exactly. | ||
er, masak | |||
MadcapJake | one extra char before you tab-complete teatime ;) | 21:12 | |
masak | teatime: because rules naturally match from leaves up to the whole program, an action method has all the AST results of its descendants available. | ||
kmwallio | MadcapJake: Neural Nets are pretty cool. Google and Microsoft (and everyone) are switching to them for everything | 21:13 | |
teatime | masak: perl6 grammars seem to be the perfect combination of top-down and bottom-up to make them user-friendly and require no comp sci skills to use effectively. maybe. | ||
kmwallio | they improved part of speech tagging and translation, when they used to use markov chains | ||
masak | a grammar is just a funny class | ||
teatime | masak: perl6 regexes then. | ||
kmwallio | also text to speech now uses deep neural nets | ||
MadcapJake | kmwallio: very interesting stuff, I just need to take some serious time to learn more about them. I probably need to read a few books instead of expecting 10 minute youtube videos to explain it all to me :P | ||
masak | teatime: but I'd be lying if I said writing grammars isn't an art, one that's not quickly acquired | 21:14 | |
teatime: the grammar in 007 is definitely 007's weakest point right now. it still fails in quite brittle ways sometimes. | |||
geekosaur remembers when neural nets were discovered... and then dropped because nobody could work with them. the state of the art had to catch up first... | |||
kmwallio | MadcapJake: it depends though, if you using a library, the youtube video is probably good. If you want to know what's going on under the hood, you probably need a deeper look | ||
teatime | masak: luckily my intended use should be much much simpler than 007. | ||
kmwallio | geekosaur: how old were you... | 21:15 | |
kmwallio was born after neural nets were discovered | |||
21:15
wamba left
|
|||
kmwallio | :P | 21:15 | |
MadcapJake | kmwallio: true, that's the thing, I'm looking to do something with them in Perl 6 and those videos just give surface-level stuff that focuses on (typically Python) APIs | ||
teatime | I've looked at parser generators for other languages, and perhaps I just haven't looked at the right ones, but I haven't found one that looks nearly as painless as perl6. | ||
kmwallio | Yeah, python has all of the toolkits, and even nodejs is getting some now | ||
diakopter | *boggle* | 21:16 | |
geekosaur | oh actually they were discovered much earlier, first described in 1943. 1972 (I was still a kid but one who read a lot...) was what I was thinking of, and was pretty much the end of the "old way" | 21:17 | |
teatime | also suggestions for mature languages that make parsing extremely natural/easy are welcome. not LISP. or haskell. | ||
but perl6 has been so much fun and my project is so non-critical that I think I will just stick w/ that. | 21:18 | ||
geekosaur | came back in the 1980s but didn't really take off until the late 90s-ish | ||
kmwallio | geekosaur: my professor in college said Neural Nets were a nice toy, but weren't useful for "real machine learning/ai" | ||
and then a few years later, there was the resurgence | 21:19 | ||
and new advancements in deep neural nets | |||
:/ | |||
diakopter | kmwallio: I find it hard to believe that python has an advantage to nodejs in terms of number and quality of parsing libraries | ||
since nodejs has 4.5x as many published packages/libraries as python | 21:20 | ||
teatime | diakopter: I think he was talking about AI tools. and there's a lot of utter crap in npm... | ||
diakopter | there's a lot of utter crap in all of them | 21:21 | |
geekosaur | yeh | ||
moritz | until I see numbers that suggest otherwise, I'm going to assume that 90% of everything is crud. | ||
kmwallio | I'll be introducing utter crap to the Perl 6 modules :D | ||
Acme::UtterCrap | |||
:P | |||
jk | |||
mst | ooh, you're implementing an npm client? | ||
kmwallio | my js to perl 6 compiler? | 21:22 | |
diakopter | transpiler you mean | ||
I'd be hard-pressed to find 10% of usableness in the Perl 6 Ecosystem.. | 21:26 | ||
I assume anyway.. I haven't looked closely lately. | |||
geekosaur | looks like they hit walls several times and gave up.. and a few years later would realize they could solve the problems that made them stop, and started working with them again until they hit the next wall. (this is even continuing although the walls now are not complete show-stoppers) | 21:27 | |
geekosaur sighs... daily loss of connectivity to bouncer has begun again | |||
one of the current issues with neural nets is that unlearning something is unreasonably expensive. have seen some stuff on re-chunking things so it's easier to "subtract out" unwanted things | 21:28 | ||
21:28
skids left
21:30
Khisanth left
|
|||
kmwallio | geekosaur: wasn't IBW Watson delayed or something because it accidentally "read" urbandictionary? | 21:31 | |
IBM* | |||
then there was also Tay from a few days ago... | 21:32 | ||
geekosaur | there's a reason one common class of science fiction involves AI becoming sentient and deciding that humans are unredeemable >.> | 21:34 | |
21:34
arcetera left
|
|||
kmwallio | is it possible with NativeCall to typedef things? | 21:34 | |
because cl_int is just int32, but I don't want to lose track in my head somewhere | 21:35 | ||
21:35
musiKk_ left
|
|||
moritz | kmwallio: constant cl_int = int32 | 21:35 | |
kmwallio | moritz: thanks | 21:39 | |
21:43
Khisanth joined
21:49
ptolemarch left
21:56
Xliff left
22:02
Khisanth left
|
|||
spintronic | /join #abcl | 22:03 | |
22:03
kid51 joined
22:05
nowan left
22:07
nowan joined
22:08
Xliff joined
|
|||
MadcapJake | kmwallio: though not GPU-based, this one has machine-specific optimized libraries: www.netlib.org/blas/ | 22:10 | |
hey actually: developer.nvidia.com/cublas | 22:11 | ||
22:12
sufrostico left
22:21
sue left
22:22
Sgeo joined
|
|||
kmwallio | MadcapJake: thanks, I'll look into that after work | 22:23 | |
22:23
Sgeo left
22:28
Begi joined,
Khisanth joined
22:32
Sgeo joined,
Khisanth left
22:33
Khisanth joined
22:34
spider-mario left
22:35
spider-mario joined,
sufrostico joined
22:38
Xliff left
22:42
Khisanth left
22:46
dvinciguerra__ joined
22:47
dvinciguerra_ left,
Xliff joined,
nadim joined
22:50
skids joined,
_nadim left
|
|||
masak | 'night, #perl6 | 22:54 | |
tony-o | later gator | 22:55 | |
22:55
perlawhirl joined
22:56
itaipu left
22:57
Khisanth joined
22:58
perlawhirl left
23:01
perlawhirl joined
23:03
Begi left,
arc__ joined
23:04
arc__ is now known as arcetera,
arcetera left,
arcetera joined
23:06
rindolf left
23:07
Khisanth left
23:11
raiph joined
23:20
Khisanth joined
|
|||
lizmat got distracted after dinner: P6W will come tomorrow | 23:20 | ||
good night, #perl6! | |||
23:30
itaipu joined,
Khisanth left
23:39
avuserow joined
|
|||
avuserow | hi #perl6 folks, I've been out of the loop for a while. Is it possible to use NativeCall with a C++ library? A blogpost or some other reference would be greatly appreciated. | 23:40 | |
yoleaux | 3 Feb 2016 04:26Z <AlexDaniel> avuserow: gist.github.com/AlexDaniel/1e2d1c50963d37c5d43a | ||
23:41
kid511 joined
|
|||
avuserow | AlexDaniel++ # ALL of the cute ways | 23:41 | |
23:42
kid51 left
|
|||
perlawhirl | haha wow! that's from a while back... i remember i came up with one of those | 23:42 | |
teatime | does panda know how to upgrade modules? maybe --force install will at least do it? | 23:46 | |
perlawhirl | avuserow: i was sure someone asked that a few days ago... sure enought: irclog.perlgeek.de/perl6/2016-03-25#i_12238141 | 23:48 | |
timotimo | yes, teatime. ideally a newer version of the module would actually have a newer version, so --force isn't necessary | ||
23:49
Khisanth joined
23:50
labster left
|
|||
MadcapJake | So panda install X just automatically installs the very latest version of module X? | 23:55 | |
RabidGravy | yes | ||
anyway bedtime | |||
toodles | |||
captian-adequate | exit | 23:57 | |
Oops... Sorry about that. | |||
Meant to close my terminal. ha ha | |||
MadcapJake feels there should be an upgrade command that can be tweaked to only upgrade to certain newer versions |