🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Logs can be inspected at colabti.org/irclogger/irclogger_log/raku Set by lizmat on 1 May 2021. |
|||
00:02
reportable6 left
00:05
reportable6 joined
01:03
lucasb left
01:24
kst joined
01:37
kvw_5 joined
01:41
kvw_5_ left
02:24
frost-lab joined
02:36
webstrand left
03:15
aborazmeh joined
03:17
squashable6 left
03:19
squashable6 joined
03:43
rindolf joined
03:59
aborazmeh left
04:20
|Sno| left
04:26
xinming_ joined
04:29
xinming left
04:31
|Sno| joined
05:25
rindolf left
05:27
nicholatian left,
silug left,
silug joined
05:30
nicholatian joined
06:01
ufobat_ joined,
ufobat__ joined,
reportable6 left
06:03
reportable6 joined
06:26
brtastic joined
06:32
sftp left
06:57
abraxxa1 joined
07:02
abraxxa1 left
07:03
abraxxa1 joined
07:06
domidumont joined
07:18
asymptotically joined
07:19
sena_kun left
07:20
sena_kun joined
07:21
pecastro joined
07:22
Sgeo left,
brtastic1 joined
07:23
rindolf joined,
brtastic left,
brtastic1 is now known as brtastic
07:27
wamba joined
07:57
cog left,
cog joined
08:01
dakkar joined
08:05
whatnext joined
|
|||
whatnext | hello all:) I have a question about the mi6 tool | 08:07 | |
japhb | Is there an idiom for an idle/default task within a react block? Meaning that I want all other `whenever` blocks to have priority, but if the react loop has no other `whenever` triggering, I want it to run my default block. Hopefully that makes sense ... | 08:08 | |
whatnext | I am trying to run `mi6 release` and I get the error `Step 2 CheckOrigin: You should set git remote first` | ||
my question is, set it to what? and how to do that? | |||
japhb | The actual use case is an action game main loop that wants to render a new frame whenever it is *not* currently processing user input, network messages, etc., but very importantly *not if it is already rendering a frame*, and without setting a fixed frame rate with e.g. Supply.interval. | 08:09 | |
08:09
whatnext22 joined
|
|||
japhb | whatnext: If you run `git remote -v` what does it say? | 08:10 | |
08:13
whatnext left
|
|||
whatnext22 | @japhb sorry my connection dropped out - now apparently I am whatnext22:) If I run `git remote -v` nothing happens - I haven't initialised a git repo at all as I wasn't aware this needed to be done. Maybe there are docs somewhere that I am missing? | 08:14 | |
lizmat | ah, good point | ||
I guess mi6 could do the "git init" for you | |||
but you'd need to add a repo somewhere on a place like github to make it work for you | 08:15 | ||
08:15
whatnext joined
|
|||
japhb | Oh I see. Yeah, if you had created the project with `mi6 new Module::Name`, then among other things it initializes it as a git repo, with all the template files waiting in the index for your first commit. | 08:15 | |
lizmat | ah, yes, of course, it does :-) | ||
when you create a new repo on github, it will tell you what to do to link your local repo to the remote on Github | 08:16 | ||
japhb | But for release you still need to do as lizmat mentions and create an upstream somewhere, e.g. GitHub, and set your git remote there | ||
Right, lizmat++ | |||
lizmat | and also, you'd need a login on PAUSE as well | ||
I don't think mi6 support uploading to the zef ecosystem yet, does it? japhb ? | 08:17 | ||
japhb | Until mi6 support for fez is merged ... :-) | ||
lizmat | right | ||
whatnext | Ah really. I did create it using `mi6 new Module::Name` - also I do have a PAUSE login | ||
japhb | Not that I know of, no. | ||
OK, if you do `git status` in that directory, you should see all the files waiting to be committed | 08:18 | ||
whatnext | I see it is indeed a git repo - but `git remote -v` doesn't return anything | ||
08:18
whatnext22 left
|
|||
japhb | whatnext: It won't until you have somewhere to push to. | 08:18 | |
08:18
b2gills left
|
|||
whatnext | I guess that is my question - what do I need to set it to? | 08:18 | |
japhb | Basically mi6 doesn't want you to release something that people can't fork | ||
Do you have a github account? | 08:19 | ||
whatnext | ok I see - so I need to put the project on github | ||
got it | |||
I was thinking it wanted some kind of remote on cpan | |||
japhb | (It doesn't have to be GitHub in particular, that's just the most common choice of Rakoons so far.) | ||
Nope. :-) | |||
whatnext | ok thanks - I'll try that :) | 08:20 | |
08:20
cog_ joined
|
|||
japhb | Good luck! Let us know if you have any other questions. :-) | 08:20 | |
whatnext | thanks :) | ||
japhb | Speaking of which, anyone currently on have any ideas for my question of a default task within a react block? | ||
08:21
silug left,
silug joined
08:22
moony left
08:23
cog left
08:24
moony joined
08:26
moony left
08:31
moony joined
08:32
whatnext left
08:34
PimDaniel joined,
b2gills joined
|
|||
PimDaniel | \o | 08:34 | |
Is there a workarround for this: Circular module loading detected trying to precompile /home/moi/raku/trylib/CharCons.rakumod ? | 08:35 | ||
I get a Line Class made of Point(s) (class) but class Point is into another module for some reasons. And the problem is that point MUST refer to Line also. so Point Class need to import the module where Line class is defined. This is a wellknown problem. | 08:38 | ||
The simpler solution would be to put Points into the same module tha Line is but i shared it because of the size and other tricks. | 08:40 | ||
So i just ask in the case it would exist a simple solution to resolve this. I red this was considered like a bug. I do not pretend it is still. | 08:41 | ||
lizmat | PimDaniel: are you aware of stubbing ? | 08:43 | |
PimDaniel | lizmat: hello! No , i'm not aware! Sorry! | 08:44 | |
lizmat | m: class A { ... }; class B is A { method foo() { dd } }; class A { method bar() { dd } }; B.foo; B.bar | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> 'B' cannot inherit from 'A' because 'A' isn't composed yet (maybe it is stubbed) at <tmp>:1 |
||
lizmat | hmmm | ||
m: class A { ... }; class B { method foo() { A.bar } }; class A { method bar() { dd } }; B.foo | 08:45 | ||
camelia | method bar(A: *%_) | ||
lizmat | that's more what you need, no | ||
? | |||
PimDaniel | lizmat Thank you : i must understand... i'm not fast, sorry. | 08:48 | |
lizmat: You declared 2 times class A {} how can this work? | 08:54 | ||
lizmat | the first time I stubbed it | ||
that's the meaning of the ... inside the body of the class | 08:55 | ||
it tells the compiler: there's going to be a class A defined, but not now | |||
it allows you to refer to the class, without it actually have been built yet | |||
not that in class B in my example, method foo calls method bar in class A | 08:56 | ||
*before* that method is actually defined | |||
because method calling is late bound (aka the lookup for the method happens at runtime) | |||
this can work | |||
PimDaniel | lizmat ok ok so i need to go further to well understand and to see how implement this in my code. | 08:57 | |
lizmat | I'm not sure it is the solution to your problem, but it may help you figure out a way to do what you want :-) | 08:58 | |
PimDaniel | lizmat in my case : i've class A and B in =! Modules and B is a composition of A let's say A is Point(s) : B is Line, but i do not know the side you chose so it may be the oposite. I must to check this more to understand and i'll come back if i struggle. Thank you very mutch! | 09:01 | |
lizmat | you're welcome! | 09:02 | |
09:02
PimDaniel left
|
|||
lizmat clickbaits rakudoweekly.blog/2021/05/10/2021-...-beta-pod/ | 09:03 | ||
09:11
parabolize left
|
|||
Altreus clicks | 09:12 | ||
curses! baited! | |||
lizmat | :) | ||
09:13
mowcat left
09:21
telex left
09:22
telex joined
09:28
PimDaniel joined
09:33
whatnext joined
|
|||
PimDaniel | lizmat: I'm unable to say if your answer replies to my problem at this step. My problem should be tested with true files and modules not foo/bar into a simple inline. Foo/Bar means nothing for me even if wee see it everywhere it does not correspond to any reality: In real live you sometimes and may be often have classes that have relations between them eg : Point and Line one is a composition of the other. | 09:33 | |
lizmat | so the file with Line, does a "use Point" ? | 09:35 | |
and you also want to do a "use Line" in the file that has Point ? | |||
PimDaniel | I should probably make a paste to explicit my need more. | 09:36 | |
lizmat | yes, and please as short as possible :-) | ||
whatnext | hello again:) I am still working on `mi6 release` - now I am down to `Step 8. UploadToCPAN` which is progress | ||
lizmat | if anything, it will help your own thoughts get straight | ||
whatnext: you probably need a ~/.pause file with your PAUSE credentials ? | 09:37 | ||
PimDaniel | lizmat of course a reduced representation but it's not a problem. | ||
whatnext | however, I am getting `401 Unauthorized` - I have the user/password in a `.pause` file in my home dir and have logged in manually to PAUSE using the same to make sure they are correct - but still I have the error | 09:38 | |
lizmat - thanks yes I have done that already, but I still get the 401 | 09:39 | ||
moritz | Hi all. I'm not updating the perl6-all-modules repository anymore, because it requires too much maintenance. If anybody wants to take over, please tell me soon; otherwise I'll delete that repo | 09:40 | |
lizmat | moritz: link? | 09:41 | |
09:42
whatnext50 joined
09:44
whatnext74 joined
|
|||
lizmat | wow, whatnext is moving up the ranks quickly :-) | 09:44 | |
whatnext74 | sorry I have a crappy connection here :/ | 09:45 | |
09:45
whatnext left
|
|||
lizmat | whatnext74: I can only say: verify what's in .pause *again* | 09:46 | |
copy paste what's in there when trying to log in manually | |||
PimDaniel | lizmat YESS The file with line does a use Screen Module which contains Point class and just anothe one. The problem is that class Point MUST refer to Line : a kind of indexation to refer which lines a point belongs too for example, then Screen Module MUST import CharCons module where Class Line is defined and it is a circular import because CharCons yet imports Screen where Point class is defined. I | ||
lizmat | the mind can play tricks on you that access checking will catch | ||
PimDaniel | know and see, you are busy. No hurry! worry! Thank's. | ||
09:47
whatnext50 left
09:51
whatnext joined
09:52
whatnext74 left
|
|||
whatnext | lizmat thanks - yes I did that already, but same result - I was wondering at the error message, because it states the url as ` pause.perl.org/pause/authenquery?A...N=add_uri` - in the code it looks like it attempts to substitute `//` for `//{$.user}:{$.password}@` but it doesn't look like this is successful for some reason | 09:53 | |
lizmat | on what OS are you ? | ||
moritz | lizmat: github.com/moritz/perl6-all-modules | ||
whatnext | CentOS 7.9 | 09:54 | |
lizmat | whatnext: sorry, out of ideas then | 09:55 | |
moritz: was "git grep" capability the only thing you were after ? | 09:56 | ||
or was there some other functionality that would benefit from such a repo ? | |||
09:57
PimDaniel left
|
|||
whatnext | lizmat ok no worries thanks anyway - if I manage to figure it out I'll post an update | 09:58 | |
lizmat | ++whatnext | ||
MasterDuke | greppable6 uses that repo | 09:59 | |
lizmat | ah, I see | 10:03 | |
moritz: so what is the maint work that needs to be done | |||
? | |||
10:05
whatnext left
|
|||
moritz | lizmat: yes, git grep was the purpose. The maintenance is getting the update script working when it's not, and running it regularly | 10:10 | |
lizmat | what are typical failure modes? | 10:11 | |
10:13
wamba left
10:17
dakkar_ joined,
dakkar left
|
|||
lizmat | moritz: or is that the issue: not typical failure modes :-) | 10:19 | |
Altreus | Who comes up with the weekly challenges? | 10:23 | |
10:24
whatnext joined
|
|||
lizmat | Mohammad S Anwar and their team? | 10:25 | |
10:29
whatnext left
10:30
whatnext joined,
PimDaniel joined,
PimDaniel left,
whatnext left,
whatnext joined
10:31
dakkar_ is now known as dakkar
|
|||
whatnext | wow this connection is really driving me crazy today X) | 10:31 | |
10:34
whatnext20 joined
|
|||
whatnext20 | I am not sure if my last message got through, so I'll try again - I did figure out the mi6 issue in the end. It looks like the `upload` routine in `mi6` sends the url as `//{user}:{password}@` but doesnt url safe special chars in the password. If I replace special chars in the password with the `%...` equivalent it works | 10:35 | |
tadzik | ha, good one. Should be easy to fix | ||
whatnext20 | ill write up a bug report this afternoon - giving up with IRC chat right now :') | 10:36 | |
raydiak | .tell PimDaniel docs.raku.org/language/faq#Can_I_h...n_modules? | 10:37 | |
tellable6 | raydiak, I'll pass your message to PimDaniel | ||
10:37
whatnext left
|
|||
raydiak | .tell PimDaniel basically, you have to reorganize your classes/roles to eliminate the circularity, or else put them both in the same file and stub the second one before using it in the first one | 10:37 | |
tellable6 | raydiak, I'll pass your message to PimDaniel | ||
lizmat | raydiak++ | 10:40 | |
raydiak | knew I'd read that somewhere before, just took me forever to find it | 10:41 | |
Altreus | I ask because they always seem to find something that is simple and complex at the same time | ||
I wonder how they come up with so many! | |||
10:43
whatnext20 left,
wamba joined
|
|||
moritz | lizmat: typical failure mode: an error message. Typical response: try again. If the error shows up again: debug. | 11:00 | |
lizmat | moritz: ack | 11:01 | |
11:02
telex left
11:04
telex joined
11:17
mowcat joined
11:22
Kaiepi left
11:23
Kaiepi joined
11:29
canbenshanlo joined,
thundergnat80 joined
|
|||
canbenshanlo | hey, everyone! is there a way to avoid the .Array and collect right into -> @perm? | 11:32 | |
m: (1..3).permutations.map(-> $perm { $perm.Array.push($perm.head) }) | |||
camelia | ( no output ) | ||
canbenshanlo | m: say (1..3).permutations.map(-> $perm { $perm.Array.push($perm.head) }) | ||
camelia | ([1 2 3 1] [1 3 2 1] [2 1 3 2] [2 3 1 2] [3 1 2 3] [3 2 1 3]) | ||
thundergnat80 | Altreus: Many of the challenge tasks seem to be lifted straight from rosettacode.org . At least, there are _very_ similar tasks on rosettacode. Raku (and Perl!) are pretty well represented on there, but could always use more task solutions. rosettacode.org/wiki/Reports:Tasks_...ed_in_Raku | 11:33 | |
canbenshanlo | the most obvious thing didn't work when using -> @perm: Cannot call 'push' on an immutable 'List' | ||
thundergnat80 | m: say (1..3).permutations.map({ [|$_, .head] }) | 11:36 | |
camelia | ([1 2 3 1] [1 3 2 1] [2 1 3 2] [2 3 1 2] [3 1 2 3] [3 2 1 3]) | ||
CIAvash | canbenshanlo: you need `-> @perm is copy` | 11:38 | |
canbenshanlo | oh, slick, is copy does work indeed | 11:40 | |
thanks both of you! | |||
CIAvash | m: [++$] | 11:43 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Unsupported use of $] variable; in Raku please use $*RAKU.version or $*RAKU.compiler.version at <tmp>:1 ------> 3[++$]7⏏5<EOL> |
||
CIAvash | Is this a bug? | ||
m: say [++$ ] | 11:44 | ||
camelia | [1] | ||
11:45
APic left
11:46
APic joined
|
|||
moritz | CIAvash: no | 11:49 | |
you auto-increment an anonymous variable, and that happens to be defined as incrementing it to 1, and returing it | |||
CIAvash | I mean the previous code without the space after `$` | ||
moritz | it's intended behavior, possibly not optimal | 11:50 | |
12:01
reportable6 left
12:04
reportable6 joined
12:12
xelxebar left
12:13
xelxebar joined
12:17
thundergnat80 left
12:24
aindilis left,
aindilis` joined
13:38
linkable6 left,
evalable6 left
13:41
evalable6 joined
13:42
linkable6 joined,
dpk left
14:01
mowcat left
|
|||
Altreus | You'd think it just wouldn't try to find the $] variable really | 14:12 | |
I suppose there are a few hangovers from when it was Perl 6 and therefore tried to accommodate Perl 5 people | |||
lizmat | m: say $] | 14:17 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Unsupported use of $] variable; in Raku please use $*RAKU.version or $*RAKU.compiler.version at <tmp>:1 ------> 3say $]7⏏5<EOL> |
||
lizmat | m: no isms; say $] | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Unsupported use of $] variable; in Raku please use $*RAKU.version or $*RAKU.compiler.version at <tmp>:1 ------> 3no isms; say $]7⏏5<EOL> |
||
lizmat | m: no isms <Perl>; say $] | 14:18 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Don't know how to handle: isms <Perl> at <tmp>:1 ------> 3no isms <Perl>7⏏5; say $] |
||
lizmat | m: no isms <perl>; say $] | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Don't know how to handle: isms <perl> at <tmp>:1 ------> 3no isms <perl>7⏏5; say $] |
||
lizmat | m: no isms <perl5>; say $] | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Don't know how to handle: isms <perl5> at <tmp>:1 ------> 3no isms <perl5>7⏏5; say $] |
||
lizmat | hmmm | ||
m: no isms <Perl5>; say $] | |||
camelia | 5===SORRY!5=== Error while compiling <tmp> Unsupported use of $] variable; in Raku please use $*RAKU.version or $*RAKU.compiler.version at <tmp>:1 ------> 3no isms <Perl5>; say $]7⏏5<EOL> |
||
lizmat | I guess it's not covered in that case | ||
14:29
Sgeo joined,
dogbert17 joined
14:32
dogbert11 left
14:33
dpk joined
14:36
ufobat joined
14:39
ufobat_ left,
ufobat__ left,
ufobat_ joined,
frost-lab left
14:43
parabolize joined
14:53
sftp joined
14:59
MasterDuke left
15:02
aindilis` left,
aindilis` joined
15:07
parabolize left
15:23
PotatoGim left
15:24
PotatoGim joined
15:31
aindilis` left,
PimDaniel joined
|
|||
PimDaniel | \o Hi again! | 15:31 | |
tellable6 | 2021-05-11T10:37:17Z #raku <raydiak> PimDaniel docs.raku.org/language/faq#Can_I_h...n_modules? | ||
2021-05-11T10:37:39Z #raku <raydiak> PimDaniel basically, you have to reorganize your classes/roles to eliminate the circularity, or else put them both in the same file and stub the second one before using it in the first one | |||
15:38
antononcube joined
15:41
Kaiepi left
|
|||
PimDaniel | raydiak Thank you. I'll try to do it with role since i'm affraid the 1st solution will end up using one unique huge module. But i'm used to using roles and i'm affraid or side effects. | 15:42 | |
15:42
Kaiepi joined
|
|||
PimDaniel | raydiak But i'm *NOT used to using roles | 15:42 | |
raydiak *of side effects. Décidément! | 15:44 | ||
15:46
antononcube left
15:55
antononcube joined
|
|||
antononcube | lizmat Hi! You suggested using Math::Libgsl::LinearAlgebra, but I have hard time installing it on Mac OS 11.3. Also, generally speaking, I consider the dependency with gsl to be a "too heavy" requirement. Should I assume that your suggestion means that Math::Matrix is not actively developed, and, hence I should figure out how to install | 15:56 | |
Math::Libgsl::LinearAlgebra on my Mac? | |||
Altreus | PimDaniel: Français? | ||
PimDaniel | Altreus OUI | ||
Altreus | salut :) j'apprends français les samedis | 15:57 | |
PimDaniel | Altreus: bon courage! | ||
Altreus | Je peux essayer de traduire si tu voulais! | ||
PimDaniel | Altreus C'est gentil mais je pense que je ne m'en sort pas trop mal. | 15:58 | |
Altreus Mon problème n'est pas là pour l'instant. | 15:59 | ||
16:00
MitarashiDango[m left
|
|||
Altreus | :) | 16:00 | |
tonyo | PimDaniel: you can probably also do circulars with `require` | ||
PimDaniel | To everybody: Is there a dedicated paste place for this Raku chat? | ||
Altreus | I have been using github gists | 16:01 | |
PimDaniel | tonyo thank you for sure i think there is one : that is what i was wondering. | ||
Okay so i'll use pastebin like i did yet. | 16:02 | ||
tonyo | gist or pastebin is what most use | ||
Altreus | I think I solved the circular issue by simply removing all mentions of the other class :D | 16:03 | |
In this project everything is done by a single object anyway so it wasn't a problem | |||
antononcube | @PimDaniel Try the Raku discord channel/server. | 16:04 | |
PimDaniel | Right but before all may you look at the question here, and please read everything? pastebin.com/ruZbL7ya | 16:05 | |
Altreus | That's here if you want discord.gg/gg2a3T6 | ||
PimDaniel | Altreus ok that you for the link. | 16:06 | |
16:07
parabolize joined
|
|||
PimDaniel | Altreus what is discord? I do not create accounts of a site of what i do not know what it is! | 16:09 | |
Altreus | If you don't have Discord then you would probably not benefit from this link :) | ||
it's just another chat medium | |||
PimDaniel | Okay, very intresting but i'll not do this now, plus : does discord work in irssi: Linux Ascii Native Console? I like trivial old fashion apps (for PC) because the are allways or quite are fast and they don't piss me off. | 16:13 | |
Altreus: Are there more users and activity on Discord than here? | 16:15 | ||
Altreus | no :D | 16:16 | |
to any of those | 16:17 | ||
16:19
antononcube left
|
|||
PimDaniel | onyo do you have a solution to my need pastebin.com/ruZbL7ya with require? | 16:19 | |
tonyo do you have a solution to my need pastebin.com/ruZbL7ya with require? | |||
I fill there are many solutions as a workaround for circular dependencies but i fear many of them would lead to anarchy. I need to keep my code clear and simple. | 16:30 | ||
16:30
patrickb joined,
patrickb left
|
|||
tonyo | why do you need `Line @belong` in Point ? | 16:31 | |
PimDaniel: ^ | 16:32 | ||
i don't see the use case for @belong in that example | 16:33 | ||
PimDaniel | I need to know which Line(s) a point belongs too. | ||
16:34
brtastic1 joined
|
|||
Altreus | it is possible to just put `has @belong` | 16:35 | |
PimDaniel | tonyo I need to know which Line(s) a point belongs too. Is it shocking | ||
Altreus | This was my solution :D | ||
tonyo | just make it a generic | ||
16:35
brtastic left,
brtastic1 is now known as brtastic
|
|||
tonyo | it is shocking to think that a point will only ever belong to a Line | 16:36 | |
16:36
dakkar left
|
|||
tonyo | what about later when four of them comprise a Rect ? | 16:37 | |
PimDaniel | tonyo A Point may belong (Touch) one or more Lines | ||
tonyo | you wouldn't deduce that without knowing all of the lines to get points from in your example which makes @belongs a bit moot | 16:38 | |
PimDaniel | Into a Rect: each corner Point refer to 2 Lines. What is the problem? | ||
tonyo | How do you know which Rect they belong to? | 16:39 | |
16:39
mowcat joined
|
|||
moritz | if you store all four corners, you could have contradictory information | 16:39 | |
PimDaniel | Into a crux it refers to 2 at 4 lines : but it depends how we consider Lines of course. | ||
moritz | also, many rectangle implementations assume that it's aligned in a certain way; that might only make sense if you have also access to rotations | 16:40 | |
tonyo | you don't need to keep track of the lines a point belongs to, you already know all of the lines and therefore the points | ||
Altreus | You could also have class Corner { has Line $line1; has Line $line2; has Point $common } | 16:41 | |
tonyo | what is the Point going to do with the parent info? | ||
PimDaniel | moritz I need to mention i work in rectilinear plan. I just have horizontal and vertical lines. | ||
Altreus You idea is may be good. | 16:42 | ||
Altreus | I think you are better off modelling it as class Line { has Point $point1; has Point $point2 } | ||
Now if you transform either Point you transform the Line | |||
the Point doesn't need to know the Line | |||
tonyo | it really sounds like there isn't a use case for the Point itself knowing about Line | 16:43 | |
PimDaniel | tonyo There is one case a point belongs to one an only one line. | 16:44 | |
Altreus | But still | 16:45 | |
What does the Point do with the Line? | |||
The best way to solve the problem is to not need the thing :D | |||
PimDaniel | tonyo The Other cases are yet done. with chained points . | ||
Altreus | but maybe you do my $point1 = Point.new(...); my $point2 = Point.new(...); my $point3 = Point.new(...); my $line1 = Line.new($point1, $point2); my $line2 = Line.new($point2, $point3); my $line3 = Line.new($point3, $point1); | 16:47 | |
tonyo | here is how you'd do it with require gist.github.com/tony-o/34d0aa032a6...149d2d47d2 | ||
Altreus | This is of course a triangle | ||
But if you change any point, both lines change as a result | |||
because they share the point | |||
So instead of having both points know what lines they belong to, you simply ensure that those lines use the same point object | |||
PimDaniel | Altreus: there are no triangle in my system. Well not really! just rectangles. | 16:48 | |
tonyo | then `use A; call-ba; => 42` | ||
Altreus | PimDaniel: yes but I didn't want to do *four* points! | 16:49 | |
tonyo | still, possible and good idea shouldn't be conflated | ||
Altreus | PimDaniel: Anyway I think you can make it work without having Line @belong | 16:50 | |
Just two Points on Line | |||
or more! | |||
PimDaniel | Altreus Yess, I agree. At first i'm not forced to type the Array and could link it as is. But i'll not be able to use Line method though. | 16:51 | |
tonyo | yes you will | 16:52 | |
PimDaniel | tonyo : so this could be the solution. | ||
tonyo but in fact i agree that this use case is NOT clear. | 16:53 | ||
tonyo | m: class A { has @.belongs; }; class B { has $.a; submethod BUILD { $!a = A.new; $!a.belongs.push: self; }; method hi { "hi".say; }; }; B.new.a.belongs.first.hi; | 16:54 | |
camelia | hi | ||
tonyo | the design needs more thought, it seems intentionally chicken and egg | ||
PimDaniel | tonyo it is a more general problem that i try to achieve in fact. | 16:55 | |
It is an algorithm problem. | |||
which i asked here yet. | |||
I've got puzzled rectangles and i want to fill them. | 16:56 | ||
But where do i start? | 16:57 | ||
When i look as a human i see rectangles imbricated, but by computing, i must loop on Points or Lines : i need and algorithm. | 16:59 | ||
Altreus | I think you don't need the array at all, that's my point | 17:00 | |
in fact I don't think you need Lines at all | 17:01 | ||
a rectangle is four points | |||
those contain the important stuff - the numbers | |||
PimDaniel | Please may you look at what i did here : github.com/Pim-tech/Orthogon | ||
which was made with theses algorithms: stackoverflow.com/questions/591929...68#6634668 | 17:02 | ||
This is a welknowed problem. | 17:03 | ||
*welknown | |||
Altreus | This is interesting but unfortunately it is more than I can digest at the moment | 17:04 | |
In fact it would appear to be the end of my day :D | |||
17:05
aluaces left
|
|||
PimDaniel | Altreus i did not ask you to finish it tonight. I'm not your boss. | 17:05 | |
Altreus | :D | 17:06 | |
hope you find a good answer soon :) | |||
Altreus away | |||
PimDaniel | Altreus but it gives you a subject to dream of for your nights. | ||
Altreus and tonyo : You don't need to undestand nothing of the last link: it is just to explicit the context. | 17:08 | ||
But if you look at the Jean-Yves DANIEL question into this link : it is the ultime final step which i need to achieve: How to fill the drawned rectangles? | 17:10 | ||
tonyo and Altreus: Thank You! Good Night! | 17:11 | ||
17:11
PimDaniel left
17:22
takside left
17:34
aluaces joined
17:41
domidumont left
17:59
domidumont joined,
wingfold left
|
|||
andinus | m: say "ping" | 18:00 | |
camelia | ping | ||
18:02
reportable6 left
|
|||
tonyo | expected: "pong" | 18:02 | |
18:04
domidumont left
18:05
reportable6 joined,
Kaiepi left,
Kaiepi joined
18:07
domidumont joined,
domidumont left
18:13
wingfold joined
18:16
japhb left
18:23
japhb joined
18:58
ufobat left,
ufobat_ left
19:21
rindolf left
19:41
Black_Ribbon joined
19:42
wamba left
19:54
wamba joined
19:57
ens left,
ens joined
20:09
linkable6 left,
nativecallable6 left,
greppable6 left,
releasable6 left,
committable6 left,
benchable6 left,
bloatable6 left,
ecocode[m]1 left,
kawaii left,
peteretep left,
synthmeat left,
ServerStatsDisco left,
pwr22 left,
[1]koboldwiz is now known as koboldwiz
20:13
koboldwiz is now known as 18WAAENQI,
ServerStatsDisco joined,
linkable6 joined,
nativecallable6 joined,
greppable6 joined,
releasable6 joined,
committable6 joined,
benchable6 joined,
bloatable6 joined,
ecocode[m]1 joined,
kawaii joined,
peteretep joined,
synthmeat joined,
pwr22 joined,
ServerStatsDisco left
20:16
Tirifto[m] left,
kiti_nomad[m] left,
Nasrudin left,
uzl[m] left,
AlexDaniel` left,
demostanis[m] left,
sienet_ja_LSD[m] left,
ecocode[m]1 left
20:17
CIAvash left,
juanfra__ left,
Garland_g[m] left,
tusooa left,
ThaEwat left,
patrickbkr[m] left,
asymptotically left
20:20
pwr22 left
20:29
antononcube joined
20:33
aborazmeh joined
20:35
antononcube left,
aborazmeh left
20:37
Garland_g[m] joined,
uzl[m] joined,
juanfra__ joined,
sienet_ja_LSD[m] joined,
CIAvash joined,
Nasrudin joined,
demostanis[m] joined,
patrickbkr[m] joined,
AlexDaniel` joined
20:38
ecocode[m]1 joined
20:44
Kaiepi left
20:45
Kaiepi joined
20:57
sienet_ja_LSD[m] left,
CIAvash left,
Garland_g[m] left,
juanfra__ left,
ecocode[m]1 left,
patrickbkr[m] left,
demostanis[m] left,
Nasrudin left
21:01
Kaiepi left
21:02
telex left,
Kaiepi joined
21:03
AlexDaniel` left,
uzl[m] left
21:05
telex joined
21:11
tusooa joined
21:14
kiti_nomad[m] joined
21:15
Tirifto[m] joined
21:17
ThaEwat joined
21:23
pwr22 joined,
ServerStatsDisco joined,
juanfra__ joined,
demostanis[m] joined
21:24
sienet_ja_LSD[m] joined,
CIAvash joined,
Garland_g[m] joined
21:25
ecocode[m]1 joined,
patrickbkr[m] joined
21:26
Nasrudin joined
21:27
telex left
21:28
telex joined
21:31
brtastic left
21:37
uzl[m] joined
21:39
AlexDaniel` joined
21:56
wamba left,
mowcat left
22:20
aindilis joined
22:27
gfldex left,
gfldex joined
22:43
rindolf joined
22:46
rindolf left
23:14
|Sno| left
23:20
canbenshanlo left,
pecastro left
|
|||
codesections | m: sub f { 42 }; &f.CALL-ME; | 23:21 | |
camelia | No such method 'CALL-ME' for invocant of type 'Sub' in block <unit> at <tmp> line 1 |
||
codesections | well, _that's_ a surprise to me | ||
23:29
b2gills left,
b2gills joined
23:47
|Sno| joined
23:48
dogbert11 joined
23:50
dogbert17 left
|
|||
moon-child | would love if somebody could explain that | 23:55 | |
23:57
bigdata joined
|