»ö« 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.
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
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.
tony-o there's also db::xoos :-) 02:07
sortiz \o #perl6 04:17
ToddAndMargo Anyone on newbie duty tonight? 04:56
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
sortiz Kaiepi: nice! The check in line 20 can be done before returning the updater, i think. 05:31
El_Che .rb? :) 07:08
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
tbrowder SmokeMachine: looks useful, thanks! 10:06
how do i add a new column to an existing model and table with data? 10:08
tbrowder hm, ".get_value" would be better aliased to ".get-value" 10:11
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
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?
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
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
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
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?
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
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
SmokeMachine Xliff: it looks good... what about if I want to create 1 file for each model? 11:08
Xliff SmokeMachine: Hmmm.... good thought. Let me update paste. 11:09
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
SmokeMachine Xliff: yes, please! 11:15
Xliff SmokeMachine: Done. 11:20
SmokeMachine thanks! I reopened that issue 11:21
Xliff Also added an issue to #15 11:35
s/issue/comment/
SmokeMachine Xliff: github.com/FCO/Red/issues/15#issue...-473256864 11:50
Xliff SmokeMachine: Updated. :) 12:11
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
timotimo also, don't return something in a scalar container i guess :) 12:42
leont Iteratable seems to work 12:44
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
timotimo don't "return $foo" 12:46
though, wait, we do decontrv usually 12:47
leont Yeah, I would expect a decontainerization 12:48
Unless «is rw» 12:49
timotimo or «is raw»
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
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]
lizmat weekly: news.perlfoundation.org/2019/03/feb...rl-6-.html 14:36
notable6 lizmat, Noted!
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
SmokeMachine tbrowder: any news about your test with Red? 15:32
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
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
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!
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
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
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
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
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
kawaii AlexDaniel ^ 16:57
AlexDaniel kawaii: it should work, I have no idea what's going on 17:00
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/81VEAkBhss␤No compiler available for Perl v6.d␤at /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
AlexDaniel obviously has * and D on the same key… 17:12
SmokeMachine sorry, I wrote it wrong...
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
Xliff SmokeMachine: If you take a look at my fork, you can see how far I am. 17:24
github.com/Xliff/Red/
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
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
Xliff OK. If not then, I'll drop you a .tell! 17:32
SmokeMachine Xliff: great!
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
Geth Blin: kawaii++ created pull request #10:
Dockerfile for Blin automation
17:41
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
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
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
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
Kaiepi what's a practical example where those would be useful? 18:48
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
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
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
cpan-p6 New module released to CPAN! AWS-Session (0.8.0) by 03HANENKAMP 20:11
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
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
ToddAndMargo $ pgrep bash | perl6 -e 'my @x = slurp().lines; print @x[0] ~ "\n" ~ @x[1] ~ "\n";' 2550 7479 20:30
that cleans it up.
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!
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
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
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 :)
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
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
Garland_g[m] I'll use binding until that's available then. Thanks. 21:25
tbrowder SmokeMachine: are you available for red help? 22:05
this
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.
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
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
tbrowder yep, trying to see what i've missed...thanks 23:12
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
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
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
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
tony-o it does have a nightly build from source of rakudo 23:57