🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel! Set by lizmat on 6 September 2022. |
|||
00:04
jpn joined
00:09
jpn left
00:13
ToddAndMargo joined
|
|||
aruniecrisps | quick update on Moneys I added today: I changed the underlying amount type to FatRat so as to not lose any precision whatsoever | 00:42 | |
01:23
teatime joined
|
|||
[Coke] | github.com/coke/raku-cal/blob/mast...6.json#L23 did not make app::cal show up when searching for calendar | 01:47 | |
02:18
hulk joined
02:20
kylese left
02:31
epony left
03:15
hulk left,
kylese joined
05:10
jpn joined
05:14
jpn left
05:34
ToddAndMargo left
06:05
dead1 left
07:29
epony joined
07:47
kylese left
07:52
kylese joined
07:54
dead1 joined
08:39
Sgeo left
09:10
epony left
09:11
epony joined
09:15
rantanplan left,
snonux joined
09:24
sena_kun joined
09:35
El_Che left
09:36
El_Che joined
09:38
jpn joined
09:52
sena_kun left
|
|||
librasteve | arun: interesting selection of FatRat for Money ... that's OK in that it will work in raku-land, but I wonder if that is enough - in the main you will want to interact with decimal storage in (eg.) accounting database systems www.ibm.com/docs/en/informix-serve...-data-type ... soo perhaps it would be better to go something like | 11:41 | |
subset Decimal of Rat where *.denominator == (1,2,5,10).any | 11:42 | ||
and then | 11:44 | ||
subset Money of Decimal where *.places == 2 | |||
btw this is just speculation, I think that FatRat is a good choice for now | 11:46 | ||
(would also need a dedicated Money type to do some kind of bankers rounding) | 11:49 | ||
11:50
mark22k5 joined,
DarthGandalf left
11:51
DarthGandalf joined
11:52
mark22k left,
bartolin left,
mark22k5 is now known as mark22k
11:53
bartolin joined
|
|||
lizmat | librasteve or you could use Rats and make sure they upgrade to FatRats when they run out of precision | 12:42 | |
librasteve | I think what I am saying (I am not an expert in FIN) that the expectation of the data type Money in the wide world is that it is a fixed place decimal (with limited range) and that maybe, depending on the use cases the raku Money type should meet this expectation and have well defined "bankers" rounding. That's because a math operation on a FatRat may result in a different result than the same operation on a fixed point decimal since | 13:10 | |
the decimal rounding will be less precise and less accurate. -- This is not a critique or request that Arun change their mind ... just me waffling on. | |||
lizmat | I guess then we would need an Int type that actually contains the value * 100 ? | 13:15 | |
14:21
merp left
14:22
epony left
14:56
perlbot left,
simcop2387 left
15:01
simcop2387 joined
15:03
perlbot joined
|
|||
El_Che | lizmat: I think that non-strict constructors are an error. Probably a left-over from the Perl hash-workaround days | 15:11 | |
of course, changing default behaviour is breaking | 15:12 | ||
15:25
Sgeo joined
|
|||
antononcube | @Coke I think you should put more tags to "App::Cal". For some reason the tag "calendar" is not included in raku.land page tags. | 15:34 | |
librasteve | I am in class Physics::Unit::Definitions::en_SI {} but when I go ::?CLASS I get en_SI | 15:35 | |
how can I introspect the FQN? ie Physics::Unit::Definitions::en_SI?? please | |||
15:57
vlad joined
16:22
jpn left
16:24
jpn joined
|
|||
tbrowder__ | maybe Raku should have a fixed decimal type | 16:25 | |
[Coke] | antononcube - don't want to randomly add tags. Need a list of tags that are respected or ignored. | 16:32 | |
[Coke] thinks to open a bug report on raku.land | 16:35 | ||
[Coke] opens gitlab.com/raku-land/raku-land/-/issues/58 | 16:41 | ||
.seen jraspass | |||
tellable6 | [Coke], I saw jraspass 2023-10-05T20:31:25Z in #raku-dev: <JRaspass> [Coke]: I've whipped up a small change to show the distribution of licenses on raku.land - raku.land/stats | ||
17:04
epony joined
|
|||
SmokeMachine | antononcube: did you have chance to take a look at that example? | 17:21 | |
17:31
sena_kun joined
|
|||
antononcube | @SmokeMachine Yes, I looked at code. Still thinking about what and why... | 17:57 | |
librasteve | errr, I found it say self.^name; | 17:59 | |
18:00
vlad left
|
|||
SmokeMachine | antononcube: Configuration does not make sense in your opinion? I’ve made that thinking at something like a service, or something like that that would have many different parameters to configure itself and could reconfigure itself when the file changes… my first project using it is my “cron” (github.com/FCO/RakuCron) where the rules for where to run what uses Configuration | 18:14 | |
librasteve | hi SmokeMachine - I had a look at Configuration yesterday and I am still trying to grok what it does and how it can help me ... my second impression is that this is a great way to handle configuration that may change dynamically (eg to restart a web server on a new port) and to push that around with a Supply - this makes me a bit in awe of what you can do with raku (a bit like comparing Cro to Rails) and also worried about how my | 18:19 | |
application architecture would need to be deeply async to use this (and I do not really have any good examples of when I would use this .... maybe to feed a table of live exchange rates to the Moneys module??) | |||
my third impression is that this is not really what I need in the main since the 99% majority of my config is static over time, and while I can see that I need somehow to couple a rakumod file and a handful of yaml files to load and then expose the config to the mechanical parts of my code ... the example I have in mind right now is Physics::Unit which is a 1192 lines files with 446 lines of config (each line of which makes a Unit | 18:25 | ||
object when loaded) ... so my focus at the moment is how to externalise and incrementally bring in config in groups that honours the dependencies (since each unit is defined in terms of other units up the tree) ... so my default option right now is to package Unit groups as separate raku modules under zef dependency management (to handle the deps and versioning and to allow others to add their own definitions) | |||
photos.app.goo.gl/Bhtv2skVmDBZPsfV7 | 18:31 | ||
^^ that's a screen grab from my Comma right now | |||
my first impression is that I don't really know what is going on ... so as Anton says, I think bringning some simple use case examples to the README and maybe reducing the length of the first page intro doc by 70% would be easier (I prefer human to AI) | 18:33 | ||
SmokeMachine | librasteve: it also has functions to just return the configuration. And the application doesn’t really need to be that asynchronous… it can ignore the supply and just get the current configuration. It can also only react to specific values on the configuration. I got the idea for writing it when I saw some examples of applications configured on the same language it was written on (for example emacs, xmonad, stumpwm, etc…) | 18:35 | |
librasteve | please do not take this as a negative ... I think I am slowly cottoning on ... could you maybe steer me as whether Configure would be a better option to handle config in dependent groups? | 18:38 | |
SmokeMachine | What do you mean by dependent groups? | 18:40 | |
librasteve | take a look here github.com/librasteve/raku-Physics...it.rakumod | 18:42 | |
(please) | |||
line 762 defines 'Angle' => ['radian',], | |||
line 766 defines ['sr', 'steradian'], 'radian^2', | 18:43 | ||
762 is in the group BaseUnit | |||
766 is in the group DerivedUnit | |||
this is what I mean (its a slightly contrived example since I would probably load all the SI stuff together) | 18:45 | ||
SmokeMachine | librasteve: in that case, I don’t see that as configuration, but as something like constants… I’m currently on my phone… I’ll try to see if Configuration could help that somehow and write that for you when I’m back home ands with my computer | 18:52 | |
librasteve | yeah sure - this unit stuff is quite a special use case ... and something zef install Physics::Unit::Avoirdupois<auth:FCO> is not yet within grasp!!! | 18:54 | |
en.wikipedia.org/wiki/Avoirdupois | 18:55 | ||
anyway my wip code is here github.com/librasteve/raku-Physics...e/version2 | 18:56 | ||
if you want to poke around | |||
19:00
jpn left
19:28
swaggboi joined
19:39
jpn joined
19:43
jpn left
|
|||
tbrowder__ | .ask ugexe any simple way to get all the installed modules upgraded by, say, 'auth<zef:tbrowder>'? | 19:48 | |
tellable6 | tbrowder__, I'll pass your message to ugexe | ||
tbrowder__ | maybe a shell go | 19:58 | |
one liner | |||
20:29
jpn joined
20:34
jpn left
|
|||
[Coke] | does it need to be portable or is bash OK? | 20:48 | |
corwin | [Coke]: are you in channel via IRC bridge or directly on IRC? | 20:49 | |
jdv | what is irc bridge? | 20:50 | |
corwin | s/IRC bridge/IRC <-> discord bridge/; # my IRC bias shows here, obvs | ||
[Coke] | if I was in the bridge, You'd see discord-raku-bot | 20:51 | |
tbrowder__: something like zef list --installed | grep ':auth<zef:japhb>' | |||
except the auth you want. | |||
corwin | IIUC, discord-raku-bot creates a bridge between this channel on IRC (where I am joined) and this channel on a discord server I'm probably joined to if I could find the guild in my list. | ||
[Coke]: I'm testing out a plugin that hides that from me, so I might not if that's working.. | |||
tbrowder__ | [Coke]: thnx! | 20:52 | |
ugexe | that won't quite work, because it is going to list the current versions | 20:54 | |
tellable6 | 2024-02-09T19:48:58Z #raku <tbrowder__> ugexe any simple way to get all the installed modules upgraded by, say, 'auth<zef:tbrowder>'? | ||
ugexe | zef install --debug $(raku -e 'my $auth = "github:ugexe"; .say for $*REPO.repo-chain.map({ $_.?installed.Slip }).grep(*.so).grep({.meta<auth> eq $auth}).map({ "{.meta<name>}:auth<{.meta<auth>}>" })') | 20:55 | |
well, assuming that you're asking to attempt to upgrade all modules with :auth<zef:tbrowder> | 20:56 | ||
`zef install $(zef list --installed | grep ':auth<zef:tbrowder>')` wouldn't quite work because each line will contain the :ver<...> part, which prevents the install from trying to get a newer version | 20:57 | ||
20:58
epony left
|
|||
corwin0365 | Oh, discord works and I even found the raku guild, and maybe even the right channel here! | 21:17 | |
corwin | it works, this plugin: bru.st/i/emacs_ujoFOUvk1n.png | 21:18 | |
jdv | a plugin shoulnt be needed in the first place | 21:22 | |
corwin | I'm not sure I understand. Does your IRC client hide the existence of the bridge bot according to it's defaults, somehow? | 21:23 | |
jdv | it does not. the bridge nick should be shorter. | 21:24 | |
corwin | I think that might a different problem, preference. | ||
21:25
sena_kun left,
sena_kun joined
21:43
jpn joined
21:51
epony joined
|
|||
librasteve | if you can work out the discord <-> irc picture, then raku may be the language for you | 21:53 | |
tbrowder__ | um, no, just mine, but that’s ok | 22:28 | |
23:13
jpn left
23:20
samebchase2 joined,
atweedie left,
snonux left,
patrickb left,
clarkema_ left
23:21
patrickb joined,
samebchase2 is now known as samebchase,
atweedie joined
23:22
clarkema_ joined
23:23
snonux joined
23:38
snonux left
23:54
snonux joined,
jpn joined
23:59
jpn left
|