04:33
camelia left
04:41
camelia joined
|
|||
monkeyinthejuice | How do I doing physics in RAKI | 05:07 | |
rcmlz | Dr. Peper, Use m to substitute p, a to substitute e, n to substitute a, g to substitute c, o to substitute h, how to spell peach under this rule? | 07:56 | |
Shrek 5: The Dr Pepper Adventure - I can tell you how physics doing in RAKI - if we switch to Icelandic - I do not speak English. OK? | 08:06 | ||
or we use PM: waisted-time@raki.org - Email or Islandic, what do you prefer? | 08:08 | ||
08:34
renormalist left
10:25
msiism left
|
|||
monkeyinthejuice | Why are you ask me to spell mango | 12:23 | |
gluonvelvet | Silly question, is there a way to make a game in raku? | 16:54 | |
lizmat | raku.land/?q=Game | 17:00 | |
you might also want to check the #mugs channel | 17:01 | ||
gluonvelvet | Ok, thank you | ||
ab5tract | gluonvelvet: there are also raylib bindings available | 17:45 | |
gluonvelvet | Raylib? | 17:46 | |
antononcube | @gluonvelvet Also, you can play bad-chess with LLMs via Raku. | 18:47 | |
raku-advent.blog/2024/12/04/day-4-...with-llms/ | 18:48 | ||
I am sure other games can be played (badly) with LLMs too. (Again, via Raku.) | |||
gluonvelvet | I don't know my vocab :( | 19:10 | |
Oh wait I decided to read I may be stupid | |||
23:19
msiism joined
|
|||
msiism | I'm having a bit of a problem with a small array experiment: paste.debian.net/plainh/b9dc0b6e | 23:19 | |
I guess the root problem is probably with how I declare the array up top. | 23:21 | ||
ab5tract | msiiim: so your code is actually storing the summation of the 3 numbers as the first value in your array | 23:35 | |
m: my Int @a; for ^3 -> $i { @a += $i * 5 }; say @a | |||
camelia | [11] | ||
ab5tract | m: my Int @a; for ^3 -> $i { @a.push: $i * 5 }; say @a | ||
camelia | [0 5 10] | ||
ab5tract | That’s more what you want… however it might be simpler to use the variable in your for loop as an index into the array | 23:36 | |
m: my Int @a; for ^3 -> $i { @a[$i] = $i * 5 }; say @a | 23:37 | ||
camelia | [0 5 10] | ||
ab5tract | Also there are few quick ways to find out repetitions | ||
msiism | Okay, so `+=` does not act like `push`, I see. | 23:39 | |
lizmat | + coerces to numeric scalar values | 23:40 | |
m: dd +"42" | |||
camelia | 42 | ||
lizmat | m: dd +"foo" | ||
camelia | Failure.new(exception => X::Str::Numeric.new(source => "foo", pos => 0, reason => "base-10 number must begin with valid digits or '.'")) | ||
msiism | I see. | 23:41 | |
ab5tract | and @arrays return their element count | ||
msiism | Yeah, just saw that in the docs. | ||
lizmat | x op= y means x = x op y | ||
ab5tract | m: say bag <a a a b c> | 23:42 | |
camelia | Bag(a(3) b c) | ||
msiism | lizmat: Yeah, I got that for scalars. But somehow my Bash hacking carried over into Raku… | 23:43 | |
lizmat | sadly we don't have a bash to raku guide (yet) | 23:44 | |
ab5tract | m: my @a = <a a a b c>; say @a - @a.unique - 1 | ||
camelia | 1 | ||
ab5tract | Ah, that should either be a + 1 | 23:45 | |
msiism | I wonder if such a guide would really be worth having. I mean, it would surely not be much fun to write because Bash is quite a bit catasrophic in quite a few places. | ||
ab5tract | Or maybe that approach doesn’t work at all, now that I think about it | 23:46 | |
lizmat | well, then it could be a short guide: :Just Use Raku" :-) | ||
msiism | That'll do for me. :) | ||
lizmat | ;-) | ||
afk& | |||
ab5tract | Anyway, bags are cool and great at counting repetitions | ||
msiism | I see. | 23:49 | |
Also, not meaning to shame Bash. I use it daily to my advantage. | 23:50 | ||
But then, it really should be used within reasonable limits. | 23:51 | ||
Okay, so `@arr[$i] = $val` will work, but `@arr[$i + 1] = $val` won't. | 23:56 |