00:01 david7832 joined 00:04 Aedil left 00:28 deoac left 00:47 Geth joined, lizmat joined 00:50 david7832 left 01:11 sibl joined 02:22 sibl left 02:23 sibl joined 02:29 sibl left 02:50 kylese left, kylese joined 03:06 sibl joined 03:15 kylese left, kylese joined 03:27 vasko4535586 left 04:01 Guest71 joined 04:03 Guest71 left 04:12 Aedil joined 05:15 sibl left 05:23 sibl joined 06:05 [Coke] left 06:57 [Coke] joined 07:10 Sgeo left 07:28 lichtkind joined
patrickb This (list assignment / binding) really needs some documentation. (Or it needs to be better findable.) 07:30
Z= seems to not be in the docs.
Voldenet: Thanks for the hint btw! 07:32
07:46 abraxxa joined 07:57 abraxxa left 09:15 librasteve_ joined
disbot2 <librasteve> so what is Z= doing? taking one from right one from left and item assigning left=right? 09:19
lizmat yup 09:20
m: dd &infix:<=>
camelia sub infix:<=> (Mu \a, Mu \b) { #`(Sub|3001080137856) ... }
lizmat conceptually, it's an op like any other op
in standard use it gets optimized away, but you *can* use it with Z 09:21
09:23 sibl left
Voldenet patrickb: it's not documented, because it's a trick, but I like to share it because it's neat :p 09:41
people writing `my (a, b, c) = (a, b, c)` or `my (a, b, c) = @x` want to "assign first value to first item" and so on, and Z= turns that assignment into boring `my a = @x[0]; my b = @x[1]; my c = @x[2]` 09:44
but it may not always be what people want 09:45
lizmat also: the binding solution will probably be much more efficient
Voldenet m: my ($a, @b) Z= (1, 2, 3); say @b # definitely not as expected
camelia [2]
Voldenet Yes, in the most trivial case of one value assignment, Z= is around 30% slower 09:53
and in case with huge arrays (100_000 items), it can even get up to 1000% times slower 09:55
because it copies things
timo hm, but Z is meant to be lazy, it should be able to iterate instead of reifying everything up front 09:57
10:12 kjp joined 10:54 deoac joined 11:04 deoac left 11:31 eseyman left 11:32 sibl joined 11:43 eseyman joined 11:57 sibl left 12:03 eseyman left 12:10 eseyman joined
Geth CCR/main: c796ce7b26 | (Elizabeth Mattijsen)++ | 12 files
Another 11 blog posts by masak from 2009
12:20
CCR/main: b15d1b6a36 | (Elizabeth Mattijsen)++ | 38 files
Add another 36 blog posts by masak
13:28 sibl joined 13:34 sibl left
Geth CCR/main: 5df12c4662 | (Elizabeth Mattijsen)++ | 15 files
Now at 100 masak blog posts remastered
13:37
13:39 lizmat_ joined 13:42 lizmat left 13:46 lizmat_ left, lizmat joined 14:22 bobv joined 14:30 rindolf joined
rindolf hi all. is www.facebook.com/wgavdijk on irc? it's the only usable IM system for me. 14:35
14:39 bobv left
[Coke] Don't believe so. 14:42
rindolf [Coke]: ok. after i moved fb's chat to end2end encrypt, i've been suffering from the bad web UX 14:49
www.shlomifish.org/philosophy/phil...side.xhtml 14:50
doh; www.shlomifish.org/philosophy/phil...side.xhtml 14:51
[Coke] not sure what that has to do with Raku, but it's a 404
ok, followup is 200 14:52
rindolf [Coke]: e2e enc, TLS, etc 'ssolve' wrong issues 14:53
15:03 sorenson left
disbot2 <antononcube> @lizmat Do you think this implementation of using RakuAST is some sort of a "cheating" : github.com/antononcube/Raku-LaTeX-...akumod#L34 15:07
<antononcube> Basically, I translate LaTeX code to (Math)JSON; from JSON I produce plain strings that are Raku code; those strings are transformed to RakuAST objects with .AST. 15:09
ab5tract anton: seems like a reasonable use case to me :) 15:11
disbot2 <antononcube> The alternative is to build/construct the RakuAST objects directly, but I am not sure how to do that.
<antononcube> @ab5stract Good to know -- thanks! 15:12
ab5tract They’re just regular classes.. that you have to look into rakudo source to find the constructor args for ;) 15:13
SmokeMachine: I just saw your latest rakudo bug report. Holy cow man! I’m endlessly amazed by what you are able to uncover 15:15
disbot2 <antononcube> Ok. TBH, as "simple grammar developer" using the code strings is easier and more readable.
ab5tract anton: the aforementioned SmokeMachine has done some good work on tooling for RakuAST in user space.. can’t recall the name of the repo right now tho 15:16
The biggest PItA from a user perspective is likely that most RakuAST constructors require other RakuAST arguments 15:17
disbot2 <antononcube> Yeah, I was thinking just that -- that SmokeMachine was discussing the building / traversing of RakuAST trees.
ab5tract One approach would be to take an already constructed AST object of the same class you want to construct and then re-use as many of its fields as possible in creating the new one. 15:21
But yeah, there’s currently a lot of friction. Enough that I would say your approach is the most sane at the moment 15:22
disbot2 <antononcube> Right -- I was considering that for the sums and products translation. E.g. using the RakuAST of [+] (1 .. 10).map(-> $n! { ($n ** 2) }) and filling-in the limits and function.
15:27 liztormato joined, liztormato left
ab5tract That should totally work 15:37
m: use v6.e.PREVIEW) 1.AST.say 15:38
camelia ===SORRY!=== Error while compiling <tmp>
Unexpected closing bracket
at <tmp>:1
------> use v6.e.PREVIEW<HERE>) 1.AST.say
ab5tract m: v6.e.PREVIEW; 1.AST.say
camelia RakuAST::StatementList.new(
RakuAST::Statement::Expression.new(
expression => RakuAST::IntLiteral.new(1)
)
)
ab5tract So that also allows you to be a bit less verbose with the fields your are replacing 15:39
disbot2 <antononcube> I see. 15:40
ab5tract Except that’s wrapped with statement stuffs
Also, though it’s usually technically impolite to do so, you can always use nqp::bindattr and friends to manipulate the attributes of an object directly 15:41
Found SmokeMachine++’s repo github.com/FCO/ASTQuery 15:42
16:09 Sgeo joined
disbot2 <antononcube> I am going to file issues on the documentation side of that repository/package. 16:31
lizmat antononcube I would write !extract-expression something like: if try $ast.statements andthen .elems == 1 { (try $ast.statements.head.expression) // $ast } 16:50
but yeah, looks like a legit way of using the Raku grammer to create an AST of an expression, and then taking it apart :-) 16:52
16:56 woolfy joined
woolfy Hi folks. Just passing by. Breaking the silence here, sorry. Nice to see many familiar names. Greetz, Wendy 17:00
disbot2 <antononcube> @woolfy This is a place for raccoons. Wolfs might feel more at home in the Wolfram Lang forums... 17:15
woolfy Meh, I don't dig Wolfram. Raku pleases the eye and looks more like fun (when I look over lizmat 's shoulder, that is). 17:19
disbot2 <antononcube> Ok. BTW, you are saying that you do not dig Raku either, just watching it. 17:28
<antononcube> It is one my missions to provide in Raku functionalities alternative to Wolfram's. Some, not all. 17:29
woolfy is just watching over lizmat 's shoulder, haven't programmed a line in over a decade... 17:40
disbot2 <antononcube> LLMs know Raku -- better and better. 17:42
woolfy Never used AI, not planning to. Want to think for myself.
disbot2 <antononcube> Code generation with AI is not thinking. You have to be able describe what you want reasonably well. 17:44
woolfy Yeah, I'd rather watch over the shoulder of an awesome programmer than to help AI get better. 17:48
17:54 abraxxa joined 17:55 abraxxa left 17:57 abraxxa joined 18:02 abraxxa left 18:16 rindolf left
disbot2 <antononcube> 🤷‍♂️ 18:20
perryprog I wonder what the least used Wolfram function is 18:26
disbot2 <antononcube> Wolfram Research, Inc. (WRI) accumulates and keeps usage statistics in various settings, but they are not sharing them. 18:43
<sabedoesthings> Hey what exactly does the bot do? Just wondering.
<antononcube> I strongly suspect the least used functions are in the mathematical sub-cultures in Wolfram Language (WL), like, say Number theory or Graph theory. 18:44
<antononcube> Actually, newly released in WL mathematical subcultures should have functions that are rarely used. (E.g. Game theory.) 18:45
18:47 woolfy left
disbot2 <arkiuat> <@817227262784045067> which bot are you referring to? There are several 19:01
Geth CCR/main: 39bb236832 | (Elizabeth Mattijsen)++ | 42 files
Add remaining masak posts of 2009
19:53