🦋 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:02
yewscion left
00:04
yewscion joined
|
|||
disbot3 | <romdav55_30502> Hi where to find binaries of rakudo-star 2025.05 for fedora? | 00:17 | |
00:17
vrurg left
|
|||
disbot3 | <romdav55_30502> Raku installs just fine but not zef | 00:17 | |
00:19
vrurg joined
|
|||
Voldenet | have you tried rakubrew? | 00:26 | |
disbot3 | <romdav55_30502> no, let me try it | 00:27 | |
japhb | [Coke]: Wait, how do we allow reuse? I guess I assumed that fez IDs were unique ... | 00:52 | |
timo | i think he means the part after the "namespace"? | 00:54 | |
or perhaps something like, we don't block a name forever after it's been discontinued by someone? | 00:55 | ||
japhb | If we don't block a name forever, we'll have to be extremely careful about the rules for transferring a name. Seems simpler just to block names forever. | 00:57 | |
timo | i don't think that has happened yet, tbf? but yeah, leaving a name "dangling" is a recipe for trouble | 01:00 | |
01:01
librasteve joined
01:02
yewscion left
01:05
yewscion joined
01:06
librasteve left
|
|||
timo | we don't really have a way to tell github (for example) that some user name should no longer be allowed to be taken by someone else | 01:09 | |
do we have something like :auth<fez:foobar>? | |||
japhb | zef:, but yeah that | 01:10 | |
timo | ok, then we'll need to be careful there | 01:12 | |
01:15
jjido left
01:23
yewscion left
01:25
yewscion joined
01:28
hulk joined
01:29
kylese left
|
|||
SmokeMachine | librasteve_: I have just pushed a new branch (websocket) where the usage of websockets using htmx is implemented in a automatic way... the websocket is only used to send events from server to tjhe browser... The new example implements 2 new components (a clock that receives updates from the server and a counter button that counts the number of times a button was clicked and updates the value to all connected clients). If you would | 01:50 | |
like to take a look: github.com/FCO/Cromponent/blob/web...clock.raku | |||
the clock component: github.com/FCO/Cromponent/blob/web...ck.rakumod | 01:51 | ||
and the counter component: github.com/FCO/Cromponent/blob/web...er.rakumod | |||
if anyone alse would also like to take a look: ☝️ | 01:52 | ||
02:03
yewscion left
02:05
yewscion joined
02:15
hulk left
02:16
kylese joined
02:52
librasteve joined
02:57
librasteve left
03:03
yewscion left
03:05
yewscion joined
|
|||
timo | that's pretty cool | 03:16 | |
03:19
slentzen joined,
slentzen left
03:22
librasteve joined
03:26
librasteve left
03:45
kylese left
03:47
kylese joined
04:03
yewscion left
04:05
yewscion joined
04:34
merp joined
04:49
librasteve joined
05:01
soverysour joined
05:03
yewscion left
05:05
yewscion joined
05:35
soverysour left
05:38
soverysour joined
|
|||
disbot3 | <librasteve> SmokeMachine: that looks amazing ... no time to try for a couple of weeks ;-( ... fwiw I had always imagined a grid of timers that could chain off each other via Supplies [yeah crazy I know - but kind of a web demo of the power of raku concurrency] ... now you have enabled my potty dreams! | 05:48 | |
<librasteve> good feedback from all on the idea that we can eject unwanted tripe from our ecosystem - but I dont think we need any new systems (web of trust would be cool - but that sounds like effort to me) ... where do I formally propose this ejection ... as an RSC/Paper GH issue, a raku discussion? if RSC passes this as a resolution at the next meeting, then that would be a quick practical fix, right? | 05:56 | ||
<librasteve> this "author" (see the link I provided) boats their North Korea affiliations which is known for state sponsored malicious hacking - it's not whether this is true or not, but the reputational damage and real risk of bad stuff been hidden in reams of unreviewed code to our ecosystem that concerns me | 05:58 | ||
06:02
yewscion left
06:05
yewscion joined,
soverysour left
06:10
Sgeo left
06:20
Aedil left
|
|||
timo | i don't agree with your assessment | 06:26 | |
you're refering only to the entry "North Korean Academic Writing: English Language Translations of the Journal of Kim Il Sung University", or is there more? | 06:27 | ||
that's a brief article that characterizes the english translated scientific journals from north korea that have been made publicly available by the dprk, and it concludes with this sentence: "North Korean science, as illustrated in the structure of the journal articles, | 06:32 | ||
therefore serves primarily as a mechanism to justify policy, rather than having as | |||
its primary motive a contribution to knowledge itself. | |||
disbot3 | <librasteve> my assessment is that it is possible that this orcid profile is an AI fake and that it is certain that it contains the North Korea entry you mention - and my concern is that these are potentially peripheral attacks where soft references to real bad actors may be used to test and confuse our controls | ||
timo | " | ||
have you seen the contributions to rakudo issues that were made by the github user slavenskoj? at least one of them looks very LLM-y, but it absolutely stands to reason that a linguist with an interest in less common writing systems would be interested in raku, which claims superior support for unicode and for parsing text with its grammars and such | 06:37 | ||
i would not be surprised if the user in question didn't even consider that creating these modules quickly with gen AI would be a cause for concern by anybody | 06:38 | ||
at the very, very least, we should seek a conversation, not just go into our shed and discuss which weapon to pick to kick someone out with | 06:41 | ||
disbot3 | <librasteve> timo: are you happy with the raku ecosystem being diluted/polluted by AI nonsense? | 06:42 | |
timo | i would like to see some kind of requirement to put a "gen ai disclaimer" in the metadata as well as the readme | ||
disbot3 | <librasteve> in which case, soon 99% of modules will be AI gen trash | 06:43 | |
timo | i haven't looked at the code thoroughly, i can't tell yet if it's actually trash | ||
we can decide we don't want gen ai stuff in the ecosystem. for now, we should choose the "smallest hammer" to deal with the "first offender" because there were not yet any rules in place that they violated, and we as a community should prioritise kindness over knee-jerk reactions | 06:48 | ||
right now what we are dealing with is a single user who may just be newly enthusiastic about raku and scratching some itches they have using the gen ai workflow they are already familiar with, and decided to share the fun with others. that's at worst a bit misguided, but not malicious | 06:51 | ||
when there's more than just a single person, we can look at treating this like a spam problem | 06:52 | ||
don't get me wrong, i hate what gen ai as a whole has done, and is doing | |||
disbot3 | <librasteve> i am ok with kind ... but i think this is a test case for how we want to protect and nurture our ecosystem ... so tell me where I can make this request [I submit to the judgement of the RSC in terms of the decision and any sanction] | 06:53 | |
timo | my first guess is an issue in the problem-solving repo, maybe something like "we need policies and guidelines for dealing with Gen AI Output in the Ecosystem" | 06:55 | |
if you want to make the case that a malicious actor could flood the ecosystem with mountains of code that can't be reviewed and can therefore hide malicious code in it, please don't accuse slavenkoj of doing that. i believe you're probably far off the mark with that suspicion | 06:58 | ||
07:00
ACfromTX left
|
|||
disbot3 | <librasteve> if you want to make the case that a malicious actor could flood the ecosystem with mountains of code that can't be reviewed and can therefore hide malicious code in it <== this is my concern | 07:01 | |
<librasteve> I am stating (not "accusing") that the mass release of new modules from one author has the character that it has mountains of code that are almost certainly ai gen | 07:02 | ||
07:03
yewscion left
07:04
yewscion joined
|
|||
disbot3 | <librasteve> thank you for moderating the conversation - I am also fine with not just jumping on someone who is having fun with tech | 07:06 | |
Geth | ¦ problem-solving: librasteve assigned to codesections Issue We need policies and guidelines for dealing with Gen AI Output in the Ecosystem github.com/Raku/problem-solving/issues/479 | 07:15 | |
disbot3 | <librasteve> timo: thank you for your cool assessment and sensible advice | 07:17 | |
timo | oh, i somehow totally forgot already how annoyed i was at the german translation module | 07:19 | |
i blame the fact that i'm literally sick and also literally tired | |||
disbot3 | <librasteve> artificial stupidity is hard to come to terms with | 07:20 | |
<librasteve> (for me, at least) | 07:21 | ||
timo | my problem with the translation module was that the very first thing shown is that "say" was translated as "sagen" which is very much like having "saying" instead of "say" | ||
who wants to create Infinitive Raku where all verbs are in the infinitive form instead of, for example, imperative | |||
say -> saying, print -> printing, map -> mapping, open -> opening | |||
plus that the readme of the organisations these modules are in claims that all modules have all these features, and then at the very least the german translation says "oh this is not possible by the way because of rakudo issue XYZ" | 07:22 | ||
disbot3 | <librasteve> lol - I have been trying to learn german imperfect (Sie slaf wieder (?)) | 07:24 | |
timo | "sie schlief wieder"? | 07:26 | |
07:40
Aedil joined
07:44
jjido joined
|
|||
disbot3 | <librasteve> yeah - accuracy is not my forte | 07:47 | |
timo | maybe that, or maybe german itself is just rubbish in general | ||
disbot3 | <librasteve> its hard if you didn't get it as a child | 07:49 | |
timo | even then it's still hard occasionally | 07:52 | |
08:02
yewscion left
08:05
yewscion joined
08:29
Aedil left
08:37
jjido left
08:39
librasteve left
08:48
librasteve joined
09:03
yewscion left
09:04
yewscion joined
|
|||
Geth | ¦ problem-solving: lizmat unassigned from codesections Issue We need policies and guidelines for dealing with Gen AI Output in the Ecosystem github.com/Raku/problem-solving/issues/479 | 09:18 | |
09:34
soverysour joined
09:42
soverysour left
09:43
jjido joined
09:48
jjido left
10:03
yewscion left
10:05
yewscion joined
10:21
librasteve left
10:25
librasteve joined
11:03
yewscion left
11:05
yewscion joined
11:13
leah2 left
11:15
leah2 joined
11:18
leah2 left
11:23
leah2 joined
11:29
soverysour joined,
soverysour left,
soverysour joined
11:34
Aedil joined
11:40
jjido joined
11:44
jjido left
|
|||
SmokeMachine | The Portuguese module has the same problem… it translates say to `dizer` (infinitive) instead of `diga` (imperative) | 11:44 | |
lizmat | SmokeMachine: please PR any fixes:-) | 11:45 | |
ah, this is about the AI one, not raku.land/zef:l10n/L10N::PT ? | 11:46 | ||
glad to see that dist got "diga" right at least :) | |||
SmokeMachine | Yes… the one I originally wrote is “correct” (raku.land/zef:l10n/L10N::PT) | 11:47 | |
lizmat | SmokeMachine: what do you think would be a cool name for a Portuguese executable ? | ||
I don't like "porku" much :-) | 11:48 | ||
SmokeMachine | Rakugues? I had a perltugues module (metacpan.org/pod/perltugues) | 11:49 | |
Portuguese => português | 11:50 | ||
11:50
librasteve left
|
|||
SmokeMachine | So, maybe rakuguês? | 11:50 | |
11:54
lizmat left,
Geth left
11:55
Geth joined,
lizmat_ left,
lizmat joined
11:56
librasteve joined
|
|||
lizmat | I was more thinking along the lines of "kaas" for the Dutch localization (as in "cheese"), and "wurst" for the German localization | 11:56 | |
as -Ofun alternatives to the uncool "nedku" and "deuku" | |||
11:58
jjido joined
|
|||
sjn | 13:56 < lizmat> as -Ofun alternatives to the uncool "nedku" and "deuku" | 11:58 | |
13:58 -!- jjido [~Denis@5.133.46.22] has joined #raku | |||
lizmat | ah, ok... my client crashed, and the logger hadn't seen that either | 11:59 | |
which, come to think of it, unsurprising as the logger runs here as well | |||
sjn | hm. /me is pasting random stuff, apparently | 12:00 | |
apologies | |||
lizmat | no worries: most of the stuff you pass around is most definitely not random! | ||
12:00
librasteve left
12:02
yewscion left
|
|||
SmokeMachine | lizmat: For Brazil, maybe `churras`? Short for churrasco that mean bbq (Brazilians loves their bbq)… or maybe `caramelo` that reminds the “vira-lata caramelo” (dog with no pedigree coloured like caramel) that is on of Brazil’s symbols | 12:03 | |
lizmat | I think I prefer the "food" theme, so "churras" would be on my list | 12:04 | |
BTW, shouldn't that be a separate localization? PT-BR ? | |||
or is the current PT basically already Brazilian ? :-) | 12:05 | ||
12:05
yewscion joined
|
|||
SmokeMachine | In Brazil we named portugal as “Brazilian Guiana” (that’s just a joke… a meme that is very big on Brazilian internet…) | 12:06 | |
But European Portuguese and Brazilian Portuguese have a lot of differences… but I don’t think those differences would affect the language translationzzz | 12:08 | ||
lizmat | ok, but "churras" would be seen as typically Brazilian in Portugal, right ? | ||
but maybe "denata" would be more Portugal Portuguese ? | 12:09 | ||
from en.wikipedia.org/wiki/Pastel_de_nata ? | 12:10 | ||
disbot3 | <nurturethevibe> If I call srand, do a bunch of random ops, then call srand again with the same seed, should the sequence reset? | ||
lizmat | ideally, yes. However github.com/rakudo/rakudo/issues/5074 | ||
SmokeMachine | Yes, totally… and I think denata would be perfect for the European version | 12:11 | |
disbot3 | <nurturethevibe> Hm, is there a way to deterministically get the desired behavior that doesn't involve writing a custom random function? 😄 | 12:12 | |
12:13
librasteve joined
|
|||
disbot3 | <nurturethevibe> I tried forking to get a clean sequence but that gave me a different sequence too. | 12:13 | |
lizmat | raku.land/zef:raku-community-modul...th::Random perhaps ? | ||
or more generally raku.land/?q=Math%3A%3ARandom | 12:14 | ||
12:20
soverysour left
|
|||
disbot3 | <nurturethevibe> paste2.org/ZFLeGM2H My "working" solution. | 12:23 | |
<nurturethevibe> I may try Math::Random again later, the documented way to instantiate gives me an error about wrong number of positionals, I looked at the code and the constructor expects a seed. | 12:25 | ||
<nurturethevibe> But when I tried passing the seed it just repeated the error so... idk I'm a noob 😄 | |||
<nurturethevibe> Just trying to implement 2d, 3d and maybe 4d simplex noise for now. Will push to zef if it works. | 12:27 | ||
lizmat | nurturethevibe sadly the captcha doesn't allow me in: I guess I *am* a robot then :-( | 12:31 | |
12:37
soverysour joined,
soverysour left,
soverysour joined
12:38
jjido left
12:45
yewscion left
|
|||
[Coke] | We allow reuse of "name" in auth. Like JSON::Class | 12:50 | |
sorry, 'auth' confusing there. we can specify name/auth/api/ver - name can be used by multiple auths with no conflict | 12:54 | ||
lizmat | I guess we could adapt the "use" logic to fail if there's no specific auth specified, and more than one distribution with different auth is installed ? | 12:55 | |
afk for a few hours& | |||
[Coke] | Maybe at least emit a warning. | 12:59 | |
13:16
librasteve left
13:17
yewscion joined
13:18
jjido joined
13:28
librasteve joined
13:31
jjido left
13:33
Sgeo joined
13:35
jjido joined
|
|||
disbot3 | <nurturethevibe> Updated to use Math::Random::MT. Got 2d noise working, now 3d | 13:43 | |
13:43
apac joined
|
|||
disbot3 | <nurturethevibe> lizmat: lol I made 2 forks and compared the output of both forks 😄 | 13:45 | |
<nurturethevibe> But that's gone now | |||
14:04
jjido left
|
|||
[Coke] | patrickb: You mentioned a module named "Email" but that doesn't exist (for essentials) | 14:06 | |
did I miscapture that output? | |||
I have Email::MIME also, which is good | 14:10 | ||
irclogs.raku.org/search.html?query...2025-06-26 - nope, that's what it was. | 14:11 | ||
patrickb | Coke: That's a false positive. Please ignore. | 14:15 | |
[Coke] | Cool. | ||
cleaning up all the names (the ones from r* were all written with '-' instead of '::') | 14:16 | ||
also removed a bunch from R*. | |||
(er, from our copy of that list, R* is unchanged) | |||
14:20
apac left
14:28
soverysour left
|
|||
[Coke] | ok, github.com/Raku/Blin/wiki/Essential-Modules is cleaned up based on all the submissions | 14:29 | |
14:42
soverysour joined
|
|||
disbot3 | <nurturethevibe> How long does it take for a new dist to appear on raku.land usually? | 15:54 | |
<apogee> github.com/m-doughty/Noise-Simplex If anyone wants to review or try it, I pushed to zef but it probably hasn't indexed yet. First serious bit of code in Raku. | 15:57 | ||
15:58
jjido joined
|
|||
[Coke] | apogee, all tests pass here on mac | 16:01 | |
disbot3 | <apogee> Thanks! I'm on mac too 😄 | ||
[Coke] | it is unclear what the example file is doing. had to read that it was generating img/2d.png in sourc... and that file is already checked in? | 16:03 | |
maybe add a 'note' in the examples about what the output file is? | 16:04 | ||
oh that's painfully blurry. :) | |||
16:04
stanrifkin joined
|
|||
[Coke] | all the 3d-z* seem visually... identical? very similar? | 16:05 | |
disbot3 | <apogee> Yeah it's simplex noise, if it wasn't blurry you'd have an issue 😄 | ||
[Coke] | nifty. were you the one that asked earlier this week if we already a module for this? | ||
disbot3 | <apogee> Yes | ||
<apogee> The 3Ds are different but its hard to tell from the images, if you open the animated 3d.png, you can see it there. | 16:06 | ||
<apogee> Its a very smooth noise algorithm, used for generating terrain in games and stuff like that. | 16:07 | ||
[Coke] | cool. | 16:08 | |
16:12
soverysour left
|
|||
lizmat | apogee interested in some code review? | 16:13 | |
disbot3 | <apogee> Yes please! | 16:17 | |
16:21
stanrifkin left
16:22
soverysour joined
|
|||
lizmat | apogee some general remarks: we usually have "main" as the default branch, instead of "master" | 16:26 | |
on github, the about says "Noise::Simples: " apart from the misspelling, I would just remove that part: it's clear from the name of the repo | 16:27 | ||
16:27
soverysour left,
jjido left
|
|||
lizmat | suggest adding "raku.land/zef:apogee/Noise::Simplex" as the URL in the about of the repo | 16:27 | |
wrt documentation: nowadays I would separate the rakudoc in a separate doc/Noise-Simplex.rakudoc file | 16:29 | ||
and have App::Mi6 generate the README from it for me | 16:30 | ||
disbot3 | <apogee> Updated the about. And thanks, I was wondering what people use to generate README from pod these days. | ||
lizmat | App::Mi6 is essential for me, for the about 400 modules I basically do maintenance of | 16:31 | |
I would make build-permutation-table a sub, and call it in: has @!perm = build-permutation-table | 16:33 | ||
that an attribute is private, doesn't mean you cannot specify a "default" value for it | |||
m: class A { has $!a = 42; method b() { $!a } }; say A.new.b | |||
camelia | 42 | ||
lizmat | so you can get rid of the BUILD method | 16:34 | |
apogee would you use the same instance of Sound::Simplex to create 2d *and* 3d noise ? | 16:36 | ||
generally? | 16:37 | ||
disbot3 | <apogee> You could yes, for multi-pass things, but it's not common. | ||
lizmat | it feels like Sound::Simplex could be a base class, with Sound::Simplex::2D and Sound::Simplex::3D as subclasses | ||
with potentially more subclasses in the future? | |||
disbot3 | <apogee> Probably yes. 4D does exist but the algo is huge. | 16:38 | |
<apogee> And honestly 3D is already pretty slow. | |||
lizmat | well, one could work on that :-) | ||
disbot3 | <apogee> That's something I want to work on yes, but it's probably XS-ish (if Raku has XS). | 16:39 | |
<apogee> To get an actual fast implementation. | |||
lizmat | apogee looking at my @perm-grad2x / my @perm-grad2y: those are supposed to be constants, right ? | ||
disbot3 | <apogee> Even in C a large 3D noise map takes a while. They aren't constants if I add seed changing, they are if I don't 😛 | ||
lizmat | ok, fair enough | 16:40 | |
disbot3 | <apogee> They're not compile time constants though, because they depend on the seed. | ||
lizmat | right | 16:41 | |
github.com/m-doughty/Noise-Simplex...#L179-L183 | |||
disbot3 | <apogee> They're just precalculating maps over the permutation table for the different axes. | ||
lizmat | I think they can be simplified to: | ||
@!perm-grad3z ?? @!perm-grad3z !! (@!perm-grad3z = @!perm.map( -> $v { @grad3[ ($v % 12) * 3 + 2 ] })) | 16:42 | ||
same for all similar methods | |||
disbot3 | <apogee> Thanks, is that some kind of ternary syntax? I am very new at Raku. | 16:43 | |
lizmat | yeah, looks in Perl it would be ? : in Raku it's ?? !! | ||
because the colon was needed for many other functions :-) | |||
disbot3 | <apogee> Fair. | 16:44 | |
lizmat | an empty array boolifies to False | ||
disbot3 | <apogee> I'll try those changes. The current one is a pain to read. | ||
lizmat | also: I assume $n0, $n1, $n2, $n3 will be integers, will they fit in 64 bits? If so, you can make them native ints | 16:48 | |
same for all of the other values that are ints and will fit in 64 bits | |||
also: github.com/m-doughty/Noise-Simplex...#L270-L286 | 16:49 | ||
feels to me that could be a single cascaded ternary: | |||
($i1,$j1,$k1, $i2,$j2,$k2) = $x >= $y0 ?? $y0 >= $z0 ?? (1,0,0, 1,1,0) ?? .... | 16:50 | ||
disbot3 | <apogee> Yeah 100% could, I couldnt work out the ternary syntax 😄 | ||
lizmat | same as in Perl, but s/?/??/ and s/:/!!/ :-) | 16:51 | |
disbot3 | <apogee> n0..n3 are doubles. | 16:52 | |
lizmat | that's 64 bit, right? or 128? | 16:53 | |
disbot3 | <apogee> 64 | ||
lizmat | than a native "num" will suffce | ||
*suffice | |||
line 359 can be removed: .append returns the invocant | 16:54 | ||
disbot3 | <apogee> What's the diff between making build-permutation-table a method or a sub? Can subs belong to classes? | 16:56 | |
lizmat | it would make it harder to use in the initialization of the attribute | 16:57 | |
yes, subs can belong to classes, but are basically just named blocks of code in there | 16:58 | ||
well, I usually use "my" on the subs in the class, to make them truly local | 17:00 | ||
17:01
jjido joined
17:03
yewscion left
|
|||
disbot3 | <apogee> How do you run all the tests at once usually? | 17:09 | |
lizmat | zef test . is the canonical way I guess | 17:10 | |
I use a custom script that works better in CI | |||
17:28
yewscion joined
|
|||
disbot3 | <apogee> Do you use neovim? I find it gets pretty slow on big files? | 17:28 | |
<apogee> Even on an M4 Max | |||
<apogee> (Probably something Raku Navigator related) | 17:29 | ||
17:30
yewscion_ joined
17:32
yewscion__ joined
17:33
yewscion left
17:35
yewscion_ left
17:39
yewscion__ left
17:40
yewscion joined
17:42
yewscion left
17:43
yewscion joined
17:47
yewscion_ joined,
yewscion left,
jjido left
17:55
yewscion_ left
17:57
yewscion joined
18:02
yewscion_ joined,
benchable6 left,
tellable6 left,
sourceable6 left,
bloatable6 left,
greppable6 left,
nativecallable6_ left,
shareable6 left,
unicodable6 left,
evalable6 left,
committable6 left,
bisectable6 left,
releasable6 left,
linkable6 left,
notable6 left,
coverable6 left,
quotable6 left
18:05
yewscion left,
oodani left,
oodani joined
18:07
yewscion_ left
18:09
committable6 joined,
bloatable6 joined,
benchable6 joined,
unicodable6 joined,
greppable6 joined,
releasable6 joined,
nativecallable6 joined,
bisectable6 joined,
quotable6 joined,
yewscion joined,
evalable6 joined
18:10
shareable6 joined,
sourceable6 joined
18:11
linkable6 joined,
coverable6 joined
18:12
tellable6 joined
18:13
notable6 joined
18:35
yewscion_ joined,
yewscion left
18:38
yewscion joined
18:41
yewscion_ left
18:48
yewscion_ joined,
yewscion left
18:50
yewscion joined
18:53
yewscion_ left
18:54
jjido joined
19:00
jjido left
19:05
yewscion_ joined
19:07
yewscion left
19:10
librasteve left
|
|||
timo | huh. something is definitely strange about srand. it gives a different sequence once, then a different sequence every time thereafter | 19:12 | |
and the first sequence is different every time i run the program | 19:13 | ||
so, uhhhh, just call srand with the same seed twice at the beginning as a workaround until we figure outwhat's wrong | 19:14 | ||
lizmat | timo: you're aware of github.com/rakudo/rakudo/issues/5074 ? | 19:16 | |
timo | ah i wasn't | 19:17 | |
i do think we should have one per-thread random state for use in user-facing random ops like pick and roll that is separate from anything the runtime does internally | 19:21 | ||
lizmat | aren't we allowed to switch threads under something that's awaiting in 6.d ? | 19:27 | |
and wouldn't that affect this ? | |||
19:30
soverysour joined
19:43
soverysour left
19:47
Guest39 joined,
Guest39 left
|
|||
timo | right, it would probably want to go along with a mechanism to store and activate a seed so we can do that when we await and resume. or we always work with a dynamic variable which may be slow if we're unlucky | 19:47 | |
19:52
yewscion_ left
|
|||
lizmat | re use of dynamic variables; I was thinking in RakuAST that any scope that uses a dynamic variable, would get that dynamic variable added to its lexical scope automatically | 19:54 | |
and then potentially get lowered, would that make sense ? | |||
timo | not sure how you mean that. added to its lexical scope? | 19:55 | |
lizmat | yes? | ||
20:01
yewscion joined
|
|||
timo | what do we put in it? you mean like a cache? | 20:04 | |
lizmat | yes, so it would always be a lexical lookup instead of a dynamic lookup (except the first time?) | 20:09 | |
and if the dynvar is a container, bind to the container | 20:10 | ||
but only if the dynvar is mentioned in that scope of course | 20:11 | ||
timo | hm, we do already have the dynamic var lookup cache, i wonder how much better we can do than that | ||
lizmat | ah, we do? | ||
where does that live ? | 20:12 | ||
at the VM level ? | |||
japhb | Re: srand: Related to what lizmat said, I don't think an srand() routine affecting process global state even has reasonable affordance anymore now that we are thoroughly in the concurrent world. The only two reasons I can think of right now for having srand() at all are: 1. To be able to supply a "stronger" random seed than the rand algorithm uses natively, which perhaps made sense back in the libc days, but | 20:13 | |
not for a modern implementation, and 2. To force a known sequence, which in our current implementation doesn't actually work (and as per #5074 naturally would not) | |||
So I think we can dump reason #1 on the floor, which means if we want to support reason #2, we need an impl change | |||
Personally I think we should either drop srand() or make something like random sequence state dynvars that make it work correctly. | 20:15 | ||
timo | i'm assuming - without evidence - that dynvars are most expensive when we have lots of calls where it's looked up exactly once. like when we do a bunch of "say" for example | ||
yeah it's in moarvm | 20:16 | ||
japhb | (Personally-personally, I'd choose the latter, because I have use cases for that, but I just think the current state makes no sense) | ||
lizmat | m: sub DYNAMIC($a) { dd $a }; $*FOO for ^10 | ||
camelia | "\$*FOO" "\$*FOO" "\$*FOO" "\$*FOO" "\$*FOO" "\$*FOO" "\$*FOO" "\$*FOO" "\$*FOO" "\$*FOO" |
||
lizmat | timo: looks like *that* is not getting cached ^^ | 20:17 | |
m: sub DYNAMIC($a) { dd $a }; $*OUT for ^10 # nor is this | |||
camelia | "\$*OUT" "\$*OUT" "\$*OUT" "\$*OUT" "\$*OUT" "\$*OUT" "\$*OUT" "\$*OUT" "\$*OUT" "\$*OUT" |
||
20:17
jjido joined
|
|||
timo | ah, there was a reason why we have to call DYNAMIC? | 20:18 | |
lizmat | yeah... because the PROCESS:: ones are not in lexdyn scope | ||
which are basically all core ones | |||
20:20
yewscion left
|
|||
timo | so we actually never directly generate getlexdyn ops? | 20:20 | |
lizmat | hmmm.. come to think of it: it would probably make sense to at least have $*OUT and $*ERR as lexicals in every compunit | ||
not in Rakudo afaik | |||
timo | why weren't we using the fallback resolver for that purpose? | 20:21 | |
the one that was recently removed because it was unused | |||
20:21
yewscion joined
|
|||
lizmat | possibly ? I didn't grok what that was doing and wasn't interested as it was being removed :) | 20:21 | |
timo | i think it allowed us to call a registered dispatcher when a lookup of a variable didn't find anything | 20:22 | |
lizmat | aah... I see now there is a sub DYNAMIC-FALLBACK TIL | 20:23 | |
suffers from the same overhea, it seems | 20:24 | ||
20:25
soverysour joined,
soverysour left,
soverysour joined
|
|||
lizmat | ah, it basically doesn't do the initial getlexdyn that DYNAMIC does | 20:26 | |
so apparently the getlexdyn is codegenned into the QAST in RakuAST | |||
cool | 20:33 | ||
20:54
yewscion_ joined
20:55
El_Che left
20:56
El_Che joined,
yewscion left
20:59
yewscion_ left
21:08
librasteve_ left
21:11
soverysour left
21:28
yewscion joined
21:31
yewscion left
21:34
yewscion joined
21:41
yewscion left
21:56
librasteve joined
22:02
librasteve left,
librasteve joined
22:07
librasteve left
22:13
yewscion joined
22:14
librasteve joined
22:19
librasteve left
22:20
yewscion left
22:48
librasteve joined
22:53
librasteve left
22:54
Guest45 joined
22:57
Guest45 left
23:06
RandalSchwartz joined,
librasteve joined
23:07
RandalSchwartz left
23:11
librasteve left
23:23
yewscion joined
23:24
librasteve joined
23:26
yewscion left
23:29
librasteve left
23:41
librasteve joined
23:45
librasteve left
23:54
librasteve joined
|