🦋 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 inspection is getting closer to beta. If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 25 August 2021.
Guest72 Searching for a way to generate password suggestions from the entire set of printable letters, numbers, and punctuation characters that does _not_ enforce that not character appears more than once. So far, I'm striking out. 00:50
japhb Guest72: `pwgen` on Linux systems 00:54
ggoebel Guest72: is your set of printable letters numbers, and punctuation the subset available in ascii or utf8? 01:51
ggoebel m: (0..15).map({ ('0'..'z').pick }).join.say 01:55
camelia lSJbg0T<uF6mP3G2
moon-child hmm, I find the map kinda obfuscatory 02:04
in that I usually expect the verb of a map to be pure or pure-ish
probably prefer do-for or gather-for
Voldenet m: (^32).roll(15).map(*.base(36)).join.say 02:08
camelia VKFN75FV7E5GU5O
Voldenet `from 32 numbers roll 15 times and use their base36 representation` 02:09
ggoebel m: ('0'..'z').roll(15).join.say 02:11
camelia 3IP_4WyX_?WK?du
moon-child all of this discussion aside, I would not generate passwords using raku
I do not think its rng is cryptographic
I generally use dd /dev/urandom|base64
Voldenet you don't need crypto rng for password
moon-child specifically dd if=/dev/random bs=1 count=12 2>/dev/null | base64 02:12
Voldenet: sure, and if somebody figures out what raku script you were using to generate your password, they throw some seeds at the rng and crack it
esp.: you used unique passwords, but you generated them in batch; so an attacker figures out one password, and has a pretty good idea of the rest 02:13
is it a _likely_ attack vector? No, not particularly; but it's very cheap and easy to avoid it, so why not?
Voldenet `cat /dev/random | head -c12 | base64` is something i use tho
or echo $(cat /dev/random | tr -dc '[:graph:]' | head -c15) 02:14
or just use firefox which does this for you 02:15
moon-child generating passwords with your browser is _probably_ fine (though I wouldn't do it anyway), but sounds dangerously close to _storing_ passwords with your browser, which is a god-awful idea 02:17
Voldenet Why is it awful? 02:20
moon-child because they're stored in plain text 02:21
Voldenet are you from the past?
firefox for example stores passwords encrypted 02:22
hacks.mozilla.org/2018/11/firefox-sync-privacy/ 02:24
moon-child I see. The encryption is off by default; and the passwords are kept in memory--in the same address space as a live javascript vm 02:25
Voldenet I'm not sure if that's the case 02:31
Xliff_ \o 02:33
Are there nightlies of Rakudo for windows?
I can't seem to get rakubrew working under Cygwin. It used to work perfectly.
lucs Encrypted or hashed> 02:34
?
Voldenet while I'm not sure if firefox even stores passwords in the same address space, I'm sure they can be extracted somehow 02:38
in that case, the safest way to store passwords would be outside of the computer 02:39
ggoebel moon-child: change the random seed...
my Int $seed = qqx{od -An -N3 -i /dev/random}.Int; srand($seed); ("0".."z").roll(15).join.say
evalable6 EsOLCAYl^nBB3Dk
moon-child ggoebel: seed is irrelevant; what matters is the rng 02:40
ggoebel surprised that worked... figured shell quoting would be disabled
moon-child i think it runs in a sandbox
you can do this anyway 02:41
m: use NativeCall; sub system(Str) is native {*}; system "echo hi"
camelia hi
moon-child and I think there are cpu time limits too, so good luck mining bitcoin 02:43
Voldenet m: "/proc/1/cgroup".IO.slurp.say 02:44
camelia 12:blkio:/
11:rdma:/
10:devices:/init.scope
9:cpuset:/
8:memory:/
7:hugetlb:/
6:freezer:/
5:pids:/init.scope
4:perf_event:/
3:cpu,cpuacct:/
2:net_cls,net_prio:/
1:name=systemd:/init.scope
0::/init.scope
Voldenet lucs: obviously encrypted, hashes are not very usable in password manager 02:46
Geth doc: 487b278bfe | (JJ Merelo)++ | doc/Type/Match.pod6
Fixes :bug: describing correctly how to works. Closes #4000
09:08
linkable6 Link: docs.raku.org/type/Match
Juerd I'm not going to renew the domain name perl6.nl - someone once provided an IP to keep it active, but there's no longer any perl6/raku site configured on that IP and I forgot who it was. I don't think anyone uses this domain for anything anymore. 14:16
If anyone wants to "rescue" this domain, contact me please :)
It will expire in March
(The domain name has been used for feather.perl6.nl back in the pugs days) 14:17
SmokeMachine .tell patrick sorry I haven’t seen your issue before, but I’ve just answered: github.com/FCO/Red/issues/539#issu...-997403720 14:45
tellable6 SmokeMachine, I haven't seen patrick around, did you mean patrickb?
SmokeMachine tellable6: yes 14:46
tellable6 SmokeMachine, I haven't seen yes around, did you mean ens?
SmokeMachine :(
.tell patrickb sorry I haven’t seen your issue before, but I’ve just answered: github.com/FCO/Red/issues/539#issu...-997403720
tellable6 SmokeMachine, I'll pass your message to patrickb
SmokeMachine .tell patrickb also this one: github.com/FCO/Red/issues/538#issu...-997405831 14:56
tellable6 SmokeMachine, I'll pass your message to patrickb
ab5tract good *, all 18:04
quick question: what is the Texas version of docs.raku.org/language/setbagmix#i..._%E2%89%A2 18:05
lizmat !(>) 18:11
ab5tract ^^
there is no specific one, just the negation of (>)
ab5tract negation of (==), right?
I can't seem to get my version of Comma to accept that syntax, or the unicode version. though the code runs fine 18:12
lizmat ah, oops, not enough on that page... yes :-)
then time to make a Comma issue ?
thowe does someone here edit "Learn Raku in Y minutes"? I've found a minor mistake. 18:22
nm, looks like I should report on github 18:23
ab5tract lizmat : I should update to the latest version first. been a bit lazy about it :0 18:31
lizmat : are object hashes still a separate thingy? I was expecting %hash-int-to-sets.invert to DWIM 18:32
lizmat code? 18:33
ab5tract gist.github.com/ab5tract/dec2907ba...c1b1614b74 18:34
lizmat ^^ (just bumping in case you didn't see already) 18:36
brb, switching OS
ab5tract hmm.. no link to the IRC chat logs on raku.org/community/ 18:48
lizmat I'm unable to check whether you already responded :/
lizmat logs.liz.nl/raku/live.html 18:50
I didn't respond yet, as I'm not sure what you're trying to achieve? 18:51
so you're splitting on single space, and then combing on word characters and then combing again? 18:52
sorry, now my time to be afk, dinner&
ab5tract lizmat: ignore those things. I had to put the extra comb in there because i was getting sets with "" as an element. very bizarre and it definitely felt like a hack 18:56
what I am trying to achieve is having a lookup hash with Sets as keys 18:57
hence what I meant when expecting `%hash-of-int-to-set.invert` DWIM -- I am expecting to have a hash with sets as the keys, not a stringified version of the set 18:58
guifa ab5tract: by default, my %foo is basically my Any %foo{Str} 19:06
my Any %foo{Set} 19:07
if I'm getting what you're trying to do
ab5tract guifa it's more about a feeling that .invert should preserve the type of values 19:08
guifa ab5tract: that's fair 19:09
ab5tract it would break the ecosystem, I'm sure
guifa actually 19:10
.invert does
It's the storing into the hash that coerces
m: my Int %foo = a => 1, b => 2; say %foo.invert.keys.head.WHAT;
camelia (Int)
guifa my Int %foo = a => 1, b => 2; my %bar = %foo.invert; say %bar.keys.head.WHAT; 19:11
evalable6 (Str)
ab5tract m: my %h = 0 => Set.new(4, 5); dd %h.invert
camelia (Set.new(5,4) => "0",).Seq
ab5tract m: my %h = 0 => Set.new(4, 5); my %oh = %h.invert; dd %oh 19:12
camelia Hash %oh = {"4 5" => "0"}
ab5tract guifa nice to see that! however, I would still consider the above a bit of a WAT. 19:13
m: my %h = 0 => Set.new(4, 5); my Int %oh{Set} = %h.invert; dd %oh
camelia Type check failed in assignment to %oh; expected Int but got Str ("0")
in block <unit> at <tmp> line 1
ab5tract m: my %h = 0 => Set.new(4, 5); my Any %oh{Set} = %h.invert; dd %oh 19:14
camelia Hash[Any,Set] %oh = (my Any %{Set} = Set.new(4,5) => "0")
ab5tract still, this does resolve my current issue :)
 m: dd "acedgfb cdfbe gcdfa fbcad dab cefabd cdfgeb eafb cagedb ab | cdfeb fcadb cdfeb cdbaf".split(" | ")[0].split(' ').map: *.comb(/(\w+)/).split('').grep(* ~~ /\w/).Set 19:25
