🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku Set by ChanServ on 14 October 2019. |
|||
00:08
xelxebar left
00:09
xelxebar joined
01:04
wamba left
01:34
molaf left
01:37
randyl22 joined
01:38
yangzq50 left
|
|||
randyl22 | hi all. Ruby has a "delete_if" method on an array, that deletes all elements for which a block evaluates to true. | 01:39 | |
is there a way to do something similar in Raku? | |||
My first thought is to grep for the inverse of the block and reassign to the array. | 01:40 | ||
Grinnz | i dont know about in raku, but there is a port of the perl way i'd suggest modules.raku.org/dist/List::UtilsB...ock--array | ||
randyl22 | I didn't know about that port. Thanks. | 01:41 | |
01:47
molaf joined
01:52
randyl22 left
01:55
squashable6 left,
squashable6 joined
|
|||
Geth | doc: 0fc35e52a8 | Coke++ | lib/Pod/Cache.pm6 Revert "Add exclusive locking" This reverts commit ea98b81ac21517a070b717243d6d2feb4ed668ac. |
01:57 | |
doc: b04494f45d | Coke++ | xt/pws/words.pws Revert "Remove unneeded words" This reverts commit 0ea63db5cc6a688463b2551578701ad7d556a00b. looks like pod-cache was broken when this was tested. :( |
|||
doc: f8a4c476a3 | Coke++ | 2 files More fixups (had a bad pod-cache earlier) |
02:11 | ||
02:24
Cabanossi left
02:26
Maylay left
02:27
Cabanossi joined
02:29
Maylay joined
|
|||
codesections | «My first thought is to grep for the inverse of the block and reassign to the array.» Was there something you don't like about that approach? That's also my first thought | 02:34 | |
m: my @a = ^10; @a = @a.grep({!.is-prime}); say @a | |||
camelia | [0 1 4 6 8 9] | ||
02:52
Maylay left
02:55
Maylay joined
03:03
randyl22 joined
|
|||
randyl22 | codesections: no, nothing wrong with the approach. mostly just curious if I was missing anything. | 03:05 | |
03:09
randyl22 left
03:16
hungrydonkey left
03:17
hungrydonkey joined
03:30
Doc_Holliwould joined
03:51
hungrydonkey left,
hungrydonkey joined
04:05
telex left
04:13
maettu joined
04:18
telex joined
04:25
maettu left
04:31
xelxebar_ joined
04:32
xelxebar_ left,
xelxebar left,
xelxebar_ joined
05:08
skids left
05:41
billN1VUX left
05:50
Doc_Holliwould left
05:52
ufobat_ joined
06:00
Doc_Holliwould joined
06:05
maettu joined
06:13
aluaces joined
06:17
dolmen joined
06:23
ufobat_ is now known as ufobat
06:24
dolmen left
06:26
bocaneri joined
06:35
molaf left
06:51
Doc_Holliwould left
06:54
andrzejku joined
06:58
Sgeo left
07:03
dataangel joined
07:19
wamba joined
07:20
dolmen joined
07:24
sena_kun joined
07:46
pecastro joined
07:59
TimToady joined
08:10
molaf joined
08:18
JJMerelo joined
08:34
Xliff joined
08:46
vrurg left,
vrurg joined
08:52
leont joined
09:01
molaf left
09:08
xelxebar_ left
09:09
xelxebar joined,
cgfbee left
09:19
Doc_Holliwould joined
09:21
cgfbee joined
09:35
wamba left
09:38
wamba joined,
maettu left
09:41
wamba left
09:42
wamba joined
|
|||
lizmat | m: constant &foo = &say; foo "Hello World"; # rypervenche is that what you mean? | 09:49 | |
camelia | Hello World | ||
09:49
sftp left
09:50
sftp joined
|
|||
JJMerelo | Have you answered already this year's Raku user survey? docs.google.com/forms/d/e/1FAIpQLS...Q/viewform Won't take more than 5 minutes, promised. | 09:51 | |
tellable6 | 2020-08-25T11:11:38Z #raku <tbrowder> jjmerelo: still no joy on doc change :-( | ||
2020-08-26T15:51:16Z #raku <tbrowder> jjmerelo i still can't see any update to the docs from 2+ weeks ago | |||
JJMerelo | .tell tbrowder my new laptop crashed yesterday, I'm using now my old laptop... But I made a deployment just yesterday. Can you please check? | 09:52 | |
tellable6 | JJMerelo, I'll pass your message to tbrowder | ||
JJMerelo | .tell tbrowder I'll check specifically your changes, and see if something is wrong there... | ||
tellable6 | JJMerelo, I'll pass your message to tbrowder | ||
09:55
Altai-man joined
|
|||
JJMerelo | .tell tbrowder Yep, it's there now. docs.raku.org/type/Signature#Type_constraints Sorry about the delay. | 09:55 | |
tellable6 | JJMerelo, I'll pass your message to tbrowder | ||
09:57
sena_kun left
10:04
Doc_Holliwould left,
Doc_Holliwould joined
10:07
rindolf joined
|
|||
tbrowder | i see it, JJMerelo, good job! | 10:18 | |
tellable6 | 2020-08-27T09:52:02Z #raku <JJMerelo> tbrowder my new laptop crashed yesterday, I'm using now my old laptop... But I made a deployment just yesterday. Can you please check? | ||
2020-08-27T09:52:36Z #raku <JJMerelo> tbrowder I'll check specifically your changes, and see if something is wrong there... | |||
2020-08-27T09:55:14Z #raku <JJMerelo> tbrowder Yep, it's there now. docs.raku.org/type/Signature#Type_constraints Sorry about the delay. | |||
10:25
andrzejku left
|
|||
JJMerelo | Thanks, tbrowder. Sorry for the delay. | 10:42 | |
tbrowder | no prob, thnx. what happened to laptop. hardware failure? | 10:44 | |
JJMerelo | tbrowder I think it's related to an upgrade of the Linux kernel clashing with UEFI. But really no idea until I take it to the shop. | 10:51 | |
tbrowder | erg | ||
JJMerelo | ^I think^the good technician from my trusted shop told me^ | ||
tbrowder | what os | ||
JJMerelo | It's simply stuck at boot, I can't even bring up the boot menu or the system boot | 10:52 | |
Ubuntu 20.04 | |||
tbrowder | bummer, go debian! | ||
JJMerelo | :-) I should do that. You mean "stable", right? | ||
tbrowder | yes | 10:55 | |
i lovee | 10:56 | ||
love the mate desktop | |||
JJMerelo | I generally use Gnome shell | ||
But I guess that's available there too. | |||
tbrowder | i think mate is based on the older gnome before the millenials caught the mac craze | 10:57 | |
JJMerelo | :-) | 10:58 | |
I've rarely used Debian... I started with Slackware, then Redhat, then Fedora, switched to Ubuntu when Fedora mangled the RAID devices I used. | 10:59 | ||
But Ubuntu 18.04 already eliminated Perl for Python... So maybe I should go to Debian. | 11:00 | ||
11:04
JJMerelo left
|
|||
abraxxa uses Ubuntu with i3 | 11:07 | ||
11:11
Doc_Holliwould left
11:15
aluaces left
11:43
aluaces joined
11:44
dolmen left
11:46
xinming left
11:56
xinming joined
|
|||
codesections | abraxxa: have you tried sway/what are your thoughts on it? If I used i3, I'd be really tempted to make the jump to wayland | 12:02 | |
12:04
maettu joined
|
|||
abraxxa | codesections: yes, works but the HiDPI scaling works less good than X11 with Xft.dpi set correctly | 12:08 | |
codesections | Fair enough. I bet they'll get there. And the main dev seems like a good guy | 12:09 | |
abraxxa | main pain point for me is that the indicator icons aren't clickable | ||
codesections | personally, I'm still waiting for a static WM on wayland before I switch | ||
(because I'm weird like that :D) | 12:10 | ||
abraxxa | static WM? | ||
codesections | Yeah – one that doesn't dynamically resize windows. I think ratpoison was the first, I currently use StumpWM | 12:11 | |
abraxxa | don't know those | 12:12 | |
i3 and sway doesn't do that as well until you tell it to do so | |||
codesections | I previously used bspwm, which can be static or dynamic | ||
StumpWM is a lot of fun (if you're into that sort of thing) since it runs as a common lisp interpreter and is configurable in all the Emacs-like ways you might expect from that. Not as lightweight as some but, like I said, fun if you're weird in the specific ways I am | 12:15 | ||
rypervenche | lizmat: Oh! That worked! So much simpler than I thought. Is there a way to do something similar with a method as well? | 12:45 | |
abraxxa | codesections: team vim here and I don't customize that neither | ||
lizmat | rypervenche: get the Method object you want, then .^add_method it with the new name | 12:46 | |
.^add_method($name, $method) I seem to recall | 12:47 | ||
afk for a few hours& | |||
codesections | abraxxa: I can respect that – I used vim (and then neovim) for quite a while and now use emacs with vim bindings | ||
abraxxa | most of the time I use Atom anyways because I don't like menu-less editors because I can't remember 4k keyboard combinations | 12:49 | |
codesections | Are you worried about Atom now that it's Microsoft's second electron-based text editor? | 12:50 | |
I don't have a personal interest, since I don't use either, but as an outsider it sure looks like they're prioritizing VSCode over Atom | 12:51 | ||
abraxxa | i tried VScode and don't know why people like it more than Atom | 12:52 | |
moritz | .oO( because it's not nuclear! ) </troll> |
12:53 | |
codesections | Yeah, I don't really get it either (again, without much experience with either, though I've tried both out for a bit). They sure *do* seem to prefer VScode, though: triplebyte.com/blog/editor-report-...tudio-code | 12:56 | |
13:10
gnufr33dom joined
13:17
squashable6 left
13:19
squashable6 joined
13:22
MasterDuke joined
13:23
hungrydonkey left
13:43
hungrydonkey joined
13:55
sena_kun joined
13:57
Altai-man left
14:06
maettu left,
Doc_Holliwould joined
14:15
wildtrees joined
14:16
wildtrees left
14:17
wildtrees joined
14:19
TheAthlete joined
14:21
maettu joined
14:25
maettu left
14:32
zacts joined
14:36
cpan-raku left
14:38
cpan-raku joined,
cpan-raku left,
cpan-raku joined
14:41
eseyman joined
14:42
Doc_Holliwould left
14:50
colomon_ joined
|
|||
colomon_ | hi all! just realized I have wandered myself into an awkward corner and wondered if anyone had a clever solution. | 14:53 | |
I’m porting one of my C++ code generators from Perl to Raku. | |||
I was all excited that qq:to eliminates indentation as that will make my embedded C++ code look much better in the context of the Raku code. | 14:54 | ||
BUT I’ve just realized that { is now a special character in a qq string, right? | |||
escaping that everywhere will obviously uglify my embedded C++ code. | 14:55 | ||
is there a sane way to specify a string which handles variable interpolation but not { interpolation? | 14:56 | ||
jdv79 | wouldn't that be something about how Q is used? | ||
no idea though | 14:57 | ||
colomon_ | huh, maybe? never heard of Q before, but I’m looking now. | 14:58 | |
tobs | colomon_: there is a very sane way docs.raku.org/language/quoting#Lit...strings:_Q | ||
you can specify which interpolations to activate and which not and `{ … }` and `$var` are different types. | 14:59 | ||
colomon_ | jdv79++ tobs++ # currently reading | ||
this seems perfect at first glance | |||
15:01
gnufr33dom left
15:02
Doc_Holliwould joined
|
|||
colomon_ | Seems like what I want is Q:s:a:h:b:to/END/ | 15:05 | |
bit verbose, but it works | 15:07 | ||
moritz | now make poetry with that :-) | ||
colomon_ | going to have to bind it to a keystroke or something. | 15:11 | |
15:12
skids joined
|
|||
Geth | ¦ problem-solving: fecundf assigned to jnthn Issue Map parameterized vs as Hash parameterized github.com/Raku/problem-solving/issues/223 | 15:17 | |
15:17
guifa joined
|
|||
guifa | I feel like I’ve asked this before, but is there any way for a trait to have effect on the interior of method/sub block? | 15:18 | |
something like | |||
sub foo is bar { #`[implied ‘use Bar’] … } | 15:19 | ||
moritz | not directly, I think | 15:20 | |
tobs | colomon_: that is almost qq. I'd expect you can use instead qq and forbid the two you don't want: | 15:21 | |
colomon_ | what’s the forbidding sequence? | ||
notation | |||
tobs | m: my $x = $*USER; say qq:!c:!f[Hello $x, today is { Date.today }.] | 15:22 | |
camelia | Hello evalbot, today is { Date.today }. | ||
colomon_ | tobs++ | ||
guifa | moritz: reason I ask is the new Test::Inline module I made based on codesections++ desire to bring testing inside of module files (for accessing private stuff) | 15:23 | |
github.com/alabamenhu/TestInline | |||
It feels clunky specifying “use Test” for most of the test subs. | 15:24 | ||
Actually… could a custom declarator work and import the symbols in from the main Test module? so instead of having to do “sub foo is test”, I could just have “test { … }” ? | 15:26 | ||
moritz | I'm not deep enough into the guts to be able to answer that question :-( | 15:27 | |
15:29
billN1VUX joined,
Sgeo joined
|
|||
guifa | Meh, probably having people say “use Test” isn’t a big deal. Most test subs will probably have more than the line or two that I use in my test files ha. | 15:37 | |
oh, also | |||
weekly: github.com/alabamenhu/TestInline | |||
notable6 | guifa, Noted! (weekly) | ||
16:02
hungrydonkey left
16:04
ufobat left
16:09
MasterDuke left
16:17
eery joined
16:19
skids left
16:28
abraxxa left
16:42
orinthe left
16:43
orinthe joined
|
|||
billN1VUX | does Raku have something beyond FatRat that extends deep precision to sqrt, exp, e, pi, which are intrinsically irrational ? | 16:46 | |
p6: exp(π*sqrt(163)) - (640320**3 + 744) | |||
camelia | WARNINGS for <tmp>: Useless use of "-" in expression "exp(π*sqrt(163)) - (640320**3 + 744)" in sink context (line 1) |
||
billN1VUX | p6: say exp(π*sqrt(163)) - (640320**3 + 744) | ||
camelia | -480 | ||
16:47
zacts left
|
|||
billN1VUX | The above expression is a famous false near-integer equality, but with limited precision, Raku is off by either 480 or 1024 (using e**() instead of exp()) rather than the expected 7e-12 . For most purposes this small a % error is fine but ... this near-integer can't be done with FatRat since sqrt and exp will promote to Num. | 16:50 | |
16:50
Doc_Holliwould left
16:53
squashable6 left,
squashable6 joined
16:54
TheAthlete left
16:57
Doc_Holliwould joined
17:02
vrurg_ joined
17:04
vrurg left
17:14
dolmen joined
17:18
thundergnat joined
|
|||
thundergnat | billN1VUX: rosettacode.org/wiki/Ramanujan%27s...stant#Raku may be useful. (or not, who knows?) | 17:19 | |
17:26
dolmen left
|
|||
billN1VUX | thundergnat - thank you, that's headed in the same direction at least | 17:27 | |
Hmm, Rat::Precise is half way and the RosettaCode example does the other bits needed, nice. Thanks! | 17:33 | ||
(The bonus continued fraction version is delightful, works with standard FatRat, but both slow and needing to look up or separately calculate the continued fraction versions of expressions :-D ) | |||
thundergnat | Yeah, Rat::Precise is pretty nice, ( though I'm biased, as I wrote it../ :-) ) | 17:34 | |
billN1VUX | :-D | 17:46 | |
17:50
maettu joined
17:54
Altai-man joined
|
|||
tobs | billN1VUX: one afternoon, I toyed around with at least getting radicals of Rats supported exactly via CGAL. Having an exact type for &exp and co. seems harder though. | 17:55 | |
It's a very rough proof of concept but you can take it and adapt it if you want github.com/taboege/raku-Real-Algebraic | 17:56 | ||
billN1VUX | right, an exact type for irrationals is of course impossible | ||
17:57
sena_kun left
|
|||
billN1VUX | (unless one includes implied infinite via continued fractions or other stream computation via promises or whatever) | 17:58 | |
tobs | it's not impossible, it's just not a numerator/denominator pair | ||
if the number is algebraic, as k-th roots are, you can work with its minimal polynomial instead | 17:59 | ||
billN1VUX | that's fine for algebraic irrationals :-D | ||
tobs | but it only goes so far, and stops short of &exp and &log | ||
billN1VUX | yep | ||
transcendental constants and functions don't play nicely in a world where it's either Exact representation or hardware float Num. | 18:06 | ||
tobs | aha, so to Rakudo the above number is integral as far as it sees: $x - $x.Int == 0e0. On the other end, Mathematica can deduce that it is not an integer. | 18:07 | |
and with that I have no idea how to help. I just did some computational geometry once where algebraics were just enough :) | |||
billN1VUX | thundergnat are you responsible for the continued fraction Raku version of Ramanujan's constant too ? That's an elegant "exact" representation but not going to have nice automatic conversions ;-D | 18:08 | |
Well, a *confirmation* that a generic `bignum` arbitrary precision float isn't here for transcendentals is useful, thank you both | 18:09 | ||
I'm trying to do more of my one-liner tests of concepts in raku, and hitting something it didn't seem to do was startling - you've confirmed i'm reading the doc right, at least :-D. | 18:10 | ||
thundergnat | billN1VUX: No, that was actually written / contributed by SqrtNegInf. He has some high precision routines stashed away in his github repository. Lets see.... Ah! github.com/SqrtNegInf/Rosettacode-...n-routines (Not mine, though I contributed to it) | 18:11 | |
billN1VUX | heh, i like their nick :-D | ||
Good stuff | 18:12 | ||
(I should have thought to check if Ramanujan's Constant or Heegner was a Rosetta Code page ! It's the sort of geek manna that would be there of course :-D ) | 18:14 | ||
18:23
cpan-raku left
18:24
bocaneri left
18:26
kylese joined,
molaf joined
18:40
skids joined
18:49
zacts joined
18:50
maettu left,
maettu joined
|
|||
Geth | doc: 2803bc363e | (Daniel Sockwell)++ | 2 files Add the `add` and `remove` BagHash methods This commit adds method documentation for the `add` and `remove` methods on the `BagHash` class and adds narrative documentation and examples showing their use. It also adds "baghash's" to the spellcheck dictionary to prevent a test failure. |
19:02 | |
doc: 075ff0b018 | (Daniel Sockwell)++ | doc/Type/BagHash.pod6 Address nits from PR review |
|||
linkable6 | Link: docs.raku.org/type/BagHash | ||
doc: 2a52612c7c | (Daniel Sockwell)++ (committed using GitHub Web editor) | 2 files Merge pull request #3587 from codesections-forks/bag-hash Add the `add` and `remove` BagHash methods |
|||
19:02
xelxebar left
19:03
xelxebar joined
19:14
squashable6 left
19:16
squashable6 joined
|
|||
eseyman | does anyone know till what date we can fill out the Raku user survey? | 19:22 | |
19:24
patrickb joined
19:25
zacts left
19:30
molaf left,
kylese left
19:40
maettu left
19:47
Black_Ribbon joined
19:52
thundergnat left
19:54
vrurg_ is now known as vrurg
19:56
Noisytoot joined
|
|||
codesections | eseyman: I don't know, but the survey is _really_ short (if you're worried about not having time to get to it before it closes) | 19:59 | |
rypervenche | lizmat: Hmm, that works, but I'll have to do so for each type, which I don't think will scale well. It also doesn't work for ".new". Might there be a place in the grammar that I could simply add an alternation? I've been looking in the rakudo and NQP source code, but haven't found anything that I can successfully copy and change for my slang. | 20:10 | |
20:12
wildtrees left
20:16
wildtrees joined
|
|||
Geth | doc: codesections++ created pull request #3594: Provide a length hint for aspell |
20:22 | |
20:22
wamba left
20:43
Noisytoot left
20:47
Noisytoot joined
21:31
Doc_Holliwould left
21:34
seanrobert joined
|
|||
lizmat | rypervenche: developing slangs is something that is really at the bleeding edge | 21:51 | |
even more so right now, as probably we will need to have a look at all slang modules before RakuAST is merged | 21:52 | ||
21:54
wildtrees left,
wildtrees joined
21:55
sena_kun joined,
rindolf left
21:57
Altai-man left
21:59
molaf joined
22:24
seanrobert left
22:32
pecastro left
22:50
oneeggeach joined
22:56
Noisytoot left,
Noisytoot joined
23:08
oneeggeach left
23:22
patrickb left
23:27
sena_kun left
23:30
elcaro left,
elcaro joined,
AlexDani` joined,
AlexDaniel left,
dataangel left,
spacebat2 joined
23:51
leont left
23:58
guifa left
|