🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | 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 8 June 2022.
guifa_ [Coke]++ 00:27
guifa hot damn 01:41
guifa I finally figured out how to do quoted regexen in slang 01:42
nine++ for ^∞ 01:43
It's all thanks to a bug fix you did back in 2016 lol
Xliff guifa: Gonna share the trick? 06:29
tellable6 Xliff, I'll pass your message to guifa
guifa_ Xliff: yeah, I'm about to post the module 09:21
tellable6 2022-08-01T06:29:54Z #raku <Xliff> guifa: Gonna share the trick?
guifa_ I'm still struggling with installing the lexical symbol and trying to get that figured out first 09:22
guifa_ but tbh if it's not possible to do "my/our ecma-regex foo { … }", as long as "my &foo = ecma-regex/…/" works, I think I'll be okay 09:23
(and RakuAST will make the former easy anyways)
Nemokosch it would be nice to get to know today whether my other talk will be accepted or not. It's also okay if not but yeah... I need to start planning. 10:14
lizmat Nemokosch: you can ping @andrewshitov on Twitter :-) 10:27
tellable6 lizmat, I'll pass your message to Nemokosch
lizmat Nemokosch: this one? Refurbishing Raku legacy with Raku 10:28
tellable6 lizmat, I'll pass your message to Nemokosch
tbrowder G’day all. An off-topic question: I use SmartGit when I (reluctantly) need to use Windows. Does anyone have a fav GUI they use for Git on Win 10? I like SmartGit except its setup for ssh is too much trial and error and its not well documented, 11:55
*it’s 11:56
not well..,
moritz_ not personal experience, but several Windows-User have told me they like the github client for windows (and despite the name it's also a generic git client, not "just" githbu) 12:01
Kaiepi i use the tui 12:02
<ide> should have something or other for git 12:03
e.g. vs code
lizmat CommaIDE 2022.07 is out: twitter.com/jnthnwrthngtn/status/1...3771421698 12:07
El_Che Plugin 'Comma Community Edition (Raku Language Support)' (version '2022.07.0') is not compatible with the current version of the IDE, because it requires build 221.* or older but the current build is IU-222.3345.118 12:14
tellable6 2022-07-31T19:45:31Z #raku-dev <jdv> El_Che 2022.07 release happened
El_Che (there is a new intellij release)
ah, new raku pkg
I'll build then today 12:15
lizmat El_Che: yes, please
[Coke] (git on windows) I use git bash 12:17
(so, command line)
habere-et-disper I have a fundamental misunderstanding of whatever closures. 12:27
Is it possible to convert:
m: ('a'..'z' Z=> ^26).map( { .pairs, .antipairs } ).flat
camelia ( no output )
habere-et-disper into:
m: ('a'..'z' Z=> ^26).map( *.pairs, *.antipairs ).flat
camelia Cannot map a Seq using 'WhateverCode.new, WhateverCode.new'
Did a * (Whatever) get absorbed by a list?
in block <unit> at <tmp> line 1
lizmat m: dd *.pairs, *.antipairs 12:32
camelia WhateverCode.new
WhateverCode.new
lizmat that's a list of 2 WhateverCode objects 12:33
habere-et-disper: I'm not sure what you're trying to do ?
El_Che lizmat: running a test build for all the supported distros 12:35
lizmat El_Che++
El_Che jdv: thx for the heads-up! 12:37
.tell jdv: thx for the heads-up!
tellable6 El_Che, I'll pass your message to jdv
habere-et-disper I'm trying to declare and append to a hash it's inverse. While this works: 12:41
m: say ('a'..'z' Z=> ^26).map( { .pairs, .antipairs } ).flat
camelia (a => 0 0 => a b => 1 1 => b c => 2 2 => c d => 3 3 => d e => 4 4 => e f => 5 5 => f g => 6 6 => g h => 7 7 => h i => 8 8 => i j => 9 9 => j k => 10 10 => k l => 11 11 => l m => 12 12 => m n => 13 13 => n o => 14 14 => o p => 15 15 => p q => 16 16 => …
habere-et-disper I don't like all the parentheses and I think of an intuitive way to move in/out up/down of a closure was to change $_ into * but that doesn't work:
m:  say ('a'..'z' Z=> ^26).map( *.pairs, *.antipairs ).flat
camelia Cannot map a Seq using 'WhateverCode.new, WhateverCode.new'
Did a * (Whatever) get absorbed by a list?
in block <unit> at <tmp> line 1
lizmat habere-et-disper: because the latter is the equivalent of: 12:44
m: say ('a'..'z' Z=> ^26).map( { .pairs }, { .antipairs } ).flat
camelia Cannot map a Seq using '-> ;; $_? is raw = OUTER::<$_> { #`(Block|5270057319824) ... }, -> ;; $_? is raw = OUTER::<$_> { #`(Block|5270057319896) ... }'
Did a * (Whatever) get absorbed by a list?
in block <unit> at <tmp> line 1
lizmat m: dd ("a".."z").map: { ($_, .antipair).Slip with $_ => $++ } # habere-et-disper: perhaps a better way ? 12:56
camelia (:a(0), 0 => "a", :b(1), 1 => "b", :c(2), 2 => "c", :d(3), 3 => "d", :e(4), 4 => "e", :f(5), 5 => "f", :g(6), 6 => "g", :h(7), 7 => "h", :i(8), 8 => "i", :j(9), 9 => "j", :k(10), 10 => "k", :l(11), 11 => "l", :m(12), 12 => "m", :n(13), 13 => "n", :o(1…
habere-et-disper Thanks lizmat. I've refined it down to: 13:18
m: say flat ('a'..'z').pairs.map: { $_, .antipair }
camelia (0 => a a => 0 1 => b b => 1 2 => c c => 2 3 => d d => 3 4 => e e => 4 5 => f f => 5 6 => g g => 6 7 => h h => 7 8 => i i => 8 9 => j j => 9 10 => k k => 10 11 => l l => 11 12 => m m => 12 13 => n n => 13 14 => o o => 14 15 => p p => 15 16 => q q => 1…
lizmat habere-et-disper++ 13:19
lizmat and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2022/08/01/2022-...merelease/ 13:44
El_Che lizmat: package should be up 13:46
onlu opensuse 15.4 not there yet 13:47
cloudsmith must add the repo. *Every* raku release is the canary for adding missing repos
:)
lizmat liz@DebianMini:~$ raku -v 13:50
Welcome to Rakudo™ v2022.07.
whee!
El_Che: weekly updated :-)
El_Che opensuse 15.4 added 14:26
leont submitted that talk, for 20 minutes. I might have to ask to make that 45 TBH, but I won't be sure until I've written it 14:32
tbrowder moritz_: thanks 16:55
[Coke]: using bash works i know, but i see warnings about using files on its file system with Wih 16:57
tellable6 tbrowder, I'll pass your message to [Coke]
[Coke]_ Wih? 16:58
tbrowder *Win apps. (ext4 vs ntfs)
tbrowder Win apps, such as Word 16:58
[Coke] I'm not sure how that relates to git? 16:59
tellable6 2022-08-01T16:57:09Z #raku <tbrowder> [Coke]: using bash works i know, but i see warnings about using files on its file system with Wih
[Coke] I am using git bash on the same drive as everything else, no issues here. 17:01
tbrowder ok, good to know, thnks 17:03
tonyo tbrowder: does the win10 shell not have git cli? 18:19
or do you use a gui in your solaris 9 (:)) setup normally?
tbrowder tonyo: yes, i have bash and can use the git cli. i will use that as a fall-back if i can’t get smartgit to do what i want. thnx 18:21
jdv El_Che: rock on 18:36
tellable6 2022-08-01T12:37:46Z #raku <El_Che> jdv: thx for the heads-up!
[Coke] I have a loop that could start one or two Proc::Async items, but may skip either on any given iteration; can I still use the react {whenever} syntax? can I wrap the whenever block inside an if in the react? 19:07
[Coke] "Failed to spawn process... name too long" - how long is too long? 19:22
jdv long 19:23
coleman There is an OS-level limit to the length of a command line but it is REALLY long 19:31
basically you have to blow the stack
tbrowder i 20:00
[Coke] yah, I ended up just playing with the number so it's not exploding right now, but would love to know what my limit really is so I can make sure I don't blow up when the args change slightly later. 20:01
tbrowder looking at the docs i see no clean way to separate an absolute file path onto TWO parts: basename and its parrent. i think its "$f.IO.parent.absolute" but its 20:08
*it's not shown as an example anywhere in my searching 20:09
Nemokosch any particular reason why Any.List is a List _containing_ Any?
tbrowder 'scuse my typos...
Nemokosch even worse: List.List being a nested list 20:10
lizmat m: dd "foo".List 20:11
camelia ("foo",)
lizmat calling .List on *any* scalar value, will create a List with that value 20:12
m: dd List.List
camelia (List,)
lizmat that's not a recursive list, that's a list with a List type object in it
Nemokosch indeed, but who thought this was a good idea? :\
tellable6 2022-08-01T10:27:36Z #raku <lizmat> Nemokosch: you can ping @andrewshitov on Twitter :-)
2022-08-01T10:28:46Z #raku <lizmat> Nemokosch: this one? Refurbishing Raku legacy with Raku
lizmat it's the other side of:
m: dd List[0] 20:13
camelia ===SORRY!=== Error while compiling <tmp>
List cannot be parameterized
at <tmp>:1
------> dd List[0]⏏<EOL>
lizmat m: dd "foo"[0] 20:13
camelia "foo"
Nemokosch and that's also a source of bugs 20:13
lizmat it also simplified a *lot* of things
Nemokosch indexing strings "works", just never well 20:14
in my particular case - I'm retrieving JSON data and do a map on an array that may be missing
the missing array acts like an array that contains an Any value 20:15
like really...
lizmat .map({ ... }) with $value
Nemokosch it was deep(-ish) in an expression 20:16
lizmat m: my %h; for %h<a> { dd $_ }
camelia Any %h{'a'} = Any
lizmat same issue, I guess
so not just with JSON
Nemokosch anyway - it can be solved surely, I for example added // () on the supposed array 20:17
but I'm quite confident that it's a bad default...
lizmat the default allows you to do this:
m: my %h; %h<a>++; dd %h 20:18
camelia Hash %h = {:a(1)}
Nemokosch that a missing list will implicitly treated as a list that contains a sole Any
lizmat the Any is actually a container waiting for a value
Nemokosch and then throw warnings all over the place
feels like very unnecessary mental load 20:19
lizmat so you'd rather it be an empty Slip
Nemokosch Well definitely, although I get it that it's really hard to adjust to that in a consistent manner 20:20
but I do think Any.List itself is questionable as ((Any)) 20:21
or any value with .List as that value inside a List, for that matter
lizmat well, it is consistent: why would Any be different from any other type object ?
Nemokosch I mean... yes, it escalates from the generally troublesome "type objects are default values" principle, partially 20:22
but it doesn't follow that values have to convert into lists with a wrapping semantics 20:23
That's not a "conversion" in my dictionary for sure
Especially if we take it into account that a List can be converted into an Int as the number of elements in that List 20:24
lizmat well, if you feel strongly about it, there's the problem solving repo :-)
it's just that there have been *extensive* discussions on these behaviours in the 15 years it took to get the first release out 20:25
Nemokosch If I saw any chance that it would be changed, I would open an issue for it
Frankly speaking, this falls into the category that I consider a waste of time 20:26
lizmat I would have to agree :-) 20:27
Nemokosch Eventually, there will be no convincing argument why it works this way; there will be 5 other things brought up that I all consider issues, and eventually nothing would change.
Been there, done that at least two times
Now that we are at it, not even != and ne could be turned into proper first-class operators by all that "lobby" coming from several unrelated people 20:30
And out of all the issues that I consider unjustified gotchas, 1. that would be the easiest fix 2. that got most support from unrelated people 20:31
lizmat how are != and ne not first class operators ?
Nemokosch You have to know this because you were the one who even opened a pull request to fix this 20:32
m: so (1&2&3&7) < 5 20:34
camelia WARNINGS for <tmp>:
Useless use of "so " in expression "so (1&2&3&7) <" in sink context (line 1)
Nemokosch oops
m: dd so (1&2&3&7) < 5
camelia Bool::False
Nemokosch m: dd so (1&2&3&7) < 5
camelia Bool::False
Nemokosch me and the clipboard 20:35
m: dd so (1&2&3) < 5
camelia Bool::True
Nemokosch and you probably know what comes next
m: dd so (1&2&3&7) != 5
camelia Bool::True
Nemokosch m: dd so (1&2&3&7&5) != 5
camelia Bool::True
Nemokosch "all of these are not equal to 5"... seems about right, no? would I lie to you? :D 20:36
lizmat github.com/rakudo/rakudo/pull/3874 20:37
Nemokosch Exactly! 20:38
lizmat well, read all the reasoning please :-)
Ah, I see you did 20:40
well, I spent enough time on that already, and as I said on Jan 5th, I gave up 20:41
Nemokosch and ngl I think it's easy to see the logic mistake TimToady made when this came up back in the day on irc 20:47
namely that English (languages I know in general added) doesn't know precedence for words
therefore natural languages can "contradict themselves" by using different precedence, conveyed by emphasis or just common sense in the context 20:48
this doesn't work for a formal language
also the whole analogy breaks if we don't insist on reading != as something with "not" in it but say "is different", "is smaller or bigger" or something like that 20:53
lizmat I'm afraid your preaching to the choir here :-) 20:57
Nemokosch I'm too late to join a conversation from 6 years ago :P 21:01
But frankly I wouldn't even feel chill about it if I didn't leave some traces of what I think has to be commented on
And this whole reasoning is too easy to break, annoyingly easy, when we are talking about the design of a programming language... 21:04
what does "5 is greater than any of the listed numbers" even mean, for example? It definitely can be understood as "greater than all of them", right? 21:05
but when I pose this as a question, suddenly it leans towards "is there a number in that list that is less than 5" 21:06
we could come to the conclusion that it's "any" that is really weird and "logic-breaking" in English, not negation 21:08
tbrowder erf, solution is "path.dirname, path.basename", i just can't remember it!!! 21:11
Nemokosch sorry for spamming that question "away" - actually if I noticed, I would have known the answer :( 21:12
Geth doc: 2f18f82501 | (Daniel Mita)++ (committed using GitHub Web editor) | cpanfile
Set max AssetPack version in cpanfile (#4094)
22:35