camelia (Set.new("d","c","e","g","f","a","b"), Set.new("b","e","d","c","f"), Set.new("a","g","d","f","c"), Set.new("c","f","a","d","b"), Set.new("d","b","a"), Set.new("d","a","b","e","f","c"), Set.new("f","b","d","c","e","g"), Set.new("e","b","f","a"), Set.ne…»
ab5tract  m: dd "acedgfb cdfbe gcdfa fbcad dab cefabd cdfgeb eafb cagedb ab | cdfeb fcadb cdfeb cdbaf".split(" | ")[1].split(' ').map: *.comb(/(\w+)/).split('').Set 19:26
camelia (Set.new("d","e","b","","f","c"), Set.new("c","b","","a","d","f"), Set.new("d","b","c","","f","e"), Set.new("b","","f","c","d","a")).Seq
ab5tract lizmat ^^ here you can see the issue with unexpected "" s in the sets 19:27
lizmat m: dd "foo".split("") 19:28
camelia ("", "f", "o", "o", "").Seq
lizmat isn't that the issue ^^ ?
ggoebel m: dd 'acedgfb cdfbe gcdfa fbcad dab cefabd cdfgeb eafb cagedb ab | cdfeb fcadb cdfeb cdbaf'.split(' | ')[0].comb(/\w+/).map: *.comb.Set 19:49
camelia (Set.new("g","d","b","f","a","c","e"), Set.new("c","f","b","d","e"), Set.new("d","f","g","c","a"), Set.new("f","b","c","d","a"), Set.new("d","b","a"), Set.new("e","a","c","b","d","f"), Set.new("b","d","f","g","c","e"), Set.new("b","f","e","a"), Set.ne…»
ggoebel m: dd "foo".split("", skip-empty) 19:52
camelia ===SORRY!=== Error while compiling <tmp>
Undeclared routine:
skip-empty used at line 1
ggoebel m: dd "foo".split("", :skip-empty)
camelia ("f", "o", "o").Seq
ab5tract ggoebel, lizmat : uff.. yes that is exactly the issue. no idea why I didn't remember that .comb is what I wanted, not split('') 20:00
thanks for the reminder of :skip-empty ggoebel
Geth doc: usev6++ created pull request #4001:
Minor cleanup for section "Getting started"
21:07
ggoebel m: my Int %h{Set}; %h = Set.new(4,5) => 0; dd %h 22:38
camelia Hash[Int,Set] %h = (my Int %{Set} = Set.new(5,4) => 0)