»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋 Set by Zoffix on 25 July 2018. |
|||
00:11
pecastro left
00:17
ayerhart left
00:21
MilkmanDan left
00:22
MilkmanDan joined
00:28
yqt joined
00:33
Sgeo_ joined
00:36
Sgeo left,
rindolf left
00:43
yqt left
|
|||
tbrowder | if i know the col names, i think i can get vals, but it would be better imo if i could get col names programmatically. | 00:46 | |
and then get the col's value by referring to its name. | 00:48 | ||
for my immediate purposes i think i can live with what you've shown me--thanks%! | 00:49 | ||
00:53
kerrhau left
00:54
w_richard_w joined
00:55
kerrhau joined
01:12
MidCheck left
01:31
MidCheck joined
01:46
kerrhau left
|
|||
tony-o | what are you doing tbrowder ? | 01:52 | |
tbrowder | tony-o: creating a db of people with various attributes. then later i interrogate the db to generate various reports and other products. basic crud. | 01:54 | |
tony-o | ah | 01:55 | |
tbrowder | and i don't like to write sql! | ||
so red seems like a reasonable thing to use, wip and all. | 01:56 | ||
better than flat file persistence. | 01:57 | ||
for me anyway. | |||
01:59
mowcat left
|
|||
tony-o | there's also db::xoos :-) | 02:07 | |
02:18
molaf left
02:31
molaf joined
02:40
lucasb left
03:30
aindilis left
03:32
aindilis joined
03:44
adu_ joined
03:52
leont left
03:53
adu_ is now known as adu,
kurahaupo left,
kurahaupo joined
03:54
kurahaupo left,
kurahaupo joined
04:05
sortiz joined
04:09
ExtraCrispy left
|
|||
sortiz | \o #perl6 | 04:17 | |
04:47
Cabanossi left
04:55
Cabanossi joined
04:56
ToddAndMargo joined
|
|||
ToddAndMargo | Anyone on newbie duty tonight? | 04:56 | |
05:03
ToddAndMargo left
|
|||
Kaiepi | i got a bit too carried away trying to come up with a way to create an enum programmatically and ended up writing a way to make it possible to change enum values whenever you want hastebin.com/kozayuwoho.rb | 05:09 | |
idk how useful this is or if it'd be entirely safe to use | 05:10 | ||
05:13
Kaiepi left
05:15
Kaiepi joined
05:16
zacts joined
05:20
zacts left
05:21
zacts joined
05:26
Sgeo__ joined
05:29
Sgeo_ left
05:30
zacts left
|
|||
sortiz | Kaiepi: nice! The check in line 20 can be done before returning the updater, i think. | 05:31 | |
06:26
robertle left
07:02
adu left
|
|||
El_Che | .rb? :) | 07:08 | |
07:14
domidumont joined
07:15
ravenousmoose joined
07:38
|oLa| joined
07:41
netrino joined,
ayerhart joined
07:45
ExtraCrispy joined
07:48
netrino left,
lookatme_q left
08:00
Black_Ribbon left
08:09
robertle joined
08:10
w_richard_w left
08:13
drclaw left
08:20
Sgeo_ joined
08:21
|oLa| left
08:23
Sgeo__ left
08:37
antoniogamiz joined
08:39
kurahaupo_ joined
08:42
kurahaupo left,
pistacchio left,
pistacchio joined
08:54
lookatme_q joined
08:57
pistacchio left,
pistacchio joined
08:59
Xliff_ joined
09:00
rindolf joined
09:02
andrzejku joined,
Xliff left
09:07
lizmat left
|
|||
SmokeMachine | tbrowder: have you tried something like this? `say MyModel.^all.Seq.map(-> $model { $model.^columns.keys.map: { .column.name => .get_value: $model } })` | 09:09 | |
09:22
woolfy left
09:34
vrurg left
09:43
pecastro joined
09:51
eliasr joined
09:53
kst` is now known as kst
09:59
kurahaupo_ left,
kurahaupo joined
|
|||
tbrowder | SmokeMachine: looks useful, thanks! | 10:06 | |
how do i add a new column to an existing model and table with data? | 10:08 | ||
10:10
lizmat joined
|
|||
tbrowder | hm, ".get_value" would be better aliased to ".get-value" | 10:11 | |
10:12
reach_satori_ left
10:16
kerrhau joined
10:20
woolfy joined
|
|||
SmokeMachine | tbrowder: `.get_value` isn't from Red... its perl6 internal... | 10:24 | |
tbrowder: there is no way to change a table with Red yet... | |||
tbrowder | oh! pardon me. i have trouble reading busy one liners | 10:25 | |
SmokeMachine | tbrowder: you could also use something like `MyModel.^all.Seq.map(-> $model { $model.^columns.keys.map: { .column.name => $model."{.column.name}"() } })` | 10:27 | |
tbrowder | ref change table: not a show stopper for me yet (can always redo), but is there an estimate for when you will get to it? | 10:28 | |
ok, it's time for me to start using real data for a real use case! | 10:29 | ||
SmokeMachine | tbrowder: or `MyModel.^all.Seq.map({ %(col1 => .col1, col2 => col2, colN => .colN) }) | ||
tbrowder: or `MyModel.^all.Seq.map({ %(col1 => .col1, col2 => col2, colN => .colN) })` | |||
tbrowder | okay! looking good... | 10:30 | |
SmokeMachine | tbrowder: why do you want to change the table outside a migration? (I don't think its very common...) | 10:31 | |
tbrowder | hm, good question, but i'm a novice db user, and don't do it professionally. i guess migration is the proper term for "redo" i mentioned above | 10:34 | |
i just think of my use case. we will think of new attributes for a person later i'm sure. seems natural to add a new column | 10:36 | ||
i'll try hard to think ahead a bit before i lock it all down. | 10:38 | ||
10:38
zakharyas joined
|
|||
hahainternet | be aware that the topology of databases is not fixed, nor are column name systems or relational link formats | 10:41 | |
SmokeMachine | tbrowder: we are planning to have some kind of migrations (github.com/FCO/Red/issues/15) if you database needs to be changed... | 10:42 | |
hahainternet | so for example, postgres has a 'schema' element which other databases may lack | ||
correctly embodying the semantics of all databases is a monumental task | |||
see: how tricky dbic can be | |||
tbrowder | i appreciate the thought and effort in red! | 10:43 | |
SmokeMachine | hahainternet: we try to handle that on Red using different "drivers" to each database... | 10:45 | |
hahainternet | SmokeMachine: i understand, and i wouldn't consider myself as an authority on what you should actually implement | 10:46 | |
i'm trying to think back to the last problems i had so i can try and give actual useful advice : | |||
:p | |||
Xliff_ | In Red, does MyModel.^all returns all rows? | ||
10:46
Xliff_ is now known as Xliff
|
|||
SmokeMachine | hahainternet: like here: github.com/FCO/Red/tree/master/lib/Red/Driver | 10:47 | |
hahainternet | SmokeMachine: yeah i had a quick browse, but it's not so much the syntax or specific database API | ||
but the capabilities of the database | |||
SmokeMachine | Xliff: yes... it will return a ResultSeq that if iterated will return every row... | 10:48 | |
hahainternet | for example, i don't see offhand that you've modelled check constraints | ||
10:48
Cabanossi left
|
|||
hahainternet | and i don't see any sort of handling for dirty reads | 10:48 | |
(super quick skim of the repo though, my apologies if i missed those) | |||
i'm not trying to have a go at Red, i applaud the effort, just want to caution that it will take some very careful and patient modelling to match a good variety of database systems | 10:49 | ||
Xliff | SmokeMachine: Another thought on Red. Have you thought on how things are to work at anything higher than the Model level? For example, can you get a list of all defined Models, or are you leaving that to the programmer? | ||
SmokeMachine | hahainternet: not yet, they are planned: github.com/FCO/Red/issues/115 | ||
hahainternet | SmokeMachine: smashing, i'm having a quick look through some of my old dbic code now | 10:50 | |
see if there's anything notable, sorry for intruding on your disucssion | |||
10:50
domidumont left
|
|||
SmokeMachine | hahainternet: thank you for the advice... | 10:51 | |
hahainternet | SmokeMachine: it's just something that grates at me, i've been trying to learn what it would take to community source a description of what would need to be implemented | 10:52 | |
not just for an orm, but for any system | |||
SmokeMachine | Xliff: Red do not do anything about this yet... I've never thought about it... any idea? | ||
hahainternet | well, currently you use the relationship class in the attribute | 10:53 | |
so with a proper normal form database you already have an explorable topology | 10:54 | ||
10:54
Cabanossi joined
|
|||
hahainternet | SmokeMachine: i haven't read through all of the issues, but in your example, you have a bidirectional relationship which is not required | 10:55 | |
Post.author-id references Person.id | |||
Person.posts references Post.author-id | 10:56 | ||
the latter should be implied from the former already | |||
Xliff | SmokeMachine: Ah. OK, well off the cuff design: You'd need an outer construct that would be a collection of models. That outer construct would be akin to a "database". | ||
Then you could implement database level code as well. | |||
Maybe 'Collection'? | |||
SmokeMachine | hahainternet: yes... but if I want to create it with another name? isn't it easier to understand if its explicitly? | 10:57 | |
hahainternet | SmokeMachine: it is, but the question raises whether you would store that in the database, and what the statement actually says | 10:58 | |
that's a one to many relationship after all | |||
so do you create a Person.posts schema entry in the database? or do you infer it is a 'virtual' accessor? | |||
10:58
lizmat left
|
|||
SmokeMachine | Xliff: I was think of something like this (but for other purpose) here: github.com/FCO/Red/issues/7 | 10:58 | |
hahainternet | metacpan.org/pod/DBIx::Class::Rela...belongs_to is a good reference for ths imho | 10:59 | |
SmokeMachine | no, I'm not storing it on the database... | ||
I only store the `referencing` stuff on the database... the `relationship` stuff are only "virtual" attributes... they are not going to the db... | 11:00 | ||
hahainternet: ^^ | |||
hahainternet | i see, well that embodies one-to-many relationships, but you'll still need to implement many-to-many | 11:01 | |
there's some annoying hacks in DBIC required for some of this | |||
Xliff | SmokeMachine: Not sure. I don't see any examples. Dislike calling it "Schema" because that's a bit too technical. | ||
Something like this: pastebin.com/StMnzefv | |||
SmokeMachine | hahainternet: the `has Person $.author is relationship{ .author-id }` is equivalent to the belongs_to... | 11:02 | |
11:02
lucasb joined
|
|||
hahainternet | SmokeMachine: indeed | 11:02 | |
SmokeMachine | hahainternet: and `has Post @.author is relationship{ .author-id }` is equivalent to has_many... | ||
s/author/authors/ | 11:03 | ||
tadzik | 'is relationship' sounds a bit vague | ||
hahainternet | they're not quite equivalent as in dbic they generate you accessor methods | ||
which is what i mean by the explicit reverse being not required | |||
if you like it explicit, then that's none of my business :p | |||
SmokeMachine | hahainternet: I like the idea of everything your class/object have (not the metaclass) YOU defined on your class... | 11:04 | |
hahainternet: my idea is that Red doesn't mess with your class... it do not add any new method or any new attribute (or shouldn't)... | 11:06 | ||
hahainternet | SmokeMachine: personally i think that might lead to confusion, where a user forgets to create their reverse entry, and then creates one later on that doesn't quite match the existing one | ||
but i see where you are coming from, i can't say whether it will work or not | |||
SmokeMachine | hahainternet: so, to have a `$user.posts`and a `$post.author` you have to do it your self... (that was my idea) | 11:07 | |
11:07
sena_kun joined
|
|||
SmokeMachine | Xliff: it looks good... what about if I want to create 1 file for each model? | 11:08 | |
11:09
lizmat joined
|
|||
Xliff | SmokeMachine: Hmmm.... good thought. Let me update paste. | 11:09 | |
11:11
kerrhau left
11:12
lizmat left,
MidCheck left
|
|||
Xliff | SmokeMachine: pastebin.com/57mdnJuK | 11:12 | |
SmokeMachine | Xliff: good... maybe it can be helpful for migrations... | 11:14 | |
Xliff | Could be, yes! | ||
Want me to add the suggestion to #7? | |||
SmokeMachine | www.irccloud.com/pastebin/NGjVpACF/ | 11:15 | |
11:15
kst` joined
|
|||
SmokeMachine | Xliff: yes, please! | 11:15 | |
11:16
kst left
11:17
lizmat joined
|
|||
Xliff | SmokeMachine: Done. | 11:20 | |
SmokeMachine | thanks! I reopened that issue | 11:21 | |
11:23
Guest4810 left
11:25
Guest4810 joined
11:26
sena_kun left
11:27
sena_kun joined
11:28
kst` left
|
|||
Xliff | Also added an issue to #15 | 11:35 | |
s/issue/comment/ | |||
11:46
reach_satori_ joined
|
|||
SmokeMachine | Xliff: github.com/FCO/Red/issues/15#issue...-473256864 | 11:50 | |
11:51
pistacchio left
11:52
pistacchio joined
11:56
pistacchio left
11:58
abraxxa left
12:04
lizmat left,
lizmat_ joined
|
|||
Xliff | SmokeMachine: Updated. :) | 12:11 | |
12:13
lizmat_ left
12:14
leont joined
12:19
lizmat joined
|
|||
leont | In «my @foo = bar()», is there any way the value returned by bar can hook into the listification? | 12:30 | |
Contrary to my expectation it doesn't quite appear to do the same as «my $foo = bar; my @foo = @($foo);» | 12:31 | ||
Xliff | leont | 12:32 | |
What is the current behavior vs the expected one? | |||
timotimo | you'll likely have to give it a role, like Iterable | 12:35 | |
leont | Actually, my diagnosis that they're different may be wrong actually. Hmmm. | ||
Iterable, that does sound kind of logical | 12:36 | ||
12:39
molaf left
|
|||
timotimo | also, don't return something in a scalar container i guess :) | 12:42 | |
leont | Iteratable seems to work | 12:44 | |
12:44
zakharyas left
|
|||
leont | timotimo: I'm not sure what you mean with that | 12:44 | |
Also, is there any way to do something similar for when it's stored in a scalar? | 12:45 | ||
12:45
pistacchio joined
|
|||
timotimo | don't "return $foo" | 12:46 | |
though, wait, we do decontrv usually | 12:47 | ||
12:48
Cabanossi left
|
|||
leont | Yeah, I would expect a decontainerization | 12:48 | |
Unless «is rw» | 12:49 | ||
timotimo | or «is raw» | ||
12:49
domidumont joined
|
|||
sortiz | m: my @a = (1,2).item; @a[0].VAR.^name.say | 12:50 | |
camelia | Scalar | ||
sortiz | m: my @a = (1,2).item<>; @a[0].VAR.^name.say | 12:51 | |
camelia | Scalar | ||
12:54
Cabanossi joined
12:55
reach_satori_ left
|
|||
timotimo | well, arrays containerify stuff you put in them | 12:57 | |
sortiz | m: my @a = (1,2).item; my @b = (1,2).item<>; dd @a,@b | 13:00 | |
camelia | Array @a = [(1, 2),] Array @b = [1, 2] |
||
13:04
Sigyn left,
Sigyn joined
13:18
domidumont1 joined
13:21
vrurg joined
13:22
domidumont left
13:24
antoniogamiz left
13:25
AlexDani` joined
13:29
AlexDaniel left
13:41
domidumont joined
13:43
AlexDani` is now known as AlexDaniel,
sortiz left
13:44
domidumont1 left
13:45
domidumont1 joined,
AlexDaniel left
13:46
AlexDaniel joined
13:47
domidumont left
13:56
kurahaupo left,
kurahaupo joined,
kurahaupo left,
kurahaupo joined
14:04
ravenousmoose left
14:08
MasterDuke left,
socomm joined
14:12
Guest4810 left
14:19
dogbert joined,
dogbert is now known as Guest77544
|
|||
lizmat | weekly: news.perlfoundation.org/2019/03/feb...rl-6-.html | 14:36 | |
notable6 | lizmat, Noted! | ||
14:37
Kaiepi left,
Kaiepi joined
14:38
Kaypie joined,
Kaiepi left
14:40
socomm left
14:43
pistacchio left
14:44
pistacchio joined
14:45
reach_satori_ joined
14:57
domidumont1 left
14:59
cpan-p6_ joined
15:00
cpan-p6 left
|
|||
cpan-p6_ | New module released to CPAN! DB-Pg (0.6) by 03CTILMES | 15:00 | |
New module released to CPAN! Tinky (0.0.8) by 03JSTOWE | |||
New module released to CPAN! Term-Choose-p6 (1.4.7) by 03KUERBIS | |||
discord6 | <Vendethiel> Mh, is there a version of reduce with the initial value passed in? It's frequently like that in other languages. Wondering if there's any reason we don't have such an overload, and if people would be OK with it | 15:02 | |
<Vendethiel> currently needs: my ($f, @r) = @mylist; (fn($f), |@r.reduce(-> ...)); or (default, |@r).reduce.. | 15:04 | ||
15:10
bobby left
15:12
lizmat_ joined
15:13
cpan-p6_ left
15:14
cpan-p6 joined
15:15
lizmat left
15:17
Guest77544 left,
lizmat_ is now known as lizmat
15:24
domidumont joined
15:26
kurahaupo left,
kurahaupo joined
15:28
cpan-p6 left,
cpan-p6 joined
|
|||
SmokeMachine | tbrowder: any news about your test with Red? | 15:32 | |
15:32
isomorphismes joined
15:33
ym555 joined
15:43
cpan-p6 left,
cpan-p6 joined
|
|||
tbrowder | i’m working on it... | 15:52 | |
putting together a small case study with my org’s needs for the red db | 15:53 | ||
15:57
bobby joined,
ym555 left,
cpan-p6 left
|
|||
Xliff | SmokeMachine: I like what you are doing with Red. If you need any help with it, let me know. I will be glad to contribute what I can. | 16:02 | |
16:02
domidumont left
|
|||
SmokeMachine | Xliff: thanks! I do need a lot of help! | 16:02 | |
Xliff | SmokeMachine: I'd like to try my hand at adding DROP TABLE support. | ||
SmokeMachine | Xliff: sure! do your self at home! | 16:03 | |
Xliff | If you want, I can add an issue on it as an enhancement and we can discuss things further there. | ||
SmokeMachine | sure! | ||
16:06
bobby left
16:11
robertle left
16:13
bobby joined
|
|||
kawaii | AlexDaniel: expect to have a _very_ rough Dockerfile for running Blin by this evening, not pretty or at all lightweight (due to having lots of module dependencies in) but certainly functional | 16:18 | |
16:19
domidumont joined
|
|||
AlexDaniel | kawaii: awesome | 16:19 | |
kawaii | would be much better if Blin could fetch requested dependencies from apt or yum when it moves on to testing that module in question, but as we discussed, not yet possible | ||
Geth | doc: 3e13a91e8c | (JJ Merelo)++ | doc/Language/5to6-nutshell.pod6 TODO →done #2277 |
16:25 | |
doc: e7768f95ca | (JJ Merelo)++ | doc/Language/5to6-nutshell.pod6 Convert TODO to comment #2277 |
|||
doc: 17ff3f569c | (JJ Merelo)++ | doc/Language/5to6-nutshell.pod6 Add another difference with regexes I don't know if it's the last one. There might be a myriad more. Maybe it should deserve its own page... Refs #2277 |
|||
kawaii | things are happening... usercontent.irccloud-cdn.com/file/...-25-12.png | ||
AlexDaniel | looks promising | ||
kawaii | ``` | 16:26 | |
www.irccloud.com/pastebin/cFhy8I5G/ | |||
hmmm | |||
AlexDaniel | kawaii: btw when running it on the whole ecosystem, sometimes it prints some warnings about Nil and stuff… I don't think these are causing any problems, but someone will have to fix them one day… | ||
kawaii | Just testing against DBIish while I try and make it work | ||
AlexDaniel | kawaii: ah yeah, install zstd and lrzip | 16:27 | |
kawaii | this is painful to build so hopefully those are all that are missing | ||
16:29
cpan-p6 joined
|
|||
SmokeMachine | Xliff: I've answered your drop table issue... | 16:31 | |
Xliff: have I answered your question, or have I misunderstood it? | 16:33 | ||
Xliff | SmokeMachine: OK. One sec. | 16:38 | |
16:38
mowcat joined
|
|||
kawaii | AlexDaniel: well, seems that my experiment worked! Time to clean it up a little and add the environment stuff :) www.irccloud.com/pastebin/VJR6UmkR/ | 16:39 | |
Xliff | SmokeMachine: Excellent! I will see what I can get done, soonish. | ||
SmokeMachine: Instead of 'drop-table', how about 'remove-table'? | 16:40 | ||
SmokeMachine | delete-table? | 16:41 | |
aliases? | |||
AlexDaniel | kawaii: looks nice, but what's in the output? | ||
kawaii: NativeHelpers::Blob – Flapper and DBIish – AlwaysFail ? | |||
Xliff | Smoke-Machine: OK. I will add these. I will do delete-table (trying to find an obvious complement to 'create', which 'drop' is not) | 16:43 | |
AlexDaniel | kawaii: because both these modules should install fine… if they don't, maybe there's something weird with the setup | 16:44 | |
16:45
cpan-p6 left
|
|||
SmokeMachine | Xliff: I don't think my English is good enough for that... :P | 16:46 | |
Xliff | Hahaha! | ||
How about "DESTROY-table" ? | |||
(Hulk smash?) | |||
SmokeMachine | Xliff: have you seen this? github.com/FCO/Red/issues/112#issu...-468631887 | 16:47 | |
Xliff | No. Did not. Are temp tables currently supported? | 16:48 | |
SmokeMachine | Xliff: the model meta class stores the information if that table is temporary... you could use that (like the create table does...) | ||
Xliff | You know what? I will look through the code. Thanks for the pointer! :) | ||
SmokeMachine | Xliff: yes | ||
Xliff | OK. Good. | 16:49 | |
SmokeMachine | Xliff: github.com/FCO/Red/blob/master/lib...L.pm6#L393 | 16:50 | |
Xliff | Yep! Saw that. | 16:51 | |
discord6 | <Vendethiel> i fI wanna add an argument to reduce, should I just submit a PR and have a discussion on it, or a discussion beforehand? | 16:52 | |
SmokeMachine | Vendethiel: is the ProblemSolver being used for this kind of stuff? | 16:54 | |
or I misunderstood the reason? | |||
kawaii | hmm seems that I don't get any additional output other than what I showed you when I added this `cat` to the `CMD` www.irccloud.com/pastebin/9KBvZC7P/ | 16:55 | |
16:56
cpan-p6 joined,
MidCheck joined
|
|||
kawaii | AlexDaniel ^ | 16:57 | |
AlexDaniel | kawaii: it should work, I have no idea what's going on | 17:00 | |
17:00
domidumont left
17:02
domidumont joined
|
|||
kawaii | www.irccloud.com/pastebin/nSjAgLiT/ | 17:03 | |
AlexDaniel ^ how's this? command shown below output | 17:04 | ||
AlexDaniel | kawaii: well, Blin works, so that's nice… but uhhh… why are these modules not OK | 17:05 | |
kawaii | this was comparison between 2018.10 and HEAD, so probably worth investigating (note blin itself is running under 2018.10, not sure if it matters) | 17:06 | |
AlexDaniel | shouldn't matter | 17:07 | |
c: 2018.10 use v6.d | |||
committable6 | AlexDaniel, ¦2018.10: «04===SORRY!04=== Error while compiling /tmp/81VEAkBhssNo compiler available for Perl v6.dat /tmp/81VEAkBhss:1------> 03use v6.d08⏏04<EOL> «exit code = 1»» | ||
AlexDaniel | although, uh… I thought that part of blin was v6.d only, maybe I'm wrong | 17:08 | |
ah, it does `use v6.d.PREVIEW;`, haha | |||
kawaii | hm, probably worth waiting for star team to release the docker images for 2019.03 then before using this for anything then :) | 17:09 | |
AlexDaniel | kawaii: locally I get DBIish – OK NativeHelpers::Blob – OK | ||
kawaii: no, blin is working fine, something else is off | |||
discord6 | <Vendethiel> SmokeMachine: problemsolver? | 17:10 | |
<Vendethiel> the discussion repo? | |||
kawaii | Interesting, I'll make a PR with this `Dockerfile`, and perhaps someone else can check over it | ||
AlexDaniel | kawaii: I think you're missing some deps for DBIish or something, can you check the output? | ||
kawaii: `cat output/*` or something more inclusive | |||
SmokeMachine | Vendethiel yes... but I may be wrong... | ||
AlexDaniel | or just figure out a way to download that whole directory | ||
discord6 | <Vendethiel> SmokeMachine: well idk if you are or not -- that's why I'm asking, but I should probably ask AlexDaniel++ instead | 17:11 | |
AlexDaniel | wait what, are we talking about github.com/FCO/ProblemSolver or github.com/perl6/problem-solving ? | ||
:* | |||
:D | |||
SmokeMachine | AlexDaniel: github.com/perl6/problem-solving | 17:12 | |
17:12
cpan-p6 left
|
|||
AlexDaniel obviously has * and D on the same key… | 17:12 | ||
SmokeMachine | sorry, I wrote it wrong... | ||
17:12
cpan-p6 joined,
zacts joined
|
|||
AlexDaniel | Vendethiel: ahhh, I see the question. Yes, please do try problem-solving repo. We're still figuring things out, but that shouldn't prevent people from discussing problems and proposing solutions to them :) | 17:13 | |
kawaii | AlexDaniel: big output :) www.irccloud.com/pastebin/tajHueGu/ | 17:16 | |
timotimo | .o( big output energy ) | 17:18 | |
AlexDaniel | ===> Install [FAIL] for NativeHelpers::Blob:ver<0.1.12>:auth<github:salortiz>: No installing backend available | ||
“No installing backend available” what does that mean? | |||
kawaii | Yeah didn't quite understand that | 17:19 | |
timotimo | huh, an unexpected kind of URL maybe? | ||
AlexDaniel | something about zef, I think | 17:21 | |
like maybe zef is too old | |||
17:23
pistacchio left
17:24
pistacchio joined
|
|||
Xliff | SmokeMachine: If you take a look at my fork, you can see how far I am. | 17:24 | |
github.com/Xliff/Red/ | |||
17:25
pistacchio left
17:26
pistacchio joined
|
|||
SmokeMachine | Xliff: great! | 17:26 | |
Xliff | SmokeMachine: Now I will work on some tests. Are you going to be around tomorrow? | ||
SmokeMachine | Xliff: Im not sure if its better tu use `IF EXISTS`... | 17:27 | |
Xliff: the Red::AST::DropTable has no $.temp... | |||
Xliff | Whoops! Nice catch! :D | 17:28 | |
SmokeMachine | Xliff: `translate` need to return 1 or a list of `Pair`s... | ||
Xliff: the key is the SQL string and the value a array of binds... | 17:29 | ||
Xliff: in DropTable case will be empire... | |||
empty | |||
Xliff | Ah! That's good to know. | 17:30 | |
17:30
sauvin left
|
|||
Xliff | I just shutdown my VM. Will circle back. | 17:30 | |
SmokeMachine | I think Ill be here tomorrow... :) but if you call my name, I receive a notification on my mobile... | 17:31 | |
17:32
pistacchio left
|
|||
Xliff | OK. If not then, I'll drop you a .tell! | 17:32 | |
SmokeMachine | Xliff: great! | ||
17:34
ExtraCrispy left,
ExtraCrispy joined
|
|||
Xliff | SmokeMachine: I've turned on issues in my fork. If you notice anything else, please create issues there. | 17:34 | |
SmokeMachine | ok! | 17:35 | |
17:36
reach_satori_ left
17:38
sena_kun left
17:39
sena_kun joined
|
|||
Geth | Blin: kawaii++ created pull request #10: Dockerfile for Blin automation |
17:41 | |
17:43
domidumont left
17:49
cpan-p6 left
17:50
cpan-p6 joined
|
|||
AlexDaniel | kawaii: can you try installing the latest zef? | 17:57 | |
I think the issue will go away | |||
kawaii | Into the container? Sure I can try that as a test, but if it does indeed solve the issues we should just wait for Star to release the new Dockerfiles to base from, once they are ready. | 17:58 | |
AlexDaniel | kawaii: or maybe testing with the latest zef is always a good idea | 18:02 | |
I think Blin does some ugly magic with zef, and that is using the latest version… | 18:03 | ||
so the discrepancy itself can be an issue, maybe… I'm not sure | |||
18:03
cpan-p6 left
18:04
cpan-p6 joined
|
|||
kawaii | AlexDaniel: regardless, does my solution for output files satisfy your requirement? :) | 18:04 | |
AlexDaniel | kawaii: I guess! I know nothing about docker, unfortunately :( | ||
kawaii | Fair enough! | ||
AlexDaniel | just saying that you'll need access to all of the files there for sure | 18:05 | |
tony-o | how are those blin files used? | 18:17 | |
the output | |||
18:17
pistacchio joined
18:18
cpan-p6 left
18:19
cpan-p6 joined
18:21
pistacchio left
18:22
olaf joined
|
|||
AlexDaniel | tony-o: most commonly I'd just look at the contents and scratch my head | 18:24 | |
tony-o: but then there's also this script: github.com/perl6/ecosystem-unbitro...-issues.p6 | |||
which takes a json file from blin and updates tickets in the ecosystem-unbitrot repo | |||
18:32
cpan-p6 left
18:33
cpan-p6 joined
|
|||
Kaypie | when would you use your own ThreadPoolScheduler instance instead of $*SCHEDULER? | 18:43 | |
or whaever implementation of $*SCHEDULER | |||
s/\$\*SCHEDULER/Scheduler/ | |||
timotimo | you could set $*SCHEDULER to SameThreadScheduler or what it's called to prevent something from multithreading | 18:45 | |
you can have your own policies for when to spawn more threads | |||
you could cue code on another machine | |||
you can have a short-lived thread pool where you kill all spawned threads after some kind of task is done without influencing whatever other threads have been launched in pools | 18:46 | ||
18:46
kurahaupo left,
kurahaupo joined
18:47
Kaypie is now known as Kaiepi
|
|||
Kaiepi | what's a practical example where those would be useful? | 18:48 | |
18:50
cpan-p6 left,
cpan-p6 joined
|
|||
timotimo | this one's perhaps more for a custom Awaiter than a custom Scheduler, but if you have a nativecalled library that uses Thread Local Storage, you'd have to be more careful about what code gets scheduled on which thread | 18:52 | |
that's pretty much the reason why 6.c won't switch threads when you await, because that kind of thing would suddenly break for 6.c users | 18:53 | ||
18:53
reach_satori_ joined
18:57
netrino joined
19:01
Black_Ribbon joined
19:06
pistacchio joined
19:08
Sgeo__ joined
19:10
Khisanth left,
pistacchio left
19:12
Sgeo_ left
19:13
zacts left
19:15
cpan-p6 left,
cpan-p6 joined
19:16
MidCheck left
19:20
sena_kun left
19:22
eliasr left
19:24
olaf left
19:27
Khisanth joined
19:29
cpan-p6 left
19:30
cpan-p6 joined
19:34
cwilson joined
19:36
cwilson1 left
19:39
ayerhart_ joined
19:40
ayerhart left
|
|||
tony-o | you could automate that action in the docker most likely AlexDaniel | 19:48 | |
Kaiepi: a high load socket server is an example where mucking around in $*SCHEDULER is possible | |||
AlexDaniel | if you're not worried that a script may malfunction and create hundreds of tickets on github, then yes, you can automate it | ||
19:49
cpan-p6 left,
cpan-p6 joined
|
|||
timotimo | hopefully you can dry-run it | 19:49 | |
perhaps even add an extra repository | |||
to split the deluge of "jvm doesn't do X" tickets off from other stuff? | 19:50 | ||
so even if your script goes haywire you can just one-click clean-up | |||
AlexDaniel | yes, it does a dry run by default, but then I prefer to look at it myself… and if you're reviewing things manually, why automate it | ||
19:58
committable6 left,
reportable6 left,
shareable6 left,
greppable6 left,
evalable6 left,
releasable6 left
19:59
committable6 joined,
ChanServ sets mode: +v committable6,
greppable6 joined
20:00
releasable6 joined,
ChanServ sets mode: +v releasable6,
shareable6 joined,
ChanServ sets mode: +v shareable6
20:01
reportable6 joined
20:02
evalable6 joined,
ChanServ sets mode: +v evalable6
20:04
zachk joined
20:07
cpan-p6 left,
ravenousmoose joined
20:11
cpan-p6 joined
|
|||
cpan-p6 | New module released to CPAN! AWS-Session (0.8.0) by 03HANENKAMP | 20:11 | |
20:24
cpan-p6 left,
cpan-p6 joined
20:25
ToddAndMargo joined
|
|||
ToddAndMargo | Anyone on newbie duty? | 20:26 | |
timotimo | o/ | 20:27 | |
ToddAndMargo | Fedora 29: Am I misuing "line"? why is everthing going into @x[0]?: $ pgrep bash | perl6 -ne 'my @x = $_.lines; print @x[0] ~ "\n" ~ @x[1] ~ "\n";' | ||
Use of uninitialized value of type Any in string context. Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful. in block at -e line 1 2550 | |||
timotimo | i think someone already mentioned this: the combination of -n and lines doesn't make sense here | ||
let me try to explain | 20:28 | ||
your code runs for every line separately. the first thing it does is split what it got by line breaks | |||
so you'll be trying to split every line into lines, but since every line is already just one line, there'll only be what was in the line originally, and that goes into @x as the first (0th) element | |||
ToddAndMargo | $ pgrep bash | perl6 -e 'my @x = slurp(); print @x[0] ~ "\n" ~ @x[1] ~ "\n";' Use of uninitialized value of type Any in string context. Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful. in block <unit> at -e line 1 2550 7479 | 20:29 | |
20:29
AlexDaniel left,
AlexDaniel joined
|
|||
ToddAndMargo | Why do line feeds show up on my terminal when I do pgrep? | 20:29 | |
timotimo | there you're putting the entire contents of the input into the first entry of @x | ||
so you'll have one entry in the array, and that one entry has some newlines in it | |||
20:29
zachk left,
zachk joined
20:30
cpup left
|
|||
ToddAndMargo | $ pgrep bash | perl6 -e 'my @x = slurp().lines; print @x[0] ~ "\n" ~ @x[1] ~ "\n";' 2550 7479 | 20:30 | |
that cleans it up. | |||
20:30
cpup joined
|
|||
timotimo | instead of slurp().lines you can also lines() | 20:30 | |
ToddAndMargo | $ pgrep bash | perl6 -e 'my @x = lines; print @x[0] ~ "\n" ~ @x[1] ~ "\n";' 2550 7479 | 20:31 | |
That was easy! | |||
20:31
molaf joined
|
|||
timotimo | i'm wondering why "killall" isn't right for you | 20:34 | |
dinner time! | 20:35 | ||
tony-o | kawaii: which issue is it for the docker/blin stuff? | ||
ToddAndMargo | they have to be killed last first or all hell breaks loose | 20:36 | |
20:38
AlexDaniel left
|
|||
ToddAndMargo | I am killing xfadumps | 20:39 | |
tony-o | kawaii: there is a nightly release if you want to run blin against a recently built rakudo also | 20:40 | |
20:42
cpan-p6 left
|
|||
Xliff takes over newbie duty. Please use my name if you want help. | 20:48 | ||
ToddAndMargo | Got what I needed. Thank you guys! | 20:49 | |
Xliff | :) | ||
20:51
cpan-p6 joined
20:52
agentzh joined
20:55
Xliff left
|
|||
Garland_g[m] | I have a CStruct Foo that HAS another CStruct Bar (embedded). Is there a way to put an existing Bar into Foo? | 20:58 | |
20:59
drclaw joined
21:09
ravenousmoose left,
cpan-p6 left
21:12
cpan-p6 joined
|
|||
moritz | Garland_g[m]: like, assignment? | 21:12 | |
Garland_g[m] | yeah. I get "Cannot assign to an immutable value" when I try that directly. | 21:13 | |
Sorry, I have that slightly wrong. | 21:15 | ||
If I try to assign inside the BUILD submethod, I get that. If I try to assign with foo.bar = $bar, I get "Cannot modify an immutable 'bar' type object. | 21:16 | ||
timotimo | Garland_g[m]: there is a way, but currently only with nqp::bindattr and that's not something anyone should have to do | 21:22 | |
Garland_g[m] | I just figured out that If I use binding inside the BUILD submethod of Foo, that works. I'd still like to know if there is a way using assignment though. | 21:23 | |
timotimo | i *think* there's a PR that fixes this, i should review and merge that for sure | ||
21:23
pistacchio joined
|
|||
Garland_g[m] | I'll use binding until that's available then. Thanks. | 21:25 | |
21:25
cpan-p6 left
21:28
ravenousmoose joined
21:29
pistacchio left
21:31
cpan-p6 joined
21:38
Sgeo__ left,
ToddAndMargo left
21:45
cpan-p6 left,
cpan-p6 joined
21:49
drclaw left
22:00
cpan-p6 left,
cpan-p6 joined
|
|||
tbrowder | SmokeMachine: are you available for red help? | 22:05 | |
this | |||
22:14
mowcat left
22:19
cpan-p6 left
22:20
Xliff joined
22:21
pistacchio joined
22:22
cpan-p6 joined
22:24
ravenousmoose left
22:25
pistacchio left,
andrzejku_ joined
|
|||
andrzejku_ | Hey do you know how to force logout my account if I have no access to notebook now? | 22:27 | |
andrzejku, <<- I want to log int as him | 22:28 | ||
tbrowder | .ask SmokeMachine how do you put model packages in the lib dir and make them usable? i have stub statements for Person in all the using modules... | 22:32 | |
yoleaux | tbrowder: I'll pass your message to SmokeMachine. | ||
22:34
cpan-p6 left
22:35
cpan-p6 joined
|
|||
tbrowder | i'm getting msg: "...following packages were stubbed but not defined: Person" | 22:42 | |
leont | m: use Test; my @foo = (Failure.new("")); throws-like { @foo[0] }, Exception, "Does throw"; throws-like q{ @foo[0] }, Exception, "Does throw"; | 22:48 | |
camelia | 1..2 not ok 1 - code dies # Failed test 'code dies' # at <tmp> line 1 ok 2 - # SKIP Code did not die, can not check exception # Looks like you failed 1 test of 2 not ok 1 - Does throw # Failed test 'Does throw' … |
||
leont | String form gives a different result than the code form | ||
Also: | |||
m: my @foo = (Failure.new("")); lives-ok { @foo[0] }, "Doesnt throw"; throws-like { @foo[0] }, Exception, "Does throw"; | |||
camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared routines: lives-ok used at line 1 throws-like used at line 1 |
||
leont | m: use Test; my @foo = (Failure.new("")); lives-ok { @foo[0] }, "Doesnt throw"; throws-like { @foo[0] }, Exception, "Does throw"; | ||
camelia | not ok 1 - Doesnt throw # Failed test 'Doesnt throw' # at <tmp> line 1 # 1..2 not ok 1 - code dies # Failed test 'code dies' # at <tmp> line 1 ok 2 - # SKIP Code did not die, can not check exception # Looks l… |
||
leont | m: use Test; my @foo = (Failure.new("")); lives-ok { @foo[0] }, "Doesnt throw"; throws-like { @foo[0] }, Exception, "Does throw" | 22:50 | |
camelia | not ok 1 - Doesnt throw # Failed test 'Doesnt throw' # at <tmp> line 1 # 1..2 not ok 1 - code dies # Failed test 'code dies' # at <tmp> line 1 ok 2 - # SKIP Code did not die, can not check exception # Looks l… |
||
leont | Interesting, that second one fails for me, may be lizmat's change earlier today. | ||
Oh wait, I'm missing part of the output, that explains the confusion | 22:51 | ||
22:53
cpan-p6 left
22:54
cpan-p6 joined
|
|||
timotimo | andrzejku_: you can message NickServ with the "ghost" command | 22:55 | |
it takes a nickname and the password if i'm not mistaken | |||
SmokeMachine | . | 23:05 | |
yoleaux | 22:32Z <tbrowder> SmokeMachine: how do you put model packages in the lib dir and make them usable? i have stub statements for Person in all the using modules... | ||
SmokeMachine | tbrowder: to use models on different files you have to use the alternative relationship syntax... | 23:06 | |
tbrowder: like here: github.com/FCO/Red/tree/master/examples/blog2 | 23:07 | ||
timotimo | now this is curious | ||
tbrowder | SmokeMachine: i am coming along fine as long as i put all the model defs in the main script, but i want to put each model inits own package in a lib dir | ||
timotimo | m: say "hello".uc.comb.[0] # you're not allowed to do this, right? | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Malformed postfix call (only alphabetic methods may be detached) at <tmp>:4 ------> 3.7⏏5[0] # you're not allowed to do this, rig |
||
timotimo | m: say "hello".uc.comb.self.[0] # so you could just use ".self" in front, because that's a harmless method that everything has, right? | 23:08 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Malformed postfix call at <tmp>:4 ------> 3.self.7⏏5[0] # so you could just use ".self" in f |
||
timotimo | m: say "hello".uc.comb.self.elems # why is this b0rked like that? | ||
camelia | 5 | ||
SmokeMachine | tbrowder: in the link Ive sent there is a example of how to do that... | ||
timotimo | *not b0rked | 23:09 | |
oh, huh | 23:10 | ||
it doesn't have anything to do with .self | |||
m: say "hello".uc.comb.map(* x 5)[0] # why is this b0rked like that? | |||
camelia | 5===SORRY!5=== Error while compiling <tmp> Missing infix inside [] at <tmp>:4 ------> 3.map(* x 5)[7⏏050] # why is this b0rked like that? expecting any of: bracketed infix infix infix stopper |
||
SmokeMachine | tbrowder: got it? | 23:12 | |
23:12
cpan-p6 left
|
|||
tbrowder | yep, trying to see what i've missed...thanks | 23:12 | |
23:12
cpan-p6 joined
|
|||
jnthn | m: say "hello".uc.comb.map(* x 5).[0] | 23:18 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Malformed postfix call at <tmp>:4 ------> 3.map(* x 5).7⏏5[0] |
||
jnthn | Hm, interesting | 23:19 | |
23:24
Sgeo joined
23:25
kurahaupo_ joined
23:26
cpan-p6 left,
cpan-p6 joined
23:28
kurahaupo left
23:29
andrzejku_ left
|
|||
kawaii | tony-o: hey! does that include nightly star docker images? | 23:29 | |
tbrowder | SmokeMachine: still getting same error in model packaging. i'm going to save that problem for later, put all models in the main scripts, and get those working, then i can work on the split packaging. | 23:30 | |
SmokeMachine | tbrowder: would you mind to show me the code? | ||
tbrowder | not at all, i was making it as a PR anyway | 23:31 | |
23:31
rindolf left
23:32
drclaw joined
|
|||
tbrowder | SmokeMachine: i'm wasting your time here at the moment. let me get some working code and then i'll show you. i'm afraid i'm rushing here. please be patient. | 23:33 | |
23:40
cpan-p6 left,
cpan-p6 joined
23:43
zacts joined
23:47
drclaw left
23:54
cpan-p6 left,
cpan-p6 joined,
zacts left
23:55
zacts joined
|
|||
tony-o | kawaii: nightly star ? is star maintained or is it even different day to day? i thought that was just updated on release | 23:57 | |
23:57
sortiz joined
|
|||
tony-o | it does have a nightly build from source of rakudo | 23:57 |