|
🦋 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. |
|||
|
01:13
topnep joined
01:42
sibl joined
01:55
sibl left,
sibl joined
01:58
sibl left,
sibl joined
02:01
sibl left,
sibl joined
02:02
sibl left,
sibl joined
02:21
hulk joined,
kylese left
02:49
Pixi` is now known as Pixi
03:15
hulk left,
kylese joined
03:36
sibl left
03:37
sibl joined
03:41
sibl left
03:43
sibl joined
04:37
lichtkind_ joined
04:40
lichtkind left
05:23
Aedil joined
05:24
topnep left
05:25
topnep joined
05:31
Voldenet_ joined,
Voldenet left
05:32
Voldenet_ is now known as Voldenet,
atcroft joined
06:14
constxd left
06:17
constxd joined
06:38
arky left
06:40
Aedil left
06:41
wayland joined
06:47
wayland left
06:49
wayland joined
06:51
arky joined
06:53
wayland left
06:55
wayland joined,
arky left
06:57
masayoshi joined
06:58
wayland left
07:06
masayoshi left
07:08
wayland joined,
masayoshi joined
07:09
wayland left
07:13
wayland joined
07:16
Sgeo left
07:21
abraxxa joined
07:26
arky joined,
abraxxa left
07:28
abraxxa joined
07:30
arky left
07:47
arky joined
07:49
masayoshi left
07:51
arky left
08:06
arky joined
08:12
arky left
08:20
arky joined
08:24
arky left
08:36
arky joined
08:41
arky left
08:45
Aedil joined
08:55
arky joined
09:00
arky left
09:20
arky joined
09:24
sibl left
09:25
arky left,
sibl joined
09:36
topnep left
09:38
arky joined
09:40
topnep joined
09:43
arky left
09:44
sibl left
09:55
arky joined
09:59
arky left
10:12
arky joined
10:17
arky left
10:20
lizmat left
10:21
lizmat joined
10:22
077AAA8Q2 left
10:23
disbot1 joined
10:37
arky joined
10:42
arky left
10:56
abraxxa left
10:58
sibl joined
11:10
kaskal joined,
arky joined
11:15
arky left
11:28
arky joined
11:33
arky left
11:44
topnep left
11:45
topnep joined
11:52
xinming left
12:03
arky joined
12:07
arky left
12:23
andinus left
12:24
sibl left,
arky joined
12:26
andinus joined
12:29
arky left
12:40
arky joined
12:45
arky left
|
|||
| librasteve | [Coke] holy smoke that’s fast! | 12:51 | |
| definitely need that in App::Crag | 12:53 | ||
| btw FatRatStr would let you express this as a Num literal something like 1e25 + 1 | 12:54 | ||
|
12:56
arky joined
13:01
arky left,
sibl joined
13:05
xinming joined
13:14
arky joined
13:18
arky left
|
|||
| antononcube | @librasteve "Math::NumberTheory:ver<0.1.0>" supports different number expansions, Zeckendorf included. Here is a CLI call: number-theory number expansion 100001 zeckendorf | 13:20 | |
| BTW, the implementation in "Math::Zeckendorf" in ≈ 15% faster than the implementation in "Math::NumberTheory". (The latter does not have the ":numbers" functionality.) | 13:23 | ||
| Also, "Math::NumberTheory" does not have the dual Zeckendorf representation. On the other hand, "Math::NumberTheory" does have reconstruction from Zeckendorf representation. E.g. from-number-expansion(@bits, 'zeckendorf') . | 13:25 | ||
|
13:38
arky joined
13:45
arky left
13:48
topnep left
13:50
topnep joined
14:03
arky joined
|
|||
| librasteve | well Math::NumberTheory is already in App::Crag ... need to tweak a bit to get it to work | 14:06 | |
|
14:08
arky left
14:26
arky joined
14:29
sibl left
15:30
topnep left
15:33
guestll joined
|
|||
| [Coke] | raku.land/?q=FatRatStr ... "blah blah blah" ? | 15:35 | |
|
15:37
jgaz joined
|
|||
| [Coke] | opened a ticket. | 15:37 | |
| can I go from a FatRatStr to an Int? | 15:41 | ||
| (otherwise I can't drop it in to an example without changing my lib to accept fats) | |||
| m: dd <300/12>.nude | 15:44 | ||
| camelia | (25, 1) | ||
| [Coke] | m: dd (<300/12>.nude).WHAT | ||
| camelia | List | ||
|
16:47
human_blip left
16:49
human_blip joined,
guestll left
17:23
topnep joined
17:35
arky left
|
|||
| librasteve | ticket resolved | 17:36 | |
| say '1.6605402e27'.FatRatStr.FatRat.Int; | 17:38 | ||
| lizmat | m: say '1.6605402e27'.FatRatStr.FatRat.Int; | 17:40 | |
| camelia | No such method 'FatRatStr' for string '1.6605402e27'. Did you mean 'FatRat'? in block <unit> at <tmp> line 1 |
||
| lizmat | m: say '1.6605402e27'.FatRat.Int; | ||
| camelia | 1660540199999999878203703296 | ||
| librasteve | Its the normal FatRat to (big) Int coercion | ||
| 1660540200000000000000000000 | 17:41 | ||
| lizmat | m: dd '1.6605402e27'.FatRat; | ||
| camelia | FatRat.new(1660540199999999878203703296, 1) | ||
| librasteve | (the point of FatRatStr is to use the Num literal syntax, but to avoid Num (float64) clipping | ||
| ) | |||
| lizmat | looks like it's the coercion to FatRat ? | ||
| librasteve | well - yes - once you have a Num it will clip | 17:42 | |
| lizmat | m: dd '1.6605402e27'.Numeric; | 17:43 | |
| camelia | 1.6605402e+27 | ||
| lizmat | m: dd '1.6605402e27'.Numeric.^name; | ||
| camelia | "Num" | ||
| lizmat | right | ||
| librasteve | 1e27 needs about 90 bits of binary - but Num only has 53 bits of precision | 17:44 | |
| [Coke] | Should there be an .Int directly on fatratstr? I don't normally deal with Fats. | ||
| lizmat | understood... so what we lack is a straight Str -> FatRat conversion | ||
| [Coke] | raku -MFatRatStr -e 'say <1.6605402e-27>.FatRatStr.FatRat.Int;' # 0 | 17:45 | |
| librasteve | we have a (Fat)Rat string literal <2/3> for example, this is to repurpose the Num literal | ||
| yes, Int will truncate anything <1 to 0 | |||
|
17:46
arky joined
|
|||
| [Coke] - maybe we should have FatRatStr.Int directly ... let me see what other Allomorphs do | 17:46 | ||
| [Coke] | oops, I changed my sample fatrat without realizing. | 17:47 | |
| lizmat | meh... we don't have an allomorph for FatRats | 17:48 | |
| [Coke] | oops, I changed my sample fatrat without realizing. <1e1000>.FatRatStr.FatRat.Int; works, thanks. :) | ||
| librasteve | guess there's a case to make FatRatStr be the default Allomorph when the default Rat is set to FatRat | 17:49 | |
| [Coke] | that would elminiate the explicit .FatRatStr in that chain, yes? | 17:51 | |
| librasteve | yeah, to match the built in Allomorph behaviour, ideally there would be direct coercion .Int, .Num, .Complex | 17:52 | |
| [Coke] | *eliminate | ||
| lizmat | the problem with Str.FatRat atm is that it does Str.Numeric.FatRat | 17:54 | |
| librasteve | OK - you should have .Int in v0.0.7 | 17:55 | |
| lizmat: imo this Str.Numeric.FatRat is the correct pattern if you present a Num literal - since the Num clipping is standard P754 | 17:56 | ||
|
17:56
wayland76 joined
17:57
wayland left
|
|||
| by Num literal of course I mean a Str with an 'e' | 17:57 | ||
| since this is the value that coders most expect | |||
| FatRatStr is a "cheat" to repurpose the Num literal and yet to bypass the Num implementation | 17:58 | ||
| [Coke] | is there a way to get the form back out of a number? | 18:30 | |
| e.g. $a = <1e100>.FatRatStr.Int; say $a ...; #out 1e100 | |||
|
18:40
Guest47 joined
|
|||
| Guest47 | ```raku | 18:41 | |
| say 'hello' | |||
| ``` | |||
| evalable6 | hello | ||
| Guest47 | ```raku | ||
| say VERSION | |||
| ``` | |||
| lizmat | say $*RAKU.version | 18:42 | |
|
18:42
Guest47 left
|
|||
| evalable6 | v6.d | 18:42 | |
|
18:42
Guest47 joined,
Guest47 left
|
|||
| librasteve | [Coke] the code for that is here github.com/librasteve/raku-Physics...kumod#L158 … please make an Issue in FatRatStr and I’ll try and migrate into FatRatStr | 18:49 | |
| atm this is a feature of the value of a Physics::Measure value and is triggered by the Str method on that class | 18:51 | ||
|
18:58
arky left
19:11
arky joined
19:16
arky left
19:27
arky joined
20:01
Sgeo joined
20:16
Aedil left
20:37
arky left
20:41
arky joined
21:19
masayoshi joined
21:32
topnep left,
topnep joined
23:12
librasteve_ left
|
|||