|
01:55
kylese left
01:56
kylese joined
02:15
kylese left,
kylese joined
02:16
human-blip left
|
|||
| Voldenet | maybe MAIN could use something like this for `global options` # proto sub MAIN(:$suspend, :$port) { { * } }; multi MAIN("foo") { say "foo" } | 02:34 | |
| which would understand proto args before actual MAIN | 02:36 | ||
|
03:22
wayland left
03:27
donaldh left
|
|||
| simon_sibl | Voldenet: thanks for all the feedback ! So from what I understand, I actually don’t need to use start{} at all ? Won’t that mean my client will be slower and run on a single thread ? (Not saying it’s wrong to be single threaded but I thought having multi thread to handle the peers would help) | 03:37 | |
| Voldenet | multithreading helps a lot if you do cpu-bound work | 03:38 | |
| simon_sibl | And also you say I can put a QUIT phaser at the right place to handle error better | ||
| Voldenet | and if threads use different regions of memory | ||
| I think torrent client is mostly limited by io | 03:40 | ||
| simon_sibl | I see, I’ll check how it goes if I don’t use the start block, for the QUIT phaser tho I’m still a bit confused, what would it help with ? | ||
| Voldenet | QUIT would catch errors from peers crashing | 03:41 | |
| simon_sibl | I see, will help a lot for debugging 😆 or if I make a better ui that could show error | 03:42 | |
| Voldenet | you can integrate it with `start react …` later too, then create a channel and return its supply – it's quite flexible | 03:48 | |
|
04:13
wayland joined
|
|||
| wayland | .tell patrickb Once I get the basic Data Oriented Programming stuff done, I'm looking at making something that will replace the standard "sub MAIN". I'd call it CommandObject, and the idea would be that you would follow the exe name with a command and an object (eg. git diff path/to/file, where "diff" is the command, and "path/to/file" is the object). Then various optional options like --option. | 04:15 | |
| tellable6 | wayland, I'll pass your message to patrickb | ||
| wayland | .tell patrickb: I think you just have to go: sub MAIN($compulsory, :$optional, %_) and the rest of the options get dumped into %_ | ||
| tellable6 | wayland, I'll pass your message to patrickb | ||
|
04:31
ShimmerFairy left
04:38
swaggboi left
04:40
ShimmerFairy joined
05:10
belluzj joined
|
|||
| patrickb | wayland: but that would swallow up args appearing after the single compulsory one that match $optional. | 05:21 | |
| tellable6 | 2026-06-27T04:15:42Z #raku <wayland> patrickb: I think you just have to go: sub MAIN($compulsory, :$optional, %_) and the rest of the options get dumped into %_ | ||
| hey patrickb, you have a message: gist.github.com/ff577ce2dc25e63c34...5f809d7725 | |||
|
05:26
hurufu joined
05:27
belluzj left
05:35
donaldh joined
|
|||
| simon_sibl | Voldenet: I am not totally confident with the whole concurrency thingy in Raku, but I removed the start{} for the peers and now it just blocks and doesnt download anything, but I am not sure to see anything blocking the execution for each peer, also instead of .then I changed the for loop to "generate" (if thats the right way to see it) a new whenever for the peer which remove it from the Set once the promise has been | 06:11 | |
| kept/broken | |||
| ah ok thats the difference between react and supply | 06:21 | ||
|
06:32
human-blip joined
|
|||
| alright, updated, added the QUIT (still a bit confused with the different layer of QUIT) and without the start{} block, thanks a lot Voldenet ! | 06:43 | ||
| now I am just not happy with the current method !request-work its very ugly but yeah xD | 06:45 | ||
| but it still becomes the highest CPU hungry process of my machine xD | 06:47 | ||
| cdn.discordapp.com/attachments/633...6ddb1& | |||
| cdn.discordapp.com/attachments/633...47302& | 06:48 | ||
| probably the way I handle the pieces I and the peers have, maybe using a SetHash with the ID of each piece isnt amazing memory wise.. | 06:49 | ||
| bigger issue is really cant seem to finish downloading a file, the last or lasts pieces dont get downloaded or written even when I add a %file<handle>.flush for some reason | 06:56 | ||
| lizmat: it seems the whenever Promise.in with dynamic interval seems not to work actually xD | 07:33 | ||
| lizmat | meh | ||
| sorry, not in the right frame of mind to be of any help :-( | 07:34 | ||
| the heat / lack of sleep is just getting to me :-( | 07:35 | ||
| 9:30 and already 32 degrees here :-( | |||
| simon_sibl | no worries xD I just lazily use a start block for this for now | 07:39 | |
|
08:02
abraxxa joined
08:11
belluzj joined
|
|||
| there are no AC nearby you lizmat ? | 08:31 | ||
| lizmat | yes, there is, but it's not cutting it :-( | 08:32 | |
| I mean, where I sit it's 26 now... which is bearable | 08:33 | ||
| but it's that and the combination of not getting enough quality sleep time | |||
| and I guess age has also something to do with it | 08:34 | ||
| simon_sibl | you mean the AC is not powerful enough ? age must not help when having bad sleep for sure.. | ||
| lizmat | well.. I guess the house wasn't really built for these types of events... the local weather station just declared a "super heat wave" 5 consecutive days of 30+, with 3 of them 35+ | 08:50 | |
| at night it didn't get below 26.9 here | |||
| there's just no cooling off :-( | |||
| tadzik | :( | 09:03 | |
|
09:13
Sgeo_ left
09:31
belluzj left
|
|||
| melezhik. | o/ | 09:37 | |
|
11:41
wayland76 joined
11:42
wayland left
12:24
abraxxa left
13:08
librasteve_ joined
|
|||
| simon_sibl | Voldenet or anyone really, there is some kind of bug hiding that makes the download freeze and doesn’t progress but the event loop is still running fine, and I really can’t figure out why or where it happens | 13:12 | |
| timo | have you worked with `gdb` before? | 13:15 | |
| oh, liz made a cool module that's included in rakudo called "own-up" that lets you send SIGINT to the process and it makes all threads print their current backtrace. all you need to do is put `-Mown-up` in the commandline or `use own-up;` in one of your sources | 13:17 | ||
| or you can `VM.own-up` at any point too | |||
| of course that only helps when threads are actually executing at that moment, and not all waiting for tasks to come in on the task queues | 13:18 | ||
|
13:34
guifa_ joined
|
|||
| guifa_ | okay I think I came up with a very cool little pattern for folks making reusable tokens | 13:48 | |
| you can override the match method | |||
| err made | |||
| grammar Foo { method made { ... } } | 13:49 | ||
| normally that'd violate the idea of being able to allow people to give their own actions | |||
| but you can grab a user specified action result via ast | |||
| grammar Foo { method made { with self.ast { #action overridden# } else { #do default action# } } | 13:50 | ||
| patrickb | simon_sibl: Which raku lib? Do you use tls? | 13:54 | |
| guifa_ | oh dangit, it can be simplier, I just forgot that callsame isn't a term but a sub | 13:56 | |
| callsame() // #defaultAction# | |||
| ugexe | wayland76: i think both of the rakuast bugs you somewhat recently opened are fixed on HEAD | 14:12 | |
| timo | any reason you wouldn't make a corresponding FooActions? that could also be a role that can be re-used | ||
| ugexe | i don't know exactly which commits would have resolved them (or even if they truely are fixed), i just feel like they are probably resolved | 14:13 | |
| ah sorry, only one of the issues i was references was yours | |||
| guifa_ | timo: actually I'm thinking it more, probably need a different approach | 14:21 | |
| i dunno why I forgot you can just insert a grammar with <grammarName> lol | |||
| I'm wanting to make it such that a token can be reused AND also can provide its own .made method | 14:22 | ||
| timo | I would get very surprised if a `.made` doesn't behave just like an accessor for what is installed with `make` | 14:39 | |
| guifa_ | it is, but can be overriden if necessary in typical Raku fashion | 14:45 | |
| I think I've found a better method for what i'm trying to accomplish, just now having to test it out | |||
| guifa_ is mad coding getting ready for his talk lol | |||
| timo | how about putting a { make blabla } at the end of your token and if the user wants to override it with their own stuff they can use an action method on their own action class; the work will be duplicated, but it's probably less surprising maybe? and the action class can use the value that the token itself put on the $/ as well just by grabbing the `.made` | 14:48 | |
| guifa_ | my current approach is this: Grammar, Actions, and then a token that recreates the grammar. final line of the token is a { token does override-made } line, where override-made is a simple method that processes and caches the result | 14:53 | |
| that way the action call is only done if requested, and otherwise not called if no one wants it | |||
| the token is just a copy of TOP | |||
|
14:54
belluzj joined
|
|||
| guifa_ | right now my trick is figuring out a way to make the Grammar/Actions extensible in an intuitive way such that the base grammar/actions can provide some special handling | 14:55 | |
|
14:55
belluzj left
|
|||
| guifa_ | (concretely: for a URI grammar/actions class to enable specialized handling for certain schema) | 14:56 | |
| timo | did you think about parameterized roles yet? those can have tokens/rules/regexes in them too, which can be interesting for some use cases | 14:57 | |
| guifa_ | timo: yeah. so the goal is to figure out in the TOP grammar/actions to do something like the following (untested, purely notional) | 14:58 | |
| timo | oh, but don't let me keep you from your Conference Driven Development sprint if i'm not getting you closer to your goal | 14:59 | |
| guifa_ | token TOP { <schema> [ <?{ schema has registered customGrammar }> <custom> | <default> } | 15:00 | |
| and then ditto for the actions | |||
| 100% in the spirit of torturing the implementor to figure out how to do this | |||
| and then of course the goal is that i can have a reusable token that than incorporates both that grammar and action per the .made override | 15:01 | ||
| simon_sibl | patrickb: not a lib, a BitTorrent client I wrote: github.com/4zv4l/rbt really can’t find the bug after few hours of debugging | 15:07 | |
| timo | simon_sibl, did you try the own-up module yet? | 15:11 | |
|
15:53
guifa_ left
15:59
guifa_ joined
16:15
hurufu left
|
|||
| guifa_ | Is there any great way to check if something is a type object versus NQPMu ? | 16:21 | |
| in an implementation agnostic way | |||
| (that is, not relying on NQPMu) | 16:22 | ||
| [Coke] | guifa_: 2026.06 is being released today, FYI. | ||
| (binary releases probably a few days out) | |||
| timo | guifa_: try .DEFINITE | 16:34 | |
| guifa_ | timo: say Int.DEFINITE | ||
| --> False | |||
| timo | yup | 16:35 | |
| and unlike .defined a class can't redefine it for itself | |||
| that's why it's all uppercase, it's like WHAT and such | |||
| guifa_ | yeah -- I guess I should have been more clear | ||
|
16:35
acidsys left
|
|||
| guifa_ | so in grammars, I can access the actions via self.actions | 16:35 | |
| I'm wanting to check if an actions was set (or not). But quite often, actions are stateless / type objects | 16:36 | ||
| timo | ah, you want "was an attribute given any value by the constructor" essentially | ||
| guifa_ | yeah. It would be easier for Nil, but Rakudo uses NQPMu | 16:37 | |
| best I can come up with is `$foo ~~ Any && $foo !=:= Nil` | |||
| timo | Nil is slippery, as it resets containers to their default value if assigned into them | 16:41 | |
| so handing it around is not a great user or developer experience | |||
| this comes down to "what is a valid action class?", and since every regex/rule first checks if the method of the same name exists in the action class (or instance), it's totally fine to put "1" as your actions | 16:43 | ||
| guifa_ | yup | ||
| I would love if down the road we had a new key word | 16:44 | ||
| simply | |||
| actions { ... } | |||
| and a method defined as action foo { ... } would autoset $/ | |||
|
16:56
acidsys joined
|
|||
| librasteve | guifa++ that’s a cool idea … definitely worth a problem solving issue (even better just implement it ;-)) | 17:13 | |
|
17:16
eseyman left
|
|||
| timo | i feel like we've had that suggestion before. it would probably work well together with "naming your token/regex/rule something that is present as a method in almost all classes gives surprising results" as well | 17:16 | |
|
17:18
manu_ joined
17:19
manu_ is now known as eseyman
|
|||
| librasteve | I, for one, like the idea that Nil represents the absence of a meaningful result. Sure it is unusual, not just another way to spell null | 17:19 | |
| guifa_ | librasteve: would be interesting if we could have an action inside of a grammar. Occasionally I have some grammars where the reusability of an actions class isn't actually relevant, but being able to place the action right next to the token could improve maintainability | ||
| librasteve | yeah, I was thinking would be nice to infer that grammar Invoice {…} actions Invoice {…} Invoice.parse: $txt; are coupled too | 17:22 | |
| but then I think Larry is a genius | |||
|
17:32
librasteve_ left
17:34
human-blip left
17:36
human-blip joined
17:38
abraxxa joined
17:43
abraxxa left
|
|||
| guifa_ | I swear we had a trait for it | 17:54 | |
| is there a way to prevent a subclass from implementing a given method from its parent? | 17:55 | ||
| timo | at the very least you can have your own metaclass that does that ... maybe a COMPOSE phaser can do something? also, putting ^blabla methods in a class is a thing you can do | 18:00 | |
|
18:16
ShimmerFairy left
18:18
ShimmerFairy joined
18:35
guifa_ left
18:36
librasteve_ joined,
guifa_ joined
18:41
guifa_ left
18:46
ShimmerFairy left
18:51
ShimmerFairy joined
19:07
MasterDuke joined
19:18
_________ left
19:20
Sgeo joined
19:25
_________ joined
19:36
guifa_ joined
|
|||
| timo | gist.github.com/timo/20b8e7f029b21...1be3bdce7f working on new commands for GDB when debugging a moarvm / rakudo process | 20:18 | |
|
20:43
rmv joined
20:44
itaipu left
20:50
itaipu joined
21:06
guifa_ left
21:12
guifa_ joined
21:22
wayland joined
21:24
wayland76 left
21:25
MasterDuke left
|
|||
| aruniecrisps | here is my budget migration tool in Raku: gist.github.com/arunvickram/4bb7cc...e0b5fd4128 | 21:34 | |
| @wayland76 here it is, i think you expressed interest in it | 21:35 | ||
|
21:52
guifa_ left
21:55
Guest63 joined
21:56
Guest63 left
21:57
guifa_ joined
22:11
rmv left
22:13
librasteve_ left
22:17
rmv joined,
rmv left,
rmv joined
|
|||
| Voldenet | simon_sibl: I would consider adding more debug logging - e.g. `whenever Supply.interval(5) { %peers.log }` or something similar | 22:57 | |
| it could help you see if it's concurrency problem (log should write things every 5 seconds more or less, if it slows down then it could be cpu speed issue after all) | |||
| if it's not, it would simply write some dump to inspect the state | 22:58 | ||
| keep in mind that torrent peers can blacklist you making you unable to download, also ipv6 exists – best thing to test torrent client would be to set up your own tracker in local network I think | 23:16 | ||
| it's not real-life test, but it could be good enough with some VMs with traffic shaping | 23:17 | ||
|
23:47
guifa_ left
23:51
guifa_ joined
|
|||